@deriv-com/smartcharts-champion 1.3.10 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -18
- package/dist/chart/flutter_bootstrap.js +1 -1
- package/dist/chart/flutter_service_worker.js +1 -1
- package/dist/smartcharts.css +44 -44
- package/dist/smartcharts.css.map +1 -1
- package/dist/smartcharts.js +1 -1
- package/dist/smartcharts.js.map +1 -1
- package/dist/sprite-1fb8e4.smartcharts.svg +4 -0
- package/package.json +1 -1
- package/dist/sprite-18181c.smartcharts.svg +0 -4
package/dist/smartcharts.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see smartcharts.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-dom"),require("react-transition-group"),require("react"),require("moment")):"function"==typeof define&&define.amd?define([,,,],e):"object"==typeof exports?exports.smartcharts=e(require("react-dom"),require("react-transition-group"),require("react"),require("moment")):t.smartcharts=e(t.ReactDOM,t.ReactTransitionGroup,t.React,t.moment)}(self,(t,e,r,i)=>(()=>{var a,s,n,o,l={5:(t,e,r)=>{t.exports={id:"ic-averages-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-averages-usage",toString:function(){return this.url}}},10:(t,e,r)=>{t.exports={id:"ic-200-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-200-1s-index-usage",toString:function(){return this.url}}},12:t=>{"use strict";var e=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),r={emitDelay:10,strictMode:!1},i=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?r:arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i,a;i=e.hasOwnProperty("emitDelay")?e.emitDelay:r.emitDelay,this._emitDelay=i,a=e.hasOwnProperty("strictMode")?e.strictMode:r.strictMode,this._strictMode=a,this._listeners={},this.events=[]}return e(t,[{key:"_addListenner",value:function(t,e,r){if("function"!=typeof e)throw TypeError("listener must be a function");-1===this.events.indexOf(t)?(this._listeners[t]=[{once:r,fn:e}],this.events.push(t)):this._listeners[t].push({once:r,fn:e})}},{key:"on",value:function(t,e){this._addListenner(t,e,!1)}},{key:"once",value:function(t,e){this._addListenner(t,e,!0)}},{key:"off",value:function(t,e){var r,i,a=this,s=this.events.indexOf(t);t&&-1!==s&&(e?(r=[],(i=a._listeners[t]).forEach(function(t,i){t.fn===e&&r.unshift(i)}),r.forEach(function(t){i.splice(t,1)}),i.length||(a.events.splice(s,1),delete a._listeners[t])):(delete this._listeners[t],this.events.splice(s,1)))}},{key:"_applyEvents",value:function(t,e){var r=this._listeners[t];if(r&&r.length){var i=[];r.forEach(function(t,r){t.fn.apply(null,e),t.once&&i.unshift(r)}),i.forEach(function(t){r.splice(t,1)})}else if(this._strictMode)throw"No listeners specified for event: "+t}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this._emitDelay?setTimeout(function(){e._applyEvents.call(e,t,i)},this._emitDelay):this._applyEvents(t,i)}},{key:"emitSync",value:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this._applyEvents(t,r)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),t}();t.exports=i},37:(t,e,r)=>{t.exports={id:"portugal-usage",viewBox:"0 0 24 17",url:r.p+"sprite-18181c.smartcharts.svg#portugal-usage",toString:function(){return this.url}}},79:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},135:(t,e,r)=>{t.exports={id:"ic-historical-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-historical-dark-normal-usage",toString:function(){return this.url}}},148:(t,e,r)=>{t.exports={id:"ic-marketbear-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-marketbear-usage",toString:function(){return this.url}}},155:(t,e,r)=>{t.exports={id:"ic-dtrended-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-dtrended-usage",toString:function(){return this.url}}},194:(t,e,r)=>{t.exports={id:"ic-50-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-50-index-v-usage",toString:function(){return this.url}}},204:(t,e,r)=>{t.exports={id:"ic-close-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-close-usage",toString:function(){return this.url}}},242:(t,e,r)=>{t.exports={id:"ic-heikin-ashi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-heikin-ashi-normal-usage",toString:function(){return this.url}}},255:t=>{"use strict";t.exports=e},263:(t,e,r)=>{t.exports={id:"ic-candle-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-candle-grayscale-usage",toString:function(){return this.url}}},267:(t,e,r)=>{t.exports={id:"ic-hollowcandle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-hollowcandle-normal-usage",toString:function(){return this.url}}},273:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},301:(t,e,r)=>{t.exports={id:"ic-hollow-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-hollow-grayscale-usage",toString:function(){return this.url}}},363:(t,e,r)=>{t.exports={id:"ic-line-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-line-normal-usage",toString:function(){return this.url}}},416:(t,e,r)=>{t.exports={id:"ic-countdown-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-countdown-light-active-usage",toString:function(){return this.url}}},451:(t,e,r)=>{t.exports={id:"indonesia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#indonesia-usage",toString:function(){return this.url}}},542:(t,e,r)=>{t.exports={id:"ic-swiss-20-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-swiss-20-usage",toString:function(){return this.url}}},638:(t,e,r)=>{t.exports={id:"ic-25-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-25-index-v-usage",toString:function(){return this.url}}},718:(t,e,r)=>{t.exports={id:"ic-75-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-75-index-v-usage",toString:function(){return this.url}}},794:(t,e,r)=>{t.exports={id:"ic-germany-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-germany-40-usage",toString:function(){return this.url}}},809:t=>{"use strict";t.exports=r},898:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},931:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},963:(t,e,r)=>{t.exports={id:"ic-theme-light-usage",viewBox:"0 0 236 180",url:r.p+"sprite-18181c.smartcharts.svg#ic-theme-light-usage",toString:function(){return this.url}}},1008:(t,e,r)=>{t.exports={id:"ic-250-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-250-1s-index-usage",toString:function(){return this.url}}},1041:(t,e,r)=>{t.exports={id:"ic-templates-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-templates-usage",toString:function(){return this.url}}},1061:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1069:(t,e,r)=>{t.exports={id:"mongolian-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#mongolian-usage",toString:function(){return this.url}}},1071:(t,e,r)=>{t.exports={id:"ic-ltcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-ltcusd-usage",toString:function(){return this.url}}},1077:(t,e,r)=>{t.exports={id:"ic-awesome-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-awesome-oscillator-usage",toString:function(){return this.url}}},1085:(t,e,r)=>{t.exports={id:"boom900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#boom900 index-usage",toString:function(){return this.url}}},1089:(t,e,r)=>{t.exports={id:"kenya-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#kenya-usage",toString:function(){return this.url}}},1104:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1108:(t,e,r)=>{t.exports={id:"ic-aroon-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-aroon-usage",toString:function(){return this.url}}},1134:(t,e,r)=>{t.exports={id:"ic-rectangle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-rectangle-usage",toString:function(){return this.url}}},1229:(t,e,r)=>{t.exports={id:"nzd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#nzd-usage",toString:function(){return this.url}}},1238:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1270:(t,e,r)=>{t.exports={id:"ic-adx-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-adx-usage",toString:function(){return this.url}}},1278:(t,e,r)=>{t.exports={id:"ic-active-usage",viewBox:"0 0 15 15",url:r.p+"sprite-18181c.smartcharts.svg#ic-active-usage",toString:function(){return this.url}}},1288:(t,e,r)=>{t.exports={id:"ic-cryptocurrency-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-cryptocurrency-normal-usage",toString:function(){return this.url}}},1320:(t,e,r)=>{t.exports={id:"ic-download-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-download-usage",toString:function(){return this.url}}},1337:(t,e,r)=>{t.exports={id:"ic-rangebars-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-rangebars-normal-usage",toString:function(){return this.url}}},1345:(t,e,r)=>{t.exports={id:"ic-empty-state-usage",viewBox:"0 0 128 118",url:r.p+"sprite-18181c.smartcharts.svg#ic-empty-state-usage",toString:function(){return this.url}}},1445:(t,e,r)=>{t.exports={id:"cad-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#cad-usage",toString:function(){return this.url}}},1449:(t,e,r)=>{t.exports={id:"light-50(1s) index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#light-50(1s) index-usage",toString:function(){return this.url}}},1477:(t,e,r)=>{t.exports={id:"eur-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#eur-usage",toString:function(){return this.url}}},1553:(t,e,r)=>{t.exports={id:"boom600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#boom600 index-usage",toString:function(){return this.url}}},1561:(t,e,r)=>{t.exports={id:"error-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#error-usage",toString:function(){return this.url}}},1593:(t,e,r)=>{t.exports={id:"ic-overwrite-state-usage",viewBox:"0 0 128 128",url:r.p+"sprite-18181c.smartcharts.svg#ic-overwrite-state-usage",toString:function(){return this.url}}},1610:(t,e,r)=>{t.exports={id:"success-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#success-usage",toString:function(){return this.url}}},1649:(t,e,r)=>{t.exports={id:"nok-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#nok-usage",toString:function(){return this.url}}},1655:(t,e,r)=>{t.exports={id:"ic-theme-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-theme-usage",toString:function(){return this.url}}},1673:(t,e,r)=>{"use strict";t.exports=r(5166)},1722:(t,e,r)=>{t.exports={id:"ic-historical-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-historical-light-active-usage",toString:function(){return this.url}}},1795:(t,e,r)=>{t.exports={id:"arabic-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#arabic-usage",toString:function(){return this.url}}},1811:(t,e,r)=>{t.exports={id:"ic-linebreak-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-linebreak-normal-usage",toString:function(){return this.url}}},1820:(t,e,r)=>{t.exports={id:"ic-zig-zag-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-zig-zag-usage",toString:function(){return this.url}}},1849:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1882:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1891:(t,e,r)=>{t.exports={id:"ic-measure-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-measure-usage",toString:function(){return this.url}}},1904:(t,e,r)=>{t.exports={id:"ic-william-percent-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-william-percent-usage",toString:function(){return this.url}}},1908:(t,e,r)=>{t.exports={id:"ic-cat-averages-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-cat-averages-usage",toString:function(){return this.url}}},1949:(t,e,r)=>{t.exports={id:"ic-historical-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-historical-light-normal-usage",toString:function(){return this.url}}},2048:(t,e,r)=>{t.exports={id:"ic-bnbusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-bnbusd-usage",toString:function(){return this.url}}},2049:(t,e,r)=>{t.exports={id:"ic-dshusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-dshusd-usage",toString:function(){return this.url}}},2092:(t,e,r)=>{t.exports={id:"ic-france-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-france-40-usage",toString:function(){return this.url}}},2099:(t,e,r)=>{t.exports={id:"crash900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#crash900 index-usage",toString:function(){return this.url}}},2167:(t,e,r)=>{t.exports={id:"ic-100-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-100-index-usage",toString:function(){return this.url}}},2188:(t,e,r)=>{t.exports={id:"step-300-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#step-300-index-usage",toString:function(){return this.url}}},2308:(t,e,r)=>{t.exports={id:"ic-trend-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-trend-usage",toString:function(){return this.url}}},2313:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2327:(t,e,r)=>{t.exports={id:"ic-back-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-back-usage",toString:function(){return this.url}}},2405:(t,e,r)=>{t.exports={id:"ic-btcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-btcusd-usage",toString:function(){return this.url}}},2421:(t,e,r)=>{t.exports={id:"ic-commodity-channel-index-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-commodity-channel-index-usage",toString:function(){return this.url}}},2445:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2502:(t,e,r)=>{t.exports={id:"ic-10-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-10-1s-index-usage",toString:function(){return this.url}}},2532:(t,e,r)=>{t.exports={id:"ic-info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-info-usage",toString:function(){return this.url}}},2588:(t,e,r)=>{t.exports={id:"ic-btceth-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-btceth-usage",toString:function(){return this.url}}},2592:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2607:(t,e,r)=>{t.exports={id:"pln-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#pln-usage",toString:function(){return this.url}}},2620:(t,e,r)=>{t.exports={id:"italy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#italy-usage",toString:function(){return this.url}}},2788:(t,e,r)=>{t.exports={id:"ic-neousd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-neousd-usage",toString:function(){return this.url}}},2821:(t,e,r)=>{t.exports={id:"boom300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#boom300 index-usage",toString:function(){return this.url}}},2839:(t,e,r)=>{t.exports={id:"step-400-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#step-400-index-usage",toString:function(){return this.url}}},2853:(t,e,r)=>{t.exports={id:"ic-50-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-50-index-usage",toString:function(){return this.url}}},2910:(t,e,r)=>{t.exports={id:"table-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#table-usage",toString:function(){return this.url}}},2913:(t,e,r)=>{t.exports={id:"ic-xmrusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-xmrusd-usage",toString:function(){return this.url}}},2979:(t,e,r)=>{t.exports={id:"ic-candle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-candle-normal-usage",toString:function(){return this.url}}},2999:(t,e,r)=>{t.exports={id:"ic-basket-normal-usage",viewBox:"0 0 16 15",url:r.p+"sprite-18181c.smartcharts.svg#ic-basket-normal-usage",toString:function(){return this.url}}},3010:(t,e,r)=>{t.exports={id:"step-500-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#step-500-index-usage",toString:function(){return this.url}}},3031:(t,e,r)=>{t.exports={id:"ic-input-number-plus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-18181c.smartcharts.svg#ic-input-number-plus-usage",toString:function(){return this.url}}},3119:(t,e,r)=>{t.exports={id:"ic-netherland-25-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-netherland-25-usage",toString:function(){return this.url}}},3135:(t,e,r)=>{t.exports={id:"french-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#french-usage",toString:function(){return this.url}}},3163:(t,e,r)=>{t.exports={id:"ic-fractal-chaos-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-fractal-chaos-usage",toString:function(){return this.url}}},3179:(t,e,r)=>{t.exports={id:"korean-usage",viewBox:"0 0 36 24",url:r.p+"sprite-18181c.smartcharts.svg#korean-usage",toString:function(){return this.url}}},3211:(t,e,r)=>{t.exports={id:"ic-crosshair-on-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-crosshair-on-usage",toString:function(){return this.url}}},3235:(t,e,r)=>{t.exports={id:"ic-highest-lowest-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-highest-lowest-dark-normal-usage",toString:function(){return this.url}}},3255:(t,e,r)=>{t.exports={id:"ic-arrow-orange-usage",viewBox:"0 0 22 31",url:r.p+"sprite-18181c.smartcharts.svg#ic-arrow-orange-usage",toString:function(){return this.url}}},3257:(t,e,r)=>{t.exports={id:"ic-75-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-75-index-usage",toString:function(){return this.url}}},3265:(t,e,r)=>{t.exports={id:"ic-25-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-25-index-usage",toString:function(){return this.url}}},3273:(t,e,r)=>{t.exports={id:"ic-countdown-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-countdown-dark-normal-usage",toString:function(){return this.url}}},3292:(t,e,r)=>{t.exports={id:"ic-300-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-300-1s-index-usage",toString:function(){return this.url}}},3293:(t,e,r)=>{t.exports={id:"full-screen-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#full-screen-usage",toString:function(){return this.url}}},3297:(t,e,r)=>{t.exports={id:"ic-xlmusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-xlmusd-usage",toString:function(){return this.url}}},3332:(t,e,r)=>{t.exports={id:"gbp-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#gbp-usage",toString:function(){return this.url}}},3344:(t,e,r)=>{t.exports={id:"ic-trxusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-trxusd-usage",toString:function(){return this.url}}},3365:(t,e,r)=>{t.exports={id:"ic-input-number-minus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-18181c.smartcharts.svg#ic-input-number-minus-usage",toString:function(){return this.url}}},3385:(t,e,r)=>{t.exports={id:"ic-line-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-line-usage",toString:function(){return this.url}}},3417:(t,e,r)=>{t.exports={id:"ic-rsi-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-rsi-usage",toString:function(){return this.url}}},3425:(t,e,r)=>{t.exports={id:"step-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#step-200-index-usage",toString:function(){return this.url}}},3522:(t,e,r)=>{t.exports={id:"ic-indices-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-indices-normal-usage",toString:function(){return this.url}}},3544:(t,e,r)=>{t.exports={id:"ic-historical-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-historical-dark-active-usage",toString:function(){return this.url}}},3562:(t,e,r)=>{t.exports={id:"ic-marketbull-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-marketbull-usage",toString:function(){return this.url}}},3576:(t,e,r)=>{t.exports={id:"ic-channel-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-channel-usage",toString:function(){return this.url}}},3578:(t,e,r)=>{t.exports={id:"ic-arrow-green-usage",viewBox:"0 0 22 31",url:r.p+"sprite-18181c.smartcharts.svg#ic-arrow-green-usage",toString:function(){return this.url}}},3669:(t,e,r)=>{t.exports={id:"ic-euro-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-euro-50-usage",toString:function(){return this.url}}},3719:(t,e,r)=>{t.exports={id:"aud-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#aud-usage",toString:function(){return this.url}}},3747:(t,e,r)=>{t.exports={id:"ic-australian-200-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-australian-200-usage",toString:function(){return this.url}}},3751:(t,e,r)=>{t.exports={id:"boom1000 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#boom1000 index-usage",toString:function(){return this.url}}},3770:(t,e,r)=>{t.exports={id:"wallstreet-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#wallstreet-usage",toString:function(){return this.url}}},3775:(t,e,r)=>{t.exports={id:"warning-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#warning-usage",toString:function(){return this.url}}},3785:(t,e,r)=>{t.exports={id:"ic-oilusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-oilusd-usage",toString:function(){return this.url}}},3800:(t,e,r)=>{t.exports={id:"ic-volatility-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-volatility-usage",toString:function(){return this.url}}},3821:(t,e,r)=>{t.exports={id:"ic-envelope-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-envelope-usage",toString:function(){return this.url}}},3864:(t,e,r)=>{t.exports={id:"ic-100-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-100-index-v-usage",toString:function(){return this.url}}},3893:(t,e,r)=>{t.exports={id:"ic-theme-dark-usage",viewBox:"0 0 236 180",url:r.p+"sprite-18181c.smartcharts.svg#ic-theme-dark-usage",toString:function(){return this.url}}},3955:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},3982:(t,e,r)=>{t.exports={id:"ic-parabolic-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-parabolic-usage",toString:function(){return this.url}}},4001:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4005:(t,e,r)=>{t.exports={id:"ic-150-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-150-index-usage",toString:function(){return this.url}}},4007:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4046:(t,e,r)=>{t.exports={id:"ic-150-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-150-1s-index-usage",toString:function(){return this.url}}},4056:(t,e,r)=>{t.exports={id:"chf-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#chf-usage",toString:function(){return this.url}}},4065:(t,e,r)=>{t.exports={id:"ic-ethusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-ethusd-usage",toString:function(){return this.url}}},4185:(t,e,r)=>{t.exports={id:"ic-zoomin-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-zoomin-usage",toString:function(){return this.url}}},4236:(t,e,r)=>{t.exports={id:"russia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#russia-usage",toString:function(){return this.url}}},4282:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4298:(t,e,r)=>{t.exports={id:"ic-10-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-10-index-v-usage",toString:function(){return this.url}}},4311:(t,e,r)=>{t.exports={id:"ic-horizontal-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-horizontal-usage",toString:function(){return this.url}}},4321:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4325:(t,e,r)=>{t.exports={id:"ic-help-center-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-help-center-usage",toString:function(){return this.url}}},4333:(t,e,r)=>{t.exports={id:"ic-search-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-search-normal-usage",toString:function(){return this.url}}},4431:(t,e,r)=>{t.exports={id:"ic-area-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-area-grayscale-usage",toString:function(){return this.url}}},4497:(t,e,r)=>{t.exports={id:"ic-drawing-tool-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-drawing-tool-usage",toString:function(){return this.url}}},4511:e=>{"use strict";e.exports=t},4542:(t,e,r)=>{t.exports={id:"ic-kagi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-kagi-normal-usage",toString:function(){return this.url}}},4575:(t,e,r)=>{t.exports={id:"ic-trend-dark-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-trend-dark-usage",toString:function(){return this.url}}},4579:(t,e,r)=>{t.exports={id:"crash300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#crash300 index-usage",toString:function(){return this.url}}},4619:(t,e,r)=>{t.exports={id:"ic-spline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-spline-normal-usage",toString:function(){return this.url}}},4629:(t,e,r)=>{t.exports={id:"ic-clear-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-clear-usage",toString:function(){return this.url}}},4674:(t,e,r)=>{t.exports={id:"ic-position-left-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-position-left-usage",toString:function(){return this.url}}},4748:(t,e,r)=>{t.exports={id:"ic-zecusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-zecusd-usage",toString:function(){return this.url}}},5004:(t,e,r)=>{t.exports={id:"chinese-traditional-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#chinese-traditional-usage",toString:function(){return this.url}}},5038:(t,e,r)=>{t.exports={id:"ic-language-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-language-usage",toString:function(){return this.url}}},5092:(t,e,r)=>{t.exports={id:"ic-hong-kong-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-hong-kong-50-usage",toString:function(){return this.url}}},5126:(t,e,r)=>{t.exports={id:"ic-highest-lowest-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-highest-lowest-light-active-usage",toString:function(){return this.url}}},5166:(t,e,r)=>{"use strict";var i=r(809),a="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=i.useState,n=i.useEffect,o=i.useLayoutEffect,l=i.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!a(t,r)}catch(t){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),i=s({inst:{value:r,getSnapshot:e}}),a=i[0].inst,h=i[1];return o(function(){a.value=r,a.getSnapshot=e,c(a)&&h({inst:a})},[t,r,e]),n(function(){return c(a)&&h({inst:a}),t(function(){c(a)&&h({inst:a})})},[t]),l(r),r};e.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:h},5187:(t,e,r)=>{t.exports={id:"ic-eosusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-eosusd-usage",toString:function(){return this.url}}},5269:(t,e,r)=>{t.exports={id:"ic-10-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-10-index-usage",toString:function(){return this.url}}},5317:(t,e,r)=>{t.exports={id:"ic-usd-tech-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-usd-tech-100-usage",toString:function(){return this.url}}},5357:(t,e,r)=>{t.exports={id:"turkey-usage",viewBox:"0 0 24 17",url:r.p+"sprite-18181c.smartcharts.svg#turkey-usage",toString:function(){return this.url}}},5407:(t,e,r)=>{t.exports={id:"xau-usage",viewBox:"0 0 8 8",url:r.p+"sprite-18181c.smartcharts.svg#xau-usage",toString:function(){return this.url}}},5439:(t,e,r)=>{t.exports={id:"ic-ohlc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-ohlc-normal-usage",toString:function(){return this.url}}},5459:(t,e,r)=>{t.exports={id:"ic-donchian-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-donchian-usage",toString:function(){return this.url}}},5477:(t,e,r)=>{t.exports={id:"ic-vertical-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-vertical-usage",toString:function(){return this.url}}},5511:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},5581:(t,e,r)=>{var i,a=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(var r=0;r<t.length;r++)i[t][t.charAt(r)]=r}return i[t][e]}var s={compressToBase64:function(t){if(null==t)return"";var r=s._compress(t,6,function(t){return e.charAt(t)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:s._decompress(t.length,32,function(r){return a(e,t.charAt(r))})},compressToUTF16:function(e){return null==e?"":s._compress(e,15,function(e){return t(e+32)})+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:s._decompress(t.length,16384,function(e){return t.charCodeAt(e)-32})},compressToUint8Array:function(t){for(var e=s.compress(t),r=new Uint8Array(2*e.length),i=0,a=e.length;i<a;i++){var n=e.charCodeAt(i);r[2*i]=n>>>8,r[2*i+1]=n%256}return r},decompressFromUint8Array:function(e){if(null==e)return s.decompress(e);for(var r=new Array(e.length/2),i=0,a=r.length;i<a;i++)r[i]=256*e[2*i]+e[2*i+1];var n=[];return r.forEach(function(e){n.push(t(e))}),s.decompress(n.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":s._compress(t,6,function(t){return r.charAt(t)})},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),s._decompress(t.length,32,function(e){return a(r,t.charAt(e))}))},compress:function(e){return s._compress(e,16,function(e){return t(e)})},_compress:function(t,e,r){if(null==t)return"";var i,a,s,n={},o={},l="",c="",h="",u=2,d=3,g=2,p=[],m=0,f=0;for(s=0;s<t.length;s+=1)if(l=t.charAt(s),Object.prototype.hasOwnProperty.call(n,l)||(n[l]=d++,o[l]=!0),c=h+l,Object.prototype.hasOwnProperty.call(n,c))h=c;else{if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(i=0;i<g;i++)m<<=1,f==e-1?(f=0,p.push(r(m)),m=0):f++;for(a=h.charCodeAt(0),i=0;i<8;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}else{for(a=1,i=0;i<g;i++)m=m<<1|a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a=0;for(a=h.charCodeAt(0),i=0;i<16;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}0==--u&&(u=Math.pow(2,g),g++),delete o[h]}else for(a=n[h],i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;0==--u&&(u=Math.pow(2,g),g++),n[c]=d++,h=String(l)}if(""!==h){if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(i=0;i<g;i++)m<<=1,f==e-1?(f=0,p.push(r(m)),m=0):f++;for(a=h.charCodeAt(0),i=0;i<8;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}else{for(a=1,i=0;i<g;i++)m=m<<1|a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a=0;for(a=h.charCodeAt(0),i=0;i<16;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}0==--u&&(u=Math.pow(2,g),g++),delete o[h]}else for(a=n[h],i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;0==--u&&(u=Math.pow(2,g),g++)}for(a=2,i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;for(;;){if(m<<=1,f==e-1){p.push(r(m));break}f++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:s._decompress(t.length,32768,function(e){return t.charCodeAt(e)})},_decompress:function(e,r,i){var a,s,n,o,l,c,h,u=[],d=4,g=4,p=3,m="",f=[],_={val:i(0),position:r,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;h=t(n);break;case 1:for(n=0,l=Math.pow(2,16),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;h=t(n);break;case 2:return""}for(u[3]=h,s=h,f.push(h);;){if(_.index>e)return"";for(n=0,l=Math.pow(2,p),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;switch(h=n){case 0:for(n=0,l=Math.pow(2,8),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;u[g++]=t(n),h=g-1,d--;break;case 1:for(n=0,l=Math.pow(2,16),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;u[g++]=t(n),h=g-1,d--;break;case 2:return f.join("")}if(0==d&&(d=Math.pow(2,p),p++),u[h])m=u[h];else{if(h!==g)return null;m=s+s.charAt(0)}f.push(m),u[g++]=s+m.charAt(0),s=m,0==--d&&(d=Math.pow(2,p),p++)}}};return s}();void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)},5692:(t,e,r)=>{t.exports={id:"ic-highest-lowest-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-highest-lowest-dark-active-usage",toString:function(){return this.url}}},5704:(t,e,r)=>{t.exports={id:"ic-100-1s-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-100-1s-index-usage",toString:function(){return this.url}}},5729:(t,e,r)=>{t.exports={id:"german-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#german-usage",toString:function(){return this.url}}},5829:(t,e,r)=>{t.exports={id:"ic-renko-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-renko-normal-usage",toString:function(){return this.url}}},5833:(t,e,r)=>{t.exports={id:"ic-comparison-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-comparison-normal-usage",toString:function(){return this.url}}},5877:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},5976:(t,e,r)=>{t.exports={id:"ic-ichimoku-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-ichimoku-usage",toString:function(){return this.url}}},6033:(t,e,r)=>{t.exports={id:"crash600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#crash600 index-usage",toString:function(){return this.url}}},6057:(t,e,r)=>{t.exports={id:"ic-dot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-dot-normal-usage",toString:function(){return this.url}}},6092:t=>{"use strict";t.exports=i},6183:(t,e,r)=>{t.exports={id:"ic-pencil-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-pencil-usage",toString:function(){return this.url}}},6226:(t,e,r)=>{t.exports={id:"thailand-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#thailand-usage",toString:function(){return this.url}}},6238:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6240:(t,e,r)=>{t.exports={id:"ic-pointfigure-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-pointfigure-normal-usage",toString:function(){return this.url}}},6244:(t,e,r)=>{t.exports={id:"ic-otcbadge-usage",viewBox:"0 0 13 9",url:r.p+"sprite-18181c.smartcharts.svg#ic-otcbadge-usage",toString:function(){return this.url}}},6271:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6331:(t,e,r)=>{t.exports={id:"ic-drawingtools-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-drawingtools-normal-usage",toString:function(){return this.url}}},6351:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6378:(t,e,r)=>{t.exports={id:"ic-checkbox-active-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-checkbox-active-usage",toString:function(){return this.url}}},6380:(t,e,r)=>{t.exports={id:"ic-otc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-otc-normal-usage",toString:function(){return this.url}}},6432:(t,e,r)=>{t.exports={id:"ic-position-bottom-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-position-bottom-usage",toString:function(){return this.url}}},6456:(t,e,r)=>{t.exports={id:"ic-basket-active-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-basket-active-usage",toString:function(){return this.url}}},6489:(t,e,r)=>{t.exports={id:"crash1000 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#crash1000 index-usage",toString:function(){return this.url}}},6537:(t,e,r)=>{t.exports={id:"ic-bollinger-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-bollinger-usage",toString:function(){return this.url}}},6550:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6552:(t,e,r)=>{t.exports={id:"ic-japan-225-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-japan-225-usage",toString:function(){return this.url}}},6577:(t,e,r)=>{t.exports={id:"ic-highest-lowest-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-highest-lowest-light-normal-usage",toString:function(){return this.url}}},6583:(t,e,r)=>{t.exports={id:"ic-momentum-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-momentum-usage",toString:function(){return this.url}}},6617:(t,e,r)=>{t.exports={id:"ic-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-200-index-usage",toString:function(){return this.url}}},6648:(t,e,r)=>{var i={"./ar.json":[1405,785],"./bn.json":[8462,50],"./de.json":[393,409],"./es.json":[6870,146],"./fr.json":[9358,826],"./id.json":[87,823],"./it.json":[5191,159],"./km.json":[3926,422],"./ko.json":[2900,800],"./messages.json":[7730,710],"./mn.json":[3221,521],"./nl.json":[7840,424],"./pl.json":[6426,634],"./pt.json":[8082,490],"./ru.json":[3351,191],"./si.json":[3026,834],"./sw.json":[4500,456],"./th.json":[8106,522],"./tr.json":[2880,28],"./uz.json":[8201,813],"./vi.json":[9143,935],"./zh.json":[6424,864],"./zh_cn.json":[5988,606],"./zh_tw.json":[9524,602]};function a(t){if(!r.o(i,t))return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=i[t],a=e[0];return r.e(e[1]).then(()=>r.t(a,19))}a.keys=()=>Object.keys(i),a.id=6648,t.exports=a},6661:(t,e,r)=>{t.exports={id:"ic-stochastic-momentum-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-stochastic-momentum-usage",toString:function(){return this.url}}},6667:(t,e,r)=>{t.exports={id:"ic-time-usage",viewBox:"0 0 12 12",url:r.p+"sprite-18181c.smartcharts.svg#ic-time-usage",toString:function(){return this.url}}},6669:(t,e,r)=>{t.exports={id:"ic-wallstreet-30-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-wallstreet-30-usage",toString:function(){return this.url}}},6681:(t,e,r)=>{t.exports={id:"uzbekistan-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#uzbekistan-usage",toString:function(){return this.url}}},6706:(t,e,r)=>{t.exports={id:"ic-continuous-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-continuous-usage",toString:function(){return this.url}}},6723:(t,e,r)=>{t.exports={id:"light-25(1s)index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#light-25(1s)index-usage",toString:function(){return this.url}}},6765:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6776:(t,e,r)=>{t.exports={id:"ic-zoomout-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-zoomout-usage",toString:function(){return this.url}}},6800:(t,e,r)=>{t.exports={id:"ic-volatility-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-volatility-normal-usage",toString:function(){return this.url}}},6853:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6902:(t,e,r)=>{t.exports={id:"jpy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#jpy-usage",toString:function(){return this.url}}},7037:(t,e,r)=>{t.exports={id:"ic-trend-light-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-trend-light-usage",toString:function(){return this.url}}},7038:(t,e,r)=>{t.exports={id:"srilanka-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#srilanka-usage",toString:function(){return this.url}}},7073:(t,e)=>{var r;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=n(t,s(r)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)i.call(t,r)&&t[r]&&(e=n(e,r));return e}function n(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r)}()},7092:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7183:(t,e,r)=>{t.exports={id:"ic-omgusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-omgusd-usage",toString:function(){return this.url}}},7209:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7213:(t,e,r)=>{t.exports={id:"boom500 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-18181c.smartcharts.svg#boom500 index-usage",toString:function(){return this.url}}},7249:(t,e,r)=>{t.exports={id:"ic-candle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-candle-usage",toString:function(){return this.url}}},7256:(t,e,r)=>{t.exports={id:"chinese-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#chinese-usage",toString:function(){return this.url}}},7358:(t,e,r)=>{t.exports={id:"step-100-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#step-100-index-usage",toString:function(){return this.url}}},7365:(t,e,r)=>{t.exports={id:"ic-fibonacci-fan-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-fibonacci-fan-usage",toString:function(){return this.url}}},7414:(t,e,r)=>{t.exports={id:"ic-ohlc-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-ohlc-grayscale-usage",toString:function(){return this.url}}},7420:(t,e,r)=>{t.exports={id:"ic-png-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-png-usage",toString:function(){return this.url}}},7425:(t,e,r)=>{t.exports={id:"ic-ray-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-ray-usage",toString:function(){return this.url}}},7428:(t,e,r)=>{t.exports={id:"bangladesh-usage",viewBox:"0 0 24 17",url:r.p+"sprite-18181c.smartcharts.svg#bangladesh-usage",toString:function(){return this.url}}},7451:(t,e,r)=>{t.exports={id:"dutch-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#dutch-usage",toString:function(){return this.url}}},7463:(t,e,r)=>{t.exports={id:"ic-crosshair-off-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-crosshair-off-usage",toString:function(){return this.url}}},7521:(t,e,r)=>{t.exports={id:"ic-scale-full-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-scale-full-usage",toString:function(){return this.url}}},7528:(t,e,r)=>{t.exports={id:"ic-forex-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-forex-normal-usage",toString:function(){return this.url}}},7558:(t,e,r)=>{t.exports={id:"sek-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#sek-usage",toString:function(){return this.url}}},7571:(t,e,r)=>{t.exports={id:"crash500 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#crash500 index-usage",toString:function(){return this.url}}},7625:(t,e,r)=>{t.exports={id:"ic-placeholder-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-placeholder-usage",toString:function(){return this.url}}},7671:(t,e,r)=>{"use strict";t.exports=r(7933)},7709:(t,e,r)=>{t.exports={id:"ic-stochastic-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-stochastic-oscillator-usage",toString:function(){return this.url}}},7739:(t,e,r)=>{t.exports={id:"ic-baseline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-baseline-normal-usage",toString:function(){return this.url}}},7764:(t,e,r)=>{t.exports={id:"ic-uk-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-uk-100-usage",toString:function(){return this.url}}},7808:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7823:(t,e,r)=>{t.exports={id:"ic-xrpusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-xrpusd-usage",toString:function(){return this.url}}},7885:(t,e,r)=>{t.exports={id:"ic-csv-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-csv-usage",toString:function(){return this.url}}},7933:(t,e,r)=>{"use strict";var i=r(809),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var i,s={},c=null,h=null;for(i in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(h=e.ref),e)n.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:a,type:t,key:c,ref:h,props:s,_owner:o.current}}e.Fragment=s,e.jsx=c,e.jsxs=c},7950:(t,e,r)=>{t.exports={id:"ic-iotusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-iotusd-usage",toString:function(){return this.url}}},7951:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8093:(t,e,r)=>{t.exports={id:"ic-favorite-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-favorite-normal-usage",toString:function(){return this.url}}},8217:(t,e,r)=>{t.exports={id:"cambodia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#cambodia-usage",toString:function(){return this.url}}},8246:(t,e,r)=>{t.exports={id:"ic-alligator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-alligator-usage",toString:function(){return this.url}}},8250:(t,e,r)=>{t.exports={id:"ic-indicators-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-indicators-usage",toString:function(){return this.url}}},8272:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8310:(t,e,r)=>{t.exports={id:"ic-commodities-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-commodities-normal-usage",toString:function(){return this.url}}},8341:(t,e,r)=>{t.exports={id:"ic-metal-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-metal-usage",toString:function(){return this.url}}},8414:(t,e,r)=>{t.exports={id:"ic-countdown-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-countdown-dark-active-usage",toString:function(){return this.url}}},8438:(t,e,r)=>{t.exports={id:"ic-btcltc-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-btcltc-usage",toString:function(){return this.url}}},8449:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8451:(t,e,r)=>{t.exports={id:"ic-checkbox-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-checkbox-usage",toString:function(){return this.url}}},8457:(t,e,r)=>{t.exports={id:"vietnam-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#vietnam-usage",toString:function(){return this.url}}},8584:(t,e,r)=>{t.exports={id:"ic-home-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-home-usage",toString:function(){return this.url}}},8713:(t,e,r)=>{t.exports=r(9829)()},8798:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(51,51,51,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8832:(t,e,r)=>{t.exports={id:"ic-usd-500-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-usd-500-usage",toString:function(){return this.url}}},8901:(t,e,r)=>{t.exports={id:"usd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#usd-usage",toString:function(){return this.url}}},8927:(t,e,r)=>{t.exports={id:"ic-tick-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-tick-usage",toString:function(){return this.url}}},8983:(t,e,r)=>{t.exports={id:"ic-zoomout-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-zoomout-light-usage",toString:function(){return this.url}}},9080:(t,e,r)=>{t.exports={id:"ic-rate-of-change-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-rate-of-change-usage",toString:function(){return this.url}}},9129:(t,e,r)=>{t.exports={id:"ic-area-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-area-usage",toString:function(){return this.url}}},9149:(t,e,r)=>{t.exports={id:"ic-other-usage",viewBox:"0 0 17 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-other-usage",toString:function(){return this.url}}},9160:(t,e,r)=>{"use strict";r.d(e,{t:()=>a});const i={},a=new class{constructor(t="en"){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"lang",void 0),this.lang=t}setLanguage(t,e){i[t]||"en"===t?(this.lang=t,e?.()):r(6648)(`./${t}.json`).then(r=>{r?(i[t]=r.default,this.lang=t,e?.()):console.error("Unsupported language:",t)})}translate(...t){const e=i[this.lang],r=t[0].trim(),a=r.replace(/\\/g,"\\\\").replace(/"/g,'\\"');let s=r,n=!1;return e&&e[r]?s=e[r]:e&&e[a]&&(s=e[a],n=!0),t[1]&&Object.keys(t[1]).forEach(e=>{s=s.replace(`[${e}]`,t[1][e])}),n?s.replace(/\\\"/gi,'"'):s}}},9185:(t,e,r)=>{t.exports={id:"ic-zoomin-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-zoomin-light-usage",toString:function(){return this.url}}},9289:(t,e,r)=>{t.exports={id:"ic-add-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-add-usage",toString:function(){return this.url}}},9307:(t,e,r)=>{t.exports={id:"ic-dropdown-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-dropdown-usage",toString:function(){return this.url}}},9317:(t,e,r)=>{t.exports={id:"ic-synth-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-synth-normal-usage",toString:function(){return this.url}}},9324:(t,e,r)=>{t.exports={id:"ic-close-circle-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-close-circle-usage",toString:function(){return this.url}}},9411:(t,e,r)=>{t.exports={id:"ic-edit-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-edit-usage",toString:function(){return this.url}}},9423:(t,e,r)=>{t.exports={id:"ic-countdown-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-18181c.smartcharts.svg#ic-countdown-light-normal-usage",toString:function(){return this.url}}},9424:(t,e,r)=>{t.exports={id:"ic-gator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-gator-usage",toString:function(){return this.url}}},9429:(t,e,r)=>{t.exports={id:"info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#info-usage",toString:function(){return this.url}}},9442:(t,e,r)=>{t.exports={id:"ic-macd-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-macd-usage",toString:function(){return this.url}}},9564:(t,e,r)=>{t.exports={id:"ic-ohlc-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-ohlc-usage",toString:function(){return this.url}}},9607:(t,e,r)=>{t.exports={id:"ic-hollow-usage",viewBox:"0 0 24 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-hollow-usage",toString:function(){return this.url}}},9625:(t,e,r)=>{t.exports={id:"ic-close-bold-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-close-bold-usage",toString:function(){return this.url}}},9671:(t,e,r)=>{t.exports={id:"ic-bchusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#ic-bchusd-usage",toString:function(){return this.url}}},9702:(t,e,r)=>{t.exports={id:"mxn-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#mxn-usage",toString:function(){return this.url}}},9705:(t,e,r)=>{t.exports={id:"spanish-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#spanish-usage",toString:function(){return this.url}}},9707:(t,e,r)=>{t.exports={id:"ic-delete-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-delete-usage",toString:function(){return this.url}}},9715:(t,e,r)=>{t.exports={id:"light-75(1s) index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-18181c.smartcharts.svg#light-75(1s) index-usage",toString:function(){return this.url}}},9758:()=>{var t;HTMLCanvasElement.prototype.getContext=(t=HTMLCanvasElement.prototype.getContext,function(e,r){return(r=r||{}).preserveDrawingBuffer=!0,t.call(this,e,r)})},9829:(t,e,r)=>{"use strict";var i=r(6550);function a(){}function s(){}s.resetWarningCache=a,t.exports=function(){function t(t,e,r,a,s,n){if(n!==i){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:a};return r.PropTypes=r,r}},9876:(t,e,r)=>{t.exports={id:"hong kong-usage",viewBox:"0 0 24 16",url:r.p+"sprite-18181c.smartcharts.svg#hong kong-usage",toString:function(){return this.url}}},9877:(t,e,r)=>{t.exports={id:"ic-rainbow-usage",viewBox:"0 0 25 24",url:r.p+"sprite-18181c.smartcharts.svg#ic-rainbow-usage",toString:function(){return this.url}}},9891:(t,e,r)=>{t.exports={id:"ic-charts-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-charts-usage",toString:function(){return this.url}}},9955:(t,e,r)=>{t.exports={id:"ic-linedot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-18181c.smartcharts.svg#ic-linedot-normal-usage",toString:function(){return this.url}}}},c={};function h(t){var e=c[t];if(void 0!==e)return e.exports;var r=c[t]={exports:{}};return l[t].call(r.exports,r,r.exports,h),r.exports}h.m=l,h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},s=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,h.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);h.r(r);var i={};a=a||[null,s({}),s([]),s(s)];for(var n=2&e&&t;"object"==typeof n&&!~a.indexOf(n);n=s(n))Object.getOwnPropertyNames(n).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,h.d(r,i),r},h.d=(t,e)=>{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.f={},h.e=t=>Promise.all(Object.keys(h.f).reduce((e,r)=>(h.f[r](t,e),e),[])),h.u=t=>({28:"tr-json",50:"bn-json",146:"es-json",159:"it-json",191:"ru-json",409:"de-json",422:"km-json",424:"nl-json",456:"sw-json",490:"pt-json",518:"flutter-chart-adapter",521:"mn-json",522:"th-json",526:"html2canvas",590:"resize-observer-polyfill",602:"zh_tw-json",606:"zh_cn-json",634:"pl-json",710:"messages-json",785:"ar-json",800:"ko-json",813:"uz-json",823:"id-json",826:"fr-json",834:"si-json",864:"zh-json",935:"vi-json"}[t]+"-"+{28:"fed0ca",50:"dc5b00",146:"4db99e",159:"3977f6",191:"8a4267",409:"4c21b8",422:"e9781b",424:"eddac7",456:"8d97a4",490:"e5722a",518:"3539ee",521:"47cabf",522:"7576c4",526:"cffc8d",590:"75583b",602:"5a9e38",606:"65098e",634:"1511d2",710:"69c2d6",785:"8026ea",800:"475be2",813:"08e383",823:"cd6a08",826:"44836b",834:"547011",864:"cacc85",935:"ae1b14"}[t]+".smartcharts.js"),h.miniCssF=t=>{},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="smartcharts:",h.l=(t,e,r,i)=>{if(n[t])n[t].push(e);else{var a,s;if(void 0!==r)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==o+r){a=u;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,h.nc&&a.setAttribute("nonce",h.nc),a.setAttribute("data-webpack",o+r),a.src=t),n[t]=[e];var d=(e,r)=>{a.onerror=a.onload=null,clearTimeout(g);var i=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(t=>t(r)),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}},h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},h.p="",(()=>{var t={792:0};h.f.j=(e,r)=>{var i=h.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,a)=>i=t[e]=[r,a]);r.push(i[2]=a);var s=h.p+h.u(e),n=new Error;h.l(s,r=>{if(h.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+a+": "+s+")",n.name="ChunkLoadError",n.type=a,n.request=s,i[1](n)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,s=r[0],n=r[1],o=r[2],l=0;if(s.some(e=>0!==t[e])){for(i in n)h.o(n,i)&&(h.m[i]=n[i]);o&&o(h)}for(e&&e(r);l<s.length;l++)a=s[l],h.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=self.webpackChunksmartcharts=self.webpackChunksmartcharts||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var u={};return(()=>{"use strict";h.d(u,{default:()=>Nx});var t=h(7073),e=h.n(t);function r(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var i={};function a(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==h.g?h.g:"undefined"!=typeof self?self:i}var s=Object.assign,n=Object.getOwnPropertyDescriptor,o=Object.defineProperty,l=Object.prototype,c=[];Object.freeze(c);var d={};Object.freeze(d);var g="undefined"!=typeof Proxy,p=Object.toString();function m(){g||r("Proxy not available")}function f(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var _=function(){};function v(t){return"function"==typeof t}function b(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function y(t){return null!==t&&"object"==typeof t}function S(t){if(!y(t))return!1;var e=Object.getPrototypeOf(t);if(null==e)return!0;var r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r.toString()===p}function x(t){var e=null==t?void 0:t.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName)}function w(t,e,r){o(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function C(t,e,r){o(t,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function T(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return y(t)&&!0===t[r]}}function k(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function j(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}var A=void 0!==Object.getOwnPropertySymbols,O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:A?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function E(t){return null===t?null:"object"==typeof t?""+t:t}function N(t,e){return l.hasOwnProperty.call(t,e)}var I=Object.getOwnPropertyDescriptors||function(t){var e={};return O(t).forEach(function(r){e[r]=n(t,r)}),e};function P(t,e){return!!(t&e)}function D(t,e,r){return r?t|=e:t&=~e,t}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function M(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,U(i.key),i)}}function B(t,e,r){return e&&M(t.prototype,e),r&&M(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},F.apply(null,arguments)}function V(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,H(t,e)}function H(t,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},H(t,e)}function U(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var q=Symbol("mobx-stored-annotations");function z(t){return Object.assign(function(e,r){if(G(r))return t.decorate_20223_(e,r);$(e,r,t)},t)}function $(t,e,r){N(t,q)||w(t,q,F({},t[q])),function(t){return t.annotationType_===tt}(r)||(t[q][e]=r)}function G(t){return"object"==typeof t&&"string"==typeof t.kind}var W=Symbol("mobx administration"),K=function(){function t(t){void 0===t&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Jt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(t){return t()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(t){return t()})},e.reportObserved=function(){return xe(this)},e.reportChanged=function(){ye(),we(this),Se()},e.toString=function(){return this.name_},B(t,[{key:"isBeingObserved",get:function(){return P(this.flags_,t.isBeingObservedMask_)},set:function(e){this.flags_=D(this.flags_,t.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return P(this.flags_,t.isPendingUnobservationMask_)},set:function(e){this.flags_=D(this.flags_,t.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();K.isBeingObservedMask_=1,K.isPendingUnobservationMask_=2,K.diffValueMask_=4;var Q=T("Atom",K);function Y(t,e,r){void 0===e&&(e=_),void 0===r&&(r=_);var i=new K(t);return e!==_&&We(ze,i,e,undefined),r!==_&&Ge(i,r),i}var X={identity:function(t,e){return t===e},structural:function(t,e){return gi(t,e)},default:function(t,e){return Object.is?Object.is(t,e):t===e?0!==t||1/t==1/e:t!=t&&e!=e},shallow:function(t,e){return gi(t,e,1)}};function Z(t,e,r){return ar(t)?t:Array.isArray(t)?Mt.array(t,{name:r}):S(t)?Mt.object(t,void 0,{name:r}):k(t)?Mt.map(t,{name:r}):j(t)?Mt.set(t,{name:r}):"function"!=typeof t||Fe(t)||ir(t)?t:x(t)?er(t):Re(r,t)}function J(t){return t}var tt="override";function et(t,e){return{annotationType_:t,options_:e,make_:rt,extend_:it,decorate_20223_:at}}function rt(t,e,r,i){var a;if(null!=(a=this.options_)&&a.bound)return null===this.extend_(t,e,r,!1)?0:1;if(i===t.target_)return null===this.extend_(t,e,r,!1)?0:2;if(Fe(r.value))return 1;var s=st(t,this,e,r,!1);return o(i,e,s),2}function it(t,e,r,i){var a=st(t,this,e,r);return t.defineProperty_(e,a,i)}function at(t,e){var i,a=e.kind,s=e.name,n=e.addInitializer,o=this,l=function(t){var e,r,i,a;return $t(null!=(e=null==(r=o.options_)?void 0:r.name)?e:s.toString(),t,null!=(i=null==(a=o.options_)?void 0:a.autoAction)&&i)};return"field"==a?function(t){var e,r=t;return Fe(r)||(r=l(r)),null!=(e=o.options_)&&e.bound&&((r=r.bind(this)).isMobxAction=!0),r}:"method"==a?(Fe(t)||(t=l(t)),null!=(i=this.options_)&&i.bound&&n(function(){var t=this,e=t[s].bind(t);e.isMobxAction=!0,t[s]=e}),t):void r("Cannot apply '"+o.annotationType_+"' to '"+String(s)+"' (kind: "+a+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function st(t,e,r,i,a){var s,n,o,l,c,h,u,d;void 0===a&&(a=fe.safeDescriptors),d=i,e.annotationType_,d.value;var g,p=i.value;return null!=(s=e.options_)&&s.bound&&(p=p.bind(null!=(g=t.proxy_)?g:t.target_)),{value:$t(null!=(n=null==(o=e.options_)?void 0:o.name)?n:r.toString(),p,null!=(l=null==(c=e.options_)?void 0:c.autoAction)&&l,null!=(h=e.options_)&&h.bound?null!=(u=t.proxy_)?u:t.target_:void 0),configurable:!a||t.isPlainObject_,enumerable:!1,writable:!a}}function nt(t,e){return{annotationType_:t,options_:e,make_:ot,extend_:lt,decorate_20223_:ct}}function ot(t,e,r,i){var a;if(i===t.target_)return null===this.extend_(t,e,r,!1)?0:2;if(null!=(a=this.options_)&&a.bound&&(!N(t.target_,e)||!ir(t.target_[e]))&&null===this.extend_(t,e,r,!1))return 0;if(ir(r.value))return 1;var s=ht(t,this,0,r,!1,!1);return o(i,e,s),2}function lt(t,e,r,i){var a,s=ht(t,this,0,r,null==(a=this.options_)?void 0:a.bound);return t.defineProperty_(e,s,i)}function ct(t,e){var r,i=e.name,a=e.addInitializer;return ir(t)||(t=er(t)),null!=(r=this.options_)&&r.bound&&a(function(){var t=this,e=t[i].bind(t);e.isMobXFlow=!0,t[i]=e}),t}function ht(t,e,r,i,a,s){var n;void 0===s&&(s=fe.safeDescriptors),n=i,e.annotationType_,n.value;var o,l=i.value;return ir(l)||(l=er(l)),a&&((l=l.bind(null!=(o=t.proxy_)?o:t.target_)).isMobXFlow=!0),{value:l,configurable:!s||t.isPlainObject_,enumerable:!1,writable:!s}}function ut(t,e){return{annotationType_:t,options_:e,make_:dt,extend_:gt,decorate_20223_:pt}}function dt(t,e,r){return null===this.extend_(t,e,r,!1)?0:1}function gt(t,e,r,i){return a=r,this.annotationType_,a.get,t.defineComputedProperty_(e,F({},this.options_,{get:r.get,set:r.set}),i);var a}function pt(t,e){var r=this,i=e.name;return(0,e.addInitializer)(function(){var e=$r(this)[W],a=F({},r.options_,{get:t,context:this});a.name||(a.name="ObservableObject."+i.toString()),e.values_.set(i,new Zt(a))}),function(){return this[W].getObservablePropValue_(i)}}function mt(t,e){return{annotationType_:t,options_:e,make_:ft,extend_:_t,decorate_20223_:vt}}function ft(t,e,r){return null===this.extend_(t,e,r,!1)?0:1}function _t(t,e,r,i){var a,s;return this.annotationType_,t.defineObservableProperty_(e,r.value,null!=(a=null==(s=this.options_)?void 0:s.enhancer)?a:Z,i)}function vt(t,e){var r=this,i=e.kind,a=e.name,s=new WeakSet;function n(t,e){var i,n,o=$r(t)[W],l=new Yt(e,null!=(i=null==(n=r.options_)?void 0:n.enhancer)?i:Z,"ObservableObject."+a.toString(),!1);o.values_.set(a,l),s.add(t)}if("accessor"==i)return{get:function(){return s.has(this)||n(this,t.get.call(this)),this[W].getObservablePropValue_(a)},set:function(t){return s.has(this)||n(this,t),this[W].setObservablePropValue_(a,t)},init:function(t){return s.has(this)||n(this,t),t}}}var bt="true",yt=St();function St(t){return{annotationType_:bt,options_:t,make_:xt,extend_:wt,decorate_20223_:Ct}}function xt(t,e,r,i){var a,s,n,l;if(r.get)return Vt.make_(t,e,r,i);if(r.set){var c=$t(e.toString(),r.set);return i===t.target_?null===t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:c})?0:2:(o(i,e,{configurable:!0,set:c}),2)}if(i!==t.target_&&"function"==typeof r.value)return x(r.value)?(null!=(l=this.options_)&&l.autoBind?er.bound:er).make_(t,e,r,i):(null!=(n=this.options_)&&n.autoBind?Re.bound:Re).make_(t,e,r,i);var h,u=!1===(null==(a=this.options_)?void 0:a.deep)?Mt.ref:Mt;return"function"==typeof r.value&&null!=(s=this.options_)&&s.autoBind&&(r.value=r.value.bind(null!=(h=t.proxy_)?h:t.target_)),u.make_(t,e,r,i)}function wt(t,e,r,i){var a,s,n;return r.get?Vt.extend_(t,e,r,i):r.set?t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:$t(e.toString(),r.set)},i):("function"==typeof r.value&&null!=(a=this.options_)&&a.autoBind&&(r.value=r.value.bind(null!=(n=t.proxy_)?n:t.target_)),(!1===(null==(s=this.options_)?void 0:s.deep)?Mt.ref:Mt).extend_(t,e,r,i))}function Ct(t,e){r("'"+this.annotationType_+"' cannot be used as a decorator")}var Tt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function kt(t){return t||Tt}Object.freeze(Tt);var jt=mt("observable"),At=mt("observable.ref",{enhancer:J}),Ot=mt("observable.shallow",{enhancer:function(t,e,r){return null==t||Kr(t)||Nr(t)||Mr(t)||Vr(t)?t:Array.isArray(t)?Mt.array(t,{name:r,deep:!1}):S(t)?Mt.object(t,void 0,{name:r,deep:!1}):k(t)?Mt.map(t,{name:r,deep:!1}):j(t)?Mt.set(t,{name:r,deep:!1}):void 0}}),Et=mt("observable.struct",{enhancer:function(t,e){return gi(t,e)?e:t}}),Nt=z(jt);function It(t){return!0===t.deep?Z:!1===t.deep?J:(e=t.defaultDecorator)&&null!=(r=null==(i=e.options_)?void 0:i.enhancer)?r:Z;var e,r,i}function Pt(t,e,r){return G(e)?jt.decorate_20223_(t,e):b(e)?void $(t,e,jt):ar(t)?t:S(t)?Mt.object(t,e,r):Array.isArray(t)?Mt.array(t,e):k(t)?Mt.map(t,e):j(t)?Mt.set(t,e):"object"==typeof t&&null!==t?t:Mt.box(t,e)}s(Pt,Nt);var Dt,Lt,Mt=s(Pt,{box:function(t,e){var r=kt(e);return new Yt(t,It(r),r.name,!0,r.equals)},array:function(t,e){var r=kt(e);return(!1===fe.useProxies||!1===r.proxy?ni:Cr)(t,It(r),r.name)},map:function(t,e){var r=kt(e);return new Lr(t,It(r),r.name)},set:function(t,e){var r=kt(e);return new Fr(t,It(r),r.name)},object:function(t,e,r){return hi(function(){return function(t,e,r,i){var a=I(e);return hi(function(){var e=$r(t,i)[W];O(a).forEach(function(t){e.extend_(t,a[t],!r||!(t in r)||r[t])})}),t}(!1===fe.useProxies||!1===(null==r?void 0:r.proxy)?$r({},r):function(t,e){var r,i;return m(),null!=(i=(r=(t=$r(t,e))[W]).proxy_)?i:r.proxy_=new Proxy(t,dr)}({},r),t,e)})},ref:z(At),shallow:z(Ot),deep:Nt,struct:z(Et)}),Bt="computed",Rt=ut(Bt),Ft=ut("computed.struct",{equals:X.structural}),Vt=function(t,e){if(G(e))return Rt.decorate_20223_(t,e);if(b(e))return $(t,e,Rt);if(S(t))return z(ut(Bt,t));var r=S(e)?e:{};return r.get=t,r.name||(r.name=t.name||""),new Zt(r)};Object.assign(Vt,Rt),Vt.struct=z(Ft);var Ht=0,Ut=1,qt=null!=(Dt=null==(Lt=n(function(){},"name"))?void 0:Lt.configurable)&&Dt,zt={value:"action",configurable:!0,writable:!1,enumerable:!1};function $t(t,e,r,i){function a(){return Gt(0,r,e,i||this,arguments)}return void 0===r&&(r=!1),a.isMobxAction=!0,a.toString=function(){return e.toString()},qt&&(zt.value=t,o(a,"name",zt)),a}function Gt(t,e,i,a,s){var n=function(t,e){var r=fe.trackingDerivation,i=!e||!r;ye();var a=fe.allowStateChanges;i&&(le(),a=Kt(!0));var s={runAsAction_:i,prevDerivation_:r,prevAllowStateChanges_:a,prevAllowStateReads_:he(!0),notifySpy_:!1,startTime_:0,actionId_:Ut++,parentActionId_:Ht};return Ht=s.actionId_,s}(0,e);try{return i.apply(a,s)}catch(t){throw n.error_=t,t}finally{!function(t){Ht!==t.actionId_&&r(30),Ht=t.parentActionId_,void 0!==t.error_&&(fe.suppressReactionErrors=!0),Qt(t.prevAllowStateChanges_),ue(t.prevAllowStateReads_),Se(),t.runAsAction_&&ce(t.prevDerivation_),fe.suppressReactionErrors=!1}(n)}}function Wt(t,e){var r=Kt(t);try{return e()}finally{Qt(r)}}function Kt(t){var e=fe.allowStateChanges;return fe.allowStateChanges=t,e}function Qt(t){fe.allowStateChanges=t}var Yt=function(t){function e(e,r,i,a,s){var n;return void 0===i&&(i="ObservableValue"),void 0===a&&(a=!0),void 0===s&&(s=X.default),(n=t.call(this,i)||this).enhancer=void 0,n.name_=void 0,n.equals=void 0,n.hasUnreportedChange_=!1,n.interceptors_=void 0,n.changeListeners_=void 0,n.value_=void 0,n.dehancer=void 0,n.enhancer=r,n.name_=i,n.equals=s,n.value_=r(e,void 0,i),n}V(e,t);var r=e.prototype;return r.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},r.set=function(t){this.value_,(t=this.prepareNewValue_(t))!==fe.UNCHANGED&&this.setNewValue_(t)},r.prepareNewValue_=function(t){if(gr(this)){var e=mr(this,{object:this,type:Sr,newValue:t});if(!e)return fe.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value_,this.name_),this.equals(this.value_,t)?fe.UNCHANGED:t},r.setNewValue_=function(t){var e=this.value_;this.value_=t,this.reportChanged(),fr(this)&&vr(this,{type:Sr,object:this,newValue:t,oldValue:e})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(t){return pr(this,t)},r.observe_=function(t,e){return e&&t({observableKind:"value",debugObjectName:this.name_,object:this,type:Sr,newValue:this.value_,oldValue:void 0}),_r(this,t)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return E(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},e}(K),Xt=T("ObservableValue",Yt),Zt=function(){function t(t){this.dependenciesState_=Jt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Jt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new re(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=te.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||r(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=$t("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?X.structural:X.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){var t;(t=this).lowestObserverState_===Jt.UP_TO_DATE_&&(t.lowestObserverState_=Jt.POSSIBLY_STALE_,t.observers_.forEach(function(t){t.dependenciesState_===Jt.UP_TO_DATE_&&(t.dependenciesState_=Jt.POSSIBLY_STALE_,t.onBecomeStale_())}))},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(t){return t()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(t){return t()})},e.get=function(){if(this.isComputing&&r(32,this.name_,this.derivation),0!==fe.inBatch||0!==this.observers_.size||this.keepAlive_){if(xe(this),ae(this)){var t=fe.trackingContext;this.keepAlive_&&!t&&(fe.trackingContext=this),this.trackAndCompute()&&((e=this).lowestObserverState_!==Jt.STALE_&&(e.lowestObserverState_=Jt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Jt.POSSIBLY_STALE_?t.dependenciesState_=Jt.STALE_:t.dependenciesState_===Jt.UP_TO_DATE_&&(e.lowestObserverState_=Jt.UP_TO_DATE_)}))),fe.trackingContext=t}}else ae(this)&&(this.warnAboutUntrackedRead_(),ye(),this.value_=this.computeValue_(!1),Se());var e,i=this.value_;if(ie(i))throw i.cause;return i},e.set=function(t){if(this.setter_){this.isRunningSetter&&r(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,t)}finally{this.isRunningSetter=!1}}else r(34,this.name_)},e.trackAndCompute=function(){var t=this.value_,e=this.dependenciesState_===Jt.NOT_TRACKING_,r=this.computeValue_(!0),i=e||ie(t)||ie(r)||!this.equals_(t,r);return i&&(this.value_=r),i},e.computeValue_=function(t){this.isComputing=!0;var e,r=Kt(!1);if(t)e=se(this,this.derivation,this.scope_);else if(!0===fe.disableErrorBoundaries)e=this.derivation.call(this.scope_);else try{e=this.derivation.call(this.scope_)}catch(t){e=new re(t)}return Qt(r),this.isComputing=!1,e},e.suspend_=function(){this.keepAlive_||(ne(this),this.value_=void 0)},e.observe_=function(t,e){var r=this,i=!0,a=void 0;return Ve(function(){var s=r.get();if(!i||e){var n=le();t({observableKind:"computed",debugObjectName:r.name_,type:Sr,object:r,newValue:s,oldValue:a}),ce(n)}i=!1,a=s})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return E(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},B(t,[{key:"isComputing",get:function(){return P(this.flags_,t.isComputingMask_)},set:function(e){this.flags_=D(this.flags_,t.isComputingMask_,e)}},{key:"isRunningSetter",get:function(){return P(this.flags_,t.isRunningSetterMask_)},set:function(e){this.flags_=D(this.flags_,t.isRunningSetterMask_,e)}},{key:"isBeingObserved",get:function(){return P(this.flags_,t.isBeingObservedMask_)},set:function(e){this.flags_=D(this.flags_,t.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return P(this.flags_,t.isPendingUnobservationMask_)},set:function(e){this.flags_=D(this.flags_,t.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();Zt.isComputingMask_=1,Zt.isRunningSetterMask_=2,Zt.isBeingObservedMask_=4,Zt.isPendingUnobservationMask_=8,Zt.diffValueMask_=16;var Jt,te,ee=T("ComputedValue",Zt);!function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"}(Jt||(Jt={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(te||(te={}));var re=function(t){this.cause=void 0,this.cause=t};function ie(t){return t instanceof re}function ae(t){switch(t.dependenciesState_){case Jt.UP_TO_DATE_:return!1;case Jt.NOT_TRACKING_:case Jt.STALE_:return!0;case Jt.POSSIBLY_STALE_:for(var e=he(!0),r=le(),i=t.observing_,a=i.length,s=0;s<a;s++){var n=i[s];if(ee(n)){if(fe.disableErrorBoundaries)n.get();else try{n.get()}catch(t){return ce(r),ue(e),!0}if(t.dependenciesState_===Jt.STALE_)return ce(r),ue(e),!0}}return de(t),ce(r),ue(e),!1}}function se(t,e,r){var i=he(!0);de(t),t.newObserving_=new Array(0===t.runId_?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++fe.runId;var a,s=fe.trackingDerivation;if(fe.trackingDerivation=t,fe.inBatch++,!0===fe.disableErrorBoundaries)a=e.call(r);else try{a=e.call(r)}catch(t){a=new re(t)}return fe.inBatch--,fe.trackingDerivation=s,function(t){for(var e=t.observing_,r=t.observing_=t.newObserving_,i=Jt.UP_TO_DATE_,a=0,s=t.unboundDepsCount_,n=0;n<s;n++){var o=r[n];0===o.diffValue&&(o.diffValue=1,a!==n&&(r[a]=o),a++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(r.length=a,t.newObserving_=null,s=e.length;s--;){var l=e[s];0===l.diffValue&&ve(l,t),l.diffValue=0}for(;a--;){var c=r[a];1===c.diffValue&&(c.diffValue=0,_e(c,t))}i!==Jt.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}(t),ue(i),a}function ne(t){var e=t.observing_;t.observing_=[];for(var r=e.length;r--;)ve(e[r],t);t.dependenciesState_=Jt.NOT_TRACKING_}function oe(t){var e=le();try{return t()}finally{ce(e)}}function le(){var t=fe.trackingDerivation;return fe.trackingDerivation=null,t}function ce(t){fe.trackingDerivation=t}function he(t){var e=fe.allowStateReads;return fe.allowStateReads=t,e}function ue(t){fe.allowStateReads=t}function de(t){if(t.dependenciesState_!==Jt.UP_TO_DATE_){t.dependenciesState_=Jt.UP_TO_DATE_;for(var e=t.observing_,r=e.length;r--;)e[r].lowestObserverState_=Jt.UP_TO_DATE_}}var ge=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},pe=!0,me=!1,fe=function(){var t=a();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(pe=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new ge).version&&(pe=!1),pe?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ge):(setTimeout(function(){me||r(35)},1),new ge)}();function _e(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ve(t,e){t.observers_.delete(e),0===t.observers_.size&&be(t)}function be(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,fe.pendingUnobservations.push(t))}function ye(){fe.inBatch++}function Se(){if(0===--fe.inBatch){je();for(var t=fe.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers_.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof Zt&&r.suspend_())}fe.pendingUnobservations=[]}}function xe(t){var e=fe.trackingDerivation;return null!==e?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&fe.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(0===t.observers_.size&&fe.inBatch>0&&be(t),!1)}function we(t){t.lowestObserverState_!==Jt.STALE_&&(t.lowestObserverState_=Jt.STALE_,t.observers_.forEach(function(t){t.dependenciesState_===Jt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=Jt.STALE_}))}var Ce=function(){function t(t,e,r,i){void 0===t&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Jt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=te.NONE,this.name_=t,this.onInvalidate_=e,this.errorHandler_=r,this.requiresObservable_=i}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,fe.pendingReactions.push(this),je())},e.runReaction_=function(){if(!this.isDisposed){ye(),this.isScheduled=!1;var t=fe.trackingContext;if(fe.trackingContext=this,ae(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}fe.trackingContext=t,Se()}},e.track=function(t){if(!this.isDisposed){ye(),this.isRunning=!0;var e=fe.trackingContext;fe.trackingContext=this;var r=se(this,t,void 0);fe.trackingContext=e,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&ne(this),ie(r)&&this.reportExceptionInDerivation_(r.cause),Se()}},e.reportExceptionInDerivation_=function(t){var e=this;if(this.errorHandler_)this.errorHandler_(t,this);else{if(fe.disableErrorBoundaries)throw t;var r="[mobx] uncaught error in '"+this+"'";fe.suppressReactionErrors||console.error(r,t),fe.globalReactionErrorHandlers.forEach(function(r){return r(t,e)})}},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ye(),ne(this),Se()))},e.getDisposer_=function(t){var e=this,r=function r(){e.dispose(),null==t||null==t.removeEventListener||t.removeEventListener("abort",r)};return null==t||null==t.addEventListener||t.addEventListener("abort",r),r[W]=this,r},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(t){void 0===t&&(t=!1)},B(t,[{key:"isDisposed",get:function(){return P(this.flags_,t.isDisposedMask_)},set:function(e){this.flags_=D(this.flags_,t.isDisposedMask_,e)}},{key:"isScheduled",get:function(){return P(this.flags_,t.isScheduledMask_)},set:function(e){this.flags_=D(this.flags_,t.isScheduledMask_,e)}},{key:"isTrackPending",get:function(){return P(this.flags_,t.isTrackPendingMask_)},set:function(e){this.flags_=D(this.flags_,t.isTrackPendingMask_,e)}},{key:"isRunning",get:function(){return P(this.flags_,t.isRunningMask_)},set:function(e){this.flags_=D(this.flags_,t.isRunningMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();Ce.isDisposedMask_=1,Ce.isScheduledMask_=2,Ce.isTrackPendingMask_=4,Ce.isRunningMask_=8,Ce.diffValueMask_=16;var Te=100,ke=function(t){return t()};function je(){fe.inBatch>0||fe.isRunningReactions||ke(Ae)}function Ae(){fe.isRunningReactions=!0;for(var t=fe.pendingReactions,e=0;t.length>0;){++e===Te&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var r=t.splice(0),i=0,a=r.length;i<a;i++)r[i].runReaction_()}fe.isRunningReactions=!1}var Oe=T("Reaction",Ce),Ee="action",Ne="autoAction",Ie=et(Ee),Pe=et("action.bound",{bound:!0}),De=et(Ne,{autoAction:!0}),Le=et("autoAction.bound",{autoAction:!0,bound:!0});function Me(t){return function(e,r){return v(e)?$t(e.name||"<unnamed action>",e,t):v(r)?$t(e,r,t):G(r)?(t?De:Ie).decorate_20223_(e,r):b(r)?$(e,r,t?De:Ie):b(e)?z(et(t?Ne:Ee,{name:e,autoAction:t})):void 0}}var Be=Me(!1);Object.assign(Be,Ie);var Re=Me(!0);function Fe(t){return v(t)&&!0===t.isMobxAction}function Ve(t,e){var r,i,a,s;void 0===e&&(e=d);var n,o=null!=(r=null==(i=e)?void 0:i.name)?r:"Autorun";if(e.scheduler||e.delay){var l=Ue(e),c=!1;n=new Ce(o,function(){c||(c=!0,l(function(){c=!1,n.isDisposed||n.track(h)}))},e.onError,e.requiresObservable)}else n=new Ce(o,function(){this.track(h)},e.onError,e.requiresObservable);function h(){t(n)}return null!=(a=e)&&null!=(a=a.signal)&&a.aborted||n.schedule_(),n.getDisposer_(null==(s=e)?void 0:s.signal)}Object.assign(Re,De),Be.bound=z(Pe),Re.bound=z(Le);var He=function(t){return t()};function Ue(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:He}function qe(t,e,r){var i,a,s;void 0===r&&(r=d);var n,o,l,c=null!=(i=r.name)?i:"Reaction",h=Be(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),u=!r.scheduler&&!r.delay,g=Ue(r),p=!0,m=!1,f=r.compareStructural?X.structural:r.equals||X.default,_=new Ce(c,function(){p||u?v():m||(m=!0,g(v))},r.onError,r.requiresObservable);function v(){if(m=!1,!_.isDisposed){var e=!1,i=l;_.track(function(){var r=Wt(!1,function(){return t(_)});e=p||!f(l,r),l=r}),(p&&r.fireImmediately||!p&&e)&&h(l,i,_),p=!1}}return null!=(a=r)&&null!=(a=a.signal)&&a.aborted||_.schedule_(),_.getDisposer_(null==(s=r)?void 0:s.signal)}var ze="onBO",$e="onBUO";function Ge(t,e,r){return We($e,t,e,r)}function We(t,e,r,i){var a="function"==typeof i?oi(e,r):oi(e),s=v(i)?i:r,n=t+"L";return a[n]?a[n].add(s):a[n]=new Set([s]),function(){var t=a[n];t&&(t.delete(s),0===t.size&&delete a[n])}}var Ke="always";function Qe(t){!0===t.isolateGlobalState&&function(){if((fe.pendingReactions.length||fe.inBatch||fe.isRunningReactions)&&r(36),me=!0,pe){var t=a();0===--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),fe=new ge}}();var e,i,s=t.useProxies,n=t.enforceActions;if(void 0!==s&&(fe.useProxies=s===Ke||"never"!==s&&"undefined"!=typeof Proxy),"ifavailable"===s&&(fe.verifyProxies=!0),void 0!==n){var o=n===Ke?Ke:"observed"===n;fe.enforceActions=o,fe.allowStateChanges=!0!==o&&o!==Ke}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(e){e in t&&(fe[e]=!!t[e])}),fe.allowStateReads=!fe.observableRequiresReaction,t.reactionScheduler&&(e=t.reactionScheduler,i=ke,ke=function(t){return e(function(){return i(t)})})}function Ye(t){var e,r={name:t.name_};return t.observing_&&t.observing_.length>0&&(r.dependencies=(e=t.observing_,Array.from(new Set(e))).map(Ye)),r}var Xe=0;function Ze(){this.message="FLOW_CANCELLED"}Ze.prototype=Object.create(Error.prototype);var Je=nt("flow"),tr=nt("flow.bound",{bound:!0}),er=Object.assign(function(t,e){if(G(e))return Je.decorate_20223_(t,e);if(b(e))return $(t,e,Je);var r=t,i=r.name||"<unnamed flow>",a=function(){var t,e=arguments,a=++Xe,s=Be(i+" - runid: "+a+" - init",r).apply(this,e),n=void 0,o=new Promise(function(e,r){var o=0;function l(t){var e;n=void 0;try{e=Be(i+" - runid: "+a+" - yield "+o++,s.next).call(s,t)}catch(t){return r(t)}h(e)}function c(t){var e;n=void 0;try{e=Be(i+" - runid: "+a+" - yield "+o++,s.throw).call(s,t)}catch(t){return r(t)}h(e)}function h(t){if(!v(null==t?void 0:t.then))return t.done?e(t.value):(n=Promise.resolve(t.value)).then(l,c);t.then(h,r)}t=r,l(void 0)});return o.cancel=Be(i+" - runid: "+a+" - cancel",function(){try{n&&rr(n);var e=s.return(void 0),r=Promise.resolve(e.value);r.then(_,_),rr(r),t(new Ze)}catch(e){t(e)}}),o};return a.isMobXFlow=!0,a},Je);function rr(t){v(t.cancel)&&t.cancel()}function ir(t){return!0===(null==t?void 0:t.isMobXFlow)}function ar(t){return function(t,e){return!!t&&(void 0!==e?!!Kr(t)&&t[W].values_.has(e):Kr(t)||!!t[W]||Q(t)||Oe(t)||ee(t))}(t)}function sr(t,e,r){return t.set(e,r),r}function nr(t,e){if(null==t||"object"!=typeof t||t instanceof Date||!ar(t))return t;if(Xt(t)||ee(t))return nr(t.get(),e);if(e.has(t))return e.get(t);if(Nr(t)){var i=sr(e,t,new Array(t.length));return t.forEach(function(t,r){i[r]=nr(t,e)}),i}if(Vr(t)){var a=sr(e,t,new Set);return t.forEach(function(t){a.add(nr(t,e))}),a}if(Mr(t)){var s=sr(e,t,new Map);return t.forEach(function(t,r){s.set(r,nr(t,e))}),s}var n=sr(e,t,{});return function(t){if(Kr(t))return t[W].ownKeys_();r(38)}(t).forEach(function(r){l.propertyIsEnumerable.call(t,r)&&(n[r]=nr(t[r],e))}),n}function or(t,e){return nr(t,new Map)}function lr(t,e){void 0===e&&(e=void 0),ye();try{return t.apply(e)}finally{Se()}}function cr(t,e,r){return 1===arguments.length||e&&"object"==typeof e?function(t,e){var r,i,a;if(null!=e&&null!=(r=e.signal)&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var s=new Promise(function(r,s){var n,o=hr(t,r,F({},e,{onError:s}));i=function(){o(),s(new Error("WHEN_CANCELLED"))},a=function(){o(),s(new Error("WHEN_ABORTED"))},null==e||null==(n=e.signal)||null==n.addEventListener||n.addEventListener("abort",a)}).finally(function(){var t;return null==e||null==(t=e.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",a)});return s.cancel=i,s}(t,e):hr(t,e,r||{})}function hr(t,e,r){var i;if("number"==typeof r.timeout){var a=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!n[W].isDisposed){if(n(),!r.onError)throw a;r.onError(a)}},r.timeout)}r.name="When";var s=$t("When-effect",e),n=Ve(function(e){Wt(!1,t)&&(e.dispose(),i&&clearTimeout(i),s())},r);return n}function ur(t){return t[W]}er.bound=z(tr);var dr={has:function(t,e){return ur(t).has_(e)},get:function(t,e){return ur(t).get_(e)},set:function(t,e,r){var i;return!!b(e)&&(null==(i=ur(t).set_(e,r,!0))||i)},deleteProperty:function(t,e){var r;return!!b(e)&&(null==(r=ur(t).delete_(e,!0))||r)},defineProperty:function(t,e,r){var i;return null==(i=ur(t).defineProperty_(e,r))||i},ownKeys:function(t){return ur(t).ownKeys_()},preventExtensions:function(t){r(13)}};function gr(t){return void 0!==t.interceptors_&&t.interceptors_.length>0}function pr(t,e){var r=t.interceptors_||(t.interceptors_=[]);return r.push(e),f(function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)})}function mr(t,e){var i=le();try{for(var a=[].concat(t.interceptors_||[]),s=0,n=a.length;s<n&&((e=a[s](e))&&!e.type&&r(14),e);s++);return e}finally{ce(i)}}function fr(t){return void 0!==t.changeListeners_&&t.changeListeners_.length>0}function _r(t,e){var r=t.changeListeners_||(t.changeListeners_=[]);return r.push(e),f(function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)})}function vr(t,e){var r=le(),i=t.changeListeners_;if(i){for(var a=0,s=(i=i.slice()).length;a<s;a++)i[a](e);ce(r)}}function br(t,e,r){return hi(function(){var i=$r(t,r)[W];null!=e||(e=function(t){return N(t,q)||w(t,q,F({},t[q])),t[q]}(t)),O(e).forEach(function(t){return i.make_(t,e[t])})}),t}var yr="splice",Sr="update",xr={get:function(t,e){var r=t[W];return e===W?r:"length"===e?r.getArrayLength_():"string"!=typeof e||isNaN(e)?N(Tr,e)?Tr[e]:t[e]:r.get_(parseInt(e))},set:function(t,e,r){var i=t[W];return"length"===e&&i.setArrayLength_(r),"symbol"==typeof e||isNaN(e)?t[e]=r:i.set_(parseInt(e),r),!0},preventExtensions:function(){r(15)}},wr=function(){function t(t,e,r,i){void 0===t&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=i,this.atom_=new K(t),this.enhancer_=function(t,r){return e(t,r,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.dehanceValues_=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},e.intercept_=function(t){return pr(this,t)},e.observe_=function(t,e){return void 0===e&&(e=!1),e&&t({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),_r(this,t)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(t){("number"!=typeof t||isNaN(t)||t<0)&&r("Out of range: "+t);var e=this.values_.length;if(t!==e)if(t>e){for(var i=new Array(t-e),a=0;a<t-e;a++)i[a]=void 0;this.spliceWithArray_(e,0,i)}else this.spliceWithArray_(t,e-t)},e.updateArrayLength_=function(t,e){t!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=e,this.legacyMode_&&e>0&&si(t+e+1)},e.spliceWithArray_=function(t,e,r){var i=this;this.atom_;var a=this.values_.length;if(void 0===t?t=0:t>a?t=a:t<0&&(t=Math.max(0,a+t)),e=1===arguments.length?a-t:null==e?0:Math.max(0,Math.min(e,a-t)),void 0===r&&(r=c),gr(this)){var s=mr(this,{object:this.proxy_,type:yr,index:t,removedCount:e,added:r});if(!s)return c;e=s.removedCount,r=s.added}if(r=0===r.length?r:r.map(function(t){return i.enhancer_(t,void 0)}),this.legacyMode_){var n=r.length-e;this.updateArrayLength_(a,n)}var o=this.spliceItemsIntoValues_(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice_(t,r,o),this.dehanceValues_(o)},e.spliceItemsIntoValues_=function(t,e,r){var i;if(r.length<1e4)return(i=this.values_).splice.apply(i,[t,e].concat(r));var a=this.values_.slice(t,t+e),s=this.values_.slice(t+e);this.values_.length+=r.length-e;for(var n=0;n<r.length;n++)this.values_[t+n]=r[n];for(var o=0;o<s.length;o++)this.values_[t+r.length+o]=s[o];return a},e.notifyArrayChildUpdate_=function(t,e,r){var i=!this.owned_&&!1,a=fr(this),s=a||i?{observableKind:"array",object:this.proxy_,type:Sr,debugObjectName:this.atom_.name_,index:t,newValue:e,oldValue:r}:null;this.atom_.reportChanged(),a&&vr(this,s)},e.notifyArraySplice_=function(t,e,r){var i=!this.owned_&&!1,a=fr(this),s=a||i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:yr,index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom_.reportChanged(),a&&vr(this,s)},e.get_=function(t){if(!(this.legacyMode_&&t>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[t]);console.warn("[mobx] Out of bounds read: "+t)},e.set_=function(t,e){var i=this.values_;if(this.legacyMode_&&t>i.length&&r(17,t,i.length),t<i.length){this.atom_;var a=i[t];if(gr(this)){var s=mr(this,{type:Sr,object:this.proxy_,index:t,newValue:e});if(!s)return;e=s.newValue}(e=this.enhancer_(e,a))!==a&&(i[t]=e,this.notifyArrayChildUpdate_(t,e,a))}else{for(var n=new Array(t+1-i.length),o=0;o<n.length-1;o++)n[o]=void 0;n[n.length-1]=e,this.spliceWithArray_(i.length,0,n)}},t}();function Cr(t,e,r,i){return void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),m(),hi(function(){var a=new wr(r,e,i,!1);C(a.values_,W,a);var s=new Proxy(a.values_,xr);return a.proxy_=s,t&&t.length&&a.spliceWithArray_(0,0,t),s})}var Tr={clear:function(){return this.splice(0)},replace:function(t){var e=this[W];return e.spliceWithArray_(0,e.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];var s=this[W];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(t);case 2:return s.spliceWithArray_(t,e)}return s.spliceWithArray_(t,e,i)},spliceWithArray:function(t,e,r){return this[W].spliceWithArray_(t,e,r)},push:function(){for(var t=this[W],e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,r),t.values_.length},pop:function(){return this.splice(Math.max(this[W].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[W],e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.spliceWithArray_(0,0,r),t.values_.length},reverse:function(){return fe.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){fe.trackingDerivation&&r(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var e=this[W],r=e.dehanceValues_(e.values_).indexOf(t);return r>-1&&(this.splice(r,1),!0)}};function kr(t,e){"function"==typeof Array.prototype[t]&&(Tr[t]=e(t))}function jr(t){return function(){var e=this[W];e.atom_.reportObserved();var r=e.dehanceValues_(e.values_);return r[t].apply(r,arguments)}}function Ar(t){return function(e,r){var i=this,a=this[W];return a.atom_.reportObserved(),a.dehanceValues_(a.values_)[t](function(t,a){return e.call(r,t,a,i)})}}function Or(t){return function(){var e=this,r=this[W];r.atom_.reportObserved();var i=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(t,r,i){return a(t,r,i,e)},i[t].apply(i,arguments)}}kr("at",jr),kr("concat",jr),kr("flat",jr),kr("includes",jr),kr("indexOf",jr),kr("join",jr),kr("lastIndexOf",jr),kr("slice",jr),kr("toString",jr),kr("toLocaleString",jr),kr("toSorted",jr),kr("toSpliced",jr),kr("with",jr),kr("every",Ar),kr("filter",Ar),kr("find",Ar),kr("findIndex",Ar),kr("findLast",Ar),kr("findLastIndex",Ar),kr("flatMap",Ar),kr("forEach",Ar),kr("map",Ar),kr("some",Ar),kr("toReversed",Ar),kr("reduce",Or),kr("reduceRight",Or);var Er=T("ObservableArrayAdministration",wr);function Nr(t){return y(t)&&Er(t[W])}var Ir={},Pr="add",Dr="delete",Lr=function(){function t(t,e,i){var a=this;void 0===e&&(e=Z),void 0===i&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[W]=Ir,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=i,v(Map)||r(18),hi(function(){a.keysAtom_=Y("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,t&&a.merge(t)})}var e=t.prototype;return e.has_=function(t){return this.data_.has(t)},e.has=function(t){var e=this;if(!fe.trackingDerivation)return this.has_(t);var r=this.hasMap_.get(t);if(!r){var i=r=new Yt(this.has_(t),J,"ObservableMap.key?",!1);this.hasMap_.set(t,i),Ge(i,function(){return e.hasMap_.delete(t)})}return r.get()},e.set=function(t,e){var r=this.has_(t);if(gr(this)){var i=mr(this,{type:r?Sr:Pr,object:this,newValue:e,name:t});if(!i)return this;e=i.newValue}return r?this.updateValue_(t,e):this.addValue_(t,e),this},e.delete=function(t){var e=this;if(this.keysAtom_,gr(this)&&!mr(this,{type:Dr,object:this,name:t}))return!1;if(this.has_(t)){var r=fr(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:Dr,object:this,oldValue:this.data_.get(t).value_,name:t}:null;return lr(function(){var r;e.keysAtom_.reportChanged(),null==(r=e.hasMap_.get(t))||r.setNewValue_(!1),e.data_.get(t).setNewValue_(void 0),e.data_.delete(t)}),r&&vr(this,i),!0}return!1},e.updateValue_=function(t,e){var r=this.data_.get(t);if((e=r.prepareNewValue_(e))!==fe.UNCHANGED){var i=fr(this),a=i?{observableKind:"map",debugObjectName:this.name_,type:Sr,object:this,oldValue:r.value_,name:t,newValue:e}:null;r.setNewValue_(e),i&&vr(this,a)}},e.addValue_=function(t,e){var r=this;this.keysAtom_,lr(function(){var i,a=new Yt(e,r.enhancer_,"ObservableMap.key",!1);r.data_.set(t,a),e=a.value_,null==(i=r.hasMap_.get(t))||i.setNewValue_(!0),r.keysAtom_.reportChanged()});var i=fr(this),a=i?{observableKind:"map",debugObjectName:this.name_,type:Pr,object:this,name:t,newValue:e}:null;i&&vr(this,a)},e.get=function(t){return this.has(t)?this.dehanceValue_(this.data_.get(t).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var t=this,e=this.keys();return Br({next:function(){var r=e.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:t.get(a)}}})},e.entries=function(){var t=this,e=this.keys();return Br({next:function(){var r=e.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:[a,t.get(a)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(t,e){for(var r,i=R(this);!(r=i()).done;){var a=r.value,s=a[0],n=a[1];t.call(e,n,s,this)}},e.merge=function(t){var e=this;return Mr(t)&&(t=new Map(t)),lr(function(){S(t)?function(t){var e=Object.keys(t);if(!A)return e;var r=Object.getOwnPropertySymbols(t);return r.length?[].concat(e,r.filter(function(e){return l.propertyIsEnumerable.call(t,e)})):e}(t).forEach(function(r){return e.set(r,t[r])}):Array.isArray(t)?t.forEach(function(t){var r=t[0],i=t[1];return e.set(r,i)}):k(t)?(function(t){var e=Object.getPrototypeOf(t),r=Object.getPrototypeOf(e);return null===Object.getPrototypeOf(r)}(t)||r(19,t),t.forEach(function(t,r){return e.set(r,t)})):null!=t&&r(20,t)}),this},e.clear=function(){var t=this;lr(function(){oe(function(){for(var e,r=R(t.keys());!(e=r()).done;){var i=e.value;t.delete(i)}})})},e.replace=function(t){var e=this;return lr(function(){for(var i,a=function(t){if(k(t)||Mr(t))return t;if(Array.isArray(t))return new Map(t);if(S(t)){var e=new Map;for(var i in t)e.set(i,t[i]);return e}return r(21,t)}(t),s=new Map,n=!1,o=R(e.data_.keys());!(i=o()).done;){var l=i.value;if(!a.has(l))if(e.delete(l))n=!0;else{var c=e.data_.get(l);s.set(l,c)}}for(var h,u=R(a.entries());!(h=u()).done;){var d=h.value,g=d[0],p=d[1],m=e.data_.has(g);if(e.set(g,p),e.data_.has(g)){var f=e.data_.get(g);s.set(g,f),m||(n=!0)}}if(!n)if(e.data_.size!==s.size)e.keysAtom_.reportChanged();else for(var _=e.data_.keys(),v=s.keys(),b=_.next(),y=v.next();!b.done;){if(b.value!==y.value){e.keysAtom_.reportChanged();break}b=_.next(),y=v.next()}e.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},B(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Mr=T("ObservableMap",Lr);function Br(t){return t[Symbol.toStringTag]="MapIterator",_i(t)}var Rr={},Fr=function(){function t(t,e,i){var a=this;void 0===e&&(e=Z),void 0===i&&(i="ObservableSet"),this.name_=void 0,this[W]=Rr,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,v(Set)||r(22),this.enhancer_=function(t,r){return e(t,r,i)},hi(function(){a.atom_=Y(a.name_),t&&a.replace(t)})}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.clear=function(){var t=this;lr(function(){oe(function(){for(var e,r=R(t.data_.values());!(e=r()).done;){var i=e.value;t.delete(i)}})})},e.forEach=function(t,e){for(var r,i=R(this);!(r=i()).done;){var a=r.value;t.call(e,a,a,this)}},e.add=function(t){var e=this;if(this.atom_,gr(this)){var r=mr(this,{type:Pr,object:this,newValue:t});if(!r)return this;t=r.newValue}if(!this.has(t)){lr(function(){e.data_.add(e.enhancer_(t,void 0)),e.atom_.reportChanged()});var i=fr(this),a=i?{observableKind:"set",debugObjectName:this.name_,type:Pr,object:this,newValue:t}:null;i&&vr(this,a)}return this},e.delete=function(t){var e=this;if(gr(this)&&!mr(this,{type:Dr,object:this,oldValue:t}))return!1;if(this.has(t)){var r=fr(this),i=r?{observableKind:"set",debugObjectName:this.name_,type:Dr,object:this,oldValue:t}:null;return lr(function(){e.atom_.reportChanged(),e.data_.delete(t)}),r&&vr(this,i),!0}return!1},e.has=function(t){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(t))},e.entries=function(){var t=this.values();return Hr({next:function(){var e=t.next(),r=e.value,i=e.done;return i?{value:void 0,done:i}:{value:[r,r],done:i}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var t=this,e=this.data_.values();return Hr({next:function(){var r=e.next(),i=r.value,a=r.done;return a?{value:void 0,done:a}:{value:t.dehanceValue_(i),done:a}}})},e.intersection=function(t){return j(t)&&!Vr(t)?t.intersection(this):new Set(this).intersection(t)},e.union=function(t){return j(t)&&!Vr(t)?t.union(this):new Set(this).union(t)},e.difference=function(t){return new Set(this).difference(t)},e.symmetricDifference=function(t){return j(t)&&!Vr(t)?t.symmetricDifference(this):new Set(this).symmetricDifference(t)},e.isSubsetOf=function(t){return new Set(this).isSubsetOf(t)},e.isSupersetOf=function(t){return new Set(this).isSupersetOf(t)},e.isDisjointFrom=function(t){return j(t)&&!Vr(t)?t.isDisjointFrom(this):new Set(this).isDisjointFrom(t)},e.replace=function(t){var e=this;return Vr(t)&&(t=new Set(t)),lr(function(){Array.isArray(t)||j(t)?(e.clear(),t.forEach(function(t){return e.add(t)})):null!=t&&r("Cannot initialize set from "+t)}),this},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},B(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Vr=T("ObservableSet",Fr);function Hr(t){return t[Symbol.toStringTag]="SetIterator",_i(t)}var Ur=Object.create(null),qr="remove",zr=function(){function t(t,e,r,i){void 0===e&&(e=new Map),void 0===i&&(i=yt),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=e,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new K("ObservableObject.keys"),this.isPlainObject_=S(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(t){return this.values_.get(t).get()},e.setObservablePropValue_=function(t,e){var r=this.values_.get(t);if(r instanceof Zt)return r.set(e),!0;if(gr(this)){var i=mr(this,{type:Sr,object:this.proxy_||this.target_,name:t,newValue:e});if(!i)return null;e=i.newValue}if((e=r.prepareNewValue_(e))!==fe.UNCHANGED){var a=fr(this),s=a?{type:Sr,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:t,newValue:e}:null;r.setNewValue_(e),a&&vr(this,s)}return!0},e.get_=function(t){return fe.trackingDerivation&&!N(this.target_,t)&&this.has_(t),this.target_[t]},e.set_=function(t,e,r){return void 0===r&&(r=!1),N(this.target_,t)?this.values_.has(t)?this.setObservablePropValue_(t,e):r?Reflect.set(this.target_,t,e):(this.target_[t]=e,!0):this.extend_(t,{value:e,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},e.has_=function(t){if(!fe.trackingDerivation)return t in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var e=this.pendingKeys_.get(t);return e||(e=new Yt(t in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(t,e)),e.get()},e.make_=function(t,e){if(!0===e&&(e=this.defaultAnnotation_),!1!==e){if(!(t in this.target_)){var i;if(null!=(i=this.target_[q])&&i[t])return;r(1,e.annotationType_,this.name_+"."+t.toString())}for(var a=this.target_;a&&a!==l;){var s=n(a,t);if(s){var o=e.make_(this,t,s,a);if(0===o)return;if(1===o)break}a=Object.getPrototypeOf(a)}Qr(this,0,t)}},e.extend_=function(t,e,r,i){if(void 0===i&&(i=!1),!0===r&&(r=this.defaultAnnotation_),!1===r)return this.defineProperty_(t,e,i);var a=r.extend_(this,t,e,i);return a&&Qr(this,0,t),a},e.defineProperty_=function(t,e,r){void 0===r&&(r=!1),this.keysAtom_;try{ye();var i=this.delete_(t);if(!i)return i;if(gr(this)){var a=mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:e.value});if(!a)return null;var s=a.newValue;e.value!==s&&(e=F({},e,{value:s}))}if(r){if(!Reflect.defineProperty(this.target_,t,e))return!1}else o(this.target_,t,e);this.notifyPropertyAddition_(t,e.value)}finally{Se()}return!0},e.defineObservableProperty_=function(t,e,r,i){void 0===i&&(i=!1),this.keysAtom_;try{ye();var a=this.delete_(t);if(!a)return a;if(gr(this)){var s=mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:e});if(!s)return null;e=s.newValue}var n=Wr(t),l={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!0,get:n.get,set:n.set};if(i){if(!Reflect.defineProperty(this.target_,t,l))return!1}else o(this.target_,t,l);var c=new Yt(e,r,"ObservableObject.key",!1);this.values_.set(t,c),this.notifyPropertyAddition_(t,c.value_)}finally{Se()}return!0},e.defineComputedProperty_=function(t,e,r){void 0===r&&(r=!1),this.keysAtom_;try{ye();var i=this.delete_(t);if(!i)return i;if(gr(this)&&!mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:void 0}))return null;e.name||(e.name="ObservableObject.key"),e.context=this.proxy_||this.target_;var a=Wr(t),s={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!1,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,t,s))return!1}else o(this.target_,t,s);this.values_.set(t,new Zt(e)),this.notifyPropertyAddition_(t,void 0)}finally{Se()}return!0},e.delete_=function(t,e){if(void 0===e&&(e=!1),this.keysAtom_,!N(this.target_,t))return!0;if(gr(this)&&!mr(this,{object:this.proxy_||this.target_,name:t,type:qr}))return null;try{var r;ye();var i,a=fr(this),s=this.values_.get(t),o=void 0;if(!s&&a&&(o=null==(i=n(this.target_,t))?void 0:i.value),e){if(!Reflect.deleteProperty(this.target_,t))return!1}else delete this.target_[t];if(s&&(this.values_.delete(t),s instanceof Yt&&(o=s.value_),we(s)),this.keysAtom_.reportChanged(),null==(r=this.pendingKeys_)||null==(r=r.get(t))||r.set(t in this.target_),a){var l={type:qr,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:o,name:t};a&&vr(this,l)}}finally{Se()}return!0},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},e.notifyPropertyAddition_=function(t,e){var r,i=fr(this);if(i){var a=i?{type:Pr,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:t,newValue:e}:null;i&&vr(this,a)}null==(r=this.pendingKeys_)||null==(r=r.get(t))||r.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),O(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function $r(t,e){var r;if(N(t,W))return t;var i=null!=(r=null==e?void 0:e.name)?r:"ObservableObject",a=new zr(t,new Map,String(i),function(t){var e;return t?null!=(e=t.defaultDecorator)?e:St(t):void 0}(e));return w(t,W,a),t}var Gr=T("ObservableObjectAdministration",zr);function Wr(t){return Ur[t]||(Ur[t]={get:function(){return this[W].getObservablePropValue_(t)},set:function(e){return this[W].setObservablePropValue_(t,e)}})}function Kr(t){return!!y(t)&&Gr(t[W])}function Qr(t,e,r){var i;null==(i=t.target_[q])||delete i[r]}var Yr,Xr,Zr=ii(0),Jr=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,!1===t}(),ti=0,ei=function(){};Yr=ei,Xr=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Yr.prototype,Xr):void 0!==Yr.prototype.__proto__?Yr.prototype.__proto__=Xr:Yr.prototype=Xr;var ri=function(t){function e(e,r,i,a){var s;return void 0===i&&(i="ObservableArray"),void 0===a&&(a=!1),s=t.call(this)||this,hi(function(){var t=new wr(i,r,a,!0);t.proxy_=s,C(s,W,t),e&&e.length&&s.spliceWithArray(0,0,e),Jr&&Object.defineProperty(s,"0",Zr)}),s}V(e,t);var r=e.prototype;return r.concat=function(){this[W].atom_.reportObserved();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Array.prototype.concat.apply(this.slice(),e.map(function(t){return Nr(t)?t.slice():t}))},r[Symbol.iterator]=function(){var t=this,e=0;return _i({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})},B(e,[{key:"length",get:function(){return this[W].getArrayLength_()},set:function(t){this[W].setArrayLength_(t)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(ei);function ii(t){return{enumerable:!1,configurable:!0,get:function(){return this[W].get_(t)},set:function(e){this[W].set_(t,e)}}}function ai(t){o(ri.prototype,""+t,ii(t))}function si(t){if(t>ti){for(var e=ti;e<t+100;e++)ai(e);ti=t}}function ni(t,e,r){return new ri(t,e,r)}function oi(t,e){if("object"==typeof t&&null!==t){if(Nr(t))return void 0!==e&&r(23),t[W].atom_;if(Vr(t))return t.atom_;if(Mr(t)){if(void 0===e)return t.keysAtom_;var i=t.data_.get(e)||t.hasMap_.get(e);return i||r(25,e,ci(t)),i}if(Kr(t)){if(!e)return r(26);var a=t[W].values_.get(e);return a||r(27,e,ci(t)),a}if(Q(t)||ee(t)||Oe(t))return t}else if(v(t)&&Oe(t[W]))return t[W];r(28)}function li(t,e){return t||r(29),void 0!==e?li(oi(t,e)):Q(t)||ee(t)||Oe(t)||Mr(t)||Vr(t)?t:t[W]?t[W]:void r(24,t)}function ci(t,e){var r;if(void 0!==e)r=oi(t,e);else{if(Fe(t))return t.name;r=Kr(t)||Mr(t)||Vr(t)?li(t):oi(t)}return r.name_}function hi(t){var e=le(),r=Kt(!0);ye();try{return t()}finally{Se(),Qt(r),ce(e)}}Object.entries(Tr).forEach(function(t){var e=t[0],r=t[1];"concat"!==e&&w(ri.prototype,e,r)}),si(1e3);var ui,di=l.toString;function gi(t,e,r){return void 0===r&&(r=-1),pi(t,e,r)}function pi(t,e,r,i,a){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var s=typeof t;if("function"!==s&&"object"!==s&&"object"!=typeof e)return!1;var n=di.call(t);if(n!==di.call(e))return!1;switch(n){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0===+t?1/+t==1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=mi(t),e=mi(e);var o="[object Array]"===n;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var l=t.constructor,c=e.constructor;if(l!==c&&!(v(l)&&l instanceof l&&v(c)&&c instanceof c)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),a=a||[];for(var h=(i=i||[]).length;h--;)if(i[h]===t)return a[h]===e;if(i.push(t),a.push(e),o){if((h=t.length)!==e.length)return!1;for(;h--;)if(!pi(t[h],e[h],r-1,i,a))return!1}else{var u=Object.keys(t),d=u.length;if(Object.keys(e).length!==d)return!1;for(var g=0;g<d;g++){var p=u[g];if(!N(e,p)||!pi(t[p],e[p],r-1,i,a))return!1}}return i.pop(),a.pop(),!0}function mi(t){return Nr(t)?t.slice():k(t)||Mr(t)||j(t)||Vr(t)?Array.from(t.entries()):t}var fi=(null==(ui=a().Iterator)?void 0:ui.prototype)||{};function _i(t){return t[Symbol.iterator]=vi,Object.assign(Object.create(fi),t)}function vi(){return this}["Symbol","Map","Set"].forEach(function(t){void 0===a()[t]&&r("MobX requires global '"+t+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:ci},$mobx:W});var bi=h(809),yi=h.n(bi);if(!bi.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!br)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var Si=h(4511),xi=h.n(Si);function wi(t){t()}function Ci(t){return Ye(oi(t,e));var e}var Ti,ki,ji=function(){function t(t){var e=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(t){void 0===t&&(t=1e4),clearTimeout(e.sweepTimeout),e.sweepTimeout=void 0;var r=Date.now();e.registrations.forEach(function(i,a){r-i.registeredAt>=t&&(e.finalize(i.value),e.registrations.delete(a))}),e.registrations.size>0&&e.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){e.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e,r){this.registrations.set(r,{value:e,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),t}(),Ai=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:ji)(function(t){var e;null===(e=t.reaction)||void 0===e||e.dispose(),t.reaction=null}),Oi=h(1673);function Ei(t){t.reaction=new Ce("observer".concat(t.name),function(){var e;t.stateVersion=Symbol(),null===(e=t.onStoreChange)||void 0===e||e.call(t)})}var Ni="function"==typeof Symbol&&Symbol.for,Ii=null!==(ki=null===(Ti=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===Ti?void 0:Ti.configurable)&&void 0!==ki&&ki,Pi=Ni?Symbol.for("react.forward_ref"):"function"==typeof bi.forwardRef&&(0,bi.forwardRef)(function(t){return null}).$$typeof,Di=Ni?Symbol.for("react.memo"):"function"==typeof bi.memo&&(0,bi.memo)(function(t){return null}).$$typeof;function Li(t,e){var r;if(Di&&t.$$typeof===Di)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var i=null!==(r=null==e?void 0:e.forwardRef)&&void 0!==r&&r,a=t,s=t.displayName||t.name;if(Pi&&t.$$typeof===Pi&&(i=!0,"function"!=typeof(a=t.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var n,o,l=function(t,e){return function(t,e){void 0===e&&(e="observed");var r=yi().useRef(null);if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:e,subscribe:function(t){return Ai.unregister(i),i.onStoreChange=t,i.reaction||(Ei(i),i.stateVersion=Symbol()),function(){var t;i.onStoreChange=null,null===(t=i.reaction)||void 0===t||t.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};r.current=i}var a,s,n=r.current;if(n.reaction||(Ei(n),Ai.register(r,n,n)),yi().useDebugValue(n.reaction,Ci),(0,Oi.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot),n.reaction.track(function(){try{a=t()}catch(t){s=t}}),s)throw s;return a}(function(){return a(t,e)},s)};return l.displayName=t.displayName,Ii&&Object.defineProperty(l,"name",{value:t.name,writable:!0,configurable:!0}),t.contextTypes&&(l.contextTypes=t.contextTypes),i&&(l=(0,bi.forwardRef)(l)),l=(0,bi.memo)(l),n=t,o=l,Object.keys(n).forEach(function(t){Mi[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))}),l}var Mi={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Bi(t=null){let e,r;const i=new Promise((t,i)=>{e=t,r=i});return i.resolve=t=>{i.isPending=!1,e(t)},i.reject=t=>{i.isPending=!1,r(t)},i.data=t,i}!function(t){t||(t=wi),Qe({reactionScheduler:t})}(Si.unstable_batchedUpdates),Ai.finalizeAllImmediately;var Ri=h(12),Fi=h.n(Ri);function Vi(t){const e=localStorage.getItem(t);if(null!==e)try{return JSON.parse(e)}catch(t){return}}function Hi(t){try{return JSON.parse(t)}catch(t){return}}function Ui(t,e){const r=JSON.stringify(e);localStorage.setItem(t,r)}function qi(t,e){return"string"==typeof t?t:t.toFixed(e)}const zi=t=>{const{market_display_name:e,submarket_display_name:r,subgroup:i}=t||{};if(!e)return"";const a=e.replace(" ","_"),s=r.replace(" ","_");return i&&"none"!==i?`${a}-${i}-${s}`.toLowerCase():`${a}-${s}`.toLowerCase()},$i=(t,e)=>{const r=e.find(e=>e.items.some(e=>e.interval===t)),i=r?.items?.find(e=>e.interval===t)?.num,a=1===i?r?.single:r?.plural;return a?`${i} ${a}`:""},Gi=()=>-1!==navigator.userAgent.indexOf("Firefox")&&-1===navigator.userAgent.indexOf("Seamonkey"),Wi=()=>-1!==navigator.userAgent.indexOf("Safari")&&!navigator.userAgent.match(/Chrome|Chromium/i);function Ki(t,e,r,i){const a=new Blob([e],{type:r});if(navigator.msSaveBlob)return void navigator.msSaveBlob(a,t);const s="image/png;"===r?e:URL.createObjectURL(a),n=document.createElement("a");if(void 0!==n.download)return n.setAttribute("href",s),n.setAttribute("download",t),n.style.visibility="hidden",document.body.appendChild(n),n.click(),void document.body?.removeChild?.(n);if(i)if("image/png;"===r)i.document.write(`<iframe src="${s}" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>`);else{const t=e.split("\n");for(let e=0;e<t.length;e++)i.document.write(`${t[e]}<br/>`)}}function Qi(t){return t.getTime()/1e3-60*t.getTimezoneOffset()|0}function Yi(t){return new Date(1e3*t).toISOString().substring(0,19)}function Xi(t){const e=t/1e3;if(e<=0)return null;const r=t=>`0${t}`.slice(-2),i=r(Math.trunc(e%60)),a=r(Math.trunc(e/60%60));let s=Math.trunc(e/3600%24);return s=s?`${s}:`:"",`${s}${a}:${i}`}function Zi(t,e=t=>t){const r=[],i={...t,data:r};if(t.hasSubcategory){for(const i of t.data)if("data"in i){const t=[],a={...i,data:t};for(const r of i.data)t.push(e(r));r.push(a)}}else for(const i of t.data)r.push(e(i));return i}Object.freeze({GREEN:"#4bb4b3",ORANGE:"#ff6444"});const Ji=Object.freeze({UP:"UP",DOWN:"DOWN"}),ta={doubleExponential:"DEMA",exponential:"EMA",hull:"HMA",simple:"MA",timeSeries:"TSMA",triangular:"TMA",tripleExponential:"TEMA",variable:"VMA",weighted:"WMA",wellesWilder:"SMMA",zeroLag:"ZMA"},ea={open:"O",high:"H",close:"C",low:"L","Hl/2":"Hl/2","HlC/3":"Hlc/3","HlCC/4":"Hlcc/4","OHlC/4":"Ohlc/4"},ra=(t,e=[])=>{const r=e.filter(t=>["movingAverageType","maType","fieldType"].includes(t.path||"")||["number","switch"].includes(t.type)).map(t=>"movingAverageType"===t.path||"maType"===t.path?ta[t.value]:"fieldType"===t.path?ea[t.value]:"switch"===t.type?t.value?"Y":"N":t.value||t.defaultValue).join(",")||void 0;return{name:(i=t.replace(`(${r})`,"").replace("-"," "),(i.charAt(0).toUpperCase()+i.slice(1)).replace(/([a-z](?=[A-Z]))/g,"$1 ")).trim(),bars:r};var i},ia=(t,e)=>{if(t.length>e){let r=t;const i=Math.floor(t.length/e);for(let t=1;t<=i;t++)r=`${r.slice(0,e*t)} ${r.slice(e*t,r.length)}`;return r}return t},aa=(t,e,r)=>(t=t??0)*(1-r)+(e=e??0)*r,sa=(t,e)=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return"light"===e&&"#FFFFFF"===t?"#000000":"dark"===e&&"#000000"===t?"#FFFFFF":t;if(oa(t)){const r=t;Object.keys(t).forEach(t=>{r[t]=sa(r[t],e)})}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=sa(t[r],e);return t},na=t=>{let e;if(null==t||"object"!=typeof t)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let r=0,i=t.length;r<i;r++)e[r]=na(t[r]);return e}if(t instanceof Object){e={};for(const r in t)t.hasOwnProperty(r)&&(e[r]=na(t[r]));return e}throw t},oa=function(t){return!!t&&t.constructor===Object};function la(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ca{set zIndex(t){this._line&&t&&(this._line.style.zIndex=t.toString())}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){la(this,"__top",0),la(this,"_emitter",void 0),la(this,"_line",void 0),la(this,"_priceConstrainer",0),la(this,"_startDragPrice","0"),la(this,"className",void 0),la(this,"hideBarrierLine",void 0),la(this,"hideOffscreenLine",void 0),la(this,"mainStore",void 0),la(this,"opacityOnOverlap",0),la(this,"showOffscreenArrows",!1),la(this,"_relative",!1),la(this,"draggable",!0),la(this,"isDragging",!1),la(this,"visible",!0),la(this,"_price","0"),la(this,"_dragPrice","0"),la(this,"offScreen",!1),la(this,"title",void 0),la(this,"isOverlapping",!1),la(this,"isOverlappingWithPriceLine",!1),la(this,"offScreenDirection",null),la(this,"disposeDrawReaction",void 0),la(this,"onChartLoaded",()=>{this.disposeDrawReaction=qe(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds,this.mainStore.chart.lastQuote],()=>{this.isDragging||this._draw()}),this.mainStore.chartAdapter.painter.registerCallback(this.drawBarrier)}),la(this,"init",()=>{const t=(t,e)=>{this.visible&&this.draggable&&e.call(this,t)},e=document.querySelector(".ciq-chart-area");this._line&&e&&((t,e,{onDragStart:r,onDrag:i,onDragReleased:a})=>{t.addEventListener("mousedown",function(t){window.addEventListener("mousemove",n),e.addEventListener("mouseup",o),s=!0,r?.(t)});let s=!1;function n(t){s&&i?.(t)}function o(t){s=!1,a?.(t),window.removeEventListener("mousemove",n),e.removeEventListener("mouseup",o)}})(this._line,e,{onDragStart:e=>t(e,this._startDrag),onDrag:r=>t(r,t=>this._dragLine(t,e)),onDragReleased:e=>t(e,this._endDrag)})}),la(this,"_startDrag",()=>{this.isDragging=!0,this.mainStore.chart.isBarrierDragging=!0,this.dragPrice=this.price,this._startDragPrice=this._price}),la(this,"_dragLine",(t,e)=>{if(!this._line)return;const{top:r}=e.getBoundingClientRect(),i=t.pageY-r,a=i&&i+2;let s=a&&this._priceFromLocation(a);"function"==typeof this._priceConstrainer&&(s=this._priceConstrainer(s)),this.relative&&(s-=this.mainStore.chart.currentClose),this.dragPrice=`${s}`}),la(this,"_endDrag",()=>{this.isDragging=!1,this.mainStore.chart.isBarrierDragging=!1,Number(this._startDragPrice).toFixed(this.pip)!==Number(this.dragPrice).toFixed(this.pip)&&(this.price=this.dragPrice,this._emitter.emit(ca.EVENT_DRAG_RELEASED,this._price))}),la(this,"_calculateTop",t=>{if(null===this.mainStore.chart.currentCloseQuote()||!this.mainStore.chartAdapter.isChartLoaded)return;let e=this._locationFromPrice(t||+this.realPrice);const r=window.flutterChartElement?.clientHeight||0;return e<0?(e<-2&&(this.offScreenDirection=Ji.UP),e=0):e+4>r?(e+4-r>2&&(this.offScreenDirection=Ji.DOWN),e=r-4):this.offScreenDirection=null,this.offScreen=!!this.offScreenDirection,e+30>r?e=r-30:e<10&&(e=10),this.offScreenDirection&&this.showOffscreenArrows&&(e+=this.offScreenDirection===Ji.UP?41:-41),this.opacityOnOverlap&&(this.isOverlapping=this.overlapCheck(e)),this.isOverlappingWithPriceLine=this._distanceFromCurrentPrice()<25,0|Math.round(e)}),la(this,"_draw",()=>{this.visible&&this._line&&(this.top=this._calculateTop())}),br(this,{_dragPrice:Mt,_price:Mt,draggable:Mt,isDragging:Mt,isOverlapping:Mt,isOverlappingWithPriceLine:Mt,offScreen:Mt,offScreenDirection:Mt,title:Mt,visible:Mt,overlappedBarrierWidth:Vt,pip:Vt,priceDisplay:Vt,_calculateTop:Be.bound,_dragLine:Be.bound,_endDrag:Be.bound,_startDrag:Be.bound,drawBarrier:Be.bound,setDragLine:Be.bound}),this.mainStore=t,this._emitter=new(Fi())({emitDelay:0}),cr(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded)}drawBarrier(t){if(this.isDragging)return;const e=this.mainStore.chart.feed?.quotes;if(!e||e.length<2)return;const r=this._getPrice(e[e.length-1].Close),i=this._getPrice(e[e.length-2].Close),a=aa(i,r,t);this.top=this._calculateTop(a)}destructor(){this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this.drawBarrier)}static get EVENT_PRICE_CHANGED(){return"EVENT_PRICE_CHANGED"}static get EVENT_DRAG_RELEASED(){return"EVENT_DRAG_RELEASED"}get priceDisplay(){let t=this.isDragging?Number(this.dragPrice).toFixed(this.pip):this._price;return this.relative&&+this._price>0&&"+"!==t[0]&&(t=`+${t}`),t}get price(){return this._price}set price(t){t===this._price||this.isDragging||(this._price=t,this._draw(),this._emitter.emit(ca.EVENT_PRICE_CHANGED,this._price))}get dragPrice(){return this._dragPrice}set dragPrice(t){t!=this._dragPrice&&(this._dragPrice=t,this._draw(),this._emitter.emit(ca.EVENT_PRICE_CHANGED,this._dragPrice))}get relative(){return this._relative}set relative(t){if(this._relative===t)return;this._relative=t;const e=this.mainStore.chart.currentCloseQuote();let r=e?e.Close:0;this._relative&&(r=-r),this.price=(+this._price+r).toString()}get context(){return this.mainStore.chart.context}set priceConstrainer(t){this._priceConstrainer=t}get realPrice(){return this._getPrice(this.mainStore.chart.currentCloseQuote()?.Close).toString()}get priceLineWidth(){return window.flutterChart?.app.getCurrentTickWidth()||60}get overlappedBarrierWidth(){return 16}_getPrice(t){const e=this.isDragging?this.dragPrice:this.price;return this.relative?t+Number(e):Number(e)}setDragLine(t){this._line=t,this._line&&this._draw()}_locationFromPrice(t){return this.mainStore.chartAdapter.getYFromQuote(t)}_priceFromLocation(t){return this.mainStore.chartAdapter.getQuoteFromY(t)}_distanceFromCurrentPrice(){return Math.abs(this._locationFromPrice(+this.realPrice)-this._locationFromPrice(+this.realPrice-(this.isDragging?+this._dragPrice:+this._price)))}set top(t){this.__top=t,this._line&&(this._line.style.transform=`translateY(${this.top-13}px)`)}get top(){return this.__top}onPriceChanged(t){this._emitter.on(ca.EVENT_PRICE_CHANGED,t)}onDragReleased(t){this._emitter.on(ca.EVENT_DRAG_RELEASED,t)}overlapCheck(t){const{_barriers:e}=this.mainStore.chart,r=e.filter(t=>0!==+t._high_barrier.price),i=r.findIndex(t=>t._high_barrier===this);for(let e=0;e<r.length;e++){if(e===i)continue;const a=r[e],s=a._high_barrier.top&&Math.abs(a._high_barrier.top-t);if(s&&s<25)return!0}return!1}get isMobile(){return this.mainStore.chart.isMobile}}function ha(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ua{constructor(t){ha(this,"_div",null),ha(this,"className",""),ha(this,"visible",!1),ha(this,"setPosition",({top:t,bottom:e,right:r})=>{if(this._div){let i=null;e&&t?i=`translate(${-r}px, ${(e+t)/2+60}px) scale(1, ${(e-t)/120})`:e?i=`translate(${-r}px, ${e}px)`:t&&(i=`translate(${-r}px, ${t+120}px)`),this._div.style.transform=i}}),ha(this,"setShadeRef",t=>{this._div=t}),br(this,{className:Mt,visible:Mt}),this.className=t}}function da(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class pa{static get SHADE_NONE_SINGLE(){return"SHADE_NONE_SINGLE"}static get SHADE_NONE_DOUBLE(){return"SHADE_NONE_DOUBLE"}static get SHADE_ABOVE(){return"SHADE_ABOVE"}static get SHADE_BELOW(){return"SHADE_BELOW"}static get SHADE_BETWEEN(){return"SHADE_BETWEEN"}static get SHADE_OUTSIDE(){return"SHADE_OUTSIDE"}static get BARRIER_CHANGED(){return"BARRIER_CHANGED"}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){da(this,"_high_barrier",void 0),da(this,"_low_barrier",void 0),da(this,"aboveShadeStore",void 0),da(this,"belowShadeStore",void 0),da(this,"betweenShadeStore",void 0),da(this,"mainStore",void 0),da(this,"title",void 0),da(this,"shadeColor",void 0),da(this,"color",void 0),da(this,"foregroundColor",void 0),da(this,"backgroundColor",void 0),da(this,"isBetweenShadeVisible",!1),da(this,"isTopShadeVisible",!1),da(this,"isBottomShadeVisible",!1),da(this,"hidePriceLines",!1),da(this,"lineStyle",void 0),da(this,"isInitialized",!1),da(this,"initializePromise",Bi()),da(this,"hideBarrierLine",!1),da(this,"hideOffscreenLine",!1),da(this,"hideOffscreenBarrier",!1),da(this,"isSingleBarrier",!1),da(this,"_shadeState",""),da(this,"disposeDrawReaction",void 0),da(this,"onChartLoaded",()=>{this.init(),this.disposeDrawReaction=qe(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds],this._drawShadedArea),this.mainStore.chartAdapter.painter.registerCallback(this._drawShadedArea)}),da(this,"_onBarrierChange",null),da(this,"_fireOnBarrierChange",()=>{const t=this._high_barrier.visible?Number(this._high_barrier.price).toFixed(this.pip):void 0,e=this._low_barrier.visible?Number(this._low_barrier.price).toFixed(this.pip):void 0;"function"==typeof this._onBarrierChange&&this._onBarrierChange({high:t,low:e})}),da(this,"_drawShadedArea",()=>{if(this.isInitialized&&(this._shadeState===pa.SHADE_ABOVE?this._shadeAbove():this._shadeState===pa.SHADE_BELOW?this._shadeBelow():this._shadeState===pa.SHADE_BETWEEN?this._shadeBetween():this._shadeState===pa.SHADE_OUTSIDE&&this._shadeOutside(),this._low_barrier.visible&&this._isBarriersOffScreen())){const t=0===this._high_barrier.top?null:101;this._high_barrier.zIndex=t}}),br(this,{backgroundColor:Mt,color:Mt,destructor:Be.bound,foregroundColor:Mt,hideBarrierLine:Mt,hideOffscreenBarrier:Mt,hideOffscreenLine:Mt,hidePriceLines:Mt,init:Be.bound,initializePromise:Mt,isBetweenShadeVisible:Mt,isBottomShadeVisible:Mt,isInitialized:Mt,isSingleBarrier:Mt,isTopShadeVisible:Mt,lineStyle:Mt,pip:Vt,shadeColor:Mt,updateProps:Be.bound}),this.mainStore=t,this._high_barrier=new ca(this.mainStore),this._low_barrier=new ca(this.mainStore),this._high_barrier.onPriceChanged(this._drawShadedArea),this._low_barrier.onPriceChanged(this._drawShadedArea),this._high_barrier.onDragReleased(this._fireOnBarrierChange),this._low_barrier.onDragReleased(this._fireOnBarrierChange),this._setupConstrainBarrierPrices(),this.aboveShadeStore=new ua("top-shade"),this.betweenShadeStore=new ua("between-shade"),this.belowShadeStore=new ua("bottom-shade"),this.shadeState=pa.SHADE_NONE_SINGLE,cr(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded),this.mainStore.chart._barriers.push(this)}init(){this.isInitialized=!0,this.initializePromise.resolve()}updateProps({color:t,foregroundColor:e,backgroundColor:r,shadeColor:i,shade:a,high:s,low:n,relative:o,draggable:l,onChange:c,hideBarrierLine:h,hideOffscreenBarrier:u,hideOffscreenLine:d,hidePriceLines:g,lineStyle:p,title:m,showOffscreenArrows:f,isSingleBarrier:_,opacityOnOverlap:v}){this.initializePromise.then(Be(()=>{if(t&&(this.color=t),e&&(this.foregroundColor=e),void 0!==r&&(this.backgroundColor=r),i&&(this.shadeColor=i),a&&(this.shadeState=`SHADE_${a}`.toUpperCase()),void 0!==o&&(this.relative=o),void 0!==l&&(this.draggable=l),void 0!==s){const t=qi(s,this.pip);t!==this.high_barrier&&(this.high_barrier=t)}if(void 0!==n){const t=qi(n,this.pip);t!==this.low_barrier&&(this.low_barrier=t)}c&&(this.onBarrierChange=c),m&&(this.title=m),this.lineStyle=p,this.hideBarrierLine=!!h,this.hidePriceLines=!!g,this.hideOffscreenLine=!!d,this.hideOffscreenBarrier=!!u,this.isSingleBarrier=!!_})),v&&(this.opacityOnOverlap=v),f&&(this.showOffscreenArrows=f)}destructor(){if(!this.context)return;this._high_barrier.destructor(),this._low_barrier.destructor(),this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this._drawShadedArea);const t=this.mainStore.chart._barriers.findIndex(t=>t===this);-1!==t&&this.mainStore.chart._barriers.splice(t,1)}get high_barrier(){return this._high_barrier.price}set high_barrier(t){this._high_barrier.price=t}get low_barrier(){return this._low_barrier.price}set low_barrier(t){this._low_barrier.price=t}_setupConstrainBarrierPrices(){this._high_barrier.priceConstrainer=t=>+(this._low_barrier.visible&&t<+this._low_barrier.realPrice?this._high_barrier.realPrice:t),this._low_barrier.priceConstrainer=t=>+(t>+this._high_barrier.realPrice?this._low_barrier.realPrice:t)}get context(){return this.mainStore.chart.context}set onBarrierChange(t){this._onBarrierChange!==t&&(this._onBarrierChange=t)}get shadeState(){return this._shadeState}set shadeState(t){if(this._shadeState===t)return;if(this._shadeState=t,this._shadeState===pa.SHADE_NONE_SINGLE||this._shadeState===pa.SHADE_NONE_DOUBLE)this.aboveShadeStore.visible=!1,this.betweenShadeStore.visible=!1,this.belowShadeStore.visible=!1;else{const t=this._shadeState===pa.SHADE_ABOVE||this._shadeState===pa.SHADE_OUTSIDE,e=this._shadeState===pa.SHADE_BELOW||this._shadeState===pa.SHADE_OUTSIDE,r=this._shadeState===pa.SHADE_BETWEEN;this.aboveShadeStore.visible=t,this.betweenShadeStore.visible=r,this.belowShadeStore.visible=e,this._drawShadedArea()}const e=this._shadeState===pa.SHADE_OUTSIDE||this._shadeState===pa.SHADE_BETWEEN||this._shadeState===pa.SHADE_NONE_DOUBLE,r=this._low_barrier.visible;this._low_barrier.visible=e,this.isInitialized&&e&&!r&&this._low_barrier.realPrice>=this._high_barrier.realPrice&&this.mainStore.chart.currentClose&&(this._low_barrier.price=(+this._high_barrier.price-this.mainStore.chart.currentClose).toString())}get relative(){return this._high_barrier.relative}set relative(t){this._high_barrier.relative=t,this._low_barrier.relative=t}get draggable(){return this._high_barrier.draggable}set draggable(t){this._high_barrier.draggable=t,this._low_barrier.draggable=t}get showOffscreenArrows(){return this._high_barrier.showOffscreenArrows}set showOffscreenArrows(t){this._high_barrier.showOffscreenArrows=t}get opacityOnOverlap(){return this._high_barrier.opacityOnOverlap}set opacityOnOverlap(t){this._high_barrier.opacityOnOverlap=t}_isBarriersOffScreen(){return this._high_barrier.offScreen&&this._low_barrier.offScreen}_shadeBetween(){this.betweenShadeStore.setPosition({top:this._high_barrier.top,bottom:this._low_barrier.top,right:this.mainStore.chart.yAxisWidth})}_shadeBelow(t=this._high_barrier){this.belowShadeStore.setPosition({top:t.top,bottom:0,right:this.mainStore.chart.yAxisWidth})}_shadeAbove(t=this._high_barrier){this.aboveShadeStore.setPosition({top:0,bottom:t.top,right:this.mainStore.chart.yAxisWidth})}_shadeOutside(){this._shadeAbove(this._high_barrier),this._shadeBelow(this._low_barrier)}}function ma(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class fa{get context(){return this.mainStore.chart.context}get state(){return this.mainStore.state}constructor(t){ma(this,"mainStore",void 0),ma(this,"bottom",30),ma(this,"isReadyToShow",!1),ma(this,"mainChartHeight",0),ma(this,"totalHeight",0),ma(this,"initial",()=>{this.isReadyToShow=!0}),ma(this,"updateChartHeight",async()=>{setTimeout(()=>{if(!this.mainStore.chart.chartContainerHeight)return;const t=this.mainStore.chartAdapter,{bottomQuote:e}=t.quoteBounds,r=t.getYFromQuote(e),i=this.mainStore.chart.chartContainerHeight-r;this.bottom=this.mainStore.chartAdapter.isFeedLoaded&&i>80?i:30},300)}),br(this,{bottom:Mt,isReadyToShow:Mt,mainChartHeight:Mt,totalHeight:Mt,updateChartHeight:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.initial)}}h(7951);var _a=h(7739),va=h.n(_a),ba=h(2979),ya=h.n(ba),Sa=h(6057),xa=h.n(Sa),wa=h(9955),Ca=h.n(wa),Ta=h(242),ka=h.n(Ta),ja=h(267),Aa=h.n(ja),Oa=h(4542),Ea=h.n(Oa),Na=h(363),Ia=h.n(Na),Pa=h(1811),Da=h.n(Pa),La=h(5439),Ma=h.n(La),Ba=h(6240),Ra=h.n(Ba),Fa=h(1337),Va=h.n(Fa),Ha=h(5829),Ua=h.n(Ha),qa=h(4619),za=h.n(qa),$a=h(2910),Ga=h.n($a),Wa=h(7420),Ka=h.n(Wa),Qa=h(7885),Ya=h.n(Qa),Xa=h(9185),Za=h.n(Xa),Ja=h(9289),ts=h.n(Ja),es=h(204),rs=h.n(es),is=h(3365),as=h.n(is),ss=h(3031),ns=h.n(ss),os=h(9324),ls=h.n(os),cs=h(9625),hs=h.n(cs),us=h(5833),ds=h.n(us),gs=h(7463),ps=h.n(gs),ms=h(3211),fs=h.n(ms),_s=h(9707),vs=h.n(_s),bs=h(4629),ys=h.n(bs),Ss=h(6331),xs=h.n(Ss),ws=h(1891),Cs=h.n(ws),Ts=h(8983),ks=h.n(Ts),js=h(8093),As=h.n(js),Os=h(8927),Es=h.n(Os),Ns=h(6667),Is=h.n(Ns),Ps=h(1278),Ds=h.n(Ps),Ls=h(1288),Ms=h.n(Ls),Bs=h(8310),Rs=h.n(Bs),Fs=h(7528),Vs=h.n(Fs),Hs=h(2999),Us=h.n(Hs),qs=h(6456),zs=h.n(qs),$s=h(3522),Gs=h.n($s),Ws=h(6380),Ks=h.n(Ws),Qs=h(9317),Ys=h.n(Qs),Xs=h(6800),Zs=h.n(Xs),Js=h(4333),tn=h.n(Js),en=h(9411),rn=h.n(en),an=h(9307),sn=h.n(an),nn=h(4674),on=h.n(nn),ln=h(6432),cn=h.n(ln),hn=h(2327),un=h.n(hn),dn=h(6183),gn=h.n(dn),pn=h(4497),mn=h.n(pn),fn=h(4325),_n=h.n(fn),vn=h(1320),bn=h.n(vn),yn=h(8250),Sn=h.n(yn),xn=h(1041),wn=h.n(xn),Cn=h(3293),Tn=h.n(Cn),kn=h(3775),jn=h.n(kn),An=h(1561),On=h.n(An),En=h(1610),Nn=h.n(En),In=h(9429),Pn=h.n(In),Dn=h(8584),Ln=h.n(Dn),Mn=h(7521),Bn=h.n(Mn),Rn=h(4185),Fn=h.n(Rn),Vn=h(6776),Hn=h.n(Vn),Un=h(9129),qn=h.n(Un),zn=h(7249),$n=h.n(zn),Gn=h(9607),Wn=h.n(Gn),Kn=h(9564),Qn=h.n(Kn),Yn=h(4431),Xn=h.n(Yn),Zn=h(263),Jn=h.n(Zn),to=h(301),eo=h.n(to),ro=h(7414),io=h.n(ro),ao=h(3578),so=h.n(ao),no=h(3255),oo=h.n(no),lo=h(7625),co=h.n(lo),ho=h(3719),uo=h.n(ho),go=h(1445),po=h.n(go),mo=h(4056),fo=h.n(mo),_o=h(1477),vo=h.n(_o),bo=h(3332),yo=h.n(bo),So=h(6902),xo=h.n(So),wo=h(9702),Co=h.n(wo),To=h(1649),ko=h.n(To),jo=h(1229),Ao=h.n(jo),Oo=h(2607),Eo=h.n(Oo),No=h(7558),Io=h.n(No),Po=h(8901),Do=h.n(Po),Lo=h(5407),Mo=h.n(Lo),Bo=h(4236),Ro=h.n(Bo),Fo=h(1795),Vo=h.n(Fo),Ho=h(7428),Uo=h.n(Ho),qo=h(8217),zo=h.n(qo),$o=h(7038),Go=h.n($o),Wo=h(1069),Ko=h.n(Wo),Qo=h(1089),Yo=h.n(Qo),Xo=h(6226),Zo=h.n(Xo),Jo=h(5357),tl=h.n(Jo),el=h(451),rl=h.n(el),il=h(8457),al=h.n(il),sl=h(2620),nl=h.n(sl),ol=h(3179),ll=h.n(ol),cl=h(37),hl=h.n(cl),ul=h(7256),dl=h.n(ul),gl=h(5004),pl=h.n(gl),ml=h(5729),fl=h.n(ml),_l=h(9876),vl=h.n(_l),bl=h(3135),yl=h.n(bl),Sl=h(7451),xl=h.n(Sl),wl=h(9705),Cl=h.n(wl),Tl=h(3770),kl=h.n(Tl),jl=h(6681),Al=h.n(jl),Ol=h(3785),El=h.n(Ol),Nl=h(8341),Il=h.n(Nl),Pl=h(4298),Dl=h.n(Pl),Ll=h(638),Ml=h.n(Ll),Bl=h(194),Rl=h.n(Bl),Fl=h(718),Vl=h.n(Fl),Hl=h(3864),Ul=h.n(Hl),ql=h(2502),zl=h.n(ql),$l=h(6723),Gl=h.n($l),Wl=h(1449),Kl=h.n(Wl),Ql=h(9715),Yl=h.n(Ql),Xl=h(5704),Zl=h.n(Xl),Jl=h(4046),tc=h.n(Jl),ec=h(10),rc=h.n(ec),ic=h(1008),ac=h.n(ic),sc=h(3292),nc=h.n(sc),oc=h(4579),lc=h.n(oc),cc=h(7571),hc=h.n(cc),uc=h(6033),dc=h.n(uc),gc=h(2099),pc=h.n(gc),mc=h(6489),fc=h.n(mc),_c=h(2821),vc=h.n(_c),bc=h(7213),yc=h.n(bc),Sc=h(1553),xc=h.n(Sc),wc=h(1085),Cc=h.n(wc),Tc=h(3751),kc=h.n(Tc),jc=h(148),Ac=h.n(jc),Oc=h(3562),Ec=h.n(Oc),Nc=h(7358),Ic=h.n(Nc),Pc=h(3425),Dc=h.n(Pc),Lc=h(2188),Mc=h.n(Lc),Bc=h(2839),Rc=h.n(Bc),Fc=h(3010),Vc=h.n(Fc),Hc=h(5269),Uc=h.n(Hc),qc=h(3265),zc=h.n(qc),$c=h(2853),Gc=h.n($c),Wc=h(3257),Kc=h.n(Wc),Qc=h(2167),Yc=h.n(Qc),Xc=h(4005),Zc=h.n(Xc),Jc=h(6617),th=h.n(Jc),eh=h(2048),rh=h.n(eh),ih=h(8438),ah=h.n(ih),sh=h(7950),nh=h.n(sh),oh=h(2788),lh=h.n(oh),ch=h(7183),hh=h.n(ch),uh=h(3344),dh=h.n(uh),gh=h(3297),ph=h.n(gh),mh=h(2913),fh=h.n(mh),_h=h(4748),vh=h.n(_h),bh=h(2588),yh=h.n(bh),Sh=h(2049),xh=h.n(Sh),wh=h(4065),Ch=h.n(wh),Th=h(9671),kh=h.n(Th),jh=h(1071),Ah=h.n(jh),Oh=h(5187),Eh=h.n(Oh),Nh=h(7823),Ih=h.n(Nh),Ph=h(2405),Dh=h.n(Ph),Lh=h(8832),Mh=h.n(Lh),Bh=h(5317),Rh=h.n(Bh),Fh=h(6669),Vh=h.n(Fh),Hh=h(7764),Uh=h.n(Hh),qh=h(542),zh=h.n(qh),$h=h(3119),Gh=h.n($h),Wh=h(6552),Kh=h.n(Wh),Qh=h(5092),Yh=h.n(Qh),Xh=h(794),Zh=h.n(Xh),Jh=h(2092),tu=h.n(Jh),eu=h(3669),ru=h.n(eu),iu=h(3747),au=h.n(iu),su=h(6244),nu=h.n(su),ou=h(1345),lu=h.n(ou),cu=h(1593),hu=h.n(cu),uu=h(2532),du=h.n(uu),gu=h(5038),pu=h.n(gu),mu=h(1655),fu=h.n(mu),_u=h(9891),vu=h.n(_u),bu=h(8451),yu=h.n(bu),Su=h(6378),xu=h.n(Su),wu=h(963),Cu=h.n(wu),Tu=h(3893),ku=h.n(Tu),ju=h(9423),Au=h.n(ju),Ou=h(416),Eu=h.n(Ou),Nu=h(3273),Iu=h.n(Nu),Pu=h(8414),Du=h.n(Pu),Lu=h(1949),Mu=h.n(Lu),Bu=h(1722),Ru=h.n(Bu),Fu=h(135),Vu=h.n(Fu),Hu=h(3544),Uu=h.n(Hu),qu=h(6577),zu=h.n(qu),$u=h(5126),Gu=h.n($u),Wu=h(3235),Ku=h.n(Wu),Qu=h(5692),Yu=h.n(Qu),Xu=h(6583),Zu=h.n(Xu),Ju=h(7037),td=h.n(Ju),ed=h(4575),rd=h.n(ed),id=h(3800),ad=h.n(id),sd=h(1908),nd=h.n(sd),od=h(9149),ld=h.n(od),cd=h(1077),hd=h.n(cd),ud=h(155),dd=h.n(ud),gd=h(9424),pd=h.n(gd),md=h(9442),fd=h.n(md),_d=h(9080),vd=h.n(_d),bd=h(3417),yd=h.n(bd),Sd=h(7709),xd=h.n(Sd),wd=h(6661),Cd=h.n(wd),Td=h(1904),kd=h.n(Td),jd=h(1108),Ad=h.n(jd),Od=h(1270),Ed=h.n(Od),Nd=h(2421),Id=h.n(Nd),Pd=h(5976),Dd=h.n(Pd),Ld=h(3982),Md=h.n(Ld),Bd=h(1820),Rd=h.n(Bd),Fd=h(6537),Vd=h.n(Fd),Hd=h(5459),Ud=h.n(Hd),qd=h(5),zd=h.n(qd),$d=h(3821),Gd=h.n($d),Wd=h(8246),Kd=h.n(Wd),Qd=h(3163),Yd=h.n(Qd),Xd=h(9877),Zd=h.n(Xd),Jd=h(3576),tg=h.n(Jd),eg=h(6706),rg=h.n(eg),ig=h(7365),ag=h.n(ig),sg=h(4311),ng=h.n(sg),og=h(3385),lg=h.n(og),cg=h(7425),hg=h.n(cg),ug=h(1134),dg=h.n(ug),gg=h(2308),pg=h.n(gg),mg=h(5477),fg=h.n(mg),_g=h(7671);const vg=t=>e=>{let{className:r,"tooltip-title":i,...a}=e;r=`ic-icon ${r||""}`;const s=t.viewBox?.split(" ").slice(2)||[];return(0,_g.jsxs)("span",{className:r,"tooltip-title":i,...a,children:[(0,_g.jsx)("svg",{width:s[0],height:s[1],children:(0,_g.jsx)("use",{xlinkHref:h.p+t.url})}),i&&(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)("br",{}),(0,_g.jsx)("span",{className:"ic-subtitle",children:i})]})]})},bg=(vg(gn()),vg(Cu())),yg=vg(ku()),Sg=vg(mn()),xg=vg(Ds()),wg=vg(Tn()),Cg=(vg(va()),vg(ya()),vg(xa()),vg(Ca()),vg(ka()),vg(Aa()),vg(Ea()),vg(Da()),vg(Ia()),vg(Ma()),vg(Ra()),vg(Va()),vg(Ua()),vg(Ga()),vg(ts())),Tg=vg(Za()),kg=vg(rs()),jg=vg(as()),Ag=vg(ns()),Og=vg(ls()),Eg=(vg(hs()),vg(ds()),vg(ps())),Ng=vg(fs()),Ig=vg(vs()),Pg=(vg(ys()),vg(xs()),vg(Sn())),Dg=(vg(Cs()),vg(ks())),Lg=(vg(za()),vg(Ka())),Mg=vg(Ya()),Bg=(vg(As()),vg(wn())),Rg=(vg(Es()),vg(Is())),Fg=vg(tn()),Vg=(vg(rn()),vg(rn())),Hg=vg(sn()),Ug=vg(As()),qg=vg(_n()),zg=vg(bn()),$g=(vg(Pn()),vg(du())),Gg=(vg(on()),vg(cn()),vg(un())),Wg=vg(Ln()),Kg=vg(Bn()),Qg=vg(Fn()),Yg=vg(Hn()),Xg=vg(pu()),Zg=vg(fu()),Jg=vg(vu()),tp=vg(yu()),ep=vg(xu()),rp=vg(qn()),ip=vg($n()),ap=vg(Wn()),sp=vg(Qn()),np=vg(Xn()),op=vg(Jn()),lp=vg(eo()),cp=vg(io()),hp=vg(Zu()),up=vg(td()),dp=vg(rd()),gp=vg(ad()),pp=vg(nd()),mp=vg(ld()),fp=vg(hd()),_p=vg(dd()),vp=(vg(pd()),vg(fd())),bp=vg(vd()),yp=vg(yd()),Sp=vg(xd()),xp=vg(Cd()),wp=vg(kd()),Cp=vg(Ad()),Tp=vg(Ed()),kp=vg(Id()),jp=vg(Dd()),Ap=vg(Md()),Op=vg(Rd()),Ep=vg(Vd()),Np=vg(Ud()),Ip=vg(zd()),Pp=vg(Gd()),Dp=vg(Kd()),Lp=vg(Yd()),Mp=vg(Zd()),Bp=vg(Il()),Rp=vg(lu()),Fp=vg(hu()),Vp=vg(so()),Hp=vg(oo()),Up=(vg(tg()),vg(rg()),vg(ag()),vg(ng())),qp=vg(lg()),zp=(vg(hg()),vg(dg()),vg(pg()),vg(fg())),$p=(vg(Pn()),vg(Nn()),vg(jn()),vg(On()),vg(co())),Gp={active:vg(Ds()),commodities:vg(Rs()),cryptocurrency:vg(Ms()),favorite:vg(As()),forex:vg(Vs()),basket_index:vg(Us()),indices:vg(Gs()),stocks:vg(Ks()),volidx:vg(Zs()),synthetic_index:vg(Ys()),indicators:vg(Sn())},Wp={light:{normal:vg(Au()),active:vg(Eu())},dark:{normal:vg(Iu()),active:vg(Du())}},Kp={light:{normal:vg(Mu()),active:vg(Ru())},dark:{normal:vg(Vu()),active:vg(Uu())}},Qp={light:{normal:vg(zu()),active:vg(Gu())},dark:{normal:vg(Ku()),active:vg(Yu())}},Yp={AUD:vg(uo()),CAD:vg(po()),CHF:vg(fo()),EUR:vg(vo()),GBP:vg(yo()),JPY:vg(xo()),MXN:vg(Co()),NOK:vg(ko()),NZD:vg(Ao()),PLN:vg(Eo()),SEK:vg(Io()),USD:vg(Do()),XAU:vg(Mo()),HongKong:vg(vl()),Dutch:vg(xl()),German:vg(fl()),French:vg(yl()),Spanish:vg(Cl()),WallStreet:vg(kl())},Xp={USD:vg(Do()),GBP:vg(yo()),German:vg(fl()),French:vg(yl()),Russia:vg(Ro()),Arabic:vg(Vo()),Bangladesh:vg(Uo()),Cambodia:vg(zo()),Srilanka:vg(Go()),Mongolian:vg(Ko()),Kenya:vg(Yo()),Thailand:vg(Zo()),Turkey:vg(tl()),Indonesia:vg(rl()),Vietnam:vg(al()),Italy:vg(nl()),Korean:vg(ll()),Portugal:vg(hl()),Chinese:vg(dl()),ChineseTraditional:vg(pl()),Poland:vg(Eo()),Spanish:vg(Cl()),Uzbekistan:vg(Al())},Zp={SPC:Yp.USD,AS51:Yp.AUD,HSI:Yp.HongKong,N225:Yp.JPY,AEX:Yp.Dutch,FCHI:Yp.French,SSMI:Yp.CHF,GDAXI:Yp.German,frxBROUSD:vg(El()),frxXAUUSD:Bp,frxXPDUSD:Bp,frxXPTUSD:Bp,frxXAGUSD:Bp,R_10:vg(Dl()),R_25:vg(Ml()),R_50:vg(Rl()),R_75:vg(Vl()),R_100:vg(Ul()),"1HZ10V":vg(zl()),"1HZ25V":vg(Gl()),"1HZ50V":vg(Kl()),"1HZ75V":vg(Yl()),"1HZ100V":vg(Zl()),"1HZ150V":vg(tc()),"1HZ200V":vg(rc()),"1HZ250V":vg(ac()),"1HZ300V":vg(nc()),BOOM300N:vg(vc()),BOOM500:vg(yc()),BOOM600:vg(xc()),BOOM900:vg(Cc()),BOOM1000:vg(kc()),CRASH300N:vg(lc()),CRASH500:vg(hc()),CRASH600:vg(dc()),CRASH900:vg(pc()),CRASH1000:vg(fc()),RDBEAR:vg(Ac()),RDBULL:vg(Ec()),stpRNG:vg(Ic()),stpRNG2:vg(Dc()),stpRNG3:vg(Mc()),stpRNG4:vg(Rc()),stpRNG5:vg(Vc()),JD10:vg(Uc()),JD25:vg(zc()),JD50:vg(Gc()),JD75:vg(Kc()),JD100:vg(Yc()),JD150:vg(Zc()),JD200:vg(th()),cryBNBUSD:vg(rh()),cryBTCLTC:vg(ah()),cryIOTUSD:vg(nh()),cryNEOUSD:vg(lh()),cryOMGUSD:vg(hh()),cryTRXUSD:vg(dh()),cryBTCETH:vg(yh()),cryZECUSD:vg(vh()),cryXMRUSD:vg(fh()),cryXLMUSD:vg(ph()),cryDSHUSD:vg(xh()),cryETHUSD:vg(Ch()),cryBCHUSD:vg(kh()),cryLTCUSD:vg(Ah()),cryEOSUSD:vg(Eh()),cryXRPUSD:vg(Ih()),cryBTCUSD:vg(Dh()),OTC_AEX:vg(Gh()),OTC_FTSE:vg(Uh()),OTC_SX5E:vg(ru()),OTC_FCHI:vg(tu()),OTC_GDAXI:vg(Zh()),OTC_N225:vg(Kh()),OTC_SPC:vg(Mh()),OTC_DJI:vg(Vh()),OTC_NDX:vg(Rh()),OTC_SSMI:vg(zh()),OTC_HSI:vg(Yh()),OTC_AS51:vg(au())},Jp=(t,e,r)=>i=>{const{className:a,...s}=i;return(0,_g.jsxs)("span",{className:`${r} ${a}`,...s,children:[(0,_g.jsx)(t,{}),(0,_g.jsx)(e,{})]})};function tm(t,e){const r=Yp[t],i=Yp[e];Zp[`frx${t}${e}`]=Jp(r,i,"ic-frx")}vg(nu());const em=vg(zs());function rm(t){const e=Yp[t];Zp[`WLD${t}`]=Jp(em,e,"ic-wld")}rm("AUD"),rm("EUR"),rm("GBP"),rm("USD"),rm("XAU"),tm("AUD","JPY"),tm("AUD","USD"),tm("EUR","AUD"),tm("EUR","CHF"),tm("EUR","JPY"),tm("EUR","CAD"),tm("EUR","GBP"),tm("EUR","USD"),tm("GBP","AUD"),tm("GBP","JPY"),tm("GBP","USD"),tm("USD","CAD"),tm("USD","CHF"),tm("USD","JPY"),tm("AUD","CAD"),tm("AUD","CHF"),tm("AUD","NZD"),tm("AUD","PLN"),tm("EUR","NZD"),tm("GBP","CAD"),tm("GBP","CHF"),tm("GBP","NOK"),tm("GBP","NZD"),tm("GBP","PLN"),tm("NZD","JPY"),tm("NZD","USD"),tm("USD","MXN"),tm("USD","NOK"),tm("USD","PLN"),tm("USD","SEK");var im=h(9160).t;const am=()=>({horizontal:{id:"horizontal",text:im.translate("Horizontal line [num]"),icon:Up},line:{id:"line",text:im.translate("Trend line [num]"),icon:qp},vertical:{id:"vertical",text:im.translate("Vertical line [num]"),icon:zp}}),sm=()=>[{category:"momentum",name:im.translate("Momentum"),icon:hp,items:[{flutter_chart_id:"AwesomeOscillator",name:im.translate("Awesome Oscillator"),short_name:im.translate("Awesome"),description:im.translate("The Awesome Oscillator is an indicator used to measure market momentum. AO calculates the difference of a 34 Period and 5 Period Simple Moving Averages. The Simple Moving Averages that are used are not calculated using closing price but rather each bar's midpoints. AO is generally used to affirm trends or to anticipate possible reversals."),icon:fp,isPrediction:!0},{flutter_chart_id:"dpo",name:im.translate("Detrended Price Oscillator"),short_name:im.translate("Detrended"),description:im.translate("The Detrended Price Oscillator (DPO) helps to identify price cycles without the influence of short- and long-term trends. The DPO compares a simple moving average to a historical pricenear the middle of a specified period. It also shows the peaks and drops over that particular period, making it easier to predict buy points."),icon:_p},{flutter_chart_id:"macd",name:im.translate("MACD"),short_name:im.translate("MACD"),description:im.translate("MACD is a trading indicator used in technical analysis of stock prices. It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price."),icon:vp},{flutter_chart_id:"ROC",name:im.translate("Price Rate of Change"),short_name:im.translate("Price ROC"),description:im.translate("The Price Rate-of-Change (ROC) indicator displays the difference between the current price and the price x-time periods ago. The difference can be displayed in either points or as a percentage."),icon:bp},{flutter_chart_id:"RSI",name:im.translate("Relative Strength Index (RSI)"),short_name:im.translate("RSI"),description:im.translate("The Relative Strength Index (RSI) was published by J. Welles Wilder. The current price is normalized as a percentage between 0 and 100. The name of this oscillator is misleading because it does not compare the instrument relative to another instrument or set of instruments, but rather represents the current price relative to other recent prices within the selected lookback window length."),icon:yp},{flutter_chart_id:"StochasticOscillator",name:im.translate("Stochastic Oscillator"),short_name:im.translate("Stochastic"),description:im.translate("A technical momentum indicator that compares a security's closing price to its price range over a given time period. The oscillator's sensitivity to market movements can be reduced by adjusting the time period or by taking a moving average of the result."),icon:Sp,isPrediction:!0},{flutter_chart_id:"SMI",name:im.translate("Stochastic Momentum Index"),short_name:im.translate("Stch Mtm"),description:im.translate("The Stochastic Momentum Index (SMI) helps to identify overbought or oversold conditions in the market and to predict bearish or bullish trends. It calculates the distance between the current closing price and the median of the high/low range, and displays 2 lines on the chart: the first (known as %K) represents the price movement while the second (known as %D) is a moving average of the first line. If the closing price is higher than the median of the high/low range, the SMI returns a positive value. If the closing price is lower than the average price, a negative value is returned. Values above 40 indicate a bullish trend while values below -40 indicate a bearish trend."),icon:xp},{flutter_chart_id:"WilliamsR",name:im.translate("William's Percent Range"),short_name:im.translate("William's %R"),description:im.translate("Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period."),icon:wp,isPrediction:!0}]},{category:"trend",name:im.translate("Trend"),icon:up,items:[{flutter_chart_id:"Aroon",name:im.translate("Aroon"),short_name:im.translate("Aroon"),description:im.translate("Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low."),icon:Cp},{flutter_chart_id:"adx",name:im.translate("ADX/DMS"),short_name:im.translate("ADX"),description:im.translate("The Average Directional Movement Index index (ADX) was developed in 1978 by J. Welles Wilder as an indicator of trend strength in a series of prices of a financial instrument ADX will range between 0 and 100. Generally, ADX readings below 20 indicate trend weakness, and readings above 40 indicate trend strength."),icon:Tp,isPrediction:!0},{flutter_chart_id:"commodity_channel_index",name:im.translate("Commodity Channel Index"),short_name:im.translate("CCI"),description:im.translate("The Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions."),icon:kp,isPrediction:!0},{flutter_chart_id:"ichimoku",name:im.translate("Ichimoku Clouds"),short_name:im.translate("Ichimoku Clouds"),description:im.translate("The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals. Ichimoku Kinko Hyo translates into “one look equilibrium chart”."),icon:jp,isPrediction:!0},{flutter_chart_id:"ParabolicSAR",name:im.translate("Parabolic SAR"),short_name:im.translate("PSAR"),description:im.translate("The parabolic SAR is calculated almost independently for each trend in the price. When the price is in an uptrend, the SAR emerges below the price and converges upwards towards it. Similarly, on a downtrend, the SAR emerges above the price and converges downwards. At each step within a trend, the SAR is calculated one period in advance."),icon:Ap,isPrediction:!0},{flutter_chart_id:"zigzag",name:im.translate("Zig Zag"),short_name:im.translate("Zig Zag"),description:im.translate("Zig Zag helps to identify trend reversals and filters out relatively small price movements by determining the support and resistance levels of the market. It accepts a percentage of deviation as the input and displays a line if the price change is larger than the percentage of deviation. Zig Zag ignores any sideways movement and is useful to filter out “market noise”."),icon:Op,isPrediction:!0}]},{category:"volatility",name:im.translate("Volatility"),icon:gp,items:[{flutter_chart_id:"bollinger_bands",name:im.translate("Bollinger Bands"),short_name:im.translate("Bollinger Bands"),description:im.translate("Bollinger Bands can be used to measure the highness or lowness of the price relative to previous trades."),icon:Ep},{flutter_chart_id:"donchian_channel",name:im.translate("Donchian Channel"),short_name:im.translate("Donchian Channel"),description:im.translate("The Donchian Channel is an indicator used in market trading developed by Richard Donchian. It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen."),icon:Np,isPrediction:!0}]},{category:"moving-averages",name:im.translate("Moving averages"),icon:pp,items:[{flutter_chart_id:"moving_average",name:im.translate("Moving Average (MA)"),short_name:im.translate("MA"),description:im.translate("The Moving Average (MA) helps to identify the overall market trend by filtering out short-term price fluctuations. Using historical data, it calculates the average price over a specific period and plots a line on the chart. If the MA line moves upwards, it’s an indicator of an uptrend, a downtrend if it moves downwards. A buy signal occurs when the price moves above the MA line."),icon:Ip},{flutter_chart_id:"moving_envelope_average",name:im.translate("Moving Average Envelope"),short_name:im.translate("MA Env"),description:im.translate("The Moving Average Envelope (MAE) helps to identify strong price movement that indicates the start of a trend. The MAE creates a moving average line as well as 2 bands around it. In theory, when the market price touches the upper or lower bands, a trend reversal will occur, indicating a buy signal."),icon:Pp,isPrediction:!0},{flutter_chart_id:"rainbow",name:im.translate("Rainbow Moving Average"),short_name:im.translate("Rainbow MA"),description:im.translate("The Rainbow Moving Average (RMA) displays several moving average lines simultaneously. When the lines intersect, it’s an indicator of price reversal and the angle of the lines are helpful to predict the trend strength. The steeper the curve, the stronger the trend. When the price crosses the moving average lines from below, it signals an upward trend. When the price crosses the moving average lines from above, it signals a downward trend. The RMA is easier to use compared to using several different moving average indicators at once."),icon:Mp,isPrediction:!0}]},{category:"others",name:im.translate("Others"),icon:mp,items:[{flutter_chart_id:"alligator",name:im.translate("Alligator"),short_name:im.translate("Alligator"),description:im.translate("Bill Williams introduced the Alligator indicator in 1995. The Alligator is as much a metaphor as it is an indicator. It consists of three lines, overlaid on a pricing chart, that represent the jaw, the teeth and the lips of the beast, and was created to help the trader confirm the presence of a trend and its direction. The Alligator indicator can also help traders designate impulse and corrective wave formations, but the tool works best when combined with a momentum indicator."),icon:Dp,isPrediction:!0},{flutter_chart_id:"fcb",name:im.translate("Fractal Chaos Band"),short_name:im.translate("Fractal Chaos Band"),description:im.translate("Fractals are indicators on candlestick charts that identify reversal points in the market. Traders often use fractals to get an idea about the direction in which the price will develop. A fractal will form when a particular price pattern happens on a chart."),icon:Lp,isPrediction:!0}]}],nm={thickness:1,hasArea:!1},om=(na(nm),()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"enableLabel",title:im.translate("Axis Label"),type:"switch",category:"parameters",defaultValue:!0}]})),lm=()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),cm=()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillStyle",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),hm={vertical:om,line:lm,ray:lm,trend:cm,channel:cm,fibfan:cm,rectangle:cm,horizontal:om,continuous:lm},um=()=>({open:im.translate("Open"),high:im.translate("High"),low:im.translate("Low"),close:im.translate("Close"),"Hl/2":im.translate("Hl/2"),"HlC/3":im.translate("Hlc/3"),"HlCC/4":im.translate("Hlcc/4"),"OHlC/4":im.translate("Ohlc/4")}),dm=()=>({simple:im.translate("Simple"),exponential:im.translate("Exponential"),weighted:im.translate("Weighted"),hull:im.translate("Hull"),zeroLag:im.translate("Zero Lag"),timeSeries:im.translate("Time Series"),wellesWilder:im.translate("Welles Wilder"),variable:im.translate("Variable"),triangular:im.translate("Triangular"),doubleExponential:im.translate("2-Exponential"),tripleExponential:im.translate("3-Exponential")}),gm={RSI:()=>({config:{lineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pinLabels:!1,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),adx:()=>({config:{lineStyle:na(nm),positiveLineStyle:na(nm),negativeLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"positiveLineStyle.color",title:im.translate("+DI"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"negativeLineStyle.color",title:im.translate("-DI"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:im.translate("Positive Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Negative Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"smoothingPeriod",title:im.translate("Smoothing Period"),defaultValue:14,category:"inputs",type:"number"},{path:"showSeries",title:im.translate("Series"),type:"switch",category:"parameters",defaultValue:!0},{path:"showShading",title:im.translate("Shading"),type:"switch",category:"parameters",defaultValue:!1},{path:"showHistogram",title:im.translate("Histogram"),type:"switch",category:"parameters",defaultValue:!1}]}),AwesomeOscillator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"}]}),dpo:()=>({config:{lineStyle:na(nm),isCentered:!0,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"movingAverageType",title:im.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()}]}),gator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"jawPeriod",title:im.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:im.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:im.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:im.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:im.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:im.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"}]}),macd:()=>({config:{lineStyle:na(nm),signalLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"signalLineStyle.color",title:im.translate("Signal"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"fastMAPeriod",title:im.translate("Fast MA Period"),defaultValue:12,category:"inputs",type:"number"},{path:"slowMAPeriod",title:im.translate("Slow MA Period"),defaultValue:26,category:"inputs",type:"number"},{path:"signalPeriod",title:im.translate("Signal Period"),defaultValue:9,category:"inputs",type:"number"}]}),ROC:()=>({config:{lineStyle:na(nm),pipSize:4,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()}]}),StochasticOscillator:()=>({config:{lineStyle:{...na(nm),color:"#FFFFFF"},fastLineStyle:na(nm),slowLineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pinLabels:!1,overBoughtPrice:80,overSoldPrice:20,pipSize:2,showLastIndicator:!0},parameters:[{path:"fastLineStyle.color",title:im.translate("Fast"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"slowLineStyle.color",title:im.translate("Slow"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"isSmooth",title:im.translate("Smooth"),type:"switch",category:"parameters",defaultValue:!0},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),SMI:()=>({config:{lineStyle:na(nm),signalLineStyle:na(nm),pipSize:2,showLastIndicator:!0,smiOscillatorLimits:{overboughtStyle:{...na(nm),color:"#626b73"},oversoldStyle:{...na(nm),color:"#626b73"}}},parameters:[{path:"lineStyle.color",group_key:"%k",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",group_key:"%k",title:im.translate("Period"),defaultValue:10,category:"inputs",type:"number"},{path:"smoothingPeriod",group_key:"%k",title:im.translate("Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"doubleSmoothingPeriod",group_key:"%k",title:im.translate("Double Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"signalLineStyle.color",group_key:"%d",title:im.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"signalPeriod",group_key:"%d",title:im.translate("Signal Period"),defaultValue:10,category:"inputs",type:"number"},{path:"maType",group_key:"%d",title:im.translate("Field"),defaultValue:"exponential",category:"inputs",type:"select",options:dm()},{paths:{value:"smiOscillatorLimits.overboughtValue",color:"smiOscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:40,color:"#626b73"}},{paths:{value:"smiOscillatorLimits.oversoldValue",color:"smiOscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-40,color:"#626b73"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),WilliamsR:()=>({config:{lineStyle:na(nm),zeroHorizontalLinesStyle:{...na(nm),color:"0xFFF44336"},oscillatorLimits:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{paths:{value:"oscillatorLimits.overboughtValue",color:"oscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-20,color:"#000000"}},{paths:{value:"oscillatorLimits.oversoldValue",color:"oscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-80,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),Aroon:()=>({config:{upLineStyle:na(nm),downLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"upLineStyle.color",title:im.translate("Aroon Up"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"downLineStyle.color",title:im.translate("Aroon Down"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"}]}),commodity_channel_index:()=>({config:{lineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:100,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-100,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),ichimoku:()=>({config:{conversionLineStyle:na(nm),baseLineStyle:na(nm),spanALineStyle:na(nm),laggingLineStyle:na(nm),spanBLineStyle:na(nm),conversionLinePeriod:na(nm),showLastIndicator:!0},parameters:[{path:"conversionLineStyle.color",title:im.translate("Conversion Line"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"baseLineStyle.color",title:im.translate("Base Line"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"spanALineStyle.color",title:im.translate("Leading Span A"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"spanBLineStyle.color",title:im.translate("Leading Span B"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"laggingLineStyle.color",title:im.translate("Lagging Span"),defaultValue:"#808000",category:"inputs",type:"colorpicker"},{path:"conversionLinePeriod",title:im.translate("Conversion Line Period"),defaultValue:9,category:"inputs",type:"number"},{path:"baseLinePeriod",title:im.translate("Base Line Period"),defaultValue:26,category:"inputs",type:"number"},{path:"spanBPeriod",title:im.translate("Leading Span B Period"),defaultValue:52,category:"inputs",type:"number"},{path:"laggingSpanOffset",title:im.translate("Lagging Span Period"),defaultValue:-26,category:"inputs",type:"number",min:-100,max:0}]}),ParabolicSAR:()=>({config:{scatterStyle:{radius:1.5},showLastIndicator:!0},parameters:[{path:"scatterStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"minAccelerationFactor",title:im.translate("Minimum AF"),defaultValue:.02,category:"inputs",type:"number",step:.01},{path:"maxAccelerationFactor",title:im.translate("Maximum AF"),defaultValue:.2,category:"inputs",type:"number",step:.01}]}),zigzag:()=>({config:{lineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"distance",title:im.translate("Distance(%)"),defaultValue:10,category:"inputs",type:"number"}]}),bollinger_bands:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("Bollinger Bands Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("Bollinger Bands Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("Bollinger Bands Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"standardDeviation",title:im.translate("Standard Deviations"),defaultValue:2,category:"inputs",type:"number"},{path:"movingAverageType",title:im.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),donchian_channel:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("Donchian High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("Donchian Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("Donchian Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"highPeriod",title:im.translate("High Period"),defaultValue:20,category:"inputs",type:"number"},{path:"lowPeriod",title:im.translate("Low Period"),defaultValue:20,category:"inputs",type:"number"},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),moving_average:()=>({config:{lineStyle:na(nm),isOverlay:!0,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"movingAverageType",title:im.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"offset",title:im.translate("Offset"),defaultValue:0,category:"inputs",type:"number"}]}),moving_envelope_average:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("MA Env Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("MA Env Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("MA Env Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"shiftType",title:im.translate("Shift Type"),defaultValue:"percent",category:"inputs",type:"select",options:{percent:im.translate("Percent"),point:im.translate("Point")}},{path:"shift",title:im.translate("Shift"),defaultValue:5,category:"inputs",type:"number"},{path:"movingAverageType",title:im.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),rainbow:()=>({config:{bandsCount:10,movingAverageType:"simple",rainbowLineStyles:[],showLastIndicator:!0},parameters:[{path:"period",title:im.translate("Period"),defaultValue:2,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"rainbowLineStyles[0].color",title:im.translate("SMA1"),defaultValue:"#ff0000",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[1].color",title:im.translate("SMA2"),defaultValue:"#ff7f00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[2].color",title:im.translate("SMA3"),defaultValue:"#ffff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[3].color",title:im.translate("SMA4"),defaultValue:"#7fff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[4].color",title:im.translate("SMA5"),defaultValue:"#00ff7f",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[5].color",title:im.translate("SMA6"),defaultValue:"#00ffff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[6].color",title:im.translate("SMA7"),defaultValue:"#007fff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[7].color",title:im.translate("SMA8"),defaultValue:"#0000ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[8].color",title:im.translate("SMA9"),defaultValue:"#7f00ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[9].color",title:im.translate("SMA10"),defaultValue:"#ff00ff",category:"inputs",type:"colorpicker"}]}),alligator:()=>({config:{jawLineStyle:na(nm),teethLineStyle:na(nm),lipsLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"jawLineStyle.color",title:im.translate("Jaw"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"teethLineStyle.color",title:im.translate("Teeth"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lipsLineStyle.color",title:im.translate("Lips"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"showLines",title:im.translate("Show Lines"),type:"switch",category:"parameters",defaultValue:!0},{path:"jawPeriod",title:im.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:im.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:im.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:im.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:im.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:im.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"},{path:"showFractal",title:im.translate("Show Fractals"),type:"switch",category:"parameters",defaultValue:!1}]}),fcb:()=>({config:{highLineStyle:na(nm),lowLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"highLineStyle.color",title:im.translate("Fractal High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowLineStyle.color",title:im.translate("Fractal Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fractal Channel"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]})},pm=t=>gm[t](),mm=[{id:"line",text:im.translate("Area"),candleOnly:!1,icon:rp},{id:"candles",text:im.translate("Candle"),candleOnly:!0,icon:ip},{id:"hollow",text:im.translate("Hollow"),candleOnly:!0,icon:ap},{id:"ohlc",text:im.translate("OHLC"),candleOnly:!0,icon:sp}],fm=[{key:"tick",single:im.translate("tick"),items:[{interval:0,num:1}]},{key:"minute",single:im.translate("minute"),plural:im.translate("minutes"),items:[{interval:60,num:1},{interval:120,num:2},{interval:180,num:3},{interval:300,num:5},{interval:600,num:10},{interval:900,num:15},{interval:1800,num:30}]},{key:"hour",single:im.translate("hour"),plural:im.translate("hours"),items:[{interval:3600,num:1},{interval:7200,num:2},{interval:14400,num:4},{interval:28800,num:8}]},{key:"day",single:im.translate("day"),plural:im.translate("days"),items:[{interval:86400,num:1}]}],_m=[{key:"en",name:"English",icon:(0,_g.jsx)(Xp.GBP,{})},{key:"bn",name:"বাংলা",icon:(0,_g.jsx)(Xp.Bangladesh,{})},{key:"de",name:"Deutsch",icon:(0,_g.jsx)(Xp.German,{})},{key:"ar",name:"العربية",icon:(0,_g.jsx)(Xp.Arabic,{})},{key:"fr",name:"French",icon:(0,_g.jsx)(Xp.French,{})},{key:"mn",name:"Монгол",icon:(0,_g.jsx)(Xp.Mongolian,{})},{key:"ru",name:"Русский",icon:(0,_g.jsx)(Xp.Russia,{})},{key:"si",name:"සිංහල",icon:(0,_g.jsx)(Xp.Srilanka,{})},{key:"sw",name:"Kiswahili",icon:(0,_g.jsx)(Xp.Kenya,{})},{key:"th",name:"Thai",icon:(0,_g.jsx)(Xp.Thailand,{})},{key:"id",name:"Indonesia",icon:(0,_g.jsx)(Xp.Indonesia,{})},{key:"vi",name:"Tiếng Việt",icon:(0,_g.jsx)(Xp.Vietnam,{})},{key:"it",name:"Italiano",icon:(0,_g.jsx)(Xp.Italy,{})},{key:"km",name:"ខ្មែរ",icon:(0,_g.jsx)(Xp.Cambodia,{})},{key:"ko",name:"한국어",icon:(0,_g.jsx)(Xp.Korean,{})},{key:"pt",name:"Português",icon:(0,_g.jsx)(Xp.Portugal,{})},{key:"tr",name:"Türkçe",icon:(0,_g.jsx)(Xp.Turkey,{})},{key:"uz",name:"O'zbek",icon:(0,_g.jsx)(Xp.Uzbekistan,{})},{key:"zh_cn",name:"简体中文",icon:(0,_g.jsx)(Xp.Chinese,{})},{key:"pl",name:"Polish",icon:(0,_g.jsx)(Xp.Poland,{})},{key:"zh_tw",name:"繁體中文",icon:(0,_g.jsx)(Xp.ChineseTraditional,{})},{key:"es",name:"espanyol",icon:(0,_g.jsx)(Xp.Spanish,{})}],vm="INDICATOR_ADDED",bm="INDICATOR_DELETED",ym="INDICATOR_INFO_TOGGLE",Sm="SCROLL_TO_LEFT",xm="DRAWING_TOOLS_DELETE",wm={predictionIndicator:im.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more.")},Cm=t=>sm().find(e=>e.items.some(e=>e.flutter_chart_id===t))?.category.replace("-"," ")??"",Tm=Object.freeze({ChartTitle:"Chart Title",CategoricalDisplay:"Categorical Display",ChartControl:"Chart Control"}),km=Object.freeze({MarketSelector:"Market Selector",Favorite:"Favorite",ChartSetting:"Chart Setting",ChartSize:"Chart Size",ChartType:"Chart Type",Comparison:"Comparison",DrawTools:"Draw Tools",Download:"Download",Indicator:"Indicator",Interval:"Interval",Template:"Template"});function jm(t,e,r){window.isProductionWebsite&&window.ga&&ga("send","event",t,e,r)}const Am=new RegExp("\\d{17}"),Om=t=>{if(!t||t.getFullYear)return t;var e,r,i,a,s,n,o,l=[];if(12==t.length||14==t.length)return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,i=parseFloat(t.substring(6,8)),a=parseFloat(t.substring(8,10)),s=parseFloat(t.substring(10,12)),n=parseFloat(t.substring(12,14))||0,new Date(e,r,i,a,s,n,0);if(Am.test(t))return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,i=parseFloat(t.substring(6,8)),a=parseFloat(t.substring(8,10)),s=parseFloat(t.substring(10,12)),n=parseFloat(t.substring(12,14)),o=parseFloat(t.substring(14,17)),new Date(e,r,i,a,s,n,o);var c=[t],h=t.indexOf("T");if(-1!=h){var u=t.substring(h);if(-1!=u.indexOf("Z")||-1!=u.indexOf("-")||-1!=u.indexOf("+"))return new Date(t);c=t.split("T")}else-1!=t.indexOf(" ")&&(c=t.split(" "));if(-1!=c[0].indexOf("/"))l=c[0].split("/");else{if(-1==c[0].indexOf("-"))return Em(t);l=c[0].split("-")}var d=parseFloat(l[2]);if(l[0]&&4==l[0].length&&(d=parseFloat(l[0]),l[0]=l[1],l[1]=l[2]),c.length>1){var g=c[2];c=c[1].split(":"),g&&("12"==c[0]&&"AM"==g.toUpperCase()?c[0]=0:"12"!=c[0]&&"PM"==g.toUpperCase()&&(c[0]=parseInt(c[0],10)+12));var p=0,m=0;return 3==c.length&&(-1==c[2].indexOf(".")?p=parseInt(c[2],10):3==(p=c[2].split("."))[1].length&&(m=p[1],p=p[0])),new Date(d,l[0]-1,l[1],c[0],c[1],p,m)}return new Date(d,l[0]-1,l[1],0,0,0,0)},Em=t=>{var e;if(-1!=t.indexOf("/"))e=t.split("/");else{if(-1==t.indexOf("-"))return t.length>=8?new Date(parseFloat(t.substring(0,4)),parseFloat(t.substring(4,6))-1,parseFloat(t.substring(6,8))):new Date;e=t.split("-")}if(e.length<3)return new Date;-1!=e[2].indexOf(" ")?e[2]=e[2].substring(0,e[2].indexOf(" ")):-1!=e[2].indexOf("T")&&(e[2]=e[2].substring(0,e[2].indexOf("T")));var r=parseFloat(e[2]);return r<20&&(r+=2e3),4==e[0].length&&(r=parseFloat(e[0]),e[0]=e[1],e[1]=e[2]),new Date(r,e[0]-1,e[1])};function Nm(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Im{constructor(){Nm(this,"_api",void 0),Nm(this,"clientTimeAtRequest",void 0),Nm(this,"getTimeInterval",void 0),Nm(this,"onTimeUpdated",void 0),Nm(this,"serverTimeAtResponse",void 0),Nm(this,"updateTimeInterval",void 0),Nm(this,"clockStarted",!1),Nm(this,"clockStartedPromise",Bi()),Nm(this,"_timeResponse",t=>{if(!this.clockStarted)return void this.init();const e=t.time,r=Qi(new Date);e&&this.clientTimeAtRequest&&(this.serverTimeAtResponse=e+(r-this.clientTimeAtRequest)/2),this.updateTimeInterval&&clearInterval(this.updateTimeInterval),this.updateTimeInterval=setInterval(()=>{this.serverTimeAtResponse&&(this.serverTimeAtResponse+=1),"function"==typeof this.onTimeUpdated&&this.onTimeUpdated()},1e3)})}async init(t,e){if(this._api=t,this.onTimeUpdated=e,this.clockStarted)return this.clockStartedPromise;this.clockStarted=!0,this.getTimeInterval&&clearInterval(this.getTimeInterval),await this.requestTime(),this.getTimeInterval=setInterval(this.requestTime.bind(this),3e4)}async requestTime(){this.clientTimeAtRequest=Qi(new Date),this._timeResponse({time:Math.floor((new Date).getTime()/1e3)}),this.clockStartedPromise.resolve()}getEpoch(){return this.serverTimeAtResponse?this.serverTimeAtResponse:Qi(new Date)}getLocalDate(){return t=this.getEpoch(),new Date(1e3*t);var t}getUTCDate(){return Om(Yi(this.getEpoch()))}static getInstance(){return this._instance||(this._instance=new Im),this._instance}}Nm(Im,"_instance",void 0);const Pm=Im,Dm=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Lm="object"==typeof global&&global&&global.Object===Object&&global;var Mm="object"==typeof self&&self&&self.Object===Object&&self;const Bm=Lm||Mm||Function("return this")(),Rm=function(){return Bm.Date.now()};var Fm=/\s/;var Vm=/^\s+/;const Hm=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Fm.test(t.charAt(e)););return e}(t)+1).replace(Vm,""):t},Um=Bm.Symbol;var qm=Object.prototype,zm=qm.hasOwnProperty,$m=qm.toString,Gm=Um?Um.toStringTag:void 0;var Wm=Object.prototype.toString;var Km=Um?Um.toStringTag:void 0;const Qm=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Km&&Km in Object(t)?function(t){var e=zm.call(t,Gm),r=t[Gm];try{t[Gm]=void 0;var i=!0}catch(t){}var a=$m.call(t);return i&&(e?t[Gm]=r:delete t[Gm]),a}(t):function(t){return Wm.call(t)}(t)},Ym=function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==Qm(t)};var Xm=/^[-+]0x[0-9a-f]+$/i,Zm=/^0b[01]+$/i,Jm=/^0o[0-7]+$/i,tf=parseInt;const ef=function(t){if("number"==typeof t)return t;if(Ym(t))return NaN;if(Dm(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Dm(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Hm(t);var r=Zm.test(t);return r||Jm.test(t)?tf(t.slice(2),r?2:8):Xm.test(t)?NaN:+t};var rf=Math.max,af=Math.min;const sf=function(t,e,r){var i,a,s,n,o,l,c=0,h=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var r=i,s=a;return i=a=void 0,c=e,n=t.apply(s,r)}function p(t){var r=t-l;return void 0===l||r>=e||r<0||u&&t-c>=s}function m(){var t=Rm();if(p(t))return f(t);o=setTimeout(m,function(t){var r=e-(t-l);return u?af(r,s-(t-c)):r}(t))}function f(t){return o=void 0,d&&i?g(t):(i=a=void 0,n)}function _(){var t=Rm(),r=p(t);if(i=arguments,a=this,l=t,r){if(void 0===o)return function(t){return c=t,o=setTimeout(m,e),h?g(t):n}(l);if(u)return clearTimeout(o),o=setTimeout(m,e),g(l)}return void 0===o&&(o=setTimeout(m,e)),n}return e=ef(e)||0,Dm(r)&&(h=!!r.leading,s=(u="maxWait"in r)?rf(ef(r.maxWait)||0,e):s,d="trailing"in r?!!r.trailing:d),_.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=a=o=void 0},_.flush=function(){return void 0===o?n:f(Rm())},_};function nf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let of;class lf{constructor(t){nf(this,"mainStore",void 0),nf(this,"open",!1),nf(this,"onClose",()=>this.setOpen(!1)),nf(this,"outsideClickCallback",()=>this.setOpen(!1)),nf(this,"setOpen",sf(t=>{this.openDialog(t)},10,{leading:!0,trailing:!1})),nf(this,"handleClickOutside",t=>{let e=!1;"which"in t?e=3===t.which:"button"in t&&(e=2===t.button),t.isHandledByDialog||e||this.outsideClickCallback()}),nf(this,"closeOnEscape",t=>{27===t.keyCode&&this.onClose()}),br(this,{open:Mt,openDialog:Be.bound,register:Be.bound,unregister:Be.bound,onContainerClick:Be.bound,updateCloseCallback:Be.bound,updateOutsideClickCallback:Be.bound,outsideClickCallback:Mt}),this.mainStore=t,cr(()=>!!this.context,()=>{this.routingStore.registerDialog(this)})}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}openDialog(t){this.open!==t&&(this.open=t,this.open?setTimeout(this.register,100):this.unregister(),!0===t?(of&&of.openDialog(!1),of=this):of=void 0)}updateOutsideClickCallback(t){void 0!==t&&(this.outsideClickCallback=t)}register(){document.addEventListener("click",this.handleClickOutside,!1),document.addEventListener("keydown",this.closeOnEscape,!1)}unregister(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("keydown",this.closeOnEscape)}onContainerClick(t){t.nativeEvent.isHandledByDialog=!0}updateCloseCallback(t){void 0!==t&&(this.onClose=t)}}function cf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class hf{constructor(t,e){cf(this,"dialogStore",void 0),cf(this,"mainStore",void 0),cf(this,"dialogStatus",!1),cf(this,"route",""),br(this,{dialogStatus:Mt,route:Mt,open:Vt,setOpen:Be.bound,onTitleClick:Be.bound,handleDialogStatus:Be.bound,handleCloseDialog:Be.bound}),this.mainStore=t,this.dialogStore=new lf(t),qe(()=>this.open,()=>this.blurInput()),e&&e.route&&(this.route=e.route)}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}get open(){return this.dialogStore.open}setOpen(t){this.dialogStore.setOpen(t),this.routingStore.updateRoute(this.route,t)}blurInput(){setTimeout(this.handleDialogStatus,300)}onTitleClick(t){t&&t.stopPropagation(),this.setOpen(!this.open)}handleDialogStatus(){"indicators"===this.route&&this.open&&this.mainStore.state.stateChange("INDICATORS_MODAL_OPEN",{is_open:this.open}),"draw-tool"===this.route&&this.open&&this.mainStore.state.stateChange("DRAWING_TOOLS_MODAL_OPEN",{is_open:this.open}),"chart-title"===this.route&&this.open&&this.mainStore.state.stateChange("MARKET_MENU_MODAL_TOGGLE",{is_open:this.open}),"chart-mode"===this.route&&this.open&&this.mainStore.state.stateChange("CHART_MODE_MODAL_OPEN",{is_open:this.open}),this.dialogStatus=this.open}handleCloseDialog(){this.dialogStatus=!1,setTimeout(()=>this.setOpen(!1),300)}}function uf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class df{constructor({mainStore:t}){uf(this,"dialogPortalNodeId",void 0),uf(this,"mainStore",void 0),uf(this,"menuStore",void 0),uf(this,"scrollPanel",void 0),uf(this,"cancelCallback",void 0),br(this,{dialogPortalNodeId:Mt,open:Vt,cancelCallback:Mt,setOpen:Be.bound,setCancel:Be.bound,handleCancel:Be.bound,handleContinue:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"indicator-setting"})}get open(){return this.menuStore.open}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}handleCancel(){this.cancelCallback&&this.cancelCallback(),this.setOpen(!1),this.cancelCallback=null}setCancel(t){this.cancelCallback=t}handleContinue(){this.mainStore.timeperiod.setGranularity(0),this.mainStore.studies.deletePredictionStudies(),this.mainStore.studies.cleanupPredictionIndicator(),setTimeout(()=>{this.setOpen(!1)},100)}}function gf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const pf={tick:"T",minute:"M",hour:"H",day:"D"},mf={minute:60,hour:3600,day:86400};class ff{constructor(t){gf(this,"_serverTime",void 0),gf(this,"mainStore",void 0),gf(this,"portalNodeIdChanged",void 0),gf(this,"predictionIndicator",void 0),gf(this,"onGranularityChange",()=>null),gf(this,"remain",null),gf(this,"onDataInitialized",()=>{this.updateCountdown(),qe(()=>[this.timeUnit,this.mainStore.chartSetting.countdown,this.mainStore.chartType.type,this.loader.currentState,this.isSymbolOpen],this.updateCountdown.bind(this)),qe(()=>this.mainStore.state.granularity,t=>this.onGranularityChange(t))}),gf(this,"countdownInterval",void 0),gf(this,"remainLabelY",()=>{const t=this.mainStore.chart.currentClose;if(t)return this.mainStore.chartAdapter.getYFromQuote(t)}),br(this,{changeGranularity:Be.bound,portalNodeIdChanged:Mt,setGranularity:Be.bound,updateProps:Be.bound,updatePortalNode:Be.bound}),this.mainStore=t,this.predictionIndicator=new df({mainStore:t}),this._serverTime=Pm.getInstance(),cr(()=>this.mainStore.chartAdapter.isFeedLoaded,this.onDataInitialized)}get loader(){return this.mainStore.loader}get isTick(){return"tick"===this.timeUnit}get isSymbolOpen(){return this.mainStore.chartTitle.isSymbolOpen}get timeUnit(){return(t=>{if(void 0!==t)return 86400===t?"day":0===t?"tick":t>=60&&t<=1800?"minute":"hour"})(this.mainStore.chart.granularity)}get display(){return void 0===this.mainStore.chart.granularity?"":`${0===this.mainStore.chart.granularity?1:this.mainStore.chart.granularity/mf[this.timeUnit]} ${pf[this.timeUnit]}`}clearCountdown(){this.countdownInterval&&clearInterval(this.countdownInterval),this.countdownInterval=void 0}updateCountdown(){this.remain=null,this.clearCountdown();const t=()=>{if(this.isTick||!this.isSymbolOpen)return void this.clearCountdown();const t=this.mainStore.chart?.feed?.quotes;if(t&&t.length){const e=[...t].filter(t=>t&&t.Close);if(e&&e.length){const t=e[e.length-1];if(t.DT){const e=this._serverTime?.getLocalDate()?.getTime(),r=e-t.DT.getTime(),i=1e3*(this.mainStore.chart.granularity||1),a=r>i?Math.floor(r/i)+1:1;this.remain=Xi(a*i-r),this.mainStore.chartAdapter.flutterChart?.config.setRemainingTime(this.remain||"")}}}};this.mainStore.chartSetting.countdown&&!this.isTick&&(this.countdownInterval||(this.countdownInterval=setInterval(t,1e3),t()))}setGranularity(t){jm(Tm.ChartControl,km.Interval,t?.toString()),this.onGranularityChange?this.onGranularityChange(t):this.mainStore.chart.changeSymbol(void 0,t)}updateProps(t){void 0!==this.mainStore.state.granularity&&(this.onGranularityChange=t)}changeGranularity(t){if(t){const e=mm.find(t=>t.id===this.mainStore.chartType.type.id)?.text??"";this.mainStore.state.stateChange("CHART_INTERVAL_CHANGE",{time_interval_name:$i(t,fm),chart_type_name:"colored_bar"===this.mainStore.chartType.type.id?e:e.toLowerCase()})}0===t&&this.mainStore.studies.hasPredictionIndicator?(this.predictionIndicator.dialogPortalNodeId=this.portalNodeIdChanged,this.predictionIndicator.setOpen(!0)):this.onGranularityChange(t)}updatePortalNode(t){this.portalNodeIdChanged=t}}var _f=h(6092),vf=h.n(_f);function bf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class yf{static get EVENT_MARKET_OPEN_CLOSE_CHANGE(){return"EVENT_MARKET_OPEN_CLOSE_CHANGE"}static get FEED_UNAVAILABLE(){return"chartonly"}constructor(t,e){bf(this,"_api",void 0),bf(this,"_emitter",void 0),bf(this,"_params",void 0),bf(this,"_serverTime",void 0),bf(this,"_shouldFetchTradingTimes",void 0),bf(this,"_tradingTimesMap",void 0),bf(this,"_updateTimer",void 0),bf(this,"lastUpdateDate",void 0),bf(this,"isInitialized",!1),bf(this,"tradingTimesPromise",Bi()),bf(this,"timeUpdateCallback",void 0),this._params=e||{},this._shouldFetchTradingTimes=!1!==e?.shouldFetchTradingTimes,this._api=t,this._serverTime=Pm.getInstance(),this._emitter=new(Fi())({emitDelay:0})}destructor(){this._updateTimer&&clearTimeout(this._updateTimer)}async initialize(){if(await this._serverTime.init(this._api,()=>{"function"==typeof this.timeUpdateCallback&&this.timeUpdateCallback()}),this.isInitialized)return this.tradingTimesPromise;if(this.isInitialized=!0,this.lastUpdateDate=this._serverTime.getLocalDate().toISOString().substring(0,10),!this._tradingTimesMap&&this._shouldFetchTradingTimes){await this._updateTradeTimes(),this.tradingTimesPromise.resolve();const t=async()=>{const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,e);let r=this._nextUpdateDate();if(!r){const t=this._serverTime.getLocalDate(),e=new Date(`${this.lastUpdateDate}T00:00:00Z`);e.setDate(e.getDate()+1),this.lastUpdateDate=(t>e?t:e).toISOString().substring(0,10);const i={};for(const t in this._tradingTimesMap)i[t]=!!this._tradingTimesMap[t].isOpened;await this._updateTradeTimes();for(const t in this._tradingTimesMap)this._tradingTimesMap[t].isOpened=i[t];r=e}const i=r-this._serverTime.getLocalDate();this._updateTimer=setTimeout(t,i)};await t()}}_updateMarketOpenClosed(){const t={};for(const e in this._tradingTimesMap){const r=this._calcIsMarketOpened(e);this._tradingTimesMap[e].isOpened!==r&&(this._tradingTimesMap[e].isOpened=r,t[e]=r)}return t}async _updateTradeTimes(){this._params.tradingTimes&&this._calculatingTradingTime(this._params.tradingTimes)}_calculatingTradingTime(t){if(!t)return;if(this._tradingTimesMap={},t){for(const e in t){const{isOpen:r,openTime:i,closeTime:a}=t[e];this._tradingTimesMap[e]={feed_license:void 0,isClosedToday:!r,holidays:[],closes_early:[],opens_late:[],delay_amount:0,times:i&&a?[{open:new Date(i),close:new Date(a)}]:void 0,isOpenAllDay:!1,isClosedAllDay:!1,isOpened:r}}return}const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,e)}isFeedUnavailable(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t]?.feed_license===yf.FEED_UNAVAILABLE:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}getDelayedMinutes(t){return this._tradingTimesMap?.[t].delay_amount}isMarketOpened(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t].isOpened:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}_calcIsMarketOpened(t){const e=this._serverTime.getLocalDate(),r=e.toISOString().substring(0,10);if(!this._tradingTimesMap)return;const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n,holidays:o,closes_early:l,opens_late:c,isClosedToday:h}=this._tradingTimesMap[t];if(n||a===yf.FEED_UNAVAILABLE||h||o.includes(r))return!1;const u=c.find(t=>t.date===r);if(u){const{open:t,close:r}=u;return!!(e>=t&&e<r)}const d=l.find(t=>t.date===r);if(d){const{open:t,close:r}=d;return!!(e>=t&&e<r)}if(s)return!0;if(i)for(const t of i){const{open:r,close:i}=t;if(e>=r&&e<i)return!0}return!1}_nextUpdateDate(){const t=this._serverTime.getLocalDate();let e;for(const r in this._tradingTimesMap){const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n}=this._tradingTimesMap[r];if(!s&&!n&&a!==yf.FEED_UNAVAILABLE&&i)for(const r of i){const{open:i,close:a}=r;i>t&&(!e||i<e)&&(e=i),a>t&&(!e||a<e)&&(e=a)}}return e}onMarketOpenCloseChanged(t){this._emitter.on(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,t)}onTimeChanged(t){this.timeUpdateCallback=t}}const Sf=yf;function xf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wf{static get DEFAULT_COUNT(){return 1e3}constructor(t,e,r){xf(this,"unsubscribeQuotes",void 0),xf(this,"_getQuotes",void 0),xf(this,"_subscribeQuotes",void 0),xf(this,"streamRequests",{}),this.unsubscribeQuotes=t,this._getQuotes=e,this._subscribeQuotes=r}async getQuotes(t){if(this._getQuotes){const e=await this._getQuotes({symbol:t.symbol,granularity:t.granularity,count:"string"==typeof t.count?parseInt(t.count,10):t.count||wf.DEFAULT_COUNT,start:"string"==typeof t.start?parseInt(t.start,10):t.start,end:"string"==typeof t.end?parseInt(t.end,10):t.end});if(t.granularity)return{candles:e.candles};if(e.history&&e.history.times&&e.history.prices)return{history:{times:e.history.times,prices:e.history.prices}};throw new Error("Invalid tick history response format")}throw new Error("No getQuotes function provided")}subscribeQuotes(t,e){const r=this._getKey(t),i=wf.createGetQuotesRequest({...t,subscribe:1});this.streamRequests[r]={request:i,callback:e},this._subscribeQuotes({symbol:t.symbol,granularity:t.granularity},e)}forget(t){const e=this._getKey(t);if(!this.streamRequests[e])return;const{request:r,callback:i}=this.streamRequests[e];return delete this.streamRequests[e],this.unsubscribeQuotes(r,i)}static createGetQuotesRequest({symbol:t,granularity:e,start:r,end:i,subscribe:a,adjust_start_time:s=1,count:n}){const o={symbol:t,style:e?"candles":"ticks",start:r,end:i,count:n||wf.DEFAULT_COUNT};return e&&(o.granularity=+e),s&&(o.adjust_start_time=s),a&&(o.subscribe=1),r&&(delete o.count,o.start=r),i&&(o.end=i),o}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}}const Cf=t=>{const e=[],r=(i=(t,e)=>t.submarket_display_name.localeCompare(e.submarket_display_name),t.map((t,e)=>({item:t,index:e})).sort((t,e)=>{const r=i(t.item,e.item);return 0!==r?r:t.index-e.index}).map(({item:t})=>t));var i;for(const t of r)e.push({symbol:t.symbol,name:t.display_name,market:t.market,market_display_name:t.market_display_name,subgroup:t.subgroup,subgroup_display_name:t.subgroup_display_name,submarket_display_name:t.submarket_display_name,exchange_is_open:!!t.exchange_is_open,decimal_places:t.pip.toString().length-2});return e},Tf=t=>({enabled:!0,itemId:t.symbol,display:t.name,dataObject:t}),kf=t=>({subcategoryName:t.submarket_display_name,data:[]}),jf=(t,e)=>{let r=t.find(t=>t.categoryId===e.market);return r||(r=(t=>({categoryName:t.market_display_name,categoryId:t.market,hasSubcategory:!0,hasSubgroup:!(!t.subgroup||"none"===t.subgroup),data:[],subgroups:[]}))(e),t.push(r)),r},Af=(t,e,r)=>{let i=r.get(e.submarket_display_name);return i||(i=kf(e),r.set(e.submarket_display_name,i),t.data.push(i)),i},Of=(t,e)=>{if(!t.hasSubgroup)return;const r=((t,e)=>{let r=t.subgroups?.find(t=>t.categoryId===e.subgroup);return r||(r=(t=>({data:[],categoryName:t.subgroup_display_name,categoryId:t.subgroup,hasSubcategory:!0,hasSubgroup:!1,subgroups:[]}))(e),t.subgroups?.push(r)),r})(t,e),i=((t,e)=>{let r=t.data.find(t=>t.subcategoryName===e.submarket_display_name);return r||(r=kf(e),t.data.push(r)),r})(r,e);i.data.push(Tf(e))},Ef=t=>{if(!t.length)return[];const e=[],r=new Map;for(const i of t){const t=jf(e,i);r.has(i.market)||r.set(i.market,new Map);const a=r.get(i.market),s=Af(t,i,a);Of(t,i),s.data.push(Tf(i))}return e};function Nf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const If=class{constructor(t,e){Nf(this,"params",void 0),Nf(this,"topNode",void 0),this.params=e||{},this.topNode=t}};class Pf{static formatHistory(t){const{history:e,candles:r}=t;if(e){const{times:t=[],prices:r=[]}=e;return r.map((e,r)=>({Date:Yi(+t[r]),Close:+e}))}if(r)return r.map(t=>{const e=t;return{Date:Yi(+e.epoch),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close}})}static formatQuote(t){if("tick"in t){const{tick:e}=t,r=e;return{Date:Yi(+r.epoch),Close:+r.quote,tick:e}}if("ohlc"in t){const{ohlc:e}=t;if(e)return{Date:Yi(+e.open_time),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close,ohlc:e}}}static formatAllQuotes(t){const e=e=>{const r=t?.[e+1],i=t?.[e-1];return i?.tick&&r?.tick?aa(i?.tick,r?.tick,.5):r?.tick||i?.tick};return t?.map((t,r)=>({Date:Yi(+t.epoch),Close:+(t.tick||e(r))}))}static formatPOCQuote(t){const{tick_stream:e=[],underlying:r=""}=t||{};return e.length&&r?e.map(({epoch:t=0,tick:e,tick_display_value:i})=>({Date:Yi(t),Close:e||0,tick:{epoch:t,quote:e||0,symbol:r,pip_size:i?.split(".")[1]?.length||0}})):null}}function Df(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Lf{static get EVENT_CHART_DATA(){return"EVENT_CHART_DATA"}get contractInfo(){return this._mainStore.state.contractInfo}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}constructor(t,e,r){Df(this,"_binaryApi",void 0),Df(this,"_emitter",void 0),Df(this,"_request",void 0),Df(this,"lastStreamEpoch",void 0),Df(this,"_mainStore",void 0),this._binaryApi=e,this._request=t,this._emitter=new(Fi())({emitDelay:0}),this._mainStore=r}async initialFetch(){return await this._startSubscribe(this._request)}pause(){}async resume(){if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch};return await this._startSubscribe(t)}}forget(){this.lastStreamEpoch=void 0,this._emitter.off(Lf.EVENT_CHART_DATA)}_startSubscribe(t){throw new Error("Please override!")}_processGetQuotesResponse(t){const e=Pf.formatHistory(t);if(!e)throw new Error(`Unexpected response: ${t}`);return this.lastStreamEpoch=Lf.getLatestEpoch(t),e}onChartData(t){this._emitter.on(Lf.EVENT_CHART_DATA,t)}static getLatestEpoch({candles:t,history:e}){if(t)return t[t.length-1].epoch;if(e){const{times:t=[]}=e;return t[t.length-1]}}static getEpochFromTick(t){return"tick"in t&&t.tick?t.tick.epoch:t.ohlc?.open_time}}const Mf=Lf;function Bf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Rf=class extends Mf{constructor(t,e,r,i){super(t,e,i),Bf(this,"_timerId",void 0),Bf(this,"UPDATE_INTERVAL",3e3),Bf(this,"onUpdateDelayedFeed",async()=>{if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch,adjust_start_time:0},e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);this._emitter?.emit(Mf.EVENT_CHART_DATA,r)}else console.error("Unable to update delayed feed without epoch from last tick"),this._endTimer()}),this._request={...this._request,start:this._request.start-60*r}}pause(){this._endTimer()}async _startSubscribe(t){const e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);return this._startTimer(),{quotes:r,response:e}}forget(){this._endTimer(),super.forget()}_startTimer(){this._timerId||(this._timerId=setInterval(this.onUpdateDelayedFeed,this.UPDATE_INTERVAL))}_endTimer(){this._timerId&&(clearInterval(this._timerId),this._timerId=void 0)}};const Ff=class extends Mf{constructor(...t){super(...t),function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"_tickCallback",void 0)}pause(){this._tickCallback=void 0}async resume(){if(this._tickCallback)throw new Error("You cannot resume an active stream!");return super.resume()}async _startSubscribe(t){const e=this.contractInfo,r=await this._binaryApi.getQuotes(t),i=this._processGetQuotesResponse(r),a=t=>{(t.tick||t.ohlc)&&this._onTick(t)};if(!this.shouldGetQuotes&&e.tick_stream)this._binaryApi.subscribeQuotes(Object.assign(t,{count:e.tick_count}),a);else{const r=e.current_spot_time&&e.date_start?e.current_spot_time-e.date_start:0,i=1e3;this._binaryApi.subscribeQuotes(Object.assign(t,{count:r>i?r:i}),a)}return this._tickCallback=a,{quotes:i,response:r}}forget(){if(this._tickCallback){const{symbol:t,granularity:e}=this._request;this._binaryApi.forget({symbol:t,granularity:e}),this._tickCallback=void 0}super.forget()}_onTick(t){const e=t,r=Mf.getEpochFromTick(e);void 0!==r&&(this.lastStreamEpoch=+r);const i=[Pf.formatQuote(e)];this._emitter.emit(Mf.EVENT_CHART_DATA,i)}};function Vf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Hf{static get EVENT_MASTER_DATA_UPDATE(){return"EVENT_MASTER_DATA_UPDATE"}static get EVENT_MASTER_DATA_REINITIALIZE(){return"EVENT_MASTER_DATA_REASSIGN"}static get EVENT_START_PAGINATION(){return"EVENT_START_PAGINATION"}static get EVENT_ON_PAGINATION(){return"EVENT_ON_PAGINATION"}get startEpoch(){return this._mainStore.state.startEpoch}get endEpoch(){return this._mainStore.state.endEpoch}get granularity(){return this._mainStore.chart.granularity}get allTicks(){return this._mainStore.state.allTicks}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}get contractInfo(){return this._mainStore.state.contractInfo}get loader(){return this._mainStore.loader}get margin(){return this._mainStore.state.margin}get hasAlternativeSource(){return this._mainStore.state.shouldDrawTicksFromContractInfo}get paginationLoader(){return this._mainStore.paginationLoader}constructor(t,e,r){Vf(this,"_binaryApi",void 0),Vf(this,"_connectionClosedDate",void 0),Vf(this,"_emitter",void 0),Vf(this,"_mainStore",void 0),Vf(this,"_serverTime",void 0),Vf(this,"tickQueue",[]),Vf(this,"_tradingTimes",void 0),Vf(this,"quotes",[]),Vf(this,"_activeStreams",{}),Vf(this,"_isConnectionOpened",!0),Vf(this,"onRangeChanged",()=>{this._mainStore.state.setChartIsReady(!1),this._mainStore.state.saveLayout(),this._mainStore.state.setChartIsReady(!0)}),this._binaryApi=t,this._mainStore=e,this._serverTime=Pm.getInstance(),this._tradingTimes=r,qe(()=>e.state.isConnectionOpened,this.onConnectionChanged.bind(this)),this._emitter=new(Fi())({emitDelay:0})}subscribe(){}unsubscribe({symbol:t,granularity:e}){const r=this._getKey({symbol:t,granularity:e});this._forgetStream(r)}_forgetStream(t){this._activeStreams[t]&&(this._activeStreams[t].forget(),delete this._activeStreams[t])}processQuotes(t){t.forEach(t=>{t.DT=new Date(`${t.Date}Z`)})}updateQuotes(t,e){this.processQuotes(t),e?this.quotes.unshift(...t):this.quotes=t}addQuote(t){this.processQuotes([t]),this.quotes.push(t)}getQuoteForEpoch(t){return this.quotes.find(e=>e.DT?.getTime()==t)}getQuoteIndexForEpoch(t){return this.quotes.findIndex(e=>e.DT?.getTime()==t)}getClosestValidEpoch(t,e){return Math.round(t/e)*e}getClosestQuoteForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?r:i}getClosestQuoteIndexForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?Math.floor(e):Math.ceil(e)}findEpochIndex(t){let e=-1,r=this.quotes.length;for(;r-e>1;){const i=Math.trunc((e+r)/2),a=this.quotes[i].DT?.getTime();if(!a)return i;if(t<a)r=i;else{if(!(t>a))return i;e=i}}return e>=0&&t==this.quotes[e].DT?.getTime()?e:r<this.quotes.length&&t==this.quotes[r].DT?.getTime()?r:(e+r)/2}getQuotesInterval(){if(this.quotes.length<=1)return 1;const t=this.quotes.reduce((t,e,r,i)=>{const a=e.DT?.getTime(),s=i[r-1]?.DT?.getTime();return s&&a?t+(a-s)/1e3:t},0);return Math.round(t/(this.quotes.length-1))}async fetchInitialData(t,e,r){this.tickQueue=[],this.setHasReachedEndOfData(!1),this.paginationLoader.updateOnPagination(!0);const{granularity:i=0,symbolObject:a}=e,s=this._getKey({symbol:t,granularity:i}),n=this.margin&&this.startEpoch?this.startEpoch-this.margin:this.startEpoch,o=this.margin&&this.endEpoch?this.endEpoch+this.margin:this.endEpoch,l=a.name;if(this.loader.setState("chart-data"),this._tradingTimes.isFeedUnavailable(t)){this._mainStore.notifier.notifyFeedUnavailable(l);const t={quotes:[]};return this._mainStore.chart.setChartAvailability(!1),void r(t)}if(this.quotes&&this.quotes.length>0&&!this.shouldGetQuotes){const t=this._trimQuotes(this.quotes);return r({quotes:t}),this._emitDataUpdate(t,!0),void this.paginationLoader.updateOnPagination(!1)}const c={symbol:t,granularity:i,start:n,count:this.endEpoch?void 0:this._mainStore.lastDigitStats.count},h=this.contractInfo.validation_error_code;let u,d=!1;if(o)c.end=String(o),d=!0;else if("MarketIsClosed"!==h&&"MarketIsClosedTryVolatility"!==h){let e;const i=this._tradingTimes.getDelayedMinutes(t);i>0?(this._mainStore.notifier.notifyDelayedMarket(l,i),e=new Rf(c,this._binaryApi,i,this._mainStore)):e=new Ff(c,this._binaryApi,this._mainStore);try{const{quotes:t,response:r}=await e.initialFetch();u=t,this.endEpoch||this._mainStore.lastDigitStats.updateLastDigitStats(r)}catch(t){const{message:e}=t;return this._mainStore.notifier.notify({text:e,type:"error",category:"activesymbol"}),r({quotes:[]}),void this.paginationLoader.updateOnPagination(!1)}if(e.onChartData(e=>{t!==this._mainStore.chart.currentActiveSymbol?.symbol||this.hasAlternativeSource||this._appendChartData(e,s)}),this._mainStore.chart.isDestroyed||this._mainStore.state.symbol&&this._mainStore.state.symbol!==t)return r({quotes:[]}),void e.forget();this._activeStreams[s]=e}else this._mainStore.notifier.notifyMarketClose(l),d=!0;if(d)if(this._mainStore.state.getQuotes){const e=await this._mainStore.state.getQuotes({symbol:t,granularity:i,count:this.endEpoch?1e3:this._mainStore.lastDigitStats.count,start:n,end:o});if(e.candles)u=e.candles.map(t=>({Date:Yi(t.epoch),Open:t.open,High:t.high,Low:t.low,Close:t.close}));else if(e.history){const{times:t=[],prices:r=[]}=e.history;u=r.map((e,r)=>({Date:Yi(t[r]),Close:e}))}else u=[]}else if(this.shouldGetQuotes||!this.contractInfo.tick_stream){const t=await this._binaryApi.getQuotes(c);u=Pf.formatHistory(t)}else{const t=await new Promise(t=>{setTimeout(()=>t(this.allTicks),50)});u=Pf.formatAllQuotes(t)}u?(u=this._trimQuotes(u),r({quotes:u}),this._emitDataUpdate(u,!0),this.paginationLoader.updateOnPagination(!1)):r({quotes:[]})}async fetchPaginationData(t,e,r,i,a){this.paginationLoader.updateOnPagination(!0),this._emitter.emit(Hf.EVENT_START_PAGINATION,{end:e}),await this._getPaginationData(t,i,r,e,a),this.paginationLoader.updateOnPagination(!1)}async _getPaginationData(t,e,r,i,a){if(this._mainStore.state.hasReachedEndOfData)return;if(this.startEpoch||this.endEpoch&&i>this.endEpoch)return a({moreAvailable:!1,quotes:[]}),this._emitter.emit(Hf.EVENT_ON_PAGINATION,{end:i}),void this.setHasReachedEndOfData(!0);const s=this._serverTime.getEpoch()-Math.ceil(2.8*365*24*60*60);let n,o={quotes:[]};if(i>s)try{const l=await this._binaryApi.getQuotes({symbol:t,granularity:e,count:`${r}`,end:String(i)});if(n=Hf.getFirstEpoch(l),void 0===n||n===i)return a({moreAvailable:!1,quotes:[]}),void this.setHasReachedEndOfData(!0);if(o.quotes=Pf.formatHistory(l),n<=s&&(a({moreAvailable:!1,quotes:[]}),this.setHasReachedEndOfData(!0)),o.quotes?.length&&o.quotes.length<r)return a({moreAvailable:!1,quotes:o.quotes}),void this.setHasReachedEndOfData(!0)}catch(t){console.error(t),o={error:t}}a(o);{const t=n&&i>n?n:i;this._emitter.emit(Hf.EVENT_ON_PAGINATION,{end:t})}}setHasReachedEndOfData(t){this.paginationLoader.updateOnPagination(!1),this._mainStore.state.hasReachedEndOfData!==t&&(this._mainStore.state.hasReachedEndOfData=t)}unsubscribeAll(){for(const t of Object.keys(this._activeStreams))this._forgetStream(t)}_forgetIfEndEpoch(t){const e=this._activeStreams[t];let r=!0;if(!e)return;const i=e.lastStreamEpoch;return this.endEpoch&&void 0!==i&&void 0!==this.granularity&&i+this.granularity>this.endEpoch?(this._activeStreams[t]&&0===this.granularity&&!this._mainStore.state.isStaticChart&&Om(Yi(this.endEpoch)).valueOf()>=this.quotes.slice(-1)[0]?.Date.valueOf()&&(r=!1),this._forgetStream(t)):r=!1,r}_appendChartData(t,e,r=!1){if(!this._forgetIfEndEpoch(e)||this._activeStreams[e]){if((!this.hasAlternativeSource||r)&&r){if(!this.tickQueue.length)return void(this.tickQueue=[t[t.length-1]]);if(this.tickQueue[0].tick?.epoch===t[t.length-1].tick?.epoch)return;this.tickQueue=[t[t.length-1]],t=[t[t.length-1]]}this._emitDataUpdate(t)}else t=[]}appendChartDataFromPOCResponse(t){const e=Pf.formatPOCQuote(t);e&&this._appendChartData(e,e[0].tick.symbol,!0)}_emitDataUpdate(t,e=!1){const r=t[t.length-2],i=void 0!==r?r.Close:void 0,a={...t[t.length-1],prevClose:i};e?(this._emitter.emit(Hf.EVENT_MASTER_DATA_REINITIALIZE),this._mainStore.chart.setChartAvailability(!0)):this._emitter.emit(Hf.EVENT_MASTER_DATA_UPDATE,a)}static getFirstEpoch(t){if(t.candles&&t.candles.length>0)return t.candles[0].epoch;if(t.history&&t.history.times&&t.history.times.length>0){const{times:e}=t.history;return+e[0]}}onMasterDataUpdate(t){this._emitter.on(Hf.EVENT_MASTER_DATA_UPDATE,t)}offMasterDataUpdate(t){this._emitter.off(Hf.EVENT_MASTER_DATA_UPDATE,t)}onMasterDataReinitialize(t){this._emitter.on(Hf.EVENT_MASTER_DATA_REINITIALIZE,t)}offMasterDataReinitialize(t){this._emitter.off(Hf.EVENT_MASTER_DATA_REINITIALIZE,t)}onPagination(t){this._emitter.on(Hf.EVENT_ON_PAGINATION,t)}offPagination(t){this._emitter.off(Hf.EVENT_ON_PAGINATION,t)}onStartPagination(t){this._emitter.on(Hf.EVENT_START_PAGINATION,t)}offStartPagination(t){this._emitter.off(Hf.EVENT_START_PAGINATION,t)}onConnectionChanged(){const t=this._mainStore.state.isConnectionOpened;void 0!==t&&t!==this._isConnectionOpened&&(this._isConnectionOpened=t,t?this._onConnectionReopened():this._onConnectionClosed())}_onConnectionClosed(){for(const t in this._activeStreams)this._activeStreams[t].pause();this._connectionClosedDate=new Date}_onConnectionReopened(){0!==Object.keys(this._activeStreams).length&&(this._mainStore.chart.refreshChart(),this._connectionClosedDate=void 0)}_resumeStream(t){this._activeStreams[t].pause(),this._activeStreams[t].resume().then(e=>{const{quotes:r}=e;this._appendChartData(r,t)})}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}_unpackKey(t){const[e,r]=t.split("-");return{symbol:e,granularity:+r}}_trimQuotes(t=[]){let e=null,r=null,i=t;if(!i.length)return[];if(this.startEpoch&&this.margin&&(e=i.findIndex(t=>Om(t.Date)>=Om(Yi(this.startEpoch))),e>0&&(i=i.slice(e-1))),this.endEpoch&&this.margin&&(r=i.findIndex(t=>Om(t.Date)>=Om(Yi(this.endEpoch))),r>-1)){const t=Om(i[r].Date)===Om(Yi(this.endEpoch))?2:1;i=i.slice(0,r+t)}return i}}const Uf=Hf;function qf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class zf{constructor(t){qf(this,"chartContainerHeight",void 0),qf(this,"chartHeight",void 0),qf(this,"chartId",void 0),qf(this,"containerWidth",null),qf(this,"context",null),qf(this,"currentActiveSymbol",void 0),qf(this,"currentLanguage",void 0),qf(this,"cursorInChart",!1),qf(this,"startWithDataFitMode",!1),qf(this,"feed",void 0),qf(this,"isBarrierDragging",!1),qf(this,"isChartAvailable",!0),qf(this,"isLive",!1),qf(this,"isMobile",!1),qf(this,"isScaledOneOne",!1),qf(this,"mainStore",void 0),qf(this,"networkStatus",void 0),qf(this,"resizeObserver",void 0),qf(this,"serverTime",void 0),qf(this,"shouldRenderDialogs",!1),qf(this,"leftMargin",void 0),qf(this,"lastQuote",void 0),qf(this,"processedSymbols",void 0),qf(this,"symbolMap",{}),qf(this,"categorizedSymbols",[]),qf(this,"feedCall",{}),qf(this,"RANGE_PADDING_PX",125),qf(this,"contextPromise",Bi()),qf(this,"rootNode",null),qf(this,"api",null),qf(this,"defaults",{granularity:0,chartType:"line"}),qf(this,"granularity",void 0),qf(this,"enableRouting",null),qf(this,"chartNode",null),qf(this,"chartControlsNode",null),qf(this,"state",void 0),qf(this,"onMessage",null),qf(this,"_barriers",[]),qf(this,"tradingTimes",void 0),qf(this,"whitespace",void 0),qf(this,"isDestroyed",!1),qf(this,"currentCloseQuote",()=>{const t=this.mainStore.chart.feed?.quotes;let e=t?.[t.length-1];if(e&&!e.Close){const r=t?.filter(t=>t&&t.Close);if(r&&r.length)e=r[r.length-1];else{const r=t?.filter(t=>t&&t.Close);r&&r.length&&(e=r[r.length-1])}}return e}),qf(this,"indicatorHeightRatio",t=>{let e={};if("function"==typeof this.stateStore.getIndicatorHeightRatio&&this.chartNode&&(e=this.stateStore.getIndicatorHeightRatio(this.chartNode.offsetHeight,t)),this.chartNode&&(!e||!e.height||!e.percent)){const r=this.chartNode.offsetHeight,i=r<780,a=t>=5?t:t+1,s=this.isMobile?160:320,n=Math.round((r-(s+(i?20:0)))/a);e={height:n,percent:n/r}}return e}),qf(this,"init",(t,e)=>{this.loader.show(),this.mainStore.state.setChartIsReady(!1),this.loader.setState("chart-engine"),this.chartId=e.id||"base-chart",this._initChart(t,e)}),qf(this,"setResizeEvent",()=>{const t=t=>{t.forEach(()=>{this.rootNode&&this.rootNode.clientWidth>0&&this.resizeScreen()})};"ResizeObserver"in window?(this.resizeObserver=new ResizeObserver(t),this.rootNode&&this.resizeObserver.observe(this.rootNode)):h.e(590).then(h.bind(h,4208)).then(({default:e})=>{window.ResizeObserver=e,this.rootNode&&(this.resizeObserver=new e(t),this.resizeObserver.observe(this.rootNode))})}),qf(this,"onMarketOpenClosedChange",t=>{const e=this.processedSymbols||[];let r=!1;for(const{symbol:i,name:a}of e)i in t&&(t[i]?(r=!0,this.chartClosedOpenThemeChange(!1),this.mainStore.notifier.notifyMarketOpen(a)):(this.chartClosedOpenThemeChange(!0),this.mainStore.notifier.notifyMarketClose(a)));r&&this.refreshChart()}),qf(this,"remainLabelY",()=>0),br(this,{chartContainerHeight:Mt,chartHeight:Mt,containerWidth:Mt,context:Mt,currentActiveSymbol:Mt,currentLanguage:Mt,cursorInChart:Mt,isBarrierDragging:Mt,isChartAvailable:Mt,isMobile:Mt,isScaledOneOne:Mt,networkStatus:Mt,serverTime:Mt,shouldRenderDialogs:Mt,xAxisHeight:Vt,yAxisWidth:Vt,lastQuote:Mt,_initChart:Be.bound,changeSymbol:Be.bound,destroy:Be.bound,granularity:Mt,newChart:Be.bound,onServerTimeChange:Be.bound,openFullscreen:Be.bound,pip:Vt,refreshChart:Be.bound,resizeScreen:Be.bound,setChartAvailability:Be.bound,updateCurrentActiveSymbol:Be.bound,updateScaledOneOne:Be.bound,processedSymbols:Mt,symbolMap:Mt,categorizedSymbols:Mt}),this.mainStore=t}get loader(){return this.mainStore.loader}get routingStore(){return this.mainStore.routing}get stateStore(){return this.mainStore.state}get studiesStore(){return this.mainStore.studies}get pip(){return this.currentActiveSymbol?.decimal_places}get rootElement(){return this.chartId?document.getElementById(this.chartId):null}get currentClose(){return this.currentCloseQuote()?.Close}get xAxisHeight(){return window.flutterChart?.app.getXAxisHeight()||24}get yAxisWidth(){return window.flutterChart?.app.getYAxisWidth()||60}updateHeight(t){const e=this.mainStore.chartSetting.historical&&this.isMobile,r=t||this.mainStore.chartSetting.position;let i=0;this.stateStore.enabledChartFooter?i=32:"bottom"===r&&this.stateStore.chartControlsWidgets&&(i=40),this.chartHeight=this.chartNode?.offsetHeight,this.chartContainerHeight=(this.chartHeight||0)-i-(e?45:0)}resizeScreen(){this.rootNode&&this.rootNode.clientWidth>=1280?this.containerWidth=1280:this.rootNode&&this.rootNode.clientWidth>=900?this.containerWidth=900:this.containerWidth=480,this.updateHeight()}_initChart(t,e){this.rootNode=t,this.chartNode=this.rootNode?.querySelector(".ciq-chart-area"),this.chartControlsNode=this.rootNode?.querySelector(".cq-chart-controls");const{symbol:r,granularity:i,unsubscribeQuotes:a,getQuotes:s,subscribeQuotes:n,isMobile:o,enableRouting:l,onMessage:c,settings:h,onSettingsChange:u,chartData:d,feedCall:g,isLive:p,startWithDataFitMode:m,leftMargin:f}=e;this.feedCall=g||{},this.api=new wf(a,s||(async()=>({candles:[],echo_req:{}})),n||(()=>()=>{})),this.currentLanguage=localStorage.getItem("current_chart_lang")??h?.language?.toLowerCase(),this.tradingTimes=zf.tradingTimes||(zf.tradingTimes=new Sf(this.api,{enable:this.feedCall.tradingTimes,shouldFetchTradingTimes:this.mainStore.state.shouldFetchTradingTimes,tradingTimes:d?.tradingTimes}));const _=d?.activeSymbols;if(_){const t=Cf(_);this.processedSymbols=t,this.categorizedSymbols=Ef(t),this.symbolMap={};for(const e of t)this.symbolMap[e.symbol]=e;zf.processedSymbols=t,zf.symbolMap=this.symbolMap,zf.categorizedSymbols=this.categorizedSymbols}else this.currentLanguage===h?.language&&zf.processedSymbols&&(this.processedSymbols=zf.processedSymbols,this.symbolMap=zf.symbolMap,this.categorizedSymbols=zf.categorizedSymbols);const{chartSetting:v}=this.mainStore;v.setSettings(h),v.onSettingsChange=u,this.isMobile=o,this.whitespace=o?50:150,this.state=this.mainStore.state,this.mainStore.notifier.onMessage=c,this.granularity=void 0!==i?i:this.defaults.granularity,this.isLive=p||!1,this.startWithDataFitMode=m||!1,this.leftMargin=f,zf.chartCount+=1,this.feed=new Uf(this.api,this.mainStore,this.tradingTimes),this.enableRouting=l,this.enableRouting&&this.routingStore.handleRouting();const b=new If(this.rootNode);this.stateStore.stateChange("INITIAL"),this.loader.setState("market-symbol"),this.loader.setState("trading-time"),this.tradingTimes?.initialize().then(Be(()=>{if(this.isDestroyed)return;this.startWithDataFitMode?this.state?.clearLayout():this.state?.restoreLayout();const t=this.state?.symbol||r;this.changeSymbol(t||this.symbolMap&&Object.keys(this.symbolMap)[0],this.granularity),this.context=b,this.chartClosedOpenThemeChange(!this.currentActiveSymbol?.exchange_is_open),this.mainStore.chart.tradingTimes?.onMarketOpenCloseChanged(Be(t=>{for(const e in t)this.currentActiveSymbol?.symbol===e&&this.chartClosedOpenThemeChange(!t[e])})),this.contextPromise?.resolve?.(this.context),this.resizeScreen(),qe(()=>[this.state?.symbol,this.state?.granularity],()=>{void 0===this.state?.symbol&&void 0===this.state?.granularity||this.changeSymbol(this.state.symbol,this.state.granularity)}),this.tradingTimes?.onTimeChanged(this.onServerTimeChange),setTimeout(Be(()=>{this.shouldRenderDialogs=!0}),500)}))}chartClosedOpenThemeChange(t){this.mainStore.state.setChartClosed(t),this.mainStore.state.setChartTheme(this.mainStore.chartSetting.theme),this.mainStore.chartAdapter.setSymbolClosed(t)}onServerTimeChange(){this.tradingTimes?._serverTime&&(this.serverTime=vf()(1e3*this.tradingTimes._serverTime.getEpoch()).format("DD MMM YYYY HH:mm:ss [GMT]"))}updateCurrentActiveSymbol(t){this.currentActiveSymbol=t}setChartAvailability(t){this.isChartAvailable=t}changeSymbol(t,e,r=!1){"string"==typeof t&&(t=this.symbolMap[t]),t&&this.currentActiveSymbol&&t?.symbol===this.currentActiveSymbol?.symbol&&void 0!==e&&e===this.granularity&&!r||(this.newChart(t),void 0!==e&&(this.granularity=e),t&&this.updateCurrentActiveSymbol(t))}newChart(t=this.currentActiveSymbol){if(!t)return;this.currentActiveSymbol&&this.feed?.unsubscribe({symbol:this.currentActiveSymbol.symbol,granularity:this.granularity}),this.loader.show(),this.mainStore.state.setChartIsReady(!1);const e=e=>{this.loader.hide(),this.chartClosedOpenThemeChange(!t.exchange_is_open),this.mainStore.paginationLoader.updateOnPagination(!1),this.mainStore.state.setChartIsReady(!0)};this.mainStore.chartAdapter.newChart(),this.feed?.fetchInitialData(t.symbol,{granularity:this.mainStore.state.granularity,symbolObject:t},({quotes:t,error:r})=>{this.mainStore.chartAdapter.onTickHistory(t||[]),this.mainStore.chart.feed?.offMasterDataUpdate(this.mainStore.chartAdapter.onTick),this.mainStore.chart.feed?.onMasterDataUpdate(this.mainStore.chartAdapter.onTick),e()})}updateScaledOneOne(t){this.isScaledOneOne=t}refreshChart(){this.newChart()}destroy(){zf.chartCount-=1,this.isDestroyed=!0,this.resizeObserver&&this.resizeObserver.disconnect(),this.tradingTimes&&0===zf.chartCount&&(zf.tradingTimes=null,this.tradingTimes.destructor()),this.feed&&(this.feed.unsubscribeAll(),this.feed=null),this.mainStore.drawTools.destructor(),this.currentActiveSymbol=null,this.contextPromise=null,this.context=null}openFullscreen(){const t={element:["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],fnc_enter:["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],fnc_exit:["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"]},e=t.element.some(t=>document[t]&&null!==document[t]),r=e?document:document.documentElement,i=t[e?"fnc_exit":"fnc_enter"].find(t=>r[t]);i&&r[i]()?.catch(()=>{})}}qf(zf,"chartCount",0),qf(zf,"tradingTimes",void 0),qf(zf,"processedSymbols",void 0),qf(zf,"symbolMap",{}),qf(zf,"categorizedSymbols",[]);const $f=zf;function Gf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Wf{constructor({getContext:t,getItems:e,onItemSelected:r}){Gf(this,"getContext",void 0),Gf(this,"getItems",void 0),Gf(this,"onItemSelected",void 0),br(this,{onItemClick:Be.bound}),this.getContext=t,this.getItems=e,this.onItemSelected=r}onItemClick(t,e){this.onItemSelected&&this.onItemSelected(e)}}function Kf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Qf{get showTabs(){return!!this.description}constructor({mainStore:t,onChanged:e,onDeleted:r}){Kf(this,"mainStore",void 0),Kf(this,"menuStore",void 0),Kf(this,"onChanged",void 0),Kf(this,"onDeleted",void 0),Kf(this,"items",[]),Kf(this,"title",""),Kf(this,"formTitle",""),Kf(this,"formClassname",""),Kf(this,"description",""),Kf(this,"activeTab","settings"),Kf(this,"scrollPanel",void 0),Kf(this,"dialogPortalNodeId",void 0),Kf(this,"freezeScroll",!1),Kf(this,"id",""),Kf(this,"flutter_chart_id",""),Kf(this,"checkDropdownOpen",()=>{let t=!1;this.scrollPanel&&(this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown").forEach(e=>{-1!==e.className.indexOf("active")&&(t=!0)}),this.setFreezeScroll(t))}),br(this,{items:Mt,title:Mt,formTitle:Mt,formClassname:Mt,description:Mt,activeTab:Mt,showTabs:Vt,scrollPanel:Mt,dialogPortalNodeId:Mt,freezeScroll:Mt,open:Vt,setFreezeScroll:Be.bound,setOpen:Be.bound,onResetClick:Be.bound,onItemDelete:Be.bound,onItemChange:Be.bound,itemGroups:Vt,setScrollPanel:Be.bound}),this.mainStore=t,this.onChanged=e,this.onDeleted=r,this.menuStore=new hf(t,{route:"indicator-setting"}),qe(()=>this.open,()=>{if(!this.scrollPanel||!this.open)return;const t=this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown");this.scrollPanel.addEventListener("click",()=>{this.setFreezeScroll(!1)}),t.forEach(t=>{t.addEventListener("click",()=>setTimeout(()=>this.checkDropdownOpen(),50))}),this.setFreezeScroll(!1)},{delay:300})}get context(){return this.mainStore.chart.context}get theme(){return this.mainStore.chartSetting.theme}get open(){return this.menuStore.open}setFreezeScroll(t){this.freezeScroll=t}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}onResetClick(){const t=this.items.map(t=>({...t,value:na(t.defaultValue)}));this.items=t,this.onChanged(t)}onItemDelete(){this.menuStore.setOpen(!1),this.onDeleted&&this.onDeleted(this.id)}onItemChange(t,e){t&&t.value!==e&&(t.value=e,this.items=this.items.slice(0),this.onChanged(this.items))}get itemGroups(){const t=[],e=[];e.push({key:"%k",title:"%K",fields:[]}),e.push({key:"%d",title:"%D",fields:[]}),e.push({key:"over_bought",title:"Over Bought",fields:[]}),e.push({key:"over_sold",title:"OverSold",fields:[]}),e.push({key:"show_zones",title:"Show Zones",fields:[]});for(const r in this.items){const i=this.items[r],{group_key:a,title:s}=i,n=e.find(t=>a===t.key);n?(i.subtitle=s.replace(n.key,"").trim(),n.fields.push(i)):t.push(i)}return e.unshift({key:"others",title:this.formTitle||this.title,fields:t}),e}setScrollPanel(t){this.scrollPanel=t}}function Yf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Xf=[...mm].filter(t=>!t.candleOnly).map(t=>t.id);class Zf{constructor(t){Yf(this,"chartTypes",[]),Yf(this,"listStore",void 0),Yf(this,"mainStore",void 0),Yf(this,"menuStore",void 0),Yf(this,"settingsDialog",void 0),Yf(this,"type",mm.find(t=>"line"===t.id)),Yf(this,"onChartTypeChanged",void 0),Yf(this,"onContextReady",()=>{this.chartTypes=[...mm]}),br(this,{type:Mt,updateProps:Be.bound,setChartType:Be.bound,setType:Be.bound,isTypeCandle:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"chart-type"}),this.listStore=new Wf({getContext:()=>this.context,getItems:()=>this.types}),this.settingsDialog=new Qf({mainStore:t,onChanged:()=>null}),qe(()=>this.mainStore.state.chartType,()=>{void 0!==this.mainStore.state.chartType&&this.setType(this.mainStore.state.chartType)})}get context(){return this.mainStore.chart.context}get chartTypeProp(){return this.mainStore.state.chartType}get isCandle(){return!!this.type&&-1===Xf.indexOf(this.type.id)}get isSpline(){return"spline"===this.type.id}setChartType(t){t&&this.setType(t)}setType(t){let e;jm(Tm.ChartControl,km.ChartType,t),e="string"!=typeof(t=t||"line")?t:this.types.find(e=>e.id===t),e&&e.id!==this.type.id&&(this.type=e)}updateProps(t){this.onChartTypeChanged=t}get types(){const t=0===this.mainStore.chart.granularity;return void 0!==this.chartTypes&&0!==this.chartTypes.length||(this.chartTypes=[...mm]),this.chartTypes.map(e=>({...e,active:e.id===this.type.id,disabled:!!e.candleOnly&&t}))}isTypeCandle(t){return"string"==typeof t&&(t=this.types.find(e=>e.id===t)||this.types[0]),-1===Xf.indexOf(t.id)}}function Jf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class t_{constructor(t){Jf(this,"mainStore",void 0),Jf(this,"menuStore",void 0),this.mainStore=t,this.menuStore=new hf(t,{route:"chart-mode"})}}const e_=Bm["__core-js_shared__"];var r_,i_=(r_=/[^.]+$/.exec(e_&&e_.keys&&e_.keys.IE_PROTO||""))?"Symbol(src)_1."+r_:"";var a_=Function.prototype.toString;var s_=/^\[object .+?Constructor\]$/,n_=Function.prototype,o_=Object.prototype,l_=n_.toString,c_=o_.hasOwnProperty,h_=RegExp("^"+l_.call(c_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const u_=function(t){return!(!Dm(t)||(e=t,i_&&i_ in e))&&(function(t){if(!Dm(t))return!1;var e=Qm(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?h_:s_).test(function(t){if(null!=t){try{return a_.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e},d_=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return u_(r)?r:void 0},g_=function(){try{var t=d_(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),p_=function(t,e){return t===e||t!=t&&e!=e};var m_=Object.prototype.hasOwnProperty;const f_=function(t,e,r){var i=t[e];m_.call(t,e)&&p_(i,r)&&(void 0!==r||e in t)||function(t,e,r){"__proto__"==e&&g_?g_(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}(t,e,r)},__=Array.isArray;var v_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b_=/^\w*$/;const y_=d_(Object,"create");var S_=Object.prototype.hasOwnProperty;var x_=Object.prototype.hasOwnProperty;function w_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}w_.prototype.clear=function(){this.__data__=y_?y_(null):{},this.size=0},w_.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},w_.prototype.get=function(t){var e=this.__data__;if(y_){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return S_.call(e,t)?e[t]:void 0},w_.prototype.has=function(t){var e=this.__data__;return y_?void 0!==e[t]:x_.call(e,t)},w_.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=y_&&void 0===e?"__lodash_hash_undefined__":e,this};const C_=w_,T_=function(t,e){for(var r=t.length;r--;)if(p_(t[r][0],e))return r;return-1};var k_=Array.prototype.splice;function j_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}j_.prototype.clear=function(){this.__data__=[],this.size=0},j_.prototype.delete=function(t){var e=this.__data__,r=T_(e,t);return!(r<0||(r==e.length-1?e.pop():k_.call(e,r,1),--this.size,0))},j_.prototype.get=function(t){var e=this.__data__,r=T_(e,t);return r<0?void 0:e[r][1]},j_.prototype.has=function(t){return T_(this.__data__,t)>-1},j_.prototype.set=function(t,e){var r=this.__data__,i=T_(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};const A_=j_,O_=d_(Bm,"Map"),E_=function(t,e){var r,i,a=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?a["string"==typeof e?"string":"hash"]:a.map};function N_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}N_.prototype.clear=function(){this.size=0,this.__data__={hash:new C_,map:new(O_||A_),string:new C_}},N_.prototype.delete=function(t){var e=E_(this,t).delete(t);return this.size-=e?1:0,e},N_.prototype.get=function(t){return E_(this,t).get(t)},N_.prototype.has=function(t){return E_(this,t).has(t)},N_.prototype.set=function(t,e){var r=E_(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this};const I_=N_;function P_(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,a=e?e.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var n=t.apply(this,i);return r.cache=s.set(a,n)||s,n};return r.cache=new(P_.Cache||I_),r}P_.Cache=I_;const D_=P_;var L_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M_=/\\(\\)?/g;const B_=function(t){var e=D_(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(L_,function(t,r,i,a){e.push(i?a.replace(M_,"$1"):r||t)}),e});var R_=Um?Um.prototype:void 0,F_=R_?R_.toString:void 0;const V_=function t(e){if("string"==typeof e)return e;if(__(e))return function(t,e){for(var r=-1,i=null==t?0:t.length,a=Array(i);++r<i;)a[r]=e(t[r],r,t);return a}(e,t)+"";if(Ym(e))return F_?F_.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},H_=function(t,e){return __(t)?t:function(t,e){if(__(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ym(t))||b_.test(t)||!v_.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:B_(function(t){return null==t?"":V_(t)}(t))};var U_=/^(?:0|[1-9]\d*)$/;const q_=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&U_.test(t))&&t>-1&&t%1==0&&t<e},z_=function(t){if("string"==typeof t||Ym(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},$_=function(t,e,r){return null==t?t:function(t,e,r,i){if(!Dm(t))return t;for(var a=-1,s=(e=H_(e,t)).length,n=s-1,o=t;null!=o&&++a<s;){var l=z_(e[a]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(a!=n){var h=o[l];void 0===(c=i?i(h,l,o):void 0)&&(c=Dm(h)?h:q_(e[a+1])?[]:{})}f_(o,l,c),o=o[l]}return t}(t,e,r)};function G_(){let t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return"__"+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()+"__"}function W_(t){const e=t.replace("#","0xff");return parseInt(e,16)}function K_(t){return t&&"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):""}function Q_(t){return`#${("000000"+(16777215&t).toString(16).toUpperCase()).slice(-6)}`}var Y_=h(9160).t;function X_(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Z_{constructor(t){X_(this,"mainStore",void 0),X_(this,"menuStore",void 0),X_(this,"searchInput",void 0),X_(this,"settingsDialog",void 0),X_(this,"selectedTab",1),X_(this,"filterText",""),X_(this,"activeItems",[]),X_(this,"infoItem",null),X_(this,"portalNodeIdChanged",""),X_(this,"currentHoverIndex",null),X_(this,"previousHoverIndex",null),X_(this,"searchInputClassName",void 0),X_(this,"onContextReady",()=>{this.renderLegend()}),X_(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return W_(t);if(oa(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),X_(this,"addOrUpdateIndicator",(t,e)=>{const r=t.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if(oa(a)&&i){const e=a;Object.keys(e).forEach(r=>{$_(t,i[r],e[r])})}else r&&$_(t,r,a);return t},t.config||{}),i={id:t.id,name:t.flutter_chart_id,title:(t.short_name_and_index+(t.bars?` (${t.bars})`:"")).toUpperCase(),...this.transform(r)};this.mainStore.chartAdapter.flutterChart?.app.addOrUpdateIndicator(JSON.stringify(i),e)}),X_(this,"renderLegend",()=>{this.context&&this.updateStyle()}),X_(this,"getIndicatorProps",t=>{return(e=sm(),r=t=>t.items,e.reduce((t,e)=>[...t,...r(e)],[])).find(e=>e?.flutter_chart_id===t);var e,r}),br(this,{selectedTab:Mt,filterText:Mt,activeItems:Mt,infoItem:Mt,portalNodeIdChanged:Mt,onSelectItem:Be.bound,updateStyle:Be.bound,updateProps:Be.bound,editStudy:Be.bound,editStudyByIndex:Be.bound,deleteStudy:Be.bound,deleteStudyById:Be.bound,updateStudy:Be.bound,deletePredictionStudies:Be.bound,deleteAllStudies:Be.bound,onSelectTab:Be.bound,setFilterText:Be.bound,onInfoItem:Be.bound,updatePortalNode:Be.bound,restoreStudies:Be.bound,getItemById:Be.bound,setIndicator:Be.bound,highlightIndicator:Be.bound,clearHoverItem:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"indicators"}),this.settingsDialog=new Qf({mainStore:t,onDeleted:this.deleteStudyById,favoritesId:"indicators",onChanged:t=>this.updateStudy(t)}),this.searchInput=yi().createRef(),qe(()=>this.menuStore.open,()=>{this.menuStore.open||this.setFilterText(""),setTimeout(()=>{this.searchInput&&this.searchInput.current&&this.searchInput.current.focus()},400)})}get context(){return this.mainStore.chart.context}get items(){return[...sm()].map(t=>("trend"===t.name&&(t.icon="light"===this.mainStore.chartSetting.theme?up:dp),t))}get searchedItems(){return[...sm()].map(t=>(t.foundItems=t.items.filter(t=>-1!==t.name.toLowerCase().indexOf(this.filterText.toLowerCase().trim())),t)).filter(t=>t.foundItems?.length)}get hasPredictionIndicator(){return(this.activeItems||[]).filter(t=>t.isPrediction).length>0}get maxAllowedItem(){return this.mainStore.chart.isMobile?2:5}onSelectItem(t){if(this.onInfoItem(null),this.activeItems.length>=this.maxAllowedItem)return;this.changeStudyPanelTitle(),jm(Tm.ChartControl,km.Indicator,`Add ${t}`);const e=this.getIndicatorProps(t),{parameters:r,config:i}=pm(t);if(e&&r){r.map(t=>t.value=na(t.defaultValue));const t=ra(this.settingsDialog.flutter_chart_id,r),a=this.findLastActiveItem(e.flutter_chart_id),s=a?a.group_length+1:0,n={...e,group_length:s,short_name_and_index:e.short_name+(s?` ${s}`:""),id:G_(),config:i,parameters:r,bars:t.bars};sa(r,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(n),this.activeItems.push(n),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.mainStore.state.saveLayout()}}async restoreStudies(t){this.deleteAllStudies(),t.forEach((e,r)=>{const i=this.getIndicatorProps(e.flutter_chart_id);i?(this.addOrUpdateIndicator(e),Object.assign(e,i)):t.splice(r,1)}),this.activeItems=t,this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.cleanupPredictionIndicator()}updateTheme(){this.activeItems.forEach((t,e)=>{sa(t.parameters,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(t,e)}),this.mainStore.state.saveLayout()}updateStyle(){const t=this.mainStore.studies.activeItems.length>2;this.mainStore.state.setShouldMinimiseLastDigit(t)}updateProps({searchInputClassName:t}){this.searchInputClassName=t}editStudyByIndex(t){const e=this.activeItems[t];e&&this.editStudy(e)}editStudy(t){jm(Tm.ChartControl,km.Indicator,`Edit ${t.flutter_chart_id}`),this.settingsDialog.id=t.id,this.settingsDialog.flutter_chart_id=t.flutter_chart_id,this.settingsDialog.items=t.parameters,this.settingsDialog.title=t.name,this.settingsDialog.formTitle=Y_.translate("Result"),this.settingsDialog.formClassname=`form--${t.id.toLowerCase().replace(/ /g,"-")}`,this.settingsDialog.description="",this.settingsDialog.dialogPortalNodeId=this.portalNodeIdChanged,this.settingsDialog.setOpen(!0)}deleteStudyById(t){const e=this.activeItems.findIndex(e=>e.id===t);this.mainStore.chartAdapter.flutterChart?.indicators.removeIndicator(e),this.deleteStudy(e)}deleteStudy(t){jm(Tm.ChartControl,km.Indicator,`Remove ${t}`),this.mainStore.state.stateChange(bm,{indicator_type_name:this.activeItems[t].flutter_chart_id,indicators_category_name:Cm(this.activeItems[t].flutter_chart_id)}),this.activeItems.splice(t,1),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.renderLegend(),this.mainStore.state.saveLayout()}updateStudy(t){this.changeStudyPanelTitle();const e=this.getIndicatorProps(this.settingsDialog.flutter_chart_id),{config:r}=pm(this.settingsDialog.flutter_chart_id)||{};if(e&&t){const i=ra(this.settingsDialog.flutter_chart_id,t),a=this.activeItems.findIndex(t=>t.id===this.settingsDialog.id),s=this.activeItems[a],n={...e,short_name_and_index:e.short_name+(s.group_length?` ${s.group_length}`:""),group_length:s.group_length,id:this.settingsDialog.id,bars:i.bars,parameters:t,config:r};this.activeItems[a]=n,this.mainStore.state.stateChange("INDICATOR_EDITED",{indicator_type_name:n.flutter_chart_id,indicators_category_name:Cm(n.flutter_chart_id)}),this.addOrUpdateIndicator(n,a),this.mainStore.state.saveLayout()}}changeStudyPanelTitle(){this.mainStore.chart.isMobile&&this.mainStore.state.saveLayout()}deletePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(t.forEach(t=>{this.mainStore.state.stateChange(bm),this.deleteStudyById(t.id)}),this.mainStore.state.saveLayout())}savePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&Ui("predictionIndicators",t)}cleanupPredictionIndicator(){localStorage.getItem("predictionIndicators")&&localStorage.removeItem("predictionIndicators")}deleteAllStudies(){this.activeItems=[],window.flutterChart?.indicators.clearIndicators(),this.mainStore.state.saveLayout()}onSelectTab(t){this.setFilterText(""),this.selectedTab=t,this.onInfoItem(null)}setFilterText(t){this.selectedTab=""!==t?0:1,this.filterText=t,this.mainStore.state.debouncedStateChange("INDICATOR_SEARCH",{search_string:t})}onInfoItem(t){this.infoItem=t?{...t,disabledAddBtn:t.isPrediction&&this.mainStore.timeperiod.isTick}:t}setIndicator(t,e){this.addOrUpdateIndicator(t,e)}highlightIndicator(t){if(this.currentHoverIndex=t,this.previousHoverIndex!==this.currentHoverIndex){if("number"==typeof this.previousHoverIndex&&this.clearHoverItem(this.previousHoverIndex),null!=t){const e=na(this.activeItems[t]);if(e&&e.config){for(const t in e.config)t.includes("Style")&&(e.config[t].thickness=2,"scatterStyle"===t&&(e.config[t].radius=2.5)),t.includes("Styles")&&e.config[t].forEach(t=>{t.thickness=2});this.setIndicator(e,t)}}this.previousHoverIndex=t}}clearHoverItem(t){const e=this.activeItems[t];e&&this.setIndicator(e,t)}updatePortalNode(t){this.portalNodeIdChanged=t}findLastActiveItem(t){for(let e=this.activeItems.length-1;e>=0;e--)if(this.activeItems[e].flutter_chart_id===t)return this.activeItems[e]}getItemById(t){return this.activeItems.find(e=>e.id===t)}}function J_(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class tv{constructor(t){J_(this,"_pervDrawingObjectCount",0),J_(this,"_previousDrawingTools",[]),J_(this,"mainStore",void 0),J_(this,"menuStore",void 0),J_(this,"settingsDialog",void 0),J_(this,"activeToolsGroup",[]),J_(this,"portalNodeIdChanged",void 0),J_(this,"seletedDrawToolConfig",null),J_(this,"selectedToolId",null),J_(this,"showConfirmationToast",!1),J_(this,"confirmationMessage",""),J_(this,"showDeletionSnackbar",!1),J_(this,"deletedToolName",""),J_(this,"addingStateInfo",{currentStep:0,totalSteps:0,isFinished:!0}),J_(this,"floatingMenuPosition",void 0),J_(this,"getDrawToolsItems",()=>{const t=am();return Object.keys(t).map(e=>t[e])}),J_(this,"drawingToolsRepoArray",()=>this.mainStore.chartAdapter.flutterChart?.drawingTool.getDrawingToolsRepoItems().map(t=>Hi(t)).filter(t=>t)),J_(this,"onContextReady",()=>{document.addEventListener("keydown",this.closeOnEscape,!1),document.addEventListener("dblclick",this.doubleClick)}),J_(this,"closeOnEscape",t=>{27===t.keyCode&&(this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished())}),J_(this,"doubleClick",()=>this.drawingFinished()),J_(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return W_(t);if(oa(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),J_(this,"updateFloatingMenuPosition",({x:t,y:e})=>{this.floatingMenuPosition={x:t,y:e},this.mainStore.chartAdapter.flutterChart?.drawingTool.updateFloatingMenuPosition(t,e)}),J_(this,"setSelectedTool",t=>{this.selectedToolId=t,this.showConfirmationToast=!0}),J_(this,"clearSelectedTool",()=>{this.selectedToolId=null,this.showConfirmationToast=!1}),J_(this,"startAddingNewTool",t=>{this.setSelectedTool(t),this.menuStore.setOpen(!1),this.mainStore.chartAdapter.flutterChart?.drawingTool.startAddingNewTool(t)}),J_(this,"cancelAddingNewTool",()=>{this.mainStore.chartAdapter.flutterChart?.drawingTool.cancelAddingNewTool(),this.hideDrawingConfirmation()}),J_(this,"hideDrawingConfirmation",()=>{this.showConfirmationToast=!1,this.confirmationMessage="",this.resetAddingState(),this.clearSelectedTool()}),J_(this,"hideDeletionSnackbar",()=>{this.showDeletionSnackbar=!1,this.deletedToolName=""}),J_(this,"showDeletionSnackbarForDeletedTool",t=>{this.deletedToolName=t,this.showDeletionSnackbar=!0}),J_(this,"cancelDrawingTool",()=>{this.hideDrawingConfirmation(),this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished()}),J_(this,"updateAddingState",(t,e)=>{this.addingStateInfo={currentStep:t,totalSteps:e,isFinished:t===e}}),J_(this,"resetAddingState",()=>{this.addingStateInfo={currentStep:0,totalSteps:0,isFinished:!0}}),J_(this,"updateProps",t=>{t.drawingToolFloatingMenuPosition&&this.updateFloatingMenuPosition(t.drawingToolFloatingMenuPosition)}),J_(this,"handleStateChange",(t,e,r)=>{this.mainStore.state.stateChange(e,{drawing_tool_name:t,...r??{}})}),br(this,{activeToolsGroup:Mt,portalNodeIdChanged:Mt,selectedToolId:Mt,showConfirmationToast:Mt,confirmationMessage:Mt,showDeletionSnackbar:Mt,deletedToolName:Mt,addingStateInfo:Mt,floatingMenuPosition:Mt,activeToolsNo:Vt,destructor:Be.bound,drawingFinished:Be.bound,clearAll:Be.bound,updateActiveToolsGroup:Be.bound,onDeleted:Be.bound,updatePortalNode:Be.bound,onLoad:Be.bound,onToolAdded:Be.bound,hideDrawingConfirmation:Be.bound,hideDeletionSnackbar:Be.bound,showDeletionSnackbarForDeletedTool:Be.bound,cancelDrawingTool:Be.bound,updateAddingState:Be.bound,resetAddingState:Be.bound,updateProps:Be.bound,updateFloatingMenuPosition:Be.bound,setSelectedTool:Be.bound,clearSelectedTool:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"draw-tool"}),this.settingsDialog=new Qf({mainStore:t,onDeleted:t=>{const e=this.drawingToolsRepoArray(),r=e?.findIndex(e=>e.configId===t);void 0!==r&&r>-1&&this.onDeleted(r)},onChanged:()=>{}}),cr(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get stateStore(){return this.mainStore.state}get activeToolsNo(){return this.activeToolsGroup.reduce((t,e)=>t+e.items.length,0)}destructor(){document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("dblclick",this.doubleClick)}updateTheme(){this.activeToolsGroup.forEach(t=>t.items.forEach(t=>{sa(t.parameters,this.mainStore.chartSetting.theme)}))}onLoad(t){this.activeToolsGroup=[],t.forEach(t=>{if("string"==typeof t&&(t=Hi(t)),!t)return;const e=t.name.replace("dt_","");if(e){const r=this.processDrawTool(e);r.config=t,r.parameters.forEach(e=>{e.path&&(["lineStyle","fillStyle"].includes(e.path)?e.value=Q_(t[e.path]?.color?.value??t[e.path]?.color):"enableLabel"===e.path&&(e.value=t[e.path]))}),this.updateActiveToolsGroup(r)}});const e=this.drawingToolsRepoArray();e&&(this._previousDrawingTools=JSON.parse(JSON.stringify(e)))}onToolAdded(t){t.lineStyle&&this.handleStateChange(t.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_ADD",{drawing_tool_name:t.name?.replace("dt_","")||"unknown",pxthickness:`default_${t.lineStyle.thickness}px`,color_name:`default_${Q_(Number(t.lineStyle.color)).replace("#","")}`})}drawingFinished(){this.hideDrawingConfirmation()}clearAll(){this.activeToolsGroup=[],window.flutterChart?.drawingTool.clearDrawingTool(),jm(Tm.ChartControl,km.DrawTools,"Clear All")}processDrawTool(t){const e=am()[t],{parameters:r,config:i}=hm[t]();sa(r,this.mainStore.chartSetting.theme),sa(i,this.mainStore.chartSetting.theme);let a=null;if(e&&r){r.map(t=>t.value=na(t.defaultValue));const s={config:i,parameters:r,bars:"0",...e},n=s.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if(oa(a)&&i){const e=a;Object.keys(e).forEach(r=>{$_(t,i[r],e[r])})}else r&&$_(t,r,a);return t},s.config||{});a={...{id:s.id,name:`dt_${t}`,title:K_(s.id),...this.transform(n)},...am()[t],parameters:r,index:this.activeToolsNo}}return a}onUpdate(){const t=this.drawingToolsRepoArray();if(t){if(this._previousDrawingTools&&this._previousDrawingTools.length===t.length)for(let e=0;e<t.length;e++)JSON.stringify(this._previousDrawingTools[e])!==JSON.stringify(t[e])&&this._identifyChanges(this._previousDrawingTools[e],t[e]);this._previousDrawingTools=JSON.parse(JSON.stringify(t)),this.onLoad(t)}}_identifyChanges(t,e){if(!t||!e)return"Complete replacement";Object.keys(e).forEach(r=>{["lineStyle","fillStyle"].includes(r)&&"object"==typeof e[r]&&null!==e[r]&&"object"==typeof t[r]&&null!==t[r]&&(e[r].color!==t[r].color&&this.handleStateChange(e.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_EDIT_COLOR",{drawing_tool_name:e.name?.replace("dt_","")||"unknown",color_name:`${Q_(e[r].color).replace("#","")}`}),e[r].thickness!==t[r].thickness&&this.handleStateChange(e.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_EDIT_PX",{drawing_tool_name:e.name?.replace("dt_","")||"unknown",pxthickness:`${e[r].thickness}px`}))})}updateActiveToolsGroup(t){const e=[...this.activeToolsGroup],r=e.findIndex(e=>e.id===t.id);if(-1===r)e.push({id:t.id,items:[t]});else{const i=e[r];i.items.push({...t,num:i.items.length}),e[r]=i}this.activeToolsGroup=e}onDeleted(t){if(void 0!==t){const e=this.drawingToolsRepoArray(),r=e?e[t]:null;if(r){const e={...r};this.mainStore.chartAdapter.flutterChart?.drawingTool.removeDrawingTool(t),this.handleStateChange(e.name?.replace("dt_","")||"unknown",xm,{pxthickness:e.lineStyle?.thickness?`${e.lineStyle.thickness}px`:void 0,color_name:e.lineStyle?.color?`${Q_(Number(e.lineStyle.color)).replace("#","")}`:void 0})}t&&r&&jm(Tm.ChartControl,km.DrawTools,`Remove ${t}`)}}updatePortalNode(t){this.portalNodeIdChanged=t}}function ev(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class rv{constructor(){ev(this,"className",""),ev(this,"price",0),ev(this,"isIncrease",!1),ev(this,"status",""),ev(this,"oldPrice",0),br(this,{price:Mt,isIncrease:Mt,status:Mt,setPrice:Be.bound})}setPrice(t,e){const r=e||+this.oldPrice,i=+t;let a=!1;if(i>r)a=!0,this.status="up";else{if(!(i<r))return void(this.status="");this.status="down"}this.price=t,this.oldPrice=this.price,this.isIncrease=a}}var iv=h(9160).t;function av(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class sv{constructor({getCategoricalItems:t,onSelectItem:e,getIsShown:r,placeholderText:i,favoritesId:a,mainStore:s,id:n,getCurrentActiveCategory:o,getCurrentActiveSubCategory:l,getCurrentActiveMarket:c,searchInputClassName:h}){av(this,"activeMarket",void 0),av(this,"activeSubCategory",""),av(this,"categoryElements",void 0),av(this,"favoritesId",void 0),av(this,"getCategoricalItems",void 0),av(this,"getCurrentActiveCategory",void 0),av(this,"getCurrentActiveMarket",void 0),av(this,"getCurrentActiveSubCategory",void 0),av(this,"id",void 0),av(this,"isInit",void 0),av(this,"mainStore",void 0),av(this,"onSelectItem",void 0),av(this,"pauseScrollSpy",!1),av(this,"searchInput",void 0),av(this,"searchInputClassName",void 0),av(this,"placeholderText",void 0),av(this,"isShown",!1),av(this,"scrollPanel",void 0),av(this,"filterText",""),av(this,"activeCategoryKey",""),av(this,"focusedCategoryKey",null),av(this,"isScrollingDown",!1),av(this,"activeHeadKey",""),av(this,"scrollTop",void 0),av(this,"isUserScrolling",!0),av(this,"lastFilteredItems",[]),av(this,"activeCategories",[]),br(this,{isShown:Mt,scrollPanel:Mt,filterText:Mt,activeCategoryKey:Mt,focusedCategoryKey:Mt,isScrollingDown:Mt,activeHeadKey:Mt,init:Be.bound,favoritesCategoryData:Vt,getFavorites:Be.bound,filteredItems:Vt,updateScrollSpy:Be.bound,scrollUp:Be.bound,scrollDown:Be.bound,setCategoryElement:Be.bound,setFilterText:Be.bound,handleFilterClick:Be.bound,setScrollPanel:Be.bound,handleTitleClick:Be.bound,scrollToActiveSymbol:Be.bound}),qe(()=>r&&r()&&this.scrollPanel,()=>{r()&&this.scrollPanel&&this.scrollToActiveSymbol()},{delay:200}),this.getCategoricalItems=t,this.onSelectItem=e,this.favoritesId=a,this.id=n,this.categoryElements={},this.mainStore=s,this.getCurrentActiveCategory=o,this.getCurrentActiveSubCategory=l,this.getCurrentActiveMarket=c,this.isInit=!1,this.searchInput=yi().createRef(),this.searchInputClassName=h,this.placeholderText=i}get chart(){return this.mainStore.chart}get context(){return this.chart.context}get height(){return this.chart.chartContainerHeight?this.chart.chartContainerHeight-(this.chart.isMobile?0:120):0}init(){if(this.isInit=!0,""===this.activeCategoryKey&&this.filteredItems.length>0)for(const t of this.filteredItems)if(this.categoryElements[t.categoryId]){this.activeCategoryKey=t.categoryId;break}}get favoritesCategoryData(){return Object.keys(this.mainStore.favorites.favoritesMap[this.favoritesId])||[]}getFavorites(){this.pauseScrollSpy=!0;const t={categoryName:iv.translate("Favorites"),categoryId:"favorite",hasSubcategory:!1,hasSubgroup:!1,active:!0,subgroups:[],emptyDescription:iv.translate("There are no favorites yet.")};return setTimeout(()=>{this.pauseScrollSpy=!1},20),t}get filteredItems(){let t=function(t,e=t=>t){const r=[];for(const i of t)if(i.hasSubgroup){const t=i.subgroups.map(t=>Zi(t,e));r.push({...i,subgroups:t})}else r.push(Zi(i,e));return r}(this.getCategoricalItems());const e=this.activeCategories.length?this.activeCategories:[this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite"];for(const r of t)if(e.includes(r.categoryId))r.active=!0;else if(r.hasSubgroup)for(const t of r.subgroups)e.includes(t.categoryId)&&(t.active=!0);if(this.favoritesId){const e={...this.getFavorites(),data:this.favoritesCategoryData},r=t=>{const i=[];return t.hasSubgroup&&"categoryName"in t?t.subgroups.forEach(t=>t.data.forEach(t=>{const e=r(t);i.push(...e)})):t.hasSubcategory?t.data.forEach(t=>{const e=r(t);i.push(...e)}):e.data.forEach(e=>{if("string"==typeof e){const r=t.data.find(t=>t.itemId===e);r&&i.push(r)}}),i},i=e.data.filter(t=>"string"!=typeof t);t.forEach(t=>{const e=r(t);i.push(...e)}),e.data=i.filter(t=>t),t.unshift(e)}if(""===this.filterText)return this.lastFilteredItems=t,t;let r=!1;const i=this.filterText.split(" ").filter(t=>""!==t).map(t=>t.toLowerCase().trim()),a=t=>{t.data=t.data.filter(t=>{return e=t.display||("object"==typeof t.dataObject?t.dataObject.symbol:""),i.reduce((t,r)=>e.toLowerCase().includes(r)&&t,!0);var e}),t.data.length&&(r=!0)};for(const e of t)if(e.active=!0,e.hasSubgroup){e.subgroups=or(e.subgroups);for(const t of e.subgroups){t.active=!0;for(const e of t.data)a(e)}}else if(e.hasSubcategory)for(const t of e.data)a(t);else a(e);return r||(t=this.lastFilteredItems),this.pauseScrollSpy||(this.lastFilteredItems=t),t}updateScrollSpy(){if(this.pauseScrollSpy||!this.scrollPanel)return;if(0===this.filteredItems.length)return;const t=this.scrollPanel.getBoundingClientRect().top;let e=null;for(const r of this.filteredItems){const i=this.categoryElements[r.categoryId],a=57;if(!i)return;const s=this.filteredItems.indexOf(r)*(r.hasSubgroup?r.subgroups.length+1*a:a),n=i.getBoundingClientRect();n.top-t-s<0&&(e=r.hasSubgroup?r.subgroups[r.subgroups.length>1?+(n.top<0):0]?.categoryId:r?.categoryId)}const r=this.scrollPanel.getBoundingClientRect().top;this.scrollTop&&this.scrollTop>r?this.scrollUp():this.scrollDown(),this.scrollTop=r,this.focusedCategoryKey=e||this.filteredItems[0].categoryId,this.activeHeadKey=0===this.scrollTop?null:this.focusedCategoryKey}scrollUp(){this.isScrollingDown=!1}scrollDown(){this.isScrollingDown=this.isUserScrolling,this.isUserScrolling=!0}setCategoryElement(t,e){this.categoryElements[e]=t}setFilterText(t){this.filterText=t,this.isUserScrolling=!1,this.updateScrollSpy(),""===t&&setTimeout(()=>this.scrollToActiveSymbol(),1),this.mainStore.state.debouncedStateChange("MARKET_SEARCH",{search_string:t})}handleFilterClick(t){this.focusedCategoryKey="";const e=this.categoryElements[t],r=40*Object.keys(this.categoryElements).indexOf(t);e&&(this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&(this.chart.isMobile?this.scrollPanel.scroll({top:e.offsetTop-95,left:0,behavior:"smooth"}):this.scrollPanel.scrollTop=e.offsetTop-r),this.focusedCategoryKey=t,this.activeHeadKey=null,setTimeout(()=>{this.pauseScrollSpy=!1},20))}setScrollPanel(t){this.scrollPanel=t}handleTitleClick(t){this.activeCategories=[];for(const e of this.filteredItems){if(e.hasSubgroup?e.subgroups?.filter(e=>e.categoryId===t).length>0:e.categoryId===t){if(e.hasSubgroup)for(const r of e.subgroups)r.categoryId===t&&(r.active=!r.active);e.active=!e.active,setTimeout(()=>this.handleFilterClick(e.categoryId),250)}if(e.active&&e.hasSubgroup)for(const t of e.subgroups)t.active&&this.activeCategories.push(t.categoryId);else e.active&&"favorite"!==e.categoryId&&this.activeCategories.push(e.categoryId)}setTimeout(()=>this.updateScrollSpy(),0)}scrollToActiveSymbol(){this.focusedCategoryKey=null,this.activeCategoryKey=this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite",this.activeSubCategory=this.getCurrentActiveSubCategory?this.getCurrentActiveSubCategory():"",this.activeMarket=this.getCurrentActiveMarket?this.getCurrentActiveMarket():"";const t=this.categoryElements[this.activeCategoryKey],e=`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__category__content--${this.activeSubCategory}`,r=this.scrollPanel?.querySelector(e),i=`${e} .sc-mcd__item--${this.activeMarket}`,a=this.scrollPanel?.querySelector(i);if(this.activeHeadKey=this.activeCategoryKey||null,this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&t&&this.scrollPanel)if(this.scrollPanel.scrollTop=t.offsetTop,a){const e=this.mainStore.chart.isMobile?100:40;this.scrollPanel.scrollTop=t.offsetTop+a.offsetTop-e}else if(r){const e=this.mainStore.chart.isMobile?100:0;this.scrollPanel.scrollTop=t.offsetTop+r.offsetTop-e}if(setTimeout(()=>{this.pauseScrollSpy=!1},20),this.isInit||this.init(),this.mainStore.chart.isMobile||setTimeout(()=>this.searchInput.current&&this.searchInput.current.focus(),0),!this.mainStore.chart.isMobile){const t=Object.keys(this.categoryElements),e=t.filter(t=>null!==this.categoryElements[t]),r=t[t.length-1],i=this.height-(64+40*(e.length-1)),a=this.categoryElements[r];a&&(a.style.minHeight=`${i}px`)}}}var nv=h(9160).t;function ov(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class lv{constructor(t){ov(this,"animatedPrice",void 0),ov(this,"categoricalDisplay",void 0),ov(this,"mainStore",void 0),ov(this,"menuStore",void 0),ov(this,"serverTime",void 0),ov(this,"todayChange",null),ov(this,"todayChangePercent",null),ov(this,"isVisible",!1),ov(this,"openMarket",{}),ov(this,"enableShowPrice",!1),ov(this,"searchInputClassName",void 0),ov(this,"onContextReady",()=>{this.chart.feed?.onMasterDataUpdate(this.update),this.update(),this.tradingTimes?.onMarketOpenCloseChanged(Be(t=>{for(const e in t)this.currentSymbol?.symbol===e&&(this.currentSymbol.exchange_is_open=t[e])}))}),ov(this,"onMouseEnter",()=>this.crosshairStore.setTemporaryDisabled(!0)),ov(this,"onMouseLeave",()=>this.crosshairStore.setTemporaryDisabled(!1)),br(this,{todayChange:Mt,todayChangePercent:Mt,isVisible:Mt,openMarket:Mt,currentSymbol:Vt,isSymbolOpen:Vt,decimalPlaces:Vt,isShowChartPrice:Vt,tradingTimes:Vt,symbolOpenTime:Vt,currentActiveCategory:Vt,currentActiveSubCategory:Vt,currentActiveMarket:Vt,setSymbol:Be.bound,update:Be.bound,hidePrice:Be.bound,updateProps:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"chart-title"}),this.animatedPrice=new rv,this.categoricalDisplay=new sv({getCategoricalItems:()=>this.mainStore.chart.categorizedSymbols,getIsShown:()=>this.menuStore.open,placeholderText:nv.translate("Search..."),favoritesId:"chartTitle&Comparison",mainStore:t,id:"market_dropdown",getCurrentActiveCategory:()=>this.currentActiveCategory,getCurrentActiveSubCategory:()=>this.currentActiveSubCategory,getCurrentActiveMarket:()=>this.currentActiveMarket,searchInputClassName:this.searchInputClassName}),this.serverTime=Pm.getInstance()}get chart(){return this.mainStore.chart}get context(){return this.mainStore.chart.context}get crosshairStore(){return this.mainStore.crosshair}get currentSymbol(){return this.mainStore.chart.currentActiveSymbol}get isSymbolOpen(){return this.currentSymbol?.exchange_is_open}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isShowChartPrice(){return this.mainStore.chart.isChartAvailable}get tradingTimes(){return this.mainStore.chart.tradingTimes}get symbolOpenTime(){const t=this.tradingTimes?._tradingTimesMap&&this.tradingTimes._tradingTimesMap.length&&this.currentSymbol?this.tradingTimes._tradingTimesMap[this.currentSymbol.symbol].times:[],e=this.serverTime.getLocalDate().getTime();let r=t?t.find(t=>t.open.getTime()>e):null;return r instanceof Date||(r=null),{openTime:r}}get currentActiveCategory(){const t=this.mainStore.chart.currentActiveSymbol;return this.openMarket.category?this.openMarket.category:"none"!==t?.subgroup?t?.subgroup:t?t.market:"favorite"}get currentActiveSubCategory(){return this.openMarket.subcategory?this.openMarket.subcategory:this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.symbol:""}get currentActiveMarket(){return this.openMarket.market?this.openMarket.market:null}setSymbol(t){void 0===this.mainStore.state.symbol?this.chart.changeSymbol(t):console.error("Changing symbol does nothing because symbol prop is being set. Consider overriding the onChange prop in <ChartTitle />")}update(t){if(!this.currentSymbol)return;const e=t||!this.isShowChartPrice;if(!e)return;let r=t?.Close;if(r){r=+r.toFixed(this.decimalPlaces);const e=t?.prevClose||this.animatedPrice.price;this.animatedPrice.setPrice(r,e),e&&(this.todayChange=Math.abs(r-e).toFixed(this.decimalPlaces),this.todayChangePercent=(Number(this.todayChange)/e*100).toFixed(2))}this.isVisible||!e||this.enableShowPrice?this.isVisible=e:this.enableShowPrice=!0}hidePrice(){this.isVisible=!1,this.enableShowPrice=!1}updateProps({open_market:t,open:e}){t&&(this.openMarket=t),e&&this.menuStore.setOpen(!0)}}function cv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class hv{constructor(t){cv(this,"templateName",""),cv(this,"currentRoute","main"),cv(this,"isInputActive",!1),cv(this,"views",Vi("chart-views")||[]),cv(this,"routes",{add:()=>this.saveViews(),main:()=>this.updateRoute("add"),cancel:()=>this.onCancel(),overwrite:()=>this.overwrite()}),cv(this,"mainStore",void 0),cv(this,"menuStore",void 0),br(this,{templateName:Mt,currentRoute:Mt,isInputActive:Mt,routes:Mt,views:Mt,sortedItems:Vt,onChange:Be.bound,onSubmit:Be.bound,onCancel:Be.bound,updateRoute:Be.bound,saveViews:Be.bound,overwrite:Be.bound,remove:Be.bound,removeAll:Be.bound,applyLayout:Be.bound,onToggleNew:Be.bound,inputRef:Be.bound,onFocus:Be.bound,onBlur:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"templates"}),qe(()=>this.menuStore.dialogStore.open,()=>{0===this.views.length?this.updateRoute("new"):this.updateRoute("main"),this.menuStore.dialogStore.open&&(this.templateName="")})}get context(){return this.mainStore.chart.context}get loader(){return this.mainStore.loader}get sortedItems(){return[...this.views].sort((t,e)=>t.name.toLowerCase()<e.name.toLowerCase()?-1:1)}updateLocalStorage(){localStorage.setItem("chart-views",JSON.stringify(this.views))}onChange(t){"overwrite"!==this.currentRoute&&(this.templateName=t.target.value)}onSubmit(t){13===t.keyCode&&(this.saveViews(),jm(Tm.ChartControl,km.Template,"Save Template"))}onCancel(){this.templateName="",this.updateRoute("main")}updateRoute(t){this.currentRoute=t}getLayout(){return{chartType:this.mainStore.state.chartType,granularity:this.mainStore.state.granularity,timeUnit:this.mainStore.state.timeperiodStore.timeUnit,studyItems:this.mainStore.studies.activeItems,drawTools:this.mainStore.drawTools.activeToolsGroup,msPerPx:this.mainStore.chartAdapter.msPerPx}}saveViews(){this.views.some(t=>t.name.toLowerCase().trim()===this.templateName.toLowerCase().trim())?this.updateRoute("overwrite"):this.templateName.trim().length>0&&(this.updateRoute("main"),this.views.push({name:this.templateName.trim(),layout:na(this.getLayout())}),this.updateLocalStorage(),this.templateName="")}overwrite(){const t=na(this.getLayout()),e=this.views.findIndex(t=>t.name.toLowerCase()===this.templateName.toLowerCase());this.views[e].layout=t,this.views[e].name=this.templateName.trim(),this.updateLocalStorage(),this.updateRoute("main"),this.templateName=""}remove(t,e){this.views=this.sortedItems.filter((e,r)=>t!==r),e.nativeEvent.is_item_removed=!0,this.updateLocalStorage(),jm(Tm.ChartControl,km.Template,"Remove Template")}removeAll(){this.views=[],this.updateLocalStorage(),jm(Tm.ChartControl,km.Template,"Remove All Templates"),this.updateRoute("new")}applyLayout(t,e,r,i){if(e.nativeEvent.is_item_removed)return;this.mainStore.crosshair.setTemporaryDisabled(!0);const{layout:a}=this.sortedItems[t];r(a.granularity),i(a.chartType),this.restoreLayout(na(a)),jm(Tm.ChartControl,km.Template,"Load Template")}async restoreLayout(t){this.loader&&this.loader.show(),this.mainStore.chartAdapter.msPerPx=t.msPerPx,this.mainStore.state.setChartIsReady(!1),void 0!==t.chartType&&this.mainStore.chartType.setChartType(t.chartType),this.menuStore.setOpen(!1),await cr(()=>this.mainStore.chartAdapter.isChartLoaded),this.mainStore.studies.restoreStudies(t.studyItems||[]),(()=>{this.loader&&(this.loader.hide(),this.mainStore.paginationLoader.updateOnPagination(!1)),this.mainStore.state.setChartIsReady(!0),void 0!==t.granularity&&this.mainStore.timeperiod.setGranularity(t.granularity)})()}onToggleNew(){this.updateRoute("main")}inputRef(t){t&&(t.focus(),this.isInputActive=!0)}onFocus(){this.isInputActive=!0}onBlur(){this.isInputActive=!1}}function uv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const dv="is_crosshair_enabled",gv=class{constructor(t){uv(this,"mainStore",void 0),uv(this,"isEnabled",!0),uv(this,"isTemporarilyDisabled",!1),uv(this,"shouldPersist",!0),uv(this,"updateEnabledState",t=>{this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive);try{this.shouldPersist&&"undefined"!=typeof window&&window.localStorage&&localStorage.setItem(dv,t.toString())}catch{}this.stateChange("CROSSHAIR_CLICK",{cta_name:t?"enable":"disable"})}),uv(this,"setTemporaryDisabled",t=>{this.isTemporarilyDisabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),uv(this,"setInitialEnabledState",t=>{this.shouldPersist=!1,this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),uv(this,"stateChange",(t,e={})=>{this.mainStore.state.stateChange(t,e)}),br(this,{isEnabled:Mt,isTemporarilyDisabled:Mt,isFunctionallyActive:Vt}),this.mainStore=t;try{if("undefined"!=typeof window&&window.localStorage){const t=localStorage.getItem(dv);null!==t&&(this.isEnabled="true"===t)}}catch{}cr(()=>this.mainStore.chartAdapter.isChartLoaded,()=>{this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)})}get isFunctionallyActive(){return this.isEnabled&&!this.isTemporarilyDisabled}};function pv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class mv{constructor(t){pv(this,"mainStore",void 0),pv(this,"menuStore",void 0),pv(this,"screenshotArea",void 0),pv(this,"isLoadingPNG",!1),pv(this,"onContextReady",()=>{this.screenshotArea=(this.context?.topNode).querySelector(".ciq-chart")}),br(this,{timeUnit:Vt,timeperiodDisplay:Vt,marketDisplayName:Vt,decimalPlaces:Vt,isLoadingPNG:Mt,downloadPNG:Be.bound,_onCanvasReady:Be.bound,downloadCSV:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"download"}),cr(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get timeUnit(){return this.mainStore.timeperiod.timeUnit}get timeperiodDisplay(){return this.mainStore.timeperiod.display}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?.name}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}createNewTab(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)?window.open():null}downloadPNG(){this.isLoadingPNG=!0;const t=this.createNewTab();h.e(526).then(h.t.bind(h,2939,23)).then(e=>{this.screenshotArea?.classList.add("ciq-chart--screenshot");const r=[],i=[];(this.screenshotArea?.querySelectorAll("svg")||[]).forEach(t=>{const e=t.parentNode,a=document.createElement("canvas");a.width=Number(getComputedStyle(t).width.match(/[0-9]+/)),a.height=Number(getComputedStyle(t).height.match(/[0-9]+/));const s=a.getContext("2d"),n=getComputedStyle(t).fill;if(n){const e=n.split(",").map(t=>Number(t.replace(/\D+/g,"")).toString(16).padStart(2,"0")).join("");s&&e>"333333"&&(s.fillStyle=getComputedStyle(t).fill,s.fillRect(0,0,a.width,a.height),s.globalCompositeOperation="destination-in")}const o=new Image;o.src=t.querySelector("use")?.getAttribute?.("xlink:href")||"",o.onload=()=>{s&&s.drawImage(o,0,0),Gi()||Wi()||(r.push({parent:e,child:t}),e?.removeChild(t),i.push({parent:e,child:a}),e?.appendChild(a))}}),setTimeout(()=>{e.default(this.screenshotArea).then(e=>{this._onCanvasReady(e,t),Gi()||Wi()||(i.forEach(t=>{t?.parent?.contains(t.child)&&t.child instanceof HTMLCanvasElement&&t.parent?.removeChild?.(t.child)}),r.forEach(t=>{t.parent?.appendChild(t.child)}))})},100)}),jm(Tm.ChartControl,km.Download,"Download PNG")}_onCanvasReady(t,e){const r=t.toDataURL("image/png");Ki(`${(new Date).toUTCString()}.png`,r,"image/png;",e),this.isLoadingPNG=!1,this.screenshotArea?.classList.remove("ciq-chart--screenshot")}downloadCSV(){const t="tick"===this.timeUnit,e=[`Date,Time,${t?this.marketDisplayName:"Open,High,Low,Close"}`],r=this.mainStore.chart.feed?.quotes||[],i=r.length;(i<=100?r:r.slice(i-100,i)).forEach(({DT:r,Open:i,High:a,Low:s,Close:n})=>{if(!r)return;const o=r.getFullYear(),l=r.getMonth()+1,c=r.getDate(),h=r.getHours(),u=r.getMinutes(),d=r.getSeconds(),g=`${o}-${l>9?l:`0${l}`}-${c>9?c:`0${c}`}`,p=`${h>9?h:`0${h}`}:${u>9?u:`0${u}`}${t?d>9?`:${d}`:`:0${d}`:""}`;t&&n&&e.push(`${g},${p},${n}`),!t&&i&&a&&s&&n&&e.push([g,p,i.toFixed(this.decimalPlaces),a.toFixed(this.decimalPlaces),s.toFixed(this.decimalPlaces),n.toFixed(this.decimalPlaces)].join(","))}),Ki(`${this.marketDisplayName} (${this.timeperiodDisplay}).csv`,e.join("\n"),"text/csv;charset=utf-8;",this.createNewTab()),jm(Tm.ChartControl,km.Download,"Download CSV")}}var fv=h(9160).t;function _v(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class vv{constructor(t){_v(this,"mainStore",void 0),_v(this,"menuStore",void 0),_v(this,"language",""),_v(this,"position","bottom"),_v(this,"theme","light"),_v(this,"countdown",!1),_v(this,"historical",!1),_v(this,"isAutoScale",!0),_v(this,"isHighestLowestMarkerEnabled",!0),_v(this,"isSmoothChartEnabled",!1),_v(this,"minimumLeftBars",void 0),_v(this,"whitespace",void 0),_v(this,"languages",[]),_v(this,"defaultLanguage",{}),_v(this,"onSettingsChange",void 0),br(this,{language:Mt,position:Mt,theme:Mt,countdown:Mt,historical:Mt,isAutoScale:Mt,isHighestLowestMarkerEnabled:Mt,isSmoothChartEnabled:Mt,minimumLeftBars:Mt,updateActiveLanguage:Be.bound,setLanguage:Be.bound,setTheme:Be.bound,setPosition:Be.bound,showCountdown:Be.bound,setHistorical:Be.bound,setAutoScale:Be.bound,setWhiteSpace:Be.bound,toggleHighestLowestMarker:Be.bound,toggleSmoothChart:Be.bound,whitespace:Mt}),this.defaultLanguage=this.languages[0],this.mainStore=t,this.menuStore=new hf(t,{route:"setting"});const e=localStorage.getItem("is_smooth_chart_enabled");null!==e&&(this.isSmoothChartEnabled="true"===e),qe(()=>this?.language?.key,()=>{t?.chart?.changeSymbol?.(t.state.symbol,t.state.granularity,!0)}),cr(()=>!!this.context,()=>{this.setSettings(t.state.settings)})}get context(){return this.mainStore.chart.context}setSettings(t){if(void 0===t)return;const{countdown:e,historical:r,language:i,minimumLeftBars:a,position:s,isAutoScale:n,isHighestLowestMarkerEnabled:o,isSmoothChartEnabled:l,theme:c,activeLanguages:h,whitespace:u}=t;!h&&_m.every(t=>this.languages.find(e=>e.key===t.key))||h&&this.languages.length===h.length&&this.languages.every(t=>-1!==h.indexOf(t.key.toUpperCase()))||this.updateActiveLanguage(h),void 0!==c&&this.setTheme(c),void 0!==s&&this.setPosition(s),void 0!==e&&this.showCountdown(e),void 0!==i&&this.setLanguage(i),this.setMinimumLeftBars(a),void 0!==r&&this.setHistorical(r),void 0!==n&&this.setAutoScale(n),void 0!==o&&this.toggleHighestLowestMarker(o),void 0!==l&&this.toggleSmoothChart(l),this.setWhiteSpace(u)}saveSetting(){this.onSettingsChange&&this.language&&this.onSettingsChange({countdown:this.countdown,historical:this.historical,language:this.language?.key,position:this.position,isAutoScale:this.isAutoScale,isHighestLowestMarkerEnabled:this.isHighestLowestMarkerEnabled,isSmoothChartEnabled:this.isSmoothChartEnabled,minimumLeftBars:this.minimumLeftBars,theme:this.theme,whitespace:this.whitespace})}updateActiveLanguage(t){this.languages=t?t.map(t=>_m.find(e=>e.key.toUpperCase()===t)||"").filter(t=>t):_m,this.defaultLanguage=this.languages[0],(this.language&&!this.languages.find(t=>t.key===this.language?.key)||!this.language)&&this.setLanguage(this.languages[0].key)}setLanguage(t){if(!this.languages.length)return;const e=t.toLowerCase();if(this.language&&e===this.language.key)return;this.language=this.languages.find(t=>t.key===e)||this.defaultLanguage;const r=this.language.key;fv.setLanguage(r,()=>{this?.mainStore?.loader?.hide?.()}),jm(Tm.ChartControl,km.ChartSetting,`Change language to ${r}`),r!==localStorage.getItem("current_chart_lang")&&localStorage.setItem("current_chart_lang",r),r!==this.mainStore.chart.currentLanguage&&(this.mainStore.chart.currentLanguage=r,this.mainStore.state.saveLayout(),setTimeout(()=>{const t=this.mainStore.chart.currentActiveSymbol?.symbol;t&&window.flutterChart?.app.newChart({symbol:t,granularity:this.mainStore.chartAdapter.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.mainStore.chartAdapter.isDataFitModeEnabled,theme:this.theme,msPerPx:this.mainStore.chartAdapter.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})},100)),this.saveSetting()}setTheme(t){this.theme!==t&&(this.theme=t,this.mainStore.drawTools.updateTheme(),this.mainStore.chartAdapter.updateTheme(t),this.context&&this.mainStore.state.setChartTheme(t),this.mainStore.studies.updateTheme(),jm(Tm.ChartControl,km.ChartSetting,`Change theme to ${t}`),this.saveSetting())}setPosition(t){this.position!==t&&(this.position=t,jm(Tm.ChartControl,km.ChartSetting,"Change Position"),this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10),this.menuStore.setOpen(!1))}showCountdown(t){this.countdown!==t&&(this.mainStore.chartAdapter.setShowInterval(t),this.countdown=t,jm(Tm.ChartControl,km.ChartSetting,(t?"Show":"Hide")+" Countdown"),this.saveSetting())}setHistorical(t){this.historical!==t&&(this.historical=t,this.isHighestLowestMarkerEnabled=!t,this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10))}setAutoScale(t){this.isAutoScale!==t&&(this.isAutoScale=t,jm(Tm.ChartControl,km.ChartSetting,` Change AutoScale to ${t}`),this.saveSetting())}setMinimumLeftBars(t){this.minimumLeftBars!==t&&(this.minimumLeftBars=t,jm(Tm.ChartControl,km.ChartSetting,` Change MinimumLeftBars to ${t}`),this.saveSetting())}setWhiteSpace(t){this.whitespace!==t&&(this.whitespace=t,jm(Tm.ChartControl,km.ChartSetting,` Change Whitespace to ${t}`),this.saveSetting())}toggleHighestLowestMarker(t){this.isHighestLowestMarkerEnabled!==t&&(this.isHighestLowestMarkerEnabled=t,jm(Tm.ChartControl,km.ChartSetting,` ${t?"Show":"Hide"} HighestLowestMarker.`),this.saveSetting())}toggleSmoothChart(t){if(this.isSmoothChartEnabled===t)return;this.isSmoothChartEnabled=t,localStorage.setItem("is_smooth_chart_enabled",t.toString()),jm(Tm.ChartControl,km.ChartSetting,` ${t?"Enable":"Disable"} Smooth Chart.`);const e=this.mainStore.chartType.type,r=this.mainStore.state;this.mainStore.state.stateChange("CHART_SWITCH_TOGGLE",{enable_smooth_chart:t?"enable":"disable",chart_type_name:"colored_bar"===e.id?e.text:e.text.toLowerCase(),time_interval_name:$i(r.granularity,fm)}),this.saveSetting(),this.mainStore.chart.refreshChart()}}var bv=h(9160).t;function yv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Sv{constructor(){yv(this,"isActive",!1),yv(this,"currentState",!1),yv(this,"states",{}),br(this,{isActive:Mt,currentState:Mt,setState:Be.bound,show:Be.bound,hide:Be.bound}),this.states={"chart-engine":bv.translate("Retrieving Chart Engine..."),"market-symbol":bv.translate("Retrieving Market Symbols..."),"trading-time":bv.translate("Retrieving Trading Times..."),"chart-data":bv.translate("Retrieving Chart Data...")}}setState(t){this.states[t]?this.currentState=this.states[t]:console.error("Wrong state requested!")}show(){this.isActive=!0}hide(){this.isActive=!1}}function xv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wv{static get EVENT_FAVORITES_UPDATE(){return"EVENT_FAVORITES_UPDATE"}static getInstance(){return wv.instance||(wv.instance=new wv),wv.instance}constructor(){xv(this,"favoritesMap",function(){const t=Vi("cq-favorites");if(!t)return;const e={};for(const r in t){const i={};for(const e of t[r])i[e]=!0;e[r]=i}return e}()||{indicators:{},"chartTitle&Comparison":{}}),xv(this,"_emitter",void 0),br(this,{favoritesMap:Mt,isFavorite:Be.bound,toggleFavorite:Be.bound}),this._emitter=new(Fi())({emitDelay:0})}onFavoriteUpdate(t){this._emitter.on(wv.EVENT_FAVORITES_UPDATE,t)}offFavoriteUpdate(t){this._emitter.off(wv.EVENT_FAVORITES_UPDATE,t)}isFavorite(t,e){return e in this.favoritesMap[t]}toggleFavorite(t,e){const r=this.favoritesMap[t];r[e]?delete r[e]:r[e]=!0,this._emitter.emit(wv.EVENT_FAVORITES_UPDATE,{category:t,id:e,value:r[e]||!1}),this.saveFavorites()}saveFavorites(){const t={};for(const e in this.favoritesMap){const r=[];for(const t in this.favoritesMap[e])r.push(t);t[e]=r}Ui("cq-favorites",t)}}xv(wv,"instance",void 0);const Cv=wv;class Tv{constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{updateChartState:Be.bound,zoomIn:Be.bound,zoomOut:Be.bound}),this.mainStore=t}get state(){return this.mainStore.state}updateChartState(){this.mainStore.chart.updateScaledOneOne(!1)}zoomIn(){jm(Tm.ChartControl,km.ChartSize,"zoom In"),this.mainStore.chartAdapter.scale(1.25)}zoomOut(){jm(Tm.ChartControl,km.ChartSize,"zoom Out"),this.mainStore.chartAdapter.scale(.75)}}const kv=[];class jv{constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{handleRouting:Be.bound,updateRoute:Be.bound,registerDialog:Be.bound,closeAll:Be.bound}),this.mainStore=t}handleRouting(){window.addEventListener("hashchange",()=>{""===window.history.state.urlPath.replace("#","")&&this.closeAll()},!1)}updateRoute(t,e){const r=this.mainStore.chart.enableRouting;r&&e&&t?(window.history.replaceState({urlPath:"#"},"","#"),window.history.pushState({urlPath:`#${t}`},"",`#${t}`)):r&&!e&&t&&window.history.replaceState({urlPath:"#"},"","#")}registerDialog(t){kv.push(t)}closeAll(){kv.forEach(t=>t.setOpen(!1))}}const Av=(t,e)=>typeof t==typeof e&&(Array.isArray(t)?Ov(t,e):t&&e&&"object"==typeof t?Ev(t,e):!("number"!=typeof t||"number"!=typeof e||!Number.isNaN(t)||!Number.isNaN(e))||t===e),Ov=(t,e)=>t===e||t.length===e.length&&t.every((t,r)=>Av(t,e[r])),Ev=(t,e)=>t===e||Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Av(t[r],e[r]));var Nv=h(5581),Iv=h.n(Nv),Pv=h(2592),Dv=h.n(Pv);function Lv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Mv=class{get context(){return this.chartStore.context}get chartTypeStore(){return this.mainStore.chartType}get timeperiodStore(){return this.mainStore.timeperiod}get loader(){return this.mainStore.loader}get rootElement(){return this.chartStore.rootElement}constructor(t){Lv(this,"chartStore",void 0),Lv(this,"getIndicatorHeightRatio",void 0),Lv(this,"shouldDrawTicksFromContractInfo",!1),Lv(this,"has_updated_settings",!1),Lv(this,"isAnimationEnabled",void 0),Lv(this,"isVerticalScrollEnabled",!0),Lv(this,"mainStore",void 0),Lv(this,"margin",void 0),Lv(this,"granularity",void 0),Lv(this,"chartType",void 0),Lv(this,"startEpoch",void 0),Lv(this,"endEpoch",void 0),Lv(this,"symbol",void 0),Lv(this,"heightFactor",void 0),Lv(this,"isConnectionOpened",!1),Lv(this,"isChartReady",!1),Lv(this,"chartStatusListener",void 0),Lv(this,"stateChangeListener",void 0),Lv(this,"settings",void 0),Lv(this,"showLastDigitStats",!1),Lv(this,"scrollToEpoch",void 0),Lv(this,"clearChart",void 0),Lv(this,"isChartClosed",!1),Lv(this,"shouldMinimiseLastDigits",!1),Lv(this,"allowTickChartTypeOnly",void 0),Lv(this,"isStaticChart",!1),Lv(this,"shouldFetchTradingTimes",!0),Lv(this,"shouldGetQuotes",!0),Lv(this,"allTicks",[]),Lv(this,"contractInfo",{}),Lv(this,"refreshActiveSymbols",void 0),Lv(this,"hasReachedEndOfData",!1),Lv(this,"prevChartType",void 0),Lv(this,"isChartScrollingToEpoch",!1),Lv(this,"maxTick",void 0),Lv(this,"enableScroll",!0),Lv(this,"enableZoom",!0),Lv(this,"yAxisMargin",{top:106,bottom:64}),Lv(this,"tradingTimes",null),Lv(this,"activeSymbols",null),Lv(this,"masterData",null),Lv(this,"getQuotes",void 0),Lv(this,"chartControlsWidgets",void 0),Lv(this,"enabledChartFooter",void 0),Lv(this,"onContextReady",()=>{this.granularity=this.chartStore.granularity}),Lv(this,"debouncedStateChange",sf((t,e)=>{this.stateChange(t,e)},500)),br(this,{granularity:Mt,chartType:Mt,startEpoch:Mt,endEpoch:Mt,symbol:Mt,has_updated_settings:Mt,heightFactor:Mt,isConnectionOpened:Mt,isChartReady:Mt,isVerticalScrollEnabled:Mt,chartStatusListener:Mt,debouncedStateChange:Be.bound,stateChangeListener:Mt,settings:Mt,showLastDigitStats:Mt,allowTickChartTypeOnly:Mt,scrollToEpoch:Mt,clearChart:Mt,isChartClosed:Mt,shouldMinimiseLastDigits:Mt,isStaticChart:Mt,shouldFetchTradingTimes:Mt,shouldGetQuotes:Mt,allTicks:Mt,contractInfo:Mt,refreshActiveSymbols:Mt,shouldDrawTicksFromContractInfo:Mt,hasReachedEndOfData:Mt,prevChartType:Mt,isChartScrollingToEpoch:Mt,maxTick:Mt,enableScroll:Mt,enableZoom:Mt,yAxisMargin:Mt,updateProps:Be.bound,setChartIsReady:Be.bound,setChartClosed:Be.bound}),this.mainStore=t,this.chartStore=t.chart,cr(()=>!!this.context,this.onContextReady),window.addEventListener("beforeunload",()=>{this.saveLayout()}),qe(()=>this.allowTickChartTypeOnly,t=>{t&&(this.mainStore.studies.savePredictionStudies(),this.mainStore.studies.deletePredictionStudies())})}updateProps({networkStatus:t,chartControlsWidgets:e,enabledChartFooter:r,chartStatusListener:i,shouldDrawTicksFromContractInfo:a,stateChangeListener:s,getIndicatorHeightRatio:n,chartType:o,clearChart:l,endEpoch:c,isAnimationEnabled:h=!0,isConnectionOpened:u,isStaticChart:d,isVerticalScrollEnabled:g=!0,granularity:p,margin:m=0,refreshActiveSymbols:f,scrollToEpoch:_,settings:v,shouldFetchTradingTimes:b=!0,shouldGetQuotes:y=!0,should_zoom_out_on_yaxis:S,allTicks:x=[],contractInfo:w={},showLastDigitStats:C=!1,allowTickChartTypeOnly:T=!1,startEpoch:k,symbol:j,zoom:A,maxTick:O,yAxisMargin:E,enableScroll:N=null,enableZoom:I=null,anchorChartToLeft:P=!1,chartData:D,isLive:L,startWithDataFitMode:M,leftMargin:B,drawingToolFloatingMenuPosition:R}){let F=!1,V=!1;if(D?.tradingTimes&&"object"==typeof D.tradingTimes&&JSON.stringify(D.tradingTimes)!==this.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(D.tradingTimes),this.tradingTimes=JSON.stringify(D.tradingTimes)),D?.activeSymbols&&"object"==typeof D.activeSymbols&&JSON.stringify(D.activeSymbols)!==this.activeSymbols&&(this.activeSymbols=JSON.stringify(D.activeSymbols),this.mainStore.chart.processedSymbols&&D?.activeSymbols)){this.mainStore.chart.processedSymbols=Cf(D.activeSymbols),this.mainStore.chart.categorizedSymbols=Ef(this.mainStore.chart.processedSymbols),this.mainStore.chart.symbolMap={};for(const t of this.mainStore.chart.processedSymbols)this.mainStore.chart.symbolMap[t.symbol]=t}D?.masterData&&Array.isArray(D.masterData)&&JSON.stringify(D.masterData)!==this.masterData&&(this.masterData=JSON.stringify(D.masterData),this.mainStore.chart.feed&&(this.mainStore.chart.feed.updateQuotes(D.masterData,!1),this.shouldGetQuotes=!1)),this.chartStatusListener=i,this.stateChangeListener=s,this.isAnimationEnabled=h,this.isConnectionOpened=u,this.isStaticChart=d,this.isVerticalScrollEnabled=g,this.margin=m,this.has_updated_settings=!Av(this.settings?.whitespace,v?.whitespace),this.settings=v,this.shouldFetchTradingTimes=b,this.shouldGetQuotes=y,this.allowTickChartTypeOnly=T,this.allTicks=x,this.contractInfo=w,this.showLastDigitStats=C,this.getIndicatorHeightRatio=n;const H=this.mainStore.chart.feed;if(a&&H&&w.tick_stream&&(this.shouldDrawTicksFromContractInfo=a,H.appendChartDataFromPOCResponse.call(H,w)),!t||this.mainStore.chart.networkStatus&&t.class===this.mainStore.chart.networkStatus.class||(this.mainStore.chart.networkStatus=t),e!==this.chartControlsWidgets&&(this.chartControlsWidgets=e),r!==this.enabledChartFooter&&(this.enabledChartFooter=r),j!==this.symbol&&(this.symbol=j,F=!0,D?.tradingTimes&&"object"==typeof D.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(D.tradingTimes),this.tradingTimes=JSON.stringify(D.tradingTimes)),this.mainStore.chartTitle.hidePrice()),o&&o!==this.chartType&&("table"===o&&(this.prevChartType=this.chartTypeStore.type.id),this.setChartType(o)),void 0!==p&&p!==this.granularity&&(this.setChartGranularity(p),V=!0),f!==this.refreshActiveSymbols&&(this.refreshActiveSymbols=f,this.refreshActiveSymbols&&D?.activeSymbols)){const t=Cf(D.activeSymbols);this.mainStore.chart.processedSymbols=t,this.mainStore.chart.categorizedSymbols=Ef(t),this.mainStore.chart.symbolMap={};for(const e of t)this.mainStore.chart.symbolMap[e.symbol]=e}if(l!==this.clearChart&&(this.clearChart=l,this.cleanChart()),this.startEpoch===k&&this.endEpoch===c||(this.startEpoch=k,this.endEpoch=c,d&&this.granularity===this.mainStore.chart.granularity?this.mainStore.chart.newChart():this.mainStore.chart.feed&&(this.scrollToEpoch||F||V||this.mainStore.chart.feed.onRangeChanged())),d||_===this.scrollToEpoch||(this.scrollToEpoch=_,this.mainStore.chart&&this.mainStore.chart.feed&&!F&&!V&&(this.setIsChartScrollingToEpoch(!0),P?setTimeout(()=>this.stateChange(Sm),900):this.stateChange(Sm))),A&&(1===A?this.mainStore.chartSize.zoomIn():this.mainStore.chartSize.zoomOut()),this.mainStore.chartSetting.setSettings(this.settings),O&&this.maxTick!==O&&(this.maxTick=O),E&&"object"==typeof E&&(this.yAxisMargin={...this.yAxisMargin,...E}),S){const{height_factor:t,yaxis_margin:e}=(({is_contract_chart:t,is_mobile:e,ticks_length:r,yaxis_height:i})=>{let a,s;const n={height_factor:.8};return i?(t?r&&(a=s=e?i*(r<5?.3:.25):.27*i):a=s=e?.33*i:.27*i,{...n,...a&&s?{yaxis_margin:{top:a,bottom:s}}:{}}):n})({is_contract_chart:a,is_mobile:this.mainStore.chart.isMobile,ticks_length:this.mainStore.chart.feed?.quotes.length,yaxis_height:this.mainStore.chart.chartContainerHeight});this.yAxisMargin={...this.yAxisMargin,...e},this.heightFactor=t}null!==N&&this.enableScroll!==N&&(this.enableScroll=N),null!==I&&this.enableZoom!==I&&(this.enableZoom=I),null!=L&&this.mainStore.chart.isLive!==L&&(this.mainStore.chart.isLive=L,this.mainStore.chartAdapter.updateLiveStatus(L)),null!=M&&this.mainStore.chart.startWithDataFitMode!==M&&(this.mainStore.chart.startWithDataFitMode=M),this.mainStore.chart.leftMargin!==B&&(this.mainStore.chart.leftMargin=B,this.mainStore.chartAdapter.updateLeftMargin(B)),this.mainStore.drawTools.updateProps({drawingToolFloatingMenuPosition:R})}setIsChartScrollingToEpoch(t){this.isChartScrollingToEpoch=t}setChartClosed(t){this.isChartClosed=t,this.stateChange("MARKET_STATE_CHANGE",{symbol:this.symbol,isClosed:t})}setChartTheme(t){this.rootElement&&((this.rootElement?.querySelector(".chartContainer")).style.backgroundColor=Dv()[`${t}_chart_bg`])}stateChange(t,e){this.stateChangeListener&&"function"==typeof this.stateChangeListener&&this.stateChangeListener(t,e)}setChartIsReady(t){this.isChartReady!==t&&(this.isChartReady=t,t&&(this.chartStore.setResizeEvent(),this.stateChange("READY")),this.chartStatusListener&&"function"==typeof this.chartStatusListener&&this.chartStatusListener(t))}setChartGranularity(t){const e="second"===function(t){let e=1,r="second";return 86400===t?r="day":t&&t>59&&(e=t/60,r="minute"),{interval:e,timeUnit:r}}(t).timeUnit,r=this.mainStore.chartType.isCandle||this.chartType&&this.mainStore.chartType.isTypeCandle(this.chartType);this.mainStore.chartAdapter.setMsPerPx(void 0),this.context&&e&&r&&this.setChartType("line"),this.granularity=null===t?void 0:t}setChartType(t){this.chartType=t,this.chartType&&this.mainStore.chartAdapter.updateChartStyle(this.chartType),this.chartTypeStore.onChartTypeChanged&&this.chartTypeStore.onChartTypeChanged(t)}setShouldMinimiseLastDigit(t){this.shouldMinimiseLastDigits=t}saveLayout(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout();Ui(`chart-layout-${this.mainStore.chart.chartId}`,Iv().compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx})))}restoreLayout(){const t=Vi(`chart-layout-${this.mainStore.chart.chartId}`);let e=null;try{e=JSON.parse(Iv().decompress(t??""))}catch(r){e=t}return e?(this.mainStore.view.restoreLayout(e),!0):(this.clearLayout(),!1)}clearLayout(){window.flutterChart?.indicators.clearIndicators(),window.flutterChart?.drawingTool.clearDrawingTool()}saveDrawings(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout();Ui(`chart-layout-${this.mainStore.chart.chartId}`,Iv().compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx})))}cleanChart(){this.clearChart&&this.isChartReady&&this.mainStore.studies.deleteAllStudies()}};var Bv=h(9160).t;class Rv{constructor(){!function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"onMessage",void 0)}static get CATEGORY_ACTIVE_SYMBOL(){return"activesymbol"}notify(t){this.onMessage&&this.onMessage({type:"warning",...t})}notifyMarketOpen(t){this.notify({text:Bv.translate("[symbol] market is now opened.",{symbol:t}),type:"info",category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyMarketClose(t){this.notify({text:Bv.translate("[symbol] market is presently closed.",{symbol:t}),category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyDelayedMarket(t,e){this.notify({text:Bv.translate("[symbol] feed is delayed by [delay] minutes",{symbol:t,delay:e}),category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyFeedUnavailable(t){this.notify({text:Bv.translate("Streaming for [symbol] is not available due to license restrictions",{symbol:t}),type:"error",category:Rv.CATEGORY_ACTIVE_SYMBOL})}}const Fv=Rv;function Vv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Hv{constructor(t){Vv(this,"mainStore",void 0),Vv(this,"bars",[]),Vv(this,"lastTick",null),Vv(this,"count",1e3),Vv(this,"digits",[]),Vv(this,"latestData",[]),Vv(this,"lastSymbol",""),br(this,{bars:Mt,lastTick:Mt,decimalPlaces:Vt,isVisible:Vt,marketDisplayName:Vt,shouldMinimiseLastDigits:Vt,updateLastDigitStats:Be.bound,onMasterDataUpdate:Be.bound,updateBars:Be.bound}),this.mainStore=t,cr(()=>!!this.context,()=>{this.lastSymbol=this.marketDisplayName,this.mainStore.chart.feed?.onMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed?.onMasterDataReinitialize(()=>{this.context&&this.mainStore.chart.feed&&(this.mainStore.chart.feed.offMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed.onMasterDataUpdate(this.onMasterDataUpdate))})})}get context(){return this.mainStore.chart.context}get api(){return this.mainStore.chart.api}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isVisible(){return this.mainStore.state.showLastDigitStats}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.name:""}get shouldMinimiseLastDigits(){return this.mainStore.state.shouldMinimiseLastDigits}async updateLastDigitStats(t){if(!this.context||!this.mainStore.chart.currentActiveSymbol)return;this.digits=[],this.bars=[],this.latestData=[];for(let t=0;t<10;t++)this.digits.push(0),this.bars.push({height:0,cName:""});const e=t||await(this.api?.getQuotes({symbol:this.mainStore.chart.currentActiveSymbol.symbol,count:this.count}));this.latestData=e?.history?.prices?e.history.prices:[],this.context&&this.mainStore.chart.currentActiveSymbol&&(this.latestData.forEach(t=>{const e=(+t).toFixed(this.decimalPlaces).slice(-1);this.digits[+e]++}),this.updateBars())}onMasterDataUpdate({Close:t,tick:e}){if(this.context&&this.mainStore.chart.currentActiveSymbol&&this.mainStore.lastDigitStats.isVisible)if(this.lastTick=e,this.marketDisplayName!==this.lastSymbol)this.lastSymbol=this.marketDisplayName,this.updateLastDigitStats();else if(this.latestData.length){const e=(+this.latestData.shift()).toFixed(this.decimalPlaces).slice(-1),r=(+t).toFixed(this.decimalPlaces),i=r.slice(-1);this.latestData.push(+r),this.digits[+i]++,this.digits[+e]--,this.updateBars()}}updateBars(){const t=Math.min(...this.digits),e=Math.max(...this.digits);this.digits.forEach((r,i)=>{this.bars[i].height=100*r/this.count,this.bars[i].cName=r===t?"min":r===e?"max":""}),this.bars=this.bars.slice(0)}}function Uv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class qv{get chart(){return this.mainStore.chart}get stateStore(){return this.mainStore.state}get crosshairStore(){return this.mainStore.crosshair}constructor(t){Uv(this,"mainStore",void 0),Uv(this,"mouse_in",!1),br(this,{mouse_in:Mt,enableScale:Vt,onMouseEnter:Be.bound,onMouseLeave:Be.bound}),this.mainStore=t}get enableScale(){return this.stateStore.startEpoch}onMouseEnter(){this.mouse_in=!0,this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.mouse_in=!1,this.crosshairStore.setTemporaryDisabled(!1)}}function zv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const $v=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}get isHighestLowestMarkerEnabled(){return this.mainStore.chartSetting.isHighestLowestMarkerEnabled}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}constructor(t){zv(this,"highestRef",null),zv(this,"lowestRef",null),zv(this,"mainStore",void 0),zv(this,"highest",null),zv(this,"lowest",null),zv(this,"setHighestRef",t=>{this.highestRef=t,null!==this.highestRef&&null!==t&&(this.highestRef.value=t.div.querySelector(".spot__value"))}),zv(this,"setLowestRef",t=>{this.lowestRef=t,null!=this.lowestRef&&null!==t&&(this.lowestRef.value=t.div.querySelector(".spot__value"))}),zv(this,"calculateHighestLowestByNewData",()=>{if(!this.highestRef||!this.lowestRef)return;const t=this.mainStore.chart.feed?.quotes;if(t&&t.length&&(this.highest=null,this.lowest=null,t.forEach(t=>{t&&((!this.highest||this.highest.Close<=t.Close)&&(this.highest=t),(!this.lowest||this.lowest.Close>=t.Close)&&(this.lowest=t))})),!this.highest||!this.lowest||this.highest.Close===this.lowest.Close)return this.highestRef.setPosition({epoch:null,price:null}),void this.lowestRef.setPosition({epoch:null,price:null});if(this.highest){const t=this.highest.Close.toFixed(this.decimalPlaces);this.highestRef.setPosition({epoch:Qi(Om(this.highest.Date)),price:+t}),this.highestRef.value.textContent=t}if(this.lowest){const t=this.lowest.Close.toFixed(this.decimalPlaces);this.lowestRef.setPosition({epoch:Qi(Om(this.lowest.Date)),price:+t}),this.lowestRef.value.textContent=t}}),this.mainStore=t}};function Gv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Wv=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}constructor(t){Gv(this,"mainStore",void 0),Gv(this,"ref",null),Gv(this,"isOnPagination",!1),Gv(this,"paginationEndEpoch",null),Gv(this,"onContextReady",()=>{this.feed?.onStartPagination(this.setOnPagination),this.feed?.onPagination(this.setOnPagination)}),Gv(this,"setRef",t=>{this.ref=t,null!==this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),Gv(this,"setOnPagination",({end:t})=>{this.isOnPagination=!this.isOnPagination,this.paginationEndEpoch=this.isOnPagination?t:null,this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),br(this,{isOnPagination:Mt,updateOnPagination:Be.bound,setOnPagination:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady)}updateOnPagination(t){this.isOnPagination=t}};class Kv{get crosshairStore(){return this.mainStore.crosshair}get chartStore(){return this.mainStore.chart}constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{onMouseEnter:Be.bound,onMouseLeave:Be.bound}),this.mainStore=t,qe(()=>[this.mainStore.chartMode.menuStore.open,this.mainStore.drawTools.menuStore.open,this.mainStore.studies.menuStore.open,this.mainStore.share.menuStore.open,this.mainStore.view.menuStore.open],()=>{this.mainStore.chartMode.menuStore.open||this.mainStore.drawTools.menuStore.open||this.mainStore.studies.menuStore.open||this.mainStore.share.menuStore.open||this.mainStore.view.menuStore.open||this.onMouseLeave()})}onMouseEnter(){this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.crosshairStore.setTemporaryDisabled(!1)}}function Qv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Yv{constructor(){Qv(this,"isHover",!1),Qv(this,"scrollPanel",void 0),br(this,{isHover:Mt,scrollPanel:Mt,handleMouseOver:Be.bound,handleMouseOut:Be.bound,setScrollPanel:Be.bound}),qe(()=>this.scrollPanel,()=>{this.scrollPanel&&(this.scrollPanel.addEventListener("mouseover",this.handleMouseOver),this.scrollPanel.addEventListener("mouseout",this.handleMouseOut))})}handleMouseOver(){this.isHover||(this.isHover=!0)}handleMouseOut(){this.isHover&&(this.isHover=!1)}setScrollPanel(t){this.scrollPanel||(this.scrollPanel=t)}}const Xv=()=>{window._flutter.initState.isMounted&&(window._flutter.appRunner?.runApp(),window._flutter.initState.isInitialRunCompleted=!0)};function Zv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Jv{constructor(){Zv(this,"callbacks",[]),Zv(this,"onPaint",t=>{this.callbacks.forEach(e=>e(t))}),Zv(this,"registerCallback",t=>{this.callbacks.push(t)}),Zv(this,"unregisterCallback",t=>{const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)})}}function tb(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class eb{constructor(t){tb(this,"mainStore",void 0),tb(this,"isChartLoaded",!1),tb(this,"flutterChart",void 0),tb(this,"epochBounds",{leftEpoch:0,rightEpoch:0}),tb(this,"quoteBounds",{topQuote:0,bottomQuote:0}),tb(this,"isFeedLoaded",!1),tb(this,"msPerPx",void 0),tb(this,"isDataFitModeEnabled",!1),tb(this,"isXScrollBlocked",!1),tb(this,"painter",new Jv),tb(this,"drawingColor",0),tb(this,"isScaled",!1),tb(this,"touchValues",{multiTouch:!1,deltaXTotal:0,deltaYTotal:0,touchIds:[],x:0,y:0}),tb(this,"isOverFlutterCharts",!1),tb(this,"clearTouchDeltasTimer",void 0),tb(this,"enableXScrollTimer",void 0),tb(this,"enableYScrollTimer",void 0),tb(this,"checkIndicatorHover",(t,e,r)=>{const i=this.mainStore.chart.feed?.getClosestValidEpoch,a=this.mainStore.chartAdapter.getGranularityInMs(),s=this.flutterChart?.app.getIndicatorHoverIndex(t,e,i,a,r);this.isScaled?this.isScaled=!1:this.mainStore.studies.highlightIndicator(s)}),tb(this,"debouncedIndicatorHover",sf(this.checkIndicatorHover,5)),tb(this,"onWheel",t=>{t.preventDefault(),t.stopPropagation();const e=this.mainStore.chart.chartNode;if(e&&!this.mainStore.state.isVerticalScrollEnabled){const r=e.offsetWidth-this.mainStore.chart.yAxisWidth,{left:i}=e.getBoundingClientRect(),a=t.deltaY&&0===t.deltaX;if(t.pageX-i<r&&a){if(this.enableYScrollTimer)return;return e.style.pointerEvents="none",void(this.enableYScrollTimer=setTimeout(()=>{e.style.pointerEvents="auto",this.enableYScrollTimer=void 0},300))}}if(0===t.deltaX&&0===t.deltaZ){const e=(100-Math.min(10,Math.max(-10,t.deltaY)))/100;this.scale(e)}else window.flutterChart?.app.scroll(t.deltaX);return!1}),tb(this,"onMouseMove",t=>{this.isOverFlutterCharts="flt-glass-pane"===t.target?.tagName?.toLowerCase()}),tb(this,"onDoubleClick",()=>{null!=this.mainStore.studies.currentHoverIndex&&(this.mainStore.studies.editStudyByIndex(this.mainStore.studies.currentHoverIndex),this.mainStore.studies.clearHoverItem(this.mainStore.studies.currentHoverIndex))}),tb(this,"newChart",async()=>{this.isFeedLoaded=!1,this.isDataFitModeEnabled=this.mainStore.chart.startWithDataFitMode||!1,await cr(()=>this.isChartLoaded),this.flutterChart?.app.newChart({symbol:this.mainStore.chart.currentActiveSymbol?.symbol,granularity:this.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.isDataFitModeEnabled,theme:this.mainStore.chartSetting.theme,msPerPx:this.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.mainStore.chartSetting.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})}),tb(this,"toggleXScrollBlock",(t=!0,e)=>{this.isXScrollBlocked=t,e&&(t?(e.style.overflowY="scroll",e.style.overflowX="hidden",e.style.overscrollBehavior="contain",e.style.touchAction="pan-y"):this.allowScroll(e))}),tb(this,"allowScroll",t=>{let e,r=t.scrollTop,i=!1;const a=()=>{t.scrollTop!==r?(i=!0,r=t.scrollTop,clearTimeout(e),e=setTimeout(()=>{this.stopScroll(t)},200)):i=!1,i&&requestAnimationFrame(a)};requestAnimationFrame(a)}),tb(this,"stopScroll",t=>{t.style.removeProperty("overflow-y"),t.style.removeProperty("overflow-x"),t.style.removeProperty("touch-action")}),tb(this,"toggleDataFitMode",()=>{this.isDataFitModeEnabled=!this.isDataFitModeEnabled,window.flutterChart?.app.toggleDataFitMode(this.isDataFitModeEnabled)}),tb(this,"getInterpolatedPositionAndPrice",t=>{if(!t)return;const e=vf().utc(t).toDate(),r=this.mainStore.chart.feed?.getClosestQuoteIndexForEpoch(t);let i=this.getXFromEpoch(t);if("number"==typeof r&&r>-1){const t=this.mainStore.chart.feed?.quotes[r];let a,s,n,o=t?t.Close:null;if(t&&t.DT<e){const l=this.mainStore.chart.feed?.quotes[r+1],c=r>0?this.mainStore.chart.feed?.quotes[r-1]:null;l&&l.Close&&l.DT>e?(a=this.getXFromEpoch(l.DT.getTime())-i,n=(e-t.DT.getTime())/(l.DT.getTime()-t.DT.getTime()),o&&(s=l.Close-o)):c&&c.Close&&(a=i-this.getXFromEpoch(c.DT.getTime()),n=(e-t.DT.getTime())/(t.DT.getTime()-c.DT.getTime()),o&&(s=o-c.Close))}return n&&(a&&(i+=n*a),o&&s&&(o+=n*s)),{x:i,price:o}}}),br(this,{clearTouchDeltasTimer:Mt,onMount:Be.bound,onTickHistory:Be.bound,onTouch:Be.bound,onChartLoad:Be.bound,onTick:Be.bound,loadHistory:Be.bound,onVisibleAreaChanged:Be.bound,onQuoteAreaChanged:Be.bound,setMsPerPx:Be.bound,newChart:Be.bound,enableXScrollTimer:Mt,enableYScrollTimer:Mt,scale:Be.bound,scrollableChartParent:Vt,toggleDataFitMode:Be.bound,toggleXScrollBlock:Be.bound,touchValues:Mt,isDataFitModeEnabled:Mt,isChartLoaded:Mt,epochBounds:Mt.ref,quoteBounds:Mt.ref,msPerPx:Mt,isFeedLoaded:Mt,cleanChart:Be.bound}),this.mainStore=t,this.cleanChart(),this.initFlutterCharts()}initFlutterCharts(){window.jsInterop={onChartLoad:this.onChartLoad,onMainSeriesPaint:this.painter.onPaint,onVisibleAreaChanged:this.onVisibleAreaChanged,onQuoteAreaChanged:this.onQuoteAreaChanged,loadHistory:this.loadHistory,indicators:{onRemove:t=>{this.mainStore.studies.deleteStudy(t)},onEdit:t=>{this.mainStore.studies.editStudyByIndex(t)},onSwap:(t,e)=>{const{activeItems:r}=this.mainStore.studies;[r[t],r[e]]=[r[e],r[t]]}},drawingTool:{onUpdate:()=>{this.mainStore.drawTools.onUpdate()},onLoad:t=>{this.mainStore.drawTools.onLoad(t)},onToolAdded:t=>{const e=JSON.parse(t);this.mainStore.drawTools.onToolAdded(e)},onRemove:(t,e)=>{this.mainStore.state.stateChange(xm,{drawing_tool_name:t.replace("dt_","")||"unknown",pxthickness:e?`${JSON.parse(e).lineStyle?.thickness}px`:void 0,color_name:e?`${Q_(Number(JSON.parse(e).lineStyle?.color)).replace("#","")}`:void 0}),this.mainStore.drawTools.showDeletionSnackbarForDeletedTool(t)},onStateChanged:(t,e)=>{this.mainStore.drawTools.updateAddingState(t,e)}}},(({onChartLoad:t})=>{if(window.flutterChartElement)return void t();(()=>{const t=t=>{t.key&&t.code||t.stopImmediatePropagation()};window.addEventListener("keydown",t,!0),window.addEventListener("keyup",t,!0)})();const e=document.createElement("div");e.classList.add("flutter-chart"),window.flutterChartElement=e,window._flutter={loader:{didCreateEngineInitializer:async t=>{window._flutter.appRunner=await t.initializeEngine({assetBase:"/",hostElement:window.flutterChartElement}),window._flutter.initState.isEngineIntialized=!0,Xv()}},initState:{isInitialRunCompleted:!1,isEngineIntialized:!1,isMounted:!1}},h.e(518).then(h.t.bind(h,4521,23))})({onChartLoad:this.onChartLoad})}onMount(t){t.appendChild(window.flutterChartElement);const e=window._flutter.initState;e.isMounted=!0,e.isEngineIntialized&&!e.isInitialRunCompleted&&Xv(),window.flutterChartElement?.addEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.addEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.addEventListener("mousemove",this.onMouseMove,{capture:!0})}onUnmount(){window._flutter.initState.isMounted=!1,window.flutterChartElement?.removeEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.removeEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.removeEventListener("mousemove",this.onMouseMove,{capture:!0}),clearTimeout(this.clearTouchDeltasTimer),clearTimeout(this.enableXScrollTimer),clearTimeout(this.enableYScrollTimer)}onChartLoad(){this.flutterChart=window.flutterChart,this.isChartLoaded=!0}cleanChart(){window.flutterChartElement&&(this.updateLeftMargin(),this.setShowInterval(!1),this.setSymbolClosed(!1))}onTouch(t){const e=this.mainStore.chart.chartNode,r=document.querySelector(".flutter-chart");if(e&&this.scrollableChartParent&&!this.mainStore.state.isVerticalScrollEnabled){if(this.touchValues.multiTouch)return void("touchend"===t.type&&(this.touchValues.touchIds=this.touchValues.touchIds?.filter(e=>e===t.changedTouches[0].identifier),this.touchValues={multiTouch:!!this.touchValues.touchIds?.length}));if(t.touches.length>1)return this.touchValues={multiTouch:!0},void(this.touchValues.touchIds=Array.from(t.touches).map(t=>t.identifier));const{pageX:i,pageY:a}=t.changedTouches[0];if(["touchmove","touchend"].includes(t.type)){const s=e.offsetWidth-this.mainStore.chart.yAxisWidth,n=e.offsetHeight-this.mainStore.chart.xAxisHeight,{top:o,left:l}=e.getBoundingClientRect(),c=i-l,h=c<s&&a-o<n,u=c>=s;if(this.touchValues.x&&this.touchValues.y){const e=this.touchValues.x-i,s=this.touchValues.y-a,n=(this.touchValues.deltaXTotal??0)+e,o=(this.touchValues.deltaYTotal??0)+s,l="touchend"===t.type?Math.abs(n):Math.abs(e),c=("touchend"===t.type?Math.abs(o):Math.abs(s))>l;this.touchValues={...this.touchValues,deltaXTotal:n,deltaYTotal:o},h&&c?this.isXScrollBlocked||this.toggleXScrollBlock(!0,r):!this.isXScrollBlocked&&u&&this.stopScroll(r)}this.touchValues={...this.touchValues,x:i,y:a},"touchend"===t.type&&this.isXScrollBlocked&&(this.enableXScrollTimer=setTimeout(()=>{this.toggleXScrollBlock(!1,r)},100))}["touchstart","touchend"].includes(t.type)&&(this.touchValues="touchstart"===t.type?{x:i,y:a}:{deltaYTotal:this.touchValues.deltaYTotal,deltaXTotal:this.touchValues.deltaXTotal})}}onVisibleAreaChanged(t,e){this.epochBounds.leftEpoch===t&&this.epochBounds.rightEpoch===e||(this.epochBounds={leftEpoch:t,rightEpoch:e})}onQuoteAreaChanged(t,e){this.quoteBounds={topQuote:t,bottomQuote:e}}getGranularityInMs(){return 1e3*(this.mainStore.state.granularity||1)}async onTickHistory(t){this.isFeedLoaded=!0,await cr(()=>this.isChartLoaded),this.mainStore.chart.feed?.updateQuotes(t,!1),this.flutterChart?.feed.onTickHistory(t,!1)}async onTick(t){await cr(()=>this.isChartLoaded);const e=this.mainStore.chart.feed?.quotes[this.mainStore.chart.feed?.quotes.length-1];e&&new Date(e.Date)>new Date(t.Date)||(this.mainStore.chart.feed?.addQuote(t),function(t){Gt(0,!1,t,this,void 0)}(()=>{this.mainStore.chart.lastQuote=t}),t.ohlc?this.flutterChart?.feed.onNewCandle(t):this.getGranularityInMs()<6e4&&this.flutterChart?.feed.onNewTick(t))}loadHistory(t){const{count:e,end:r}=t,{state:i,chart:a}=this.mainStore,{granularity:s}=i;a.feed?.fetchPaginationData(a.currentActiveSymbol?.symbol,r,e,s,({quotes:t})=>{this.mainStore.chart.feed?.updateQuotes(t||[],!0),this.flutterChart?.feed.onTickHistory(t||[],!0)})}updateChartStyle(t){this.flutterChart?.config.updateChartStyle(t)}async updateTheme(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateTheme(t)}async updateLeftMargin(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateLeftMargin(t)}async updateLiveStatus(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateLiveStatus(t)}async setSymbolClosed(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.setSymbolClosed(t)}async updateRightPadding(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateRightPadding(t)}async setShowInterval(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.toggleTimeIntervalVisibility(t)}scale(t){null!==this.mainStore.studies.currentHoverIndex&&(this.isScaled=!0),this.isDataFitModeEnabled=!1;const e=this.flutterChart?.app.scale(t);null!=e&&this.setMsPerPx(e)}async updateContracts(t){const e=t.filter(t=>t.markers?.length>0).map(t=>(t.markers.forEach(t=>{if(!t.quote){const{price:e}=this.getInterpolatedPositionAndPrice(1e3*t.epoch)||{};t.quote=e}}),t));await cr(()=>this.isFeedLoaded),this.flutterChart?.config.updateContracts(e)}setMsPerPx(t){this.msPerPx=t,this.mainStore.state.saveLayout()}getXFromEpoch(t){return this.flutterChart?.app.getXFromEpoch(t)??0}getYFromQuote(t){return this.flutterChart?.app.getYFromQuote(t)??0}getEpochFromX(t){return this.flutterChart?.app.getEpochFromX(t)??0}getQuoteFromY(t){return this.flutterChart?.app.getQuoteFromY(t)??0}get scrollableChartParent(){const t=this.mainStore.chart.chartNode;if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}}function rb(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ib{constructor(){rb(this,"notifier",new Fv),rb(this,"favorites",Cv.getInstance()),rb(this,"chart",new $f(this)),rb(this,"state",new Mv(this)),rb(this,"chartAdapter",new eb(this)),rb(this,"chartType",new Zf(this)),rb(this,"chartMode",new t_(this)),rb(this,"studies",new Z_(this)),rb(this,"drawTools",new tv(this)),rb(this,"chartTitle",new lv(this)),rb(this,"timeperiod",new ff(this)),rb(this,"view",new hv(this)),rb(this,"crosshair",new gv(this)),rb(this,"share",new mv(this)),rb(this,"chartSetting",new vv(this)),rb(this,"loader",new Sv),rb(this,"chartSize",new Tv(this)),rb(this,"routing",new jv(this)),rb(this,"lastDigitStats",new Hv(this)),rb(this,"bottomWidgetsContainer",new fa(this)),rb(this,"navigationWidget",new qv(this)),rb(this,"highestLowest",new $v(this)),rb(this,"paginationLoader",new Wv(this)),rb(this,"toolbarWidget",new Kv(this)),rb(this,"scroll",new Yv)}}let ab;const sb=()=>yi().useContext(ab),nb=({StoreClass:t,...e})=>{const r=sb(),i=yi().useRef();return(()=>{const e=yi().useRef(!1);e.current||(i.current=new t(r),e.current=!0)})(),yi().useEffect(()=>{i.current?.updateProps?.(e)}),yi().useEffect(()=>()=>{i.current?.destructor?.()},[]),(0,_g.jsx)(_g.Fragment,{children:e.children(i.current)})},ob=({offScreenDirection:t})=>{const e=t===Ji.UP?"23px":"-41px",r=t===Ji.DOWN?"rotate(180deg)":"";return t===Ji.UP?(0,_g.jsx)(Vp,{className:"arrow-icon",style:{top:e,transform:r}}):(0,_g.jsx)(Hp,{className:"arrow-icon",style:{top:e,transform:r}})},lb=({color:t,yAxiswidth:e,title:r,opacity:i})=>(0,_g.jsx)("div",{className:"title-wrapper",style:{color:t,right:e,opacity:i},children:(0,_g.jsx)("span",{className:"title",children:r})}),cb=({isOverlapping:t})=>(0,_g.jsxs)("div",{className:e()("drag-icon",{"drag-icon--hidden":t}),children:[(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})})]}),hb=Li(({lineStyle:t,backgroundColor:r,color:i,foregroundColor:a,hideOffscreenBarrier:s,opacityOnOverlap:n,hideOffscreenLine:o,hideBarrierLine:l,store:c,title:h})=>{const{className:u,draggable:d,init:g,isDragging:p,isMobile:m,isOverlapping:f,isOverlappingWithPriceLine:_,offScreen:v,offScreenDirection:b,overlappedBarrierWidth:y,priceDisplay:S,priceLineWidth:x,setDragLine:w,visible:C}=c,T=yi().useMemo(()=>!(s&&v),[s,v]),k=yi().useMemo(()=>!(l||o&&v||f),[l,o,v,f]),j=yi().useMemo(()=>f?n:"",[f,n]);if(yi().useEffect(()=>{g()},[g]),!T)return null;const A=x+18,O=m?20:3;return(0,_g.jsx)("div",{className:e()("barrier-area",{"barrier-area--zero":_}),ref:w,hidden:!C,children:(0,_g.jsxs)("div",{className:e()("chart-line","horizontal",u||"",{draggable:d,dragging:p}),style:{color:a},children:[k&&(0,_g.jsx)("div",{className:e()("drag-line",{"drag-line--zero":_}),style:{borderTopColor:i,borderTopStyle:t,width:`calc(100% - ${A}px + ${m?0:y-4}px)`}}),(0,_g.jsx)("div",{className:"draggable-area"}),(0,_g.jsx)("div",{className:"draggable-area-wrapper",children:(0,_g.jsxs)("div",{className:e()("drag-price",{"drag-price--narrow":_}),style:{backgroundColor:_?void 0:r,color:_?i:a,borderColor:i,width:d&&_?A+8:A-6,opacity:j,right:O},children:[(0,_g.jsx)(cb,{isOverlapping:_}),(0,_g.jsx)("div",{className:e()("price",{"price--zero":_}),style:{color:_?i:"",right:_?y+6+8*S.length+(d?26:0):0},children:S}),(0,_g.jsx)("div",{}),v&&b&&(0,_g.jsx)(ob,{offScreenDirection:b,color:i})]})}),h&&(0,_g.jsx)(lb,{color:i,title:h,yAxiswidth:A+O,opacity:j})]})})}),ub=Li(({store:t})=>{const{visible:r,className:i,setShadeRef:a}=t;return(0,_g.jsx)("div",{className:e()("shade",i,{hidden:!r}),ref:a,style:{top:-120}})}),db=(mb=Li(({store:t,...r})=>{const{_high_barrier:i,_low_barrier:a,aboveShadeStore:s,belowShadeStore:n,betweenShadeStore:o,backgroundColor:l="#2C9AFF",color:c="#008832",foregroundColor:h="#ffffff",hideBarrierLine:u,hideOffscreenBarrier:d,hideOffscreenLine:g,hidePriceLines:p,isInitialized:m,isSingleBarrier:f,lineStyle:_,opacityOnOverlap:v,shadeColor:b="#008832"}=t,y=yi().useRef(null);return yi().useEffect(()=>{m&&y.current&&y.current.addEventListener("wheel",t=>{t.preventDefault()})},[m]),m?(0,_g.jsxs)("div",{className:e()("barrier",{"hide-pricelines":p}),style:{"--shade-color":b},ref:y,children:[(0,_g.jsx)(hb,{store:i,lineStyle:_,backgroundColor:l,color:c,foregroundColor:h,hideOffscreenBarrier:d,hideOffscreenLine:g,hideBarrierLine:u,opacityOnOverlap:v,...r}),!f&&(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)(hb,{store:a,lineStyle:_,backgroundColor:l,color:c,foregroundColor:h,hideOffscreenBarrier:d,hideOffscreenLine:g,hideBarrierLine:u,opacityOnOverlap:v,...r}),(0,_g.jsx)(ub,{store:s}),(0,_g.jsx)(ub,{store:n}),(0,_g.jsx)(ub,{store:o})]})]}):null}),fb=pa,({children:t,...e})=>(0,_g.jsx)(nb,{StoreClass:fb,...e,children:r=>(0,_g.jsx)(mb,{store:r,...e,children:t})})),gb=db,pb=({children:t,className:r="",enabled:i=!1,content:a,position:s="top",...n})=>(0,_g.jsxs)("div",{className:e()("sc-tooltip",r,{[`sc-tooltip--${s}`]:!!s,"sc-tooltip--enable":i}),...n,children:[t,(0,_g.jsx)("div",{className:"sc-tooltip__inner",children:a})]});var mb,fb;h(5877),h(4282);const _b=Li(({children:t,className:r,height:i,width:a,autoHide:s,freeze:n=!1,onScroll:o=()=>null,setPanel:l})=>{const{scroll:c}=sb(),{setScrollPanel:h,isHover:u}=c;return(0,_g.jsx)("div",{ref:t=>{h(t),l&&l(t)},className:e()("sc-scrollbar",r,{"sc-scrollbar--freeze":n,"sc-scrollbar--auto-hide":s,"sc-scrollbar--hover":u}),onScroll:o,style:{maxHeight:i||"100%",maxWidth:a||"none"},children:t})});h(1849);const vb=Li(({height:t,store:e,children:r})=>{const{getItems:i,onItemClick:a}=e,s="function"==typeof r?r:t=>t.text,n=t=>"ciq-list-item "+(t.disabled?"disabled":"")+" "+(t.active?"active":"");return(0,_g.jsx)(_b,{className:"ciq-list",autoHide:!0,height:t?`${t}px`:"",children:i().map((t,e)=>(0,_g.jsx)("div",{className:n(t),onClick:()=>a(e,t),children:s(t)},t.id))})});var bb=h(255);h(1238);const yb=Li(({className:t,menu_element:e,portalNodeId:r,open:i,onClick:a})=>{const{chartSetting:s}=sb(),{theme:n}=s;if(document.body.style.overflow=i?"hidden":"",!r)return e;const o=document.getElementById(r);return o?xi().createPortal((0,_g.jsx)("div",{className:"smartcharts-portal "+(i?"smartcharts-portal--open":""),children:(0,_g.jsx)("div",{className:`smartcharts smartcharts-${n}`,children:(0,_g.jsx)("div",{className:"smartcharts-mobile",children:(0,_g.jsx)("div",{className:`cq-modal-dropdown ${t||""} ${i?"stxMenuActive":""}`,children:(0,_g.jsx)("div",{className:"cq-modal__overlay",onClick:a,children:e})})})})}),o):null});h(4007);const Sb=(0,bi.forwardRef)(({store:t,children:r,className:i="",title:a,customHead:s,enableTabular:n=!1,handleOverlayClick:o,handleCloseDialog:l},c)=>{const{updateCloseCallback:h,onContainerClick:u,updateOutsideClickCallback:d}=t;return(0,bi.useEffect)(()=>{h(l),d(o)}),(0,_g.jsxs)("div",{ref:c,className:e()("sc-dialog",i,{"sc-dialog--tabular":n}),onClick:u,children:[a&&(0,_g.jsxs)("div",{className:"sc-dialog__head",children:[(0,_g.jsx)("div",{className:"sc-dialog__head--title",children:a}),s&&(0,_g.jsx)("div",{className:"sc-dialog__head--custom",children:s}),(0,_g.jsx)("div",{className:"sc-dialog__head--action",children:(0,_g.jsx)(kg,{onClick:l})})]}),(0,_g.jsx)("div",{className:"sc-dialog__body",children:r})]})});Sb.displayName="Dialog";const xb=Li(Sb),wb=({store:t,className:r,children:i,title:a,tooltip:s,portalNodeId:n,enabled:o=!0,onMouseEnter:l,onMouseLeave:c,enableTabular:h,customHead:u,emptyMenu:d,handleOverlayClick:g,modalMode:p})=>{const{open:m,dialogStatus:f,onTitleClick:_,handleCloseDialog:v,dialogStore:b}=t,{chartSetting:y,chart:S}=sb(),{theme:x}=y,{shouldRenderDialogs:w,isMobile:C,context:T}=S,k=t=>{"cq-modal__overlay"===t.target.className&&v()};if(!T)return null;const j=yi().Children.map(i,(t,e)=>0===e?t:null),A=yi().Children.map(i,(t,e)=>0!==e?t:null);if(p){const t=document.getElementById(n||"smartcharts_modal");if(!t)return null;const i=xi().createPortal((0,_g.jsx)("div",{className:`smartcharts-${x}`,children:(0,_g.jsx)("div",{className:e()({"smartcharts-mobile":C,"smartcharts-desktop":!C}),children:(0,_g.jsx)("div",{className:e()("cq-modal-dropdown",r,{stxMenuActive:m}),children:(0,_g.jsx)("div",{className:"cq-modal__overlay",onClick:k,children:(0,_g.jsx)(Cb,{dialogStatus:f,dialogStore:b,title:a,handleCloseDialog:v,enableTabular:h,customHead:u,handleOverlayClick:g,children:A})})})})}),t);return d?m?i:null:(0,_g.jsxs)(pb,{className:e()("ciq-menu",r||"",{stxMenuActive:o&&m,"ciq-enabled":o,"ciq-disabled":!o}),content:s,enabled:!!s,position:"right",children:[(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,onClick:o?_:()=>null,children:j}),o&&m&&i]})}const O=w?(0,_g.jsxs)(xb,{className:e()("cq-menu-dropdown",{"cq-menu-dropdown-enter-done":f}),store:b,children:[a&&(0,_g.jsxs)("div",{className:"title",children:[(0,_g.jsx)("div",{className:"title-text",children:a}),(0,_g.jsx)(kg,{className:"icon-close-menu",onClick:_})]}),A]}):null;return o&&(0,_g.jsxs)("div",{className:e()("ciq-menu ciq-enabled",r,{stxMenuActive:m}),children:[(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,onClick:_,children:j}),C&&n&&(0,_g.jsx)(yb,{className:r,open:m,menu_element:O,portalNodeId:n,onClick:k})||O]})||(0,_g.jsx)("div",{className:e()("ciq-menu ciq-disabled",r),children:(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,children:j})})},Cb=({dialogStatus:t,dialogStore:e,title:r,handleCloseDialog:i,enableTabular:a,customHead:s,handleOverlayClick:n,children:o})=>{const l=yi().useRef(null);return(0,_g.jsx)(bb.CSSTransition,{appear:!0,in:t,timeout:300,classNames:"sc-dialog",unmountOnExit:!0,nodeRef:l,children:(0,_g.jsx)(xb,{ref:l,store:e,title:r,handleCloseDialog:i,enableTabular:a,customHead:s,handleOverlayClick:n,children:o})})},Tb=({children:t})=>(0,_g.jsx)(_g.Fragment,{children:t});wb.Title=Tb,wb.Body=Tb;const kb=Li(wb);var jb=h(9160).t;const Ab=({Icon:t,...e})=>(0,_g.jsx)(t,{...e}),Ob=Li(({enabled:t,newDesign:e,onChange:r})=>{const{chartType:i,chart:a,state:s,loader:n}=sb(),{listStore:o,setChartType:l,updateProps:c,types:h,type:u,menuStore:d}=i,{open:g,setOpen:p}=i.menuStore,{isActive:m}=n,{isMobile:f}=a,_=r||l;return void 0===u?null:(c(_),e?(0,_g.jsx)("div",{className:"sc-chart-type",children:h.map(t=>{const e=t.icon;let r="sc-chart-type__item";return r+=t.active&&!m?" sc-chart-type__item--active":"",r+=t.disabled||m?" sc-chart-type__item--disabled":"",(0,_g.jsxs)(pb,{enabled:t.disabled&&!m&&!f,className:r,content:jb.translate("Available only for non-tick time intervals."),onClick:()=>t.disabled||m?null:(t=>{u.id!==t.id&&(t.id&&s.stateChange("CHART_TYPE_CHANGE",{chart_type_name:"colored_bar"===t.id?t.text:t.text.toLowerCase(),time_interval_name:$i(s.granularity,fm)}),_(t.id)),p(!1)})(t),children:[(0,_g.jsx)(e,{}),(0,_g.jsx)("span",{className:"text",children:jb.translate(t.text)})]},t.id)})}):(0,_g.jsxs)(kb,{store:d,className:"ciq-display ciq-chart-types",enabled:t,title:jb.translate("Chart types"),children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(Ab,{Icon:u.icon,className:"ic-icon-with-sub "+(g?"active":""),"tooltip-title":jb.translate(u.text)})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)("div",{className:"body",children:(0,_g.jsx)(vb,{height:260,store:o,children:t=>(0,_g.jsx)(_g.Fragment,{children:(0,_g.jsxs)("span",{className:"left",children:[(0,_g.jsx)(Ab,{Icon:u.icon,className:"margin "+(t.active?"active":"")}),(0,_g.jsx)("span",{className:"ciq-icon-text",children:t.text})]})})})})})]}))});h(5511),h(4321);var Eb=h(809),Nb=h(9160).t;const Ib=({title:t,type:e,children:r})=>(0,_g.jsxs)("div",{className:"form__group "+(e?`form__group--${e}`:""),children:[t&&(0,_g.jsx)("div",{className:"form__label",children:(0,_g.jsxs)("span",{children:[" ",t," "]})}),(0,_g.jsx)("div",{className:"form__control",children:r})]}),Pb=({id:t,label:e,checked:r,disabled:i,onChange:a})=>(0,_g.jsx)("span",{onClick:()=>a(!r),children:(0,_g.jsxs)("label",{htmlFor:t,className:`sc-checkbox ${r?"sc-checkbox--checked":""} ${i?"sc-checkbox--disabled":""}`,children:[r?(0,_g.jsx)(ep,{className:"sc-checkbox__box"}):(0,_g.jsx)(tp,{className:"sc-checkbox__box"}),(0,_g.jsx)("span",{className:"sc-checkbox__label",children:e})]})}),Db=({min:t=1,max:e=10,step:r=1,value:i,onChange:a})=>{const s=Eb.useMemo(()=>{const r=Math.round(238*(i-t)/(e-t));return r<0?0:r},[i,t,e]),n=Eb.useCallback(t=>{let e=t.currentTarget.value;e.length>0&&a(Number(e))},[a]);return(0,_g.jsxs)("div",{className:"sc-slider",children:[(0,_g.jsxs)("div",{className:"sc-slider-range",children:[(0,_g.jsx)("div",{className:"sc-slider-bar"}),(0,_g.jsx)("div",{className:"sc-slider-active-bar",style:{width:s}}),(0,_g.jsx)("input",{type:"range",min:t,max:e,step:r,onChange:n,value:i})]}),(0,_g.jsx)("div",{className:"value",children:i})]})},Lb=t=>{const{subtitle:r,rows:i,children:a,value:s,onRowClick:n,className:o}=t,[l,c]=Eb.useState(!1),[h,u]=Eb.useState(0),[d,g]=Eb.useState(0),[p,m]=Eb.useState(),f=Eb.useRef(null),_=Eb.useRef(null),v=Eb.useCallback(()=>{const t=f.current?.getBoundingClientRect();u(l?void 0:t?.top),g(l?void 0:t?.left),m(t?.width),c(t=>!t)},[l,f]),b=Eb.useCallback(t=>{t.target!==_.current&&(c(!1),u(0),g(0))},[_]);return Eb.useEffect(()=>(document.addEventListener("click",b,!1),()=>{document.removeEventListener("click",b)}),[b]),(0,_g.jsxs)("div",{className:e()(o,"sc-dropdown",{active:l}),ref:f,style:{left:d,top:h,width:p},children:[!!r&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:r})}),(0,_g.jsxs)("div",{className:e()("value",{active:l}),onClick:v,ref:_,children:[(0,_g.jsx)("span",{className:"text",children:s}),(0,_g.jsx)(Hg,{})]}),(0,_g.jsx)(_b,{autoHide:!0,height:l?"200px":"1px",className:e()("dropdown",{active:l}),children:i.map((t,r)=>(0,_g.jsx)("div",{className:e()("row",{"row--selected":t===s}),onClick:()=>n&&n(t),children:a(t)},r))})]})},Mb=({pattern:t,subtitle:e,lineWidth:r,onChange:i})=>(0,_g.jsx)(Lb,{rows:[{width:1,pattern:"solid"},{width:3,pattern:"solid"},{width:5,pattern:"solid"},{width:1,pattern:"dotted"},{width:3,pattern:"dotted"},{width:5,pattern:"dotted"},{width:1,pattern:"dashed"},{width:3,pattern:"dashed"},{width:5,pattern:"dashed"},{width:0,pattern:"none"}],value:"none"!==t?(0,_g.jsx)("span",{className:`option ${t}-${r}`}):(0,_g.jsx)("span",{className:"none",children:"None"}),onRowClick:i,subtitle:e,children:t=>"none"!==t.pattern?(0,_g.jsx)("span",{className:`option ${t.pattern}-${t.width}`}):(0,_g.jsx)("span",{className:"none",children:"None"})}),Bb=({subtitle:t,color:r,theme:i,setColor:a})=>{const[s,n]=Eb.useState(!1),[o,l]=Eb.useState(0),[c,h]=Eb.useState(0),[u,d]=Eb.useState(),g=Eb.useRef(null),p=Eb.useRef(null),m=Eb.useMemo(()=>"auto"!==r?r:"light"===i?"#000000":"#ffffff",[r,i]),f=Eb.useCallback(()=>{const t=g.current?.getBoundingClientRect();l(s?void 0:t?.top),h(s?void 0:t?.left),d(t?.width),n(t=>!t)},[s,g]),_=Eb.useCallback(t=>{t.target!==p.current&&(n(!1),l(0),h(0))},[p]);return Eb.useEffect(()=>(document.addEventListener("click",_,!1),()=>{document.removeEventListener("click",_)}),[_]),(0,_g.jsxs)("div",{ref:g,className:e()("sc-color-picker",{active:s}),style:{top:o,left:c,width:u},children:[!!t&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:t})}),(0,_g.jsxs)("div",{className:"value",onClick:f,ref:p,children:[(0,_g.jsx)("div",{className:"sc-input-color",style:{backgroundColor:m}}),(0,_g.jsx)(Hg,{})]}),(0,_g.jsx)("div",{className:e()("dropdown",{open:s}),children:[["#ffffff","#e1e1e1","#cccccc","#b7b7b7","#a0a0a5","#898989","#707070","#626262","#555555","#464646","#363636","#262626","#1d1d1d","#000000"],["#f4977c","#f7ac84","#fbc58d","#fff69e","#c4de9e","#85c99e","#7fcdc7","#75d0f4","#81a8d7","#8594c8","#8983bc","#a187bd","#bb8dbe","#f29bc1"],["#ef6c53","#f38d5b","#f8ae63","#fff371","#acd277","#43b77a","#2ebbb3","#00bff0","#4a8dc8","#5875b7","#625da6","#8561a7","#a665a7","#ee6fa9"],["#ea1d2c","#ee652e","#f4932f","#fff126","#8ec648","#00a553","#00a99c","#00afed","#0073ba","#0056a4","#323390","#66308f","#912a8e","#e9088c"],["#9b0b16","#9e4117","#a16118","#c6b920","#5a852d","#007238","#00746a","#0077a1","#004c7f","#003570","#1d1762","#441261","#62095f","#9c005d"],["#770001","#792e03","#7b4906","#817a0b","#41661e","#005827","#005951","#003b5c","#001d40","#000e35","#04002c","#19002b","#2c002a","#580028"]].map((t,e)=>(0,_g.jsx)("div",{className:"row",children:t.map(t=>(0,_g.jsx)("div",{className:"tile-color",style:{backgroundColor:t},onClick:()=>a(t)},t))},e))})]})},Rb=({value:t,onChange:e})=>(0,_g.jsx)("div",{className:"sc-switch "+(t?"on":"off"),onClick:()=>e(!t),children:(0,_g.jsx)("div",{className:"handle"})}),Fb=({id:t,label:e,value:r,onChange:i,noramIcon:a,activeIcon:s})=>{const n=r?s:a;return(0,_g.jsxs)("div",{className:"sc-switch-icon",children:[(0,_g.jsx)(n,{className:"sc-switch-icon__icon"}),(0,_g.jsx)("div",{className:"sc-switch-icon__description",children:(0,_g.jsx)(Pb,{id:t,label:e,checked:r,onChange:i})})]})},Vb=({subtitle:t,onChange:e,min:r,max:i,step:a,value:s})=>{const[n,o]=Eb.useState(""),l=sf(()=>{const t=t=>{o(t),e(t)};void 0!==i&&+n>i?t(i):void 0!==r&&+n<r?t(r):e(n)},300,{leading:!0,trailing:!1});return Eb.useEffect(()=>{o(s)},[s]),(0,_g.jsxs)("div",{className:"sc-numeric-input",children:[(0,_g.jsx)("input",{type:"number",value:n,onBlur:l,onChange:t=>{t.persist(),o(t.target.valueAsNumber||"")},onKeyPress:t=>{["e","+","E"].includes(t.key)&&t.preventDefault(),"Enter"===t.key&&l()},min:r,max:i,step:a}),!!t&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:t})}),(0,_g.jsxs)("div",{className:"sc-numeric-input-buttons",children:[(0,_g.jsx)(Ag,{onClick:()=>{o(t=>+t+1),l()}}),(0,_g.jsx)(jg,{onClick:()=>{o(t=>+t-1),l()}})]})]})},Hb=({props:t,theme:e,onChange:r})=>{const{value:i,color:a}=t;return(0,_g.jsxs)("span",{className:"sc-numbercolorpicker",children:[(0,_g.jsx)(Vb,{value:i,subtitle:Nb.translate("Size"),onChange:t=>r({color:a,value:t})}),(0,_g.jsx)(Bb,{color:a,theme:e,subtitle:Nb.translate("Color"),setColor:t=>r({color:t,value:i})})]})},Ub=({className:t,children:e,active:r,onChange:i})=>(0,_g.jsx)("div",{onClick:()=>i(!r),className:`${t||""} ${r?"active":""} sc-toggle`,children:e}),qb=({onChange:t,value:e})=>{const r=r=>t({...e,...r}),{style:i,weight:a}=e;return(0,_g.jsxs)("span",{className:"sc-fontsetting",children:[(0,_g.jsx)(Ub,{onChange:t=>r({weight:t?"bold":void 0}),active:!!a,children:(0,_g.jsx)("div",{className:"sc-text-icon",children:(0,_g.jsx)("b",{children:"B"})})}),(0,_g.jsx)(Ub,{active:!!i,onChange:t=>r({style:t?"italic":void 0}),children:(0,_g.jsx)("div",{className:"sc-text-icon",children:(0,_g.jsx)("i",{children:"i"})})}),(0,_g.jsx)(Lb,{className:"sc-changefontsize",rows:[8,10,12,13,14,16,20,28,36,48,64],onRowClick:t=>r({size:`${t}px`}),children:t=>(0,_g.jsx)("span",{className:"option",children:t})}),(0,_g.jsx)(Lb,{className:"sc-changefontfamily",rows:["Default","Helvetica","Courier","Garamond","Palatino","Times New Roman"],onRowClick:t=>r({family:t}),children:t=>(0,_g.jsx)("span",{className:"option",children:t})})]})};h(931);const zb=({children:t,className:r,enabled:i=!0,...a})=>(0,_g.jsxs)("div",{className:e()("sc-inline-loader",r,{"sc-inline-loader--enable":i}),...a,children:[t,i&&(0,_g.jsxs)("div",{className:"sc-inline-loader__inner",children:[(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"})]})]}),$b=Li(()=>{const{loader:t}=sb(),{isActive:r,currentState:i}=t;return(0,_g.jsxs)("div",{className:e()("sc-loader",{show:r}),children:[(0,_g.jsx)("div",{className:"sc-loader-spin"}),(0,_g.jsx)("div",{className:"sc-loader-status",children:i})]})});var Gb=h(9160).t;const Wb=Li(({item:t,category:r,onClick:i,isLoading:a})=>{const{timeperiod:s,chartType:n,chart:o,state:l}=sb(),c=n.type.id,{allowTickChartTypeOnly:h}=l,{mainStore:u}=s,{granularity:d}=o,g=u.chart.isMobile,p=yi().useMemo(()=>"tick"===r.key,[r]),m=yi().useMemo(()=>((t,e,r)=>t&&e===r)(a,t.interval,d),[a,t,d]),f=yi().useMemo(()=>((t,e,r)=>!t&&"line"!==r&&"tick"===e)(g,r.key,c),[g,r.key,c]),_=yi().useMemo(()=>p&&"line"!==c||!p&&h,[p,c,h]),v=t.interval===d,b=yi().useCallback(()=>i(c,r.key,t.interval),[c,r,t,i]);return(0,_g.jsx)(pb,{onClick:b,className:e()("sc-interval__item",{"sc-interval__item--active":v,"sc-interval__item--disabled":_||a,"pre-loading":m}),enabled:f,content:Gb.translate('Available only for "Area" chart type.'),children:(0,_g.jsx)(zb,{enabled:m,children:(0,_g.jsxs)("span",{children:[t.num," ",Gb.translate(1===t.num?r.single:r.plural)]})})},t.interval)}),Kb=Li(({portalNodeId:t,onChange:e})=>{const{timeperiod:r,loader:i}=sb(),{changeGranularity:a,setGranularity:s,updateProps:n,updatePortalNode:o}=r,{isActive:l}=i,c=e||s,h=(t,e,r)=>{l||"tick"===e&&"line"!==t||a(r)};return yi().useEffect(()=>n(c)),o(t),(0,_g.jsxs)("div",{className:"sc-interval",children:[(0,_g.jsx)("div",{className:"sc-interval__head",children:(0,_g.jsx)("strong",{children:Gb.translate("Time interval")})}),(0,_g.jsx)("div",{className:"sc-interval__info",children:Gb.translate('Tick interval only available for "Area" Chart type.')}),(0,_g.jsx)("div",{className:"sc-interval__content",children:fm.map(t=>t.items.map(e=>(0,_g.jsx)(Wb,{item:e,category:t,onClick:h,isLoading:l},e.interval)))})]})}),Qb=({className:t="info-footnote",isMobile:r=!1,text:i})=>(0,_g.jsx)("div",{className:e()(t,{[`${t}--mobile`]:r}),children:i}),Yb=yi().memo(Qb);var Xb=h(9160).t;const Zb={line:np,candles:op,ohlc:cp,hollow:lp},Jb=Li(({onChartType:t,onGranularity:r,portalNodeId:i=""})=>{const{chart:a,chartMode:s,chartType:n,timeperiod:o,state:l,chartSetting:c}=sb(),{menuStore:h}=s,{allowTickChartTypeOnly:u}=l,{isMobile:d}=a,{type:g}=n,{display:p}=o,{isSmoothChartEnabled:m,toggleSmoothChart:f}=c,_=s.menuStore.open,v=Zb[g.id];return(0,_g.jsxs)(kb,{className:"ciq-display sc-chart-mode",title:Xb.translate("Chart types"),tooltip:Xb.translate("Chart types"),modalMode:!0,isFullscreen:!0,portalNodeId:i,store:h,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:e()("sc-chart-mode__menu",{"sc-chart-mode__menu--active":_}),children:[(0,_g.jsx)("span",{className:"sc-chart-mode__menu__timeperiod",children:p}),(0,_g.jsx)(v,{"tooltip-title":Xb.translate(g.text)})]})}),(0,_g.jsxs)(kb.Body,{children:[(0,_g.jsxs)("div",{className:"sc-chart-mode__section",children:[(0,_g.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,_g.jsx)(Ob,{newDesign:!0,onChange:t})}),(0,_g.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,_g.jsx)(Kb,{newDesign:!0,portalNodeId:i,onChange:r})})]}),(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle",children:(0,_g.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-content",children:[(0,_g.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-text",children:[(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle-title",children:Xb.translate("Smooth chart movement")}),(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle-description",children:Xb.translate("Performance may vary by device. Turn off if it lags.")})]}),(0,_g.jsx)(Rb,{value:m,onChange:f})]})}),u&&(0,_g.jsx)(Yb,{isMobile:d,text:Xb.translate("Only selected charts and time intervals are available for this trade type.")})]})]})});var ty=h(8713);function ey(t){return e=>!!e.type&&e.type.tabsRole===t}const ry=ey("Tab"),iy=ey("TabList"),ay=ey("TabPanel");function sy(t,e){return bi.Children.map(t,t=>null===t?null:function(t){return ry(t)||iy(t)||ay(t)}(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children?(0,bi.cloneElement)(t,Object.assign({},t.props,{children:sy(t.props.children,e)})):t)}function ny(t,e){return bi.Children.forEach(t,t=>{null!==t&&(ry(t)||ay(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children&&(iy(t)&&e(t),ny(t.props.children,e)))})}function oy(t,e,r){let i,a=0,s=0,n=!1;const o=[];return ny(t[e],t=>{iy(t)&&(t.props&&t.props.children&&"object"==typeof t.props.children&&ny(t.props.children,t=>o.push(t)),n&&(i=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),n=!0),ry(t)?(n&&-1!==o.indexOf(t)||(i=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),a++):ay(t)&&s++}),i||a===s||(i=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${r}\`. Received ${a} 'Tab' and ${s} 'TabPanel'.`)),i}function ly(t){var e,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=ly(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}const cy=function(){for(var t,e,r=0,i="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=ly(t))&&(i&&(i+=" "),i+=e);return i};function hy(t){let e=0;return ny(t,t=>{ry(t)&&e++}),e}const uy=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function dy(t){return t&&"getAttribute"in t}function gy(t){return dy(t)&&t.getAttribute("data-rttab")}function py(t){return dy(t)&&"true"===t.getAttribute("aria-disabled")}let my;const fy={className:"react-tabs",focus:!1},_y={children:oy},vy=t=>{(0,ty.checkPropTypes)(_y,t,"prop","UncontrolledTabs");let e=(0,bi.useRef)([]),r=(0,bi.useRef)([]);const i=(0,bi.useRef)();function a(e,r){if(e<0||e>=o())return;const{onSelect:i,selectedIndex:a}=t;i(e,a,r)}function s(t){const e=o();for(let r=t+1;r<e;r++)if(!py(l(r)))return r;for(let e=0;e<t;e++)if(!py(l(e)))return e;return t}function n(t){let e=t;for(;e--;)if(!py(l(e)))return e;for(e=o();e-- >t;)if(!py(l(e)))return e;return t}function o(){const{children:e}=t;return hy(e)}function l(t){return e.current[`tabs-${t}`]}function c(t){let e=t.target;do{if(h(e)){if(py(e))return;return void a([].slice.call(e.parentNode.children).filter(gy).indexOf(e),t)}}while(null!=(e=e.parentNode))}function h(t){if(!gy(t))return!1;let e=t.parentElement;do{if(e===i.current)return!0;if(e.getAttribute("data-rttabs"))break;e=e.parentElement}while(e);return!1}const u=Object.assign({},fy,t),{className:d,domRef:g}=u,p=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(u,uy);return yi().createElement("div",Object.assign({},p,{className:cy(d),onClick:c,onKeyDown:function(e){const{direction:r,disableUpDownKeys:i,disableLeftRightKeys:u}=t;if(h(e.target)){let{selectedIndex:h}=t,d=!1,g=!1;"Space"!==e.code&&32!==e.keyCode&&"Enter"!==e.code&&13!==e.keyCode||(d=!0,g=!1,c(e)),(u||37!==e.keyCode&&"ArrowLeft"!==e.code)&&(i||38!==e.keyCode&&"ArrowUp"!==e.code)?(u||39!==e.keyCode&&"ArrowRight"!==e.code)&&(i||40!==e.keyCode&&"ArrowDown"!==e.code)?35===e.keyCode||"End"===e.code?(h=function(){let t=o();for(;t--;)if(!py(l(t)))return t;return null}(),d=!0,g=!0):36!==e.keyCode&&"Home"!==e.code||(h=function(){const t=o();for(let e=0;e<t;e++)if(!py(l(e)))return e;return null}(),d=!0,g=!0):(h="rtl"===r?n(h):s(h),d=!0,g=!0):(h="rtl"===r?s(h):n(h),d=!0,g=!0),d&&e.preventDefault(),g&&a(h,e)}},ref:t=>{i.current=t,g&&g(t)},"data-rttabs":!0}),function(){let i=0;const{children:a,disabledTabClassName:s,focus:n,forceRenderTabPanel:c,selectedIndex:h,selectedTabClassName:u,selectedTabPanelClassName:d,environment:g}=t;r.current=r.current||[];let p=r.current.length-o();const m=(0,bi.useId)();for(;p++<0;)r.current.push(`${m}${r.current.length}`);return sy(a,t=>{let a=t;if(iy(t)){let i=0,o=!1;null==my&&function(t){const e=t||("undefined"!=typeof window?window:void 0);try{my=!(void 0===e||!e.document||!e.document.activeElement)}catch(t){my=!1}}(g);const c=g||("undefined"!=typeof window?window:void 0);my&&c&&(o=yi().Children.toArray(t.props.children).filter(ry).some((t,e)=>c.document.activeElement===l(e))),a=(0,bi.cloneElement)(t,{children:sy(t.props.children,t=>{const a=`tabs-${i}`,l=h===i,c={tabRef:t=>{e.current[a]=t},id:r.current[i],selected:l,focus:l&&(n||o)};return u&&(c.selectedClassName=u),s&&(c.disabledClassName=s),i++,(0,bi.cloneElement)(t,c)})})}else if(ay(t)){const e={id:r.current[i],selected:h===i};c&&(e.forceRender=c),d&&(e.selectedClassName=d),i++,a=(0,bi.cloneElement)(t,e)}return a})}())},by=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"],yy={children:oy,onSelect:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;return s&&"function"!=typeof s?o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`function\`.`):null!=t.selectedIndex&&null==s&&(o=new Error(`The ${i} \`${n}\` is marked as required in \`${r}\`, but its value is \`undefined\` or \`null\`.\n\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.\nIf you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),o},selectedIndex:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;if(null!=s&&"number"!=typeof s)o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`number\`.`);else if(null!=t.defaultIndex&&null!=s)return new Error(`The ${i} \`${n}\` cannot be used together with \`defaultIndex\` in \`${r}\`.\nEither remove \`${n}\` to let \`${r}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return o}},Sy={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},xy=t=>{(0,ty.checkPropTypes)(yy,t,"prop","Tabs");const e=Object.assign({},Sy,t),{children:r,defaultFocus:i,defaultIndex:a,focusTabOnClick:s,onSelect:n}=e,o=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,by),[l,c]=(0,bi.useState)(i),[h]=(0,bi.useState)((t=>null===t.selectedIndex?1:0)(o)),[u,d]=(0,bi.useState)(1===h?a||0:null);if((0,bi.useEffect)(()=>{c(!1)},[]),1===h){const t=hy(r);(0,bi.useEffect)(()=>{if(null!=u){const e=Math.max(0,t-1);d(Math.min(u,e))}},[t])}let g=Object.assign({},t,o);return g.focus=l,g.onSelect=(t,e,r)=>{"function"==typeof n&&!1===n(t,e,r)||(s&&c(!0),1===h&&d(t))},null!=u&&(g.selectedIndex=u),delete g.defaultFocus,delete g.defaultIndex,delete g.focusTabOnClick,yi().createElement(vy,g,r)};xy.tabsRole="Tabs";const wy=xy,Cy=["children","className"],Ty={className:"react-tabs__tab-list"},ky=t=>{const e=Object.assign({},Ty,t),{children:r,className:i}=e,a=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Cy);return yi().createElement("ul",Object.assign({},a,{className:cy(i),role:"tablist"}),r)};ky.tabsRole="TabList";const jy=ky,Ay=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"],Oy="react-tabs__tab",Ey={className:Oy,disabledClassName:`${Oy}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${Oy}--selected`},Ny=t=>{let e=(0,bi.useRef)();const r=Object.assign({},Ey,t),{children:i,className:a,disabled:s,disabledClassName:n,focus:o,id:l,selected:c,selectedClassName:h,tabIndex:u,tabRef:d}=r,g=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(r,Ay);return(0,bi.useEffect)(()=>{c&&o&&e.current.focus()},[c,o]),yi().createElement("li",Object.assign({},g,{className:cy(a,{[h]:c,[n]:s}),ref:t=>{e.current=t,d&&d(t)},role:"tab",id:`tab${l}`,"aria-selected":c?"true":"false","aria-disabled":s?"true":"false","aria-controls":`panel${l}`,tabIndex:u||(c?"0":null),"data-rttab":!0}),i)};Ny.tabsRole="Tab";const Iy=Ny,Py=["children","className","forceRender","id","selected","selectedClassName"],Dy="react-tabs__tab-panel",Ly={className:Dy,forceRender:!1,selectedClassName:`${Dy}--selected`},My=t=>{const e=Object.assign({},Ly,t),{children:r,className:i,forceRender:a,id:s,selected:n,selectedClassName:o}=e,l=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Py);return yi().createElement("div",Object.assign({},l,{className:cy(i,{[o]:n}),role:"tabpanel",id:`panel${s}`,"aria-labelledby":`tab${s}`}),a||n?r:null)};My.tabsRole="TabPanel";const By=My,Ry=({notificationCount:t})=>t?(0,_g.jsx)("span",{className:e()("sc-notification-badge",{x2:t>9}),children:t}):null;h(7209),h(6351);const Fy=Li(({placeholder:t,value:r,searchInput:i,searchInputClassName:a,onChange:s})=>(0,_g.jsxs)("div",{className:e()("sc-search-input",{active:""!==r.trim()}),children:[(0,_g.jsx)("input",{className:a,value:r,ref:i,onChange:t=>s(t.target.value),type:"text",spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:t}),(0,_g.jsx)(Fg,{}),(0,_g.jsx)(Og,{className:"icon-reset",onClick:()=>s("")})]}));var Vy=h(9160).t;const Hy=({Icon:t})=>(0,_g.jsx)(t,{}),Uy=()=>(0,_g.jsxs)("div",{className:"sc-studies--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:Vy.translate("You have no active indicators yet.")})]}),qy=({text:t})=>(0,_g.jsxs)("div",{className:"sc-studies--empty",children:[(0,_g.jsxs)("strong",{children:[Vy.translate("No results for")," “",t,"”"]}),(0,_g.jsx)("p",{children:Vy.translate("Try checking your spelling or use a different term")})]}),zy=({items:t,onSelectItem:r,onDeleteItem:i,onEditItem:a,onInfoItem:s,disableAll:n,isTick:o})=>(0,_g.jsx)("div",{className:"sc-studies__list",children:t.map(t=>(0,_g.jsx)("div",{className:e()("sc-studies__list__item ",{"sc-studies__list__item--disabled":n,"sc-studies__list__item--disabled-prediction":t.isPrediction&&o}),children:(0,_g.jsxs)(pb,{className:"sc-studies__list__item__box",enabled:!!((a||i)&&t.bars&&t.bars.length>30)||t.isPrediction&&o,content:t.isPrediction&&o?Vy.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more."):`${t.name} ${t.bars?`(${t.bars})`:""}`,children:[(0,_g.jsxs)("div",{className:"info",onClick:()=>r?.(t.flutter_chart_id),onTouchEnd:()=>r?.(t.flutter_chart_id),children:[(0,_g.jsx)(Hy,{Icon:t.icon}),(0,_g.jsxs)("div",{className:"text",children:[(0,_g.jsx)("span",{children:i?t.short_name_and_index:t.name}),t.bars&&(0,_g.jsxs)("small",{children:["(",t.bars,")"]})]})]}),(0,_g.jsxs)("div",{className:"detail",children:[s&&(0,_g.jsx)($g,{className:"ic-info",onClick:()=>s(t)}),a&&(0,_g.jsx)(Vg,{onClick:()=>a(t)}),i&&(0,_g.jsx)(Ig,{onClick:()=>i(t.id)})]})]})},`item--${t.id||t.flutter_chart_id}`))}),$y=({categories:t,onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})=>(0,_g.jsx)(_b,{autoHide:!0,children:t.map(t=>(0,_g.jsxs)("div",{className:"sc-studies__category",children:[(0,_g.jsx)("div",{className:"sc-studies__category__head",children:t.name}),(0,_g.jsx)("div",{className:"sc-studies__category__body",children:(0,_g.jsx)(zy,{items:t.foundItems||[],onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})})]},t.name))}),Gy=({items:t,onDeleteItem:e,onEditItem:r,clearAll:i,isMobile:a})=>(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)("div",{className:"sc-studies__panel__head",children:[(0,_g.jsx)("p",{children:a?Vy.translate("Up to 2 active indicators allowed."):Vy.translate("Up to 5 active indicators allowed.")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:()=>i(),children:Vy.translate("Clear all")})]}),(0,_g.jsx)("div",{className:"sc-studies__panel__content sc-studies__panel__content--active",children:(0,_g.jsx)(zy,{items:t,onDeleteItem:e,onEditItem:r})})]}),Wy=({onSelectTab:t,selectedTab:e,categories:r,searchedCategories:i,onSelectItem:a,onDeleteItem:s,onEditItem:n,onInfoItem:o,activeItems:l,clearAll:c,searchQuery:h,isMobile:u,maxAllowedItem:d,isTick:g})=>(0,_g.jsxs)(wy,{className:"tabs--vertical",selectedIndex:e,onSelect:t,children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsx)(Iy,{className:"hidden"},"hidden"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(xg,{}),(0,_g.jsx)("span",{children:Vy.translate("Active")}),(0,_g.jsx)(Ry,{notificationCount:l.length})]},"active"),r.map(t=>(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Hy,{Icon:t.icon}),(0,_g.jsx)("span",{children:t.name})]},`tab--${t.name}`))]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-studies__panel sc-studies__panel--search",children:i.length?(0,_g.jsx)($y,{categories:i,onSelectItem:a,onInfoItem:o,disableAll:l.length===(u?2:5),isTick:g}):(0,_g.jsx)(qy,{text:h})})},"panel--search"),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-studies__panel sc-studies__panel--active",children:l.length?(0,_g.jsx)(Gy,{clearAll:c,items:l,onDeleteItem:s,onEditItem:n,isMobile:u}):(0,_g.jsx)(Uy,{})})},"panel--active"),r.map(t=>(0,_g.jsx)(By,{children:(0,_g.jsxs)("div",{className:"sc-studies__panel",children:[(0,_g.jsx)("h3",{children:t.name}),(0,_g.jsx)(zy,{onSelectItem:a,onInfoItem:o,items:t.items,disableAll:l.length===d,isTick:g})]})},`panel--${t.name}`))]}),Ky=Li(({portalNodeId:t})=>{const{studies:e,chart:r,state:i,timeperiod:a}=sb(),{menuStore:s,deleteAllStudies:n,items:o,searchedItems:l,filterText:c,selectedTab:h,onSelectTab:u,onSelectItem:d,activeItems:g,deleteStudyById:p,editStudy:m,onInfoItem:f,infoItem:_,updatePortalNode:v,maxAllowedItem:b,setFilterText:y,searchInput:S}=e,{isTick:x}=a,{isMobile:w}=r,C=s.open,T=g.length;v(t);const k=(t,e,r)=>{i.stateChange(e,{indicator_type_name:t,indicators_category_name:Cm(t),...r??{}})};return(0,_g.jsxs)(kb,{store:s,className:"sc-studies",title:Vy.translate("Indicators"),tooltip:Vy.translate("Indicators"),modalMode:!0,enableTabular:!0,portalNodeId:t,customHead:_?(0,_g.jsxs)("div",{className:"sc-dialog__head--info",children:[(0,_g.jsx)(Gg,{onClick:()=>{f(null),k(_.flutter_chart_id,ym)}}),_.flutter_chart_id]}):(0,_g.jsx)("div",{className:"sc-dialog__head--search",children:(0,_g.jsx)(Fy,{placeholder:Vy.translate("Search"),searchInputClassName:"searchInputClassName",value:c,onChange:y,searchInput:S})}),children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:"sc-studies__menu "+(C?"sc-studies__menu--active":""),children:[(0,_g.jsx)(Pg,{}),(0,_g.jsx)(Ry,{notificationCount:T})]})}),(0,_g.jsxs)(kb.Body,{children:[_&&(0,_g.jsxs)("div",{className:"sc-studies__info",children:[(0,_g.jsx)(_b,{autoHide:!0,height:"360px",className:"sc-studies__info__content",children:(0,_g.jsx)("p",{children:_?.description})}),(0,_g.jsx)("div",{className:"sc-studies__info__footer",children:(0,_g.jsx)(pb,{enabled:_?.disabledAddBtn,content:wm.predictionIndicator,children:(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--w100",onClick:()=>{d(_?.flutter_chart_id),k(_?.flutter_chart_id,vm,{is_info_open:!0})},disabled:_?.disabledAddBtn,children:Vy.translate("Add")})})})]}),(0,_g.jsx)(Wy,{onSelectTab:u,selectedTab:h,categories:o,searchedCategories:l,onSelectItem:t=>{d(t),k(t,vm)},onDeleteItem:t=>{p(t)},onEditItem:t=>{m(t)},onInfoItem:t=>{f(t),k(t.flutter_chart_id,ym,{is_info_open:!0})},activeItems:g,clearAll:()=>{n(),i.stateChange("INDICATORS_CLEAR_ALL")},searchQuery:c,isMobile:w,maxAllowedItem:b,isTick:x})]})]})});h(6238);var Qy=h(9160).t;const Yy=({disabled:t=!1,view:r,remove:i,onClick:a})=>(0,_g.jsxs)(pb,{className:"sc-views__views__list__item",onClick:t?void 0:a,enabled:r.name.length>27,content:ia(r.name,26),children:[(0,_g.jsx)("div",{className:e()("text",{"text--disabled":t}),children:r.name}),(0,_g.jsx)(Ig,{onClick:i})]}),Xy=({onClick:t})=>(0,_g.jsxs)("div",{className:"sc-views--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:Qy.translate("You have no saved templates yet.")}),(0,_g.jsxs)("button",{type:"button",className:"sc-btn",onClick:t,children:[(0,_g.jsx)(Cg,{}),Qy.translate("Add new template")]})]}),Zy=({templateName:t,onCancel:e,onOverwrite:r})=>(0,_g.jsxs)("div",{className:"sc-views--overwrite",children:[(0,_g.jsxs)("div",{className:"sc-views--overwrite__content",children:[(0,_g.jsx)(Fp,{}),(0,_g.jsxs)("p",{children:[`${t} ${Qy.translate("already exists.")}`,(0,_g.jsx)("br",{}),Qy.translate("Would you like to overwrite it?")]})]}),(0,_g.jsxs)("div",{className:"sc-views--overwrite__footer",children:[(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:e,children:Qy.translate("Cancel")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:r,children:Qy.translate("Overwrite")})]})]}),Jy=({allowTickChartTypeOnly:t,views:e,removeAll:r,applyLayout:i,remove:a,onGranularity:s,onChartType:n})=>{if(!e.length)return null;const o=e=>{const{chartType:r,timeUnit:i}=e??{};return t&&!("line"===r&&"tick"===i)};return(0,_g.jsxs)("div",{className:"sc-views__views",children:[(0,_g.jsxs)("div",{className:"sc-views__views__head",children:[(0,_g.jsx)("h5",{children:Qy.translate("Saved templates")}),(0,_g.jsx)("button",{type:"button",onClick:r,className:"sc-btn sc-btn--sm sc-btn--outline-secondary",children:Qy.translate("Clear all")})]}),(0,_g.jsx)("div",{className:"sc-views__views__content",children:(0,_g.jsx)("div",{className:"sc-views__views__list",children:e.map((t,e)=>(0,_g.jsx)(Yy,{disabled:o(t.layout),view:t,onClick:t=>i(e,t,s,n),remove:t=>a(e,t)},t.name))})})]})},tS=Li(({portalNodeId:t,onChartType:r,onGranularity:i})=>{const{view:a,state:s,chart:n}=sb(),{allowTickChartTypeOnly:o}=s,{isMobile:l}=n,{sortedItems:c,routes:{main:h,overwrite:u},onChange:d,remove:g,onSubmit:p,applyLayout:m,inputRef:f,currentRoute:_,templateName:v,onToggleNew:b,saveViews:y,removeAll:S,isInputActive:x,onFocus:w,onBlur:C,menuStore:T}=a,k=T.dialogStore.open,j=x||""!==v;return(0,_g.jsxs)(kb,{store:T,className:"sc-views-menu",title:Qy.translate("Templates"),tooltip:Qy.translate("Templates"),modalMode:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)("div",{className:e()("sc-views__menu",{"sc-views__menu--active":k}),children:(0,_g.jsx)(Bg,{})})}),(0,_g.jsxs)(kb.Body,{children:[(0,_g.jsx)("div",{className:"sc-views",children:"new"===_?(0,_g.jsx)(Xy,{onClick:b}):(0,_g.jsxs)(_g.Fragment,{children:["overwrite"!==_?"":(0,_g.jsx)(Zy,{templateName:v,onCancel:h,onOverwrite:u}),(0,_g.jsxs)(_b,{autoHide:!0,children:[(0,_g.jsx)("div",{className:"form form--sc-views",children:(0,_g.jsx)("div",{className:"form__input-group",children:(0,_g.jsx)("div",{className:"form__group",children:(0,_g.jsx)("div",{className:"form__control",children:(0,_g.jsxs)("div",{className:e()("form--sc-views__input",{"form--sc-views__input--active":j}),children:[(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:Qy.translate("Add new templates")})}),(0,_g.jsx)("input",{type:"text",className:e()("sc-input",{"sc-input--active":j}),placeholder:j?"":Qy.translate("Add new templates"),ref:f,value:v,onKeyUp:p,onChange:d,onFocus:w,onClick:w,onBlur:C}),(0,_g.jsx)("button",{type:"button",onClick:y,className:e()("sc-btn","sc-btn--primary",{"sc-btn--primary--disabled":!j}),children:(0,_g.jsx)(Cg,{})})]})})})})}),(0,_g.jsx)(Jy,{allowTickChartTypeOnly:o,views:c,removeAll:S,applyLayout:m,remove:g,onChartType:r,onGranularity:i})]})]})}),o&&(0,_g.jsx)(Yb,{isMobile:l,text:Qy.translate("Some of your templates may not work with this trade type.")})]})]})});var eS=h(9160).t;const rS=Li(()=>{const{chart:t,crosshair:e}=sb(),{isMobile:r}=t,i=e.isEnabled?Ng:Eg,a=e.isEnabled?eS.translate("Disable Crosshair"):eS.translate("Enable Crosshair");return(0,_g.jsx)(pb,{content:a,enabled:!r,position:"right",children:(0,_g.jsx)(Ub,{active:e.isEnabled,onChange:t=>e.updateEnabledState(t),children:(0,_g.jsx)(i,{})})})});h(6765);var iS=h(9160).t;const aS=Li(()=>{const{chartSize:t}=sb(),{zoomIn:e,zoomOut:r}=t;return(0,_g.jsxs)("div",{className:"ciq-menu sc-chart-size",children:[(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(Dg,{className:"ic-icon-with-sub cq-zoom-out","tooltip-title":iS.translate("Zoom out"),onClick:r})}),(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(Tg,{className:"ic-icon-with-sub cq-zoom-in","tooltip-title":iS.translate("Zoom in"),onClick:e})})]})});h(4001);var sS=h(9160).t;const nS=({enabled:t,children:e})=>t?(0,_g.jsxs)("div",{className:"sc-dtools--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:sS.translate("You have no active drawings yet.")})]}):(0,_g.jsx)(_g.Fragment,{children:e}),oS=({Icon:t,text:e,num:r,bars:i})=>(0,_g.jsxs)("div",{className:"info",children:[t?(0,_g.jsx)(t,{className:"icon"}):"",(0,_g.jsxs)("div",{className:"text",children:[(0,_g.jsx)("span",{children:sS.translate(e,{num:r||" "})}),i?(0,_g.jsxs)("small",{children:["(",i," bars)"]}):""]})]}),lS=({items:t,onClick:r})=>(0,_g.jsx)("div",{className:"sc-dtools__list",children:t.map(t=>(0,_g.jsx)("div",{className:e()("sc-dtools__list__item",`sc-dtools__${t.id}`),onClick:()=>r(t.id),children:(0,_g.jsx)(oS,{Icon:t.icon,text:t.text})},t.id))}),cS=({item:t,onDelete:e})=>(0,_g.jsxs)("div",{className:"sc-dtools__list__item",children:[(0,_g.jsx)(oS,{Icon:t.icon,text:t.text,bars:t.bars,num:t.num}),(0,_g.jsx)("div",{className:"actions",children:(0,_g.jsx)(Ig,{onClick:()=>e(t.index)})})]}),hS=({group:t,onDelete:e})=>(0,_g.jsxs)("div",{className:"sc-dtools__category",children:[(0,_g.jsx)("div",{className:"sc-dtools__category__head",children:sS.translate(K_(t.id))}),(0,_g.jsx)("div",{className:"sc-dtools__category__body",children:(0,_g.jsx)("div",{className:"sc-dtools__list",children:t.items.map(t=>(0,_g.jsx)(cS,{item:{...t},onDelete:e},t.index))})})]}),uS=({activeDrawToolsGroup:t,onDelete:e})=>{const r=t.sort((t,e)=>t.items.length<=1&&e.items.length<=1?0:t.items.length<=1?-1:e.items.length<=1?1:0);return(0,_g.jsx)(_b,{autoHide:!0,height:320,children:r.map(t=>t.items.length>1?(0,_g.jsx)(hS,{group:t,onDelete:e},t.id):t.items.map(t=>(0,_g.jsx)(cS,{item:t,onDelete:e},t.index)))})},dS=Li(({portalNodeId:t})=>{const{drawTools:r,chart:i}=sb(),{isMobile:a}=i,{clearAll:s,startAddingNewTool:n,getDrawToolsItems:o,activeToolsNo:l,activeToolsGroup:c,onDeleted:h,updatePortalNode:u,menuStore:d}=r,g=o(),p=d.open;return u(t),(0,_g.jsxs)(kb,{store:d,className:"sc-dtools",title:sS.translate("Drawing tools"),tooltip:sS.translate("Drawing tools"),modalMode:!0,enableTabular:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:e()("sc-dtools__menu",{"sc-dtools__menu--active":p}),children:[(0,_g.jsx)(Sg,{}),(0,_g.jsx)(Ry,{notificationCount:l})]})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)(wy,{className:e()({"tabs--vertical":!a,"tabs--horizontal":a}),children:[" ",(0,_g.jsxs)(jy,{children:[(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(xg,{}),sS.translate("Active"),(0,_g.jsx)(Ry,{notificationCount:l})]}),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Sg,{}),sS.translate("All drawings")]})]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-dtools__panel",children:(0,_g.jsxs)(nS,{enabled:!l,children:[(0,_g.jsx)("div",{className:"sc-dtools__panel__head",children:(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:s,children:(0,_g.jsx)("span",{children:sS.translate("Clear all")})})}),(0,_g.jsx)("div",{className:"sc-dtools__panel__content sc-dtools__panel__content--active",children:(0,_g.jsx)(uS,{activeDrawToolsGroup:c,onDelete:h})})]})})}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-dtools__panel",children:(0,_g.jsx)("div",{className:"sc-dtools__panel__content",children:(0,_g.jsx)(lS,{items:g,onClick:n})})})})]})})]})});h(7808);var gS=h(9160).t;const pS=({title:t,id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})=>(0,_g.jsx)(Ib,{title:t,type:e,children:(0,_g.jsx)(Fb,{id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})}),mS=Li(()=>{const{chartSetting:t}=sb(),{menuStore:r,countdown:i,historical:a,isHighestLowestMarkerEnabled:s,languages:n,language:o,setHistorical:l,setLanguage:c,setTheme:h,showCountdown:u,theme:d,toggleHighestLowestMarker:g}=t,p=r.dialogStore.open;return(0,_g.jsxs)(kb,{store:r,className:"sc-chart-setting",title:gS.translate("Platform settings"),enableTabular:!0,modalMode:!0,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(Vg,{className:e()("ic-icon-with-sub",{active:p}),"tooltip-title":gS.translate("Settings")})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)(wy,{className:"tabs--vertical",children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Zg,{}),gS.translate("Themes")]},"theme"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Xg,{}),gS.translate("Language")]},"language"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Jg,{}),gS.translate("Charts")]},"platform")]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-chart-setting__panel",children:(0,_g.jsxs)(Ib,{title:gS.translate("Select theme"),type:"theme",children:[(0,_g.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"dark"===d}),onClick:()=>h("dark"),children:[(0,_g.jsx)(yg,{}),(0,_g.jsx)("div",{className:"text",children:gS.translate("Dark")})]}),(0,_g.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"light"===d}),onClick:()=>h("light"),children:[(0,_g.jsx)(bg,{}),(0,_g.jsx)("div",{className:"text",children:gS.translate("Light")})]})]})})}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-chart-setting__panel",children:(0,_g.jsx)(Ib,{title:gS.translate("Select language"),type:"language",children:n.map(t=>(0,_g.jsxs)("div",{onClick:()=>c(t.key),className:e()("form__group__item",{"form__group__item--active":o?.key===t.key}),children:[t.icon,(0,_g.jsx)("span",{className:"text",children:t.name})]},t.key))})})}),(0,_g.jsx)(By,{children:(0,_g.jsxs)("div",{className:"sc-chart-setting__panel",children:[(0,_g.jsx)(pS,{title:gS.translate("Interval duration"),id:"countdown",label:gS.translate("Display remaining time for each interval"),value:i,onChange:u,noramIcon:Wp[d].normal,activeIcon:Wp[d].active}),(0,_g.jsx)(pS,{title:gS.translate("Historical data mode"),id:"historical",label:gS.translate("Display data for a specific date and time"),value:a,onChange:l,noramIcon:Kp[d].normal,activeIcon:Kp[d].active}),(0,_g.jsx)(Ib,{title:gS.translate("Highest and lowest spot"),children:(0,_g.jsx)(Fb,{id:"highestlowest",label:gS.translate("Display the highest and lowest spot price"),value:s,onChange:g,noramIcon:Qp[d].normal,activeIcon:Qp[d].active})})]})})]})})]})});h(79);var fS=h(9160).t;const _S=Li(({portalNodeId:t})=>{const{share:r}=sb(),{menuStore:i,downloadCSV:a,downloadPNG:s,isLoadingPNG:n}=r,{open:o}=i.dialogStore;return(0,_g.jsxs)(kb,{store:i,className:"sc-download-menu",title:fS.translate("Download"),tooltip:fS.translate("Download"),modalMode:!0,isFullscreen:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)("div",{className:e()("sc-download__menu",{"sc-download__menu--active":o}),children:(0,_g.jsx)(zg,{})})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)("div",{className:"sc-download",children:[(0,_g.jsxs)(zb,{className:"sc-download__item",onClick:s,enabled:n,children:[(0,_g.jsx)(Lg,{}),(0,_g.jsxs)("span",{className:"sc-download__item__label",children:[" ",fS.translate("PNG")," "]})]}),(0,_g.jsxs)("div",{className:"sc-download__item",onClick:a,children:[(0,_g.jsx)(Mg,{}),(0,_g.jsxs)("span",{className:"sc-download__item__label",children:[" ",fS.translate("CSV")]})]})]})})]})});h(6853),h(7092),h(8272);var vS=h(9160).t;const bS=({x:t,bar:e})=>(0,_g.jsxs)("div",{className:`cq-bar ${e.cName}`,style:{height:5*e.height+"%",left:35*t},children:[(0,_g.jsx)("div",{className:`cq-bar-value ${e.height&&"show"}`,children:`${e.height.toFixed(1)}%`}),(0,_g.jsx)("span",{className:"cq-bar-title",children:t})]}),yS=Li(()=>{const{lastDigitStats:t}=sb(),{isVisible:r,bars:i,marketDisplayName:a,shouldMinimiseLastDigits:s}=t;return(0,_g.jsxs)("div",{className:e()("cq-last-digits",{show:r,minimised:s}),children:[(0,_g.jsx)("div",{className:"cq-bars",children:i.map((t,e)=>(0,_g.jsx)(bS,{x:e,bar:t},`bar-${e}`))}),(0,_g.jsx)("div",{className:"cq-bar-footer",children:vS.translate("Last digits stats for latest 1000 ticks on ")+a})]})}),SS=Li(({bottomWidgets:t})=>{const{state:e,lastDigitStats:r}=sb(),{showLastDigitStats:i}=e,{digits:a,lastTick:s}=r,n=!t&&i?yS:t;return n?(0,_g.jsx)(n,{digits:a,tick:or(s)}):null});h(8449);const xS=Li(({children:t})=>{const{bottomWidgetsContainer:e}=sb(),{bottom:r=0,isReadyToShow:i=!1}=e;if(!i)return null;const a={bottom:r};return(0,_g.jsx)("div",{className:"cq-bottom-ui-widgets",style:a,children:t})});h(1882);const wS=({isMobile:t})=>(0,_g.jsxs)(_g.Fragment,{children:[t?"":(0,_g.jsx)(rS,{}),(0,_g.jsx)(Ob,{}),(0,_g.jsx)(Kb,{}),(0,_g.jsx)(Ky,{}),(0,_g.jsx)(dS,{}),(0,_g.jsx)(_S,{}),t?"":(0,_g.jsx)(aS,{})]}),CS=Li(({widgets:t})=>{const{chart:r,chartType:i,studies:a,drawTools:s,view:n,share:o,chartSetting:l}=sb(),{context:c,isMobile:h}=r,u=i.menuStore.open||a.menuStore.open||s.menuStore.open||n.menuStore.open||o.menuStore.open||l.menuStore.open,d=t||wS;return(0,_g.jsx)("div",{className:e()("cq-chart-controls",{active:u}),children:c?(0,_g.jsx)(d,{isMobile:h}):null})});h(3955);var TS=h(9160).t;const kS=yi().memo(({networkStatus:t})=>(0,_g.jsx)(pb,{className:"sc-chart-footer__item sc-chart-footer__item--status",content:`${TS.translate("Network status")}: ${t?TS.translate(t.tooltip):""}`,enabled:!0,children:(0,_g.jsx)("div",{className:`sc-chart__status sc-chart__status--${t?t.class:"offline"}`})})),jS=Li(()=>{const{chart:t}=sb(),{context:e,serverTime:r,networkStatus:i,openFullscreen:a}=t;return e?(0,_g.jsxs)("div",{className:"sc-chart-footer",children:[(0,_g.jsx)(kS,{networkStatus:i}),(0,_g.jsx)("div",{className:"sc-chart-footer__item sc-chart-footer__item--time",children:(0,_g.jsx)("span",{children:r})}),(0,_g.jsx)("div",{className:"ciq-menu ciq-enabled",children:(0,_g.jsx)("a",{href:"https://deriv.com/help-centre/",target:"_blank",rel:"noopener noreferrer",children:(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(qg,{})})})}),(0,_g.jsx)(mS,{}),(0,_g.jsx)("div",{className:"ciq-menu ciq-enabled",onClick:()=>a(),children:(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(wg,{})})})]}):null});h(898),h(8798);var AS=h(9160).t;function OS(t){let e=0;if("categoryName"in t&&t.hasSubgroup)t.subgroups.forEach(t=>{for(const r of t.data)e+=r.data.length});else if("categoryName"in t&&t.hasSubcategory)for(const r of t.data)e+=r.data.length;else e+=t.data.length;return e}const ES=yi().memo(({category:t})=>(0,_g.jsx)("div",{className:"sc-mcd__category__content",children:(0,_g.jsx)("div",{className:"empty-category",children:AS.translate(t.emptyDescription)})})),NS=yi().memo(({isNestedList:t,category:r})=>{const i=Gp[r.categoryId];return(0,_g.jsxs)("span",{className:e()("category-title-left",{"category-title-left__subgroup":!i}),children:[t&&i?(0,_g.jsx)(i,{className:`ic-${r.categoryId}`}):(0,_g.jsx)("div",{className:"category-title-left__placeholder"}),AS.translate(r.categoryName)]})}),IS=({category:t,activeHeadKey:r,isNestedList:i,handleTitleClick:a})=>(0,_g.jsxs)("div",{className:e()("sc-mcd__category__head",{"has-subtitle":t.categorySubtitle,active:t.active}),onClick:()=>a(t.categoryId),children:[(0,_g.jsx)(NS,{isNestedList:i,category:t}),(t.categoryNamePostfixShowIfActive&&r===t.categoryId||!t.categoryNamePostfixShowIfActive)&&t.categoryNamePostfix&&(0,_g.jsx)("span",{className:"category-name-postfix",children:t.categoryNamePostfix}),t.categorySubtitle&&(0,_g.jsx)("div",{className:"category-subtitle",children:AS.translate(t.categorySubtitle)}),!t.hasSubgroup&&i?(0,_g.jsx)(Hg,{className:"arrow"}):""]}),PS=({category:t,categoryItemCount:r,ItemType:i,setCategoryElement:a,onSelectItem:s,activeHeadKey:n,disableAll:o,isNestedList:l,handleTitleClick:c,hasSubgroup:h,favoritesId:u})=>{const d=e=>{s?.(e,t.categoryId)};return(0,_g.jsxs)("div",{className:e()("sc-mcd__category",`sc-mcd__category--${t.categoryId}`,{"sc-mcd__category--has-subtitle":t.categorySubtitle,"sc-mcd__category--active":t.active}),ref:e=>a(e,t.categoryId),children:[(l||!t.hasSubcategory)&&(0,_g.jsx)(IS,{category:t,activeHeadKey:n,isNestedList:!!l,handleTitleClick:c,hasSubgroup:h}),!t.hasSubgroup&&t.hasSubcategory?t.data.filter(t=>OS(t)>0).map(t=>{return(0,_g.jsxs)("div",{className:e()("sc-mcd__category__content",`sc-mcd__category__content--${r=t.subcategoryName,r.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-")}`,"sc-mcd__category--has-subgroup","sc-mcd__category__content--has-subcategory"),children:[(0,_g.jsx)("div",{className:"subcategory",children:AS.translate(t.subcategoryName)}),t.data.map(t=>(0,_g.jsx)(i,{item:t,onSelectItem:d,disableAll:o,favoritesId:u},t.display))]},t.subcategoryName);var r}):!t.hasSubgroup&&t.data.length>0&&(0,_g.jsx)("div",{className:"sc-mcd__category__content",children:t.data.map(t=>(0,_g.jsx)(i,{item:t,onSelectItem:d,disableAll:o,favoritesId:u},t.itemId))}),0===r&&t.emptyDescription&&(0,_g.jsx)(ES,{category:t})]})},DS=({filteredItems:t,onSelectItem:e,ItemType:r,setCategoryElement:i,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l})=>(0,_g.jsx)(_g.Fragment,{children:t.map(t=>{const c=OS(t);return t.hasSubgroup?(c>0||t.emptyDescription)&&(0,_g.jsxs)(yi().Fragment,{children:[(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l},t.categoryId),t.subgroups?.map(t=>OS(t)>0?(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,hasSubgroup:!0,favoritesId:l},t.categoryId):null)]},t.categoryId):(c>0||t.emptyDescription)&&(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l},t.categoryId)})}),LS=({category:t,id:r})=>{const{chart:i,state:a}=sb(),[s]=yi().useState(Cv.getInstance()),[n,o]=yi().useState(!1),l=yi().useCallback(e=>{e.stopPropagation(),e.nativeEvent.isHandledByDialog=!0,s.toggleFavorite(t,r),a.stateChange("FAVORITE_MARKETS_TOGGLE",{is_favorite:s.isFavorite(t,r),symbol:i.symbolMap[r]?.symbol,symbol_category:zi(i.symbolMap[r])})},[i,a,s,t,r]),c=yi().useCallback(()=>{const e=s.isFavorite(t,r);e!==n&&(o(e),jm(Tm.CategoricalDisplay,km.Favorite,`${e?"Add ":"Remove "} ${r}`))},[s,t,r,n]);return yi().useEffect(()=>(s&&s.onFavoriteUpdate&&(s.onFavoriteUpdate(c),o(s.isFavorite(t,r))),()=>{s&&s.offFavoriteUpdate(c)}),[s,t,r,c]),t&&r?(0,_g.jsx)(Ug,{onClick:l,className:e()("ciq-favorite",{"ciq-active-favorite":n})}):null};var MS=h(9160).t;const BS=yi().memo(({id:t})=>{if(!t||!Zp[t])return null;const e=Zp[t];return(0,_g.jsx)(e,{className:`ic-${t}`})}),RS=yi().memo(({item:{itemId:t,display:e}})=>(0,_g.jsxs)("div",{className:"sc-mcd__item__name",children:[(0,_g.jsx)(BS,{id:t}),e]})),FS=yi().memo(({favoritesId:t,item:{dataObject:e,itemId:r}})=>(0,_g.jsxs)("div",{className:"sc-mcd__item__detail",children:[e&&(void 0===e.exchange_is_open||e.exchange_is_open)?"":(0,_g.jsx)("span",{className:"closed-market",children:MS.translate("CLOSED")}),(0,_g.jsx)(LS,{category:t,id:r})]})),VS=({onSelectItem:t,item:e,favoritesId:r})=>(0,_g.jsxs)("div",{className:`sc-mcd__item sc-mcd__item--${e.itemId} ${e.selected?"sc-mcd__item--selected ":""}`,onClick:()=>e.enabled&&t?.(e.dataObject),children:[(0,_g.jsx)(RS,{item:e}),(0,_g.jsx)(FS,{item:e,favoritesId:r})]}),HS=yi().memo(VS);var US=h(9160).t;const qS=yi().memo(({categoryId:t})=>{const e=Gp[t];return e&&(0,_g.jsx)(e,{className:`ic-${t}`})}),zS=yi().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const s=t&&t.length?t===i.categoryId:e===i.categoryId;return(0,_g.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>r(i.categoryId),children:[(0,_g.jsx)(qS,{categoryId:i.categoryId}),US.translate(i.categoryName)]})}),$S=yi().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const[s,n]=yi().useState(!1),[o,l]=yi().useState(!1);return(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>l(!o),children:[(0,_g.jsx)(qS,{categoryId:i.categoryId}),i.categoryName,(0,_g.jsx)(Hg,{className:`sc-mcd__filter__group-icon ${o&&"sc-mcd__filter__group-icon--open"}`})]}),(0,_g.jsx)("div",{className:`sc-mcd__filter__subgroups ${o&&"sc-mcd__filter__subgroups--open"}`,children:i.subgroups.map(o=>{const c=t&&t.length?t===o.categoryId:e===o.categoryId,h=i.subgroups.filter(r=>r.categoryId===t||!t&&r.categoryId===e).length>0;return c&&h&&!s?(n(!0),l(!0)):!h&&s&&n(!1),(0,_g.jsx)("div",{className:`sc-mcd__filter__subgroups-item ${s?"sc-mcd__filter__item--active":""} ${c&&!a?"sc-mcd__filter__item--selected":""}`,onClick:()=>r(o.categoryId),children:US.translate(o.categoryName)},o?.categoryId)})})]})}),GS=Li(({filteredItems:t,handleFilterClick:e,focusedCategoryKey:r,activeCategoryKey:i,isSearching:a})=>(0,_g.jsx)("div",{className:"sc-mcd__filter",children:t.map(t=>t.hasSubgroup?(0,_g.jsx)($S,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId):(0,_g.jsx)(zS,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId))}));var WS=h(9160).t;const KS=Li(({store:t,id:e,searchInputClassName:r,disableAll:i,isNestedList:a,onSelectItem:s})=>{const{updateScrollSpy:n,setScrollPanel:o,setFilterText:l,searchInput:c,height:h,filterText:u,placeholderText:d,handleTitleClick:g,filteredItems:p,setCategoryElement:m,activeHeadKey:f,favoritesId:_,handleFilterClick:v,focusedCategoryKey:b,activeCategoryKey:y}=t,S=s||t.onSelectItem,{isMobile:x}=t.chart,w=(0,_g.jsx)(DS,{onSelectItem:(t,e)=>{S?.(t,e),l("")},disableAll:i,isNestedList:a,handleTitleClick:g,filteredItems:p,setCategoryElement:m,activeHeadKey:f,ItemType:HS,favoritesId:_});return(0,_g.jsxs)("div",{className:"sc-mcd "+(a?"sc-mcd--nested":""),style:{height:h},id:e,children:[!x&&(0,_g.jsxs)("div",{className:"sc-mcd__tabs",children:[(0,_g.jsx)("div",{className:"sc-mcd__tabs__head",children:WS.translate("Markets")}),(0,_g.jsx)("div",{className:"sc-mcd__tabs__body",children:!a&&(0,_g.jsx)(GS,{filteredItems:p,handleFilterClick:v,activeCategoryKey:y,focusedCategoryKey:b,isSearching:""!==u})})]}),(0,_g.jsxs)("div",{className:"sc-mcd__content",children:[(0,_g.jsx)("div",{className:"sc-mcd__content__head",children:(0,_g.jsx)(Fy,{placeholder:d,searchInputClassName:r,value:u,onChange:l,searchInput:c})}),(0,_g.jsx)("div",{className:"sc-mcd__content__body",children:x?(0,_g.jsx)("div",{className:"sc-mcd__content__body__scroll",onScroll:n,ref:o,children:w}):(0,_g.jsx)(_b,{autoHide:!0,onScroll:n,setPanel:o,children:w})})]})]})}),QS=({symbolOpenTime:t})=>{const[e,r]=yi().useState(0),i=yi().useMemo(()=>{let r=null;const{openTime:i}=t||{};return i&&(r=Xi(i.getTime()-e)),r},[t,e]);return yi().useEffect(()=>{const t=Pm.getInstance(),e=setInterval(()=>r(t.getLocalDate().getTime()),1e3);return()=>clearInterval(e)},[]),(0,_g.jsx)("span",{children:i})},YS=({isIncrease:t,price:r,className:i,decimalPlaces:a})=>(0,_g.jsxs)(_g.Fragment,{children:[!r&&(0,_g.jsx)("span",{className:"cq-comparison-loader stx-show"}),(0,_g.jsx)("div",{className:e()("cq-animated-price",i,{"cq-up":t,"cq-down":!t}),children:r.toFixed(a)})]});var XS=h(9160).t;const ZS=Li(()=>{const{chartTitle:t}=sb(),{isShowChartPrice:r,isVisible:i,todayChange:a,todayChangePercent:s,animatedPrice:n,currentSymbol:o,isSymbolOpen:l,symbolOpenTime:c}=t,{status:h}=n;if(!o)return null;const u=Zp[o.symbol]||$p,d=!l&&c.openTime,g=!l&&!c.openTime;return(0,_g.jsxs)(_g.Fragment,{children:[u&&(0,_g.jsx)(u,{className:`ic-${o.symbol}`}),(0,_g.jsxs)("div",{className:"cq-symbol-info",children:[(0,_g.jsx)("div",{className:e()("cq-symbol",{"closed-no-opentime":g}),children:o.name}),l&&(0,_g.jsx)(tx,{status:h,isVisible:i&&r,todayChange:a,todayChangePercent:s}),d&&(0,_g.jsx)(ex,{symbolOpenTime:c})]})]})}),JS=Li(()=>{const{chartTitle:t}=sb(),{isSymbolOpen:e}=t;return(0,_g.jsxs)("div",{className:"cq-symbol-select-btn",children:[(0,_g.jsxs)("div",{className:"cq-symbol-select-btn__container",children:[(0,_g.jsx)(ZS,{}),!e&&(0,_g.jsx)("div",{className:"cq-symbol-closed-text",children:XS.translate("CLOSED")})]}),(0,_g.jsx)(Hg,{className:"cq-symbol-dropdown"})]})}),tx=Li(({isVisible:t,status:r,todayChange:i,todayChangePercent:a})=>{const{chartTitle:s}=sb(),{animatedPrice:n,decimalPlaces:o}=s,{price:l,isIncrease:c}=n;return t?(0,_g.jsxs)("div",{className:"cq-chart-price",children:[(0,_g.jsx)(YS,{className:"cq-current-price",price:l,isIncrease:c,status:n.status,decimalPlaces:o}),(0,_g.jsx)("div",{className:"divider",children:"-"}),(0,_g.jsxs)("div",{className:e()("cq-change",r),children:[(0,_g.jsx)("span",{className:"cq-todays-change",children:i||0}),(0,_g.jsxs)("span",{className:"cq-todays-change-percent",children:["(",a,"%)"]})," "]})]}):null}),ex=({symbolOpenTime:t})=>(0,_g.jsxs)("div",{className:"cq-chart-closed",children:[(0,_g.jsx)(Rg,{className:"cq-closed-icon"}),(0,_g.jsxs)("div",{className:"cq-closed-opening",children:[XS.translate("Opens in:")," ",(0,_g.jsx)("span",{className:"cq-closed-opening-time",children:(0,_g.jsx)(QS,{symbolOpenTime:t})})]})]});var rx=h(9160).t;const ix=Li(t=>{const{chartTitle:e,chart:r,chartSetting:i,state:a}=sb(),{isMobile:s}=r,{theme:n}=i,{menuStore:o,currentSymbol:l,categoricalDisplay:c,setSymbol:h,onMouseEnter:u,onMouseLeave:d,updateProps:g}=e,p=t.onChange||h,m=o.setOpen,{containerId:f,enabled:_,portalNodeId:v,searchInputClassName:b,open:y,open_market:S,isNestedList:x}=t;if(yi().useEffect(()=>{const{...e}=t;g(e)},[y,S]),!l)return null;const w=(0,_g.jsxs)(kb,{store:o,enabled:_,className:"cq-chart-title stx-show cq-symbols-display",isFullscreen:!0,portalNodeId:v,title:s?rx.translate("Markets"):"",onMouseEnter:u,onMouseLeave:d,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(JS,{})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)(KS,{store:c,isNestedList:x,searchInputClassName:b,onSelectItem:(t,e)=>{t.symbol!==l.symbol&&(p(t.symbol),a.stateChange("SYMBOL_CHANGE",{symbol:t.symbol,symbol_category:"favorite"===e?"favorites":zi(t)})),m(!1)}})})]});return f?xi().createPortal((0,_g.jsx)("div",{className:`smartcharts-${n}`,children:w}),document.getElementById(f)):w});var ax=h(9160).t;const sx=Li(({className:t})=>{const{drawTools:r}=sb(),i=(0,bi.useRef)(null),{showConfirmationToast:a,confirmationMessage:s,cancelAddingNewTool:n,hideDrawingConfirmation:o,addingStateInfo:l,selectedToolId:c}=r,h=(0,bi.useCallback)(()=>{return"horizontal"===(t=c)||"vertical"===t?ax.translate("Click on the chart to place the line."):0===l.currentStep&&l.totalSteps>1?ax.translate("Click on the chart to confirm the start point."):1===l.currentStep&&l.totalSteps>1?ax.translate("Click on the chart to confirm the end point."):l.currentStep>1&&!l.isFinished?ax.translate("Click on the chart to confirm point {{step}}.",{step:(l.currentStep+1).toString()}):s;var t},[c,l,s]),u=(0,bi.useCallback)(t=>{i.current&&!i.current.contains(t.target)&&o?.()},[o]),d=(0,bi.useCallback)(t=>{"Escape"===t.key&&o?.()},[o]);return(0,bi.useEffect)(()=>{if(a)return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[a,u,d]),!a||r.addingStateInfo.isFinished?null:(0,_g.jsx)("div",{ref:i,className:e()("sc-drawing-toast",t),role:"alert","aria-live":"polite",children:(0,_g.jsxs)("div",{className:"sc-drawing-toast__content",children:[(0,_g.jsx)("span",{className:"sc-drawing-toast__message",children:h()}),(0,_g.jsx)("button",{className:"sc-drawing-toast__cancel",onClick:n,"aria-label":ax.translate("Cancel"),type:"button",children:ax.translate("Cancel")})]})})});var nx=h(9160).t;const ox=Li(({className:t})=>{const{drawTools:r}=sb(),i=(0,bi.useRef)(null),a=(0,bi.useRef)(null),{showDeletionSnackbar:s,deletedToolName:n,hideDeletionSnackbar:o}=r,l=(0,bi.useCallback)(()=>{if(!n)return;const t=am(),e=Object.values(t).find(t=>t.id===n.replace("dt_",""));return e?`${e.text.replace(" [num]","")} ${nx.translate("removed")}`:void 0},[n]);(0,bi.useEffect)(()=>{if(s)return a.current=setTimeout(()=>{o?.()},4e3),()=>{a.current&&(clearTimeout(a.current),a.current=null)}},[s,o]);const c=(0,bi.useCallback)(t=>{"Escape"===t.key&&o?.()},[o]);return(0,bi.useEffect)(()=>{if(s)return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[s,c]),(0,bi.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),s?(0,_g.jsx)("div",{ref:i,className:e()("sc-deletion-snackbar",t),role:"alert","aria-live":"polite",children:(0,_g.jsxs)("div",{className:"sc-deletion-snackbar__content",children:[(0,_g.jsx)("span",{className:"sc-deletion-snackbar__message",children:l()}),(0,_g.jsx)("button",{className:"sc-deletion-snackbar__close",onClick:o,"aria-label":nx.translate("Close"),type:"button",children:(0,_g.jsx)(kg,{})})]})}):null}),lx=ox,cx=Li(t=>{const{chart:e,chartAdapter:r}=sb(),i=yi().useRef(null),a=yi().useRef(null),s=yi().useRef(null),n=yi().useRef(null),o=yi().useRef(t);o.current=t,yi().useEffect(()=>(r.painter.registerCallback(c),()=>{r.painter.unregisterCallback(c)}),[]),yi().useEffect(()=>{c()},[r.epochBounds,r.quoteBounds,r.isFeedLoaded,r.isChartLoaded,e.lastQuote]),yi().useEffect(()=>{const t=n.current?.querySelector(".chart-spot-label-profit");return t&&r.updateRightPadding(110),()=>{t&&r.updateRightPadding(0)}},[r]);const l=({epoch:t,price:e})=>{i.current=Number(e)||null,a.current=Om(Yi(t)),s.current=t?1e3*t:null,c()},c=()=>{if(!r.isFeedLoaded||!r.isChartLoaded)return;if(!n.current)return;if(!a.current)return void(n.current.style.visibility="hidden");const t=o.current.offsetTop||0,e=o.current.offsetLeft||0,l=n.current;let c=0,h=0,u=!0;if(s.current){const t=r.getXFromEpoch(s.current),e=i.current?r.getYFromQuote(i.current):0;t>0&&(null==i.current||e>0)?(c=+e,h=+t):u=!1}l.style.transform=`translate(${h+e}px, ${c+t}px)`,l.style.visibility=u?"visible":"hidden"},{children:h,className:u}=t;if(!r.isChartLoaded)return null;const{chartNode:d,yAxisWidth:g}=e,{overlap_y_axis:p=!0}=t,m=d&&!p?d.offsetWidth-g-50:"calc(100% - 50px)";return(0,_g.jsx)("div",{className:"fast-marker",style:{maxWidth:m},children:(0,_g.jsx)("div",{className:u,ref:t=>{n.current=t;const{markerRef:e}=o.current;e&&e(t?{div:t,setPosition:l}:null),null!==t&&c()},style:{position:"absolute"},children:h})})});h(6271);var hx=h(9160).t;const ux=Li(()=>{const{highestLowest:t}=sb(),{setHighestRef:e,setLowestRef:r}=t;return(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)(cx,{markerRef:e,className:"sc-highlow sc-highlow--highest",offsetTop:-80,offsetLeft:-80,children:[(0,_g.jsx)("span",{className:"spot__shape-circule spot__fill-blue"}),(0,_g.jsxs)("span",{className:"spot__label","data-label-pos":"top",children:[(0,_g.jsx)("span",{children:`${hx.translate("H")}: `}),(0,_g.jsx)("span",{className:"spot__value"})]})]}),(0,_g.jsxs)(cx,{markerRef:r,className:"sc-highlow sc-highlow--lowest",offsetTop:-80,offsetLeft:-80,children:[(0,_g.jsx)("span",{className:"spot__shape-circule spot__fill-red"}),(0,_g.jsxs)("span",{className:"spot__label","data-label-pos":"bottom",children:[(0,_g.jsx)("span",{children:`${hx.translate("L")} : `}),(0,_g.jsx)("span",{className:"spot__value"})]})]})]})});h(1061);var dx=h(9160).t;const gx=Li(()=>{const{timeperiod:t}=sb(),{menuStore:e,dialogPortalNodeId:r,handleCancel:i,handleContinue:a}=t.predictionIndicator;return(0,_g.jsxs)(kb,{store:e,className:"cq-dialog--indicator-prediction",modalMode:!0,emptyMenu:!0,portalNodeId:r,handleOverlayClick:i,children:[(0,_g.jsx)(kb.Title,{}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)("div",{className:"cq-indicator-prediction",children:[(0,_g.jsx)("strong",{children:dx.translate("Are you sure?")}),(0,_g.jsx)("p",{children:dx.translate("Some of your active indicators don’t support 1-tick intervals. If you change to a 1-tick interval, these indicators will be removed from your chart.")}),(0,_g.jsxs)("div",{className:"cq-indicator-prediction__footer",children:[(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:i,children:dx.translate("Cancel")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:a,children:dx.translate("Continue")})]})]})})]})});h(1104);const px=Li(()=>{const{chart:t,chartSize:r,navigationWidget:i,chartSetting:a,chartAdapter:s}=sb(),{context:n,startWithDataFitMode:o}=t,{zoomIn:l,zoomOut:c}=r,{historical:h}=a,{onMouseEnter:u,onMouseLeave:d}=i,{isDataFitModeEnabled:g,toggleDataFitMode:p}=s;return n?(0,_g.jsxs)("div",{className:e()("sc-navigation-widget",{"sc-navigation-widget__item--indent":h}),onMouseEnter:u,onMouseLeave:d,children:[(0,_g.jsx)("div",{className:e()("sc-navigation-widget__item","sc-navigation-widget__item--scale",{"sc-navigation-widget__item--hidden":!o,"sc-navigation-widget__item--disabled":g}),onClick:p,children:(0,_g.jsx)(Kg,{})}),(0,_g.jsxs)("div",{className:"sc-navigation-widget__item sc-navigation-widget__item--zoom",children:[(0,_g.jsx)(Qg,{onClick:l}),(0,_g.jsx)(rS,{}),(0,_g.jsx)(Yg,{onClick:c})]})]}):null});h(273);const mx=Li(()=>{const{paginationLoader:t}=sb(),{isOnPagination:e,setRef:r}=t;return e?(0,_g.jsx)(cx,{markerRef:r,className:"pagination",children:(0,_g.jsx)("div",{className:"pagination__loader",children:(0,_g.jsx)("div",{className:"pagination__loader-background"})})}):(0,_g.jsx)(_g.Fragment,{})}),fx=Li(({at:t="holder",children:e})=>{const{chart:r,state:i}=sb(),{contextPromise:a}=r,{isChartReady:s}=i,[n,o]=yi().useState();return yi().useEffect(()=>{a?.then(e=>{const r=`cq-inchart-${t}`;let i=e.topNode?.querySelector(`.${r}`);i||(i=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstChild}(`<div class="${r}"></div>`)),o(i)})},[t,a]),s&&n?xi().createPortal(e,n):null});h(2445);var _x=h(9160).t;const vx=({group:t,title:e,type:r,Field:i})=>(0,_g.jsx)(Ib,{title:"select"===r||"pattern"===r||"colorpicker"===r||"numbercolorpicker"===r||"OverBought"===t||"OverSold"===t?null:e,type:r,children:i}),bx=({title:t,items:e,theme:r,onItemChange:i})=>{const a={switch:t=>{const e=t;return(0,_g.jsx)(Rb,{value:e.value,onChange:t=>i(e,t)})},colorpicker:t=>(0,_g.jsx)(Bb,{theme:r,color:t.value,subtitle:t.subtitle||t.title,setColor:e=>i(t,e)}),pattern:t=>(0,_g.jsx)(Mb,{pattern:t.value,lineWidth:"1",subtitle:t.title,onChange:e=>{i(t,e)}}),select:t=>{const e=t;return(0,_g.jsx)(Lb,{rows:Object.values(e.options||{}),value:e.options[e.value],subtitle:e.subtitle||e.title,onRowClick:t=>{const[r]=Object.entries(e.options).find(([e,r])=>r===t);i(e,r)},children:t=>(0,_g.jsx)("span",{children:t})})},number:t=>{const e=t;return(0,_g.jsx)(Db,{min:e.min??1,step:e.step??1,max:e.max??100,value:e.value,onChange:t=>i(e,t)})},numericinput:t=>{const e=t;return(0,_g.jsx)("span",{className:"ciq-num-input",children:(0,_g.jsx)(Vb,{value:e.value,onChange:t=>i(e,t),min:e.min,step:e.step,max:e.max})})},numbercolorpicker:t=>{const e=t;return(0,_g.jsx)(Hb,{props:e.value,theme:r,onChange:t=>i(e,t)})},font:t=>{const e=t;return(0,_g.jsx)(qb,{value:e.value,onChange:t=>i(e,t)})}},s=`form__input-group--${(t||"").toLowerCase().replace(" ","-")}`;return(0,_g.jsxs)("div",{className:`form__input-group ${s}`,children:["Show Zones"===t?"":(0,_g.jsx)("h4",{children:t}),e.map(e=>a[e.type]&&(0,_g.jsx)(vx,{type:e.type,title:"Show Zones"===t?e.title:e.title.replace(t,""),Field:a[e.type](e)},e.title)),(0,_g.jsx)(Ib,{type:"end"})]})},yx=({onDelete:t,onReset:e,onDone:r})=>(0,_g.jsxs)("div",{className:"buttons",children:[t&&(0,_g.jsx)(Ig,{className:"sc-btn--delete",onClick:t}),(0,_g.jsxs)("div",{children:[(0,_g.jsx)(xx,{onClick:e}),(0,_g.jsx)(wx,{onClick:r})]})]}),Sx=({itemGroups:t,theme:e,onItemChange:r,setScrollPanel:i,freezeScroll:a,formClassname:s})=>(0,_g.jsx)("div",{className:`form form--indicator-setting ${s}`,children:(0,_g.jsx)(_b,{setPanel:i,freeze:a,autoHide:!0,height:"282px",children:t.map(t=>t.fields.length>0&&(0,_g.jsx)(bx,{title:t.title,items:t.fields,theme:e,onItemChange:r},t.key))})}),xx=({onClick:t})=>(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary sc-btn--reset",onClick:t,children:_x.translate("Reset")}),wx=({onClick:t})=>(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--save",onClick:t,children:_x.translate("Done")}),Cx=Li(({store:t})=>{const{itemGroups:e,title:r,formClassname:i,description:a,showTabs:s,onResetClick:n,onItemChange:o,onItemDelete:l,menuStore:c,theme:h,setScrollPanel:u,dialogPortalNodeId:d,freezeScroll:g}=t,p=c.handleCloseDialog;return(0,_g.jsxs)(kb,{store:c,className:"cq-modal--settings",title:r,modalMode:!0,enableTabular:s,emptyMenu:!0,portalNodeId:d,children:[(0,_g.jsx)(kb.Title,{}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)("div",{className:"cq-chart-settings",children:s?(0,_g.jsxs)(wy,{className:"tabs--vertical",children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsx)(Iy,{children:"Settings"}),(0,_g.jsx)(Iy,{children:"Description"})]}),(0,_g.jsxs)(By,{children:[(0,_g.jsx)(Sx,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g}),(0,_g.jsx)(yx,{onReset:n,onDone:p})]}),(0,_g.jsx)(By,{children:a})]}):(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)(Sx,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g,formClassname:i}),(0,_g.jsx)(yx,{onDelete:l,onReset:n,onDone:p})]})})})]})}),Tx=Li(()=>{const{chart:t,chartAdapter:e}=sb(),{epochBounds:r,isFeedLoaded:i}=e,{feed:a}=t,s=a?.quotes;if(void 0===s||!1===i||0===s.length)return null;const n=s[s.length-1].DT?.getTime();return n?r.rightEpoch>n?null:(0,_g.jsx)("div",{className:"scroll_to_recent",onClick:()=>{e.flutterChart?.app.scrollToLastTick()},children:(0,_g.jsx)(Wg,{})}):null});var kx=h(9160).t;const jx=yi().forwardRef((t,r)=>{const{chart:i,drawTools:a,studies:s,chartSetting:n,chartType:o,state:l,loader:c,chartAdapter:h,timeperiod:u,crosshair:d}=sb(),{chartId:g,init:p,destroy:m,isChartAvailable:f,chartContainerHeight:_,containerWidth:v}=i,{settingsDialog:b,restoreStudies:y,activeItems:S}=s,{settingsDialog:x}=a,{settingsDialog:w,isCandle:C,isSpline:T}=o,{updateProps:k,isChartClosed:j}=l,{theme:A,position:O,isHighestLowestMarkerEnabled:E}=n,{isActive:N,show:I}=c,P=yi().useRef(null),D=yi().useRef(null);(0,bi.useImperativeHandle)(r,()=>({hasPredictionIndicators:()=>null!==localStorage.getItem("predictionIndicators"),triggerPopup(t){u.predictionIndicator.dialogPortalNodeId="modal_root",u.predictionIndicator.setOpen(!0),u.predictionIndicator.setCancel(()=>{localStorage.getItem("predictionIndicators")&&(t(),y([...S,...Hi(localStorage.getItem("predictionIndicators")||"")]))})}})),yi().useEffect(()=>(window.isProductionWebsite&&(function(t,e,r,i,a,s,n){t.GoogleAnalyticsObject=a,t[a]=t[a]||function(){(t[a].q=t[a].q||[]).push(arguments)},t[a].l=1*new Date,s=e.createElement(r),n=e.getElementsByTagName(r)[0],s.async=1,s.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(s,n)}(window,document,"script",0,"ga"),ga("create","UA-40877026-15","auto")),window.isProductionWebsite&&window.ga&&ga("send","pageview",window.location.pathname),void 0!==t.crosshairEnabled&&d.setInitialEnabledState(t.crosshairEnabled),k(t),p(P.current,t),()=>{m()}),[]),yi().useEffect(()=>{k(t)});const L=(t=>{const e=yi().useRef();return yi().useEffect(()=>{e.current=t},[t]),e.current})(kx.lang);yi().useEffect(()=>{L&&L!==kx.lang&&!N&&I?.()},[kx.lang]);const{id:M,isMobile:B=!1,barriers:R=[],children:F,chartControlsWidgets:V,topWidgets:H,bottomWidgets:U,enabledChartFooter:q=!0,enabledNavigationWidget:z=!0,toolbarWidget:$=()=>null,historical:G,contracts_array:W=[]}=t,K=V&&O&&!B,Q=H||(()=>(0,_g.jsx)(ix,{})),Y=yi().useCallback($,[kx.lang]);return yi().useEffect(()=>(h.onMount(D.current),()=>{h.onUnmount()}),[]),yi().useEffect(()=>{h.updateContracts(W)},[W]),(0,_g.jsx)("div",{id:M||g,className:e()("smartcharts",`smartcharts-${A}`,{"smartcharts--navigation-widget":z,"smartcharts--loading":N,"smartcharts--has-markers":F&&yi().Children.count(F)>0,[`smartcharts-${v}`]:!B}),children:(0,_g.jsxs)("div",{className:e()({"smartcharts-mobile":B,"smartcharts-desktop":!B}),children:[(0,_g.jsx)("div",{className:"cq-context",ref:P,children:(0,_g.jsx)("div",{className:e()({[`cq-chart-control-${O}`]:K,"cq-chart-control-bottom":!K}),children:(0,_g.jsxs)("div",{className:"ciq-chart-area",children:[(0,_g.jsxs)("div",{className:e()("ciq-chart",{"closed-chart":j}),children:[(0,_g.jsx)(fx,{at:"subholder",children:R.map(({key:t,...e},r)=>(0,_g.jsx)(gb,{...e},`barrier-${r}`))}),(0,_g.jsx)(fx,{at:"subholder",children:!C&&!T&&E&&(0,_g.jsx)(ux,{})}),(0,_g.jsx)(fx,{at:"subholder",children:F}),(0,_g.jsx)(fx,{at:"subholder",children:(0,_g.jsx)(mx,{})}),!c.isActive&&(0,_g.jsx)("div",{className:"cq-top-ui-widgets",children:(0,_g.jsx)(Q,{})}),(0,_g.jsx)("div",{className:"chartContainer",ref:D,style:{height:G&&_&&B?_-30:_}}),z&&(0,_g.jsx)(px,{}),Y&&(0,_g.jsx)(Y,{}),!f&&(0,_g.jsx)("div",{className:"cq-chart-unavailable",children:kx.translate("Chart data is not available for this symbol.")}),(0,_g.jsx)("div",{className:"cq-inchart-subholder"}),(0,_g.jsx)(xS,{children:(0,_g.jsx)(SS,{bottomWidgets:U})})]}),null!==V&&!q&&(0,_g.jsx)(CS,{widgets:V}),(0,_g.jsx)(Tx,{}),q&&(0,_g.jsx)(jS,{}),(0,_g.jsx)($b,{})]})})}),(0,_g.jsx)(Cx,{store:x}),(0,_g.jsx)(Cx,{store:w}),(0,_g.jsx)(Cx,{store:b}),(0,_g.jsx)(gx,{}),(0,_g.jsx)(sx,{}),(0,_g.jsx)(lx,{}),(0,_g.jsx)("div",{id:"smartcharts_modal",className:"ciq-modal"})]})})}),Ax=Li(jx),Ox=yi().forwardRef(({children:t,...e},r)=>{const i=yi().useRef(!1);i.current||((()=>{const t=new ib;ab=yi().createContext(t)})(),i.current=!0);const a=sb(),s=ab.Provider;return(0,_g.jsx)(s,{value:a,children:(0,_g.jsx)(Ax,{...e,ref:r,children:t})})});h(2313);const Ex=Li(({position:t="top",children:r})=>{const{chart:i,toolbarWidget:a}=sb(),{context:s}=i,{onMouseEnter:n,onMouseLeave:o}=a;return s?(0,_g.jsx)("div",{className:e()("sc-toolbar-widget",{[`sc-toolbar-widget--${t}`]:!!t}),onMouseEnter:n,onMouseLeave:o,children:r}):null});h(9758);const Nx={Barrier:gb,ChartSetting:mS,ChartSize:aS,ChartTitle:ix,ChartTypes:Ob,ChartMode:Jb,createObjectFromLocalStorage:Vi,CrosshairToggle:rS,DrawTools:dS,FastMarker:cx,Marker:cx,PendingPromise:Bi,setSmartChartsPublicPath:function(t){h.p=t},Share:_S,SmartChart:Ox,StudyLegend:Ky,Timeperiod:Kb,Views:tS,ToolbarWidget:Ex,logEvent:jm,LogCategories:Tm,LogActions:km}})(),u.default})());
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-dom"),require("react-transition-group"),require("react"),require("moment")):"function"==typeof define&&define.amd?define([,,,],e):"object"==typeof exports?exports.smartcharts=e(require("react-dom"),require("react-transition-group"),require("react"),require("moment")):t.smartcharts=e(t.ReactDOM,t.ReactTransitionGroup,t.React,t.moment)}(self,(t,e,r,i)=>(()=>{var a,s,n,o,l={5:(t,e,r)=>{t.exports={id:"ic-averages-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-averages-usage",toString:function(){return this.url}}},10:(t,e,r)=>{t.exports={id:"ic-200-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-200-1s-index-usage",toString:function(){return this.url}}},12:t=>{"use strict";var e=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),r={emitDelay:10,strictMode:!1},i=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?r:arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i,a;i=e.hasOwnProperty("emitDelay")?e.emitDelay:r.emitDelay,this._emitDelay=i,a=e.hasOwnProperty("strictMode")?e.strictMode:r.strictMode,this._strictMode=a,this._listeners={},this.events=[]}return e(t,[{key:"_addListenner",value:function(t,e,r){if("function"!=typeof e)throw TypeError("listener must be a function");-1===this.events.indexOf(t)?(this._listeners[t]=[{once:r,fn:e}],this.events.push(t)):this._listeners[t].push({once:r,fn:e})}},{key:"on",value:function(t,e){this._addListenner(t,e,!1)}},{key:"once",value:function(t,e){this._addListenner(t,e,!0)}},{key:"off",value:function(t,e){var r,i,a=this,s=this.events.indexOf(t);t&&-1!==s&&(e?(r=[],(i=a._listeners[t]).forEach(function(t,i){t.fn===e&&r.unshift(i)}),r.forEach(function(t){i.splice(t,1)}),i.length||(a.events.splice(s,1),delete a._listeners[t])):(delete this._listeners[t],this.events.splice(s,1)))}},{key:"_applyEvents",value:function(t,e){var r=this._listeners[t];if(r&&r.length){var i=[];r.forEach(function(t,r){t.fn.apply(null,e),t.once&&i.unshift(r)}),i.forEach(function(t){r.splice(t,1)})}else if(this._strictMode)throw"No listeners specified for event: "+t}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this._emitDelay?setTimeout(function(){e._applyEvents.call(e,t,i)},this._emitDelay):this._applyEvents(t,i)}},{key:"emitSync",value:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this._applyEvents(t,r)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),t}();t.exports=i},37:(t,e,r)=>{t.exports={id:"portugal-usage",viewBox:"0 0 24 17",url:r.p+"sprite-1fb8e4.smartcharts.svg#portugal-usage",toString:function(){return this.url}}},79:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},135:(t,e,r)=>{t.exports={id:"ic-historical-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-historical-dark-normal-usage",toString:function(){return this.url}}},148:(t,e,r)=>{t.exports={id:"ic-marketbear-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-marketbear-usage",toString:function(){return this.url}}},155:(t,e,r)=>{t.exports={id:"ic-dtrended-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-dtrended-usage",toString:function(){return this.url}}},194:(t,e,r)=>{t.exports={id:"ic-50-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-50-index-v-usage",toString:function(){return this.url}}},204:(t,e,r)=>{t.exports={id:"ic-close-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-close-usage",toString:function(){return this.url}}},242:(t,e,r)=>{t.exports={id:"ic-heikin-ashi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-heikin-ashi-normal-usage",toString:function(){return this.url}}},255:t=>{"use strict";t.exports=e},263:(t,e,r)=>{t.exports={id:"ic-candle-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-candle-grayscale-usage",toString:function(){return this.url}}},267:(t,e,r)=>{t.exports={id:"ic-hollowcandle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-hollowcandle-normal-usage",toString:function(){return this.url}}},273:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},301:(t,e,r)=>{t.exports={id:"ic-hollow-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-hollow-grayscale-usage",toString:function(){return this.url}}},363:(t,e,r)=>{t.exports={id:"ic-line-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-line-normal-usage",toString:function(){return this.url}}},416:(t,e,r)=>{t.exports={id:"ic-countdown-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-countdown-light-active-usage",toString:function(){return this.url}}},451:(t,e,r)=>{t.exports={id:"indonesia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#indonesia-usage",toString:function(){return this.url}}},542:(t,e,r)=>{t.exports={id:"ic-swiss-20-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-swiss-20-usage",toString:function(){return this.url}}},638:(t,e,r)=>{t.exports={id:"ic-25-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-25-index-v-usage",toString:function(){return this.url}}},718:(t,e,r)=>{t.exports={id:"ic-75-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-75-index-v-usage",toString:function(){return this.url}}},794:(t,e,r)=>{t.exports={id:"ic-germany-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-germany-40-usage",toString:function(){return this.url}}},809:t=>{"use strict";t.exports=r},898:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},931:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},963:(t,e,r)=>{t.exports={id:"ic-theme-light-usage",viewBox:"0 0 236 180",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-theme-light-usage",toString:function(){return this.url}}},1008:(t,e,r)=>{t.exports={id:"ic-250-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-250-1s-index-usage",toString:function(){return this.url}}},1041:(t,e,r)=>{t.exports={id:"ic-templates-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-templates-usage",toString:function(){return this.url}}},1061:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},1069:(t,e,r)=>{t.exports={id:"mongolian-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#mongolian-usage",toString:function(){return this.url}}},1071:(t,e,r)=>{t.exports={id:"ic-ltcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ltcusd-usage",toString:function(){return this.url}}},1077:(t,e,r)=>{t.exports={id:"ic-awesome-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-awesome-oscillator-usage",toString:function(){return this.url}}},1085:(t,e,r)=>{t.exports={id:"boom900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#boom900 index-usage",toString:function(){return this.url}}},1089:(t,e,r)=>{t.exports={id:"kenya-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#kenya-usage",toString:function(){return this.url}}},1104:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},1108:(t,e,r)=>{t.exports={id:"ic-aroon-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-aroon-usage",toString:function(){return this.url}}},1134:(t,e,r)=>{t.exports={id:"ic-rectangle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-rectangle-usage",toString:function(){return this.url}}},1229:(t,e,r)=>{t.exports={id:"nzd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#nzd-usage",toString:function(){return this.url}}},1238:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},1270:(t,e,r)=>{t.exports={id:"ic-adx-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-adx-usage",toString:function(){return this.url}}},1278:(t,e,r)=>{t.exports={id:"ic-active-usage",viewBox:"0 0 15 15",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-active-usage",toString:function(){return this.url}}},1288:(t,e,r)=>{t.exports={id:"ic-cryptocurrency-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-cryptocurrency-normal-usage",toString:function(){return this.url}}},1320:(t,e,r)=>{t.exports={id:"ic-download-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-download-usage",toString:function(){return this.url}}},1337:(t,e,r)=>{t.exports={id:"ic-rangebars-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-rangebars-normal-usage",toString:function(){return this.url}}},1345:(t,e,r)=>{t.exports={id:"ic-empty-state-usage",viewBox:"0 0 96 96",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-empty-state-usage",toString:function(){return this.url}}},1445:(t,e,r)=>{t.exports={id:"cad-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#cad-usage",toString:function(){return this.url}}},1449:(t,e,r)=>{t.exports={id:"light-50(1s) index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#light-50(1s) index-usage",toString:function(){return this.url}}},1477:(t,e,r)=>{t.exports={id:"eur-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#eur-usage",toString:function(){return this.url}}},1553:(t,e,r)=>{t.exports={id:"boom600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#boom600 index-usage",toString:function(){return this.url}}},1561:(t,e,r)=>{t.exports={id:"error-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#error-usage",toString:function(){return this.url}}},1593:(t,e,r)=>{t.exports={id:"ic-overwrite-state-usage",viewBox:"0 0 128 128",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-overwrite-state-usage",toString:function(){return this.url}}},1610:(t,e,r)=>{t.exports={id:"success-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#success-usage",toString:function(){return this.url}}},1649:(t,e,r)=>{t.exports={id:"nok-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#nok-usage",toString:function(){return this.url}}},1655:(t,e,r)=>{t.exports={id:"ic-theme-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-theme-usage",toString:function(){return this.url}}},1673:(t,e,r)=>{"use strict";t.exports=r(5166)},1722:(t,e,r)=>{t.exports={id:"ic-historical-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-historical-light-active-usage",toString:function(){return this.url}}},1795:(t,e,r)=>{t.exports={id:"arabic-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#arabic-usage",toString:function(){return this.url}}},1811:(t,e,r)=>{t.exports={id:"ic-linebreak-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-linebreak-normal-usage",toString:function(){return this.url}}},1820:(t,e,r)=>{t.exports={id:"ic-zig-zag-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zig-zag-usage",toString:function(){return this.url}}},1849:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},1882:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},1891:(t,e,r)=>{t.exports={id:"ic-measure-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-measure-usage",toString:function(){return this.url}}},1904:(t,e,r)=>{t.exports={id:"ic-william-percent-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-william-percent-usage",toString:function(){return this.url}}},1908:(t,e,r)=>{t.exports={id:"ic-cat-averages-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-cat-averages-usage",toString:function(){return this.url}}},1949:(t,e,r)=>{t.exports={id:"ic-historical-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-historical-light-normal-usage",toString:function(){return this.url}}},2048:(t,e,r)=>{t.exports={id:"ic-bnbusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-bnbusd-usage",toString:function(){return this.url}}},2049:(t,e,r)=>{t.exports={id:"ic-dshusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-dshusd-usage",toString:function(){return this.url}}},2092:(t,e,r)=>{t.exports={id:"ic-france-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-france-40-usage",toString:function(){return this.url}}},2099:(t,e,r)=>{t.exports={id:"crash900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#crash900 index-usage",toString:function(){return this.url}}},2167:(t,e,r)=>{t.exports={id:"ic-100-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-100-index-usage",toString:function(){return this.url}}},2188:(t,e,r)=>{t.exports={id:"step-300-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#step-300-index-usage",toString:function(){return this.url}}},2308:(t,e,r)=>{t.exports={id:"ic-trend-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-trend-usage",toString:function(){return this.url}}},2313:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},2327:(t,e,r)=>{t.exports={id:"ic-back-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-back-usage",toString:function(){return this.url}}},2405:(t,e,r)=>{t.exports={id:"ic-btcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-btcusd-usage",toString:function(){return this.url}}},2421:(t,e,r)=>{t.exports={id:"ic-commodity-channel-index-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-commodity-channel-index-usage",toString:function(){return this.url}}},2445:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},2502:(t,e,r)=>{t.exports={id:"ic-10-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-10-1s-index-usage",toString:function(){return this.url}}},2532:(t,e,r)=>{t.exports={id:"ic-info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-info-usage",toString:function(){return this.url}}},2588:(t,e,r)=>{t.exports={id:"ic-btceth-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-btceth-usage",toString:function(){return this.url}}},2592:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},2607:(t,e,r)=>{t.exports={id:"pln-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#pln-usage",toString:function(){return this.url}}},2620:(t,e,r)=>{t.exports={id:"italy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#italy-usage",toString:function(){return this.url}}},2788:(t,e,r)=>{t.exports={id:"ic-neousd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-neousd-usage",toString:function(){return this.url}}},2821:(t,e,r)=>{t.exports={id:"boom300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#boom300 index-usage",toString:function(){return this.url}}},2839:(t,e,r)=>{t.exports={id:"step-400-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#step-400-index-usage",toString:function(){return this.url}}},2853:(t,e,r)=>{t.exports={id:"ic-50-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-50-index-usage",toString:function(){return this.url}}},2910:(t,e,r)=>{t.exports={id:"table-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#table-usage",toString:function(){return this.url}}},2913:(t,e,r)=>{t.exports={id:"ic-xmrusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-xmrusd-usage",toString:function(){return this.url}}},2979:(t,e,r)=>{t.exports={id:"ic-candle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-candle-normal-usage",toString:function(){return this.url}}},2999:(t,e,r)=>{t.exports={id:"ic-basket-normal-usage",viewBox:"0 0 16 15",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-basket-normal-usage",toString:function(){return this.url}}},3010:(t,e,r)=>{t.exports={id:"step-500-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#step-500-index-usage",toString:function(){return this.url}}},3031:(t,e,r)=>{t.exports={id:"ic-input-number-plus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-input-number-plus-usage",toString:function(){return this.url}}},3119:(t,e,r)=>{t.exports={id:"ic-netherland-25-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-netherland-25-usage",toString:function(){return this.url}}},3135:(t,e,r)=>{t.exports={id:"french-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#french-usage",toString:function(){return this.url}}},3163:(t,e,r)=>{t.exports={id:"ic-fractal-chaos-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-fractal-chaos-usage",toString:function(){return this.url}}},3179:(t,e,r)=>{t.exports={id:"korean-usage",viewBox:"0 0 36 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#korean-usage",toString:function(){return this.url}}},3211:(t,e,r)=>{t.exports={id:"ic-crosshair-on-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-crosshair-on-usage",toString:function(){return this.url}}},3235:(t,e,r)=>{t.exports={id:"ic-highest-lowest-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-highest-lowest-dark-normal-usage",toString:function(){return this.url}}},3255:(t,e,r)=>{t.exports={id:"ic-arrow-orange-usage",viewBox:"0 0 22 31",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-arrow-orange-usage",toString:function(){return this.url}}},3257:(t,e,r)=>{t.exports={id:"ic-75-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-75-index-usage",toString:function(){return this.url}}},3265:(t,e,r)=>{t.exports={id:"ic-25-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-25-index-usage",toString:function(){return this.url}}},3273:(t,e,r)=>{t.exports={id:"ic-countdown-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-countdown-dark-normal-usage",toString:function(){return this.url}}},3292:(t,e,r)=>{t.exports={id:"ic-300-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-300-1s-index-usage",toString:function(){return this.url}}},3293:(t,e,r)=>{t.exports={id:"full-screen-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#full-screen-usage",toString:function(){return this.url}}},3297:(t,e,r)=>{t.exports={id:"ic-xlmusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-xlmusd-usage",toString:function(){return this.url}}},3332:(t,e,r)=>{t.exports={id:"gbp-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#gbp-usage",toString:function(){return this.url}}},3344:(t,e,r)=>{t.exports={id:"ic-trxusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-trxusd-usage",toString:function(){return this.url}}},3365:(t,e,r)=>{t.exports={id:"ic-input-number-minus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-input-number-minus-usage",toString:function(){return this.url}}},3385:(t,e,r)=>{t.exports={id:"ic-line-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-line-usage",toString:function(){return this.url}}},3417:(t,e,r)=>{t.exports={id:"ic-rsi-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-rsi-usage",toString:function(){return this.url}}},3425:(t,e,r)=>{t.exports={id:"step-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#step-200-index-usage",toString:function(){return this.url}}},3522:(t,e,r)=>{t.exports={id:"ic-indices-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-indices-normal-usage",toString:function(){return this.url}}},3544:(t,e,r)=>{t.exports={id:"ic-historical-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-historical-dark-active-usage",toString:function(){return this.url}}},3562:(t,e,r)=>{t.exports={id:"ic-marketbull-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-marketbull-usage",toString:function(){return this.url}}},3576:(t,e,r)=>{t.exports={id:"ic-channel-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-channel-usage",toString:function(){return this.url}}},3578:(t,e,r)=>{t.exports={id:"ic-arrow-green-usage",viewBox:"0 0 22 31",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-arrow-green-usage",toString:function(){return this.url}}},3669:(t,e,r)=>{t.exports={id:"ic-euro-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-euro-50-usage",toString:function(){return this.url}}},3719:(t,e,r)=>{t.exports={id:"aud-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#aud-usage",toString:function(){return this.url}}},3747:(t,e,r)=>{t.exports={id:"ic-australian-200-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-australian-200-usage",toString:function(){return this.url}}},3751:(t,e,r)=>{t.exports={id:"boom1000 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#boom1000 index-usage",toString:function(){return this.url}}},3770:(t,e,r)=>{t.exports={id:"wallstreet-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#wallstreet-usage",toString:function(){return this.url}}},3775:(t,e,r)=>{t.exports={id:"warning-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#warning-usage",toString:function(){return this.url}}},3785:(t,e,r)=>{t.exports={id:"ic-oilusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-oilusd-usage",toString:function(){return this.url}}},3800:(t,e,r)=>{t.exports={id:"ic-volatility-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-volatility-usage",toString:function(){return this.url}}},3821:(t,e,r)=>{t.exports={id:"ic-envelope-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-envelope-usage",toString:function(){return this.url}}},3864:(t,e,r)=>{t.exports={id:"ic-100-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-100-index-v-usage",toString:function(){return this.url}}},3893:(t,e,r)=>{t.exports={id:"ic-theme-dark-usage",viewBox:"0 0 236 180",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-theme-dark-usage",toString:function(){return this.url}}},3955:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},3982:(t,e,r)=>{t.exports={id:"ic-parabolic-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-parabolic-usage",toString:function(){return this.url}}},4001:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},4005:(t,e,r)=>{t.exports={id:"ic-150-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-150-index-usage",toString:function(){return this.url}}},4007:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},4046:(t,e,r)=>{t.exports={id:"ic-150-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-150-1s-index-usage",toString:function(){return this.url}}},4056:(t,e,r)=>{t.exports={id:"chf-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#chf-usage",toString:function(){return this.url}}},4065:(t,e,r)=>{t.exports={id:"ic-ethusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ethusd-usage",toString:function(){return this.url}}},4185:(t,e,r)=>{t.exports={id:"ic-zoomin-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zoomin-usage",toString:function(){return this.url}}},4236:(t,e,r)=>{t.exports={id:"russia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#russia-usage",toString:function(){return this.url}}},4282:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},4298:(t,e,r)=>{t.exports={id:"ic-10-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-10-index-v-usage",toString:function(){return this.url}}},4311:(t,e,r)=>{t.exports={id:"ic-horizontal-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-horizontal-usage",toString:function(){return this.url}}},4321:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},4325:(t,e,r)=>{t.exports={id:"ic-help-center-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-help-center-usage",toString:function(){return this.url}}},4333:(t,e,r)=>{t.exports={id:"ic-search-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-search-normal-usage",toString:function(){return this.url}}},4431:(t,e,r)=>{t.exports={id:"ic-area-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-area-grayscale-usage",toString:function(){return this.url}}},4497:(t,e,r)=>{t.exports={id:"ic-drawing-tool-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-drawing-tool-usage",toString:function(){return this.url}}},4511:e=>{"use strict";e.exports=t},4542:(t,e,r)=>{t.exports={id:"ic-kagi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-kagi-normal-usage",toString:function(){return this.url}}},4575:(t,e,r)=>{t.exports={id:"ic-trend-dark-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-trend-dark-usage",toString:function(){return this.url}}},4579:(t,e,r)=>{t.exports={id:"crash300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#crash300 index-usage",toString:function(){return this.url}}},4619:(t,e,r)=>{t.exports={id:"ic-spline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-spline-normal-usage",toString:function(){return this.url}}},4629:(t,e,r)=>{t.exports={id:"ic-clear-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-clear-usage",toString:function(){return this.url}}},4674:(t,e,r)=>{t.exports={id:"ic-position-left-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-position-left-usage",toString:function(){return this.url}}},4748:(t,e,r)=>{t.exports={id:"ic-zecusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zecusd-usage",toString:function(){return this.url}}},5004:(t,e,r)=>{t.exports={id:"chinese-traditional-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#chinese-traditional-usage",toString:function(){return this.url}}},5038:(t,e,r)=>{t.exports={id:"ic-language-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-language-usage",toString:function(){return this.url}}},5092:(t,e,r)=>{t.exports={id:"ic-hong-kong-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-hong-kong-50-usage",toString:function(){return this.url}}},5126:(t,e,r)=>{t.exports={id:"ic-highest-lowest-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-highest-lowest-light-active-usage",toString:function(){return this.url}}},5166:(t,e,r)=>{"use strict";var i=r(809),a="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=i.useState,n=i.useEffect,o=i.useLayoutEffect,l=i.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!a(t,r)}catch(t){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),i=s({inst:{value:r,getSnapshot:e}}),a=i[0].inst,h=i[1];return o(function(){a.value=r,a.getSnapshot=e,c(a)&&h({inst:a})},[t,r,e]),n(function(){return c(a)&&h({inst:a}),t(function(){c(a)&&h({inst:a})})},[t]),l(r),r};e.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:h},5187:(t,e,r)=>{t.exports={id:"ic-eosusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-eosusd-usage",toString:function(){return this.url}}},5269:(t,e,r)=>{t.exports={id:"ic-10-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-10-index-usage",toString:function(){return this.url}}},5317:(t,e,r)=>{t.exports={id:"ic-usd-tech-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-usd-tech-100-usage",toString:function(){return this.url}}},5357:(t,e,r)=>{t.exports={id:"turkey-usage",viewBox:"0 0 24 17",url:r.p+"sprite-1fb8e4.smartcharts.svg#turkey-usage",toString:function(){return this.url}}},5407:(t,e,r)=>{t.exports={id:"xau-usage",viewBox:"0 0 8 8",url:r.p+"sprite-1fb8e4.smartcharts.svg#xau-usage",toString:function(){return this.url}}},5439:(t,e,r)=>{t.exports={id:"ic-ohlc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ohlc-normal-usage",toString:function(){return this.url}}},5459:(t,e,r)=>{t.exports={id:"ic-donchian-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-donchian-usage",toString:function(){return this.url}}},5477:(t,e,r)=>{t.exports={id:"ic-vertical-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-vertical-usage",toString:function(){return this.url}}},5511:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},5581:(t,e,r)=>{var i,a=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(t,e){if(!i[t]){i[t]={};for(var r=0;r<t.length;r++)i[t][t.charAt(r)]=r}return i[t][e]}var s={compressToBase64:function(t){if(null==t)return"";var r=s._compress(t,6,function(t){return e.charAt(t)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:s._decompress(t.length,32,function(r){return a(e,t.charAt(r))})},compressToUTF16:function(e){return null==e?"":s._compress(e,15,function(e){return t(e+32)})+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:s._decompress(t.length,16384,function(e){return t.charCodeAt(e)-32})},compressToUint8Array:function(t){for(var e=s.compress(t),r=new Uint8Array(2*e.length),i=0,a=e.length;i<a;i++){var n=e.charCodeAt(i);r[2*i]=n>>>8,r[2*i+1]=n%256}return r},decompressFromUint8Array:function(e){if(null==e)return s.decompress(e);for(var r=new Array(e.length/2),i=0,a=r.length;i<a;i++)r[i]=256*e[2*i]+e[2*i+1];var n=[];return r.forEach(function(e){n.push(t(e))}),s.decompress(n.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":s._compress(t,6,function(t){return r.charAt(t)})},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),s._decompress(t.length,32,function(e){return a(r,t.charAt(e))}))},compress:function(e){return s._compress(e,16,function(e){return t(e)})},_compress:function(t,e,r){if(null==t)return"";var i,a,s,n={},o={},l="",c="",h="",u=2,d=3,g=2,p=[],m=0,f=0;for(s=0;s<t.length;s+=1)if(l=t.charAt(s),Object.prototype.hasOwnProperty.call(n,l)||(n[l]=d++,o[l]=!0),c=h+l,Object.prototype.hasOwnProperty.call(n,c))h=c;else{if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(i=0;i<g;i++)m<<=1,f==e-1?(f=0,p.push(r(m)),m=0):f++;for(a=h.charCodeAt(0),i=0;i<8;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}else{for(a=1,i=0;i<g;i++)m=m<<1|a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a=0;for(a=h.charCodeAt(0),i=0;i<16;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}0==--u&&(u=Math.pow(2,g),g++),delete o[h]}else for(a=n[h],i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;0==--u&&(u=Math.pow(2,g),g++),n[c]=d++,h=String(l)}if(""!==h){if(Object.prototype.hasOwnProperty.call(o,h)){if(h.charCodeAt(0)<256){for(i=0;i<g;i++)m<<=1,f==e-1?(f=0,p.push(r(m)),m=0):f++;for(a=h.charCodeAt(0),i=0;i<8;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}else{for(a=1,i=0;i<g;i++)m=m<<1|a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a=0;for(a=h.charCodeAt(0),i=0;i<16;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1}0==--u&&(u=Math.pow(2,g),g++),delete o[h]}else for(a=n[h],i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;0==--u&&(u=Math.pow(2,g),g++)}for(a=2,i=0;i<g;i++)m=m<<1|1&a,f==e-1?(f=0,p.push(r(m)),m=0):f++,a>>=1;for(;;){if(m<<=1,f==e-1){p.push(r(m));break}f++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:s._decompress(t.length,32768,function(e){return t.charCodeAt(e)})},_decompress:function(e,r,i){var a,s,n,o,l,c,h,u=[],d=4,g=4,p=3,m="",f=[],_={val:i(0),position:r,index:1};for(a=0;a<3;a+=1)u[a]=a;for(n=0,l=Math.pow(2,2),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;switch(n){case 0:for(n=0,l=Math.pow(2,8),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;h=t(n);break;case 1:for(n=0,l=Math.pow(2,16),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;h=t(n);break;case 2:return""}for(u[3]=h,s=h,f.push(h);;){if(_.index>e)return"";for(n=0,l=Math.pow(2,p),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;switch(h=n){case 0:for(n=0,l=Math.pow(2,8),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;u[g++]=t(n),h=g-1,d--;break;case 1:for(n=0,l=Math.pow(2,16),c=1;c!=l;)o=_.val&_.position,_.position>>=1,0==_.position&&(_.position=r,_.val=i(_.index++)),n|=(o>0?1:0)*c,c<<=1;u[g++]=t(n),h=g-1,d--;break;case 2:return f.join("")}if(0==d&&(d=Math.pow(2,p),p++),u[h])m=u[h];else{if(h!==g)return null;m=s+s.charAt(0)}f.push(m),u[g++]=s+m.charAt(0),s=m,0==--d&&(d=Math.pow(2,p),p++)}}};return s}();void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)},5692:(t,e,r)=>{t.exports={id:"ic-highest-lowest-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-highest-lowest-dark-active-usage",toString:function(){return this.url}}},5704:(t,e,r)=>{t.exports={id:"ic-100-1s-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-100-1s-index-usage",toString:function(){return this.url}}},5729:(t,e,r)=>{t.exports={id:"german-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#german-usage",toString:function(){return this.url}}},5829:(t,e,r)=>{t.exports={id:"ic-renko-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-renko-normal-usage",toString:function(){return this.url}}},5833:(t,e,r)=>{t.exports={id:"ic-comparison-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-comparison-normal-usage",toString:function(){return this.url}}},5877:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},5976:(t,e,r)=>{t.exports={id:"ic-ichimoku-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ichimoku-usage",toString:function(){return this.url}}},6033:(t,e,r)=>{t.exports={id:"crash600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#crash600 index-usage",toString:function(){return this.url}}},6057:(t,e,r)=>{t.exports={id:"ic-dot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-dot-normal-usage",toString:function(){return this.url}}},6092:t=>{"use strict";t.exports=i},6183:(t,e,r)=>{t.exports={id:"ic-pencil-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-pencil-usage",toString:function(){return this.url}}},6226:(t,e,r)=>{t.exports={id:"thailand-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#thailand-usage",toString:function(){return this.url}}},6238:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},6240:(t,e,r)=>{t.exports={id:"ic-pointfigure-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-pointfigure-normal-usage",toString:function(){return this.url}}},6244:(t,e,r)=>{t.exports={id:"ic-otcbadge-usage",viewBox:"0 0 13 9",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-otcbadge-usage",toString:function(){return this.url}}},6271:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},6331:(t,e,r)=>{t.exports={id:"ic-drawingtools-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-drawingtools-normal-usage",toString:function(){return this.url}}},6351:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},6378:(t,e,r)=>{t.exports={id:"ic-checkbox-active-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-checkbox-active-usage",toString:function(){return this.url}}},6380:(t,e,r)=>{t.exports={id:"ic-otc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-otc-normal-usage",toString:function(){return this.url}}},6432:(t,e,r)=>{t.exports={id:"ic-position-bottom-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-position-bottom-usage",toString:function(){return this.url}}},6456:(t,e,r)=>{t.exports={id:"ic-basket-active-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-basket-active-usage",toString:function(){return this.url}}},6489:(t,e,r)=>{t.exports={id:"crash1000 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#crash1000 index-usage",toString:function(){return this.url}}},6537:(t,e,r)=>{t.exports={id:"ic-bollinger-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-bollinger-usage",toString:function(){return this.url}}},6550:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6552:(t,e,r)=>{t.exports={id:"ic-japan-225-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-japan-225-usage",toString:function(){return this.url}}},6577:(t,e,r)=>{t.exports={id:"ic-highest-lowest-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-highest-lowest-light-normal-usage",toString:function(){return this.url}}},6583:(t,e,r)=>{t.exports={id:"ic-momentum-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-momentum-usage",toString:function(){return this.url}}},6617:(t,e,r)=>{t.exports={id:"ic-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-200-index-usage",toString:function(){return this.url}}},6648:(t,e,r)=>{var i={"./ar.json":[1405,785],"./bn.json":[8462,50],"./de.json":[393,409],"./es.json":[6870,146],"./fr.json":[9358,826],"./id.json":[87,823],"./it.json":[5191,159],"./km.json":[3926,422],"./ko.json":[2900,800],"./messages.json":[7730,710],"./mn.json":[3221,521],"./nl.json":[7840,424],"./pl.json":[6426,634],"./pt.json":[8082,490],"./ru.json":[3351,191],"./si.json":[3026,834],"./sw.json":[4500,456],"./th.json":[8106,522],"./tr.json":[2880,28],"./uz.json":[8201,813],"./vi.json":[9143,935],"./zh.json":[6424,864],"./zh_cn.json":[5988,606],"./zh_tw.json":[9524,602]};function a(t){if(!r.o(i,t))return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=i[t],a=e[0];return r.e(e[1]).then(()=>r.t(a,19))}a.keys=()=>Object.keys(i),a.id=6648,t.exports=a},6661:(t,e,r)=>{t.exports={id:"ic-stochastic-momentum-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-stochastic-momentum-usage",toString:function(){return this.url}}},6667:(t,e,r)=>{t.exports={id:"ic-time-usage",viewBox:"0 0 12 12",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-time-usage",toString:function(){return this.url}}},6669:(t,e,r)=>{t.exports={id:"ic-wallstreet-30-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-wallstreet-30-usage",toString:function(){return this.url}}},6681:(t,e,r)=>{t.exports={id:"uzbekistan-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#uzbekistan-usage",toString:function(){return this.url}}},6706:(t,e,r)=>{t.exports={id:"ic-continuous-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-continuous-usage",toString:function(){return this.url}}},6723:(t,e,r)=>{t.exports={id:"light-25(1s)index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#light-25(1s)index-usage",toString:function(){return this.url}}},6765:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},6776:(t,e,r)=>{t.exports={id:"ic-zoomout-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zoomout-usage",toString:function(){return this.url}}},6800:(t,e,r)=>{t.exports={id:"ic-volatility-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-volatility-normal-usage",toString:function(){return this.url}}},6853:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},6902:(t,e,r)=>{t.exports={id:"jpy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#jpy-usage",toString:function(){return this.url}}},7037:(t,e,r)=>{t.exports={id:"ic-trend-light-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-trend-light-usage",toString:function(){return this.url}}},7038:(t,e,r)=>{t.exports={id:"srilanka-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#srilanka-usage",toString:function(){return this.url}}},7073:(t,e)=>{var r;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=n(t,s(r)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)i.call(t,r)&&t[r]&&(e=n(e,r));return e}function n(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r)}()},7092:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},7183:(t,e,r)=>{t.exports={id:"ic-omgusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-omgusd-usage",toString:function(){return this.url}}},7209:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},7213:(t,e,r)=>{t.exports={id:"boom500 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#boom500 index-usage",toString:function(){return this.url}}},7249:(t,e,r)=>{t.exports={id:"ic-candle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-candle-usage",toString:function(){return this.url}}},7256:(t,e,r)=>{t.exports={id:"chinese-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#chinese-usage",toString:function(){return this.url}}},7358:(t,e,r)=>{t.exports={id:"step-100-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#step-100-index-usage",toString:function(){return this.url}}},7365:(t,e,r)=>{t.exports={id:"ic-fibonacci-fan-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-fibonacci-fan-usage",toString:function(){return this.url}}},7414:(t,e,r)=>{t.exports={id:"ic-ohlc-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ohlc-grayscale-usage",toString:function(){return this.url}}},7420:(t,e,r)=>{t.exports={id:"ic-png-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-png-usage",toString:function(){return this.url}}},7425:(t,e,r)=>{t.exports={id:"ic-ray-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ray-usage",toString:function(){return this.url}}},7428:(t,e,r)=>{t.exports={id:"bangladesh-usage",viewBox:"0 0 24 17",url:r.p+"sprite-1fb8e4.smartcharts.svg#bangladesh-usage",toString:function(){return this.url}}},7451:(t,e,r)=>{t.exports={id:"dutch-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#dutch-usage",toString:function(){return this.url}}},7463:(t,e,r)=>{t.exports={id:"ic-crosshair-off-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-crosshair-off-usage",toString:function(){return this.url}}},7521:(t,e,r)=>{t.exports={id:"ic-scale-full-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-scale-full-usage",toString:function(){return this.url}}},7528:(t,e,r)=>{t.exports={id:"ic-forex-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-forex-normal-usage",toString:function(){return this.url}}},7558:(t,e,r)=>{t.exports={id:"sek-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#sek-usage",toString:function(){return this.url}}},7571:(t,e,r)=>{t.exports={id:"crash500 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#crash500 index-usage",toString:function(){return this.url}}},7625:(t,e,r)=>{t.exports={id:"ic-placeholder-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-placeholder-usage",toString:function(){return this.url}}},7671:(t,e,r)=>{"use strict";t.exports=r(7933)},7709:(t,e,r)=>{t.exports={id:"ic-stochastic-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-stochastic-oscillator-usage",toString:function(){return this.url}}},7739:(t,e,r)=>{t.exports={id:"ic-baseline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-baseline-normal-usage",toString:function(){return this.url}}},7764:(t,e,r)=>{t.exports={id:"ic-uk-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-uk-100-usage",toString:function(){return this.url}}},7808:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},7823:(t,e,r)=>{t.exports={id:"ic-xrpusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-xrpusd-usage",toString:function(){return this.url}}},7885:(t,e,r)=>{t.exports={id:"ic-csv-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-csv-usage",toString:function(){return this.url}}},7933:(t,e,r)=>{"use strict";var i=r(809),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var i,s={},c=null,h=null;for(i in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(h=e.ref),e)n.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:a,type:t,key:c,ref:h,props:s,_owner:o.current}}e.Fragment=s,e.jsx=c,e.jsxs=c},7950:(t,e,r)=>{t.exports={id:"ic-iotusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-iotusd-usage",toString:function(){return this.url}}},7951:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},8093:(t,e,r)=>{t.exports={id:"ic-favorite-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-favorite-normal-usage",toString:function(){return this.url}}},8217:(t,e,r)=>{t.exports={id:"cambodia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#cambodia-usage",toString:function(){return this.url}}},8246:(t,e,r)=>{t.exports={id:"ic-alligator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-alligator-usage",toString:function(){return this.url}}},8250:(t,e,r)=>{t.exports={id:"ic-indicators-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-indicators-usage",toString:function(){return this.url}}},8272:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},8310:(t,e,r)=>{t.exports={id:"ic-commodities-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-commodities-normal-usage",toString:function(){return this.url}}},8341:(t,e,r)=>{t.exports={id:"ic-metal-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-metal-usage",toString:function(){return this.url}}},8414:(t,e,r)=>{t.exports={id:"ic-countdown-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-countdown-dark-active-usage",toString:function(){return this.url}}},8438:(t,e,r)=>{t.exports={id:"ic-btcltc-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-btcltc-usage",toString:function(){return this.url}}},8449:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},8451:(t,e,r)=>{t.exports={id:"ic-checkbox-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-checkbox-usage",toString:function(){return this.url}}},8457:(t,e,r)=>{t.exports={id:"vietnam-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#vietnam-usage",toString:function(){return this.url}}},8584:(t,e,r)=>{t.exports={id:"ic-home-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-home-usage",toString:function(){return this.url}}},8713:(t,e,r)=>{t.exports=r(9829)()},8798:t=>{t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#20242f"}},8832:(t,e,r)=>{t.exports={id:"ic-usd-500-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-usd-500-usage",toString:function(){return this.url}}},8901:(t,e,r)=>{t.exports={id:"usd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#usd-usage",toString:function(){return this.url}}},8927:(t,e,r)=>{t.exports={id:"ic-tick-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-tick-usage",toString:function(){return this.url}}},8983:(t,e,r)=>{t.exports={id:"ic-zoomout-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zoomout-light-usage",toString:function(){return this.url}}},9080:(t,e,r)=>{t.exports={id:"ic-rate-of-change-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-rate-of-change-usage",toString:function(){return this.url}}},9129:(t,e,r)=>{t.exports={id:"ic-area-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-area-usage",toString:function(){return this.url}}},9149:(t,e,r)=>{t.exports={id:"ic-other-usage",viewBox:"0 0 17 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-other-usage",toString:function(){return this.url}}},9160:(t,e,r)=>{"use strict";r.d(e,{t:()=>a});const i={},a=new class{constructor(t="en"){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"lang",void 0),this.lang=t}setLanguage(t,e){i[t]||"en"===t?(this.lang=t,e?.()):r(6648)(`./${t}.json`).then(r=>{r?(i[t]=r.default,this.lang=t,e?.()):console.error("Unsupported language:",t)})}translate(...t){const e=i[this.lang],r=t[0].trim(),a=r.replace(/\\/g,"\\\\").replace(/"/g,'\\"');let s=r,n=!1;return e&&e[r]?s=e[r]:e&&e[a]&&(s=e[a],n=!0),t[1]&&Object.keys(t[1]).forEach(e=>{s=s.replace(`[${e}]`,t[1][e])}),n?s.replace(/\\\"/gi,'"'):s}}},9185:(t,e,r)=>{t.exports={id:"ic-zoomin-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-zoomin-light-usage",toString:function(){return this.url}}},9289:(t,e,r)=>{t.exports={id:"ic-add-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-add-usage",toString:function(){return this.url}}},9307:(t,e,r)=>{t.exports={id:"ic-dropdown-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-dropdown-usage",toString:function(){return this.url}}},9317:(t,e,r)=>{t.exports={id:"ic-synth-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-synth-normal-usage",toString:function(){return this.url}}},9324:(t,e,r)=>{t.exports={id:"ic-close-circle-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-close-circle-usage",toString:function(){return this.url}}},9411:(t,e,r)=>{t.exports={id:"ic-edit-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-edit-usage",toString:function(){return this.url}}},9423:(t,e,r)=>{t.exports={id:"ic-countdown-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-countdown-light-normal-usage",toString:function(){return this.url}}},9424:(t,e,r)=>{t.exports={id:"ic-gator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-gator-usage",toString:function(){return this.url}}},9429:(t,e,r)=>{t.exports={id:"info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#info-usage",toString:function(){return this.url}}},9442:(t,e,r)=>{t.exports={id:"ic-macd-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-macd-usage",toString:function(){return this.url}}},9564:(t,e,r)=>{t.exports={id:"ic-ohlc-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-ohlc-usage",toString:function(){return this.url}}},9607:(t,e,r)=>{t.exports={id:"ic-hollow-usage",viewBox:"0 0 24 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-hollow-usage",toString:function(){return this.url}}},9625:(t,e,r)=>{t.exports={id:"ic-close-bold-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-close-bold-usage",toString:function(){return this.url}}},9671:(t,e,r)=>{t.exports={id:"ic-bchusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-bchusd-usage",toString:function(){return this.url}}},9702:(t,e,r)=>{t.exports={id:"mxn-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#mxn-usage",toString:function(){return this.url}}},9705:(t,e,r)=>{t.exports={id:"spanish-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#spanish-usage",toString:function(){return this.url}}},9707:(t,e,r)=>{t.exports={id:"ic-delete-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-delete-usage",toString:function(){return this.url}}},9715:(t,e,r)=>{t.exports={id:"light-75(1s) index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-1fb8e4.smartcharts.svg#light-75(1s) index-usage",toString:function(){return this.url}}},9758:()=>{var t;HTMLCanvasElement.prototype.getContext=(t=HTMLCanvasElement.prototype.getContext,function(e,r){return(r=r||{}).preserveDrawingBuffer=!0,t.call(this,e,r)})},9829:(t,e,r)=>{"use strict";var i=r(6550);function a(){}function s(){}s.resetWarningCache=a,t.exports=function(){function t(t,e,r,a,s,n){if(n!==i){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:a};return r.PropTypes=r,r}},9876:(t,e,r)=>{t.exports={id:"hong kong-usage",viewBox:"0 0 24 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#hong kong-usage",toString:function(){return this.url}}},9877:(t,e,r)=>{t.exports={id:"ic-rainbow-usage",viewBox:"0 0 25 24",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-rainbow-usage",toString:function(){return this.url}}},9891:(t,e,r)=>{t.exports={id:"ic-charts-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-charts-usage",toString:function(){return this.url}}},9955:(t,e,r)=>{t.exports={id:"ic-linedot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-1fb8e4.smartcharts.svg#ic-linedot-normal-usage",toString:function(){return this.url}}}},c={};function h(t){var e=c[t];if(void 0!==e)return e.exports;var r=c[t]={exports:{}};return l[t].call(r.exports,r,r.exports,h),r.exports}h.m=l,h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},s=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,h.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);h.r(r);var i={};a=a||[null,s({}),s([]),s(s)];for(var n=2&e&&t;"object"==typeof n&&!~a.indexOf(n);n=s(n))Object.getOwnPropertyNames(n).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,h.d(r,i),r},h.d=(t,e)=>{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.f={},h.e=t=>Promise.all(Object.keys(h.f).reduce((e,r)=>(h.f[r](t,e),e),[])),h.u=t=>({28:"tr-json",50:"bn-json",146:"es-json",159:"it-json",191:"ru-json",409:"de-json",422:"km-json",424:"nl-json",456:"sw-json",490:"pt-json",518:"flutter-chart-adapter",521:"mn-json",522:"th-json",526:"html2canvas",590:"resize-observer-polyfill",602:"zh_tw-json",606:"zh_cn-json",634:"pl-json",710:"messages-json",785:"ar-json",800:"ko-json",813:"uz-json",823:"id-json",826:"fr-json",834:"si-json",864:"zh-json",935:"vi-json"}[t]+"-"+{28:"fed0ca",50:"dc5b00",146:"4db99e",159:"3977f6",191:"8a4267",409:"4c21b8",422:"e9781b",424:"eddac7",456:"8d97a4",490:"e5722a",518:"3539ee",521:"47cabf",522:"7576c4",526:"cffc8d",590:"75583b",602:"5a9e38",606:"65098e",634:"1511d2",710:"69c2d6",785:"8026ea",800:"475be2",813:"08e383",823:"cd6a08",826:"44836b",834:"547011",864:"cacc85",935:"ae1b14"}[t]+".smartcharts.js"),h.miniCssF=t=>{},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="smartcharts:",h.l=(t,e,r,i)=>{if(n[t])n[t].push(e);else{var a,s;if(void 0!==r)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==o+r){a=u;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,h.nc&&a.setAttribute("nonce",h.nc),a.setAttribute("data-webpack",o+r),a.src=t),n[t]=[e];var d=(e,r)=>{a.onerror=a.onload=null,clearTimeout(g);var i=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(t=>t(r)),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}},h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},h.p="",(()=>{var t={792:0};h.f.j=(e,r)=>{var i=h.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,a)=>i=t[e]=[r,a]);r.push(i[2]=a);var s=h.p+h.u(e),n=new Error;h.l(s,r=>{if(h.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+a+": "+s+")",n.name="ChunkLoadError",n.type=a,n.request=s,i[1](n)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,s=r[0],n=r[1],o=r[2],l=0;if(s.some(e=>0!==t[e])){for(i in n)h.o(n,i)&&(h.m[i]=n[i]);o&&o(h)}for(e&&e(r);l<s.length;l++)a=s[l],h.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=self.webpackChunksmartcharts=self.webpackChunksmartcharts||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var u={};return(()=>{"use strict";h.d(u,{default:()=>Nx});var t=h(7073),e=h.n(t);function r(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var i={};function a(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==h.g?h.g:"undefined"!=typeof self?self:i}var s=Object.assign,n=Object.getOwnPropertyDescriptor,o=Object.defineProperty,l=Object.prototype,c=[];Object.freeze(c);var d={};Object.freeze(d);var g="undefined"!=typeof Proxy,p=Object.toString();function m(){g||r("Proxy not available")}function f(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var _=function(){};function v(t){return"function"==typeof t}function b(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function y(t){return null!==t&&"object"==typeof t}function S(t){if(!y(t))return!1;var e=Object.getPrototypeOf(t);if(null==e)return!0;var r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r.toString()===p}function x(t){var e=null==t?void 0:t.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName)}function w(t,e,r){o(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function C(t,e,r){o(t,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function T(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return y(t)&&!0===t[r]}}function k(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function j(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}var A=void 0!==Object.getOwnPropertySymbols,O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:A?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function E(t){return null===t?null:"object"==typeof t?""+t:t}function N(t,e){return l.hasOwnProperty.call(t,e)}var I=Object.getOwnPropertyDescriptors||function(t){var e={};return O(t).forEach(function(r){e[r]=n(t,r)}),e};function P(t,e){return!!(t&e)}function D(t,e,r){return r?t|=e:t&=~e,t}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function M(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,U(i.key),i)}}function B(t,e,r){return e&&M(t.prototype,e),r&&M(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},F.apply(null,arguments)}function V(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,H(t,e)}function H(t,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},H(t,e)}function U(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var q=Symbol("mobx-stored-annotations");function z(t){return Object.assign(function(e,r){if(G(r))return t.decorate_20223_(e,r);$(e,r,t)},t)}function $(t,e,r){N(t,q)||w(t,q,F({},t[q])),function(t){return t.annotationType_===tt}(r)||(t[q][e]=r)}function G(t){return"object"==typeof t&&"string"==typeof t.kind}var W=Symbol("mobx administration"),K=function(){function t(t){void 0===t&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Jt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(t){return t()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(t){return t()})},e.reportObserved=function(){return xe(this)},e.reportChanged=function(){ye(),we(this),Se()},e.toString=function(){return this.name_},B(t,[{key:"isBeingObserved",get:function(){return P(this.flags_,t.isBeingObservedMask_)},set:function(e){this.flags_=D(this.flags_,t.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return P(this.flags_,t.isPendingUnobservationMask_)},set:function(e){this.flags_=D(this.flags_,t.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();K.isBeingObservedMask_=1,K.isPendingUnobservationMask_=2,K.diffValueMask_=4;var Q=T("Atom",K);function Y(t,e,r){void 0===e&&(e=_),void 0===r&&(r=_);var i=new K(t);return e!==_&&We(ze,i,e,undefined),r!==_&&Ge(i,r),i}var X={identity:function(t,e){return t===e},structural:function(t,e){return gi(t,e)},default:function(t,e){return Object.is?Object.is(t,e):t===e?0!==t||1/t==1/e:t!=t&&e!=e},shallow:function(t,e){return gi(t,e,1)}};function Z(t,e,r){return ar(t)?t:Array.isArray(t)?Mt.array(t,{name:r}):S(t)?Mt.object(t,void 0,{name:r}):k(t)?Mt.map(t,{name:r}):j(t)?Mt.set(t,{name:r}):"function"!=typeof t||Fe(t)||ir(t)?t:x(t)?er(t):Re(r,t)}function J(t){return t}var tt="override";function et(t,e){return{annotationType_:t,options_:e,make_:rt,extend_:it,decorate_20223_:at}}function rt(t,e,r,i){var a;if(null!=(a=this.options_)&&a.bound)return null===this.extend_(t,e,r,!1)?0:1;if(i===t.target_)return null===this.extend_(t,e,r,!1)?0:2;if(Fe(r.value))return 1;var s=st(t,this,e,r,!1);return o(i,e,s),2}function it(t,e,r,i){var a=st(t,this,e,r);return t.defineProperty_(e,a,i)}function at(t,e){var i,a=e.kind,s=e.name,n=e.addInitializer,o=this,l=function(t){var e,r,i,a;return $t(null!=(e=null==(r=o.options_)?void 0:r.name)?e:s.toString(),t,null!=(i=null==(a=o.options_)?void 0:a.autoAction)&&i)};return"field"==a?function(t){var e,r=t;return Fe(r)||(r=l(r)),null!=(e=o.options_)&&e.bound&&((r=r.bind(this)).isMobxAction=!0),r}:"method"==a?(Fe(t)||(t=l(t)),null!=(i=this.options_)&&i.bound&&n(function(){var t=this,e=t[s].bind(t);e.isMobxAction=!0,t[s]=e}),t):void r("Cannot apply '"+o.annotationType_+"' to '"+String(s)+"' (kind: "+a+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function st(t,e,r,i,a){var s,n,o,l,c,h,u,d;void 0===a&&(a=fe.safeDescriptors),d=i,e.annotationType_,d.value;var g,p=i.value;return null!=(s=e.options_)&&s.bound&&(p=p.bind(null!=(g=t.proxy_)?g:t.target_)),{value:$t(null!=(n=null==(o=e.options_)?void 0:o.name)?n:r.toString(),p,null!=(l=null==(c=e.options_)?void 0:c.autoAction)&&l,null!=(h=e.options_)&&h.bound?null!=(u=t.proxy_)?u:t.target_:void 0),configurable:!a||t.isPlainObject_,enumerable:!1,writable:!a}}function nt(t,e){return{annotationType_:t,options_:e,make_:ot,extend_:lt,decorate_20223_:ct}}function ot(t,e,r,i){var a;if(i===t.target_)return null===this.extend_(t,e,r,!1)?0:2;if(null!=(a=this.options_)&&a.bound&&(!N(t.target_,e)||!ir(t.target_[e]))&&null===this.extend_(t,e,r,!1))return 0;if(ir(r.value))return 1;var s=ht(t,this,0,r,!1,!1);return o(i,e,s),2}function lt(t,e,r,i){var a,s=ht(t,this,0,r,null==(a=this.options_)?void 0:a.bound);return t.defineProperty_(e,s,i)}function ct(t,e){var r,i=e.name,a=e.addInitializer;return ir(t)||(t=er(t)),null!=(r=this.options_)&&r.bound&&a(function(){var t=this,e=t[i].bind(t);e.isMobXFlow=!0,t[i]=e}),t}function ht(t,e,r,i,a,s){var n;void 0===s&&(s=fe.safeDescriptors),n=i,e.annotationType_,n.value;var o,l=i.value;return ir(l)||(l=er(l)),a&&((l=l.bind(null!=(o=t.proxy_)?o:t.target_)).isMobXFlow=!0),{value:l,configurable:!s||t.isPlainObject_,enumerable:!1,writable:!s}}function ut(t,e){return{annotationType_:t,options_:e,make_:dt,extend_:gt,decorate_20223_:pt}}function dt(t,e,r){return null===this.extend_(t,e,r,!1)?0:1}function gt(t,e,r,i){return a=r,this.annotationType_,a.get,t.defineComputedProperty_(e,F({},this.options_,{get:r.get,set:r.set}),i);var a}function pt(t,e){var r=this,i=e.name;return(0,e.addInitializer)(function(){var e=$r(this)[W],a=F({},r.options_,{get:t,context:this});a.name||(a.name="ObservableObject."+i.toString()),e.values_.set(i,new Zt(a))}),function(){return this[W].getObservablePropValue_(i)}}function mt(t,e){return{annotationType_:t,options_:e,make_:ft,extend_:_t,decorate_20223_:vt}}function ft(t,e,r){return null===this.extend_(t,e,r,!1)?0:1}function _t(t,e,r,i){var a,s;return this.annotationType_,t.defineObservableProperty_(e,r.value,null!=(a=null==(s=this.options_)?void 0:s.enhancer)?a:Z,i)}function vt(t,e){var r=this,i=e.kind,a=e.name,s=new WeakSet;function n(t,e){var i,n,o=$r(t)[W],l=new Yt(e,null!=(i=null==(n=r.options_)?void 0:n.enhancer)?i:Z,"ObservableObject."+a.toString(),!1);o.values_.set(a,l),s.add(t)}if("accessor"==i)return{get:function(){return s.has(this)||n(this,t.get.call(this)),this[W].getObservablePropValue_(a)},set:function(t){return s.has(this)||n(this,t),this[W].setObservablePropValue_(a,t)},init:function(t){return s.has(this)||n(this,t),t}}}var bt="true",yt=St();function St(t){return{annotationType_:bt,options_:t,make_:xt,extend_:wt,decorate_20223_:Ct}}function xt(t,e,r,i){var a,s,n,l;if(r.get)return Vt.make_(t,e,r,i);if(r.set){var c=$t(e.toString(),r.set);return i===t.target_?null===t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:c})?0:2:(o(i,e,{configurable:!0,set:c}),2)}if(i!==t.target_&&"function"==typeof r.value)return x(r.value)?(null!=(l=this.options_)&&l.autoBind?er.bound:er).make_(t,e,r,i):(null!=(n=this.options_)&&n.autoBind?Re.bound:Re).make_(t,e,r,i);var h,u=!1===(null==(a=this.options_)?void 0:a.deep)?Mt.ref:Mt;return"function"==typeof r.value&&null!=(s=this.options_)&&s.autoBind&&(r.value=r.value.bind(null!=(h=t.proxy_)?h:t.target_)),u.make_(t,e,r,i)}function wt(t,e,r,i){var a,s,n;return r.get?Vt.extend_(t,e,r,i):r.set?t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:$t(e.toString(),r.set)},i):("function"==typeof r.value&&null!=(a=this.options_)&&a.autoBind&&(r.value=r.value.bind(null!=(n=t.proxy_)?n:t.target_)),(!1===(null==(s=this.options_)?void 0:s.deep)?Mt.ref:Mt).extend_(t,e,r,i))}function Ct(t,e){r("'"+this.annotationType_+"' cannot be used as a decorator")}var Tt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function kt(t){return t||Tt}Object.freeze(Tt);var jt=mt("observable"),At=mt("observable.ref",{enhancer:J}),Ot=mt("observable.shallow",{enhancer:function(t,e,r){return null==t||Kr(t)||Nr(t)||Mr(t)||Vr(t)?t:Array.isArray(t)?Mt.array(t,{name:r,deep:!1}):S(t)?Mt.object(t,void 0,{name:r,deep:!1}):k(t)?Mt.map(t,{name:r,deep:!1}):j(t)?Mt.set(t,{name:r,deep:!1}):void 0}}),Et=mt("observable.struct",{enhancer:function(t,e){return gi(t,e)?e:t}}),Nt=z(jt);function It(t){return!0===t.deep?Z:!1===t.deep?J:(e=t.defaultDecorator)&&null!=(r=null==(i=e.options_)?void 0:i.enhancer)?r:Z;var e,r,i}function Pt(t,e,r){return G(e)?jt.decorate_20223_(t,e):b(e)?void $(t,e,jt):ar(t)?t:S(t)?Mt.object(t,e,r):Array.isArray(t)?Mt.array(t,e):k(t)?Mt.map(t,e):j(t)?Mt.set(t,e):"object"==typeof t&&null!==t?t:Mt.box(t,e)}s(Pt,Nt);var Dt,Lt,Mt=s(Pt,{box:function(t,e){var r=kt(e);return new Yt(t,It(r),r.name,!0,r.equals)},array:function(t,e){var r=kt(e);return(!1===fe.useProxies||!1===r.proxy?ni:Cr)(t,It(r),r.name)},map:function(t,e){var r=kt(e);return new Lr(t,It(r),r.name)},set:function(t,e){var r=kt(e);return new Fr(t,It(r),r.name)},object:function(t,e,r){return hi(function(){return function(t,e,r,i){var a=I(e);return hi(function(){var e=$r(t,i)[W];O(a).forEach(function(t){e.extend_(t,a[t],!r||!(t in r)||r[t])})}),t}(!1===fe.useProxies||!1===(null==r?void 0:r.proxy)?$r({},r):function(t,e){var r,i;return m(),null!=(i=(r=(t=$r(t,e))[W]).proxy_)?i:r.proxy_=new Proxy(t,dr)}({},r),t,e)})},ref:z(At),shallow:z(Ot),deep:Nt,struct:z(Et)}),Bt="computed",Rt=ut(Bt),Ft=ut("computed.struct",{equals:X.structural}),Vt=function(t,e){if(G(e))return Rt.decorate_20223_(t,e);if(b(e))return $(t,e,Rt);if(S(t))return z(ut(Bt,t));var r=S(e)?e:{};return r.get=t,r.name||(r.name=t.name||""),new Zt(r)};Object.assign(Vt,Rt),Vt.struct=z(Ft);var Ht=0,Ut=1,qt=null!=(Dt=null==(Lt=n(function(){},"name"))?void 0:Lt.configurable)&&Dt,zt={value:"action",configurable:!0,writable:!1,enumerable:!1};function $t(t,e,r,i){function a(){return Gt(0,r,e,i||this,arguments)}return void 0===r&&(r=!1),a.isMobxAction=!0,a.toString=function(){return e.toString()},qt&&(zt.value=t,o(a,"name",zt)),a}function Gt(t,e,i,a,s){var n=function(t,e){var r=fe.trackingDerivation,i=!e||!r;ye();var a=fe.allowStateChanges;i&&(le(),a=Kt(!0));var s={runAsAction_:i,prevDerivation_:r,prevAllowStateChanges_:a,prevAllowStateReads_:he(!0),notifySpy_:!1,startTime_:0,actionId_:Ut++,parentActionId_:Ht};return Ht=s.actionId_,s}(0,e);try{return i.apply(a,s)}catch(t){throw n.error_=t,t}finally{!function(t){Ht!==t.actionId_&&r(30),Ht=t.parentActionId_,void 0!==t.error_&&(fe.suppressReactionErrors=!0),Qt(t.prevAllowStateChanges_),ue(t.prevAllowStateReads_),Se(),t.runAsAction_&&ce(t.prevDerivation_),fe.suppressReactionErrors=!1}(n)}}function Wt(t,e){var r=Kt(t);try{return e()}finally{Qt(r)}}function Kt(t){var e=fe.allowStateChanges;return fe.allowStateChanges=t,e}function Qt(t){fe.allowStateChanges=t}var Yt=function(t){function e(e,r,i,a,s){var n;return void 0===i&&(i="ObservableValue"),void 0===a&&(a=!0),void 0===s&&(s=X.default),(n=t.call(this,i)||this).enhancer=void 0,n.name_=void 0,n.equals=void 0,n.hasUnreportedChange_=!1,n.interceptors_=void 0,n.changeListeners_=void 0,n.value_=void 0,n.dehancer=void 0,n.enhancer=r,n.name_=i,n.equals=s,n.value_=r(e,void 0,i),n}V(e,t);var r=e.prototype;return r.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},r.set=function(t){this.value_,(t=this.prepareNewValue_(t))!==fe.UNCHANGED&&this.setNewValue_(t)},r.prepareNewValue_=function(t){if(gr(this)){var e=mr(this,{object:this,type:Sr,newValue:t});if(!e)return fe.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value_,this.name_),this.equals(this.value_,t)?fe.UNCHANGED:t},r.setNewValue_=function(t){var e=this.value_;this.value_=t,this.reportChanged(),fr(this)&&vr(this,{type:Sr,object:this,newValue:t,oldValue:e})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(t){return pr(this,t)},r.observe_=function(t,e){return e&&t({observableKind:"value",debugObjectName:this.name_,object:this,type:Sr,newValue:this.value_,oldValue:void 0}),_r(this,t)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return E(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},e}(K),Xt=T("ObservableValue",Yt),Zt=function(){function t(t){this.dependenciesState_=Jt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Jt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new re(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=te.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||r(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=$t("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?X.structural:X.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){var t;(t=this).lowestObserverState_===Jt.UP_TO_DATE_&&(t.lowestObserverState_=Jt.POSSIBLY_STALE_,t.observers_.forEach(function(t){t.dependenciesState_===Jt.UP_TO_DATE_&&(t.dependenciesState_=Jt.POSSIBLY_STALE_,t.onBecomeStale_())}))},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(t){return t()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(t){return t()})},e.get=function(){if(this.isComputing&&r(32,this.name_,this.derivation),0!==fe.inBatch||0!==this.observers_.size||this.keepAlive_){if(xe(this),ae(this)){var t=fe.trackingContext;this.keepAlive_&&!t&&(fe.trackingContext=this),this.trackAndCompute()&&((e=this).lowestObserverState_!==Jt.STALE_&&(e.lowestObserverState_=Jt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Jt.POSSIBLY_STALE_?t.dependenciesState_=Jt.STALE_:t.dependenciesState_===Jt.UP_TO_DATE_&&(e.lowestObserverState_=Jt.UP_TO_DATE_)}))),fe.trackingContext=t}}else ae(this)&&(this.warnAboutUntrackedRead_(),ye(),this.value_=this.computeValue_(!1),Se());var e,i=this.value_;if(ie(i))throw i.cause;return i},e.set=function(t){if(this.setter_){this.isRunningSetter&&r(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,t)}finally{this.isRunningSetter=!1}}else r(34,this.name_)},e.trackAndCompute=function(){var t=this.value_,e=this.dependenciesState_===Jt.NOT_TRACKING_,r=this.computeValue_(!0),i=e||ie(t)||ie(r)||!this.equals_(t,r);return i&&(this.value_=r),i},e.computeValue_=function(t){this.isComputing=!0;var e,r=Kt(!1);if(t)e=se(this,this.derivation,this.scope_);else if(!0===fe.disableErrorBoundaries)e=this.derivation.call(this.scope_);else try{e=this.derivation.call(this.scope_)}catch(t){e=new re(t)}return Qt(r),this.isComputing=!1,e},e.suspend_=function(){this.keepAlive_||(ne(this),this.value_=void 0)},e.observe_=function(t,e){var r=this,i=!0,a=void 0;return Ve(function(){var s=r.get();if(!i||e){var n=le();t({observableKind:"computed",debugObjectName:r.name_,type:Sr,object:r,newValue:s,oldValue:a}),ce(n)}i=!1,a=s})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return E(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},B(t,[{key:"isComputing",get:function(){return P(this.flags_,t.isComputingMask_)},set:function(e){this.flags_=D(this.flags_,t.isComputingMask_,e)}},{key:"isRunningSetter",get:function(){return P(this.flags_,t.isRunningSetterMask_)},set:function(e){this.flags_=D(this.flags_,t.isRunningSetterMask_,e)}},{key:"isBeingObserved",get:function(){return P(this.flags_,t.isBeingObservedMask_)},set:function(e){this.flags_=D(this.flags_,t.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return P(this.flags_,t.isPendingUnobservationMask_)},set:function(e){this.flags_=D(this.flags_,t.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();Zt.isComputingMask_=1,Zt.isRunningSetterMask_=2,Zt.isBeingObservedMask_=4,Zt.isPendingUnobservationMask_=8,Zt.diffValueMask_=16;var Jt,te,ee=T("ComputedValue",Zt);!function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"}(Jt||(Jt={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(te||(te={}));var re=function(t){this.cause=void 0,this.cause=t};function ie(t){return t instanceof re}function ae(t){switch(t.dependenciesState_){case Jt.UP_TO_DATE_:return!1;case Jt.NOT_TRACKING_:case Jt.STALE_:return!0;case Jt.POSSIBLY_STALE_:for(var e=he(!0),r=le(),i=t.observing_,a=i.length,s=0;s<a;s++){var n=i[s];if(ee(n)){if(fe.disableErrorBoundaries)n.get();else try{n.get()}catch(t){return ce(r),ue(e),!0}if(t.dependenciesState_===Jt.STALE_)return ce(r),ue(e),!0}}return de(t),ce(r),ue(e),!1}}function se(t,e,r){var i=he(!0);de(t),t.newObserving_=new Array(0===t.runId_?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++fe.runId;var a,s=fe.trackingDerivation;if(fe.trackingDerivation=t,fe.inBatch++,!0===fe.disableErrorBoundaries)a=e.call(r);else try{a=e.call(r)}catch(t){a=new re(t)}return fe.inBatch--,fe.trackingDerivation=s,function(t){for(var e=t.observing_,r=t.observing_=t.newObserving_,i=Jt.UP_TO_DATE_,a=0,s=t.unboundDepsCount_,n=0;n<s;n++){var o=r[n];0===o.diffValue&&(o.diffValue=1,a!==n&&(r[a]=o),a++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(r.length=a,t.newObserving_=null,s=e.length;s--;){var l=e[s];0===l.diffValue&&ve(l,t),l.diffValue=0}for(;a--;){var c=r[a];1===c.diffValue&&(c.diffValue=0,_e(c,t))}i!==Jt.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}(t),ue(i),a}function ne(t){var e=t.observing_;t.observing_=[];for(var r=e.length;r--;)ve(e[r],t);t.dependenciesState_=Jt.NOT_TRACKING_}function oe(t){var e=le();try{return t()}finally{ce(e)}}function le(){var t=fe.trackingDerivation;return fe.trackingDerivation=null,t}function ce(t){fe.trackingDerivation=t}function he(t){var e=fe.allowStateReads;return fe.allowStateReads=t,e}function ue(t){fe.allowStateReads=t}function de(t){if(t.dependenciesState_!==Jt.UP_TO_DATE_){t.dependenciesState_=Jt.UP_TO_DATE_;for(var e=t.observing_,r=e.length;r--;)e[r].lowestObserverState_=Jt.UP_TO_DATE_}}var ge=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},pe=!0,me=!1,fe=function(){var t=a();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(pe=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new ge).version&&(pe=!1),pe?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ge):(setTimeout(function(){me||r(35)},1),new ge)}();function _e(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ve(t,e){t.observers_.delete(e),0===t.observers_.size&&be(t)}function be(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,fe.pendingUnobservations.push(t))}function ye(){fe.inBatch++}function Se(){if(0===--fe.inBatch){je();for(var t=fe.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers_.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof Zt&&r.suspend_())}fe.pendingUnobservations=[]}}function xe(t){var e=fe.trackingDerivation;return null!==e?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&fe.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(0===t.observers_.size&&fe.inBatch>0&&be(t),!1)}function we(t){t.lowestObserverState_!==Jt.STALE_&&(t.lowestObserverState_=Jt.STALE_,t.observers_.forEach(function(t){t.dependenciesState_===Jt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=Jt.STALE_}))}var Ce=function(){function t(t,e,r,i){void 0===t&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Jt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=te.NONE,this.name_=t,this.onInvalidate_=e,this.errorHandler_=r,this.requiresObservable_=i}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,fe.pendingReactions.push(this),je())},e.runReaction_=function(){if(!this.isDisposed){ye(),this.isScheduled=!1;var t=fe.trackingContext;if(fe.trackingContext=this,ae(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}fe.trackingContext=t,Se()}},e.track=function(t){if(!this.isDisposed){ye(),this.isRunning=!0;var e=fe.trackingContext;fe.trackingContext=this;var r=se(this,t,void 0);fe.trackingContext=e,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&ne(this),ie(r)&&this.reportExceptionInDerivation_(r.cause),Se()}},e.reportExceptionInDerivation_=function(t){var e=this;if(this.errorHandler_)this.errorHandler_(t,this);else{if(fe.disableErrorBoundaries)throw t;var r="[mobx] uncaught error in '"+this+"'";fe.suppressReactionErrors||console.error(r,t),fe.globalReactionErrorHandlers.forEach(function(r){return r(t,e)})}},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ye(),ne(this),Se()))},e.getDisposer_=function(t){var e=this,r=function r(){e.dispose(),null==t||null==t.removeEventListener||t.removeEventListener("abort",r)};return null==t||null==t.addEventListener||t.addEventListener("abort",r),r[W]=this,r},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(t){void 0===t&&(t=!1)},B(t,[{key:"isDisposed",get:function(){return P(this.flags_,t.isDisposedMask_)},set:function(e){this.flags_=D(this.flags_,t.isDisposedMask_,e)}},{key:"isScheduled",get:function(){return P(this.flags_,t.isScheduledMask_)},set:function(e){this.flags_=D(this.flags_,t.isScheduledMask_,e)}},{key:"isTrackPending",get:function(){return P(this.flags_,t.isTrackPendingMask_)},set:function(e){this.flags_=D(this.flags_,t.isTrackPendingMask_,e)}},{key:"isRunning",get:function(){return P(this.flags_,t.isRunningMask_)},set:function(e){this.flags_=D(this.flags_,t.isRunningMask_,e)}},{key:"diffValue",get:function(){return P(this.flags_,t.diffValueMask_)?1:0},set:function(e){this.flags_=D(this.flags_,t.diffValueMask_,1===e)}}])}();Ce.isDisposedMask_=1,Ce.isScheduledMask_=2,Ce.isTrackPendingMask_=4,Ce.isRunningMask_=8,Ce.diffValueMask_=16;var Te=100,ke=function(t){return t()};function je(){fe.inBatch>0||fe.isRunningReactions||ke(Ae)}function Ae(){fe.isRunningReactions=!0;for(var t=fe.pendingReactions,e=0;t.length>0;){++e===Te&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var r=t.splice(0),i=0,a=r.length;i<a;i++)r[i].runReaction_()}fe.isRunningReactions=!1}var Oe=T("Reaction",Ce),Ee="action",Ne="autoAction",Ie=et(Ee),Pe=et("action.bound",{bound:!0}),De=et(Ne,{autoAction:!0}),Le=et("autoAction.bound",{autoAction:!0,bound:!0});function Me(t){return function(e,r){return v(e)?$t(e.name||"<unnamed action>",e,t):v(r)?$t(e,r,t):G(r)?(t?De:Ie).decorate_20223_(e,r):b(r)?$(e,r,t?De:Ie):b(e)?z(et(t?Ne:Ee,{name:e,autoAction:t})):void 0}}var Be=Me(!1);Object.assign(Be,Ie);var Re=Me(!0);function Fe(t){return v(t)&&!0===t.isMobxAction}function Ve(t,e){var r,i,a,s;void 0===e&&(e=d);var n,o=null!=(r=null==(i=e)?void 0:i.name)?r:"Autorun";if(e.scheduler||e.delay){var l=Ue(e),c=!1;n=new Ce(o,function(){c||(c=!0,l(function(){c=!1,n.isDisposed||n.track(h)}))},e.onError,e.requiresObservable)}else n=new Ce(o,function(){this.track(h)},e.onError,e.requiresObservable);function h(){t(n)}return null!=(a=e)&&null!=(a=a.signal)&&a.aborted||n.schedule_(),n.getDisposer_(null==(s=e)?void 0:s.signal)}Object.assign(Re,De),Be.bound=z(Pe),Re.bound=z(Le);var He=function(t){return t()};function Ue(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:He}function qe(t,e,r){var i,a,s;void 0===r&&(r=d);var n,o,l,c=null!=(i=r.name)?i:"Reaction",h=Be(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),u=!r.scheduler&&!r.delay,g=Ue(r),p=!0,m=!1,f=r.compareStructural?X.structural:r.equals||X.default,_=new Ce(c,function(){p||u?v():m||(m=!0,g(v))},r.onError,r.requiresObservable);function v(){if(m=!1,!_.isDisposed){var e=!1,i=l;_.track(function(){var r=Wt(!1,function(){return t(_)});e=p||!f(l,r),l=r}),(p&&r.fireImmediately||!p&&e)&&h(l,i,_),p=!1}}return null!=(a=r)&&null!=(a=a.signal)&&a.aborted||_.schedule_(),_.getDisposer_(null==(s=r)?void 0:s.signal)}var ze="onBO",$e="onBUO";function Ge(t,e,r){return We($e,t,e,r)}function We(t,e,r,i){var a="function"==typeof i?oi(e,r):oi(e),s=v(i)?i:r,n=t+"L";return a[n]?a[n].add(s):a[n]=new Set([s]),function(){var t=a[n];t&&(t.delete(s),0===t.size&&delete a[n])}}var Ke="always";function Qe(t){!0===t.isolateGlobalState&&function(){if((fe.pendingReactions.length||fe.inBatch||fe.isRunningReactions)&&r(36),me=!0,pe){var t=a();0===--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),fe=new ge}}();var e,i,s=t.useProxies,n=t.enforceActions;if(void 0!==s&&(fe.useProxies=s===Ke||"never"!==s&&"undefined"!=typeof Proxy),"ifavailable"===s&&(fe.verifyProxies=!0),void 0!==n){var o=n===Ke?Ke:"observed"===n;fe.enforceActions=o,fe.allowStateChanges=!0!==o&&o!==Ke}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(e){e in t&&(fe[e]=!!t[e])}),fe.allowStateReads=!fe.observableRequiresReaction,t.reactionScheduler&&(e=t.reactionScheduler,i=ke,ke=function(t){return e(function(){return i(t)})})}function Ye(t){var e,r={name:t.name_};return t.observing_&&t.observing_.length>0&&(r.dependencies=(e=t.observing_,Array.from(new Set(e))).map(Ye)),r}var Xe=0;function Ze(){this.message="FLOW_CANCELLED"}Ze.prototype=Object.create(Error.prototype);var Je=nt("flow"),tr=nt("flow.bound",{bound:!0}),er=Object.assign(function(t,e){if(G(e))return Je.decorate_20223_(t,e);if(b(e))return $(t,e,Je);var r=t,i=r.name||"<unnamed flow>",a=function(){var t,e=arguments,a=++Xe,s=Be(i+" - runid: "+a+" - init",r).apply(this,e),n=void 0,o=new Promise(function(e,r){var o=0;function l(t){var e;n=void 0;try{e=Be(i+" - runid: "+a+" - yield "+o++,s.next).call(s,t)}catch(t){return r(t)}h(e)}function c(t){var e;n=void 0;try{e=Be(i+" - runid: "+a+" - yield "+o++,s.throw).call(s,t)}catch(t){return r(t)}h(e)}function h(t){if(!v(null==t?void 0:t.then))return t.done?e(t.value):(n=Promise.resolve(t.value)).then(l,c);t.then(h,r)}t=r,l(void 0)});return o.cancel=Be(i+" - runid: "+a+" - cancel",function(){try{n&&rr(n);var e=s.return(void 0),r=Promise.resolve(e.value);r.then(_,_),rr(r),t(new Ze)}catch(e){t(e)}}),o};return a.isMobXFlow=!0,a},Je);function rr(t){v(t.cancel)&&t.cancel()}function ir(t){return!0===(null==t?void 0:t.isMobXFlow)}function ar(t){return function(t,e){return!!t&&(void 0!==e?!!Kr(t)&&t[W].values_.has(e):Kr(t)||!!t[W]||Q(t)||Oe(t)||ee(t))}(t)}function sr(t,e,r){return t.set(e,r),r}function nr(t,e){if(null==t||"object"!=typeof t||t instanceof Date||!ar(t))return t;if(Xt(t)||ee(t))return nr(t.get(),e);if(e.has(t))return e.get(t);if(Nr(t)){var i=sr(e,t,new Array(t.length));return t.forEach(function(t,r){i[r]=nr(t,e)}),i}if(Vr(t)){var a=sr(e,t,new Set);return t.forEach(function(t){a.add(nr(t,e))}),a}if(Mr(t)){var s=sr(e,t,new Map);return t.forEach(function(t,r){s.set(r,nr(t,e))}),s}var n=sr(e,t,{});return function(t){if(Kr(t))return t[W].ownKeys_();r(38)}(t).forEach(function(r){l.propertyIsEnumerable.call(t,r)&&(n[r]=nr(t[r],e))}),n}function or(t,e){return nr(t,new Map)}function lr(t,e){void 0===e&&(e=void 0),ye();try{return t.apply(e)}finally{Se()}}function cr(t,e,r){return 1===arguments.length||e&&"object"==typeof e?function(t,e){var r,i,a;if(null!=e&&null!=(r=e.signal)&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var s=new Promise(function(r,s){var n,o=hr(t,r,F({},e,{onError:s}));i=function(){o(),s(new Error("WHEN_CANCELLED"))},a=function(){o(),s(new Error("WHEN_ABORTED"))},null==e||null==(n=e.signal)||null==n.addEventListener||n.addEventListener("abort",a)}).finally(function(){var t;return null==e||null==(t=e.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",a)});return s.cancel=i,s}(t,e):hr(t,e,r||{})}function hr(t,e,r){var i;if("number"==typeof r.timeout){var a=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!n[W].isDisposed){if(n(),!r.onError)throw a;r.onError(a)}},r.timeout)}r.name="When";var s=$t("When-effect",e),n=Ve(function(e){Wt(!1,t)&&(e.dispose(),i&&clearTimeout(i),s())},r);return n}function ur(t){return t[W]}er.bound=z(tr);var dr={has:function(t,e){return ur(t).has_(e)},get:function(t,e){return ur(t).get_(e)},set:function(t,e,r){var i;return!!b(e)&&(null==(i=ur(t).set_(e,r,!0))||i)},deleteProperty:function(t,e){var r;return!!b(e)&&(null==(r=ur(t).delete_(e,!0))||r)},defineProperty:function(t,e,r){var i;return null==(i=ur(t).defineProperty_(e,r))||i},ownKeys:function(t){return ur(t).ownKeys_()},preventExtensions:function(t){r(13)}};function gr(t){return void 0!==t.interceptors_&&t.interceptors_.length>0}function pr(t,e){var r=t.interceptors_||(t.interceptors_=[]);return r.push(e),f(function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)})}function mr(t,e){var i=le();try{for(var a=[].concat(t.interceptors_||[]),s=0,n=a.length;s<n&&((e=a[s](e))&&!e.type&&r(14),e);s++);return e}finally{ce(i)}}function fr(t){return void 0!==t.changeListeners_&&t.changeListeners_.length>0}function _r(t,e){var r=t.changeListeners_||(t.changeListeners_=[]);return r.push(e),f(function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)})}function vr(t,e){var r=le(),i=t.changeListeners_;if(i){for(var a=0,s=(i=i.slice()).length;a<s;a++)i[a](e);ce(r)}}function br(t,e,r){return hi(function(){var i=$r(t,r)[W];null!=e||(e=function(t){return N(t,q)||w(t,q,F({},t[q])),t[q]}(t)),O(e).forEach(function(t){return i.make_(t,e[t])})}),t}var yr="splice",Sr="update",xr={get:function(t,e){var r=t[W];return e===W?r:"length"===e?r.getArrayLength_():"string"!=typeof e||isNaN(e)?N(Tr,e)?Tr[e]:t[e]:r.get_(parseInt(e))},set:function(t,e,r){var i=t[W];return"length"===e&&i.setArrayLength_(r),"symbol"==typeof e||isNaN(e)?t[e]=r:i.set_(parseInt(e),r),!0},preventExtensions:function(){r(15)}},wr=function(){function t(t,e,r,i){void 0===t&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=i,this.atom_=new K(t),this.enhancer_=function(t,r){return e(t,r,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.dehanceValues_=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},e.intercept_=function(t){return pr(this,t)},e.observe_=function(t,e){return void 0===e&&(e=!1),e&&t({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),_r(this,t)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(t){("number"!=typeof t||isNaN(t)||t<0)&&r("Out of range: "+t);var e=this.values_.length;if(t!==e)if(t>e){for(var i=new Array(t-e),a=0;a<t-e;a++)i[a]=void 0;this.spliceWithArray_(e,0,i)}else this.spliceWithArray_(t,e-t)},e.updateArrayLength_=function(t,e){t!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=e,this.legacyMode_&&e>0&&si(t+e+1)},e.spliceWithArray_=function(t,e,r){var i=this;this.atom_;var a=this.values_.length;if(void 0===t?t=0:t>a?t=a:t<0&&(t=Math.max(0,a+t)),e=1===arguments.length?a-t:null==e?0:Math.max(0,Math.min(e,a-t)),void 0===r&&(r=c),gr(this)){var s=mr(this,{object:this.proxy_,type:yr,index:t,removedCount:e,added:r});if(!s)return c;e=s.removedCount,r=s.added}if(r=0===r.length?r:r.map(function(t){return i.enhancer_(t,void 0)}),this.legacyMode_){var n=r.length-e;this.updateArrayLength_(a,n)}var o=this.spliceItemsIntoValues_(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice_(t,r,o),this.dehanceValues_(o)},e.spliceItemsIntoValues_=function(t,e,r){var i;if(r.length<1e4)return(i=this.values_).splice.apply(i,[t,e].concat(r));var a=this.values_.slice(t,t+e),s=this.values_.slice(t+e);this.values_.length+=r.length-e;for(var n=0;n<r.length;n++)this.values_[t+n]=r[n];for(var o=0;o<s.length;o++)this.values_[t+r.length+o]=s[o];return a},e.notifyArrayChildUpdate_=function(t,e,r){var i=!this.owned_&&!1,a=fr(this),s=a||i?{observableKind:"array",object:this.proxy_,type:Sr,debugObjectName:this.atom_.name_,index:t,newValue:e,oldValue:r}:null;this.atom_.reportChanged(),a&&vr(this,s)},e.notifyArraySplice_=function(t,e,r){var i=!this.owned_&&!1,a=fr(this),s=a||i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:yr,index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom_.reportChanged(),a&&vr(this,s)},e.get_=function(t){if(!(this.legacyMode_&&t>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[t]);console.warn("[mobx] Out of bounds read: "+t)},e.set_=function(t,e){var i=this.values_;if(this.legacyMode_&&t>i.length&&r(17,t,i.length),t<i.length){this.atom_;var a=i[t];if(gr(this)){var s=mr(this,{type:Sr,object:this.proxy_,index:t,newValue:e});if(!s)return;e=s.newValue}(e=this.enhancer_(e,a))!==a&&(i[t]=e,this.notifyArrayChildUpdate_(t,e,a))}else{for(var n=new Array(t+1-i.length),o=0;o<n.length-1;o++)n[o]=void 0;n[n.length-1]=e,this.spliceWithArray_(i.length,0,n)}},t}();function Cr(t,e,r,i){return void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),m(),hi(function(){var a=new wr(r,e,i,!1);C(a.values_,W,a);var s=new Proxy(a.values_,xr);return a.proxy_=s,t&&t.length&&a.spliceWithArray_(0,0,t),s})}var Tr={clear:function(){return this.splice(0)},replace:function(t){var e=this[W];return e.spliceWithArray_(0,e.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];var s=this[W];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(t);case 2:return s.spliceWithArray_(t,e)}return s.spliceWithArray_(t,e,i)},spliceWithArray:function(t,e,r){return this[W].spliceWithArray_(t,e,r)},push:function(){for(var t=this[W],e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,r),t.values_.length},pop:function(){return this.splice(Math.max(this[W].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[W],e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.spliceWithArray_(0,0,r),t.values_.length},reverse:function(){return fe.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){fe.trackingDerivation&&r(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var e=this[W],r=e.dehanceValues_(e.values_).indexOf(t);return r>-1&&(this.splice(r,1),!0)}};function kr(t,e){"function"==typeof Array.prototype[t]&&(Tr[t]=e(t))}function jr(t){return function(){var e=this[W];e.atom_.reportObserved();var r=e.dehanceValues_(e.values_);return r[t].apply(r,arguments)}}function Ar(t){return function(e,r){var i=this,a=this[W];return a.atom_.reportObserved(),a.dehanceValues_(a.values_)[t](function(t,a){return e.call(r,t,a,i)})}}function Or(t){return function(){var e=this,r=this[W];r.atom_.reportObserved();var i=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(t,r,i){return a(t,r,i,e)},i[t].apply(i,arguments)}}kr("at",jr),kr("concat",jr),kr("flat",jr),kr("includes",jr),kr("indexOf",jr),kr("join",jr),kr("lastIndexOf",jr),kr("slice",jr),kr("toString",jr),kr("toLocaleString",jr),kr("toSorted",jr),kr("toSpliced",jr),kr("with",jr),kr("every",Ar),kr("filter",Ar),kr("find",Ar),kr("findIndex",Ar),kr("findLast",Ar),kr("findLastIndex",Ar),kr("flatMap",Ar),kr("forEach",Ar),kr("map",Ar),kr("some",Ar),kr("toReversed",Ar),kr("reduce",Or),kr("reduceRight",Or);var Er=T("ObservableArrayAdministration",wr);function Nr(t){return y(t)&&Er(t[W])}var Ir={},Pr="add",Dr="delete",Lr=function(){function t(t,e,i){var a=this;void 0===e&&(e=Z),void 0===i&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[W]=Ir,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=i,v(Map)||r(18),hi(function(){a.keysAtom_=Y("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,t&&a.merge(t)})}var e=t.prototype;return e.has_=function(t){return this.data_.has(t)},e.has=function(t){var e=this;if(!fe.trackingDerivation)return this.has_(t);var r=this.hasMap_.get(t);if(!r){var i=r=new Yt(this.has_(t),J,"ObservableMap.key?",!1);this.hasMap_.set(t,i),Ge(i,function(){return e.hasMap_.delete(t)})}return r.get()},e.set=function(t,e){var r=this.has_(t);if(gr(this)){var i=mr(this,{type:r?Sr:Pr,object:this,newValue:e,name:t});if(!i)return this;e=i.newValue}return r?this.updateValue_(t,e):this.addValue_(t,e),this},e.delete=function(t){var e=this;if(this.keysAtom_,gr(this)&&!mr(this,{type:Dr,object:this,name:t}))return!1;if(this.has_(t)){var r=fr(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:Dr,object:this,oldValue:this.data_.get(t).value_,name:t}:null;return lr(function(){var r;e.keysAtom_.reportChanged(),null==(r=e.hasMap_.get(t))||r.setNewValue_(!1),e.data_.get(t).setNewValue_(void 0),e.data_.delete(t)}),r&&vr(this,i),!0}return!1},e.updateValue_=function(t,e){var r=this.data_.get(t);if((e=r.prepareNewValue_(e))!==fe.UNCHANGED){var i=fr(this),a=i?{observableKind:"map",debugObjectName:this.name_,type:Sr,object:this,oldValue:r.value_,name:t,newValue:e}:null;r.setNewValue_(e),i&&vr(this,a)}},e.addValue_=function(t,e){var r=this;this.keysAtom_,lr(function(){var i,a=new Yt(e,r.enhancer_,"ObservableMap.key",!1);r.data_.set(t,a),e=a.value_,null==(i=r.hasMap_.get(t))||i.setNewValue_(!0),r.keysAtom_.reportChanged()});var i=fr(this),a=i?{observableKind:"map",debugObjectName:this.name_,type:Pr,object:this,name:t,newValue:e}:null;i&&vr(this,a)},e.get=function(t){return this.has(t)?this.dehanceValue_(this.data_.get(t).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var t=this,e=this.keys();return Br({next:function(){var r=e.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:t.get(a)}}})},e.entries=function(){var t=this,e=this.keys();return Br({next:function(){var r=e.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:[a,t.get(a)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(t,e){for(var r,i=R(this);!(r=i()).done;){var a=r.value,s=a[0],n=a[1];t.call(e,n,s,this)}},e.merge=function(t){var e=this;return Mr(t)&&(t=new Map(t)),lr(function(){S(t)?function(t){var e=Object.keys(t);if(!A)return e;var r=Object.getOwnPropertySymbols(t);return r.length?[].concat(e,r.filter(function(e){return l.propertyIsEnumerable.call(t,e)})):e}(t).forEach(function(r){return e.set(r,t[r])}):Array.isArray(t)?t.forEach(function(t){var r=t[0],i=t[1];return e.set(r,i)}):k(t)?(function(t){var e=Object.getPrototypeOf(t),r=Object.getPrototypeOf(e);return null===Object.getPrototypeOf(r)}(t)||r(19,t),t.forEach(function(t,r){return e.set(r,t)})):null!=t&&r(20,t)}),this},e.clear=function(){var t=this;lr(function(){oe(function(){for(var e,r=R(t.keys());!(e=r()).done;){var i=e.value;t.delete(i)}})})},e.replace=function(t){var e=this;return lr(function(){for(var i,a=function(t){if(k(t)||Mr(t))return t;if(Array.isArray(t))return new Map(t);if(S(t)){var e=new Map;for(var i in t)e.set(i,t[i]);return e}return r(21,t)}(t),s=new Map,n=!1,o=R(e.data_.keys());!(i=o()).done;){var l=i.value;if(!a.has(l))if(e.delete(l))n=!0;else{var c=e.data_.get(l);s.set(l,c)}}for(var h,u=R(a.entries());!(h=u()).done;){var d=h.value,g=d[0],p=d[1],m=e.data_.has(g);if(e.set(g,p),e.data_.has(g)){var f=e.data_.get(g);s.set(g,f),m||(n=!0)}}if(!n)if(e.data_.size!==s.size)e.keysAtom_.reportChanged();else for(var _=e.data_.keys(),v=s.keys(),b=_.next(),y=v.next();!b.done;){if(b.value!==y.value){e.keysAtom_.reportChanged();break}b=_.next(),y=v.next()}e.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},B(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Mr=T("ObservableMap",Lr);function Br(t){return t[Symbol.toStringTag]="MapIterator",_i(t)}var Rr={},Fr=function(){function t(t,e,i){var a=this;void 0===e&&(e=Z),void 0===i&&(i="ObservableSet"),this.name_=void 0,this[W]=Rr,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,v(Set)||r(22),this.enhancer_=function(t,r){return e(t,r,i)},hi(function(){a.atom_=Y(a.name_),t&&a.replace(t)})}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.clear=function(){var t=this;lr(function(){oe(function(){for(var e,r=R(t.data_.values());!(e=r()).done;){var i=e.value;t.delete(i)}})})},e.forEach=function(t,e){for(var r,i=R(this);!(r=i()).done;){var a=r.value;t.call(e,a,a,this)}},e.add=function(t){var e=this;if(this.atom_,gr(this)){var r=mr(this,{type:Pr,object:this,newValue:t});if(!r)return this;t=r.newValue}if(!this.has(t)){lr(function(){e.data_.add(e.enhancer_(t,void 0)),e.atom_.reportChanged()});var i=fr(this),a=i?{observableKind:"set",debugObjectName:this.name_,type:Pr,object:this,newValue:t}:null;i&&vr(this,a)}return this},e.delete=function(t){var e=this;if(gr(this)&&!mr(this,{type:Dr,object:this,oldValue:t}))return!1;if(this.has(t)){var r=fr(this),i=r?{observableKind:"set",debugObjectName:this.name_,type:Dr,object:this,oldValue:t}:null;return lr(function(){e.atom_.reportChanged(),e.data_.delete(t)}),r&&vr(this,i),!0}return!1},e.has=function(t){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(t))},e.entries=function(){var t=this.values();return Hr({next:function(){var e=t.next(),r=e.value,i=e.done;return i?{value:void 0,done:i}:{value:[r,r],done:i}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var t=this,e=this.data_.values();return Hr({next:function(){var r=e.next(),i=r.value,a=r.done;return a?{value:void 0,done:a}:{value:t.dehanceValue_(i),done:a}}})},e.intersection=function(t){return j(t)&&!Vr(t)?t.intersection(this):new Set(this).intersection(t)},e.union=function(t){return j(t)&&!Vr(t)?t.union(this):new Set(this).union(t)},e.difference=function(t){return new Set(this).difference(t)},e.symmetricDifference=function(t){return j(t)&&!Vr(t)?t.symmetricDifference(this):new Set(this).symmetricDifference(t)},e.isSubsetOf=function(t){return new Set(this).isSubsetOf(t)},e.isSupersetOf=function(t){return new Set(this).isSupersetOf(t)},e.isDisjointFrom=function(t){return j(t)&&!Vr(t)?t.isDisjointFrom(this):new Set(this).isDisjointFrom(t)},e.replace=function(t){var e=this;return Vr(t)&&(t=new Set(t)),lr(function(){Array.isArray(t)||j(t)?(e.clear(),t.forEach(function(t){return e.add(t)})):null!=t&&r("Cannot initialize set from "+t)}),this},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},B(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Vr=T("ObservableSet",Fr);function Hr(t){return t[Symbol.toStringTag]="SetIterator",_i(t)}var Ur=Object.create(null),qr="remove",zr=function(){function t(t,e,r,i){void 0===e&&(e=new Map),void 0===i&&(i=yt),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=e,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new K("ObservableObject.keys"),this.isPlainObject_=S(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(t){return this.values_.get(t).get()},e.setObservablePropValue_=function(t,e){var r=this.values_.get(t);if(r instanceof Zt)return r.set(e),!0;if(gr(this)){var i=mr(this,{type:Sr,object:this.proxy_||this.target_,name:t,newValue:e});if(!i)return null;e=i.newValue}if((e=r.prepareNewValue_(e))!==fe.UNCHANGED){var a=fr(this),s=a?{type:Sr,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:t,newValue:e}:null;r.setNewValue_(e),a&&vr(this,s)}return!0},e.get_=function(t){return fe.trackingDerivation&&!N(this.target_,t)&&this.has_(t),this.target_[t]},e.set_=function(t,e,r){return void 0===r&&(r=!1),N(this.target_,t)?this.values_.has(t)?this.setObservablePropValue_(t,e):r?Reflect.set(this.target_,t,e):(this.target_[t]=e,!0):this.extend_(t,{value:e,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},e.has_=function(t){if(!fe.trackingDerivation)return t in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var e=this.pendingKeys_.get(t);return e||(e=new Yt(t in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(t,e)),e.get()},e.make_=function(t,e){if(!0===e&&(e=this.defaultAnnotation_),!1!==e){if(!(t in this.target_)){var i;if(null!=(i=this.target_[q])&&i[t])return;r(1,e.annotationType_,this.name_+"."+t.toString())}for(var a=this.target_;a&&a!==l;){var s=n(a,t);if(s){var o=e.make_(this,t,s,a);if(0===o)return;if(1===o)break}a=Object.getPrototypeOf(a)}Qr(this,0,t)}},e.extend_=function(t,e,r,i){if(void 0===i&&(i=!1),!0===r&&(r=this.defaultAnnotation_),!1===r)return this.defineProperty_(t,e,i);var a=r.extend_(this,t,e,i);return a&&Qr(this,0,t),a},e.defineProperty_=function(t,e,r){void 0===r&&(r=!1),this.keysAtom_;try{ye();var i=this.delete_(t);if(!i)return i;if(gr(this)){var a=mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:e.value});if(!a)return null;var s=a.newValue;e.value!==s&&(e=F({},e,{value:s}))}if(r){if(!Reflect.defineProperty(this.target_,t,e))return!1}else o(this.target_,t,e);this.notifyPropertyAddition_(t,e.value)}finally{Se()}return!0},e.defineObservableProperty_=function(t,e,r,i){void 0===i&&(i=!1),this.keysAtom_;try{ye();var a=this.delete_(t);if(!a)return a;if(gr(this)){var s=mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:e});if(!s)return null;e=s.newValue}var n=Wr(t),l={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!0,get:n.get,set:n.set};if(i){if(!Reflect.defineProperty(this.target_,t,l))return!1}else o(this.target_,t,l);var c=new Yt(e,r,"ObservableObject.key",!1);this.values_.set(t,c),this.notifyPropertyAddition_(t,c.value_)}finally{Se()}return!0},e.defineComputedProperty_=function(t,e,r){void 0===r&&(r=!1),this.keysAtom_;try{ye();var i=this.delete_(t);if(!i)return i;if(gr(this)&&!mr(this,{object:this.proxy_||this.target_,name:t,type:Pr,newValue:void 0}))return null;e.name||(e.name="ObservableObject.key"),e.context=this.proxy_||this.target_;var a=Wr(t),s={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!1,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,t,s))return!1}else o(this.target_,t,s);this.values_.set(t,new Zt(e)),this.notifyPropertyAddition_(t,void 0)}finally{Se()}return!0},e.delete_=function(t,e){if(void 0===e&&(e=!1),this.keysAtom_,!N(this.target_,t))return!0;if(gr(this)&&!mr(this,{object:this.proxy_||this.target_,name:t,type:qr}))return null;try{var r;ye();var i,a=fr(this),s=this.values_.get(t),o=void 0;if(!s&&a&&(o=null==(i=n(this.target_,t))?void 0:i.value),e){if(!Reflect.deleteProperty(this.target_,t))return!1}else delete this.target_[t];if(s&&(this.values_.delete(t),s instanceof Yt&&(o=s.value_),we(s)),this.keysAtom_.reportChanged(),null==(r=this.pendingKeys_)||null==(r=r.get(t))||r.set(t in this.target_),a){var l={type:qr,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:o,name:t};a&&vr(this,l)}}finally{Se()}return!0},e.observe_=function(t,e){return _r(this,t)},e.intercept_=function(t){return pr(this,t)},e.notifyPropertyAddition_=function(t,e){var r,i=fr(this);if(i){var a=i?{type:Pr,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:t,newValue:e}:null;i&&vr(this,a)}null==(r=this.pendingKeys_)||null==(r=r.get(t))||r.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),O(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function $r(t,e){var r;if(N(t,W))return t;var i=null!=(r=null==e?void 0:e.name)?r:"ObservableObject",a=new zr(t,new Map,String(i),function(t){var e;return t?null!=(e=t.defaultDecorator)?e:St(t):void 0}(e));return w(t,W,a),t}var Gr=T("ObservableObjectAdministration",zr);function Wr(t){return Ur[t]||(Ur[t]={get:function(){return this[W].getObservablePropValue_(t)},set:function(e){return this[W].setObservablePropValue_(t,e)}})}function Kr(t){return!!y(t)&&Gr(t[W])}function Qr(t,e,r){var i;null==(i=t.target_[q])||delete i[r]}var Yr,Xr,Zr=ii(0),Jr=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,!1===t}(),ti=0,ei=function(){};Yr=ei,Xr=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Yr.prototype,Xr):void 0!==Yr.prototype.__proto__?Yr.prototype.__proto__=Xr:Yr.prototype=Xr;var ri=function(t){function e(e,r,i,a){var s;return void 0===i&&(i="ObservableArray"),void 0===a&&(a=!1),s=t.call(this)||this,hi(function(){var t=new wr(i,r,a,!0);t.proxy_=s,C(s,W,t),e&&e.length&&s.spliceWithArray(0,0,e),Jr&&Object.defineProperty(s,"0",Zr)}),s}V(e,t);var r=e.prototype;return r.concat=function(){this[W].atom_.reportObserved();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Array.prototype.concat.apply(this.slice(),e.map(function(t){return Nr(t)?t.slice():t}))},r[Symbol.iterator]=function(){var t=this,e=0;return _i({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})},B(e,[{key:"length",get:function(){return this[W].getArrayLength_()},set:function(t){this[W].setArrayLength_(t)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(ei);function ii(t){return{enumerable:!1,configurable:!0,get:function(){return this[W].get_(t)},set:function(e){this[W].set_(t,e)}}}function ai(t){o(ri.prototype,""+t,ii(t))}function si(t){if(t>ti){for(var e=ti;e<t+100;e++)ai(e);ti=t}}function ni(t,e,r){return new ri(t,e,r)}function oi(t,e){if("object"==typeof t&&null!==t){if(Nr(t))return void 0!==e&&r(23),t[W].atom_;if(Vr(t))return t.atom_;if(Mr(t)){if(void 0===e)return t.keysAtom_;var i=t.data_.get(e)||t.hasMap_.get(e);return i||r(25,e,ci(t)),i}if(Kr(t)){if(!e)return r(26);var a=t[W].values_.get(e);return a||r(27,e,ci(t)),a}if(Q(t)||ee(t)||Oe(t))return t}else if(v(t)&&Oe(t[W]))return t[W];r(28)}function li(t,e){return t||r(29),void 0!==e?li(oi(t,e)):Q(t)||ee(t)||Oe(t)||Mr(t)||Vr(t)?t:t[W]?t[W]:void r(24,t)}function ci(t,e){var r;if(void 0!==e)r=oi(t,e);else{if(Fe(t))return t.name;r=Kr(t)||Mr(t)||Vr(t)?li(t):oi(t)}return r.name_}function hi(t){var e=le(),r=Kt(!0);ye();try{return t()}finally{Se(),Qt(r),ce(e)}}Object.entries(Tr).forEach(function(t){var e=t[0],r=t[1];"concat"!==e&&w(ri.prototype,e,r)}),si(1e3);var ui,di=l.toString;function gi(t,e,r){return void 0===r&&(r=-1),pi(t,e,r)}function pi(t,e,r,i,a){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var s=typeof t;if("function"!==s&&"object"!==s&&"object"!=typeof e)return!1;var n=di.call(t);if(n!==di.call(e))return!1;switch(n){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0===+t?1/+t==1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=mi(t),e=mi(e);var o="[object Array]"===n;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var l=t.constructor,c=e.constructor;if(l!==c&&!(v(l)&&l instanceof l&&v(c)&&c instanceof c)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),a=a||[];for(var h=(i=i||[]).length;h--;)if(i[h]===t)return a[h]===e;if(i.push(t),a.push(e),o){if((h=t.length)!==e.length)return!1;for(;h--;)if(!pi(t[h],e[h],r-1,i,a))return!1}else{var u=Object.keys(t),d=u.length;if(Object.keys(e).length!==d)return!1;for(var g=0;g<d;g++){var p=u[g];if(!N(e,p)||!pi(t[p],e[p],r-1,i,a))return!1}}return i.pop(),a.pop(),!0}function mi(t){return Nr(t)?t.slice():k(t)||Mr(t)||j(t)||Vr(t)?Array.from(t.entries()):t}var fi=(null==(ui=a().Iterator)?void 0:ui.prototype)||{};function _i(t){return t[Symbol.iterator]=vi,Object.assign(Object.create(fi),t)}function vi(){return this}["Symbol","Map","Set"].forEach(function(t){void 0===a()[t]&&r("MobX requires global '"+t+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:ci},$mobx:W});var bi=h(809),yi=h.n(bi);if(!bi.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!br)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var Si=h(4511),xi=h.n(Si);function wi(t){t()}function Ci(t){return Ye(oi(t,e));var e}var Ti,ki,ji=function(){function t(t){var e=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(t){void 0===t&&(t=1e4),clearTimeout(e.sweepTimeout),e.sweepTimeout=void 0;var r=Date.now();e.registrations.forEach(function(i,a){r-i.registeredAt>=t&&(e.finalize(i.value),e.registrations.delete(a))}),e.registrations.size>0&&e.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){e.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e,r){this.registrations.set(r,{value:e,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),t}(),Ai=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:ji)(function(t){var e;null===(e=t.reaction)||void 0===e||e.dispose(),t.reaction=null}),Oi=h(1673);function Ei(t){t.reaction=new Ce("observer".concat(t.name),function(){var e;t.stateVersion=Symbol(),null===(e=t.onStoreChange)||void 0===e||e.call(t)})}var Ni="function"==typeof Symbol&&Symbol.for,Ii=null!==(ki=null===(Ti=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===Ti?void 0:Ti.configurable)&&void 0!==ki&&ki,Pi=Ni?Symbol.for("react.forward_ref"):"function"==typeof bi.forwardRef&&(0,bi.forwardRef)(function(t){return null}).$$typeof,Di=Ni?Symbol.for("react.memo"):"function"==typeof bi.memo&&(0,bi.memo)(function(t){return null}).$$typeof;function Li(t,e){var r;if(Di&&t.$$typeof===Di)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var i=null!==(r=null==e?void 0:e.forwardRef)&&void 0!==r&&r,a=t,s=t.displayName||t.name;if(Pi&&t.$$typeof===Pi&&(i=!0,"function"!=typeof(a=t.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var n,o,l=function(t,e){return function(t,e){void 0===e&&(e="observed");var r=yi().useRef(null);if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:e,subscribe:function(t){return Ai.unregister(i),i.onStoreChange=t,i.reaction||(Ei(i),i.stateVersion=Symbol()),function(){var t;i.onStoreChange=null,null===(t=i.reaction)||void 0===t||t.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};r.current=i}var a,s,n=r.current;if(n.reaction||(Ei(n),Ai.register(r,n,n)),yi().useDebugValue(n.reaction,Ci),(0,Oi.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot),n.reaction.track(function(){try{a=t()}catch(t){s=t}}),s)throw s;return a}(function(){return a(t,e)},s)};return l.displayName=t.displayName,Ii&&Object.defineProperty(l,"name",{value:t.name,writable:!0,configurable:!0}),t.contextTypes&&(l.contextTypes=t.contextTypes),i&&(l=(0,bi.forwardRef)(l)),l=(0,bi.memo)(l),n=t,o=l,Object.keys(n).forEach(function(t){Mi[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))}),l}var Mi={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Bi(t=null){let e,r;const i=new Promise((t,i)=>{e=t,r=i});return i.resolve=t=>{i.isPending=!1,e(t)},i.reject=t=>{i.isPending=!1,r(t)},i.data=t,i}!function(t){t||(t=wi),Qe({reactionScheduler:t})}(Si.unstable_batchedUpdates),Ai.finalizeAllImmediately;var Ri=h(12),Fi=h.n(Ri);function Vi(t){const e=localStorage.getItem(t);if(null!==e)try{return JSON.parse(e)}catch(t){return}}function Hi(t){try{return JSON.parse(t)}catch(t){return}}function Ui(t,e){const r=JSON.stringify(e);localStorage.setItem(t,r)}function qi(t,e){return"string"==typeof t?t:t.toFixed(e)}const zi=t=>{const{market_display_name:e,submarket_display_name:r,subgroup:i}=t||{};if(!e)return"";const a=e.replace(" ","_"),s=r.replace(" ","_");return i&&"none"!==i?`${a}-${i}-${s}`.toLowerCase():`${a}-${s}`.toLowerCase()},$i=(t,e)=>{const r=e.find(e=>e.items.some(e=>e.interval===t)),i=r?.items?.find(e=>e.interval===t)?.num,a=1===i?r?.single:r?.plural;return a?`${i} ${a}`:""},Gi=()=>-1!==navigator.userAgent.indexOf("Firefox")&&-1===navigator.userAgent.indexOf("Seamonkey"),Wi=()=>-1!==navigator.userAgent.indexOf("Safari")&&!navigator.userAgent.match(/Chrome|Chromium/i);function Ki(t,e,r,i){const a=new Blob([e],{type:r});if(navigator.msSaveBlob)return void navigator.msSaveBlob(a,t);const s="image/png;"===r?e:URL.createObjectURL(a),n=document.createElement("a");if(void 0!==n.download)return n.setAttribute("href",s),n.setAttribute("download",t),n.style.visibility="hidden",document.body.appendChild(n),n.click(),void document.body?.removeChild?.(n);if(i)if("image/png;"===r)i.document.write(`<iframe src="${s}" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>`);else{const t=e.split("\n");for(let e=0;e<t.length;e++)i.document.write(`${t[e]}<br/>`)}}function Qi(t){return t.getTime()/1e3-60*t.getTimezoneOffset()|0}function Yi(t){return new Date(1e3*t).toISOString().substring(0,19)}function Xi(t){const e=t/1e3;if(e<=0)return null;const r=t=>`0${t}`.slice(-2),i=r(Math.trunc(e%60)),a=r(Math.trunc(e/60%60));let s=Math.trunc(e/3600%24);return s=s?`${s}:`:"",`${s}${a}:${i}`}function Zi(t,e=t=>t){const r=[],i={...t,data:r};if(t.hasSubcategory){for(const i of t.data)if("data"in i){const t=[],a={...i,data:t};for(const r of i.data)t.push(e(r));r.push(a)}}else for(const i of t.data)r.push(e(i));return i}Object.freeze({GREEN:"#4bb4b3",ORANGE:"#ff6444"});const Ji=Object.freeze({UP:"UP",DOWN:"DOWN"}),ta={doubleExponential:"DEMA",exponential:"EMA",hull:"HMA",simple:"MA",timeSeries:"TSMA",triangular:"TMA",tripleExponential:"TEMA",variable:"VMA",weighted:"WMA",wellesWilder:"SMMA",zeroLag:"ZMA"},ea={open:"O",high:"H",close:"C",low:"L","Hl/2":"Hl/2","HlC/3":"Hlc/3","HlCC/4":"Hlcc/4","OHlC/4":"Ohlc/4"},ra=(t,e=[])=>{const r=e.filter(t=>["movingAverageType","maType","fieldType"].includes(t.path||"")||["number","switch"].includes(t.type)).map(t=>"movingAverageType"===t.path||"maType"===t.path?ta[t.value]:"fieldType"===t.path?ea[t.value]:"switch"===t.type?t.value?"Y":"N":t.value||t.defaultValue).join(",")||void 0;return{name:(i=t.replace(`(${r})`,"").replace("-"," "),(i.charAt(0).toUpperCase()+i.slice(1)).replace(/([a-z](?=[A-Z]))/g,"$1 ")).trim(),bars:r};var i},ia=(t,e)=>{if(t.length>e){let r=t;const i=Math.floor(t.length/e);for(let t=1;t<=i;t++)r=`${r.slice(0,e*t)} ${r.slice(e*t,r.length)}`;return r}return t},aa=(t,e,r)=>(t=t??0)*(1-r)+(e=e??0)*r,sa=(t,e)=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return"light"===e&&"#FFFFFF"===t?"#000000":"dark"===e&&"#000000"===t?"#FFFFFF":t;if(oa(t)){const r=t;Object.keys(t).forEach(t=>{r[t]=sa(r[t],e)})}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=sa(t[r],e);return t},na=t=>{let e;if(null==t||"object"!=typeof t)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let r=0,i=t.length;r<i;r++)e[r]=na(t[r]);return e}if(t instanceof Object){e={};for(const r in t)t.hasOwnProperty(r)&&(e[r]=na(t[r]));return e}throw t},oa=function(t){return!!t&&t.constructor===Object};function la(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ca{set zIndex(t){this._line&&t&&(this._line.style.zIndex=t.toString())}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){la(this,"__top",0),la(this,"_emitter",void 0),la(this,"_line",void 0),la(this,"_priceConstrainer",0),la(this,"_startDragPrice","0"),la(this,"className",void 0),la(this,"hideBarrierLine",void 0),la(this,"hideOffscreenLine",void 0),la(this,"mainStore",void 0),la(this,"opacityOnOverlap",0),la(this,"showOffscreenArrows",!1),la(this,"_relative",!1),la(this,"draggable",!0),la(this,"isDragging",!1),la(this,"visible",!0),la(this,"_price","0"),la(this,"_dragPrice","0"),la(this,"offScreen",!1),la(this,"title",void 0),la(this,"isOverlapping",!1),la(this,"isOverlappingWithPriceLine",!1),la(this,"offScreenDirection",null),la(this,"disposeDrawReaction",void 0),la(this,"onChartLoaded",()=>{this.disposeDrawReaction=qe(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds,this.mainStore.chart.lastQuote],()=>{this.isDragging||this._draw()}),this.mainStore.chartAdapter.painter.registerCallback(this.drawBarrier)}),la(this,"init",()=>{const t=(t,e)=>{this.visible&&this.draggable&&e.call(this,t)},e=document.querySelector(".ciq-chart-area");this._line&&e&&((t,e,{onDragStart:r,onDrag:i,onDragReleased:a})=>{t.addEventListener("mousedown",function(t){window.addEventListener("mousemove",n),e.addEventListener("mouseup",o),s=!0,r?.(t)});let s=!1;function n(t){s&&i?.(t)}function o(t){s=!1,a?.(t),window.removeEventListener("mousemove",n),e.removeEventListener("mouseup",o)}})(this._line,e,{onDragStart:e=>t(e,this._startDrag),onDrag:r=>t(r,t=>this._dragLine(t,e)),onDragReleased:e=>t(e,this._endDrag)})}),la(this,"_startDrag",()=>{this.isDragging=!0,this.mainStore.chart.isBarrierDragging=!0,this.dragPrice=this.price,this._startDragPrice=this._price}),la(this,"_dragLine",(t,e)=>{if(!this._line)return;const{top:r}=e.getBoundingClientRect(),i=t.pageY-r,a=i&&i+2;let s=a&&this._priceFromLocation(a);"function"==typeof this._priceConstrainer&&(s=this._priceConstrainer(s)),this.relative&&(s-=this.mainStore.chart.currentClose),this.dragPrice=`${s}`}),la(this,"_endDrag",()=>{this.isDragging=!1,this.mainStore.chart.isBarrierDragging=!1,Number(this._startDragPrice).toFixed(this.pip)!==Number(this.dragPrice).toFixed(this.pip)&&(this.price=this.dragPrice,this._emitter.emit(ca.EVENT_DRAG_RELEASED,this._price))}),la(this,"_calculateTop",t=>{if(null===this.mainStore.chart.currentCloseQuote()||!this.mainStore.chartAdapter.isChartLoaded)return;let e=this._locationFromPrice(t||+this.realPrice);const r=window.flutterChartElement?.clientHeight||0;return e<0?(e<-2&&(this.offScreenDirection=Ji.UP),e=0):e+4>r?(e+4-r>2&&(this.offScreenDirection=Ji.DOWN),e=r-4):this.offScreenDirection=null,this.offScreen=!!this.offScreenDirection,e+30>r?e=r-30:e<10&&(e=10),this.offScreenDirection&&this.showOffscreenArrows&&(e+=this.offScreenDirection===Ji.UP?41:-41),this.opacityOnOverlap&&(this.isOverlapping=this.overlapCheck(e)),this.isOverlappingWithPriceLine=this._distanceFromCurrentPrice()<25,0|Math.round(e)}),la(this,"_draw",()=>{this.visible&&this._line&&(this.top=this._calculateTop())}),br(this,{_dragPrice:Mt,_price:Mt,draggable:Mt,isDragging:Mt,isOverlapping:Mt,isOverlappingWithPriceLine:Mt,offScreen:Mt,offScreenDirection:Mt,title:Mt,visible:Mt,overlappedBarrierWidth:Vt,pip:Vt,priceDisplay:Vt,_calculateTop:Be.bound,_dragLine:Be.bound,_endDrag:Be.bound,_startDrag:Be.bound,drawBarrier:Be.bound,setDragLine:Be.bound}),this.mainStore=t,this._emitter=new(Fi())({emitDelay:0}),cr(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded)}drawBarrier(t){if(this.isDragging)return;const e=this.mainStore.chart.feed?.quotes;if(!e||e.length<2)return;const r=this._getPrice(e[e.length-1].Close),i=this._getPrice(e[e.length-2].Close),a=aa(i,r,t);this.top=this._calculateTop(a)}destructor(){this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this.drawBarrier)}static get EVENT_PRICE_CHANGED(){return"EVENT_PRICE_CHANGED"}static get EVENT_DRAG_RELEASED(){return"EVENT_DRAG_RELEASED"}get priceDisplay(){let t=this.isDragging?Number(this.dragPrice).toFixed(this.pip):this._price;return this.relative&&+this._price>0&&"+"!==t[0]&&(t=`+${t}`),t}get price(){return this._price}set price(t){t===this._price||this.isDragging||(this._price=t,this._draw(),this._emitter.emit(ca.EVENT_PRICE_CHANGED,this._price))}get dragPrice(){return this._dragPrice}set dragPrice(t){t!=this._dragPrice&&(this._dragPrice=t,this._draw(),this._emitter.emit(ca.EVENT_PRICE_CHANGED,this._dragPrice))}get relative(){return this._relative}set relative(t){if(this._relative===t)return;this._relative=t;const e=this.mainStore.chart.currentCloseQuote();let r=e?e.Close:0;this._relative&&(r=-r),this.price=(+this._price+r).toString()}get context(){return this.mainStore.chart.context}set priceConstrainer(t){this._priceConstrainer=t}get realPrice(){return this._getPrice(this.mainStore.chart.currentCloseQuote()?.Close).toString()}get priceLineWidth(){return window.flutterChart?.app.getCurrentTickWidth()||60}get overlappedBarrierWidth(){return 16}_getPrice(t){const e=this.isDragging?this.dragPrice:this.price;return this.relative?t+Number(e):Number(e)}setDragLine(t){this._line=t,this._line&&this._draw()}_locationFromPrice(t){return this.mainStore.chartAdapter.getYFromQuote(t)}_priceFromLocation(t){return this.mainStore.chartAdapter.getQuoteFromY(t)}_distanceFromCurrentPrice(){return Math.abs(this._locationFromPrice(+this.realPrice)-this._locationFromPrice(+this.realPrice-(this.isDragging?+this._dragPrice:+this._price)))}set top(t){this.__top=t,this._line&&(this._line.style.transform=`translateY(${this.top-13}px)`)}get top(){return this.__top}onPriceChanged(t){this._emitter.on(ca.EVENT_PRICE_CHANGED,t)}onDragReleased(t){this._emitter.on(ca.EVENT_DRAG_RELEASED,t)}overlapCheck(t){const{_barriers:e}=this.mainStore.chart,r=e.filter(t=>0!==+t._high_barrier.price),i=r.findIndex(t=>t._high_barrier===this);for(let e=0;e<r.length;e++){if(e===i)continue;const a=r[e],s=a._high_barrier.top&&Math.abs(a._high_barrier.top-t);if(s&&s<25)return!0}return!1}get isMobile(){return this.mainStore.chart.isMobile}}function ha(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ua{constructor(t){ha(this,"_div",null),ha(this,"className",""),ha(this,"visible",!1),ha(this,"setPosition",({top:t,bottom:e,right:r})=>{if(this._div){let i=null;e&&t?i=`translate(${-r}px, ${(e+t)/2+60}px) scale(1, ${(e-t)/120})`:e?i=`translate(${-r}px, ${e}px)`:t&&(i=`translate(${-r}px, ${t+120}px)`),this._div.style.transform=i}}),ha(this,"setShadeRef",t=>{this._div=t}),br(this,{className:Mt,visible:Mt}),this.className=t}}function da(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class pa{static get SHADE_NONE_SINGLE(){return"SHADE_NONE_SINGLE"}static get SHADE_NONE_DOUBLE(){return"SHADE_NONE_DOUBLE"}static get SHADE_ABOVE(){return"SHADE_ABOVE"}static get SHADE_BELOW(){return"SHADE_BELOW"}static get SHADE_BETWEEN(){return"SHADE_BETWEEN"}static get SHADE_OUTSIDE(){return"SHADE_OUTSIDE"}static get BARRIER_CHANGED(){return"BARRIER_CHANGED"}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){da(this,"_high_barrier",void 0),da(this,"_low_barrier",void 0),da(this,"aboveShadeStore",void 0),da(this,"belowShadeStore",void 0),da(this,"betweenShadeStore",void 0),da(this,"mainStore",void 0),da(this,"title",void 0),da(this,"shadeColor",void 0),da(this,"color",void 0),da(this,"foregroundColor",void 0),da(this,"backgroundColor",void 0),da(this,"isBetweenShadeVisible",!1),da(this,"isTopShadeVisible",!1),da(this,"isBottomShadeVisible",!1),da(this,"hidePriceLines",!1),da(this,"lineStyle",void 0),da(this,"isInitialized",!1),da(this,"initializePromise",Bi()),da(this,"hideBarrierLine",!1),da(this,"hideOffscreenLine",!1),da(this,"hideOffscreenBarrier",!1),da(this,"isSingleBarrier",!1),da(this,"_shadeState",""),da(this,"disposeDrawReaction",void 0),da(this,"onChartLoaded",()=>{this.init(),this.disposeDrawReaction=qe(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds],this._drawShadedArea),this.mainStore.chartAdapter.painter.registerCallback(this._drawShadedArea)}),da(this,"_onBarrierChange",null),da(this,"_fireOnBarrierChange",()=>{const t=this._high_barrier.visible?Number(this._high_barrier.price).toFixed(this.pip):void 0,e=this._low_barrier.visible?Number(this._low_barrier.price).toFixed(this.pip):void 0;"function"==typeof this._onBarrierChange&&this._onBarrierChange({high:t,low:e})}),da(this,"_drawShadedArea",()=>{if(this.isInitialized&&(this._shadeState===pa.SHADE_ABOVE?this._shadeAbove():this._shadeState===pa.SHADE_BELOW?this._shadeBelow():this._shadeState===pa.SHADE_BETWEEN?this._shadeBetween():this._shadeState===pa.SHADE_OUTSIDE&&this._shadeOutside(),this._low_barrier.visible&&this._isBarriersOffScreen())){const t=0===this._high_barrier.top?null:101;this._high_barrier.zIndex=t}}),br(this,{backgroundColor:Mt,color:Mt,destructor:Be.bound,foregroundColor:Mt,hideBarrierLine:Mt,hideOffscreenBarrier:Mt,hideOffscreenLine:Mt,hidePriceLines:Mt,init:Be.bound,initializePromise:Mt,isBetweenShadeVisible:Mt,isBottomShadeVisible:Mt,isInitialized:Mt,isSingleBarrier:Mt,isTopShadeVisible:Mt,lineStyle:Mt,pip:Vt,shadeColor:Mt,updateProps:Be.bound}),this.mainStore=t,this._high_barrier=new ca(this.mainStore),this._low_barrier=new ca(this.mainStore),this._high_barrier.onPriceChanged(this._drawShadedArea),this._low_barrier.onPriceChanged(this._drawShadedArea),this._high_barrier.onDragReleased(this._fireOnBarrierChange),this._low_barrier.onDragReleased(this._fireOnBarrierChange),this._setupConstrainBarrierPrices(),this.aboveShadeStore=new ua("top-shade"),this.betweenShadeStore=new ua("between-shade"),this.belowShadeStore=new ua("bottom-shade"),this.shadeState=pa.SHADE_NONE_SINGLE,cr(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded),this.mainStore.chart._barriers.push(this)}init(){this.isInitialized=!0,this.initializePromise.resolve()}updateProps({color:t,foregroundColor:e,backgroundColor:r,shadeColor:i,shade:a,high:s,low:n,relative:o,draggable:l,onChange:c,hideBarrierLine:h,hideOffscreenBarrier:u,hideOffscreenLine:d,hidePriceLines:g,lineStyle:p,title:m,showOffscreenArrows:f,isSingleBarrier:_,opacityOnOverlap:v}){this.initializePromise.then(Be(()=>{if(t&&(this.color=t),e&&(this.foregroundColor=e),void 0!==r&&(this.backgroundColor=r),i&&(this.shadeColor=i),a&&(this.shadeState=`SHADE_${a}`.toUpperCase()),void 0!==o&&(this.relative=o),void 0!==l&&(this.draggable=l),void 0!==s){const t=qi(s,this.pip);t!==this.high_barrier&&(this.high_barrier=t)}if(void 0!==n){const t=qi(n,this.pip);t!==this.low_barrier&&(this.low_barrier=t)}c&&(this.onBarrierChange=c),m&&(this.title=m),this.lineStyle=p,this.hideBarrierLine=!!h,this.hidePriceLines=!!g,this.hideOffscreenLine=!!d,this.hideOffscreenBarrier=!!u,this.isSingleBarrier=!!_})),v&&(this.opacityOnOverlap=v),f&&(this.showOffscreenArrows=f)}destructor(){if(!this.context)return;this._high_barrier.destructor(),this._low_barrier.destructor(),this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this._drawShadedArea);const t=this.mainStore.chart._barriers.findIndex(t=>t===this);-1!==t&&this.mainStore.chart._barriers.splice(t,1)}get high_barrier(){return this._high_barrier.price}set high_barrier(t){this._high_barrier.price=t}get low_barrier(){return this._low_barrier.price}set low_barrier(t){this._low_barrier.price=t}_setupConstrainBarrierPrices(){this._high_barrier.priceConstrainer=t=>+(this._low_barrier.visible&&t<+this._low_barrier.realPrice?this._high_barrier.realPrice:t),this._low_barrier.priceConstrainer=t=>+(t>+this._high_barrier.realPrice?this._low_barrier.realPrice:t)}get context(){return this.mainStore.chart.context}set onBarrierChange(t){this._onBarrierChange!==t&&(this._onBarrierChange=t)}get shadeState(){return this._shadeState}set shadeState(t){if(this._shadeState===t)return;if(this._shadeState=t,this._shadeState===pa.SHADE_NONE_SINGLE||this._shadeState===pa.SHADE_NONE_DOUBLE)this.aboveShadeStore.visible=!1,this.betweenShadeStore.visible=!1,this.belowShadeStore.visible=!1;else{const t=this._shadeState===pa.SHADE_ABOVE||this._shadeState===pa.SHADE_OUTSIDE,e=this._shadeState===pa.SHADE_BELOW||this._shadeState===pa.SHADE_OUTSIDE,r=this._shadeState===pa.SHADE_BETWEEN;this.aboveShadeStore.visible=t,this.betweenShadeStore.visible=r,this.belowShadeStore.visible=e,this._drawShadedArea()}const e=this._shadeState===pa.SHADE_OUTSIDE||this._shadeState===pa.SHADE_BETWEEN||this._shadeState===pa.SHADE_NONE_DOUBLE,r=this._low_barrier.visible;this._low_barrier.visible=e,this.isInitialized&&e&&!r&&this._low_barrier.realPrice>=this._high_barrier.realPrice&&this.mainStore.chart.currentClose&&(this._low_barrier.price=(+this._high_barrier.price-this.mainStore.chart.currentClose).toString())}get relative(){return this._high_barrier.relative}set relative(t){this._high_barrier.relative=t,this._low_barrier.relative=t}get draggable(){return this._high_barrier.draggable}set draggable(t){this._high_barrier.draggable=t,this._low_barrier.draggable=t}get showOffscreenArrows(){return this._high_barrier.showOffscreenArrows}set showOffscreenArrows(t){this._high_barrier.showOffscreenArrows=t}get opacityOnOverlap(){return this._high_barrier.opacityOnOverlap}set opacityOnOverlap(t){this._high_barrier.opacityOnOverlap=t}_isBarriersOffScreen(){return this._high_barrier.offScreen&&this._low_barrier.offScreen}_shadeBetween(){this.betweenShadeStore.setPosition({top:this._high_barrier.top,bottom:this._low_barrier.top,right:this.mainStore.chart.yAxisWidth})}_shadeBelow(t=this._high_barrier){this.belowShadeStore.setPosition({top:t.top,bottom:0,right:this.mainStore.chart.yAxisWidth})}_shadeAbove(t=this._high_barrier){this.aboveShadeStore.setPosition({top:0,bottom:t.top,right:this.mainStore.chart.yAxisWidth})}_shadeOutside(){this._shadeAbove(this._high_barrier),this._shadeBelow(this._low_barrier)}}function ma(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class fa{get context(){return this.mainStore.chart.context}get state(){return this.mainStore.state}constructor(t){ma(this,"mainStore",void 0),ma(this,"bottom",30),ma(this,"isReadyToShow",!1),ma(this,"mainChartHeight",0),ma(this,"totalHeight",0),ma(this,"initial",()=>{this.isReadyToShow=!0}),ma(this,"updateChartHeight",async()=>{setTimeout(()=>{if(!this.mainStore.chart.chartContainerHeight)return;const t=this.mainStore.chartAdapter,{bottomQuote:e}=t.quoteBounds,r=t.getYFromQuote(e),i=this.mainStore.chart.chartContainerHeight-r;this.bottom=this.mainStore.chartAdapter.isFeedLoaded&&i>80?i:30},300)}),br(this,{bottom:Mt,isReadyToShow:Mt,mainChartHeight:Mt,totalHeight:Mt,updateChartHeight:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.initial)}}h(7951);var _a=h(7739),va=h.n(_a),ba=h(2979),ya=h.n(ba),Sa=h(6057),xa=h.n(Sa),wa=h(9955),Ca=h.n(wa),Ta=h(242),ka=h.n(Ta),ja=h(267),Aa=h.n(ja),Oa=h(4542),Ea=h.n(Oa),Na=h(363),Ia=h.n(Na),Pa=h(1811),Da=h.n(Pa),La=h(5439),Ma=h.n(La),Ba=h(6240),Ra=h.n(Ba),Fa=h(1337),Va=h.n(Fa),Ha=h(5829),Ua=h.n(Ha),qa=h(4619),za=h.n(qa),$a=h(2910),Ga=h.n($a),Wa=h(7420),Ka=h.n(Wa),Qa=h(7885),Ya=h.n(Qa),Xa=h(9185),Za=h.n(Xa),Ja=h(9289),ts=h.n(Ja),es=h(204),rs=h.n(es),is=h(3365),as=h.n(is),ss=h(3031),ns=h.n(ss),os=h(9324),ls=h.n(os),cs=h(9625),hs=h.n(cs),us=h(5833),ds=h.n(us),gs=h(7463),ps=h.n(gs),ms=h(3211),fs=h.n(ms),_s=h(9707),vs=h.n(_s),bs=h(4629),ys=h.n(bs),Ss=h(6331),xs=h.n(Ss),ws=h(1891),Cs=h.n(ws),Ts=h(8983),ks=h.n(Ts),js=h(8093),As=h.n(js),Os=h(8927),Es=h.n(Os),Ns=h(6667),Is=h.n(Ns),Ps=h(1278),Ds=h.n(Ps),Ls=h(1288),Ms=h.n(Ls),Bs=h(8310),Rs=h.n(Bs),Fs=h(7528),Vs=h.n(Fs),Hs=h(2999),Us=h.n(Hs),qs=h(6456),zs=h.n(qs),$s=h(3522),Gs=h.n($s),Ws=h(6380),Ks=h.n(Ws),Qs=h(9317),Ys=h.n(Qs),Xs=h(6800),Zs=h.n(Xs),Js=h(4333),tn=h.n(Js),en=h(9411),rn=h.n(en),an=h(9307),sn=h.n(an),nn=h(4674),on=h.n(nn),ln=h(6432),cn=h.n(ln),hn=h(2327),un=h.n(hn),dn=h(6183),gn=h.n(dn),pn=h(4497),mn=h.n(pn),fn=h(4325),_n=h.n(fn),vn=h(1320),bn=h.n(vn),yn=h(8250),Sn=h.n(yn),xn=h(1041),wn=h.n(xn),Cn=h(3293),Tn=h.n(Cn),kn=h(3775),jn=h.n(kn),An=h(1561),On=h.n(An),En=h(1610),Nn=h.n(En),In=h(9429),Pn=h.n(In),Dn=h(8584),Ln=h.n(Dn),Mn=h(7521),Bn=h.n(Mn),Rn=h(4185),Fn=h.n(Rn),Vn=h(6776),Hn=h.n(Vn),Un=h(9129),qn=h.n(Un),zn=h(7249),$n=h.n(zn),Gn=h(9607),Wn=h.n(Gn),Kn=h(9564),Qn=h.n(Kn),Yn=h(4431),Xn=h.n(Yn),Zn=h(263),Jn=h.n(Zn),to=h(301),eo=h.n(to),ro=h(7414),io=h.n(ro),ao=h(3578),so=h.n(ao),no=h(3255),oo=h.n(no),lo=h(7625),co=h.n(lo),ho=h(3719),uo=h.n(ho),go=h(1445),po=h.n(go),mo=h(4056),fo=h.n(mo),_o=h(1477),vo=h.n(_o),bo=h(3332),yo=h.n(bo),So=h(6902),xo=h.n(So),wo=h(9702),Co=h.n(wo),To=h(1649),ko=h.n(To),jo=h(1229),Ao=h.n(jo),Oo=h(2607),Eo=h.n(Oo),No=h(7558),Io=h.n(No),Po=h(8901),Do=h.n(Po),Lo=h(5407),Mo=h.n(Lo),Bo=h(4236),Ro=h.n(Bo),Fo=h(1795),Vo=h.n(Fo),Ho=h(7428),Uo=h.n(Ho),qo=h(8217),zo=h.n(qo),$o=h(7038),Go=h.n($o),Wo=h(1069),Ko=h.n(Wo),Qo=h(1089),Yo=h.n(Qo),Xo=h(6226),Zo=h.n(Xo),Jo=h(5357),tl=h.n(Jo),el=h(451),rl=h.n(el),il=h(8457),al=h.n(il),sl=h(2620),nl=h.n(sl),ol=h(3179),ll=h.n(ol),cl=h(37),hl=h.n(cl),ul=h(7256),dl=h.n(ul),gl=h(5004),pl=h.n(gl),ml=h(5729),fl=h.n(ml),_l=h(9876),vl=h.n(_l),bl=h(3135),yl=h.n(bl),Sl=h(7451),xl=h.n(Sl),wl=h(9705),Cl=h.n(wl),Tl=h(3770),kl=h.n(Tl),jl=h(6681),Al=h.n(jl),Ol=h(3785),El=h.n(Ol),Nl=h(8341),Il=h.n(Nl),Pl=h(4298),Dl=h.n(Pl),Ll=h(638),Ml=h.n(Ll),Bl=h(194),Rl=h.n(Bl),Fl=h(718),Vl=h.n(Fl),Hl=h(3864),Ul=h.n(Hl),ql=h(2502),zl=h.n(ql),$l=h(6723),Gl=h.n($l),Wl=h(1449),Kl=h.n(Wl),Ql=h(9715),Yl=h.n(Ql),Xl=h(5704),Zl=h.n(Xl),Jl=h(4046),tc=h.n(Jl),ec=h(10),rc=h.n(ec),ic=h(1008),ac=h.n(ic),sc=h(3292),nc=h.n(sc),oc=h(4579),lc=h.n(oc),cc=h(7571),hc=h.n(cc),uc=h(6033),dc=h.n(uc),gc=h(2099),pc=h.n(gc),mc=h(6489),fc=h.n(mc),_c=h(2821),vc=h.n(_c),bc=h(7213),yc=h.n(bc),Sc=h(1553),xc=h.n(Sc),wc=h(1085),Cc=h.n(wc),Tc=h(3751),kc=h.n(Tc),jc=h(148),Ac=h.n(jc),Oc=h(3562),Ec=h.n(Oc),Nc=h(7358),Ic=h.n(Nc),Pc=h(3425),Dc=h.n(Pc),Lc=h(2188),Mc=h.n(Lc),Bc=h(2839),Rc=h.n(Bc),Fc=h(3010),Vc=h.n(Fc),Hc=h(5269),Uc=h.n(Hc),qc=h(3265),zc=h.n(qc),$c=h(2853),Gc=h.n($c),Wc=h(3257),Kc=h.n(Wc),Qc=h(2167),Yc=h.n(Qc),Xc=h(4005),Zc=h.n(Xc),Jc=h(6617),th=h.n(Jc),eh=h(2048),rh=h.n(eh),ih=h(8438),ah=h.n(ih),sh=h(7950),nh=h.n(sh),oh=h(2788),lh=h.n(oh),ch=h(7183),hh=h.n(ch),uh=h(3344),dh=h.n(uh),gh=h(3297),ph=h.n(gh),mh=h(2913),fh=h.n(mh),_h=h(4748),vh=h.n(_h),bh=h(2588),yh=h.n(bh),Sh=h(2049),xh=h.n(Sh),wh=h(4065),Ch=h.n(wh),Th=h(9671),kh=h.n(Th),jh=h(1071),Ah=h.n(jh),Oh=h(5187),Eh=h.n(Oh),Nh=h(7823),Ih=h.n(Nh),Ph=h(2405),Dh=h.n(Ph),Lh=h(8832),Mh=h.n(Lh),Bh=h(5317),Rh=h.n(Bh),Fh=h(6669),Vh=h.n(Fh),Hh=h(7764),Uh=h.n(Hh),qh=h(542),zh=h.n(qh),$h=h(3119),Gh=h.n($h),Wh=h(6552),Kh=h.n(Wh),Qh=h(5092),Yh=h.n(Qh),Xh=h(794),Zh=h.n(Xh),Jh=h(2092),tu=h.n(Jh),eu=h(3669),ru=h.n(eu),iu=h(3747),au=h.n(iu),su=h(6244),nu=h.n(su),ou=h(1345),lu=h.n(ou),cu=h(1593),hu=h.n(cu),uu=h(2532),du=h.n(uu),gu=h(5038),pu=h.n(gu),mu=h(1655),fu=h.n(mu),_u=h(9891),vu=h.n(_u),bu=h(8451),yu=h.n(bu),Su=h(6378),xu=h.n(Su),wu=h(963),Cu=h.n(wu),Tu=h(3893),ku=h.n(Tu),ju=h(9423),Au=h.n(ju),Ou=h(416),Eu=h.n(Ou),Nu=h(3273),Iu=h.n(Nu),Pu=h(8414),Du=h.n(Pu),Lu=h(1949),Mu=h.n(Lu),Bu=h(1722),Ru=h.n(Bu),Fu=h(135),Vu=h.n(Fu),Hu=h(3544),Uu=h.n(Hu),qu=h(6577),zu=h.n(qu),$u=h(5126),Gu=h.n($u),Wu=h(3235),Ku=h.n(Wu),Qu=h(5692),Yu=h.n(Qu),Xu=h(6583),Zu=h.n(Xu),Ju=h(7037),td=h.n(Ju),ed=h(4575),rd=h.n(ed),id=h(3800),ad=h.n(id),sd=h(1908),nd=h.n(sd),od=h(9149),ld=h.n(od),cd=h(1077),hd=h.n(cd),ud=h(155),dd=h.n(ud),gd=h(9424),pd=h.n(gd),md=h(9442),fd=h.n(md),_d=h(9080),vd=h.n(_d),bd=h(3417),yd=h.n(bd),Sd=h(7709),xd=h.n(Sd),wd=h(6661),Cd=h.n(wd),Td=h(1904),kd=h.n(Td),jd=h(1108),Ad=h.n(jd),Od=h(1270),Ed=h.n(Od),Nd=h(2421),Id=h.n(Nd),Pd=h(5976),Dd=h.n(Pd),Ld=h(3982),Md=h.n(Ld),Bd=h(1820),Rd=h.n(Bd),Fd=h(6537),Vd=h.n(Fd),Hd=h(5459),Ud=h.n(Hd),qd=h(5),zd=h.n(qd),$d=h(3821),Gd=h.n($d),Wd=h(8246),Kd=h.n(Wd),Qd=h(3163),Yd=h.n(Qd),Xd=h(9877),Zd=h.n(Xd),Jd=h(3576),tg=h.n(Jd),eg=h(6706),rg=h.n(eg),ig=h(7365),ag=h.n(ig),sg=h(4311),ng=h.n(sg),og=h(3385),lg=h.n(og),cg=h(7425),hg=h.n(cg),ug=h(1134),dg=h.n(ug),gg=h(2308),pg=h.n(gg),mg=h(5477),fg=h.n(mg),_g=h(7671);const vg=t=>e=>{let{className:r,"tooltip-title":i,...a}=e;r=`ic-icon ${r||""}`;const s=t.viewBox?.split(" ").slice(2)||[];return(0,_g.jsxs)("span",{className:r,"tooltip-title":i,...a,children:[(0,_g.jsx)("svg",{width:s[0],height:s[1],children:(0,_g.jsx)("use",{xlinkHref:h.p+t.url})}),i&&(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)("br",{}),(0,_g.jsx)("span",{className:"ic-subtitle",children:i})]})]})},bg=(vg(gn()),vg(Cu())),yg=vg(ku()),Sg=vg(mn()),xg=vg(Ds()),wg=vg(Tn()),Cg=(vg(va()),vg(ya()),vg(xa()),vg(Ca()),vg(ka()),vg(Aa()),vg(Ea()),vg(Da()),vg(Ia()),vg(Ma()),vg(Ra()),vg(Va()),vg(Ua()),vg(Ga()),vg(ts())),Tg=vg(Za()),kg=vg(rs()),jg=vg(as()),Ag=vg(ns()),Og=vg(ls()),Eg=(vg(hs()),vg(ds()),vg(ps())),Ng=vg(fs()),Ig=vg(vs()),Pg=(vg(ys()),vg(xs()),vg(Sn())),Dg=(vg(Cs()),vg(ks())),Lg=(vg(za()),vg(Ka())),Mg=vg(Ya()),Bg=(vg(As()),vg(wn())),Rg=(vg(Es()),vg(Is())),Fg=vg(tn()),Vg=(vg(rn()),vg(rn())),Hg=vg(sn()),Ug=vg(As()),qg=vg(_n()),zg=vg(bn()),$g=(vg(Pn()),vg(du())),Gg=(vg(on()),vg(cn()),vg(un())),Wg=vg(Ln()),Kg=vg(Bn()),Qg=vg(Fn()),Yg=vg(Hn()),Xg=vg(pu()),Zg=vg(fu()),Jg=vg(vu()),tp=vg(yu()),ep=vg(xu()),rp=vg(qn()),ip=vg($n()),ap=vg(Wn()),sp=vg(Qn()),np=vg(Xn()),op=vg(Jn()),lp=vg(eo()),cp=vg(io()),hp=vg(Zu()),up=vg(td()),dp=vg(rd()),gp=vg(ad()),pp=vg(nd()),mp=vg(ld()),fp=vg(hd()),_p=vg(dd()),vp=(vg(pd()),vg(fd())),bp=vg(vd()),yp=vg(yd()),Sp=vg(xd()),xp=vg(Cd()),wp=vg(kd()),Cp=vg(Ad()),Tp=vg(Ed()),kp=vg(Id()),jp=vg(Dd()),Ap=vg(Md()),Op=vg(Rd()),Ep=vg(Vd()),Np=vg(Ud()),Ip=vg(zd()),Pp=vg(Gd()),Dp=vg(Kd()),Lp=vg(Yd()),Mp=vg(Zd()),Bp=vg(Il()),Rp=vg(lu()),Fp=vg(hu()),Vp=vg(so()),Hp=vg(oo()),Up=(vg(tg()),vg(rg()),vg(ag()),vg(ng())),qp=vg(lg()),zp=(vg(hg()),vg(dg()),vg(pg()),vg(fg())),$p=(vg(Pn()),vg(Nn()),vg(jn()),vg(On()),vg(co())),Gp={active:vg(Ds()),commodities:vg(Rs()),cryptocurrency:vg(Ms()),favorite:vg(As()),forex:vg(Vs()),basket_index:vg(Us()),indices:vg(Gs()),stocks:vg(Ks()),volidx:vg(Zs()),synthetic_index:vg(Ys()),indicators:vg(Sn())},Wp={light:{normal:vg(Au()),active:vg(Eu())},dark:{normal:vg(Iu()),active:vg(Du())}},Kp={light:{normal:vg(Mu()),active:vg(Ru())},dark:{normal:vg(Vu()),active:vg(Uu())}},Qp={light:{normal:vg(zu()),active:vg(Gu())},dark:{normal:vg(Ku()),active:vg(Yu())}},Yp={AUD:vg(uo()),CAD:vg(po()),CHF:vg(fo()),EUR:vg(vo()),GBP:vg(yo()),JPY:vg(xo()),MXN:vg(Co()),NOK:vg(ko()),NZD:vg(Ao()),PLN:vg(Eo()),SEK:vg(Io()),USD:vg(Do()),XAU:vg(Mo()),HongKong:vg(vl()),Dutch:vg(xl()),German:vg(fl()),French:vg(yl()),Spanish:vg(Cl()),WallStreet:vg(kl())},Xp={USD:vg(Do()),GBP:vg(yo()),German:vg(fl()),French:vg(yl()),Russia:vg(Ro()),Arabic:vg(Vo()),Bangladesh:vg(Uo()),Cambodia:vg(zo()),Srilanka:vg(Go()),Mongolian:vg(Ko()),Kenya:vg(Yo()),Thailand:vg(Zo()),Turkey:vg(tl()),Indonesia:vg(rl()),Vietnam:vg(al()),Italy:vg(nl()),Korean:vg(ll()),Portugal:vg(hl()),Chinese:vg(dl()),ChineseTraditional:vg(pl()),Poland:vg(Eo()),Spanish:vg(Cl()),Uzbekistan:vg(Al())},Zp={SPC:Yp.USD,AS51:Yp.AUD,HSI:Yp.HongKong,N225:Yp.JPY,AEX:Yp.Dutch,FCHI:Yp.French,SSMI:Yp.CHF,GDAXI:Yp.German,frxBROUSD:vg(El()),frxXAUUSD:Bp,frxXPDUSD:Bp,frxXPTUSD:Bp,frxXAGUSD:Bp,R_10:vg(Dl()),R_25:vg(Ml()),R_50:vg(Rl()),R_75:vg(Vl()),R_100:vg(Ul()),"1HZ10V":vg(zl()),"1HZ25V":vg(Gl()),"1HZ50V":vg(Kl()),"1HZ75V":vg(Yl()),"1HZ100V":vg(Zl()),"1HZ150V":vg(tc()),"1HZ200V":vg(rc()),"1HZ250V":vg(ac()),"1HZ300V":vg(nc()),BOOM300N:vg(vc()),BOOM500:vg(yc()),BOOM600:vg(xc()),BOOM900:vg(Cc()),BOOM1000:vg(kc()),CRASH300N:vg(lc()),CRASH500:vg(hc()),CRASH600:vg(dc()),CRASH900:vg(pc()),CRASH1000:vg(fc()),RDBEAR:vg(Ac()),RDBULL:vg(Ec()),stpRNG:vg(Ic()),stpRNG2:vg(Dc()),stpRNG3:vg(Mc()),stpRNG4:vg(Rc()),stpRNG5:vg(Vc()),JD10:vg(Uc()),JD25:vg(zc()),JD50:vg(Gc()),JD75:vg(Kc()),JD100:vg(Yc()),JD150:vg(Zc()),JD200:vg(th()),cryBNBUSD:vg(rh()),cryBTCLTC:vg(ah()),cryIOTUSD:vg(nh()),cryNEOUSD:vg(lh()),cryOMGUSD:vg(hh()),cryTRXUSD:vg(dh()),cryBTCETH:vg(yh()),cryZECUSD:vg(vh()),cryXMRUSD:vg(fh()),cryXLMUSD:vg(ph()),cryDSHUSD:vg(xh()),cryETHUSD:vg(Ch()),cryBCHUSD:vg(kh()),cryLTCUSD:vg(Ah()),cryEOSUSD:vg(Eh()),cryXRPUSD:vg(Ih()),cryBTCUSD:vg(Dh()),OTC_AEX:vg(Gh()),OTC_FTSE:vg(Uh()),OTC_SX5E:vg(ru()),OTC_FCHI:vg(tu()),OTC_GDAXI:vg(Zh()),OTC_N225:vg(Kh()),OTC_SPC:vg(Mh()),OTC_DJI:vg(Vh()),OTC_NDX:vg(Rh()),OTC_SSMI:vg(zh()),OTC_HSI:vg(Yh()),OTC_AS51:vg(au())},Jp=(t,e,r)=>i=>{const{className:a,...s}=i;return(0,_g.jsxs)("span",{className:`${r} ${a}`,...s,children:[(0,_g.jsx)(t,{}),(0,_g.jsx)(e,{})]})};function tm(t,e){const r=Yp[t],i=Yp[e];Zp[`frx${t}${e}`]=Jp(r,i,"ic-frx")}vg(nu());const em=vg(zs());function rm(t){const e=Yp[t];Zp[`WLD${t}`]=Jp(em,e,"ic-wld")}rm("AUD"),rm("EUR"),rm("GBP"),rm("USD"),rm("XAU"),tm("AUD","JPY"),tm("AUD","USD"),tm("EUR","AUD"),tm("EUR","CHF"),tm("EUR","JPY"),tm("EUR","CAD"),tm("EUR","GBP"),tm("EUR","USD"),tm("GBP","AUD"),tm("GBP","JPY"),tm("GBP","USD"),tm("USD","CAD"),tm("USD","CHF"),tm("USD","JPY"),tm("AUD","CAD"),tm("AUD","CHF"),tm("AUD","NZD"),tm("AUD","PLN"),tm("EUR","NZD"),tm("GBP","CAD"),tm("GBP","CHF"),tm("GBP","NOK"),tm("GBP","NZD"),tm("GBP","PLN"),tm("NZD","JPY"),tm("NZD","USD"),tm("USD","MXN"),tm("USD","NOK"),tm("USD","PLN"),tm("USD","SEK");var im=h(9160).t;const am=()=>({horizontal:{id:"horizontal",text:im.translate("Horizontal line [num]"),icon:Up},line:{id:"line",text:im.translate("Trend line [num]"),icon:qp},vertical:{id:"vertical",text:im.translate("Vertical line [num]"),icon:zp}}),sm=()=>[{category:"momentum",name:im.translate("Momentum"),icon:hp,items:[{flutter_chart_id:"AwesomeOscillator",name:im.translate("Awesome Oscillator"),short_name:im.translate("Awesome"),description:im.translate("The Awesome Oscillator is an indicator used to measure market momentum. AO calculates the difference of a 34 Period and 5 Period Simple Moving Averages. The Simple Moving Averages that are used are not calculated using closing price but rather each bar's midpoints. AO is generally used to affirm trends or to anticipate possible reversals."),icon:fp,isPrediction:!0},{flutter_chart_id:"dpo",name:im.translate("Detrended Price Oscillator"),short_name:im.translate("Detrended"),description:im.translate("The Detrended Price Oscillator (DPO) helps to identify price cycles without the influence of short- and long-term trends. The DPO compares a simple moving average to a historical pricenear the middle of a specified period. It also shows the peaks and drops over that particular period, making it easier to predict buy points."),icon:_p},{flutter_chart_id:"macd",name:im.translate("MACD"),short_name:im.translate("MACD"),description:im.translate("MACD is a trading indicator used in technical analysis of stock prices. It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price."),icon:vp},{flutter_chart_id:"ROC",name:im.translate("Price Rate of Change"),short_name:im.translate("Price ROC"),description:im.translate("The Price Rate-of-Change (ROC) indicator displays the difference between the current price and the price x-time periods ago. The difference can be displayed in either points or as a percentage."),icon:bp},{flutter_chart_id:"RSI",name:im.translate("Relative Strength Index (RSI)"),short_name:im.translate("RSI"),description:im.translate("The Relative Strength Index (RSI) was published by J. Welles Wilder. The current price is normalized as a percentage between 0 and 100. The name of this oscillator is misleading because it does not compare the instrument relative to another instrument or set of instruments, but rather represents the current price relative to other recent prices within the selected lookback window length."),icon:yp},{flutter_chart_id:"StochasticOscillator",name:im.translate("Stochastic Oscillator"),short_name:im.translate("Stochastic"),description:im.translate("A technical momentum indicator that compares a security's closing price to its price range over a given time period. The oscillator's sensitivity to market movements can be reduced by adjusting the time period or by taking a moving average of the result."),icon:Sp,isPrediction:!0},{flutter_chart_id:"SMI",name:im.translate("Stochastic Momentum Index"),short_name:im.translate("Stch Mtm"),description:im.translate("The Stochastic Momentum Index (SMI) helps to identify overbought or oversold conditions in the market and to predict bearish or bullish trends. It calculates the distance between the current closing price and the median of the high/low range, and displays 2 lines on the chart: the first (known as %K) represents the price movement while the second (known as %D) is a moving average of the first line. If the closing price is higher than the median of the high/low range, the SMI returns a positive value. If the closing price is lower than the average price, a negative value is returned. Values above 40 indicate a bullish trend while values below -40 indicate a bearish trend."),icon:xp},{flutter_chart_id:"WilliamsR",name:im.translate("William's Percent Range"),short_name:im.translate("William's %R"),description:im.translate("Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period."),icon:wp,isPrediction:!0}]},{category:"trend",name:im.translate("Trend"),icon:up,items:[{flutter_chart_id:"Aroon",name:im.translate("Aroon"),short_name:im.translate("Aroon"),description:im.translate("Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low."),icon:Cp},{flutter_chart_id:"adx",name:im.translate("ADX/DMS"),short_name:im.translate("ADX"),description:im.translate("The Average Directional Movement Index index (ADX) was developed in 1978 by J. Welles Wilder as an indicator of trend strength in a series of prices of a financial instrument ADX will range between 0 and 100. Generally, ADX readings below 20 indicate trend weakness, and readings above 40 indicate trend strength."),icon:Tp,isPrediction:!0},{flutter_chart_id:"commodity_channel_index",name:im.translate("Commodity Channel Index"),short_name:im.translate("CCI"),description:im.translate("The Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions."),icon:kp,isPrediction:!0},{flutter_chart_id:"ichimoku",name:im.translate("Ichimoku Clouds"),short_name:im.translate("Ichimoku Clouds"),description:im.translate("The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals. Ichimoku Kinko Hyo translates into “one look equilibrium chart”."),icon:jp,isPrediction:!0},{flutter_chart_id:"ParabolicSAR",name:im.translate("Parabolic SAR"),short_name:im.translate("PSAR"),description:im.translate("The parabolic SAR is calculated almost independently for each trend in the price. When the price is in an uptrend, the SAR emerges below the price and converges upwards towards it. Similarly, on a downtrend, the SAR emerges above the price and converges downwards. At each step within a trend, the SAR is calculated one period in advance."),icon:Ap,isPrediction:!0},{flutter_chart_id:"zigzag",name:im.translate("Zig Zag"),short_name:im.translate("Zig Zag"),description:im.translate("Zig Zag helps to identify trend reversals and filters out relatively small price movements by determining the support and resistance levels of the market. It accepts a percentage of deviation as the input and displays a line if the price change is larger than the percentage of deviation. Zig Zag ignores any sideways movement and is useful to filter out “market noise”."),icon:Op,isPrediction:!0}]},{category:"volatility",name:im.translate("Volatility"),icon:gp,items:[{flutter_chart_id:"bollinger_bands",name:im.translate("Bollinger Bands"),short_name:im.translate("Bollinger Bands"),description:im.translate("Bollinger Bands can be used to measure the highness or lowness of the price relative to previous trades."),icon:Ep},{flutter_chart_id:"donchian_channel",name:im.translate("Donchian Channel"),short_name:im.translate("Donchian Channel"),description:im.translate("The Donchian Channel is an indicator used in market trading developed by Richard Donchian. It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen."),icon:Np,isPrediction:!0}]},{category:"moving-averages",name:im.translate("Moving averages"),icon:pp,items:[{flutter_chart_id:"moving_average",name:im.translate("Moving Average (MA)"),short_name:im.translate("MA"),description:im.translate("The Moving Average (MA) helps to identify the overall market trend by filtering out short-term price fluctuations. Using historical data, it calculates the average price over a specific period and plots a line on the chart. If the MA line moves upwards, it’s an indicator of an uptrend, a downtrend if it moves downwards. A buy signal occurs when the price moves above the MA line."),icon:Ip},{flutter_chart_id:"moving_envelope_average",name:im.translate("Moving Average Envelope"),short_name:im.translate("MA Env"),description:im.translate("The Moving Average Envelope (MAE) helps to identify strong price movement that indicates the start of a trend. The MAE creates a moving average line as well as 2 bands around it. In theory, when the market price touches the upper or lower bands, a trend reversal will occur, indicating a buy signal."),icon:Pp,isPrediction:!0},{flutter_chart_id:"rainbow",name:im.translate("Rainbow Moving Average"),short_name:im.translate("Rainbow MA"),description:im.translate("The Rainbow Moving Average (RMA) displays several moving average lines simultaneously. When the lines intersect, it’s an indicator of price reversal and the angle of the lines are helpful to predict the trend strength. The steeper the curve, the stronger the trend. When the price crosses the moving average lines from below, it signals an upward trend. When the price crosses the moving average lines from above, it signals a downward trend. The RMA is easier to use compared to using several different moving average indicators at once."),icon:Mp,isPrediction:!0}]},{category:"others",name:im.translate("Others"),icon:mp,items:[{flutter_chart_id:"alligator",name:im.translate("Alligator"),short_name:im.translate("Alligator"),description:im.translate("Bill Williams introduced the Alligator indicator in 1995. The Alligator is as much a metaphor as it is an indicator. It consists of three lines, overlaid on a pricing chart, that represent the jaw, the teeth and the lips of the beast, and was created to help the trader confirm the presence of a trend and its direction. The Alligator indicator can also help traders designate impulse and corrective wave formations, but the tool works best when combined with a momentum indicator."),icon:Dp,isPrediction:!0},{flutter_chart_id:"fcb",name:im.translate("Fractal Chaos Band"),short_name:im.translate("Fractal Chaos Band"),description:im.translate("Fractals are indicators on candlestick charts that identify reversal points in the market. Traders often use fractals to get an idea about the direction in which the price will develop. A fractal will form when a particular price pattern happens on a chart."),icon:Lp,isPrediction:!0}]}],nm={thickness:1,hasArea:!1},om=(na(nm),()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"enableLabel",title:im.translate("Axis Label"),type:"switch",category:"parameters",defaultValue:!0}]})),lm=()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),cm=()=>({config:{lineStyle:na(nm),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillStyle",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),hm={vertical:om,line:lm,ray:lm,trend:cm,channel:cm,fibfan:cm,rectangle:cm,horizontal:om,continuous:lm},um=()=>({open:im.translate("Open"),high:im.translate("High"),low:im.translate("Low"),close:im.translate("Close"),"Hl/2":im.translate("Hl/2"),"HlC/3":im.translate("Hlc/3"),"HlCC/4":im.translate("Hlcc/4"),"OHlC/4":im.translate("Ohlc/4")}),dm=()=>({simple:im.translate("Simple"),exponential:im.translate("Exponential"),weighted:im.translate("Weighted"),hull:im.translate("Hull"),zeroLag:im.translate("Zero Lag"),timeSeries:im.translate("Time Series"),wellesWilder:im.translate("Welles Wilder"),variable:im.translate("Variable"),triangular:im.translate("Triangular"),doubleExponential:im.translate("2-Exponential"),tripleExponential:im.translate("3-Exponential")}),gm={RSI:()=>({config:{lineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pinLabels:!1,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),adx:()=>({config:{lineStyle:na(nm),positiveLineStyle:na(nm),negativeLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"positiveLineStyle.color",title:im.translate("+DI"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"negativeLineStyle.color",title:im.translate("-DI"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:im.translate("Positive Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Negative Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"smoothingPeriod",title:im.translate("Smoothing Period"),defaultValue:14,category:"inputs",type:"number"},{path:"showSeries",title:im.translate("Series"),type:"switch",category:"parameters",defaultValue:!0},{path:"showShading",title:im.translate("Shading"),type:"switch",category:"parameters",defaultValue:!1},{path:"showHistogram",title:im.translate("Histogram"),type:"switch",category:"parameters",defaultValue:!1}]}),AwesomeOscillator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"}]}),dpo:()=>({config:{lineStyle:na(nm),isCentered:!0,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"movingAverageType",title:im.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()}]}),gator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"jawPeriod",title:im.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:im.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:im.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:im.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:im.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:im.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"}]}),macd:()=>({config:{lineStyle:na(nm),signalLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"signalLineStyle.color",title:im.translate("Signal"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:im.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:im.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"fastMAPeriod",title:im.translate("Fast MA Period"),defaultValue:12,category:"inputs",type:"number"},{path:"slowMAPeriod",title:im.translate("Slow MA Period"),defaultValue:26,category:"inputs",type:"number"},{path:"signalPeriod",title:im.translate("Signal Period"),defaultValue:9,category:"inputs",type:"number"}]}),ROC:()=>({config:{lineStyle:na(nm),pipSize:4,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()}]}),StochasticOscillator:()=>({config:{lineStyle:{...na(nm),color:"#FFFFFF"},fastLineStyle:na(nm),slowLineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pinLabels:!1,overBoughtPrice:80,overSoldPrice:20,pipSize:2,showLastIndicator:!0},parameters:[{path:"fastLineStyle.color",title:im.translate("Fast"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"slowLineStyle.color",title:im.translate("Slow"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"isSmooth",title:im.translate("Smooth"),type:"switch",category:"parameters",defaultValue:!0},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),SMI:()=>({config:{lineStyle:na(nm),signalLineStyle:na(nm),pipSize:2,showLastIndicator:!0,smiOscillatorLimits:{overboughtStyle:{...na(nm),color:"#626b73"},oversoldStyle:{...na(nm),color:"#626b73"}}},parameters:[{path:"lineStyle.color",group_key:"%k",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",group_key:"%k",title:im.translate("Period"),defaultValue:10,category:"inputs",type:"number"},{path:"smoothingPeriod",group_key:"%k",title:im.translate("Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"doubleSmoothingPeriod",group_key:"%k",title:im.translate("Double Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"signalLineStyle.color",group_key:"%d",title:im.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"signalPeriod",group_key:"%d",title:im.translate("Signal Period"),defaultValue:10,category:"inputs",type:"number"},{path:"maType",group_key:"%d",title:im.translate("Field"),defaultValue:"exponential",category:"inputs",type:"select",options:dm()},{paths:{value:"smiOscillatorLimits.overboughtValue",color:"smiOscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:40,color:"#626b73"}},{paths:{value:"smiOscillatorLimits.oversoldValue",color:"smiOscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-40,color:"#626b73"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),WilliamsR:()=>({config:{lineStyle:na(nm),zeroHorizontalLinesStyle:{...na(nm),color:"0xFFF44336"},oscillatorLimits:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{paths:{value:"oscillatorLimits.overboughtValue",color:"oscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-20,color:"#000000"}},{paths:{value:"oscillatorLimits.oversoldValue",color:"oscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-80,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),Aroon:()=>({config:{upLineStyle:na(nm),downLineStyle:na(nm),pipSize:2,showLastIndicator:!0},parameters:[{path:"upLineStyle.color",title:im.translate("Aroon Up"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"downLineStyle.color",title:im.translate("Aroon Down"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:14,category:"inputs",type:"number"}]}),commodity_channel_index:()=>({config:{lineStyle:na(nm),oscillatorLinesConfig:{overboughtStyle:na(nm),oversoldStyle:na(nm)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:im.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:100,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:im.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-100,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:im.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),ichimoku:()=>({config:{conversionLineStyle:na(nm),baseLineStyle:na(nm),spanALineStyle:na(nm),laggingLineStyle:na(nm),spanBLineStyle:na(nm),conversionLinePeriod:na(nm),showLastIndicator:!0},parameters:[{path:"conversionLineStyle.color",title:im.translate("Conversion Line"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"baseLineStyle.color",title:im.translate("Base Line"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"spanALineStyle.color",title:im.translate("Leading Span A"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"spanBLineStyle.color",title:im.translate("Leading Span B"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"laggingLineStyle.color",title:im.translate("Lagging Span"),defaultValue:"#808000",category:"inputs",type:"colorpicker"},{path:"conversionLinePeriod",title:im.translate("Conversion Line Period"),defaultValue:9,category:"inputs",type:"number"},{path:"baseLinePeriod",title:im.translate("Base Line Period"),defaultValue:26,category:"inputs",type:"number"},{path:"spanBPeriod",title:im.translate("Leading Span B Period"),defaultValue:52,category:"inputs",type:"number"},{path:"laggingSpanOffset",title:im.translate("Lagging Span Period"),defaultValue:-26,category:"inputs",type:"number",min:-100,max:0}]}),ParabolicSAR:()=>({config:{scatterStyle:{radius:1.5},showLastIndicator:!0},parameters:[{path:"scatterStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"minAccelerationFactor",title:im.translate("Minimum AF"),defaultValue:.02,category:"inputs",type:"number",step:.01},{path:"maxAccelerationFactor",title:im.translate("Maximum AF"),defaultValue:.2,category:"inputs",type:"number",step:.01}]}),zigzag:()=>({config:{lineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"distance",title:im.translate("Distance(%)"),defaultValue:10,category:"inputs",type:"number"}]}),bollinger_bands:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("Bollinger Bands Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("Bollinger Bands Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("Bollinger Bands Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"standardDeviation",title:im.translate("Standard Deviations"),defaultValue:2,category:"inputs",type:"number"},{path:"movingAverageType",title:im.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),donchian_channel:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("Donchian High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("Donchian Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("Donchian Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"highPeriod",title:im.translate("High Period"),defaultValue:20,category:"inputs",type:"number"},{path:"lowPeriod",title:im.translate("Low Period"),defaultValue:20,category:"inputs",type:"number"},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),moving_average:()=>({config:{lineStyle:na(nm),isOverlay:!0,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:im.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"movingAverageType",title:im.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"offset",title:im.translate("Offset"),defaultValue:0,category:"inputs",type:"number"}]}),moving_envelope_average:()=>({config:{upperLineStyle:na(nm),middleLineStyle:na(nm),lowerLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:im.translate("MA Env Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:im.translate("MA Env Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:im.translate("MA Env Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:im.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"shiftType",title:im.translate("Shift Type"),defaultValue:"percent",category:"inputs",type:"select",options:{percent:im.translate("Percent"),point:im.translate("Point")}},{path:"shift",title:im.translate("Shift"),defaultValue:5,category:"inputs",type:"number"},{path:"movingAverageType",title:im.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:dm()},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),rainbow:()=>({config:{bandsCount:10,movingAverageType:"simple",rainbowLineStyles:[],showLastIndicator:!0},parameters:[{path:"period",title:im.translate("Period"),defaultValue:2,category:"inputs",type:"number"},{path:"fieldType",title:im.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:um()},{path:"rainbowLineStyles[0].color",title:im.translate("SMA1"),defaultValue:"#ff0000",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[1].color",title:im.translate("SMA2"),defaultValue:"#ff7f00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[2].color",title:im.translate("SMA3"),defaultValue:"#ffff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[3].color",title:im.translate("SMA4"),defaultValue:"#7fff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[4].color",title:im.translate("SMA5"),defaultValue:"#00ff7f",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[5].color",title:im.translate("SMA6"),defaultValue:"#00ffff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[6].color",title:im.translate("SMA7"),defaultValue:"#007fff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[7].color",title:im.translate("SMA8"),defaultValue:"#0000ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[8].color",title:im.translate("SMA9"),defaultValue:"#7f00ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[9].color",title:im.translate("SMA10"),defaultValue:"#ff00ff",category:"inputs",type:"colorpicker"}]}),alligator:()=>({config:{jawLineStyle:na(nm),teethLineStyle:na(nm),lipsLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"jawLineStyle.color",title:im.translate("Jaw"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"teethLineStyle.color",title:im.translate("Teeth"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lipsLineStyle.color",title:im.translate("Lips"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"showLines",title:im.translate("Show Lines"),type:"switch",category:"parameters",defaultValue:!0},{path:"jawPeriod",title:im.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:im.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:im.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:im.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:im.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:im.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"},{path:"showFractal",title:im.translate("Show Fractals"),type:"switch",category:"parameters",defaultValue:!1}]}),fcb:()=>({config:{highLineStyle:na(nm),lowLineStyle:na(nm),showLastIndicator:!0},parameters:[{path:"highLineStyle.color",title:im.translate("Fractal High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowLineStyle.color",title:im.translate("Fractal Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:im.translate("Fractal Channel"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"showChannelFill",title:im.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]})},pm=t=>gm[t](),mm=[{id:"line",text:im.translate("Area"),candleOnly:!1,icon:rp},{id:"candles",text:im.translate("Candle"),candleOnly:!0,icon:ip},{id:"hollow",text:im.translate("Hollow"),candleOnly:!0,icon:ap},{id:"ohlc",text:im.translate("OHLC"),candleOnly:!0,icon:sp}],fm=[{key:"tick",single:im.translate("tick"),items:[{interval:0,num:1}]},{key:"minute",single:im.translate("minute"),plural:im.translate("minutes"),items:[{interval:60,num:1},{interval:120,num:2},{interval:180,num:3},{interval:300,num:5},{interval:600,num:10},{interval:900,num:15},{interval:1800,num:30}]},{key:"hour",single:im.translate("hour"),plural:im.translate("hours"),items:[{interval:3600,num:1},{interval:7200,num:2},{interval:14400,num:4},{interval:28800,num:8}]},{key:"day",single:im.translate("day"),plural:im.translate("days"),items:[{interval:86400,num:1}]}],_m=[{key:"en",name:"English",icon:(0,_g.jsx)(Xp.GBP,{})},{key:"bn",name:"বাংলা",icon:(0,_g.jsx)(Xp.Bangladesh,{})},{key:"de",name:"Deutsch",icon:(0,_g.jsx)(Xp.German,{})},{key:"ar",name:"العربية",icon:(0,_g.jsx)(Xp.Arabic,{})},{key:"fr",name:"French",icon:(0,_g.jsx)(Xp.French,{})},{key:"mn",name:"Монгол",icon:(0,_g.jsx)(Xp.Mongolian,{})},{key:"ru",name:"Русский",icon:(0,_g.jsx)(Xp.Russia,{})},{key:"si",name:"සිංහල",icon:(0,_g.jsx)(Xp.Srilanka,{})},{key:"sw",name:"Kiswahili",icon:(0,_g.jsx)(Xp.Kenya,{})},{key:"th",name:"Thai",icon:(0,_g.jsx)(Xp.Thailand,{})},{key:"id",name:"Indonesia",icon:(0,_g.jsx)(Xp.Indonesia,{})},{key:"vi",name:"Tiếng Việt",icon:(0,_g.jsx)(Xp.Vietnam,{})},{key:"it",name:"Italiano",icon:(0,_g.jsx)(Xp.Italy,{})},{key:"km",name:"ខ្មែរ",icon:(0,_g.jsx)(Xp.Cambodia,{})},{key:"ko",name:"한국어",icon:(0,_g.jsx)(Xp.Korean,{})},{key:"pt",name:"Português",icon:(0,_g.jsx)(Xp.Portugal,{})},{key:"tr",name:"Türkçe",icon:(0,_g.jsx)(Xp.Turkey,{})},{key:"uz",name:"O'zbek",icon:(0,_g.jsx)(Xp.Uzbekistan,{})},{key:"zh_cn",name:"简体中文",icon:(0,_g.jsx)(Xp.Chinese,{})},{key:"pl",name:"Polish",icon:(0,_g.jsx)(Xp.Poland,{})},{key:"zh_tw",name:"繁體中文",icon:(0,_g.jsx)(Xp.ChineseTraditional,{})},{key:"es",name:"espanyol",icon:(0,_g.jsx)(Xp.Spanish,{})}],vm="INDICATOR_ADDED",bm="INDICATOR_DELETED",ym="INDICATOR_INFO_TOGGLE",Sm="SCROLL_TO_LEFT",xm="DRAWING_TOOLS_DELETE",wm={predictionIndicator:im.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more.")},Cm=t=>sm().find(e=>e.items.some(e=>e.flutter_chart_id===t))?.category.replace("-"," ")??"",Tm=Object.freeze({ChartTitle:"Chart Title",CategoricalDisplay:"Categorical Display",ChartControl:"Chart Control"}),km=Object.freeze({MarketSelector:"Market Selector",Favorite:"Favorite",ChartSetting:"Chart Setting",ChartSize:"Chart Size",ChartType:"Chart Type",Comparison:"Comparison",DrawTools:"Draw Tools",Download:"Download",Indicator:"Indicator",Interval:"Interval",Template:"Template"});function jm(t,e,r){window.isProductionWebsite&&window.ga&&ga("send","event",t,e,r)}const Am=new RegExp("\\d{17}"),Om=t=>{if(!t||t.getFullYear)return t;var e,r,i,a,s,n,o,l=[];if(12==t.length||14==t.length)return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,i=parseFloat(t.substring(6,8)),a=parseFloat(t.substring(8,10)),s=parseFloat(t.substring(10,12)),n=parseFloat(t.substring(12,14))||0,new Date(e,r,i,a,s,n,0);if(Am.test(t))return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,i=parseFloat(t.substring(6,8)),a=parseFloat(t.substring(8,10)),s=parseFloat(t.substring(10,12)),n=parseFloat(t.substring(12,14)),o=parseFloat(t.substring(14,17)),new Date(e,r,i,a,s,n,o);var c=[t],h=t.indexOf("T");if(-1!=h){var u=t.substring(h);if(-1!=u.indexOf("Z")||-1!=u.indexOf("-")||-1!=u.indexOf("+"))return new Date(t);c=t.split("T")}else-1!=t.indexOf(" ")&&(c=t.split(" "));if(-1!=c[0].indexOf("/"))l=c[0].split("/");else{if(-1==c[0].indexOf("-"))return Em(t);l=c[0].split("-")}var d=parseFloat(l[2]);if(l[0]&&4==l[0].length&&(d=parseFloat(l[0]),l[0]=l[1],l[1]=l[2]),c.length>1){var g=c[2];c=c[1].split(":"),g&&("12"==c[0]&&"AM"==g.toUpperCase()?c[0]=0:"12"!=c[0]&&"PM"==g.toUpperCase()&&(c[0]=parseInt(c[0],10)+12));var p=0,m=0;return 3==c.length&&(-1==c[2].indexOf(".")?p=parseInt(c[2],10):3==(p=c[2].split("."))[1].length&&(m=p[1],p=p[0])),new Date(d,l[0]-1,l[1],c[0],c[1],p,m)}return new Date(d,l[0]-1,l[1],0,0,0,0)},Em=t=>{var e;if(-1!=t.indexOf("/"))e=t.split("/");else{if(-1==t.indexOf("-"))return t.length>=8?new Date(parseFloat(t.substring(0,4)),parseFloat(t.substring(4,6))-1,parseFloat(t.substring(6,8))):new Date;e=t.split("-")}if(e.length<3)return new Date;-1!=e[2].indexOf(" ")?e[2]=e[2].substring(0,e[2].indexOf(" ")):-1!=e[2].indexOf("T")&&(e[2]=e[2].substring(0,e[2].indexOf("T")));var r=parseFloat(e[2]);return r<20&&(r+=2e3),4==e[0].length&&(r=parseFloat(e[0]),e[0]=e[1],e[1]=e[2]),new Date(r,e[0]-1,e[1])};function Nm(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Im{constructor(){Nm(this,"_api",void 0),Nm(this,"clientTimeAtRequest",void 0),Nm(this,"getTimeInterval",void 0),Nm(this,"onTimeUpdated",void 0),Nm(this,"serverTimeAtResponse",void 0),Nm(this,"updateTimeInterval",void 0),Nm(this,"clockStarted",!1),Nm(this,"clockStartedPromise",Bi()),Nm(this,"_timeResponse",t=>{if(!this.clockStarted)return void this.init();const e=t.time,r=Qi(new Date);e&&this.clientTimeAtRequest&&(this.serverTimeAtResponse=e+(r-this.clientTimeAtRequest)/2),this.updateTimeInterval&&clearInterval(this.updateTimeInterval),this.updateTimeInterval=setInterval(()=>{this.serverTimeAtResponse&&(this.serverTimeAtResponse+=1),"function"==typeof this.onTimeUpdated&&this.onTimeUpdated()},1e3)})}async init(t,e){if(this._api=t,this.onTimeUpdated=e,this.clockStarted)return this.clockStartedPromise;this.clockStarted=!0,this.getTimeInterval&&clearInterval(this.getTimeInterval),await this.requestTime(),this.getTimeInterval=setInterval(this.requestTime.bind(this),3e4)}async requestTime(){this.clientTimeAtRequest=Qi(new Date),this._timeResponse({time:Math.floor((new Date).getTime()/1e3)}),this.clockStartedPromise.resolve()}getEpoch(){return this.serverTimeAtResponse?this.serverTimeAtResponse:Qi(new Date)}getLocalDate(){return t=this.getEpoch(),new Date(1e3*t);var t}getUTCDate(){return Om(Yi(this.getEpoch()))}static getInstance(){return this._instance||(this._instance=new Im),this._instance}}Nm(Im,"_instance",void 0);const Pm=Im,Dm=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Lm="object"==typeof global&&global&&global.Object===Object&&global;var Mm="object"==typeof self&&self&&self.Object===Object&&self;const Bm=Lm||Mm||Function("return this")(),Rm=function(){return Bm.Date.now()};var Fm=/\s/;var Vm=/^\s+/;const Hm=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Fm.test(t.charAt(e)););return e}(t)+1).replace(Vm,""):t},Um=Bm.Symbol;var qm=Object.prototype,zm=qm.hasOwnProperty,$m=qm.toString,Gm=Um?Um.toStringTag:void 0;var Wm=Object.prototype.toString;var Km=Um?Um.toStringTag:void 0;const Qm=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Km&&Km in Object(t)?function(t){var e=zm.call(t,Gm),r=t[Gm];try{t[Gm]=void 0;var i=!0}catch(t){}var a=$m.call(t);return i&&(e?t[Gm]=r:delete t[Gm]),a}(t):function(t){return Wm.call(t)}(t)},Ym=function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==Qm(t)};var Xm=/^[-+]0x[0-9a-f]+$/i,Zm=/^0b[01]+$/i,Jm=/^0o[0-7]+$/i,tf=parseInt;const ef=function(t){if("number"==typeof t)return t;if(Ym(t))return NaN;if(Dm(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Dm(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Hm(t);var r=Zm.test(t);return r||Jm.test(t)?tf(t.slice(2),r?2:8):Xm.test(t)?NaN:+t};var rf=Math.max,af=Math.min;const sf=function(t,e,r){var i,a,s,n,o,l,c=0,h=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var r=i,s=a;return i=a=void 0,c=e,n=t.apply(s,r)}function p(t){var r=t-l;return void 0===l||r>=e||r<0||u&&t-c>=s}function m(){var t=Rm();if(p(t))return f(t);o=setTimeout(m,function(t){var r=e-(t-l);return u?af(r,s-(t-c)):r}(t))}function f(t){return o=void 0,d&&i?g(t):(i=a=void 0,n)}function _(){var t=Rm(),r=p(t);if(i=arguments,a=this,l=t,r){if(void 0===o)return function(t){return c=t,o=setTimeout(m,e),h?g(t):n}(l);if(u)return clearTimeout(o),o=setTimeout(m,e),g(l)}return void 0===o&&(o=setTimeout(m,e)),n}return e=ef(e)||0,Dm(r)&&(h=!!r.leading,s=(u="maxWait"in r)?rf(ef(r.maxWait)||0,e):s,d="trailing"in r?!!r.trailing:d),_.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=a=o=void 0},_.flush=function(){return void 0===o?n:f(Rm())},_};function nf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let of;class lf{constructor(t){nf(this,"mainStore",void 0),nf(this,"open",!1),nf(this,"onClose",()=>this.setOpen(!1)),nf(this,"outsideClickCallback",()=>this.setOpen(!1)),nf(this,"setOpen",sf(t=>{this.openDialog(t)},10,{leading:!0,trailing:!1})),nf(this,"handleClickOutside",t=>{let e=!1;"which"in t?e=3===t.which:"button"in t&&(e=2===t.button),t.isHandledByDialog||e||this.outsideClickCallback()}),nf(this,"closeOnEscape",t=>{27===t.keyCode&&this.onClose()}),br(this,{open:Mt,openDialog:Be.bound,register:Be.bound,unregister:Be.bound,onContainerClick:Be.bound,updateCloseCallback:Be.bound,updateOutsideClickCallback:Be.bound,outsideClickCallback:Mt}),this.mainStore=t,cr(()=>!!this.context,()=>{this.routingStore.registerDialog(this)})}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}openDialog(t){this.open!==t&&(this.open=t,this.open?setTimeout(this.register,100):this.unregister(),!0===t?(of&&of.openDialog(!1),of=this):of=void 0)}updateOutsideClickCallback(t){void 0!==t&&(this.outsideClickCallback=t)}register(){document.addEventListener("click",this.handleClickOutside,!1),document.addEventListener("keydown",this.closeOnEscape,!1)}unregister(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("keydown",this.closeOnEscape)}onContainerClick(t){t.nativeEvent.isHandledByDialog=!0}updateCloseCallback(t){void 0!==t&&(this.onClose=t)}}function cf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class hf{constructor(t,e){cf(this,"dialogStore",void 0),cf(this,"mainStore",void 0),cf(this,"dialogStatus",!1),cf(this,"route",""),br(this,{dialogStatus:Mt,route:Mt,open:Vt,setOpen:Be.bound,onTitleClick:Be.bound,handleDialogStatus:Be.bound,handleCloseDialog:Be.bound}),this.mainStore=t,this.dialogStore=new lf(t),qe(()=>this.open,()=>this.blurInput()),e&&e.route&&(this.route=e.route)}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}get open(){return this.dialogStore.open}setOpen(t){this.dialogStore.setOpen(t),this.routingStore.updateRoute(this.route,t)}blurInput(){setTimeout(this.handleDialogStatus,300)}onTitleClick(t){t&&t.stopPropagation(),this.setOpen(!this.open)}handleDialogStatus(){"indicators"===this.route&&this.open&&this.mainStore.state.stateChange("INDICATORS_MODAL_OPEN",{is_open:this.open}),"draw-tool"===this.route&&this.open&&this.mainStore.state.stateChange("DRAWING_TOOLS_MODAL_OPEN",{is_open:this.open}),"chart-title"===this.route&&this.open&&this.mainStore.state.stateChange("MARKET_MENU_MODAL_TOGGLE",{is_open:this.open}),"chart-mode"===this.route&&this.open&&this.mainStore.state.stateChange("CHART_MODE_MODAL_OPEN",{is_open:this.open}),this.dialogStatus=this.open}handleCloseDialog(){this.dialogStatus=!1,setTimeout(()=>this.setOpen(!1),300)}}function uf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class df{constructor({mainStore:t}){uf(this,"dialogPortalNodeId",void 0),uf(this,"mainStore",void 0),uf(this,"menuStore",void 0),uf(this,"scrollPanel",void 0),uf(this,"cancelCallback",void 0),br(this,{dialogPortalNodeId:Mt,open:Vt,cancelCallback:Mt,setOpen:Be.bound,setCancel:Be.bound,handleCancel:Be.bound,handleContinue:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"indicator-setting"})}get open(){return this.menuStore.open}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}handleCancel(){this.cancelCallback&&this.cancelCallback(),this.setOpen(!1),this.cancelCallback=null}setCancel(t){this.cancelCallback=t}handleContinue(){this.mainStore.timeperiod.setGranularity(0),this.mainStore.studies.deletePredictionStudies(),this.mainStore.studies.cleanupPredictionIndicator(),setTimeout(()=>{this.setOpen(!1)},100)}}function gf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const pf={tick:"T",minute:"M",hour:"H",day:"D"},mf={minute:60,hour:3600,day:86400};class ff{constructor(t){gf(this,"_serverTime",void 0),gf(this,"mainStore",void 0),gf(this,"portalNodeIdChanged",void 0),gf(this,"predictionIndicator",void 0),gf(this,"onGranularityChange",()=>null),gf(this,"remain",null),gf(this,"onDataInitialized",()=>{this.updateCountdown(),qe(()=>[this.timeUnit,this.mainStore.chartSetting.countdown,this.mainStore.chartType.type,this.loader.currentState,this.isSymbolOpen],this.updateCountdown.bind(this)),qe(()=>this.mainStore.state.granularity,t=>this.onGranularityChange(t))}),gf(this,"countdownInterval",void 0),gf(this,"remainLabelY",()=>{const t=this.mainStore.chart.currentClose;if(t)return this.mainStore.chartAdapter.getYFromQuote(t)}),br(this,{changeGranularity:Be.bound,portalNodeIdChanged:Mt,setGranularity:Be.bound,updateProps:Be.bound,updatePortalNode:Be.bound}),this.mainStore=t,this.predictionIndicator=new df({mainStore:t}),this._serverTime=Pm.getInstance(),cr(()=>this.mainStore.chartAdapter.isFeedLoaded,this.onDataInitialized)}get loader(){return this.mainStore.loader}get isTick(){return"tick"===this.timeUnit}get isSymbolOpen(){return this.mainStore.chartTitle.isSymbolOpen}get timeUnit(){return(t=>{if(void 0!==t)return 86400===t?"day":0===t?"tick":t>=60&&t<=1800?"minute":"hour"})(this.mainStore.chart.granularity)}get display(){return void 0===this.mainStore.chart.granularity?"":`${0===this.mainStore.chart.granularity?1:this.mainStore.chart.granularity/mf[this.timeUnit]} ${pf[this.timeUnit]}`}clearCountdown(){this.countdownInterval&&clearInterval(this.countdownInterval),this.countdownInterval=void 0}updateCountdown(){this.remain=null,this.clearCountdown();const t=()=>{if(this.isTick||!this.isSymbolOpen)return void this.clearCountdown();const t=this.mainStore.chart?.feed?.quotes;if(t&&t.length){const e=[...t].filter(t=>t&&t.Close);if(e&&e.length){const t=e[e.length-1];if(t.DT){const e=this._serverTime?.getLocalDate()?.getTime(),r=e-t.DT.getTime(),i=1e3*(this.mainStore.chart.granularity||1),a=r>i?Math.floor(r/i)+1:1;this.remain=Xi(a*i-r),this.mainStore.chartAdapter.flutterChart?.config.setRemainingTime(this.remain||"")}}}};this.mainStore.chartSetting.countdown&&!this.isTick&&(this.countdownInterval||(this.countdownInterval=setInterval(t,1e3),t()))}setGranularity(t){jm(Tm.ChartControl,km.Interval,t?.toString()),this.onGranularityChange?this.onGranularityChange(t):this.mainStore.chart.changeSymbol(void 0,t)}updateProps(t){void 0!==this.mainStore.state.granularity&&(this.onGranularityChange=t)}changeGranularity(t){if(t){const e=mm.find(t=>t.id===this.mainStore.chartType.type.id)?.text??"";this.mainStore.state.stateChange("CHART_INTERVAL_CHANGE",{time_interval_name:$i(t,fm),chart_type_name:"colored_bar"===this.mainStore.chartType.type.id?e:e.toLowerCase()})}0===t&&this.mainStore.studies.hasPredictionIndicator?(this.predictionIndicator.dialogPortalNodeId=this.portalNodeIdChanged,this.predictionIndicator.setOpen(!0)):this.onGranularityChange(t)}updatePortalNode(t){this.portalNodeIdChanged=t}}var _f=h(6092),vf=h.n(_f);function bf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class yf{static get EVENT_MARKET_OPEN_CLOSE_CHANGE(){return"EVENT_MARKET_OPEN_CLOSE_CHANGE"}static get FEED_UNAVAILABLE(){return"chartonly"}constructor(t,e){bf(this,"_api",void 0),bf(this,"_emitter",void 0),bf(this,"_params",void 0),bf(this,"_serverTime",void 0),bf(this,"_shouldFetchTradingTimes",void 0),bf(this,"_tradingTimesMap",void 0),bf(this,"_updateTimer",void 0),bf(this,"lastUpdateDate",void 0),bf(this,"isInitialized",!1),bf(this,"tradingTimesPromise",Bi()),bf(this,"timeUpdateCallback",void 0),this._params=e||{},this._shouldFetchTradingTimes=!1!==e?.shouldFetchTradingTimes,this._api=t,this._serverTime=Pm.getInstance(),this._emitter=new(Fi())({emitDelay:0})}destructor(){this._updateTimer&&clearTimeout(this._updateTimer)}async initialize(){if(await this._serverTime.init(this._api,()=>{"function"==typeof this.timeUpdateCallback&&this.timeUpdateCallback()}),this.isInitialized)return this.tradingTimesPromise;if(this.isInitialized=!0,this.lastUpdateDate=this._serverTime.getLocalDate().toISOString().substring(0,10),!this._tradingTimesMap&&this._shouldFetchTradingTimes){await this._updateTradeTimes(),this.tradingTimesPromise.resolve();const t=async()=>{const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,e);let r=this._nextUpdateDate();if(!r){const t=this._serverTime.getLocalDate(),e=new Date(`${this.lastUpdateDate}T00:00:00Z`);e.setDate(e.getDate()+1),this.lastUpdateDate=(t>e?t:e).toISOString().substring(0,10);const i={};for(const t in this._tradingTimesMap)i[t]=!!this._tradingTimesMap[t].isOpened;await this._updateTradeTimes();for(const t in this._tradingTimesMap)this._tradingTimesMap[t].isOpened=i[t];r=e}const i=r-this._serverTime.getLocalDate();this._updateTimer=setTimeout(t,i)};await t()}}_updateMarketOpenClosed(){const t={};for(const e in this._tradingTimesMap){const r=this._calcIsMarketOpened(e);this._tradingTimesMap[e].isOpened!==r&&(this._tradingTimesMap[e].isOpened=r,t[e]=r)}return t}async _updateTradeTimes(){this._params.tradingTimes&&this._calculatingTradingTime(this._params.tradingTimes)}_calculatingTradingTime(t){if(!t)return;if(this._tradingTimesMap={},t){for(const e in t){const{isOpen:r,openTime:i,closeTime:a}=t[e];this._tradingTimesMap[e]={feed_license:void 0,isClosedToday:!r,holidays:[],closes_early:[],opens_late:[],delay_amount:0,times:i&&a?[{open:new Date(i),close:new Date(a)}]:void 0,isOpenAllDay:!1,isClosedAllDay:!1,isOpened:r}}return}const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,e)}isFeedUnavailable(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t]?.feed_license===yf.FEED_UNAVAILABLE:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}getDelayedMinutes(t){return this._tradingTimesMap?.[t].delay_amount}isMarketOpened(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t].isOpened:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}_calcIsMarketOpened(t){const e=this._serverTime.getLocalDate(),r=e.toISOString().substring(0,10);if(!this._tradingTimesMap)return;const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n,holidays:o,closes_early:l,opens_late:c,isClosedToday:h}=this._tradingTimesMap[t];if(n||a===yf.FEED_UNAVAILABLE||h||o.includes(r))return!1;const u=c.find(t=>t.date===r);if(u){const{open:t,close:r}=u;return!!(e>=t&&e<r)}const d=l.find(t=>t.date===r);if(d){const{open:t,close:r}=d;return!!(e>=t&&e<r)}if(s)return!0;if(i)for(const t of i){const{open:r,close:i}=t;if(e>=r&&e<i)return!0}return!1}_nextUpdateDate(){const t=this._serverTime.getLocalDate();let e;for(const r in this._tradingTimesMap){const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n}=this._tradingTimesMap[r];if(!s&&!n&&a!==yf.FEED_UNAVAILABLE&&i)for(const r of i){const{open:i,close:a}=r;i>t&&(!e||i<e)&&(e=i),a>t&&(!e||a<e)&&(e=a)}}return e}onMarketOpenCloseChanged(t){this._emitter.on(yf.EVENT_MARKET_OPEN_CLOSE_CHANGE,t)}onTimeChanged(t){this.timeUpdateCallback=t}}const Sf=yf;function xf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wf{static get DEFAULT_COUNT(){return 1e3}constructor(t,e,r){xf(this,"unsubscribeQuotes",void 0),xf(this,"_getQuotes",void 0),xf(this,"_subscribeQuotes",void 0),xf(this,"streamRequests",{}),this.unsubscribeQuotes=t,this._getQuotes=e,this._subscribeQuotes=r}async getQuotes(t){if(this._getQuotes){const e=await this._getQuotes({symbol:t.symbol,granularity:t.granularity,count:"string"==typeof t.count?parseInt(t.count,10):t.count||wf.DEFAULT_COUNT,start:"string"==typeof t.start?parseInt(t.start,10):t.start,end:"string"==typeof t.end?parseInt(t.end,10):t.end});if(t.granularity)return{candles:e.candles};if(e.history&&e.history.times&&e.history.prices)return{history:{times:e.history.times,prices:e.history.prices}};throw new Error("Invalid tick history response format")}throw new Error("No getQuotes function provided")}subscribeQuotes(t,e){const r=this._getKey(t),i=wf.createGetQuotesRequest({...t,subscribe:1});this.streamRequests[r]={request:i,callback:e},this._subscribeQuotes({symbol:t.symbol,granularity:t.granularity},e)}forget(t){const e=this._getKey(t);if(!this.streamRequests[e])return;const{request:r,callback:i}=this.streamRequests[e];return delete this.streamRequests[e],this.unsubscribeQuotes(r,i)}static createGetQuotesRequest({symbol:t,granularity:e,start:r,end:i,subscribe:a,adjust_start_time:s=1,count:n}){const o={symbol:t,style:e?"candles":"ticks",start:r,end:i,count:n||wf.DEFAULT_COUNT};return e&&(o.granularity=+e),s&&(o.adjust_start_time=s),a&&(o.subscribe=1),r&&(delete o.count,o.start=r),i&&(o.end=i),o}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}}const Cf=t=>{const e=[],r=(i=(t,e)=>t.submarket_display_name.localeCompare(e.submarket_display_name),t.map((t,e)=>({item:t,index:e})).sort((t,e)=>{const r=i(t.item,e.item);return 0!==r?r:t.index-e.index}).map(({item:t})=>t));var i;for(const t of r)e.push({symbol:t.symbol,name:t.display_name,market:t.market,market_display_name:t.market_display_name,subgroup:t.subgroup,subgroup_display_name:t.subgroup_display_name,submarket_display_name:t.submarket_display_name,exchange_is_open:!!t.exchange_is_open,decimal_places:t.pip.toString().length-2});return e},Tf=t=>({enabled:!0,itemId:t.symbol,display:t.name,dataObject:t}),kf=t=>({subcategoryName:t.submarket_display_name,data:[]}),jf=(t,e)=>{let r=t.find(t=>t.categoryId===e.market);return r||(r=(t=>({categoryName:t.market_display_name,categoryId:t.market,hasSubcategory:!0,hasSubgroup:!(!t.subgroup||"none"===t.subgroup),data:[],subgroups:[]}))(e),t.push(r)),r},Af=(t,e,r)=>{let i=r.get(e.submarket_display_name);return i||(i=kf(e),r.set(e.submarket_display_name,i),t.data.push(i)),i},Of=(t,e)=>{if(!t.hasSubgroup)return;const r=((t,e)=>{let r=t.subgroups?.find(t=>t.categoryId===e.subgroup);return r||(r=(t=>({data:[],categoryName:t.subgroup_display_name,categoryId:t.subgroup,hasSubcategory:!0,hasSubgroup:!1,subgroups:[]}))(e),t.subgroups?.push(r)),r})(t,e),i=((t,e)=>{let r=t.data.find(t=>t.subcategoryName===e.submarket_display_name);return r||(r=kf(e),t.data.push(r)),r})(r,e);i.data.push(Tf(e))},Ef=t=>{if(!t.length)return[];const e=[],r=new Map;for(const i of t){const t=jf(e,i);r.has(i.market)||r.set(i.market,new Map);const a=r.get(i.market),s=Af(t,i,a);Of(t,i),s.data.push(Tf(i))}return e};function Nf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const If=class{constructor(t,e){Nf(this,"params",void 0),Nf(this,"topNode",void 0),this.params=e||{},this.topNode=t}};class Pf{static formatHistory(t){const{history:e,candles:r}=t;if(e){const{times:t=[],prices:r=[]}=e;return r.map((e,r)=>({Date:Yi(+t[r]),Close:+e}))}if(r)return r.map(t=>{const e=t;return{Date:Yi(+e.epoch),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close}})}static formatQuote(t){if("tick"in t){const{tick:e}=t,r=e;return{Date:Yi(+r.epoch),Close:+r.quote,tick:e}}if("ohlc"in t){const{ohlc:e}=t;if(e)return{Date:Yi(+e.open_time),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close,ohlc:e}}}static formatAllQuotes(t){const e=e=>{const r=t?.[e+1],i=t?.[e-1];return i?.tick&&r?.tick?aa(i?.tick,r?.tick,.5):r?.tick||i?.tick};return t?.map((t,r)=>({Date:Yi(+t.epoch),Close:+(t.tick||e(r))}))}static formatPOCQuote(t){const{tick_stream:e=[],underlying:r=""}=t||{};return e.length&&r?e.map(({epoch:t=0,tick:e,tick_display_value:i})=>({Date:Yi(t),Close:e||0,tick:{epoch:t,quote:e||0,symbol:r,pip_size:i?.split(".")[1]?.length||0}})):null}}function Df(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Lf{static get EVENT_CHART_DATA(){return"EVENT_CHART_DATA"}get contractInfo(){return this._mainStore.state.contractInfo}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}constructor(t,e,r){Df(this,"_binaryApi",void 0),Df(this,"_emitter",void 0),Df(this,"_request",void 0),Df(this,"lastStreamEpoch",void 0),Df(this,"_mainStore",void 0),this._binaryApi=e,this._request=t,this._emitter=new(Fi())({emitDelay:0}),this._mainStore=r}async initialFetch(){return await this._startSubscribe(this._request)}pause(){}async resume(){if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch};return await this._startSubscribe(t)}}forget(){this.lastStreamEpoch=void 0,this._emitter.off(Lf.EVENT_CHART_DATA)}_startSubscribe(t){throw new Error("Please override!")}_processGetQuotesResponse(t){const e=Pf.formatHistory(t);if(!e)throw new Error(`Unexpected response: ${t}`);return this.lastStreamEpoch=Lf.getLatestEpoch(t),e}onChartData(t){this._emitter.on(Lf.EVENT_CHART_DATA,t)}static getLatestEpoch({candles:t,history:e}){if(t)return t[t.length-1].epoch;if(e){const{times:t=[]}=e;return t[t.length-1]}}static getEpochFromTick(t){return"tick"in t&&t.tick?t.tick.epoch:t.ohlc?.open_time}}const Mf=Lf;function Bf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Rf=class extends Mf{constructor(t,e,r,i){super(t,e,i),Bf(this,"_timerId",void 0),Bf(this,"UPDATE_INTERVAL",3e3),Bf(this,"onUpdateDelayedFeed",async()=>{if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch,adjust_start_time:0},e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);this._emitter?.emit(Mf.EVENT_CHART_DATA,r)}else console.error("Unable to update delayed feed without epoch from last tick"),this._endTimer()}),this._request={...this._request,start:this._request.start-60*r}}pause(){this._endTimer()}async _startSubscribe(t){const e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);return this._startTimer(),{quotes:r,response:e}}forget(){this._endTimer(),super.forget()}_startTimer(){this._timerId||(this._timerId=setInterval(this.onUpdateDelayedFeed,this.UPDATE_INTERVAL))}_endTimer(){this._timerId&&(clearInterval(this._timerId),this._timerId=void 0)}};const Ff=class extends Mf{constructor(...t){super(...t),function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"_tickCallback",void 0)}pause(){this._tickCallback=void 0}async resume(){if(this._tickCallback)throw new Error("You cannot resume an active stream!");return super.resume()}async _startSubscribe(t){const e=this.contractInfo,r=await this._binaryApi.getQuotes(t),i=this._processGetQuotesResponse(r),a=t=>{(t.tick||t.ohlc)&&this._onTick(t)};if(!this.shouldGetQuotes&&e.tick_stream)this._binaryApi.subscribeQuotes(Object.assign(t,{count:e.tick_count}),a);else{const r=e.current_spot_time&&e.date_start?e.current_spot_time-e.date_start:0,i=1e3;this._binaryApi.subscribeQuotes(Object.assign(t,{count:r>i?r:i}),a)}return this._tickCallback=a,{quotes:i,response:r}}forget(){if(this._tickCallback){const{symbol:t,granularity:e}=this._request;this._binaryApi.forget({symbol:t,granularity:e}),this._tickCallback=void 0}super.forget()}_onTick(t){const e=t,r=Mf.getEpochFromTick(e);void 0!==r&&(this.lastStreamEpoch=+r);const i=[Pf.formatQuote(e)];this._emitter.emit(Mf.EVENT_CHART_DATA,i)}};function Vf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Hf{static get EVENT_MASTER_DATA_UPDATE(){return"EVENT_MASTER_DATA_UPDATE"}static get EVENT_MASTER_DATA_REINITIALIZE(){return"EVENT_MASTER_DATA_REASSIGN"}static get EVENT_START_PAGINATION(){return"EVENT_START_PAGINATION"}static get EVENT_ON_PAGINATION(){return"EVENT_ON_PAGINATION"}get startEpoch(){return this._mainStore.state.startEpoch}get endEpoch(){return this._mainStore.state.endEpoch}get granularity(){return this._mainStore.chart.granularity}get allTicks(){return this._mainStore.state.allTicks}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}get contractInfo(){return this._mainStore.state.contractInfo}get loader(){return this._mainStore.loader}get margin(){return this._mainStore.state.margin}get hasAlternativeSource(){return this._mainStore.state.shouldDrawTicksFromContractInfo}get paginationLoader(){return this._mainStore.paginationLoader}constructor(t,e,r){Vf(this,"_binaryApi",void 0),Vf(this,"_connectionClosedDate",void 0),Vf(this,"_emitter",void 0),Vf(this,"_mainStore",void 0),Vf(this,"_serverTime",void 0),Vf(this,"tickQueue",[]),Vf(this,"_tradingTimes",void 0),Vf(this,"quotes",[]),Vf(this,"_activeStreams",{}),Vf(this,"_isConnectionOpened",!0),Vf(this,"onRangeChanged",()=>{this._mainStore.state.setChartIsReady(!1),this._mainStore.state.saveLayout(),this._mainStore.state.setChartIsReady(!0)}),this._binaryApi=t,this._mainStore=e,this._serverTime=Pm.getInstance(),this._tradingTimes=r,qe(()=>e.state.isConnectionOpened,this.onConnectionChanged.bind(this)),this._emitter=new(Fi())({emitDelay:0})}subscribe(){}unsubscribe({symbol:t,granularity:e}){const r=this._getKey({symbol:t,granularity:e});this._forgetStream(r)}_forgetStream(t){this._activeStreams[t]&&(this._activeStreams[t].forget(),delete this._activeStreams[t])}processQuotes(t){t.forEach(t=>{t.DT=new Date(`${t.Date}Z`)})}updateQuotes(t,e){this.processQuotes(t),e?this.quotes.unshift(...t):this.quotes=t}addQuote(t){this.processQuotes([t]),this.quotes.push(t)}getQuoteForEpoch(t){return this.quotes.find(e=>e.DT?.getTime()==t)}getQuoteIndexForEpoch(t){return this.quotes.findIndex(e=>e.DT?.getTime()==t)}getClosestValidEpoch(t,e){return Math.round(t/e)*e}getClosestQuoteForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?r:i}getClosestQuoteIndexForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?Math.floor(e):Math.ceil(e)}findEpochIndex(t){let e=-1,r=this.quotes.length;for(;r-e>1;){const i=Math.trunc((e+r)/2),a=this.quotes[i].DT?.getTime();if(!a)return i;if(t<a)r=i;else{if(!(t>a))return i;e=i}}return e>=0&&t==this.quotes[e].DT?.getTime()?e:r<this.quotes.length&&t==this.quotes[r].DT?.getTime()?r:(e+r)/2}getQuotesInterval(){if(this.quotes.length<=1)return 1;const t=this.quotes.reduce((t,e,r,i)=>{const a=e.DT?.getTime(),s=i[r-1]?.DT?.getTime();return s&&a?t+(a-s)/1e3:t},0);return Math.round(t/(this.quotes.length-1))}async fetchInitialData(t,e,r){this.tickQueue=[],this.setHasReachedEndOfData(!1),this.paginationLoader.updateOnPagination(!0);const{granularity:i=0,symbolObject:a}=e,s=this._getKey({symbol:t,granularity:i}),n=this.margin&&this.startEpoch?this.startEpoch-this.margin:this.startEpoch,o=this.margin&&this.endEpoch?this.endEpoch+this.margin:this.endEpoch,l=a.name;if(this.loader.setState("chart-data"),this._tradingTimes.isFeedUnavailable(t)){this._mainStore.notifier.notifyFeedUnavailable(l);const t={quotes:[]};return this._mainStore.chart.setChartAvailability(!1),void r(t)}if(this.quotes&&this.quotes.length>0&&!this.shouldGetQuotes){const t=this._trimQuotes(this.quotes);return r({quotes:t}),this._emitDataUpdate(t,!0),void this.paginationLoader.updateOnPagination(!1)}const c={symbol:t,granularity:i,start:n,count:this.endEpoch?void 0:this._mainStore.lastDigitStats.count},h=this.contractInfo.validation_error_code;let u,d=!1;if(o)c.end=String(o),d=!0;else if("MarketIsClosed"!==h&&"MarketIsClosedTryVolatility"!==h){let e;const i=this._tradingTimes.getDelayedMinutes(t);i>0?(this._mainStore.notifier.notifyDelayedMarket(l,i),e=new Rf(c,this._binaryApi,i,this._mainStore)):e=new Ff(c,this._binaryApi,this._mainStore);try{const{quotes:t,response:r}=await e.initialFetch();u=t,this.endEpoch||this._mainStore.lastDigitStats.updateLastDigitStats(r)}catch(t){const{message:e}=t;return this._mainStore.notifier.notify({text:e,type:"error",category:"activesymbol"}),r({quotes:[]}),void this.paginationLoader.updateOnPagination(!1)}if(e.onChartData(e=>{t!==this._mainStore.chart.currentActiveSymbol?.symbol||this.hasAlternativeSource||this._appendChartData(e,s)}),this._mainStore.chart.isDestroyed||this._mainStore.state.symbol&&this._mainStore.state.symbol!==t)return r({quotes:[]}),void e.forget();this._activeStreams[s]=e}else this._mainStore.notifier.notifyMarketClose(l),d=!0;if(d)if(this._mainStore.state.getQuotes){const e=await this._mainStore.state.getQuotes({symbol:t,granularity:i,count:this.endEpoch?1e3:this._mainStore.lastDigitStats.count,start:n,end:o});if(e.candles)u=e.candles.map(t=>({Date:Yi(t.epoch),Open:t.open,High:t.high,Low:t.low,Close:t.close}));else if(e.history){const{times:t=[],prices:r=[]}=e.history;u=r.map((e,r)=>({Date:Yi(t[r]),Close:e}))}else u=[]}else if(this.shouldGetQuotes||!this.contractInfo.tick_stream){const t=await this._binaryApi.getQuotes(c);u=Pf.formatHistory(t)}else{const t=await new Promise(t=>{setTimeout(()=>t(this.allTicks),50)});u=Pf.formatAllQuotes(t)}u?(u=this._trimQuotes(u),r({quotes:u}),this._emitDataUpdate(u,!0),this.paginationLoader.updateOnPagination(!1)):r({quotes:[]})}async fetchPaginationData(t,e,r,i,a){this.paginationLoader.updateOnPagination(!0),this._emitter.emit(Hf.EVENT_START_PAGINATION,{end:e}),await this._getPaginationData(t,i,r,e,a),this.paginationLoader.updateOnPagination(!1)}async _getPaginationData(t,e,r,i,a){if(this._mainStore.state.hasReachedEndOfData)return;if(this.startEpoch||this.endEpoch&&i>this.endEpoch)return a({moreAvailable:!1,quotes:[]}),this._emitter.emit(Hf.EVENT_ON_PAGINATION,{end:i}),void this.setHasReachedEndOfData(!0);const s=this._serverTime.getEpoch()-Math.ceil(2.8*365*24*60*60);let n,o={quotes:[]};if(i>s)try{const l=await this._binaryApi.getQuotes({symbol:t,granularity:e,count:`${r}`,end:String(i)});if(n=Hf.getFirstEpoch(l),void 0===n||n===i)return a({moreAvailable:!1,quotes:[]}),void this.setHasReachedEndOfData(!0);if(o.quotes=Pf.formatHistory(l),n<=s&&(a({moreAvailable:!1,quotes:[]}),this.setHasReachedEndOfData(!0)),o.quotes?.length&&o.quotes.length<r)return a({moreAvailable:!1,quotes:o.quotes}),void this.setHasReachedEndOfData(!0)}catch(t){console.error(t),o={error:t}}a(o);{const t=n&&i>n?n:i;this._emitter.emit(Hf.EVENT_ON_PAGINATION,{end:t})}}setHasReachedEndOfData(t){this.paginationLoader.updateOnPagination(!1),this._mainStore.state.hasReachedEndOfData!==t&&(this._mainStore.state.hasReachedEndOfData=t)}unsubscribeAll(){for(const t of Object.keys(this._activeStreams))this._forgetStream(t)}_forgetIfEndEpoch(t){const e=this._activeStreams[t];let r=!0;if(!e)return;const i=e.lastStreamEpoch;return this.endEpoch&&void 0!==i&&void 0!==this.granularity&&i+this.granularity>this.endEpoch?(this._activeStreams[t]&&0===this.granularity&&!this._mainStore.state.isStaticChart&&Om(Yi(this.endEpoch)).valueOf()>=this.quotes.slice(-1)[0]?.Date.valueOf()&&(r=!1),this._forgetStream(t)):r=!1,r}_appendChartData(t,e,r=!1){if(!this._forgetIfEndEpoch(e)||this._activeStreams[e]){if((!this.hasAlternativeSource||r)&&r){if(!this.tickQueue.length)return void(this.tickQueue=[t[t.length-1]]);if(this.tickQueue[0].tick?.epoch===t[t.length-1].tick?.epoch)return;this.tickQueue=[t[t.length-1]],t=[t[t.length-1]]}this._emitDataUpdate(t)}else t=[]}appendChartDataFromPOCResponse(t){const e=Pf.formatPOCQuote(t);e&&this._appendChartData(e,e[0].tick.symbol,!0)}_emitDataUpdate(t,e=!1){const r=t[t.length-2],i=void 0!==r?r.Close:void 0,a={...t[t.length-1],prevClose:i};e?(this._emitter.emit(Hf.EVENT_MASTER_DATA_REINITIALIZE),this._mainStore.chart.setChartAvailability(!0)):this._emitter.emit(Hf.EVENT_MASTER_DATA_UPDATE,a)}static getFirstEpoch(t){if(t.candles&&t.candles.length>0)return t.candles[0].epoch;if(t.history&&t.history.times&&t.history.times.length>0){const{times:e}=t.history;return+e[0]}}onMasterDataUpdate(t){this._emitter.on(Hf.EVENT_MASTER_DATA_UPDATE,t)}offMasterDataUpdate(t){this._emitter.off(Hf.EVENT_MASTER_DATA_UPDATE,t)}onMasterDataReinitialize(t){this._emitter.on(Hf.EVENT_MASTER_DATA_REINITIALIZE,t)}offMasterDataReinitialize(t){this._emitter.off(Hf.EVENT_MASTER_DATA_REINITIALIZE,t)}onPagination(t){this._emitter.on(Hf.EVENT_ON_PAGINATION,t)}offPagination(t){this._emitter.off(Hf.EVENT_ON_PAGINATION,t)}onStartPagination(t){this._emitter.on(Hf.EVENT_START_PAGINATION,t)}offStartPagination(t){this._emitter.off(Hf.EVENT_START_PAGINATION,t)}onConnectionChanged(){const t=this._mainStore.state.isConnectionOpened;void 0!==t&&t!==this._isConnectionOpened&&(this._isConnectionOpened=t,t?this._onConnectionReopened():this._onConnectionClosed())}_onConnectionClosed(){for(const t in this._activeStreams)this._activeStreams[t].pause();this._connectionClosedDate=new Date}_onConnectionReopened(){0!==Object.keys(this._activeStreams).length&&(this._mainStore.chart.refreshChart(),this._connectionClosedDate=void 0)}_resumeStream(t){this._activeStreams[t].pause(),this._activeStreams[t].resume().then(e=>{const{quotes:r}=e;this._appendChartData(r,t)})}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}_unpackKey(t){const[e,r]=t.split("-");return{symbol:e,granularity:+r}}_trimQuotes(t=[]){let e=null,r=null,i=t;if(!i.length)return[];if(this.startEpoch&&this.margin&&(e=i.findIndex(t=>Om(t.Date)>=Om(Yi(this.startEpoch))),e>0&&(i=i.slice(e-1))),this.endEpoch&&this.margin&&(r=i.findIndex(t=>Om(t.Date)>=Om(Yi(this.endEpoch))),r>-1)){const t=Om(i[r].Date)===Om(Yi(this.endEpoch))?2:1;i=i.slice(0,r+t)}return i}}const Uf=Hf;function qf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class zf{constructor(t){qf(this,"chartContainerHeight",void 0),qf(this,"chartHeight",void 0),qf(this,"chartId",void 0),qf(this,"containerWidth",null),qf(this,"context",null),qf(this,"currentActiveSymbol",void 0),qf(this,"currentLanguage",void 0),qf(this,"cursorInChart",!1),qf(this,"startWithDataFitMode",!1),qf(this,"feed",void 0),qf(this,"isBarrierDragging",!1),qf(this,"isChartAvailable",!0),qf(this,"isLive",!1),qf(this,"isMobile",!1),qf(this,"isScaledOneOne",!1),qf(this,"mainStore",void 0),qf(this,"networkStatus",void 0),qf(this,"resizeObserver",void 0),qf(this,"serverTime",void 0),qf(this,"shouldRenderDialogs",!1),qf(this,"leftMargin",void 0),qf(this,"lastQuote",void 0),qf(this,"processedSymbols",void 0),qf(this,"symbolMap",{}),qf(this,"categorizedSymbols",[]),qf(this,"feedCall",{}),qf(this,"RANGE_PADDING_PX",125),qf(this,"contextPromise",Bi()),qf(this,"rootNode",null),qf(this,"api",null),qf(this,"defaults",{granularity:0,chartType:"line"}),qf(this,"granularity",void 0),qf(this,"enableRouting",null),qf(this,"chartNode",null),qf(this,"chartControlsNode",null),qf(this,"state",void 0),qf(this,"onMessage",null),qf(this,"_barriers",[]),qf(this,"tradingTimes",void 0),qf(this,"whitespace",void 0),qf(this,"isDestroyed",!1),qf(this,"currentCloseQuote",()=>{const t=this.mainStore.chart.feed?.quotes;let e=t?.[t.length-1];if(e&&!e.Close){const r=t?.filter(t=>t&&t.Close);if(r&&r.length)e=r[r.length-1];else{const r=t?.filter(t=>t&&t.Close);r&&r.length&&(e=r[r.length-1])}}return e}),qf(this,"indicatorHeightRatio",t=>{let e={};if("function"==typeof this.stateStore.getIndicatorHeightRatio&&this.chartNode&&(e=this.stateStore.getIndicatorHeightRatio(this.chartNode.offsetHeight,t)),this.chartNode&&(!e||!e.height||!e.percent)){const r=this.chartNode.offsetHeight,i=r<780,a=t>=5?t:t+1,s=this.isMobile?160:320,n=Math.round((r-(s+(i?20:0)))/a);e={height:n,percent:n/r}}return e}),qf(this,"init",(t,e)=>{this.loader.show(),this.mainStore.state.setChartIsReady(!1),this.loader.setState("chart-engine"),this.chartId=e.id||"base-chart",this._initChart(t,e)}),qf(this,"setResizeEvent",()=>{const t=t=>{t.forEach(()=>{this.rootNode&&this.rootNode.clientWidth>0&&this.resizeScreen()})};"ResizeObserver"in window?(this.resizeObserver=new ResizeObserver(t),this.rootNode&&this.resizeObserver.observe(this.rootNode)):h.e(590).then(h.bind(h,4208)).then(({default:e})=>{window.ResizeObserver=e,this.rootNode&&(this.resizeObserver=new e(t),this.resizeObserver.observe(this.rootNode))})}),qf(this,"onMarketOpenClosedChange",t=>{const e=this.processedSymbols||[];let r=!1;for(const{symbol:i,name:a}of e)i in t&&(t[i]?(r=!0,this.chartClosedOpenThemeChange(!1),this.mainStore.notifier.notifyMarketOpen(a)):(this.chartClosedOpenThemeChange(!0),this.mainStore.notifier.notifyMarketClose(a)));r&&this.refreshChart()}),qf(this,"remainLabelY",()=>0),br(this,{chartContainerHeight:Mt,chartHeight:Mt,containerWidth:Mt,context:Mt,currentActiveSymbol:Mt,currentLanguage:Mt,cursorInChart:Mt,isBarrierDragging:Mt,isChartAvailable:Mt,isMobile:Mt,isScaledOneOne:Mt,networkStatus:Mt,serverTime:Mt,shouldRenderDialogs:Mt,xAxisHeight:Vt,yAxisWidth:Vt,lastQuote:Mt,_initChart:Be.bound,changeSymbol:Be.bound,destroy:Be.bound,granularity:Mt,newChart:Be.bound,onServerTimeChange:Be.bound,openFullscreen:Be.bound,pip:Vt,refreshChart:Be.bound,resizeScreen:Be.bound,setChartAvailability:Be.bound,updateCurrentActiveSymbol:Be.bound,updateScaledOneOne:Be.bound,processedSymbols:Mt,symbolMap:Mt,categorizedSymbols:Mt}),this.mainStore=t}get loader(){return this.mainStore.loader}get routingStore(){return this.mainStore.routing}get stateStore(){return this.mainStore.state}get studiesStore(){return this.mainStore.studies}get pip(){return this.currentActiveSymbol?.decimal_places}get rootElement(){return this.chartId?document.getElementById(this.chartId):null}get currentClose(){return this.currentCloseQuote()?.Close}get xAxisHeight(){return window.flutterChart?.app.getXAxisHeight()||24}get yAxisWidth(){return window.flutterChart?.app.getYAxisWidth()||60}updateHeight(t){const e=this.mainStore.chartSetting.historical&&this.isMobile,r=t||this.mainStore.chartSetting.position;let i=0;this.stateStore.enabledChartFooter?i=32:"bottom"===r&&this.stateStore.chartControlsWidgets&&(i=40),this.chartHeight=this.chartNode?.offsetHeight,this.chartContainerHeight=(this.chartHeight||0)-i-(e?45:0)}resizeScreen(){this.rootNode&&this.rootNode.clientWidth>=1280?this.containerWidth=1280:this.rootNode&&this.rootNode.clientWidth>=900?this.containerWidth=900:this.containerWidth=480,this.updateHeight()}_initChart(t,e){this.rootNode=t,this.chartNode=this.rootNode?.querySelector(".ciq-chart-area"),this.chartControlsNode=this.rootNode?.querySelector(".cq-chart-controls");const{symbol:r,granularity:i,unsubscribeQuotes:a,getQuotes:s,subscribeQuotes:n,isMobile:o,enableRouting:l,onMessage:c,settings:h,onSettingsChange:u,chartData:d,feedCall:g,isLive:p,startWithDataFitMode:m,leftMargin:f}=e;this.feedCall=g||{},this.api=new wf(a,s||(async()=>({candles:[],echo_req:{}})),n||(()=>()=>{})),this.currentLanguage=localStorage.getItem("current_chart_lang")??h?.language?.toLowerCase(),this.tradingTimes=zf.tradingTimes||(zf.tradingTimes=new Sf(this.api,{enable:this.feedCall.tradingTimes,shouldFetchTradingTimes:this.mainStore.state.shouldFetchTradingTimes,tradingTimes:d?.tradingTimes}));const _=d?.activeSymbols;if(_){const t=Cf(_);this.processedSymbols=t,this.categorizedSymbols=Ef(t),this.symbolMap={};for(const e of t)this.symbolMap[e.symbol]=e;zf.processedSymbols=t,zf.symbolMap=this.symbolMap,zf.categorizedSymbols=this.categorizedSymbols}else this.currentLanguage===h?.language&&zf.processedSymbols&&(this.processedSymbols=zf.processedSymbols,this.symbolMap=zf.symbolMap,this.categorizedSymbols=zf.categorizedSymbols);const{chartSetting:v}=this.mainStore;v.setSettings(h),v.onSettingsChange=u,this.isMobile=o,this.whitespace=o?50:150,this.state=this.mainStore.state,this.mainStore.notifier.onMessage=c,this.granularity=void 0!==i?i:this.defaults.granularity,this.isLive=p||!1,this.startWithDataFitMode=m||!1,this.leftMargin=f,zf.chartCount+=1,this.feed=new Uf(this.api,this.mainStore,this.tradingTimes),this.enableRouting=l,this.enableRouting&&this.routingStore.handleRouting();const b=new If(this.rootNode);this.stateStore.stateChange("INITIAL"),this.loader.setState("market-symbol"),this.loader.setState("trading-time"),this.tradingTimes?.initialize().then(Be(()=>{if(this.isDestroyed)return;this.startWithDataFitMode?this.state?.clearLayout():this.state?.restoreLayout();const t=this.state?.symbol||r;this.changeSymbol(t||this.symbolMap&&Object.keys(this.symbolMap)[0],this.granularity),this.context=b,this.chartClosedOpenThemeChange(!this.currentActiveSymbol?.exchange_is_open),this.mainStore.chart.tradingTimes?.onMarketOpenCloseChanged(Be(t=>{for(const e in t)this.currentActiveSymbol?.symbol===e&&this.chartClosedOpenThemeChange(!t[e])})),this.contextPromise?.resolve?.(this.context),this.resizeScreen(),qe(()=>[this.state?.symbol,this.state?.granularity],()=>{void 0===this.state?.symbol&&void 0===this.state?.granularity||this.changeSymbol(this.state.symbol,this.state.granularity)}),this.tradingTimes?.onTimeChanged(this.onServerTimeChange),setTimeout(Be(()=>{this.shouldRenderDialogs=!0}),500)}))}chartClosedOpenThemeChange(t){this.mainStore.state.setChartClosed(t),this.mainStore.state.setChartTheme(this.mainStore.chartSetting.theme),this.mainStore.chartAdapter.setSymbolClosed(t)}onServerTimeChange(){this.tradingTimes?._serverTime&&(this.serverTime=vf()(1e3*this.tradingTimes._serverTime.getEpoch()).format("DD MMM YYYY HH:mm:ss [GMT]"))}updateCurrentActiveSymbol(t){this.currentActiveSymbol=t}setChartAvailability(t){this.isChartAvailable=t}changeSymbol(t,e,r=!1){"string"==typeof t&&(t=this.symbolMap[t]),t&&this.currentActiveSymbol&&t?.symbol===this.currentActiveSymbol?.symbol&&void 0!==e&&e===this.granularity&&!r||(this.newChart(t),void 0!==e&&(this.granularity=e),t&&this.updateCurrentActiveSymbol(t))}newChart(t=this.currentActiveSymbol){if(!t)return;this.currentActiveSymbol&&this.feed?.unsubscribe({symbol:this.currentActiveSymbol.symbol,granularity:this.granularity}),this.loader.show(),this.mainStore.state.setChartIsReady(!1);const e=e=>{this.loader.hide(),this.chartClosedOpenThemeChange(!t.exchange_is_open),this.mainStore.paginationLoader.updateOnPagination(!1),this.mainStore.state.setChartIsReady(!0)};this.mainStore.chartAdapter.newChart(),this.feed?.fetchInitialData(t.symbol,{granularity:this.mainStore.state.granularity,symbolObject:t},({quotes:t,error:r})=>{this.mainStore.chartAdapter.onTickHistory(t||[]),this.mainStore.chart.feed?.offMasterDataUpdate(this.mainStore.chartAdapter.onTick),this.mainStore.chart.feed?.onMasterDataUpdate(this.mainStore.chartAdapter.onTick),e()})}updateScaledOneOne(t){this.isScaledOneOne=t}refreshChart(){this.newChart()}destroy(){zf.chartCount-=1,this.isDestroyed=!0,this.resizeObserver&&this.resizeObserver.disconnect(),this.tradingTimes&&0===zf.chartCount&&(zf.tradingTimes=null,this.tradingTimes.destructor()),this.feed&&(this.feed.unsubscribeAll(),this.feed=null),this.mainStore.drawTools.destructor(),this.currentActiveSymbol=null,this.contextPromise=null,this.context=null}openFullscreen(){const t={element:["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],fnc_enter:["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],fnc_exit:["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"]},e=t.element.some(t=>document[t]&&null!==document[t]),r=e?document:document.documentElement,i=t[e?"fnc_exit":"fnc_enter"].find(t=>r[t]);i&&r[i]()?.catch(()=>{})}}qf(zf,"chartCount",0),qf(zf,"tradingTimes",void 0),qf(zf,"processedSymbols",void 0),qf(zf,"symbolMap",{}),qf(zf,"categorizedSymbols",[]);const $f=zf;function Gf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Wf{constructor({getContext:t,getItems:e,onItemSelected:r}){Gf(this,"getContext",void 0),Gf(this,"getItems",void 0),Gf(this,"onItemSelected",void 0),br(this,{onItemClick:Be.bound}),this.getContext=t,this.getItems=e,this.onItemSelected=r}onItemClick(t,e){this.onItemSelected&&this.onItemSelected(e)}}function Kf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Qf{get showTabs(){return!!this.description}constructor({mainStore:t,onChanged:e,onDeleted:r}){Kf(this,"mainStore",void 0),Kf(this,"menuStore",void 0),Kf(this,"onChanged",void 0),Kf(this,"onDeleted",void 0),Kf(this,"items",[]),Kf(this,"title",""),Kf(this,"formTitle",""),Kf(this,"formClassname",""),Kf(this,"description",""),Kf(this,"activeTab","settings"),Kf(this,"scrollPanel",void 0),Kf(this,"dialogPortalNodeId",void 0),Kf(this,"freezeScroll",!1),Kf(this,"id",""),Kf(this,"flutter_chart_id",""),Kf(this,"checkDropdownOpen",()=>{let t=!1;this.scrollPanel&&(this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown").forEach(e=>{-1!==e.className.indexOf("active")&&(t=!0)}),this.setFreezeScroll(t))}),br(this,{items:Mt,title:Mt,formTitle:Mt,formClassname:Mt,description:Mt,activeTab:Mt,showTabs:Vt,scrollPanel:Mt,dialogPortalNodeId:Mt,freezeScroll:Mt,open:Vt,setFreezeScroll:Be.bound,setOpen:Be.bound,onResetClick:Be.bound,onItemDelete:Be.bound,onItemChange:Be.bound,itemGroups:Vt,setScrollPanel:Be.bound}),this.mainStore=t,this.onChanged=e,this.onDeleted=r,this.menuStore=new hf(t,{route:"indicator-setting"}),qe(()=>this.open,()=>{if(!this.scrollPanel||!this.open)return;const t=this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown");this.scrollPanel.addEventListener("click",()=>{this.setFreezeScroll(!1)}),t.forEach(t=>{t.addEventListener("click",()=>setTimeout(()=>this.checkDropdownOpen(),50))}),this.setFreezeScroll(!1)},{delay:300})}get context(){return this.mainStore.chart.context}get theme(){return this.mainStore.chartSetting.theme}get open(){return this.menuStore.open}setFreezeScroll(t){this.freezeScroll=t}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}onResetClick(){const t=this.items.map(t=>({...t,value:na(t.defaultValue)}));this.items=t,this.onChanged(t)}onItemDelete(){this.menuStore.setOpen(!1),this.onDeleted&&this.onDeleted(this.id)}onItemChange(t,e){t&&t.value!==e&&(t.value=e,this.items=this.items.slice(0),this.onChanged(this.items))}get itemGroups(){const t=[],e=[];e.push({key:"%k",title:"%K",fields:[]}),e.push({key:"%d",title:"%D",fields:[]}),e.push({key:"over_bought",title:"Over Bought",fields:[]}),e.push({key:"over_sold",title:"OverSold",fields:[]}),e.push({key:"show_zones",title:"Show Zones",fields:[]});for(const r in this.items){const i=this.items[r],{group_key:a,title:s}=i,n=e.find(t=>a===t.key);n?(i.subtitle=s.replace(n.key,"").trim(),n.fields.push(i)):t.push(i)}return e.unshift({key:"others",title:this.formTitle||this.title,fields:t}),e}setScrollPanel(t){this.scrollPanel=t}}function Yf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Xf=[...mm].filter(t=>!t.candleOnly).map(t=>t.id);class Zf{constructor(t){Yf(this,"chartTypes",[]),Yf(this,"listStore",void 0),Yf(this,"mainStore",void 0),Yf(this,"menuStore",void 0),Yf(this,"settingsDialog",void 0),Yf(this,"type",mm.find(t=>"line"===t.id)),Yf(this,"onChartTypeChanged",void 0),Yf(this,"onContextReady",()=>{this.chartTypes=[...mm]}),br(this,{type:Mt,updateProps:Be.bound,setChartType:Be.bound,setType:Be.bound,isTypeCandle:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"chart-type"}),this.listStore=new Wf({getContext:()=>this.context,getItems:()=>this.types}),this.settingsDialog=new Qf({mainStore:t,onChanged:()=>null}),qe(()=>this.mainStore.state.chartType,()=>{void 0!==this.mainStore.state.chartType&&this.setType(this.mainStore.state.chartType)})}get context(){return this.mainStore.chart.context}get chartTypeProp(){return this.mainStore.state.chartType}get isCandle(){return!!this.type&&-1===Xf.indexOf(this.type.id)}get isSpline(){return"spline"===this.type.id}setChartType(t){t&&this.setType(t)}setType(t){let e;jm(Tm.ChartControl,km.ChartType,t),e="string"!=typeof(t=t||"line")?t:this.types.find(e=>e.id===t),e&&e.id!==this.type.id&&(this.type=e)}updateProps(t){this.onChartTypeChanged=t}get types(){const t=0===this.mainStore.chart.granularity;return void 0!==this.chartTypes&&0!==this.chartTypes.length||(this.chartTypes=[...mm]),this.chartTypes.map(e=>({...e,active:e.id===this.type.id,disabled:!!e.candleOnly&&t}))}isTypeCandle(t){return"string"==typeof t&&(t=this.types.find(e=>e.id===t)||this.types[0]),-1===Xf.indexOf(t.id)}}function Jf(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class t_{constructor(t){Jf(this,"mainStore",void 0),Jf(this,"menuStore",void 0),this.mainStore=t,this.menuStore=new hf(t,{route:"chart-mode"})}}const e_=Bm["__core-js_shared__"];var r_,i_=(r_=/[^.]+$/.exec(e_&&e_.keys&&e_.keys.IE_PROTO||""))?"Symbol(src)_1."+r_:"";var a_=Function.prototype.toString;var s_=/^\[object .+?Constructor\]$/,n_=Function.prototype,o_=Object.prototype,l_=n_.toString,c_=o_.hasOwnProperty,h_=RegExp("^"+l_.call(c_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const u_=function(t){return!(!Dm(t)||(e=t,i_&&i_ in e))&&(function(t){if(!Dm(t))return!1;var e=Qm(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?h_:s_).test(function(t){if(null!=t){try{return a_.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e},d_=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return u_(r)?r:void 0},g_=function(){try{var t=d_(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),p_=function(t,e){return t===e||t!=t&&e!=e};var m_=Object.prototype.hasOwnProperty;const f_=function(t,e,r){var i=t[e];m_.call(t,e)&&p_(i,r)&&(void 0!==r||e in t)||function(t,e,r){"__proto__"==e&&g_?g_(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}(t,e,r)},__=Array.isArray;var v_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b_=/^\w*$/;const y_=d_(Object,"create");var S_=Object.prototype.hasOwnProperty;var x_=Object.prototype.hasOwnProperty;function w_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}w_.prototype.clear=function(){this.__data__=y_?y_(null):{},this.size=0},w_.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},w_.prototype.get=function(t){var e=this.__data__;if(y_){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return S_.call(e,t)?e[t]:void 0},w_.prototype.has=function(t){var e=this.__data__;return y_?void 0!==e[t]:x_.call(e,t)},w_.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=y_&&void 0===e?"__lodash_hash_undefined__":e,this};const C_=w_,T_=function(t,e){for(var r=t.length;r--;)if(p_(t[r][0],e))return r;return-1};var k_=Array.prototype.splice;function j_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}j_.prototype.clear=function(){this.__data__=[],this.size=0},j_.prototype.delete=function(t){var e=this.__data__,r=T_(e,t);return!(r<0||(r==e.length-1?e.pop():k_.call(e,r,1),--this.size,0))},j_.prototype.get=function(t){var e=this.__data__,r=T_(e,t);return r<0?void 0:e[r][1]},j_.prototype.has=function(t){return T_(this.__data__,t)>-1},j_.prototype.set=function(t,e){var r=this.__data__,i=T_(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};const A_=j_,O_=d_(Bm,"Map"),E_=function(t,e){var r,i,a=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?a["string"==typeof e?"string":"hash"]:a.map};function N_(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}N_.prototype.clear=function(){this.size=0,this.__data__={hash:new C_,map:new(O_||A_),string:new C_}},N_.prototype.delete=function(t){var e=E_(this,t).delete(t);return this.size-=e?1:0,e},N_.prototype.get=function(t){return E_(this,t).get(t)},N_.prototype.has=function(t){return E_(this,t).has(t)},N_.prototype.set=function(t,e){var r=E_(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this};const I_=N_;function P_(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,a=e?e.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var n=t.apply(this,i);return r.cache=s.set(a,n)||s,n};return r.cache=new(P_.Cache||I_),r}P_.Cache=I_;const D_=P_;var L_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M_=/\\(\\)?/g;const B_=function(t){var e=D_(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(L_,function(t,r,i,a){e.push(i?a.replace(M_,"$1"):r||t)}),e});var R_=Um?Um.prototype:void 0,F_=R_?R_.toString:void 0;const V_=function t(e){if("string"==typeof e)return e;if(__(e))return function(t,e){for(var r=-1,i=null==t?0:t.length,a=Array(i);++r<i;)a[r]=e(t[r],r,t);return a}(e,t)+"";if(Ym(e))return F_?F_.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},H_=function(t,e){return __(t)?t:function(t,e){if(__(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ym(t))||b_.test(t)||!v_.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:B_(function(t){return null==t?"":V_(t)}(t))};var U_=/^(?:0|[1-9]\d*)$/;const q_=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&U_.test(t))&&t>-1&&t%1==0&&t<e},z_=function(t){if("string"==typeof t||Ym(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},$_=function(t,e,r){return null==t?t:function(t,e,r,i){if(!Dm(t))return t;for(var a=-1,s=(e=H_(e,t)).length,n=s-1,o=t;null!=o&&++a<s;){var l=z_(e[a]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(a!=n){var h=o[l];void 0===(c=i?i(h,l,o):void 0)&&(c=Dm(h)?h:q_(e[a+1])?[]:{})}f_(o,l,c),o=o[l]}return t}(t,e,r)};function G_(){let t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return"__"+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()+"__"}function W_(t){const e=t.replace("#","0xff");return parseInt(e,16)}function K_(t){return t&&"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):""}function Q_(t){return`#${("000000"+(16777215&t).toString(16).toUpperCase()).slice(-6)}`}var Y_=h(9160).t;function X_(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Z_{constructor(t){X_(this,"mainStore",void 0),X_(this,"menuStore",void 0),X_(this,"searchInput",void 0),X_(this,"settingsDialog",void 0),X_(this,"selectedTab",1),X_(this,"filterText",""),X_(this,"activeItems",[]),X_(this,"infoItem",null),X_(this,"portalNodeIdChanged",""),X_(this,"currentHoverIndex",null),X_(this,"previousHoverIndex",null),X_(this,"searchInputClassName",void 0),X_(this,"onContextReady",()=>{this.renderLegend()}),X_(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return W_(t);if(oa(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),X_(this,"addOrUpdateIndicator",(t,e)=>{const r=t.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if(oa(a)&&i){const e=a;Object.keys(e).forEach(r=>{$_(t,i[r],e[r])})}else r&&$_(t,r,a);return t},t.config||{}),i={id:t.id,name:t.flutter_chart_id,title:(t.short_name_and_index+(t.bars?` (${t.bars})`:"")).toUpperCase(),...this.transform(r)};this.mainStore.chartAdapter.flutterChart?.app.addOrUpdateIndicator(JSON.stringify(i),e)}),X_(this,"renderLegend",()=>{this.context&&this.updateStyle()}),X_(this,"getIndicatorProps",t=>{return(e=sm(),r=t=>t.items,e.reduce((t,e)=>[...t,...r(e)],[])).find(e=>e?.flutter_chart_id===t);var e,r}),br(this,{selectedTab:Mt,filterText:Mt,activeItems:Mt,infoItem:Mt,portalNodeIdChanged:Mt,onSelectItem:Be.bound,updateStyle:Be.bound,updateProps:Be.bound,editStudy:Be.bound,editStudyByIndex:Be.bound,deleteStudy:Be.bound,deleteStudyById:Be.bound,updateStudy:Be.bound,deletePredictionStudies:Be.bound,deleteAllStudies:Be.bound,onSelectTab:Be.bound,setFilterText:Be.bound,onInfoItem:Be.bound,updatePortalNode:Be.bound,restoreStudies:Be.bound,getItemById:Be.bound,setIndicator:Be.bound,highlightIndicator:Be.bound,clearHoverItem:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"indicators"}),this.settingsDialog=new Qf({mainStore:t,onDeleted:this.deleteStudyById,favoritesId:"indicators",onChanged:t=>this.updateStudy(t)}),this.searchInput=yi().createRef(),qe(()=>this.menuStore.open,()=>{this.menuStore.open||this.setFilterText(""),setTimeout(()=>{this.searchInput&&this.searchInput.current&&this.searchInput.current.focus()},400)})}get context(){return this.mainStore.chart.context}get items(){return[...sm()].map(t=>("trend"===t.name&&(t.icon="light"===this.mainStore.chartSetting.theme?up:dp),t))}get searchedItems(){return[...sm()].map(t=>(t.foundItems=t.items.filter(t=>-1!==t.name.toLowerCase().indexOf(this.filterText.toLowerCase().trim())),t)).filter(t=>t.foundItems?.length)}get hasPredictionIndicator(){return(this.activeItems||[]).filter(t=>t.isPrediction).length>0}get maxAllowedItem(){return this.mainStore.chart.isMobile?2:5}onSelectItem(t){if(this.onInfoItem(null),this.activeItems.length>=this.maxAllowedItem)return;this.changeStudyPanelTitle(),jm(Tm.ChartControl,km.Indicator,`Add ${t}`);const e=this.getIndicatorProps(t),{parameters:r,config:i}=pm(t);if(e&&r){r.map(t=>t.value=na(t.defaultValue));const t=ra(this.settingsDialog.flutter_chart_id,r),a=this.findLastActiveItem(e.flutter_chart_id),s=a?a.group_length+1:0,n={...e,group_length:s,short_name_and_index:e.short_name+(s?` ${s}`:""),id:G_(),config:i,parameters:r,bars:t.bars};sa(r,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(n),this.activeItems.push(n),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.mainStore.state.saveLayout()}}async restoreStudies(t){this.deleteAllStudies(),t.forEach((e,r)=>{const i=this.getIndicatorProps(e.flutter_chart_id);i?(this.addOrUpdateIndicator(e),Object.assign(e,i)):t.splice(r,1)}),this.activeItems=t,this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.cleanupPredictionIndicator()}updateTheme(){this.activeItems.forEach((t,e)=>{sa(t.parameters,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(t,e)}),this.mainStore.state.saveLayout()}updateStyle(){const t=this.mainStore.studies.activeItems.length>2;this.mainStore.state.setShouldMinimiseLastDigit(t)}updateProps({searchInputClassName:t}){this.searchInputClassName=t}editStudyByIndex(t){const e=this.activeItems[t];e&&this.editStudy(e)}editStudy(t){jm(Tm.ChartControl,km.Indicator,`Edit ${t.flutter_chart_id}`),this.settingsDialog.id=t.id,this.settingsDialog.flutter_chart_id=t.flutter_chart_id,this.settingsDialog.items=t.parameters,this.settingsDialog.title=t.name,this.settingsDialog.formTitle=Y_.translate("Result"),this.settingsDialog.formClassname=`form--${t.id.toLowerCase().replace(/ /g,"-")}`,this.settingsDialog.description="",this.settingsDialog.dialogPortalNodeId=this.portalNodeIdChanged,this.settingsDialog.setOpen(!0)}deleteStudyById(t){const e=this.activeItems.findIndex(e=>e.id===t);this.mainStore.chartAdapter.flutterChart?.indicators.removeIndicator(e),this.deleteStudy(e)}deleteStudy(t){jm(Tm.ChartControl,km.Indicator,`Remove ${t}`),this.mainStore.state.stateChange(bm,{indicator_type_name:this.activeItems[t].flutter_chart_id,indicators_category_name:Cm(this.activeItems[t].flutter_chart_id)}),this.activeItems.splice(t,1),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.renderLegend(),this.mainStore.state.saveLayout()}updateStudy(t){this.changeStudyPanelTitle();const e=this.getIndicatorProps(this.settingsDialog.flutter_chart_id),{config:r}=pm(this.settingsDialog.flutter_chart_id)||{};if(e&&t){const i=ra(this.settingsDialog.flutter_chart_id,t),a=this.activeItems.findIndex(t=>t.id===this.settingsDialog.id),s=this.activeItems[a],n={...e,short_name_and_index:e.short_name+(s.group_length?` ${s.group_length}`:""),group_length:s.group_length,id:this.settingsDialog.id,bars:i.bars,parameters:t,config:r};this.activeItems[a]=n,this.mainStore.state.stateChange("INDICATOR_EDITED",{indicator_type_name:n.flutter_chart_id,indicators_category_name:Cm(n.flutter_chart_id)}),this.addOrUpdateIndicator(n,a),this.mainStore.state.saveLayout()}}changeStudyPanelTitle(){this.mainStore.chart.isMobile&&this.mainStore.state.saveLayout()}deletePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(t.forEach(t=>{this.mainStore.state.stateChange(bm),this.deleteStudyById(t.id)}),this.mainStore.state.saveLayout())}savePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&Ui("predictionIndicators",t)}cleanupPredictionIndicator(){localStorage.getItem("predictionIndicators")&&localStorage.removeItem("predictionIndicators")}deleteAllStudies(){this.activeItems=[],window.flutterChart?.indicators.clearIndicators(),this.mainStore.state.saveLayout()}onSelectTab(t){this.setFilterText(""),this.selectedTab=t,this.onInfoItem(null)}setFilterText(t){this.selectedTab=""!==t?0:1,this.filterText=t,this.mainStore.state.debouncedStateChange("INDICATOR_SEARCH",{search_string:t})}onInfoItem(t){this.infoItem=t?{...t,disabledAddBtn:t.isPrediction&&this.mainStore.timeperiod.isTick}:t}setIndicator(t,e){this.addOrUpdateIndicator(t,e)}highlightIndicator(t){if(this.currentHoverIndex=t,this.previousHoverIndex!==this.currentHoverIndex){if("number"==typeof this.previousHoverIndex&&this.clearHoverItem(this.previousHoverIndex),null!=t){const e=na(this.activeItems[t]);if(e&&e.config){for(const t in e.config)t.includes("Style")&&(e.config[t].thickness=2,"scatterStyle"===t&&(e.config[t].radius=2.5)),t.includes("Styles")&&e.config[t].forEach(t=>{t.thickness=2});this.setIndicator(e,t)}}this.previousHoverIndex=t}}clearHoverItem(t){const e=this.activeItems[t];e&&this.setIndicator(e,t)}updatePortalNode(t){this.portalNodeIdChanged=t}findLastActiveItem(t){for(let e=this.activeItems.length-1;e>=0;e--)if(this.activeItems[e].flutter_chart_id===t)return this.activeItems[e]}getItemById(t){return this.activeItems.find(e=>e.id===t)}}function J_(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class tv{constructor(t){J_(this,"_pervDrawingObjectCount",0),J_(this,"_previousDrawingTools",[]),J_(this,"mainStore",void 0),J_(this,"menuStore",void 0),J_(this,"settingsDialog",void 0),J_(this,"activeToolsGroup",[]),J_(this,"portalNodeIdChanged",void 0),J_(this,"seletedDrawToolConfig",null),J_(this,"selectedToolId",null),J_(this,"showConfirmationToast",!1),J_(this,"confirmationMessage",""),J_(this,"showDeletionSnackbar",!1),J_(this,"deletedToolName",""),J_(this,"addingStateInfo",{currentStep:0,totalSteps:0,isFinished:!0}),J_(this,"floatingMenuPosition",void 0),J_(this,"getDrawToolsItems",()=>{const t=am();return Object.keys(t).map(e=>t[e])}),J_(this,"drawingToolsRepoArray",()=>this.mainStore.chartAdapter.flutterChart?.drawingTool.getDrawingToolsRepoItems().map(t=>Hi(t)).filter(t=>t)),J_(this,"onContextReady",()=>{document.addEventListener("keydown",this.closeOnEscape,!1),document.addEventListener("dblclick",this.doubleClick)}),J_(this,"closeOnEscape",t=>{27===t.keyCode&&(this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished())}),J_(this,"doubleClick",()=>this.drawingFinished()),J_(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return W_(t);if(oa(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),J_(this,"updateFloatingMenuPosition",({x:t,y:e})=>{this.floatingMenuPosition={x:t,y:e},this.mainStore.chartAdapter.flutterChart?.drawingTool.updateFloatingMenuPosition(t,e)}),J_(this,"setSelectedTool",t=>{this.selectedToolId=t,this.showConfirmationToast=!0}),J_(this,"clearSelectedTool",()=>{this.selectedToolId=null,this.showConfirmationToast=!1}),J_(this,"startAddingNewTool",t=>{this.setSelectedTool(t),this.menuStore.setOpen(!1),this.mainStore.chartAdapter.flutterChart?.drawingTool.startAddingNewTool(t)}),J_(this,"cancelAddingNewTool",()=>{this.mainStore.chartAdapter.flutterChart?.drawingTool.cancelAddingNewTool(),this.hideDrawingConfirmation()}),J_(this,"hideDrawingConfirmation",()=>{this.showConfirmationToast=!1,this.confirmationMessage="",this.resetAddingState(),this.clearSelectedTool()}),J_(this,"hideDeletionSnackbar",()=>{this.showDeletionSnackbar=!1,this.deletedToolName=""}),J_(this,"showDeletionSnackbarForDeletedTool",t=>{this.deletedToolName=t,this.showDeletionSnackbar=!0}),J_(this,"cancelDrawingTool",()=>{this.hideDrawingConfirmation(),this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished()}),J_(this,"updateAddingState",(t,e)=>{this.addingStateInfo={currentStep:t,totalSteps:e,isFinished:t===e}}),J_(this,"resetAddingState",()=>{this.addingStateInfo={currentStep:0,totalSteps:0,isFinished:!0}}),J_(this,"updateProps",t=>{t.drawingToolFloatingMenuPosition&&this.updateFloatingMenuPosition(t.drawingToolFloatingMenuPosition)}),J_(this,"handleStateChange",(t,e,r)=>{this.mainStore.state.stateChange(e,{drawing_tool_name:t,...r??{}})}),br(this,{activeToolsGroup:Mt,portalNodeIdChanged:Mt,selectedToolId:Mt,showConfirmationToast:Mt,confirmationMessage:Mt,showDeletionSnackbar:Mt,deletedToolName:Mt,addingStateInfo:Mt,floatingMenuPosition:Mt,activeToolsNo:Vt,destructor:Be.bound,drawingFinished:Be.bound,clearAll:Be.bound,updateActiveToolsGroup:Be.bound,onDeleted:Be.bound,updatePortalNode:Be.bound,onLoad:Be.bound,onToolAdded:Be.bound,hideDrawingConfirmation:Be.bound,hideDeletionSnackbar:Be.bound,showDeletionSnackbarForDeletedTool:Be.bound,cancelDrawingTool:Be.bound,updateAddingState:Be.bound,resetAddingState:Be.bound,updateProps:Be.bound,updateFloatingMenuPosition:Be.bound,setSelectedTool:Be.bound,clearSelectedTool:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"draw-tool"}),this.settingsDialog=new Qf({mainStore:t,onDeleted:t=>{const e=this.drawingToolsRepoArray(),r=e?.findIndex(e=>e.configId===t);void 0!==r&&r>-1&&this.onDeleted(r)},onChanged:()=>{}}),cr(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get stateStore(){return this.mainStore.state}get activeToolsNo(){return this.activeToolsGroup.reduce((t,e)=>t+e.items.length,0)}destructor(){document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("dblclick",this.doubleClick)}updateTheme(){this.activeToolsGroup.forEach(t=>t.items.forEach(t=>{sa(t.parameters,this.mainStore.chartSetting.theme)}))}onLoad(t){this.activeToolsGroup=[],t.forEach(t=>{if("string"==typeof t&&(t=Hi(t)),!t)return;const e=t.name.replace("dt_","");if(e){const r=this.processDrawTool(e);r.config=t,r.parameters.forEach(e=>{e.path&&(["lineStyle","fillStyle"].includes(e.path)?e.value=Q_(t[e.path]?.color?.value??t[e.path]?.color):"enableLabel"===e.path&&(e.value=t[e.path]))}),this.updateActiveToolsGroup(r)}});const e=this.drawingToolsRepoArray();e&&(this._previousDrawingTools=JSON.parse(JSON.stringify(e)))}onToolAdded(t){t.lineStyle&&this.handleStateChange(t.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_ADD",{drawing_tool_name:t.name?.replace("dt_","")||"unknown",pxthickness:`default_${t.lineStyle.thickness}px`,color_name:`default_${Q_(Number(t.lineStyle.color)).replace("#","")}`})}drawingFinished(){this.hideDrawingConfirmation()}clearAll(){this.activeToolsGroup=[],window.flutterChart?.drawingTool.clearDrawingTool(),jm(Tm.ChartControl,km.DrawTools,"Clear All")}processDrawTool(t){const e=am()[t],{parameters:r,config:i}=hm[t]();sa(r,this.mainStore.chartSetting.theme),sa(i,this.mainStore.chartSetting.theme);let a=null;if(e&&r){r.map(t=>t.value=na(t.defaultValue));const s={config:i,parameters:r,bars:"0",...e},n=s.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if(oa(a)&&i){const e=a;Object.keys(e).forEach(r=>{$_(t,i[r],e[r])})}else r&&$_(t,r,a);return t},s.config||{});a={...{id:s.id,name:`dt_${t}`,title:K_(s.id),...this.transform(n)},...am()[t],parameters:r,index:this.activeToolsNo}}return a}onUpdate(){const t=this.drawingToolsRepoArray();if(t){if(this._previousDrawingTools&&this._previousDrawingTools.length===t.length)for(let e=0;e<t.length;e++)JSON.stringify(this._previousDrawingTools[e])!==JSON.stringify(t[e])&&this._identifyChanges(this._previousDrawingTools[e],t[e]);this._previousDrawingTools=JSON.parse(JSON.stringify(t)),this.onLoad(t)}}_identifyChanges(t,e){if(!t||!e)return"Complete replacement";Object.keys(e).forEach(r=>{["lineStyle","fillStyle"].includes(r)&&"object"==typeof e[r]&&null!==e[r]&&"object"==typeof t[r]&&null!==t[r]&&(e[r].color!==t[r].color&&this.handleStateChange(e.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_EDIT_COLOR",{drawing_tool_name:e.name?.replace("dt_","")||"unknown",color_name:`${Q_(e[r].color).replace("#","")}`}),e[r].thickness!==t[r].thickness&&this.handleStateChange(e.name?.replace("dt_","")||"unknown","DRAWING_TOOLS_EDIT_PX",{drawing_tool_name:e.name?.replace("dt_","")||"unknown",pxthickness:`${e[r].thickness}px`}))})}updateActiveToolsGroup(t){const e=[...this.activeToolsGroup],r=e.findIndex(e=>e.id===t.id);if(-1===r)e.push({id:t.id,items:[t]});else{const i=e[r];i.items.push({...t,num:i.items.length}),e[r]=i}this.activeToolsGroup=e}onDeleted(t){if(void 0!==t){const e=this.drawingToolsRepoArray(),r=e?e[t]:null;if(r){const e={...r};this.mainStore.chartAdapter.flutterChart?.drawingTool.removeDrawingTool(t),this.handleStateChange(e.name?.replace("dt_","")||"unknown",xm,{pxthickness:e.lineStyle?.thickness?`${e.lineStyle.thickness}px`:void 0,color_name:e.lineStyle?.color?`${Q_(Number(e.lineStyle.color)).replace("#","")}`:void 0})}t&&r&&jm(Tm.ChartControl,km.DrawTools,`Remove ${t}`)}}updatePortalNode(t){this.portalNodeIdChanged=t}}function ev(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class rv{constructor(){ev(this,"className",""),ev(this,"price",0),ev(this,"isIncrease",!1),ev(this,"status",""),ev(this,"oldPrice",0),br(this,{price:Mt,isIncrease:Mt,status:Mt,setPrice:Be.bound})}setPrice(t,e){const r=e||+this.oldPrice,i=+t;let a=!1;if(i>r)a=!0,this.status="up";else{if(!(i<r))return void(this.status="");this.status="down"}this.price=t,this.oldPrice=this.price,this.isIncrease=a}}var iv=h(9160).t;function av(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class sv{constructor({getCategoricalItems:t,onSelectItem:e,getIsShown:r,placeholderText:i,favoritesId:a,mainStore:s,id:n,getCurrentActiveCategory:o,getCurrentActiveSubCategory:l,getCurrentActiveMarket:c,searchInputClassName:h}){av(this,"activeMarket",void 0),av(this,"activeSubCategory",""),av(this,"categoryElements",void 0),av(this,"favoritesId",void 0),av(this,"getCategoricalItems",void 0),av(this,"getCurrentActiveCategory",void 0),av(this,"getCurrentActiveMarket",void 0),av(this,"getCurrentActiveSubCategory",void 0),av(this,"id",void 0),av(this,"isInit",void 0),av(this,"mainStore",void 0),av(this,"onSelectItem",void 0),av(this,"pauseScrollSpy",!1),av(this,"searchInput",void 0),av(this,"searchInputClassName",void 0),av(this,"placeholderText",void 0),av(this,"isShown",!1),av(this,"scrollPanel",void 0),av(this,"filterText",""),av(this,"activeCategoryKey",""),av(this,"focusedCategoryKey",null),av(this,"isScrollingDown",!1),av(this,"activeHeadKey",""),av(this,"scrollTop",void 0),av(this,"isUserScrolling",!0),av(this,"lastFilteredItems",[]),av(this,"activeCategories",[]),br(this,{isShown:Mt,scrollPanel:Mt,filterText:Mt,activeCategoryKey:Mt,focusedCategoryKey:Mt,isScrollingDown:Mt,activeHeadKey:Mt,init:Be.bound,favoritesCategoryData:Vt,getFavorites:Be.bound,filteredItems:Vt,updateScrollSpy:Be.bound,scrollUp:Be.bound,scrollDown:Be.bound,setCategoryElement:Be.bound,setFilterText:Be.bound,handleFilterClick:Be.bound,setScrollPanel:Be.bound,handleTitleClick:Be.bound,scrollToActiveSymbol:Be.bound}),qe(()=>r&&r()&&this.scrollPanel,()=>{r()&&this.scrollPanel&&this.scrollToActiveSymbol()},{delay:200}),this.getCategoricalItems=t,this.onSelectItem=e,this.favoritesId=a,this.id=n,this.categoryElements={},this.mainStore=s,this.getCurrentActiveCategory=o,this.getCurrentActiveSubCategory=l,this.getCurrentActiveMarket=c,this.isInit=!1,this.searchInput=yi().createRef(),this.searchInputClassName=h,this.placeholderText=i}get chart(){return this.mainStore.chart}get context(){return this.chart.context}get height(){return this.chart.chartContainerHeight?this.chart.chartContainerHeight-(this.chart.isMobile?0:120):0}init(){if(this.isInit=!0,""===this.activeCategoryKey&&this.filteredItems.length>0)for(const t of this.filteredItems)if(this.categoryElements[t.categoryId]){this.activeCategoryKey=t.categoryId;break}}get favoritesCategoryData(){return Object.keys(this.mainStore.favorites.favoritesMap[this.favoritesId])||[]}getFavorites(){this.pauseScrollSpy=!0;const t={categoryName:iv.translate("Favorites"),categoryId:"favorite",hasSubcategory:!1,hasSubgroup:!1,active:!0,subgroups:[],emptyDescription:iv.translate("There are no favorites yet.")};return setTimeout(()=>{this.pauseScrollSpy=!1},20),t}get filteredItems(){let t=function(t,e=t=>t){const r=[];for(const i of t)if(i.hasSubgroup){const t=i.subgroups.map(t=>Zi(t,e));r.push({...i,subgroups:t})}else r.push(Zi(i,e));return r}(this.getCategoricalItems());const e=this.activeCategories.length?this.activeCategories:[this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite"];for(const r of t)if(e.includes(r.categoryId))r.active=!0;else if(r.hasSubgroup)for(const t of r.subgroups)e.includes(t.categoryId)&&(t.active=!0);if(this.favoritesId){const e={...this.getFavorites(),data:this.favoritesCategoryData},r=t=>{const i=[];return t.hasSubgroup&&"categoryName"in t?t.subgroups.forEach(t=>t.data.forEach(t=>{const e=r(t);i.push(...e)})):t.hasSubcategory?t.data.forEach(t=>{const e=r(t);i.push(...e)}):e.data.forEach(e=>{if("string"==typeof e){const r=t.data.find(t=>t.itemId===e);r&&i.push(r)}}),i},i=e.data.filter(t=>"string"!=typeof t);t.forEach(t=>{const e=r(t);i.push(...e)}),e.data=i.filter(t=>t),t.unshift(e)}if(""===this.filterText)return this.lastFilteredItems=t,t;let r=!1;const i=this.filterText.split(" ").filter(t=>""!==t).map(t=>t.toLowerCase().trim()),a=t=>{t.data=t.data.filter(t=>{return e=t.display||("object"==typeof t.dataObject?t.dataObject.symbol:""),i.reduce((t,r)=>e.toLowerCase().includes(r)&&t,!0);var e}),t.data.length&&(r=!0)};for(const e of t)if(e.active=!0,e.hasSubgroup){e.subgroups=or(e.subgroups);for(const t of e.subgroups){t.active=!0;for(const e of t.data)a(e)}}else if(e.hasSubcategory)for(const t of e.data)a(t);else a(e);return r||(t=this.lastFilteredItems),this.pauseScrollSpy||(this.lastFilteredItems=t),t}updateScrollSpy(){if(this.pauseScrollSpy||!this.scrollPanel)return;if(0===this.filteredItems.length)return;const t=this.scrollPanel.getBoundingClientRect().top;let e=null;for(const r of this.filteredItems){const i=this.categoryElements[r.categoryId],a=57;if(!i)return;const s=this.filteredItems.indexOf(r)*(r.hasSubgroup?r.subgroups.length+1*a:a),n=i.getBoundingClientRect();n.top-t-s<0&&(e=r.hasSubgroup?r.subgroups[r.subgroups.length>1?+(n.top<0):0]?.categoryId:r?.categoryId)}const r=this.scrollPanel.getBoundingClientRect().top;this.scrollTop&&this.scrollTop>r?this.scrollUp():this.scrollDown(),this.scrollTop=r,this.focusedCategoryKey=e||this.filteredItems[0].categoryId,this.activeHeadKey=0===this.scrollTop?null:this.focusedCategoryKey}scrollUp(){this.isScrollingDown=!1}scrollDown(){this.isScrollingDown=this.isUserScrolling,this.isUserScrolling=!0}setCategoryElement(t,e){this.categoryElements[e]=t}setFilterText(t){this.filterText=t,this.isUserScrolling=!1,this.updateScrollSpy(),""===t&&setTimeout(()=>this.scrollToActiveSymbol(),1),this.mainStore.state.debouncedStateChange("MARKET_SEARCH",{search_string:t})}handleFilterClick(t){this.focusedCategoryKey="";const e=this.categoryElements[t],r=40*Object.keys(this.categoryElements).indexOf(t);e&&(this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&(this.chart.isMobile?this.scrollPanel.scroll({top:e.offsetTop-95,left:0,behavior:"smooth"}):this.scrollPanel.scrollTop=e.offsetTop-r),this.focusedCategoryKey=t,this.activeHeadKey=null,setTimeout(()=>{this.pauseScrollSpy=!1},20))}setScrollPanel(t){this.scrollPanel=t}handleTitleClick(t){this.activeCategories=[];for(const e of this.filteredItems){if(e.hasSubgroup?e.subgroups?.filter(e=>e.categoryId===t).length>0:e.categoryId===t){if(e.hasSubgroup)for(const r of e.subgroups)r.categoryId===t&&(r.active=!r.active);e.active=!e.active,setTimeout(()=>this.handleFilterClick(e.categoryId),250)}if(e.active&&e.hasSubgroup)for(const t of e.subgroups)t.active&&this.activeCategories.push(t.categoryId);else e.active&&"favorite"!==e.categoryId&&this.activeCategories.push(e.categoryId)}setTimeout(()=>this.updateScrollSpy(),0)}scrollToActiveSymbol(){this.focusedCategoryKey=null,this.activeCategoryKey=this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite",this.activeSubCategory=this.getCurrentActiveSubCategory?this.getCurrentActiveSubCategory():"",this.activeMarket=this.getCurrentActiveMarket?this.getCurrentActiveMarket():"";const t=this.categoryElements[this.activeCategoryKey],e=`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__category__content--${this.activeSubCategory}`,r=this.scrollPanel?.querySelector(e),i=`${e} .sc-mcd__item--${this.activeMarket}`,a=this.scrollPanel?.querySelector(i);if(this.activeHeadKey=this.activeCategoryKey||null,this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&t&&this.scrollPanel)if(this.scrollPanel.scrollTop=t.offsetTop,a){const e=this.mainStore.chart.isMobile?100:40;this.scrollPanel.scrollTop=t.offsetTop+a.offsetTop-e}else if(r){const e=this.mainStore.chart.isMobile?100:0;this.scrollPanel.scrollTop=t.offsetTop+r.offsetTop-e}if(setTimeout(()=>{this.pauseScrollSpy=!1},20),this.isInit||this.init(),this.mainStore.chart.isMobile||setTimeout(()=>this.searchInput.current&&this.searchInput.current.focus(),0),!this.mainStore.chart.isMobile){const t=Object.keys(this.categoryElements),e=t.filter(t=>null!==this.categoryElements[t]),r=t[t.length-1],i=this.height-(64+40*(e.length-1)),a=this.categoryElements[r];a&&(a.style.minHeight=`${i}px`)}}}var nv=h(9160).t;function ov(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class lv{constructor(t){ov(this,"animatedPrice",void 0),ov(this,"categoricalDisplay",void 0),ov(this,"mainStore",void 0),ov(this,"menuStore",void 0),ov(this,"serverTime",void 0),ov(this,"todayChange",null),ov(this,"todayChangePercent",null),ov(this,"isVisible",!1),ov(this,"openMarket",{}),ov(this,"enableShowPrice",!1),ov(this,"searchInputClassName",void 0),ov(this,"onContextReady",()=>{this.chart.feed?.onMasterDataUpdate(this.update),this.update(),this.tradingTimes?.onMarketOpenCloseChanged(Be(t=>{for(const e in t)this.currentSymbol?.symbol===e&&(this.currentSymbol.exchange_is_open=t[e])}))}),ov(this,"onMouseEnter",()=>this.crosshairStore.setTemporaryDisabled(!0)),ov(this,"onMouseLeave",()=>this.crosshairStore.setTemporaryDisabled(!1)),br(this,{todayChange:Mt,todayChangePercent:Mt,isVisible:Mt,openMarket:Mt,currentSymbol:Vt,isSymbolOpen:Vt,decimalPlaces:Vt,isShowChartPrice:Vt,tradingTimes:Vt,symbolOpenTime:Vt,currentActiveCategory:Vt,currentActiveSubCategory:Vt,currentActiveMarket:Vt,setSymbol:Be.bound,update:Be.bound,hidePrice:Be.bound,updateProps:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady),this.menuStore=new hf(t,{route:"chart-title"}),this.animatedPrice=new rv,this.categoricalDisplay=new sv({getCategoricalItems:()=>this.mainStore.chart.categorizedSymbols,getIsShown:()=>this.menuStore.open,placeholderText:nv.translate("Search..."),favoritesId:"chartTitle&Comparison",mainStore:t,id:"market_dropdown",getCurrentActiveCategory:()=>this.currentActiveCategory,getCurrentActiveSubCategory:()=>this.currentActiveSubCategory,getCurrentActiveMarket:()=>this.currentActiveMarket,searchInputClassName:this.searchInputClassName}),this.serverTime=Pm.getInstance()}get chart(){return this.mainStore.chart}get context(){return this.mainStore.chart.context}get crosshairStore(){return this.mainStore.crosshair}get currentSymbol(){return this.mainStore.chart.currentActiveSymbol}get isSymbolOpen(){return this.currentSymbol?.exchange_is_open}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isShowChartPrice(){return this.mainStore.chart.isChartAvailable}get tradingTimes(){return this.mainStore.chart.tradingTimes}get symbolOpenTime(){const t=this.tradingTimes?._tradingTimesMap&&this.tradingTimes._tradingTimesMap.length&&this.currentSymbol?this.tradingTimes._tradingTimesMap[this.currentSymbol.symbol].times:[],e=this.serverTime.getLocalDate().getTime();let r=t?t.find(t=>t.open.getTime()>e):null;return r instanceof Date||(r=null),{openTime:r}}get currentActiveCategory(){const t=this.mainStore.chart.currentActiveSymbol;return this.openMarket.category?this.openMarket.category:"none"!==t?.subgroup?t?.subgroup:t?t.market:"favorite"}get currentActiveSubCategory(){return this.openMarket.subcategory?this.openMarket.subcategory:this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.symbol:""}get currentActiveMarket(){return this.openMarket.market?this.openMarket.market:null}setSymbol(t){void 0===this.mainStore.state.symbol?this.chart.changeSymbol(t):console.error("Changing symbol does nothing because symbol prop is being set. Consider overriding the onChange prop in <ChartTitle />")}update(t){if(!this.currentSymbol)return;const e=t||!this.isShowChartPrice;if(!e)return;let r=t?.Close;if(r){r=+r.toFixed(this.decimalPlaces);const e=t?.prevClose||this.animatedPrice.price;this.animatedPrice.setPrice(r,e),e&&(this.todayChange=Math.abs(r-e).toFixed(this.decimalPlaces),this.todayChangePercent=(Number(this.todayChange)/e*100).toFixed(2))}this.isVisible||!e||this.enableShowPrice?this.isVisible=e:this.enableShowPrice=!0}hidePrice(){this.isVisible=!1,this.enableShowPrice=!1}updateProps({open_market:t,open:e}){t&&(this.openMarket=t),e&&this.menuStore.setOpen(!0)}}function cv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class hv{constructor(t){cv(this,"templateName",""),cv(this,"currentRoute","main"),cv(this,"isInputActive",!1),cv(this,"views",Vi("chart-views")||[]),cv(this,"routes",{add:()=>this.saveViews(),main:()=>this.updateRoute("add"),cancel:()=>this.onCancel(),overwrite:()=>this.overwrite()}),cv(this,"mainStore",void 0),cv(this,"menuStore",void 0),br(this,{templateName:Mt,currentRoute:Mt,isInputActive:Mt,routes:Mt,views:Mt,sortedItems:Vt,onChange:Be.bound,onSubmit:Be.bound,onCancel:Be.bound,updateRoute:Be.bound,saveViews:Be.bound,overwrite:Be.bound,remove:Be.bound,removeAll:Be.bound,applyLayout:Be.bound,onToggleNew:Be.bound,inputRef:Be.bound,onFocus:Be.bound,onBlur:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"templates"}),qe(()=>this.menuStore.dialogStore.open,()=>{0===this.views.length?this.updateRoute("new"):this.updateRoute("main"),this.menuStore.dialogStore.open&&(this.templateName="")})}get context(){return this.mainStore.chart.context}get loader(){return this.mainStore.loader}get sortedItems(){return[...this.views].sort((t,e)=>t.name.toLowerCase()<e.name.toLowerCase()?-1:1)}updateLocalStorage(){localStorage.setItem("chart-views",JSON.stringify(this.views))}onChange(t){"overwrite"!==this.currentRoute&&(this.templateName=t.target.value)}onSubmit(t){13===t.keyCode&&(this.saveViews(),jm(Tm.ChartControl,km.Template,"Save Template"))}onCancel(){this.templateName="",this.updateRoute("main")}updateRoute(t){this.currentRoute=t}getLayout(){return{chartType:this.mainStore.state.chartType,granularity:this.mainStore.state.granularity,timeUnit:this.mainStore.state.timeperiodStore.timeUnit,studyItems:this.mainStore.studies.activeItems,drawTools:this.mainStore.drawTools.activeToolsGroup,msPerPx:this.mainStore.chartAdapter.msPerPx}}saveViews(){this.views.some(t=>t.name.toLowerCase().trim()===this.templateName.toLowerCase().trim())?this.updateRoute("overwrite"):this.templateName.trim().length>0&&(this.updateRoute("main"),this.views.push({name:this.templateName.trim(),layout:na(this.getLayout())}),this.updateLocalStorage(),this.templateName="")}overwrite(){const t=na(this.getLayout()),e=this.views.findIndex(t=>t.name.toLowerCase()===this.templateName.toLowerCase());this.views[e].layout=t,this.views[e].name=this.templateName.trim(),this.updateLocalStorage(),this.updateRoute("main"),this.templateName=""}remove(t,e){this.views=this.sortedItems.filter((e,r)=>t!==r),e.nativeEvent.is_item_removed=!0,this.updateLocalStorage(),jm(Tm.ChartControl,km.Template,"Remove Template")}removeAll(){this.views=[],this.updateLocalStorage(),jm(Tm.ChartControl,km.Template,"Remove All Templates"),this.updateRoute("new")}applyLayout(t,e,r,i){if(e.nativeEvent.is_item_removed)return;this.mainStore.crosshair.setTemporaryDisabled(!0);const{layout:a}=this.sortedItems[t];r(a.granularity),i(a.chartType),this.restoreLayout(na(a)),jm(Tm.ChartControl,km.Template,"Load Template")}async restoreLayout(t){this.loader&&this.loader.show(),this.mainStore.chartAdapter.msPerPx=t.msPerPx,this.mainStore.state.setChartIsReady(!1),void 0!==t.chartType&&this.mainStore.chartType.setChartType(t.chartType),this.menuStore.setOpen(!1),await cr(()=>this.mainStore.chartAdapter.isChartLoaded),this.mainStore.studies.restoreStudies(t.studyItems||[]),(()=>{this.loader&&(this.loader.hide(),this.mainStore.paginationLoader.updateOnPagination(!1)),this.mainStore.state.setChartIsReady(!0),void 0!==t.granularity&&this.mainStore.timeperiod.setGranularity(t.granularity)})()}onToggleNew(){this.updateRoute("main")}inputRef(t){t&&(t.focus(),this.isInputActive=!0)}onFocus(){this.isInputActive=!0}onBlur(){this.isInputActive=!1}}function uv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const dv="is_crosshair_enabled",gv=class{constructor(t){uv(this,"mainStore",void 0),uv(this,"isEnabled",!0),uv(this,"isTemporarilyDisabled",!1),uv(this,"shouldPersist",!0),uv(this,"updateEnabledState",t=>{this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive);try{this.shouldPersist&&"undefined"!=typeof window&&window.localStorage&&localStorage.setItem(dv,t.toString())}catch{}this.stateChange("CROSSHAIR_CLICK",{cta_name:t?"enable":"disable"})}),uv(this,"setTemporaryDisabled",t=>{this.isTemporarilyDisabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),uv(this,"setInitialEnabledState",t=>{this.shouldPersist=!1,this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),uv(this,"stateChange",(t,e={})=>{this.mainStore.state.stateChange(t,e)}),br(this,{isEnabled:Mt,isTemporarilyDisabled:Mt,isFunctionallyActive:Vt}),this.mainStore=t;try{if("undefined"!=typeof window&&window.localStorage){const t=localStorage.getItem(dv);null!==t&&(this.isEnabled="true"===t)}}catch{}cr(()=>this.mainStore.chartAdapter.isChartLoaded,()=>{this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)})}get isFunctionallyActive(){return this.isEnabled&&!this.isTemporarilyDisabled}};function pv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class mv{constructor(t){pv(this,"mainStore",void 0),pv(this,"menuStore",void 0),pv(this,"screenshotArea",void 0),pv(this,"isLoadingPNG",!1),pv(this,"onContextReady",()=>{this.screenshotArea=(this.context?.topNode).querySelector(".ciq-chart")}),br(this,{timeUnit:Vt,timeperiodDisplay:Vt,marketDisplayName:Vt,decimalPlaces:Vt,isLoadingPNG:Mt,downloadPNG:Be.bound,_onCanvasReady:Be.bound,downloadCSV:Be.bound}),this.mainStore=t,this.menuStore=new hf(t,{route:"download"}),cr(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get timeUnit(){return this.mainStore.timeperiod.timeUnit}get timeperiodDisplay(){return this.mainStore.timeperiod.display}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?.name}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}createNewTab(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)?window.open():null}downloadPNG(){this.isLoadingPNG=!0;const t=this.createNewTab();h.e(526).then(h.t.bind(h,2939,23)).then(e=>{this.screenshotArea?.classList.add("ciq-chart--screenshot");const r=[],i=[];(this.screenshotArea?.querySelectorAll("svg")||[]).forEach(t=>{const e=t.parentNode,a=document.createElement("canvas");a.width=Number(getComputedStyle(t).width.match(/[0-9]+/)),a.height=Number(getComputedStyle(t).height.match(/[0-9]+/));const s=a.getContext("2d"),n=getComputedStyle(t).fill;if(n){const e=n.split(",").map(t=>Number(t.replace(/\D+/g,"")).toString(16).padStart(2,"0")).join("");s&&e>"333333"&&(s.fillStyle=getComputedStyle(t).fill,s.fillRect(0,0,a.width,a.height),s.globalCompositeOperation="destination-in")}const o=new Image;o.src=t.querySelector("use")?.getAttribute?.("xlink:href")||"",o.onload=()=>{s&&s.drawImage(o,0,0),Gi()||Wi()||(r.push({parent:e,child:t}),e?.removeChild(t),i.push({parent:e,child:a}),e?.appendChild(a))}}),setTimeout(()=>{e.default(this.screenshotArea).then(e=>{this._onCanvasReady(e,t),Gi()||Wi()||(i.forEach(t=>{t?.parent?.contains(t.child)&&t.child instanceof HTMLCanvasElement&&t.parent?.removeChild?.(t.child)}),r.forEach(t=>{t.parent?.appendChild(t.child)}))})},100)}),jm(Tm.ChartControl,km.Download,"Download PNG")}_onCanvasReady(t,e){const r=t.toDataURL("image/png");Ki(`${(new Date).toUTCString()}.png`,r,"image/png;",e),this.isLoadingPNG=!1,this.screenshotArea?.classList.remove("ciq-chart--screenshot")}downloadCSV(){const t="tick"===this.timeUnit,e=[`Date,Time,${t?this.marketDisplayName:"Open,High,Low,Close"}`],r=this.mainStore.chart.feed?.quotes||[],i=r.length;(i<=100?r:r.slice(i-100,i)).forEach(({DT:r,Open:i,High:a,Low:s,Close:n})=>{if(!r)return;const o=r.getFullYear(),l=r.getMonth()+1,c=r.getDate(),h=r.getHours(),u=r.getMinutes(),d=r.getSeconds(),g=`${o}-${l>9?l:`0${l}`}-${c>9?c:`0${c}`}`,p=`${h>9?h:`0${h}`}:${u>9?u:`0${u}`}${t?d>9?`:${d}`:`:0${d}`:""}`;t&&n&&e.push(`${g},${p},${n}`),!t&&i&&a&&s&&n&&e.push([g,p,i.toFixed(this.decimalPlaces),a.toFixed(this.decimalPlaces),s.toFixed(this.decimalPlaces),n.toFixed(this.decimalPlaces)].join(","))}),Ki(`${this.marketDisplayName} (${this.timeperiodDisplay}).csv`,e.join("\n"),"text/csv;charset=utf-8;",this.createNewTab()),jm(Tm.ChartControl,km.Download,"Download CSV")}}var fv=h(9160).t;function _v(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class vv{constructor(t){_v(this,"mainStore",void 0),_v(this,"menuStore",void 0),_v(this,"language",""),_v(this,"position","bottom"),_v(this,"theme","light"),_v(this,"countdown",!1),_v(this,"historical",!1),_v(this,"isAutoScale",!0),_v(this,"isHighestLowestMarkerEnabled",!0),_v(this,"isSmoothChartEnabled",!1),_v(this,"minimumLeftBars",void 0),_v(this,"whitespace",void 0),_v(this,"languages",[]),_v(this,"defaultLanguage",{}),_v(this,"onSettingsChange",void 0),br(this,{language:Mt,position:Mt,theme:Mt,countdown:Mt,historical:Mt,isAutoScale:Mt,isHighestLowestMarkerEnabled:Mt,isSmoothChartEnabled:Mt,minimumLeftBars:Mt,updateActiveLanguage:Be.bound,setLanguage:Be.bound,setTheme:Be.bound,setPosition:Be.bound,showCountdown:Be.bound,setHistorical:Be.bound,setAutoScale:Be.bound,setWhiteSpace:Be.bound,toggleHighestLowestMarker:Be.bound,toggleSmoothChart:Be.bound,whitespace:Mt}),this.defaultLanguage=this.languages[0],this.mainStore=t,this.menuStore=new hf(t,{route:"setting"});const e=localStorage.getItem("is_smooth_chart_enabled");null!==e&&(this.isSmoothChartEnabled="true"===e),qe(()=>this?.language?.key,()=>{t?.chart?.changeSymbol?.(t.state.symbol,t.state.granularity,!0)}),cr(()=>!!this.context,()=>{this.setSettings(t.state.settings)})}get context(){return this.mainStore.chart.context}setSettings(t){if(void 0===t)return;const{countdown:e,historical:r,language:i,minimumLeftBars:a,position:s,isAutoScale:n,isHighestLowestMarkerEnabled:o,isSmoothChartEnabled:l,theme:c,activeLanguages:h,whitespace:u}=t;!h&&_m.every(t=>this.languages.find(e=>e.key===t.key))||h&&this.languages.length===h.length&&this.languages.every(t=>-1!==h.indexOf(t.key.toUpperCase()))||this.updateActiveLanguage(h),void 0!==c&&this.setTheme(c),void 0!==s&&this.setPosition(s),void 0!==e&&this.showCountdown(e),void 0!==i&&this.setLanguage(i),this.setMinimumLeftBars(a),void 0!==r&&this.setHistorical(r),void 0!==n&&this.setAutoScale(n),void 0!==o&&this.toggleHighestLowestMarker(o),void 0!==l&&this.toggleSmoothChart(l),this.setWhiteSpace(u)}saveSetting(){this.onSettingsChange&&this.language&&this.onSettingsChange({countdown:this.countdown,historical:this.historical,language:this.language?.key,position:this.position,isAutoScale:this.isAutoScale,isHighestLowestMarkerEnabled:this.isHighestLowestMarkerEnabled,isSmoothChartEnabled:this.isSmoothChartEnabled,minimumLeftBars:this.minimumLeftBars,theme:this.theme,whitespace:this.whitespace})}updateActiveLanguage(t){this.languages=t?t.map(t=>_m.find(e=>e.key.toUpperCase()===t)||"").filter(t=>t):_m,this.defaultLanguage=this.languages[0],(this.language&&!this.languages.find(t=>t.key===this.language?.key)||!this.language)&&this.setLanguage(this.languages[0].key)}setLanguage(t){if(!this.languages.length)return;const e=t.toLowerCase();if(this.language&&e===this.language.key)return;this.language=this.languages.find(t=>t.key===e)||this.defaultLanguage;const r=this.language.key;fv.setLanguage(r,()=>{this?.mainStore?.loader?.hide?.()}),jm(Tm.ChartControl,km.ChartSetting,`Change language to ${r}`),r!==localStorage.getItem("current_chart_lang")&&localStorage.setItem("current_chart_lang",r),r!==this.mainStore.chart.currentLanguage&&(this.mainStore.chart.currentLanguage=r,this.mainStore.state.saveLayout(),setTimeout(()=>{const t=this.mainStore.chart.currentActiveSymbol?.symbol;t&&window.flutterChart?.app.newChart({symbol:t,granularity:this.mainStore.chartAdapter.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.mainStore.chartAdapter.isDataFitModeEnabled,theme:this.theme,msPerPx:this.mainStore.chartAdapter.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})},100)),this.saveSetting()}setTheme(t){this.theme!==t&&(this.theme=t,this.mainStore.drawTools.updateTheme(),this.mainStore.chartAdapter.updateTheme(t),this.context&&this.mainStore.state.setChartTheme(t),this.mainStore.studies.updateTheme(),jm(Tm.ChartControl,km.ChartSetting,`Change theme to ${t}`),this.saveSetting())}setPosition(t){this.position!==t&&(this.position=t,jm(Tm.ChartControl,km.ChartSetting,"Change Position"),this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10),this.menuStore.setOpen(!1))}showCountdown(t){this.countdown!==t&&(this.mainStore.chartAdapter.setShowInterval(t),this.countdown=t,jm(Tm.ChartControl,km.ChartSetting,(t?"Show":"Hide")+" Countdown"),this.saveSetting())}setHistorical(t){this.historical!==t&&(this.historical=t,this.isHighestLowestMarkerEnabled=!t,this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10))}setAutoScale(t){this.isAutoScale!==t&&(this.isAutoScale=t,jm(Tm.ChartControl,km.ChartSetting,` Change AutoScale to ${t}`),this.saveSetting())}setMinimumLeftBars(t){this.minimumLeftBars!==t&&(this.minimumLeftBars=t,jm(Tm.ChartControl,km.ChartSetting,` Change MinimumLeftBars to ${t}`),this.saveSetting())}setWhiteSpace(t){this.whitespace!==t&&(this.whitespace=t,jm(Tm.ChartControl,km.ChartSetting,` Change Whitespace to ${t}`),this.saveSetting())}toggleHighestLowestMarker(t){this.isHighestLowestMarkerEnabled!==t&&(this.isHighestLowestMarkerEnabled=t,jm(Tm.ChartControl,km.ChartSetting,` ${t?"Show":"Hide"} HighestLowestMarker.`),this.saveSetting())}toggleSmoothChart(t){if(this.isSmoothChartEnabled===t)return;this.isSmoothChartEnabled=t,localStorage.setItem("is_smooth_chart_enabled",t.toString()),jm(Tm.ChartControl,km.ChartSetting,` ${t?"Enable":"Disable"} Smooth Chart.`);const e=this.mainStore.chartType.type,r=this.mainStore.state;this.mainStore.state.stateChange("CHART_SWITCH_TOGGLE",{enable_smooth_chart:t?"enable":"disable",chart_type_name:"colored_bar"===e.id?e.text:e.text.toLowerCase(),time_interval_name:$i(r.granularity,fm)}),this.saveSetting(),this.mainStore.chart.refreshChart()}}var bv=h(9160).t;function yv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Sv{constructor(){yv(this,"isActive",!1),yv(this,"currentState",!1),yv(this,"states",{}),br(this,{isActive:Mt,currentState:Mt,setState:Be.bound,show:Be.bound,hide:Be.bound}),this.states={"chart-engine":bv.translate("Retrieving Chart Engine..."),"market-symbol":bv.translate("Retrieving Market Symbols..."),"trading-time":bv.translate("Retrieving Trading Times..."),"chart-data":bv.translate("Retrieving Chart Data...")}}setState(t){this.states[t]?this.currentState=this.states[t]:console.error("Wrong state requested!")}show(){this.isActive=!0}hide(){this.isActive=!1}}function xv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wv{static get EVENT_FAVORITES_UPDATE(){return"EVENT_FAVORITES_UPDATE"}static getInstance(){return wv.instance||(wv.instance=new wv),wv.instance}constructor(){xv(this,"favoritesMap",function(){const t=Vi("cq-favorites");if(!t)return;const e={};for(const r in t){const i={};for(const e of t[r])i[e]=!0;e[r]=i}return e}()||{indicators:{},"chartTitle&Comparison":{}}),xv(this,"_emitter",void 0),br(this,{favoritesMap:Mt,isFavorite:Be.bound,toggleFavorite:Be.bound}),this._emitter=new(Fi())({emitDelay:0})}onFavoriteUpdate(t){this._emitter.on(wv.EVENT_FAVORITES_UPDATE,t)}offFavoriteUpdate(t){this._emitter.off(wv.EVENT_FAVORITES_UPDATE,t)}isFavorite(t,e){return e in this.favoritesMap[t]}toggleFavorite(t,e){const r=this.favoritesMap[t];r[e]?delete r[e]:r[e]=!0,this._emitter.emit(wv.EVENT_FAVORITES_UPDATE,{category:t,id:e,value:r[e]||!1}),this.saveFavorites()}saveFavorites(){const t={};for(const e in this.favoritesMap){const r=[];for(const t in this.favoritesMap[e])r.push(t);t[e]=r}Ui("cq-favorites",t)}}xv(wv,"instance",void 0);const Cv=wv;class Tv{constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{updateChartState:Be.bound,zoomIn:Be.bound,zoomOut:Be.bound}),this.mainStore=t}get state(){return this.mainStore.state}updateChartState(){this.mainStore.chart.updateScaledOneOne(!1)}zoomIn(){jm(Tm.ChartControl,km.ChartSize,"zoom In"),this.mainStore.chartAdapter.scale(1.25)}zoomOut(){jm(Tm.ChartControl,km.ChartSize,"zoom Out"),this.mainStore.chartAdapter.scale(.75)}}const kv=[];class jv{constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{handleRouting:Be.bound,updateRoute:Be.bound,registerDialog:Be.bound,closeAll:Be.bound}),this.mainStore=t}handleRouting(){window.addEventListener("hashchange",()=>{""===window.history.state.urlPath.replace("#","")&&this.closeAll()},!1)}updateRoute(t,e){const r=this.mainStore.chart.enableRouting;r&&e&&t?(window.history.replaceState({urlPath:"#"},"","#"),window.history.pushState({urlPath:`#${t}`},"",`#${t}`)):r&&!e&&t&&window.history.replaceState({urlPath:"#"},"","#")}registerDialog(t){kv.push(t)}closeAll(){kv.forEach(t=>t.setOpen(!1))}}const Av=(t,e)=>typeof t==typeof e&&(Array.isArray(t)?Ov(t,e):t&&e&&"object"==typeof t?Ev(t,e):!("number"!=typeof t||"number"!=typeof e||!Number.isNaN(t)||!Number.isNaN(e))||t===e),Ov=(t,e)=>t===e||t.length===e.length&&t.every((t,r)=>Av(t,e[r])),Ev=(t,e)=>t===e||Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Av(t[r],e[r]));var Nv=h(5581),Iv=h.n(Nv),Pv=h(2592),Dv=h.n(Pv);function Lv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Mv=class{get context(){return this.chartStore.context}get chartTypeStore(){return this.mainStore.chartType}get timeperiodStore(){return this.mainStore.timeperiod}get loader(){return this.mainStore.loader}get rootElement(){return this.chartStore.rootElement}constructor(t){Lv(this,"chartStore",void 0),Lv(this,"getIndicatorHeightRatio",void 0),Lv(this,"shouldDrawTicksFromContractInfo",!1),Lv(this,"has_updated_settings",!1),Lv(this,"isAnimationEnabled",void 0),Lv(this,"isVerticalScrollEnabled",!0),Lv(this,"mainStore",void 0),Lv(this,"margin",void 0),Lv(this,"granularity",void 0),Lv(this,"chartType",void 0),Lv(this,"startEpoch",void 0),Lv(this,"endEpoch",void 0),Lv(this,"symbol",void 0),Lv(this,"heightFactor",void 0),Lv(this,"isConnectionOpened",!1),Lv(this,"isChartReady",!1),Lv(this,"chartStatusListener",void 0),Lv(this,"stateChangeListener",void 0),Lv(this,"settings",void 0),Lv(this,"showLastDigitStats",!1),Lv(this,"scrollToEpoch",void 0),Lv(this,"clearChart",void 0),Lv(this,"isChartClosed",!1),Lv(this,"shouldMinimiseLastDigits",!1),Lv(this,"allowTickChartTypeOnly",void 0),Lv(this,"isStaticChart",!1),Lv(this,"shouldFetchTradingTimes",!0),Lv(this,"shouldGetQuotes",!0),Lv(this,"allTicks",[]),Lv(this,"contractInfo",{}),Lv(this,"refreshActiveSymbols",void 0),Lv(this,"hasReachedEndOfData",!1),Lv(this,"prevChartType",void 0),Lv(this,"isChartScrollingToEpoch",!1),Lv(this,"maxTick",void 0),Lv(this,"enableScroll",!0),Lv(this,"enableZoom",!0),Lv(this,"yAxisMargin",{top:106,bottom:64}),Lv(this,"tradingTimes",null),Lv(this,"activeSymbols",null),Lv(this,"masterData",null),Lv(this,"getQuotes",void 0),Lv(this,"chartControlsWidgets",void 0),Lv(this,"enabledChartFooter",void 0),Lv(this,"onContextReady",()=>{this.granularity=this.chartStore.granularity}),Lv(this,"debouncedStateChange",sf((t,e)=>{this.stateChange(t,e)},500)),br(this,{granularity:Mt,chartType:Mt,startEpoch:Mt,endEpoch:Mt,symbol:Mt,has_updated_settings:Mt,heightFactor:Mt,isConnectionOpened:Mt,isChartReady:Mt,isVerticalScrollEnabled:Mt,chartStatusListener:Mt,debouncedStateChange:Be.bound,stateChangeListener:Mt,settings:Mt,showLastDigitStats:Mt,allowTickChartTypeOnly:Mt,scrollToEpoch:Mt,clearChart:Mt,isChartClosed:Mt,shouldMinimiseLastDigits:Mt,isStaticChart:Mt,shouldFetchTradingTimes:Mt,shouldGetQuotes:Mt,allTicks:Mt,contractInfo:Mt,refreshActiveSymbols:Mt,shouldDrawTicksFromContractInfo:Mt,hasReachedEndOfData:Mt,prevChartType:Mt,isChartScrollingToEpoch:Mt,maxTick:Mt,enableScroll:Mt,enableZoom:Mt,yAxisMargin:Mt,updateProps:Be.bound,setChartIsReady:Be.bound,setChartClosed:Be.bound}),this.mainStore=t,this.chartStore=t.chart,cr(()=>!!this.context,this.onContextReady),window.addEventListener("beforeunload",()=>{this.saveLayout()}),qe(()=>this.allowTickChartTypeOnly,t=>{t&&(this.mainStore.studies.savePredictionStudies(),this.mainStore.studies.deletePredictionStudies())})}updateProps({networkStatus:t,chartControlsWidgets:e,enabledChartFooter:r,chartStatusListener:i,shouldDrawTicksFromContractInfo:a,stateChangeListener:s,getIndicatorHeightRatio:n,chartType:o,clearChart:l,endEpoch:c,isAnimationEnabled:h=!0,isConnectionOpened:u,isStaticChart:d,isVerticalScrollEnabled:g=!0,granularity:p,margin:m=0,refreshActiveSymbols:f,scrollToEpoch:_,settings:v,shouldFetchTradingTimes:b=!0,shouldGetQuotes:y=!0,should_zoom_out_on_yaxis:S,allTicks:x=[],contractInfo:w={},showLastDigitStats:C=!1,allowTickChartTypeOnly:T=!1,startEpoch:k,symbol:j,zoom:A,maxTick:O,yAxisMargin:E,enableScroll:N=null,enableZoom:I=null,anchorChartToLeft:P=!1,chartData:D,isLive:L,startWithDataFitMode:M,leftMargin:B,drawingToolFloatingMenuPosition:R}){let F=!1,V=!1;if(D?.tradingTimes&&"object"==typeof D.tradingTimes&&JSON.stringify(D.tradingTimes)!==this.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(D.tradingTimes),this.tradingTimes=JSON.stringify(D.tradingTimes)),D?.activeSymbols&&"object"==typeof D.activeSymbols&&JSON.stringify(D.activeSymbols)!==this.activeSymbols&&(this.activeSymbols=JSON.stringify(D.activeSymbols),this.mainStore.chart.processedSymbols&&D?.activeSymbols)){this.mainStore.chart.processedSymbols=Cf(D.activeSymbols),this.mainStore.chart.categorizedSymbols=Ef(this.mainStore.chart.processedSymbols),this.mainStore.chart.symbolMap={};for(const t of this.mainStore.chart.processedSymbols)this.mainStore.chart.symbolMap[t.symbol]=t}D?.masterData&&Array.isArray(D.masterData)&&JSON.stringify(D.masterData)!==this.masterData&&(this.masterData=JSON.stringify(D.masterData),this.mainStore.chart.feed&&(this.mainStore.chart.feed.updateQuotes(D.masterData,!1),this.shouldGetQuotes=!1)),this.chartStatusListener=i,this.stateChangeListener=s,this.isAnimationEnabled=h,this.isConnectionOpened=u,this.isStaticChart=d,this.isVerticalScrollEnabled=g,this.margin=m,this.has_updated_settings=!Av(this.settings?.whitespace,v?.whitespace),this.settings=v,this.shouldFetchTradingTimes=b,this.shouldGetQuotes=y,this.allowTickChartTypeOnly=T,this.allTicks=x,this.contractInfo=w,this.showLastDigitStats=C,this.getIndicatorHeightRatio=n;const H=this.mainStore.chart.feed;if(a&&H&&w.tick_stream&&(this.shouldDrawTicksFromContractInfo=a,H.appendChartDataFromPOCResponse.call(H,w)),!t||this.mainStore.chart.networkStatus&&t.class===this.mainStore.chart.networkStatus.class||(this.mainStore.chart.networkStatus=t),e!==this.chartControlsWidgets&&(this.chartControlsWidgets=e),r!==this.enabledChartFooter&&(this.enabledChartFooter=r),j!==this.symbol&&(this.symbol=j,F=!0,D?.tradingTimes&&"object"==typeof D.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(D.tradingTimes),this.tradingTimes=JSON.stringify(D.tradingTimes)),this.mainStore.chartTitle.hidePrice()),o&&o!==this.chartType&&("table"===o&&(this.prevChartType=this.chartTypeStore.type.id),this.setChartType(o)),void 0!==p&&p!==this.granularity&&(this.setChartGranularity(p),V=!0),f!==this.refreshActiveSymbols&&(this.refreshActiveSymbols=f,this.refreshActiveSymbols&&D?.activeSymbols)){const t=Cf(D.activeSymbols);this.mainStore.chart.processedSymbols=t,this.mainStore.chart.categorizedSymbols=Ef(t),this.mainStore.chart.symbolMap={};for(const e of t)this.mainStore.chart.symbolMap[e.symbol]=e}if(l!==this.clearChart&&(this.clearChart=l,this.cleanChart()),this.startEpoch===k&&this.endEpoch===c||(this.startEpoch=k,this.endEpoch=c,d&&this.granularity===this.mainStore.chart.granularity?this.mainStore.chart.newChart():this.mainStore.chart.feed&&(this.scrollToEpoch||F||V||this.mainStore.chart.feed.onRangeChanged())),d||_===this.scrollToEpoch||(this.scrollToEpoch=_,this.mainStore.chart&&this.mainStore.chart.feed&&!F&&!V&&(this.setIsChartScrollingToEpoch(!0),P?setTimeout(()=>this.stateChange(Sm),900):this.stateChange(Sm))),A&&(1===A?this.mainStore.chartSize.zoomIn():this.mainStore.chartSize.zoomOut()),this.mainStore.chartSetting.setSettings(this.settings),O&&this.maxTick!==O&&(this.maxTick=O),E&&"object"==typeof E&&(this.yAxisMargin={...this.yAxisMargin,...E}),S){const{height_factor:t,yaxis_margin:e}=(({is_contract_chart:t,is_mobile:e,ticks_length:r,yaxis_height:i})=>{let a,s;const n={height_factor:.8};return i?(t?r&&(a=s=e?i*(r<5?.3:.25):.27*i):a=s=e?.33*i:.27*i,{...n,...a&&s?{yaxis_margin:{top:a,bottom:s}}:{}}):n})({is_contract_chart:a,is_mobile:this.mainStore.chart.isMobile,ticks_length:this.mainStore.chart.feed?.quotes.length,yaxis_height:this.mainStore.chart.chartContainerHeight});this.yAxisMargin={...this.yAxisMargin,...e},this.heightFactor=t}null!==N&&this.enableScroll!==N&&(this.enableScroll=N),null!==I&&this.enableZoom!==I&&(this.enableZoom=I),null!=L&&this.mainStore.chart.isLive!==L&&(this.mainStore.chart.isLive=L,this.mainStore.chartAdapter.updateLiveStatus(L)),null!=M&&this.mainStore.chart.startWithDataFitMode!==M&&(this.mainStore.chart.startWithDataFitMode=M),this.mainStore.chart.leftMargin!==B&&(this.mainStore.chart.leftMargin=B,this.mainStore.chartAdapter.updateLeftMargin(B)),this.mainStore.drawTools.updateProps({drawingToolFloatingMenuPosition:R})}setIsChartScrollingToEpoch(t){this.isChartScrollingToEpoch=t}setChartClosed(t){this.isChartClosed=t,this.stateChange("MARKET_STATE_CHANGE",{symbol:this.symbol,isClosed:t})}setChartTheme(t){this.rootElement&&((this.rootElement?.querySelector(".chartContainer")).style.backgroundColor=Dv()[`${t}_chart_bg`])}stateChange(t,e){this.stateChangeListener&&"function"==typeof this.stateChangeListener&&this.stateChangeListener(t,e)}setChartIsReady(t){this.isChartReady!==t&&(this.isChartReady=t,t&&(this.chartStore.setResizeEvent(),this.stateChange("READY")),this.chartStatusListener&&"function"==typeof this.chartStatusListener&&this.chartStatusListener(t))}setChartGranularity(t){const e="second"===function(t){let e=1,r="second";return 86400===t?r="day":t&&t>59&&(e=t/60,r="minute"),{interval:e,timeUnit:r}}(t).timeUnit,r=this.mainStore.chartType.isCandle||this.chartType&&this.mainStore.chartType.isTypeCandle(this.chartType);this.mainStore.chartAdapter.setMsPerPx(void 0),this.context&&e&&r&&this.setChartType("line"),this.granularity=null===t?void 0:t}setChartType(t){this.chartType=t,this.chartType&&this.mainStore.chartAdapter.updateChartStyle(this.chartType),this.chartTypeStore.onChartTypeChanged&&this.chartTypeStore.onChartTypeChanged(t)}setShouldMinimiseLastDigit(t){this.shouldMinimiseLastDigits=t}saveLayout(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout();Ui(`chart-layout-${this.mainStore.chart.chartId}`,Iv().compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx})))}restoreLayout(){const t=Vi(`chart-layout-${this.mainStore.chart.chartId}`);let e=null;try{e=JSON.parse(Iv().decompress(t??""))}catch(r){e=t}return e?(this.mainStore.view.restoreLayout(e),!0):(this.clearLayout(),!1)}clearLayout(){window.flutterChart?.indicators.clearIndicators(),window.flutterChart?.drawingTool.clearDrawingTool()}saveDrawings(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout();Ui(`chart-layout-${this.mainStore.chart.chartId}`,Iv().compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx})))}cleanChart(){this.clearChart&&this.isChartReady&&this.mainStore.studies.deleteAllStudies()}};var Bv=h(9160).t;class Rv{constructor(){!function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"onMessage",void 0)}static get CATEGORY_ACTIVE_SYMBOL(){return"activesymbol"}notify(t){this.onMessage&&this.onMessage({type:"warning",...t})}notifyMarketOpen(t){this.notify({text:Bv.translate("[symbol] market is now opened.",{symbol:t}),type:"info",category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyMarketClose(t){this.notify({text:Bv.translate("[symbol] market is presently closed.",{symbol:t}),category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyDelayedMarket(t,e){this.notify({text:Bv.translate("[symbol] feed is delayed by [delay] minutes",{symbol:t,delay:e}),category:Rv.CATEGORY_ACTIVE_SYMBOL})}notifyFeedUnavailable(t){this.notify({text:Bv.translate("Streaming for [symbol] is not available due to license restrictions",{symbol:t}),type:"error",category:Rv.CATEGORY_ACTIVE_SYMBOL})}}const Fv=Rv;function Vv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Hv{constructor(t){Vv(this,"mainStore",void 0),Vv(this,"bars",[]),Vv(this,"lastTick",null),Vv(this,"count",1e3),Vv(this,"digits",[]),Vv(this,"latestData",[]),Vv(this,"lastSymbol",""),br(this,{bars:Mt,lastTick:Mt,decimalPlaces:Vt,isVisible:Vt,marketDisplayName:Vt,shouldMinimiseLastDigits:Vt,updateLastDigitStats:Be.bound,onMasterDataUpdate:Be.bound,updateBars:Be.bound}),this.mainStore=t,cr(()=>!!this.context,()=>{this.lastSymbol=this.marketDisplayName,this.mainStore.chart.feed?.onMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed?.onMasterDataReinitialize(()=>{this.context&&this.mainStore.chart.feed&&(this.mainStore.chart.feed.offMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed.onMasterDataUpdate(this.onMasterDataUpdate))})})}get context(){return this.mainStore.chart.context}get api(){return this.mainStore.chart.api}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isVisible(){return this.mainStore.state.showLastDigitStats}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.name:""}get shouldMinimiseLastDigits(){return this.mainStore.state.shouldMinimiseLastDigits}async updateLastDigitStats(t){if(!this.context||!this.mainStore.chart.currentActiveSymbol)return;this.digits=[],this.bars=[],this.latestData=[];for(let t=0;t<10;t++)this.digits.push(0),this.bars.push({height:0,cName:""});const e=t||await(this.api?.getQuotes({symbol:this.mainStore.chart.currentActiveSymbol.symbol,count:this.count}));this.latestData=e?.history?.prices?e.history.prices:[],this.context&&this.mainStore.chart.currentActiveSymbol&&(this.latestData.forEach(t=>{const e=(+t).toFixed(this.decimalPlaces).slice(-1);this.digits[+e]++}),this.updateBars())}onMasterDataUpdate({Close:t,tick:e}){if(this.context&&this.mainStore.chart.currentActiveSymbol&&this.mainStore.lastDigitStats.isVisible)if(this.lastTick=e,this.marketDisplayName!==this.lastSymbol)this.lastSymbol=this.marketDisplayName,this.updateLastDigitStats();else if(this.latestData.length){const e=(+this.latestData.shift()).toFixed(this.decimalPlaces).slice(-1),r=(+t).toFixed(this.decimalPlaces),i=r.slice(-1);this.latestData.push(+r),this.digits[+i]++,this.digits[+e]--,this.updateBars()}}updateBars(){const t=Math.min(...this.digits),e=Math.max(...this.digits);this.digits.forEach((r,i)=>{this.bars[i].height=100*r/this.count,this.bars[i].cName=r===t?"min":r===e?"max":""}),this.bars=this.bars.slice(0)}}function Uv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class qv{get chart(){return this.mainStore.chart}get stateStore(){return this.mainStore.state}get crosshairStore(){return this.mainStore.crosshair}constructor(t){Uv(this,"mainStore",void 0),Uv(this,"mouse_in",!1),br(this,{mouse_in:Mt,enableScale:Vt,onMouseEnter:Be.bound,onMouseLeave:Be.bound}),this.mainStore=t}get enableScale(){return this.stateStore.startEpoch}onMouseEnter(){this.mouse_in=!0,this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.mouse_in=!1,this.crosshairStore.setTemporaryDisabled(!1)}}function zv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const $v=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}get isHighestLowestMarkerEnabled(){return this.mainStore.chartSetting.isHighestLowestMarkerEnabled}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}constructor(t){zv(this,"highestRef",null),zv(this,"lowestRef",null),zv(this,"mainStore",void 0),zv(this,"highest",null),zv(this,"lowest",null),zv(this,"setHighestRef",t=>{this.highestRef=t,null!==this.highestRef&&null!==t&&(this.highestRef.value=t.div.querySelector(".spot__value"))}),zv(this,"setLowestRef",t=>{this.lowestRef=t,null!=this.lowestRef&&null!==t&&(this.lowestRef.value=t.div.querySelector(".spot__value"))}),zv(this,"calculateHighestLowestByNewData",()=>{if(!this.highestRef||!this.lowestRef)return;const t=this.mainStore.chart.feed?.quotes;if(t&&t.length&&(this.highest=null,this.lowest=null,t.forEach(t=>{t&&((!this.highest||this.highest.Close<=t.Close)&&(this.highest=t),(!this.lowest||this.lowest.Close>=t.Close)&&(this.lowest=t))})),!this.highest||!this.lowest||this.highest.Close===this.lowest.Close)return this.highestRef.setPosition({epoch:null,price:null}),void this.lowestRef.setPosition({epoch:null,price:null});if(this.highest){const t=this.highest.Close.toFixed(this.decimalPlaces);this.highestRef.setPosition({epoch:Qi(Om(this.highest.Date)),price:+t}),this.highestRef.value.textContent=t}if(this.lowest){const t=this.lowest.Close.toFixed(this.decimalPlaces);this.lowestRef.setPosition({epoch:Qi(Om(this.lowest.Date)),price:+t}),this.lowestRef.value.textContent=t}}),this.mainStore=t}};function Gv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Wv=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}constructor(t){Gv(this,"mainStore",void 0),Gv(this,"ref",null),Gv(this,"isOnPagination",!1),Gv(this,"paginationEndEpoch",null),Gv(this,"onContextReady",()=>{this.feed?.onStartPagination(this.setOnPagination),this.feed?.onPagination(this.setOnPagination)}),Gv(this,"setRef",t=>{this.ref=t,null!==this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),Gv(this,"setOnPagination",({end:t})=>{this.isOnPagination=!this.isOnPagination,this.paginationEndEpoch=this.isOnPagination?t:null,this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),br(this,{isOnPagination:Mt,updateOnPagination:Be.bound,setOnPagination:Be.bound}),this.mainStore=t,cr(()=>!!this.context,this.onContextReady)}updateOnPagination(t){this.isOnPagination=t}};class Kv{get crosshairStore(){return this.mainStore.crosshair}get chartStore(){return this.mainStore.chart}constructor(t){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"mainStore",void 0),br(this,{onMouseEnter:Be.bound,onMouseLeave:Be.bound}),this.mainStore=t,qe(()=>[this.mainStore.chartMode.menuStore.open,this.mainStore.drawTools.menuStore.open,this.mainStore.studies.menuStore.open,this.mainStore.share.menuStore.open,this.mainStore.view.menuStore.open],()=>{this.mainStore.chartMode.menuStore.open||this.mainStore.drawTools.menuStore.open||this.mainStore.studies.menuStore.open||this.mainStore.share.menuStore.open||this.mainStore.view.menuStore.open||this.onMouseLeave()})}onMouseEnter(){this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.crosshairStore.setTemporaryDisabled(!1)}}function Qv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Yv{constructor(){Qv(this,"isHover",!1),Qv(this,"scrollPanel",void 0),br(this,{isHover:Mt,scrollPanel:Mt,handleMouseOver:Be.bound,handleMouseOut:Be.bound,setScrollPanel:Be.bound}),qe(()=>this.scrollPanel,()=>{this.scrollPanel&&(this.scrollPanel.addEventListener("mouseover",this.handleMouseOver),this.scrollPanel.addEventListener("mouseout",this.handleMouseOut))})}handleMouseOver(){this.isHover||(this.isHover=!0)}handleMouseOut(){this.isHover&&(this.isHover=!1)}setScrollPanel(t){this.scrollPanel||(this.scrollPanel=t)}}const Xv=()=>{window._flutter.initState.isMounted&&(window._flutter.appRunner?.runApp(),window._flutter.initState.isInitialRunCompleted=!0)};function Zv(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Jv{constructor(){Zv(this,"callbacks",[]),Zv(this,"onPaint",t=>{this.callbacks.forEach(e=>e(t))}),Zv(this,"registerCallback",t=>{this.callbacks.push(t)}),Zv(this,"unregisterCallback",t=>{const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)})}}function tb(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class eb{constructor(t){tb(this,"mainStore",void 0),tb(this,"isChartLoaded",!1),tb(this,"flutterChart",void 0),tb(this,"epochBounds",{leftEpoch:0,rightEpoch:0}),tb(this,"quoteBounds",{topQuote:0,bottomQuote:0}),tb(this,"isFeedLoaded",!1),tb(this,"msPerPx",void 0),tb(this,"isDataFitModeEnabled",!1),tb(this,"isXScrollBlocked",!1),tb(this,"painter",new Jv),tb(this,"drawingColor",0),tb(this,"isScaled",!1),tb(this,"touchValues",{multiTouch:!1,deltaXTotal:0,deltaYTotal:0,touchIds:[],x:0,y:0}),tb(this,"isOverFlutterCharts",!1),tb(this,"clearTouchDeltasTimer",void 0),tb(this,"enableXScrollTimer",void 0),tb(this,"enableYScrollTimer",void 0),tb(this,"checkIndicatorHover",(t,e,r)=>{const i=this.mainStore.chart.feed?.getClosestValidEpoch,a=this.mainStore.chartAdapter.getGranularityInMs(),s=this.flutterChart?.app.getIndicatorHoverIndex(t,e,i,a,r);this.isScaled?this.isScaled=!1:this.mainStore.studies.highlightIndicator(s)}),tb(this,"debouncedIndicatorHover",sf(this.checkIndicatorHover,5)),tb(this,"onWheel",t=>{t.preventDefault(),t.stopPropagation();const e=this.mainStore.chart.chartNode;if(e&&!this.mainStore.state.isVerticalScrollEnabled){const r=e.offsetWidth-this.mainStore.chart.yAxisWidth,{left:i}=e.getBoundingClientRect(),a=t.deltaY&&0===t.deltaX;if(t.pageX-i<r&&a){if(this.enableYScrollTimer)return;return e.style.pointerEvents="none",void(this.enableYScrollTimer=setTimeout(()=>{e.style.pointerEvents="auto",this.enableYScrollTimer=void 0},300))}}if(0===t.deltaX&&0===t.deltaZ){const e=(100-Math.min(10,Math.max(-10,t.deltaY)))/100;this.scale(e)}else window.flutterChart?.app.scroll(t.deltaX);return!1}),tb(this,"onMouseMove",t=>{this.isOverFlutterCharts="flt-glass-pane"===t.target?.tagName?.toLowerCase()}),tb(this,"onDoubleClick",()=>{null!=this.mainStore.studies.currentHoverIndex&&(this.mainStore.studies.editStudyByIndex(this.mainStore.studies.currentHoverIndex),this.mainStore.studies.clearHoverItem(this.mainStore.studies.currentHoverIndex))}),tb(this,"newChart",async()=>{this.isFeedLoaded=!1,this.isDataFitModeEnabled=this.mainStore.chart.startWithDataFitMode||!1,await cr(()=>this.isChartLoaded),this.flutterChart?.app.newChart({symbol:this.mainStore.chart.currentActiveSymbol?.symbol,granularity:this.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.isDataFitModeEnabled,theme:this.mainStore.chartSetting.theme,msPerPx:this.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.mainStore.chartSetting.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})}),tb(this,"toggleXScrollBlock",(t=!0,e)=>{this.isXScrollBlocked=t,e&&(t?(e.style.overflowY="scroll",e.style.overflowX="hidden",e.style.overscrollBehavior="contain",e.style.touchAction="pan-y"):this.allowScroll(e))}),tb(this,"allowScroll",t=>{let e,r=t.scrollTop,i=!1;const a=()=>{t.scrollTop!==r?(i=!0,r=t.scrollTop,clearTimeout(e),e=setTimeout(()=>{this.stopScroll(t)},200)):i=!1,i&&requestAnimationFrame(a)};requestAnimationFrame(a)}),tb(this,"stopScroll",t=>{t.style.removeProperty("overflow-y"),t.style.removeProperty("overflow-x"),t.style.removeProperty("touch-action")}),tb(this,"toggleDataFitMode",()=>{this.isDataFitModeEnabled=!this.isDataFitModeEnabled,window.flutterChart?.app.toggleDataFitMode(this.isDataFitModeEnabled)}),tb(this,"getInterpolatedPositionAndPrice",t=>{if(!t)return;const e=vf().utc(t).toDate(),r=this.mainStore.chart.feed?.getClosestQuoteIndexForEpoch(t);let i=this.getXFromEpoch(t);if("number"==typeof r&&r>-1){const t=this.mainStore.chart.feed?.quotes[r];let a,s,n,o=t?t.Close:null;if(t&&t.DT<e){const l=this.mainStore.chart.feed?.quotes[r+1],c=r>0?this.mainStore.chart.feed?.quotes[r-1]:null;l&&l.Close&&l.DT>e?(a=this.getXFromEpoch(l.DT.getTime())-i,n=(e-t.DT.getTime())/(l.DT.getTime()-t.DT.getTime()),o&&(s=l.Close-o)):c&&c.Close&&(a=i-this.getXFromEpoch(c.DT.getTime()),n=(e-t.DT.getTime())/(t.DT.getTime()-c.DT.getTime()),o&&(s=o-c.Close))}return n&&(a&&(i+=n*a),o&&s&&(o+=n*s)),{x:i,price:o}}}),br(this,{clearTouchDeltasTimer:Mt,onMount:Be.bound,onTickHistory:Be.bound,onTouch:Be.bound,onChartLoad:Be.bound,onTick:Be.bound,loadHistory:Be.bound,onVisibleAreaChanged:Be.bound,onQuoteAreaChanged:Be.bound,setMsPerPx:Be.bound,newChart:Be.bound,enableXScrollTimer:Mt,enableYScrollTimer:Mt,scale:Be.bound,scrollableChartParent:Vt,toggleDataFitMode:Be.bound,toggleXScrollBlock:Be.bound,touchValues:Mt,isDataFitModeEnabled:Mt,isChartLoaded:Mt,epochBounds:Mt.ref,quoteBounds:Mt.ref,msPerPx:Mt,isFeedLoaded:Mt,cleanChart:Be.bound}),this.mainStore=t,this.cleanChart(),this.initFlutterCharts()}initFlutterCharts(){window.jsInterop={onChartLoad:this.onChartLoad,onMainSeriesPaint:this.painter.onPaint,onVisibleAreaChanged:this.onVisibleAreaChanged,onQuoteAreaChanged:this.onQuoteAreaChanged,loadHistory:this.loadHistory,indicators:{onRemove:t=>{this.mainStore.studies.deleteStudy(t)},onEdit:t=>{this.mainStore.studies.editStudyByIndex(t)},onSwap:(t,e)=>{const{activeItems:r}=this.mainStore.studies;[r[t],r[e]]=[r[e],r[t]]}},drawingTool:{onUpdate:()=>{this.mainStore.drawTools.onUpdate()},onLoad:t=>{this.mainStore.drawTools.onLoad(t)},onToolAdded:t=>{const e=JSON.parse(t);this.mainStore.drawTools.onToolAdded(e)},onRemove:(t,e)=>{this.mainStore.state.stateChange(xm,{drawing_tool_name:t.replace("dt_","")||"unknown",pxthickness:e?`${JSON.parse(e).lineStyle?.thickness}px`:void 0,color_name:e?`${Q_(Number(JSON.parse(e).lineStyle?.color)).replace("#","")}`:void 0}),this.mainStore.drawTools.showDeletionSnackbarForDeletedTool(t)},onStateChanged:(t,e)=>{this.mainStore.drawTools.updateAddingState(t,e)}}},(({onChartLoad:t})=>{if(window.flutterChartElement)return void t();(()=>{const t=t=>{t.key&&t.code||t.stopImmediatePropagation()};window.addEventListener("keydown",t,!0),window.addEventListener("keyup",t,!0)})();const e=document.createElement("div");e.classList.add("flutter-chart"),window.flutterChartElement=e,window._flutter={loader:{didCreateEngineInitializer:async t=>{window._flutter.appRunner=await t.initializeEngine({assetBase:"/",hostElement:window.flutterChartElement}),window._flutter.initState.isEngineIntialized=!0,Xv()}},initState:{isInitialRunCompleted:!1,isEngineIntialized:!1,isMounted:!1}},h.e(518).then(h.t.bind(h,4521,23))})({onChartLoad:this.onChartLoad})}onMount(t){t.appendChild(window.flutterChartElement);const e=window._flutter.initState;e.isMounted=!0,e.isEngineIntialized&&!e.isInitialRunCompleted&&Xv(),window.flutterChartElement?.addEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.addEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.addEventListener("mousemove",this.onMouseMove,{capture:!0})}onUnmount(){window._flutter.initState.isMounted=!1,window.flutterChartElement?.removeEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.removeEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.removeEventListener("mousemove",this.onMouseMove,{capture:!0}),clearTimeout(this.clearTouchDeltasTimer),clearTimeout(this.enableXScrollTimer),clearTimeout(this.enableYScrollTimer)}onChartLoad(){this.flutterChart=window.flutterChart,this.isChartLoaded=!0}cleanChart(){window.flutterChartElement&&(this.updateLeftMargin(),this.setShowInterval(!1),this.setSymbolClosed(!1))}onTouch(t){const e=this.mainStore.chart.chartNode,r=document.querySelector(".flutter-chart");if(e&&this.scrollableChartParent&&!this.mainStore.state.isVerticalScrollEnabled){if(this.touchValues.multiTouch)return void("touchend"===t.type&&(this.touchValues.touchIds=this.touchValues.touchIds?.filter(e=>e===t.changedTouches[0].identifier),this.touchValues={multiTouch:!!this.touchValues.touchIds?.length}));if(t.touches.length>1)return this.touchValues={multiTouch:!0},void(this.touchValues.touchIds=Array.from(t.touches).map(t=>t.identifier));const{pageX:i,pageY:a}=t.changedTouches[0];if(["touchmove","touchend"].includes(t.type)){const s=e.offsetWidth-this.mainStore.chart.yAxisWidth,n=e.offsetHeight-this.mainStore.chart.xAxisHeight,{top:o,left:l}=e.getBoundingClientRect(),c=i-l,h=c<s&&a-o<n,u=c>=s;if(this.touchValues.x&&this.touchValues.y){const e=this.touchValues.x-i,s=this.touchValues.y-a,n=(this.touchValues.deltaXTotal??0)+e,o=(this.touchValues.deltaYTotal??0)+s,l="touchend"===t.type?Math.abs(n):Math.abs(e),c=("touchend"===t.type?Math.abs(o):Math.abs(s))>l;this.touchValues={...this.touchValues,deltaXTotal:n,deltaYTotal:o},h&&c?this.isXScrollBlocked||this.toggleXScrollBlock(!0,r):!this.isXScrollBlocked&&u&&this.stopScroll(r)}this.touchValues={...this.touchValues,x:i,y:a},"touchend"===t.type&&this.isXScrollBlocked&&(this.enableXScrollTimer=setTimeout(()=>{this.toggleXScrollBlock(!1,r)},100))}["touchstart","touchend"].includes(t.type)&&(this.touchValues="touchstart"===t.type?{x:i,y:a}:{deltaYTotal:this.touchValues.deltaYTotal,deltaXTotal:this.touchValues.deltaXTotal})}}onVisibleAreaChanged(t,e){this.epochBounds.leftEpoch===t&&this.epochBounds.rightEpoch===e||(this.epochBounds={leftEpoch:t,rightEpoch:e})}onQuoteAreaChanged(t,e){this.quoteBounds={topQuote:t,bottomQuote:e}}getGranularityInMs(){return 1e3*(this.mainStore.state.granularity||1)}async onTickHistory(t){this.isFeedLoaded=!0,await cr(()=>this.isChartLoaded),this.mainStore.chart.feed?.updateQuotes(t,!1),this.flutterChart?.feed.onTickHistory(t,!1)}async onTick(t){await cr(()=>this.isChartLoaded);const e=this.mainStore.chart.feed?.quotes[this.mainStore.chart.feed?.quotes.length-1];e&&new Date(e.Date)>new Date(t.Date)||(this.mainStore.chart.feed?.addQuote(t),function(t){Gt(0,!1,t,this,void 0)}(()=>{this.mainStore.chart.lastQuote=t}),t.ohlc?this.flutterChart?.feed.onNewCandle(t):this.getGranularityInMs()<6e4&&this.flutterChart?.feed.onNewTick(t))}loadHistory(t){const{count:e,end:r}=t,{state:i,chart:a}=this.mainStore,{granularity:s}=i;a.feed?.fetchPaginationData(a.currentActiveSymbol?.symbol,r,e,s,({quotes:t})=>{this.mainStore.chart.feed?.updateQuotes(t||[],!0),this.flutterChart?.feed.onTickHistory(t||[],!0)})}updateChartStyle(t){this.flutterChart?.config.updateChartStyle(t)}async updateTheme(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateTheme(t)}async updateLeftMargin(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateLeftMargin(t)}async updateLiveStatus(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateLiveStatus(t)}async setSymbolClosed(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.setSymbolClosed(t)}async updateRightPadding(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.updateRightPadding(t)}async setShowInterval(t){await cr(()=>this.isChartLoaded),this.flutterChart?.config.toggleTimeIntervalVisibility(t)}scale(t){null!==this.mainStore.studies.currentHoverIndex&&(this.isScaled=!0),this.isDataFitModeEnabled=!1;const e=this.flutterChart?.app.scale(t);null!=e&&this.setMsPerPx(e)}async updateContracts(t){const e=t.filter(t=>t.markers?.length>0).map(t=>(t.markers.forEach(t=>{if(!t.quote){const{price:e}=this.getInterpolatedPositionAndPrice(1e3*t.epoch)||{};t.quote=e}}),t));await cr(()=>this.isFeedLoaded),this.flutterChart?.config.updateContracts(e)}setMsPerPx(t){this.msPerPx=t,this.mainStore.state.saveLayout()}getXFromEpoch(t){return this.flutterChart?.app.getXFromEpoch(t)??0}getYFromQuote(t){return this.flutterChart?.app.getYFromQuote(t)??0}getEpochFromX(t){return this.flutterChart?.app.getEpochFromX(t)??0}getQuoteFromY(t){return this.flutterChart?.app.getQuoteFromY(t)??0}get scrollableChartParent(){const t=this.mainStore.chart.chartNode;if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}}function rb(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ib{constructor(){rb(this,"notifier",new Fv),rb(this,"favorites",Cv.getInstance()),rb(this,"chart",new $f(this)),rb(this,"state",new Mv(this)),rb(this,"chartAdapter",new eb(this)),rb(this,"chartType",new Zf(this)),rb(this,"chartMode",new t_(this)),rb(this,"studies",new Z_(this)),rb(this,"drawTools",new tv(this)),rb(this,"chartTitle",new lv(this)),rb(this,"timeperiod",new ff(this)),rb(this,"view",new hv(this)),rb(this,"crosshair",new gv(this)),rb(this,"share",new mv(this)),rb(this,"chartSetting",new vv(this)),rb(this,"loader",new Sv),rb(this,"chartSize",new Tv(this)),rb(this,"routing",new jv(this)),rb(this,"lastDigitStats",new Hv(this)),rb(this,"bottomWidgetsContainer",new fa(this)),rb(this,"navigationWidget",new qv(this)),rb(this,"highestLowest",new $v(this)),rb(this,"paginationLoader",new Wv(this)),rb(this,"toolbarWidget",new Kv(this)),rb(this,"scroll",new Yv)}}let ab;const sb=()=>yi().useContext(ab),nb=({StoreClass:t,...e})=>{const r=sb(),i=yi().useRef();return(()=>{const e=yi().useRef(!1);e.current||(i.current=new t(r),e.current=!0)})(),yi().useEffect(()=>{i.current?.updateProps?.(e)}),yi().useEffect(()=>()=>{i.current?.destructor?.()},[]),(0,_g.jsx)(_g.Fragment,{children:e.children(i.current)})},ob=({offScreenDirection:t})=>{const e=t===Ji.UP?"23px":"-41px",r=t===Ji.DOWN?"rotate(180deg)":"";return t===Ji.UP?(0,_g.jsx)(Vp,{className:"arrow-icon",style:{top:e,transform:r}}):(0,_g.jsx)(Hp,{className:"arrow-icon",style:{top:e,transform:r}})},lb=({color:t,yAxiswidth:e,title:r,opacity:i})=>(0,_g.jsx)("div",{className:"title-wrapper",style:{color:t,right:e,opacity:i},children:(0,_g.jsx)("span",{className:"title",children:r})}),cb=({isOverlapping:t})=>(0,_g.jsxs)("div",{className:e()("drag-icon",{"drag-icon--hidden":t}),children:[(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,_g.jsx)("div",{className:e()({"drag-icon--hidden":t})})]}),hb=Li(({lineStyle:t,backgroundColor:r,color:i,foregroundColor:a,hideOffscreenBarrier:s,opacityOnOverlap:n,hideOffscreenLine:o,hideBarrierLine:l,store:c,title:h})=>{const{className:u,draggable:d,init:g,isDragging:p,isMobile:m,isOverlapping:f,isOverlappingWithPriceLine:_,offScreen:v,offScreenDirection:b,overlappedBarrierWidth:y,priceDisplay:S,priceLineWidth:x,setDragLine:w,visible:C}=c,T=yi().useMemo(()=>!(s&&v),[s,v]),k=yi().useMemo(()=>!(l||o&&v||f),[l,o,v,f]),j=yi().useMemo(()=>f?n:"",[f,n]);if(yi().useEffect(()=>{g()},[g]),!T)return null;const A=x+18,O=m?20:3;return(0,_g.jsx)("div",{className:e()("barrier-area",{"barrier-area--zero":_}),ref:w,hidden:!C,children:(0,_g.jsxs)("div",{className:e()("chart-line","horizontal",u||"",{draggable:d,dragging:p}),style:{color:a},children:[k&&(0,_g.jsx)("div",{className:e()("drag-line",{"drag-line--zero":_}),style:{borderTopColor:i,borderTopStyle:t,width:`calc(100% - ${A}px + ${m?0:y-4}px)`}}),(0,_g.jsx)("div",{className:"draggable-area"}),(0,_g.jsx)("div",{className:"draggable-area-wrapper",children:(0,_g.jsxs)("div",{className:e()("drag-price",{"drag-price--narrow":_}),style:{backgroundColor:_?void 0:r,color:_?i:a,borderColor:i,width:d&&_?A+8:A-6,opacity:j,right:O},children:[(0,_g.jsx)(cb,{isOverlapping:_}),(0,_g.jsx)("div",{className:e()("price",{"price--zero":_}),style:{color:_?i:"",right:_?y+6+8*S.length+(d?26:0):0},children:S}),(0,_g.jsx)("div",{}),v&&b&&(0,_g.jsx)(ob,{offScreenDirection:b,color:i})]})}),h&&(0,_g.jsx)(lb,{color:i,title:h,yAxiswidth:A+O,opacity:j})]})})}),ub=Li(({store:t})=>{const{visible:r,className:i,setShadeRef:a}=t;return(0,_g.jsx)("div",{className:e()("shade",i,{hidden:!r}),ref:a,style:{top:-120}})}),db=(mb=Li(({store:t,...r})=>{const{_high_barrier:i,_low_barrier:a,aboveShadeStore:s,belowShadeStore:n,betweenShadeStore:o,backgroundColor:l="#2C9AFF",color:c="#008832",foregroundColor:h="#ffffff",hideBarrierLine:u,hideOffscreenBarrier:d,hideOffscreenLine:g,hidePriceLines:p,isInitialized:m,isSingleBarrier:f,lineStyle:_,opacityOnOverlap:v,shadeColor:b="#008832"}=t,y=yi().useRef(null);return yi().useEffect(()=>{m&&y.current&&y.current.addEventListener("wheel",t=>{t.preventDefault()})},[m]),m?(0,_g.jsxs)("div",{className:e()("barrier",{"hide-pricelines":p}),style:{"--shade-color":b},ref:y,children:[(0,_g.jsx)(hb,{store:i,lineStyle:_,backgroundColor:l,color:c,foregroundColor:h,hideOffscreenBarrier:d,hideOffscreenLine:g,hideBarrierLine:u,opacityOnOverlap:v,...r}),!f&&(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)(hb,{store:a,lineStyle:_,backgroundColor:l,color:c,foregroundColor:h,hideOffscreenBarrier:d,hideOffscreenLine:g,hideBarrierLine:u,opacityOnOverlap:v,...r}),(0,_g.jsx)(ub,{store:s}),(0,_g.jsx)(ub,{store:n}),(0,_g.jsx)(ub,{store:o})]})]}):null}),fb=pa,({children:t,...e})=>(0,_g.jsx)(nb,{StoreClass:fb,...e,children:r=>(0,_g.jsx)(mb,{store:r,...e,children:t})})),gb=db,pb=({children:t,className:r="",enabled:i=!1,content:a,position:s="top",...n})=>(0,_g.jsxs)("div",{className:e()("sc-tooltip",r,{[`sc-tooltip--${s}`]:!!s,"sc-tooltip--enable":i}),...n,children:[t,(0,_g.jsx)("div",{className:"sc-tooltip__inner",children:a})]});var mb,fb;h(5877),h(4282);const _b=Li(({children:t,className:r,height:i,width:a,autoHide:s,freeze:n=!1,onScroll:o=()=>null,setPanel:l})=>{const{scroll:c}=sb(),{setScrollPanel:h,isHover:u}=c;return(0,_g.jsx)("div",{ref:t=>{h(t),l&&l(t)},className:e()("sc-scrollbar",r,{"sc-scrollbar--freeze":n,"sc-scrollbar--auto-hide":s,"sc-scrollbar--hover":u}),onScroll:o,style:{maxHeight:i||"100%",maxWidth:a||"none"},children:t})});h(1849);const vb=Li(({height:t,store:e,children:r})=>{const{getItems:i,onItemClick:a}=e,s="function"==typeof r?r:t=>t.text,n=t=>"ciq-list-item "+(t.disabled?"disabled":"")+" "+(t.active?"active":"");return(0,_g.jsx)(_b,{className:"ciq-list",autoHide:!0,height:t?`${t}px`:"",children:i().map((t,e)=>(0,_g.jsx)("div",{className:n(t),onClick:()=>a(e,t),children:s(t)},t.id))})});var bb=h(255);h(1238);const yb=Li(({className:t,menu_element:e,portalNodeId:r,open:i,onClick:a})=>{const{chartSetting:s}=sb(),{theme:n}=s;if(document.body.style.overflow=i?"hidden":"",!r)return e;const o=document.getElementById(r);return o?xi().createPortal((0,_g.jsx)("div",{className:"smartcharts-portal "+(i?"smartcharts-portal--open":""),children:(0,_g.jsx)("div",{className:`smartcharts smartcharts-${n}`,children:(0,_g.jsx)("div",{className:"smartcharts-mobile",children:(0,_g.jsx)("div",{className:`cq-modal-dropdown ${t||""} ${i?"stxMenuActive":""}`,children:(0,_g.jsx)("div",{className:"cq-modal__overlay",onClick:a,children:e})})})})}),o):null});h(4007);const Sb=(0,bi.forwardRef)(({store:t,children:r,className:i="",title:a,customHead:s,enableTabular:n=!1,handleOverlayClick:o,handleCloseDialog:l},c)=>{const{updateCloseCallback:h,onContainerClick:u,updateOutsideClickCallback:d}=t;return(0,bi.useEffect)(()=>{h(l),d(o)}),(0,_g.jsxs)("div",{ref:c,className:e()("sc-dialog",i,{"sc-dialog--tabular":n}),onClick:u,children:[a&&(0,_g.jsxs)("div",{className:"sc-dialog__head",children:[(0,_g.jsx)("div",{className:"sc-dialog__head--title",children:a}),s&&(0,_g.jsx)("div",{className:"sc-dialog__head--custom",children:s}),(0,_g.jsx)("div",{className:"sc-dialog__head--action",children:(0,_g.jsx)(kg,{onClick:l})})]}),(0,_g.jsx)("div",{className:"sc-dialog__body",children:r})]})});Sb.displayName="Dialog";const xb=Li(Sb),wb=({store:t,className:r,children:i,title:a,tooltip:s,portalNodeId:n,enabled:o=!0,onMouseEnter:l,onMouseLeave:c,enableTabular:h,customHead:u,emptyMenu:d,handleOverlayClick:g,modalMode:p})=>{const{open:m,dialogStatus:f,onTitleClick:_,handleCloseDialog:v,dialogStore:b}=t,{chartSetting:y,chart:S}=sb(),{theme:x}=y,{shouldRenderDialogs:w,isMobile:C,context:T}=S,k=t=>{"cq-modal__overlay"===t.target.className&&v()};if(!T)return null;const j=yi().Children.map(i,(t,e)=>0===e?t:null),A=yi().Children.map(i,(t,e)=>0!==e?t:null);if(p){const t=document.getElementById(n||"smartcharts_modal");if(!t)return null;const i=xi().createPortal((0,_g.jsx)("div",{className:`smartcharts-${x}`,children:(0,_g.jsx)("div",{className:e()({"smartcharts-mobile":C,"smartcharts-desktop":!C}),children:(0,_g.jsx)("div",{className:e()("cq-modal-dropdown",r,{stxMenuActive:m}),children:(0,_g.jsx)("div",{className:"cq-modal__overlay",onClick:k,children:(0,_g.jsx)(Cb,{dialogStatus:f,dialogStore:b,title:a,handleCloseDialog:v,enableTabular:h,customHead:u,handleOverlayClick:g,children:A})})})})}),t);return d?m?i:null:(0,_g.jsxs)(pb,{className:e()("ciq-menu",r||"",{stxMenuActive:o&&m,"ciq-enabled":o,"ciq-disabled":!o}),content:s,enabled:!!s,position:"right",children:[(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,onClick:o?_:()=>null,children:j}),o&&m&&i]})}const O=w?(0,_g.jsxs)(xb,{className:e()("cq-menu-dropdown",{"cq-menu-dropdown-enter-done":f}),store:b,children:[a&&(0,_g.jsxs)("div",{className:"title",children:[(0,_g.jsx)("div",{className:"title-text",children:a}),(0,_g.jsx)(kg,{className:"icon-close-menu",onClick:_})]}),A]}):null;return o&&(0,_g.jsxs)("div",{className:e()("ciq-menu ciq-enabled",r,{stxMenuActive:m}),children:[(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,onClick:_,children:j}),C&&n&&(0,_g.jsx)(yb,{className:r,open:m,menu_element:O,portalNodeId:n,onClick:k})||O]})||(0,_g.jsx)("div",{className:e()("ciq-menu ciq-disabled",r),children:(0,_g.jsx)("div",{className:"cq-menu-btn",onMouseEnter:l,onMouseLeave:c,children:j})})},Cb=({dialogStatus:t,dialogStore:e,title:r,handleCloseDialog:i,enableTabular:a,customHead:s,handleOverlayClick:n,children:o})=>{const l=yi().useRef(null);return(0,_g.jsx)(bb.CSSTransition,{appear:!0,in:t,timeout:300,classNames:"sc-dialog",unmountOnExit:!0,nodeRef:l,children:(0,_g.jsx)(xb,{ref:l,store:e,title:r,handleCloseDialog:i,enableTabular:a,customHead:s,handleOverlayClick:n,children:o})})},Tb=({children:t})=>(0,_g.jsx)(_g.Fragment,{children:t});wb.Title=Tb,wb.Body=Tb;const kb=Li(wb);var jb=h(9160).t;const Ab=({Icon:t,...e})=>(0,_g.jsx)(t,{...e}),Ob=Li(({enabled:t,newDesign:e,onChange:r})=>{const{chartType:i,chart:a,state:s,loader:n}=sb(),{listStore:o,setChartType:l,updateProps:c,types:h,type:u,menuStore:d}=i,{open:g,setOpen:p}=i.menuStore,{isActive:m}=n,{isMobile:f}=a,_=r||l;return void 0===u?null:(c(_),e?(0,_g.jsx)("div",{className:"sc-chart-type",children:h.map(t=>{const e=t.icon;let r="sc-chart-type__item";return r+=t.active&&!m?" sc-chart-type__item--active":"",r+=t.disabled||m?" sc-chart-type__item--disabled":"",(0,_g.jsxs)(pb,{enabled:t.disabled&&!m&&!f,className:r,content:jb.translate("Available only for non-tick time intervals."),onClick:()=>t.disabled||m?null:(t=>{u.id!==t.id&&(t.id&&s.stateChange("CHART_TYPE_CHANGE",{chart_type_name:"colored_bar"===t.id?t.text:t.text.toLowerCase(),time_interval_name:$i(s.granularity,fm)}),_(t.id)),p(!1)})(t),children:[(0,_g.jsx)(e,{}),(0,_g.jsx)("span",{className:"text",children:jb.translate(t.text)})]},t.id)})}):(0,_g.jsxs)(kb,{store:d,className:"ciq-display ciq-chart-types",enabled:t,title:jb.translate("Chart types"),children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(Ab,{Icon:u.icon,className:"ic-icon-with-sub "+(g?"active":""),"tooltip-title":jb.translate(u.text)})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)("div",{className:"body",children:(0,_g.jsx)(vb,{height:260,store:o,children:t=>(0,_g.jsx)(_g.Fragment,{children:(0,_g.jsxs)("span",{className:"left",children:[(0,_g.jsx)(Ab,{Icon:u.icon,className:"margin "+(t.active?"active":"")}),(0,_g.jsx)("span",{className:"ciq-icon-text",children:t.text})]})})})})})]}))});h(5511),h(4321);var Eb=h(809),Nb=h(9160).t;const Ib=({title:t,type:e,children:r})=>(0,_g.jsxs)("div",{className:"form__group "+(e?`form__group--${e}`:""),children:[t&&(0,_g.jsx)("div",{className:"form__label",children:(0,_g.jsxs)("span",{children:[" ",t," "]})}),(0,_g.jsx)("div",{className:"form__control",children:r})]}),Pb=({id:t,label:e,checked:r,disabled:i,onChange:a})=>(0,_g.jsx)("span",{onClick:()=>a(!r),children:(0,_g.jsxs)("label",{htmlFor:t,className:`sc-checkbox ${r?"sc-checkbox--checked":""} ${i?"sc-checkbox--disabled":""}`,children:[r?(0,_g.jsx)(ep,{className:"sc-checkbox__box"}):(0,_g.jsx)(tp,{className:"sc-checkbox__box"}),(0,_g.jsx)("span",{className:"sc-checkbox__label",children:e})]})}),Db=({min:t=1,max:e=10,step:r=1,value:i,onChange:a})=>{const s=Eb.useMemo(()=>{const r=Math.round(238*(i-t)/(e-t));return r<0?0:r},[i,t,e]),n=Eb.useCallback(t=>{let e=t.currentTarget.value;e.length>0&&a(Number(e))},[a]);return(0,_g.jsxs)("div",{className:"sc-slider",children:[(0,_g.jsxs)("div",{className:"sc-slider-range",children:[(0,_g.jsx)("div",{className:"sc-slider-bar"}),(0,_g.jsx)("div",{className:"sc-slider-active-bar",style:{width:s}}),(0,_g.jsx)("input",{type:"range",min:t,max:e,step:r,onChange:n,value:i})]}),(0,_g.jsx)("div",{className:"value",children:i})]})},Lb=t=>{const{subtitle:r,rows:i,children:a,value:s,onRowClick:n,className:o}=t,[l,c]=Eb.useState(!1),[h,u]=Eb.useState(0),[d,g]=Eb.useState(0),[p,m]=Eb.useState(),f=Eb.useRef(null),_=Eb.useRef(null),v=Eb.useCallback(()=>{const t=f.current?.getBoundingClientRect();u(l?void 0:t?.top),g(l?void 0:t?.left),m(t?.width),c(t=>!t)},[l,f]),b=Eb.useCallback(t=>{t.target!==_.current&&(c(!1),u(0),g(0))},[_]);return Eb.useEffect(()=>(document.addEventListener("click",b,!1),()=>{document.removeEventListener("click",b)}),[b]),(0,_g.jsxs)("div",{className:e()(o,"sc-dropdown",{active:l}),ref:f,style:{left:d,top:h,width:p},children:[!!r&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:r})}),(0,_g.jsxs)("div",{className:e()("value",{active:l}),onClick:v,ref:_,children:[(0,_g.jsx)("span",{className:"text",children:s}),(0,_g.jsx)(Hg,{})]}),(0,_g.jsx)(_b,{autoHide:!0,height:l?"200px":"1px",className:e()("dropdown",{active:l}),children:i.map((t,r)=>(0,_g.jsx)("div",{className:e()("row",{"row--selected":t===s}),onClick:()=>n&&n(t),children:a(t)},r))})]})},Mb=({pattern:t,subtitle:e,lineWidth:r,onChange:i})=>(0,_g.jsx)(Lb,{rows:[{width:1,pattern:"solid"},{width:3,pattern:"solid"},{width:5,pattern:"solid"},{width:1,pattern:"dotted"},{width:3,pattern:"dotted"},{width:5,pattern:"dotted"},{width:1,pattern:"dashed"},{width:3,pattern:"dashed"},{width:5,pattern:"dashed"},{width:0,pattern:"none"}],value:"none"!==t?(0,_g.jsx)("span",{className:`option ${t}-${r}`}):(0,_g.jsx)("span",{className:"none",children:"None"}),onRowClick:i,subtitle:e,children:t=>"none"!==t.pattern?(0,_g.jsx)("span",{className:`option ${t.pattern}-${t.width}`}):(0,_g.jsx)("span",{className:"none",children:"None"})}),Bb=({subtitle:t,color:r,theme:i,setColor:a})=>{const[s,n]=Eb.useState(!1),[o,l]=Eb.useState(0),[c,h]=Eb.useState(0),[u,d]=Eb.useState(),g=Eb.useRef(null),p=Eb.useRef(null),m=Eb.useMemo(()=>"auto"!==r?r:"light"===i?"#000000":"#ffffff",[r,i]),f=Eb.useCallback(()=>{const t=g.current?.getBoundingClientRect();l(s?void 0:t?.top),h(s?void 0:t?.left),d(t?.width),n(t=>!t)},[s,g]),_=Eb.useCallback(t=>{t.target!==p.current&&(n(!1),l(0),h(0))},[p]);return Eb.useEffect(()=>(document.addEventListener("click",_,!1),()=>{document.removeEventListener("click",_)}),[_]),(0,_g.jsxs)("div",{ref:g,className:e()("sc-color-picker",{active:s}),style:{top:o,left:c,width:u},children:[!!t&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:t})}),(0,_g.jsxs)("div",{className:"value",onClick:f,ref:p,children:[(0,_g.jsx)("div",{className:"sc-input-color",style:{backgroundColor:m}}),(0,_g.jsx)(Hg,{})]}),(0,_g.jsx)("div",{className:e()("dropdown",{open:s}),children:[["#ffffff","#e1e1e1","#cccccc","#b7b7b7","#a0a0a5","#898989","#707070","#626262","#555555","#464646","#363636","#262626","#1d1d1d","#000000"],["#f4977c","#f7ac84","#fbc58d","#fff69e","#c4de9e","#85c99e","#7fcdc7","#75d0f4","#81a8d7","#8594c8","#8983bc","#a187bd","#bb8dbe","#f29bc1"],["#ef6c53","#f38d5b","#f8ae63","#fff371","#acd277","#43b77a","#2ebbb3","#00bff0","#4a8dc8","#5875b7","#625da6","#8561a7","#a665a7","#ee6fa9"],["#ea1d2c","#ee652e","#f4932f","#fff126","#8ec648","#00a553","#00a99c","#00afed","#0073ba","#0056a4","#323390","#66308f","#912a8e","#e9088c"],["#9b0b16","#9e4117","#a16118","#c6b920","#5a852d","#007238","#00746a","#0077a1","#004c7f","#003570","#1d1762","#441261","#62095f","#9c005d"],["#770001","#792e03","#7b4906","#817a0b","#41661e","#005827","#005951","#003b5c","#001d40","#000e35","#04002c","#19002b","#2c002a","#580028"]].map((t,e)=>(0,_g.jsx)("div",{className:"row",children:t.map(t=>(0,_g.jsx)("div",{className:"tile-color",style:{backgroundColor:t},onClick:()=>a(t)},t))},e))})]})},Rb=({value:t,onChange:e})=>(0,_g.jsx)("div",{className:"sc-switch "+(t?"on":"off"),onClick:()=>e(!t),children:(0,_g.jsx)("div",{className:"handle"})}),Fb=({id:t,label:e,value:r,onChange:i,noramIcon:a,activeIcon:s})=>{const n=r?s:a;return(0,_g.jsxs)("div",{className:"sc-switch-icon",children:[(0,_g.jsx)(n,{className:"sc-switch-icon__icon"}),(0,_g.jsx)("div",{className:"sc-switch-icon__description",children:(0,_g.jsx)(Pb,{id:t,label:e,checked:r,onChange:i})})]})},Vb=({subtitle:t,onChange:e,min:r,max:i,step:a,value:s})=>{const[n,o]=Eb.useState(""),l=sf(()=>{const t=t=>{o(t),e(t)};void 0!==i&&+n>i?t(i):void 0!==r&&+n<r?t(r):e(n)},300,{leading:!0,trailing:!1});return Eb.useEffect(()=>{o(s)},[s]),(0,_g.jsxs)("div",{className:"sc-numeric-input",children:[(0,_g.jsx)("input",{type:"number",value:n,onBlur:l,onChange:t=>{t.persist(),o(t.target.valueAsNumber||"")},onKeyPress:t=>{["e","+","E"].includes(t.key)&&t.preventDefault(),"Enter"===t.key&&l()},min:r,max:i,step:a}),!!t&&(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:t})}),(0,_g.jsxs)("div",{className:"sc-numeric-input-buttons",children:[(0,_g.jsx)(Ag,{onClick:()=>{o(t=>+t+1),l()}}),(0,_g.jsx)(jg,{onClick:()=>{o(t=>+t-1),l()}})]})]})},Hb=({props:t,theme:e,onChange:r})=>{const{value:i,color:a}=t;return(0,_g.jsxs)("span",{className:"sc-numbercolorpicker",children:[(0,_g.jsx)(Vb,{value:i,subtitle:Nb.translate("Size"),onChange:t=>r({color:a,value:t})}),(0,_g.jsx)(Bb,{color:a,theme:e,subtitle:Nb.translate("Color"),setColor:t=>r({color:t,value:i})})]})},Ub=({className:t,children:e,active:r,onChange:i})=>(0,_g.jsx)("div",{onClick:()=>i(!r),className:`${t||""} ${r?"active":""} sc-toggle`,children:e}),qb=({onChange:t,value:e})=>{const r=r=>t({...e,...r}),{style:i,weight:a}=e;return(0,_g.jsxs)("span",{className:"sc-fontsetting",children:[(0,_g.jsx)(Ub,{onChange:t=>r({weight:t?"bold":void 0}),active:!!a,children:(0,_g.jsx)("div",{className:"sc-text-icon",children:(0,_g.jsx)("b",{children:"B"})})}),(0,_g.jsx)(Ub,{active:!!i,onChange:t=>r({style:t?"italic":void 0}),children:(0,_g.jsx)("div",{className:"sc-text-icon",children:(0,_g.jsx)("i",{children:"i"})})}),(0,_g.jsx)(Lb,{className:"sc-changefontsize",rows:[8,10,12,13,14,16,20,28,36,48,64],onRowClick:t=>r({size:`${t}px`}),children:t=>(0,_g.jsx)("span",{className:"option",children:t})}),(0,_g.jsx)(Lb,{className:"sc-changefontfamily",rows:["Default","Helvetica","Courier","Garamond","Palatino","Times New Roman"],onRowClick:t=>r({family:t}),children:t=>(0,_g.jsx)("span",{className:"option",children:t})})]})};h(931);const zb=({children:t,className:r,enabled:i=!0,...a})=>(0,_g.jsxs)("div",{className:e()("sc-inline-loader",r,{"sc-inline-loader--enable":i}),...a,children:[t,i&&(0,_g.jsxs)("div",{className:"sc-inline-loader__inner",children:[(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,_g.jsx)("span",{className:"sc-inline-loader__inner__bullet"})]})]}),$b=Li(()=>{const{loader:t}=sb(),{isActive:r,currentState:i}=t;return(0,_g.jsxs)("div",{className:e()("sc-loader",{show:r}),children:[(0,_g.jsx)("div",{className:"sc-loader-spin"}),(0,_g.jsx)("div",{className:"sc-loader-status",children:i})]})});var Gb=h(9160).t;const Wb=Li(({item:t,category:r,onClick:i,isLoading:a})=>{const{timeperiod:s,chartType:n,chart:o,state:l}=sb(),c=n.type.id,{allowTickChartTypeOnly:h}=l,{mainStore:u}=s,{granularity:d}=o,g=u.chart.isMobile,p=yi().useMemo(()=>"tick"===r.key,[r]),m=yi().useMemo(()=>((t,e,r)=>t&&e===r)(a,t.interval,d),[a,t,d]),f=yi().useMemo(()=>((t,e,r)=>!t&&"line"!==r&&"tick"===e)(g,r.key,c),[g,r.key,c]),_=yi().useMemo(()=>p&&"line"!==c||!p&&h,[p,c,h]),v=t.interval===d,b=yi().useCallback(()=>i(c,r.key,t.interval),[c,r,t,i]);return(0,_g.jsx)(pb,{onClick:b,className:e()("sc-interval__item",{"sc-interval__item--active":v,"sc-interval__item--disabled":_||a,"pre-loading":m}),enabled:f,content:Gb.translate('Available only for "Area" chart type.'),children:(0,_g.jsx)(zb,{enabled:m,children:(0,_g.jsxs)("span",{children:[t.num," ",Gb.translate(1===t.num?r.single:r.plural)]})})},t.interval)}),Kb=Li(({portalNodeId:t,onChange:e})=>{const{timeperiod:r,loader:i}=sb(),{changeGranularity:a,setGranularity:s,updateProps:n,updatePortalNode:o}=r,{isActive:l}=i,c=e||s,h=(t,e,r)=>{l||"tick"===e&&"line"!==t||a(r)};return yi().useEffect(()=>n(c)),o(t),(0,_g.jsxs)("div",{className:"sc-interval",children:[(0,_g.jsx)("div",{className:"sc-interval__head",children:(0,_g.jsx)("strong",{children:Gb.translate("Time interval")})}),(0,_g.jsx)("div",{className:"sc-interval__info",children:Gb.translate('Tick interval only available for "Area" Chart type.')}),(0,_g.jsx)("div",{className:"sc-interval__content",children:fm.map(t=>t.items.map(e=>(0,_g.jsx)(Wb,{item:e,category:t,onClick:h,isLoading:l},e.interval)))})]})}),Qb=({className:t="info-footnote",isMobile:r=!1,text:i})=>(0,_g.jsx)("div",{className:e()(t,{[`${t}--mobile`]:r}),children:i}),Yb=yi().memo(Qb);var Xb=h(9160).t;const Zb={line:np,candles:op,ohlc:cp,hollow:lp},Jb=Li(({onChartType:t,onGranularity:r,portalNodeId:i=""})=>{const{chart:a,chartMode:s,chartType:n,timeperiod:o,state:l,chartSetting:c}=sb(),{menuStore:h}=s,{allowTickChartTypeOnly:u}=l,{isMobile:d}=a,{type:g}=n,{display:p}=o,{isSmoothChartEnabled:m,toggleSmoothChart:f}=c,_=s.menuStore.open,v=Zb[g.id];return(0,_g.jsxs)(kb,{className:"ciq-display sc-chart-mode",title:Xb.translate("Chart types"),tooltip:Xb.translate("Chart types"),modalMode:!0,isFullscreen:!0,portalNodeId:i,store:h,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:e()("sc-chart-mode__menu",{"sc-chart-mode__menu--active":_}),children:[(0,_g.jsx)("span",{className:"sc-chart-mode__menu__timeperiod",children:p}),(0,_g.jsx)(v,{"tooltip-title":Xb.translate(g.text)})]})}),(0,_g.jsxs)(kb.Body,{children:[(0,_g.jsxs)("div",{className:"sc-chart-mode__section",children:[(0,_g.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,_g.jsx)(Ob,{newDesign:!0,onChange:t})}),(0,_g.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,_g.jsx)(Kb,{newDesign:!0,portalNodeId:i,onChange:r})})]}),(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle",children:(0,_g.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-content",children:[(0,_g.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-text",children:[(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle-title",children:Xb.translate("Smooth chart movement")}),(0,_g.jsx)("div",{className:"sc-chart-mode__smooth-toggle-description",children:Xb.translate("Performance may vary by device. Turn off if it lags.")})]}),(0,_g.jsx)(Rb,{value:m,onChange:f})]})}),u&&(0,_g.jsx)(Yb,{isMobile:d,text:Xb.translate("Only selected charts and time intervals are available for this trade type.")})]})]})});var ty=h(8713);function ey(t){return e=>!!e.type&&e.type.tabsRole===t}const ry=ey("Tab"),iy=ey("TabList"),ay=ey("TabPanel");function sy(t,e){return bi.Children.map(t,t=>null===t?null:function(t){return ry(t)||iy(t)||ay(t)}(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children?(0,bi.cloneElement)(t,Object.assign({},t.props,{children:sy(t.props.children,e)})):t)}function ny(t,e){return bi.Children.forEach(t,t=>{null!==t&&(ry(t)||ay(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children&&(iy(t)&&e(t),ny(t.props.children,e)))})}function oy(t,e,r){let i,a=0,s=0,n=!1;const o=[];return ny(t[e],t=>{iy(t)&&(t.props&&t.props.children&&"object"==typeof t.props.children&&ny(t.props.children,t=>o.push(t)),n&&(i=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),n=!0),ry(t)?(n&&-1!==o.indexOf(t)||(i=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),a++):ay(t)&&s++}),i||a===s||(i=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${r}\`. Received ${a} 'Tab' and ${s} 'TabPanel'.`)),i}function ly(t){var e,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=ly(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}const cy=function(){for(var t,e,r=0,i="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=ly(t))&&(i&&(i+=" "),i+=e);return i};function hy(t){let e=0;return ny(t,t=>{ry(t)&&e++}),e}const uy=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function dy(t){return t&&"getAttribute"in t}function gy(t){return dy(t)&&t.getAttribute("data-rttab")}function py(t){return dy(t)&&"true"===t.getAttribute("aria-disabled")}let my;const fy={className:"react-tabs",focus:!1},_y={children:oy},vy=t=>{(0,ty.checkPropTypes)(_y,t,"prop","UncontrolledTabs");let e=(0,bi.useRef)([]),r=(0,bi.useRef)([]);const i=(0,bi.useRef)();function a(e,r){if(e<0||e>=o())return;const{onSelect:i,selectedIndex:a}=t;i(e,a,r)}function s(t){const e=o();for(let r=t+1;r<e;r++)if(!py(l(r)))return r;for(let e=0;e<t;e++)if(!py(l(e)))return e;return t}function n(t){let e=t;for(;e--;)if(!py(l(e)))return e;for(e=o();e-- >t;)if(!py(l(e)))return e;return t}function o(){const{children:e}=t;return hy(e)}function l(t){return e.current[`tabs-${t}`]}function c(t){let e=t.target;do{if(h(e)){if(py(e))return;return void a([].slice.call(e.parentNode.children).filter(gy).indexOf(e),t)}}while(null!=(e=e.parentNode))}function h(t){if(!gy(t))return!1;let e=t.parentElement;do{if(e===i.current)return!0;if(e.getAttribute("data-rttabs"))break;e=e.parentElement}while(e);return!1}const u=Object.assign({},fy,t),{className:d,domRef:g}=u,p=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(u,uy);return yi().createElement("div",Object.assign({},p,{className:cy(d),onClick:c,onKeyDown:function(e){const{direction:r,disableUpDownKeys:i,disableLeftRightKeys:u}=t;if(h(e.target)){let{selectedIndex:h}=t,d=!1,g=!1;"Space"!==e.code&&32!==e.keyCode&&"Enter"!==e.code&&13!==e.keyCode||(d=!0,g=!1,c(e)),(u||37!==e.keyCode&&"ArrowLeft"!==e.code)&&(i||38!==e.keyCode&&"ArrowUp"!==e.code)?(u||39!==e.keyCode&&"ArrowRight"!==e.code)&&(i||40!==e.keyCode&&"ArrowDown"!==e.code)?35===e.keyCode||"End"===e.code?(h=function(){let t=o();for(;t--;)if(!py(l(t)))return t;return null}(),d=!0,g=!0):36!==e.keyCode&&"Home"!==e.code||(h=function(){const t=o();for(let e=0;e<t;e++)if(!py(l(e)))return e;return null}(),d=!0,g=!0):(h="rtl"===r?n(h):s(h),d=!0,g=!0):(h="rtl"===r?s(h):n(h),d=!0,g=!0),d&&e.preventDefault(),g&&a(h,e)}},ref:t=>{i.current=t,g&&g(t)},"data-rttabs":!0}),function(){let i=0;const{children:a,disabledTabClassName:s,focus:n,forceRenderTabPanel:c,selectedIndex:h,selectedTabClassName:u,selectedTabPanelClassName:d,environment:g}=t;r.current=r.current||[];let p=r.current.length-o();const m=(0,bi.useId)();for(;p++<0;)r.current.push(`${m}${r.current.length}`);return sy(a,t=>{let a=t;if(iy(t)){let i=0,o=!1;null==my&&function(t){const e=t||("undefined"!=typeof window?window:void 0);try{my=!(void 0===e||!e.document||!e.document.activeElement)}catch(t){my=!1}}(g);const c=g||("undefined"!=typeof window?window:void 0);my&&c&&(o=yi().Children.toArray(t.props.children).filter(ry).some((t,e)=>c.document.activeElement===l(e))),a=(0,bi.cloneElement)(t,{children:sy(t.props.children,t=>{const a=`tabs-${i}`,l=h===i,c={tabRef:t=>{e.current[a]=t},id:r.current[i],selected:l,focus:l&&(n||o)};return u&&(c.selectedClassName=u),s&&(c.disabledClassName=s),i++,(0,bi.cloneElement)(t,c)})})}else if(ay(t)){const e={id:r.current[i],selected:h===i};c&&(e.forceRender=c),d&&(e.selectedClassName=d),i++,a=(0,bi.cloneElement)(t,e)}return a})}())},by=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"],yy={children:oy,onSelect:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;return s&&"function"!=typeof s?o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`function\`.`):null!=t.selectedIndex&&null==s&&(o=new Error(`The ${i} \`${n}\` is marked as required in \`${r}\`, but its value is \`undefined\` or \`null\`.\n\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.\nIf you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),o},selectedIndex:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;if(null!=s&&"number"!=typeof s)o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`number\`.`);else if(null!=t.defaultIndex&&null!=s)return new Error(`The ${i} \`${n}\` cannot be used together with \`defaultIndex\` in \`${r}\`.\nEither remove \`${n}\` to let \`${r}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return o}},Sy={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},xy=t=>{(0,ty.checkPropTypes)(yy,t,"prop","Tabs");const e=Object.assign({},Sy,t),{children:r,defaultFocus:i,defaultIndex:a,focusTabOnClick:s,onSelect:n}=e,o=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,by),[l,c]=(0,bi.useState)(i),[h]=(0,bi.useState)((t=>null===t.selectedIndex?1:0)(o)),[u,d]=(0,bi.useState)(1===h?a||0:null);if((0,bi.useEffect)(()=>{c(!1)},[]),1===h){const t=hy(r);(0,bi.useEffect)(()=>{if(null!=u){const e=Math.max(0,t-1);d(Math.min(u,e))}},[t])}let g=Object.assign({},t,o);return g.focus=l,g.onSelect=(t,e,r)=>{"function"==typeof n&&!1===n(t,e,r)||(s&&c(!0),1===h&&d(t))},null!=u&&(g.selectedIndex=u),delete g.defaultFocus,delete g.defaultIndex,delete g.focusTabOnClick,yi().createElement(vy,g,r)};xy.tabsRole="Tabs";const wy=xy,Cy=["children","className"],Ty={className:"react-tabs__tab-list"},ky=t=>{const e=Object.assign({},Ty,t),{children:r,className:i}=e,a=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Cy);return yi().createElement("ul",Object.assign({},a,{className:cy(i),role:"tablist"}),r)};ky.tabsRole="TabList";const jy=ky,Ay=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"],Oy="react-tabs__tab",Ey={className:Oy,disabledClassName:`${Oy}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${Oy}--selected`},Ny=t=>{let e=(0,bi.useRef)();const r=Object.assign({},Ey,t),{children:i,className:a,disabled:s,disabledClassName:n,focus:o,id:l,selected:c,selectedClassName:h,tabIndex:u,tabRef:d}=r,g=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(r,Ay);return(0,bi.useEffect)(()=>{c&&o&&e.current.focus()},[c,o]),yi().createElement("li",Object.assign({},g,{className:cy(a,{[h]:c,[n]:s}),ref:t=>{e.current=t,d&&d(t)},role:"tab",id:`tab${l}`,"aria-selected":c?"true":"false","aria-disabled":s?"true":"false","aria-controls":`panel${l}`,tabIndex:u||(c?"0":null),"data-rttab":!0}),i)};Ny.tabsRole="Tab";const Iy=Ny,Py=["children","className","forceRender","id","selected","selectedClassName"],Dy="react-tabs__tab-panel",Ly={className:Dy,forceRender:!1,selectedClassName:`${Dy}--selected`},My=t=>{const e=Object.assign({},Ly,t),{children:r,className:i,forceRender:a,id:s,selected:n,selectedClassName:o}=e,l=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Py);return yi().createElement("div",Object.assign({},l,{className:cy(i,{[o]:n}),role:"tabpanel",id:`panel${s}`,"aria-labelledby":`tab${s}`}),a||n?r:null)};My.tabsRole="TabPanel";const By=My,Ry=({notificationCount:t})=>t?(0,_g.jsx)("span",{className:e()("sc-notification-badge",{x2:t>9}),children:t}):null;h(7209),h(6351);const Fy=Li(({placeholder:t,value:r,searchInput:i,searchInputClassName:a,onChange:s})=>(0,_g.jsxs)("div",{className:e()("sc-search-input",{active:""!==r.trim()}),children:[(0,_g.jsx)("input",{className:a,value:r,ref:i,onChange:t=>s(t.target.value),type:"text",spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:t}),(0,_g.jsx)(Fg,{}),(0,_g.jsx)(Og,{className:"icon-reset",onClick:()=>s("")})]}));var Vy=h(9160).t;const Hy=({Icon:t})=>(0,_g.jsx)(t,{}),Uy=()=>(0,_g.jsxs)("div",{className:"sc-studies--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:Vy.translate("You have no active indicators yet.")})]}),qy=({text:t})=>(0,_g.jsxs)("div",{className:"sc-studies--empty",children:[(0,_g.jsxs)("strong",{children:[Vy.translate("No results for")," “",t,"”"]}),(0,_g.jsx)("p",{children:Vy.translate("Try checking your spelling or use a different term")})]}),zy=({items:t,onSelectItem:r,onDeleteItem:i,onEditItem:a,onInfoItem:s,disableAll:n,isTick:o})=>(0,_g.jsx)("div",{className:"sc-studies__list",children:t.map(t=>(0,_g.jsx)("div",{className:e()("sc-studies__list__item ",{"sc-studies__list__item--disabled":n,"sc-studies__list__item--disabled-prediction":t.isPrediction&&o}),children:(0,_g.jsxs)(pb,{className:"sc-studies__list__item__box",enabled:!!((a||i)&&t.bars&&t.bars.length>30)||t.isPrediction&&o,content:t.isPrediction&&o?Vy.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more."):`${t.name} ${t.bars?`(${t.bars})`:""}`,children:[(0,_g.jsxs)("div",{className:"info",onClick:()=>r?.(t.flutter_chart_id),onTouchEnd:()=>r?.(t.flutter_chart_id),children:[(0,_g.jsx)(Hy,{Icon:t.icon}),(0,_g.jsxs)("div",{className:"text",children:[(0,_g.jsx)("span",{children:i?t.short_name_and_index:t.name}),t.bars&&(0,_g.jsxs)("small",{children:["(",t.bars,")"]})]})]}),(0,_g.jsxs)("div",{className:"detail",children:[s&&(0,_g.jsx)($g,{className:"ic-info",onClick:()=>s(t)}),a&&(0,_g.jsx)(Vg,{onClick:()=>a(t)}),i&&(0,_g.jsx)(Ig,{onClick:()=>i(t.id)})]})]})},`item--${t.id||t.flutter_chart_id}`))}),$y=({categories:t,onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})=>(0,_g.jsx)(_b,{autoHide:!0,children:t.map(t=>(0,_g.jsxs)("div",{className:"sc-studies__category",children:[(0,_g.jsx)("div",{className:"sc-studies__category__head",children:t.name}),(0,_g.jsx)("div",{className:"sc-studies__category__body",children:(0,_g.jsx)(zy,{items:t.foundItems||[],onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})})]},t.name))}),Gy=({items:t,onDeleteItem:e,onEditItem:r,clearAll:i,isMobile:a})=>(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)("div",{className:"sc-studies__panel__head",children:[(0,_g.jsx)("p",{children:a?Vy.translate("Up to 2 active indicators allowed."):Vy.translate("Up to 5 active indicators allowed.")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:()=>i(),children:Vy.translate("Clear all")})]}),(0,_g.jsx)("div",{className:"sc-studies__panel__content sc-studies__panel__content--active",children:(0,_g.jsx)(zy,{items:t,onDeleteItem:e,onEditItem:r})})]}),Wy=({onSelectTab:t,selectedTab:e,categories:r,searchedCategories:i,onSelectItem:a,onDeleteItem:s,onEditItem:n,onInfoItem:o,activeItems:l,clearAll:c,searchQuery:h,isMobile:u,maxAllowedItem:d,isTick:g})=>(0,_g.jsxs)(wy,{className:"tabs--vertical",selectedIndex:e,onSelect:t,children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsx)(Iy,{className:"hidden"},"hidden"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(xg,{}),(0,_g.jsx)("span",{children:Vy.translate("Active")}),(0,_g.jsx)(Ry,{notificationCount:l.length})]},"active"),r.map(t=>(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Hy,{Icon:t.icon}),(0,_g.jsx)("span",{children:t.name})]},`tab--${t.name}`))]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-studies__panel sc-studies__panel--search",children:i.length?(0,_g.jsx)($y,{categories:i,onSelectItem:a,onInfoItem:o,disableAll:l.length===(u?2:5),isTick:g}):(0,_g.jsx)(qy,{text:h})})},"panel--search"),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-studies__panel sc-studies__panel--active",children:l.length?(0,_g.jsx)(Gy,{clearAll:c,items:l,onDeleteItem:s,onEditItem:n,isMobile:u}):(0,_g.jsx)(Uy,{})})},"panel--active"),r.map(t=>(0,_g.jsx)(By,{children:(0,_g.jsxs)("div",{className:"sc-studies__panel",children:[(0,_g.jsx)("h3",{children:t.name}),(0,_g.jsx)(zy,{onSelectItem:a,onInfoItem:o,items:t.items,disableAll:l.length===d,isTick:g})]})},`panel--${t.name}`))]}),Ky=Li(({portalNodeId:t})=>{const{studies:e,chart:r,state:i,timeperiod:a}=sb(),{menuStore:s,deleteAllStudies:n,items:o,searchedItems:l,filterText:c,selectedTab:h,onSelectTab:u,onSelectItem:d,activeItems:g,deleteStudyById:p,editStudy:m,onInfoItem:f,infoItem:_,updatePortalNode:v,maxAllowedItem:b,setFilterText:y,searchInput:S}=e,{isTick:x}=a,{isMobile:w}=r,C=s.open,T=g.length;v(t);const k=(t,e,r)=>{i.stateChange(e,{indicator_type_name:t,indicators_category_name:Cm(t),...r??{}})};return(0,_g.jsxs)(kb,{store:s,className:"sc-studies",title:Vy.translate("Indicators"),tooltip:Vy.translate("Indicators"),modalMode:!0,enableTabular:!0,portalNodeId:t,customHead:_?(0,_g.jsxs)("div",{className:"sc-dialog__head--info",children:[(0,_g.jsx)(Gg,{onClick:()=>{f(null),k(_.flutter_chart_id,ym)}}),_.flutter_chart_id]}):(0,_g.jsx)("div",{className:"sc-dialog__head--search",children:(0,_g.jsx)(Fy,{placeholder:Vy.translate("Search"),searchInputClassName:"searchInputClassName",value:c,onChange:y,searchInput:S})}),children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:"sc-studies__menu "+(C?"sc-studies__menu--active":""),children:[(0,_g.jsx)(Pg,{}),(0,_g.jsx)(Ry,{notificationCount:T})]})}),(0,_g.jsxs)(kb.Body,{children:[_&&(0,_g.jsxs)("div",{className:"sc-studies__info",children:[(0,_g.jsx)(_b,{autoHide:!0,height:"360px",className:"sc-studies__info__content",children:(0,_g.jsx)("p",{children:_?.description})}),(0,_g.jsx)("div",{className:"sc-studies__info__footer",children:(0,_g.jsx)(pb,{enabled:_?.disabledAddBtn,content:wm.predictionIndicator,children:(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--w100",onClick:()=>{d(_?.flutter_chart_id),k(_?.flutter_chart_id,vm,{is_info_open:!0})},disabled:_?.disabledAddBtn,children:Vy.translate("Add")})})})]}),(0,_g.jsx)(Wy,{onSelectTab:u,selectedTab:h,categories:o,searchedCategories:l,onSelectItem:t=>{d(t),k(t,vm)},onDeleteItem:t=>{p(t)},onEditItem:t=>{m(t)},onInfoItem:t=>{f(t),k(t.flutter_chart_id,ym,{is_info_open:!0})},activeItems:g,clearAll:()=>{n(),i.stateChange("INDICATORS_CLEAR_ALL")},searchQuery:c,isMobile:w,maxAllowedItem:b,isTick:x})]})]})});h(6238);var Qy=h(9160).t;const Yy=({disabled:t=!1,view:r,remove:i,onClick:a})=>(0,_g.jsxs)(pb,{className:"sc-views__views__list__item",onClick:t?void 0:a,enabled:r.name.length>27,content:ia(r.name,26),children:[(0,_g.jsx)("div",{className:e()("text",{"text--disabled":t}),children:r.name}),(0,_g.jsx)(Ig,{onClick:i})]}),Xy=({onClick:t})=>(0,_g.jsxs)("div",{className:"sc-views--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:Qy.translate("You have no saved templates yet.")}),(0,_g.jsxs)("button",{type:"button",className:"sc-btn",onClick:t,children:[(0,_g.jsx)(Cg,{}),Qy.translate("Add new template")]})]}),Zy=({templateName:t,onCancel:e,onOverwrite:r})=>(0,_g.jsxs)("div",{className:"sc-views--overwrite",children:[(0,_g.jsxs)("div",{className:"sc-views--overwrite__content",children:[(0,_g.jsx)(Fp,{}),(0,_g.jsxs)("p",{children:[`${t} ${Qy.translate("already exists.")}`,(0,_g.jsx)("br",{}),Qy.translate("Would you like to overwrite it?")]})]}),(0,_g.jsxs)("div",{className:"sc-views--overwrite__footer",children:[(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:e,children:Qy.translate("Cancel")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:r,children:Qy.translate("Overwrite")})]})]}),Jy=({allowTickChartTypeOnly:t,views:e,removeAll:r,applyLayout:i,remove:a,onGranularity:s,onChartType:n})=>{if(!e.length)return null;const o=e=>{const{chartType:r,timeUnit:i}=e??{};return t&&!("line"===r&&"tick"===i)};return(0,_g.jsxs)("div",{className:"sc-views__views",children:[(0,_g.jsxs)("div",{className:"sc-views__views__head",children:[(0,_g.jsx)("h5",{children:Qy.translate("Saved templates")}),(0,_g.jsx)("button",{type:"button",onClick:r,className:"sc-btn sc-btn--sm sc-btn--outline-secondary",children:Qy.translate("Clear all")})]}),(0,_g.jsx)("div",{className:"sc-views__views__content",children:(0,_g.jsx)("div",{className:"sc-views__views__list",children:e.map((t,e)=>(0,_g.jsx)(Yy,{disabled:o(t.layout),view:t,onClick:t=>i(e,t,s,n),remove:t=>a(e,t)},t.name))})})]})},tS=Li(({portalNodeId:t,onChartType:r,onGranularity:i})=>{const{view:a,state:s,chart:n}=sb(),{allowTickChartTypeOnly:o}=s,{isMobile:l}=n,{sortedItems:c,routes:{main:h,overwrite:u},onChange:d,remove:g,onSubmit:p,applyLayout:m,inputRef:f,currentRoute:_,templateName:v,onToggleNew:b,saveViews:y,removeAll:S,isInputActive:x,onFocus:w,onBlur:C,menuStore:T}=a,k=T.dialogStore.open,j=x||""!==v;return(0,_g.jsxs)(kb,{store:T,className:"sc-views-menu",title:Qy.translate("Templates"),tooltip:Qy.translate("Templates"),modalMode:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)("div",{className:e()("sc-views__menu",{"sc-views__menu--active":k}),children:(0,_g.jsx)(Bg,{})})}),(0,_g.jsxs)(kb.Body,{children:[(0,_g.jsx)("div",{className:"sc-views",children:"new"===_?(0,_g.jsx)(Xy,{onClick:b}):(0,_g.jsxs)(_g.Fragment,{children:["overwrite"!==_?"":(0,_g.jsx)(Zy,{templateName:v,onCancel:h,onOverwrite:u}),(0,_g.jsxs)(_b,{autoHide:!0,children:[(0,_g.jsx)("div",{className:"form form--sc-views",children:(0,_g.jsx)("div",{className:"form__input-group",children:(0,_g.jsx)("div",{className:"form__group",children:(0,_g.jsx)("div",{className:"form__control",children:(0,_g.jsxs)("div",{className:e()("form--sc-views__input",{"form--sc-views__input--active":j}),children:[(0,_g.jsx)("div",{className:"subtitle",children:(0,_g.jsx)("span",{children:Qy.translate("Add new templates")})}),(0,_g.jsx)("input",{type:"text",className:e()("sc-input",{"sc-input--active":j}),placeholder:j?"":Qy.translate("Add new templates"),ref:f,value:v,onKeyUp:p,onChange:d,onFocus:w,onClick:w,onBlur:C}),(0,_g.jsx)("button",{type:"button",onClick:y,className:e()("sc-btn","sc-btn--primary",{"sc-btn--primary--disabled":!j}),children:(0,_g.jsx)(Cg,{})})]})})})})}),(0,_g.jsx)(Jy,{allowTickChartTypeOnly:o,views:c,removeAll:S,applyLayout:m,remove:g,onChartType:r,onGranularity:i})]})]})}),o&&(0,_g.jsx)(Yb,{isMobile:l,text:Qy.translate("Some of your templates may not work with this trade type.")})]})]})});var eS=h(9160).t;const rS=Li(()=>{const{chart:t,crosshair:e}=sb(),{isMobile:r}=t,i=e.isEnabled?Ng:Eg,a=e.isEnabled?eS.translate("Disable Crosshair"):eS.translate("Enable Crosshair");return(0,_g.jsx)(pb,{content:a,enabled:!r,position:"right",children:(0,_g.jsx)(Ub,{active:e.isEnabled,onChange:t=>e.updateEnabledState(t),children:(0,_g.jsx)(i,{})})})});h(6765);var iS=h(9160).t;const aS=Li(()=>{const{chartSize:t}=sb(),{zoomIn:e,zoomOut:r}=t;return(0,_g.jsxs)("div",{className:"ciq-menu sc-chart-size",children:[(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(Dg,{className:"ic-icon-with-sub cq-zoom-out","tooltip-title":iS.translate("Zoom out"),onClick:r})}),(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(Tg,{className:"ic-icon-with-sub cq-zoom-in","tooltip-title":iS.translate("Zoom in"),onClick:e})})]})});h(4001);var sS=h(9160).t;const nS=({enabled:t,children:e})=>t?(0,_g.jsxs)("div",{className:"sc-dtools--empty",children:[(0,_g.jsx)(Rp,{}),(0,_g.jsx)("p",{children:sS.translate("You have no active drawings yet.")})]}):(0,_g.jsx)(_g.Fragment,{children:e}),oS=({Icon:t,text:e,num:r,bars:i})=>(0,_g.jsxs)("div",{className:"info",children:[t?(0,_g.jsx)(t,{className:"icon"}):"",(0,_g.jsxs)("div",{className:"text",children:[(0,_g.jsx)("span",{children:sS.translate(e,{num:r||" "})}),i?(0,_g.jsxs)("small",{children:["(",i," bars)"]}):""]})]}),lS=({items:t,onClick:r})=>(0,_g.jsx)("div",{className:"sc-dtools__list",children:t.map(t=>(0,_g.jsx)("div",{className:e()("sc-dtools__list__item",`sc-dtools__${t.id}`),onClick:()=>r(t.id),children:(0,_g.jsx)(oS,{Icon:t.icon,text:t.text})},t.id))}),cS=({item:t,onDelete:e})=>(0,_g.jsxs)("div",{className:"sc-dtools__list__item",children:[(0,_g.jsx)(oS,{Icon:t.icon,text:t.text,bars:t.bars,num:t.num}),(0,_g.jsx)("div",{className:"actions",children:(0,_g.jsx)(Ig,{onClick:()=>e(t.index)})})]}),hS=({group:t,onDelete:e})=>(0,_g.jsxs)("div",{className:"sc-dtools__category",children:[(0,_g.jsx)("div",{className:"sc-dtools__category__head",children:sS.translate(K_(t.id))}),(0,_g.jsx)("div",{className:"sc-dtools__category__body",children:(0,_g.jsx)("div",{className:"sc-dtools__list",children:t.items.map(t=>(0,_g.jsx)(cS,{item:{...t},onDelete:e},t.index))})})]}),uS=({activeDrawToolsGroup:t,onDelete:e})=>{const r=t.sort((t,e)=>t.items.length<=1&&e.items.length<=1?0:t.items.length<=1?-1:e.items.length<=1?1:0);return(0,_g.jsx)(_b,{autoHide:!0,height:320,children:r.map(t=>t.items.length>1?(0,_g.jsx)(hS,{group:t,onDelete:e},t.id):t.items.map(t=>(0,_g.jsx)(cS,{item:t,onDelete:e},t.index)))})},dS=Li(({portalNodeId:t})=>{const{drawTools:r,chart:i}=sb(),{isMobile:a}=i,{clearAll:s,startAddingNewTool:n,getDrawToolsItems:o,activeToolsNo:l,activeToolsGroup:c,onDeleted:h,updatePortalNode:u,menuStore:d}=r,g=o(),p=d.open;return u(t),(0,_g.jsxs)(kb,{store:d,className:"sc-dtools",title:sS.translate("Drawing tools"),tooltip:sS.translate("Drawing tools"),modalMode:!0,enableTabular:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsxs)("div",{className:e()("sc-dtools__menu",{"sc-dtools__menu--active":p}),children:[(0,_g.jsx)(Sg,{}),(0,_g.jsx)(Ry,{notificationCount:l})]})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)(wy,{className:e()({"tabs--vertical":!a,"tabs--horizontal":a}),children:[" ",(0,_g.jsxs)(jy,{children:[(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(xg,{}),sS.translate("Active"),(0,_g.jsx)(Ry,{notificationCount:l})]}),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Sg,{}),sS.translate("All drawings")]})]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-dtools__panel",children:(0,_g.jsxs)(nS,{enabled:!l,children:[(0,_g.jsx)("div",{className:"sc-dtools__panel__head",children:(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:s,children:(0,_g.jsx)("span",{children:sS.translate("Clear all")})})}),(0,_g.jsx)("div",{className:"sc-dtools__panel__content sc-dtools__panel__content--active",children:(0,_g.jsx)(uS,{activeDrawToolsGroup:c,onDelete:h})})]})})}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-dtools__panel",children:(0,_g.jsx)("div",{className:"sc-dtools__panel__content",children:(0,_g.jsx)(lS,{items:g,onClick:n})})})})]})})]})});h(7808);var gS=h(9160).t;const pS=({title:t,id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})=>(0,_g.jsx)(Ib,{title:t,type:e,children:(0,_g.jsx)(Fb,{id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})}),mS=Li(()=>{const{chartSetting:t}=sb(),{menuStore:r,countdown:i,historical:a,isHighestLowestMarkerEnabled:s,languages:n,language:o,setHistorical:l,setLanguage:c,setTheme:h,showCountdown:u,theme:d,toggleHighestLowestMarker:g}=t,p=r.dialogStore.open;return(0,_g.jsxs)(kb,{store:r,className:"sc-chart-setting",title:gS.translate("Platform settings"),enableTabular:!0,modalMode:!0,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(Vg,{className:e()("ic-icon-with-sub",{active:p}),"tooltip-title":gS.translate("Settings")})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)(wy,{className:"tabs--vertical",children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Zg,{}),gS.translate("Themes")]},"theme"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Xg,{}),gS.translate("Language")]},"language"),(0,_g.jsxs)(Iy,{children:[(0,_g.jsx)(Jg,{}),gS.translate("Charts")]},"platform")]}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-chart-setting__panel",children:(0,_g.jsxs)(Ib,{title:gS.translate("Select theme"),type:"theme",children:[(0,_g.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"dark"===d}),onClick:()=>h("dark"),children:[(0,_g.jsx)(yg,{}),(0,_g.jsx)("div",{className:"text",children:gS.translate("Dark")})]}),(0,_g.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"light"===d}),onClick:()=>h("light"),children:[(0,_g.jsx)(bg,{}),(0,_g.jsx)("div",{className:"text",children:gS.translate("Light")})]})]})})}),(0,_g.jsx)(By,{children:(0,_g.jsx)("div",{className:"sc-chart-setting__panel",children:(0,_g.jsx)(Ib,{title:gS.translate("Select language"),type:"language",children:n.map(t=>(0,_g.jsxs)("div",{onClick:()=>c(t.key),className:e()("form__group__item",{"form__group__item--active":o?.key===t.key}),children:[t.icon,(0,_g.jsx)("span",{className:"text",children:t.name})]},t.key))})})}),(0,_g.jsx)(By,{children:(0,_g.jsxs)("div",{className:"sc-chart-setting__panel",children:[(0,_g.jsx)(pS,{title:gS.translate("Interval duration"),id:"countdown",label:gS.translate("Display remaining time for each interval"),value:i,onChange:u,noramIcon:Wp[d].normal,activeIcon:Wp[d].active}),(0,_g.jsx)(pS,{title:gS.translate("Historical data mode"),id:"historical",label:gS.translate("Display data for a specific date and time"),value:a,onChange:l,noramIcon:Kp[d].normal,activeIcon:Kp[d].active}),(0,_g.jsx)(Ib,{title:gS.translate("Highest and lowest spot"),children:(0,_g.jsx)(Fb,{id:"highestlowest",label:gS.translate("Display the highest and lowest spot price"),value:s,onChange:g,noramIcon:Qp[d].normal,activeIcon:Qp[d].active})})]})})]})})]})});h(79);var fS=h(9160).t;const _S=Li(({portalNodeId:t})=>{const{share:r}=sb(),{menuStore:i,downloadCSV:a,downloadPNG:s,isLoadingPNG:n}=r,{open:o}=i.dialogStore;return(0,_g.jsxs)(kb,{store:i,className:"sc-download-menu",title:fS.translate("Download"),tooltip:fS.translate("Download"),modalMode:!0,isFullscreen:!0,portalNodeId:t,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)("div",{className:e()("sc-download__menu",{"sc-download__menu--active":o}),children:(0,_g.jsx)(zg,{})})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)("div",{className:"sc-download",children:[(0,_g.jsxs)(zb,{className:"sc-download__item",onClick:s,enabled:n,children:[(0,_g.jsx)(Lg,{}),(0,_g.jsxs)("span",{className:"sc-download__item__label",children:[" ",fS.translate("PNG")," "]})]}),(0,_g.jsxs)("div",{className:"sc-download__item",onClick:a,children:[(0,_g.jsx)(Mg,{}),(0,_g.jsxs)("span",{className:"sc-download__item__label",children:[" ",fS.translate("CSV")]})]})]})})]})});h(6853),h(7092),h(8272);var vS=h(9160).t;const bS=({x:t,bar:e})=>(0,_g.jsxs)("div",{className:`cq-bar ${e.cName}`,style:{height:5*e.height+"%",left:35*t},children:[(0,_g.jsx)("div",{className:`cq-bar-value ${e.height&&"show"}`,children:`${e.height.toFixed(1)}%`}),(0,_g.jsx)("span",{className:"cq-bar-title",children:t})]}),yS=Li(()=>{const{lastDigitStats:t}=sb(),{isVisible:r,bars:i,marketDisplayName:a,shouldMinimiseLastDigits:s}=t;return(0,_g.jsxs)("div",{className:e()("cq-last-digits",{show:r,minimised:s}),children:[(0,_g.jsx)("div",{className:"cq-bars",children:i.map((t,e)=>(0,_g.jsx)(bS,{x:e,bar:t},`bar-${e}`))}),(0,_g.jsx)("div",{className:"cq-bar-footer",children:vS.translate("Last digits stats for latest 1000 ticks on ")+a})]})}),SS=Li(({bottomWidgets:t})=>{const{state:e,lastDigitStats:r}=sb(),{showLastDigitStats:i}=e,{digits:a,lastTick:s}=r,n=!t&&i?yS:t;return n?(0,_g.jsx)(n,{digits:a,tick:or(s)}):null});h(8449);const xS=Li(({children:t})=>{const{bottomWidgetsContainer:e}=sb(),{bottom:r=0,isReadyToShow:i=!1}=e;if(!i)return null;const a={bottom:r};return(0,_g.jsx)("div",{className:"cq-bottom-ui-widgets",style:a,children:t})});h(1882);const wS=({isMobile:t})=>(0,_g.jsxs)(_g.Fragment,{children:[t?"":(0,_g.jsx)(rS,{}),(0,_g.jsx)(Ob,{}),(0,_g.jsx)(Kb,{}),(0,_g.jsx)(Ky,{}),(0,_g.jsx)(dS,{}),(0,_g.jsx)(_S,{}),t?"":(0,_g.jsx)(aS,{})]}),CS=Li(({widgets:t})=>{const{chart:r,chartType:i,studies:a,drawTools:s,view:n,share:o,chartSetting:l}=sb(),{context:c,isMobile:h}=r,u=i.menuStore.open||a.menuStore.open||s.menuStore.open||n.menuStore.open||o.menuStore.open||l.menuStore.open,d=t||wS;return(0,_g.jsx)("div",{className:e()("cq-chart-controls",{active:u}),children:c?(0,_g.jsx)(d,{isMobile:h}):null})});h(3955);var TS=h(9160).t;const kS=yi().memo(({networkStatus:t})=>(0,_g.jsx)(pb,{className:"sc-chart-footer__item sc-chart-footer__item--status",content:`${TS.translate("Network status")}: ${t?TS.translate(t.tooltip):""}`,enabled:!0,children:(0,_g.jsx)("div",{className:`sc-chart__status sc-chart__status--${t?t.class:"offline"}`})})),jS=Li(()=>{const{chart:t}=sb(),{context:e,serverTime:r,networkStatus:i,openFullscreen:a}=t;return e?(0,_g.jsxs)("div",{className:"sc-chart-footer",children:[(0,_g.jsx)(kS,{networkStatus:i}),(0,_g.jsx)("div",{className:"sc-chart-footer__item sc-chart-footer__item--time",children:(0,_g.jsx)("span",{children:r})}),(0,_g.jsx)("div",{className:"ciq-menu ciq-enabled",children:(0,_g.jsx)("a",{href:"https://deriv.com/help-centre/",target:"_blank",rel:"noopener noreferrer",children:(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(qg,{})})})}),(0,_g.jsx)(mS,{}),(0,_g.jsx)("div",{className:"ciq-menu ciq-enabled",onClick:()=>a(),children:(0,_g.jsx)("div",{className:"cq-menu-btn",children:(0,_g.jsx)(wg,{})})})]}):null});h(898),h(8798);var AS=h(9160).t;function OS(t){let e=0;if("categoryName"in t&&t.hasSubgroup)t.subgroups.forEach(t=>{for(const r of t.data)e+=r.data.length});else if("categoryName"in t&&t.hasSubcategory)for(const r of t.data)e+=r.data.length;else e+=t.data.length;return e}const ES=yi().memo(({category:t})=>(0,_g.jsx)("div",{className:"sc-mcd__category__content",children:(0,_g.jsx)("div",{className:"empty-category",children:AS.translate(t.emptyDescription)})})),NS=yi().memo(({isNestedList:t,category:r})=>{const i=Gp[r.categoryId];return(0,_g.jsxs)("span",{className:e()("category-title-left",{"category-title-left__subgroup":!i}),children:[t&&i?(0,_g.jsx)(i,{className:`ic-${r.categoryId}`}):(0,_g.jsx)("div",{className:"category-title-left__placeholder"}),AS.translate(r.categoryName)]})}),IS=({category:t,activeHeadKey:r,isNestedList:i,handleTitleClick:a})=>(0,_g.jsxs)("div",{className:e()("sc-mcd__category__head",{"has-subtitle":t.categorySubtitle,active:t.active}),onClick:()=>a(t.categoryId),children:[(0,_g.jsx)(NS,{isNestedList:i,category:t}),(t.categoryNamePostfixShowIfActive&&r===t.categoryId||!t.categoryNamePostfixShowIfActive)&&t.categoryNamePostfix&&(0,_g.jsx)("span",{className:"category-name-postfix",children:t.categoryNamePostfix}),t.categorySubtitle&&(0,_g.jsx)("div",{className:"category-subtitle",children:AS.translate(t.categorySubtitle)}),!t.hasSubgroup&&i?(0,_g.jsx)(Hg,{className:"arrow"}):""]}),PS=({category:t,categoryItemCount:r,ItemType:i,setCategoryElement:a,onSelectItem:s,activeHeadKey:n,disableAll:o,isNestedList:l,handleTitleClick:c,hasSubgroup:h,favoritesId:u})=>{const d=e=>{s?.(e,t.categoryId)};return(0,_g.jsxs)("div",{className:e()("sc-mcd__category",`sc-mcd__category--${t.categoryId}`,{"sc-mcd__category--has-subtitle":t.categorySubtitle,"sc-mcd__category--active":t.active}),ref:e=>a(e,t.categoryId),children:[(l||!t.hasSubcategory)&&(0,_g.jsx)(IS,{category:t,activeHeadKey:n,isNestedList:!!l,handleTitleClick:c,hasSubgroup:h}),!t.hasSubgroup&&t.hasSubcategory?t.data.filter(t=>OS(t)>0).map(t=>{return(0,_g.jsxs)("div",{className:e()("sc-mcd__category__content",`sc-mcd__category__content--${r=t.subcategoryName,r.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-")}`,"sc-mcd__category--has-subgroup","sc-mcd__category__content--has-subcategory"),children:[(0,_g.jsx)("div",{className:"subcategory",children:AS.translate(t.subcategoryName)}),t.data.map(t=>(0,_g.jsx)(i,{item:t,onSelectItem:d,disableAll:o,favoritesId:u},t.display))]},t.subcategoryName);var r}):!t.hasSubgroup&&t.data.length>0&&(0,_g.jsx)("div",{className:"sc-mcd__category__content",children:t.data.map(t=>(0,_g.jsx)(i,{item:t,onSelectItem:d,disableAll:o,favoritesId:u},t.itemId))}),0===r&&t.emptyDescription&&(0,_g.jsx)(ES,{category:t})]})},DS=({filteredItems:t,onSelectItem:e,ItemType:r,setCategoryElement:i,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l})=>(0,_g.jsx)(_g.Fragment,{children:t.map(t=>{const c=OS(t);return t.hasSubgroup?(c>0||t.emptyDescription)&&(0,_g.jsxs)(yi().Fragment,{children:[(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l},t.categoryId),t.subgroups?.map(t=>OS(t)>0?(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,hasSubgroup:!0,favoritesId:l},t.categoryId):null)]},t.categoryId):(c>0||t.emptyDescription)&&(0,_g.jsx)(PS,{ItemType:r,category:t,categoryItemCount:c,setCategoryElement:i,onSelectItem:e,activeHeadKey:a,disableAll:s,isNestedList:n,handleTitleClick:o,favoritesId:l},t.categoryId)})}),LS=({category:t,id:r})=>{const{chart:i,state:a}=sb(),[s]=yi().useState(Cv.getInstance()),[n,o]=yi().useState(!1),l=yi().useCallback(e=>{e.stopPropagation(),e.nativeEvent.isHandledByDialog=!0,s.toggleFavorite(t,r),a.stateChange("FAVORITE_MARKETS_TOGGLE",{is_favorite:s.isFavorite(t,r),symbol:i.symbolMap[r]?.symbol,symbol_category:zi(i.symbolMap[r])})},[i,a,s,t,r]),c=yi().useCallback(()=>{const e=s.isFavorite(t,r);e!==n&&(o(e),jm(Tm.CategoricalDisplay,km.Favorite,`${e?"Add ":"Remove "} ${r}`))},[s,t,r,n]);return yi().useEffect(()=>(s&&s.onFavoriteUpdate&&(s.onFavoriteUpdate(c),o(s.isFavorite(t,r))),()=>{s&&s.offFavoriteUpdate(c)}),[s,t,r,c]),t&&r?(0,_g.jsx)(Ug,{onClick:l,className:e()("ciq-favorite",{"ciq-active-favorite":n})}):null};var MS=h(9160).t;const BS=yi().memo(({id:t})=>{if(!t||!Zp[t])return null;const e=Zp[t];return(0,_g.jsx)(e,{className:`ic-${t}`})}),RS=yi().memo(({item:{itemId:t,display:e}})=>(0,_g.jsxs)("div",{className:"sc-mcd__item__name",children:[(0,_g.jsx)(BS,{id:t}),e]})),FS=yi().memo(({favoritesId:t,item:{dataObject:e,itemId:r}})=>(0,_g.jsxs)("div",{className:"sc-mcd__item__detail",children:[e&&(void 0===e.exchange_is_open||e.exchange_is_open)?"":(0,_g.jsx)("span",{className:"closed-market",children:MS.translate("CLOSED")}),(0,_g.jsx)(LS,{category:t,id:r})]})),VS=({onSelectItem:t,item:e,favoritesId:r})=>(0,_g.jsxs)("div",{className:`sc-mcd__item sc-mcd__item--${e.itemId} ${e.selected?"sc-mcd__item--selected ":""}`,onClick:()=>e.enabled&&t?.(e.dataObject),children:[(0,_g.jsx)(RS,{item:e}),(0,_g.jsx)(FS,{item:e,favoritesId:r})]}),HS=yi().memo(VS);var US=h(9160).t;const qS=yi().memo(({categoryId:t})=>{const e=Gp[t];return e&&(0,_g.jsx)(e,{className:`ic-${t}`})}),zS=yi().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const s=t&&t.length?t===i.categoryId:e===i.categoryId;return(0,_g.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>r(i.categoryId),children:[(0,_g.jsx)(qS,{categoryId:i.categoryId}),US.translate(i.categoryName)]})}),$S=yi().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const[s,n]=yi().useState(!1),[o,l]=yi().useState(!1);return(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>l(!o),children:[(0,_g.jsx)(qS,{categoryId:i.categoryId}),i.categoryName,(0,_g.jsx)(Hg,{className:`sc-mcd__filter__group-icon ${o&&"sc-mcd__filter__group-icon--open"}`})]}),(0,_g.jsx)("div",{className:`sc-mcd__filter__subgroups ${o&&"sc-mcd__filter__subgroups--open"}`,children:i.subgroups.map(o=>{const c=t&&t.length?t===o.categoryId:e===o.categoryId,h=i.subgroups.filter(r=>r.categoryId===t||!t&&r.categoryId===e).length>0;return c&&h&&!s?(n(!0),l(!0)):!h&&s&&n(!1),(0,_g.jsx)("div",{className:`sc-mcd__filter__subgroups-item ${s?"sc-mcd__filter__item--active":""} ${c&&!a?"sc-mcd__filter__item--selected":""}`,onClick:()=>r(o.categoryId),children:US.translate(o.categoryName)},o?.categoryId)})})]})}),GS=Li(({filteredItems:t,handleFilterClick:e,focusedCategoryKey:r,activeCategoryKey:i,isSearching:a})=>(0,_g.jsx)("div",{className:"sc-mcd__filter",children:t.map(t=>t.hasSubgroup?(0,_g.jsx)($S,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId):(0,_g.jsx)(zS,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId))}));var WS=h(9160).t;const KS=Li(({store:t,id:e,searchInputClassName:r,disableAll:i,isNestedList:a,onSelectItem:s})=>{const{updateScrollSpy:n,setScrollPanel:o,setFilterText:l,searchInput:c,height:h,filterText:u,placeholderText:d,handleTitleClick:g,filteredItems:p,setCategoryElement:m,activeHeadKey:f,favoritesId:_,handleFilterClick:v,focusedCategoryKey:b,activeCategoryKey:y}=t,S=s||t.onSelectItem,{isMobile:x}=t.chart,w=(0,_g.jsx)(DS,{onSelectItem:(t,e)=>{S?.(t,e),l("")},disableAll:i,isNestedList:a,handleTitleClick:g,filteredItems:p,setCategoryElement:m,activeHeadKey:f,ItemType:HS,favoritesId:_});return(0,_g.jsxs)("div",{className:"sc-mcd "+(a?"sc-mcd--nested":""),style:{height:h},id:e,children:[!x&&(0,_g.jsxs)("div",{className:"sc-mcd__tabs",children:[(0,_g.jsx)("div",{className:"sc-mcd__tabs__head",children:WS.translate("Markets")}),(0,_g.jsx)("div",{className:"sc-mcd__tabs__body",children:!a&&(0,_g.jsx)(GS,{filteredItems:p,handleFilterClick:v,activeCategoryKey:y,focusedCategoryKey:b,isSearching:""!==u})})]}),(0,_g.jsxs)("div",{className:"sc-mcd__content",children:[(0,_g.jsx)("div",{className:"sc-mcd__content__head",children:(0,_g.jsx)(Fy,{placeholder:d,searchInputClassName:r,value:u,onChange:l,searchInput:c})}),(0,_g.jsx)("div",{className:"sc-mcd__content__body",children:x?(0,_g.jsx)("div",{className:"sc-mcd__content__body__scroll",onScroll:n,ref:o,children:w}):(0,_g.jsx)(_b,{autoHide:!0,onScroll:n,setPanel:o,children:w})})]})]})}),QS=({symbolOpenTime:t})=>{const[e,r]=yi().useState(0),i=yi().useMemo(()=>{let r=null;const{openTime:i}=t||{};return i&&(r=Xi(i.getTime()-e)),r},[t,e]);return yi().useEffect(()=>{const t=Pm.getInstance(),e=setInterval(()=>r(t.getLocalDate().getTime()),1e3);return()=>clearInterval(e)},[]),(0,_g.jsx)("span",{children:i})},YS=({isIncrease:t,price:r,className:i,decimalPlaces:a})=>(0,_g.jsxs)(_g.Fragment,{children:[!r&&(0,_g.jsx)("span",{className:"cq-comparison-loader stx-show"}),(0,_g.jsx)("div",{className:e()("cq-animated-price",i,{"cq-up":t,"cq-down":!t}),children:r.toFixed(a)})]});var XS=h(9160).t;const ZS=Li(()=>{const{chartTitle:t}=sb(),{isShowChartPrice:r,isVisible:i,todayChange:a,todayChangePercent:s,animatedPrice:n,currentSymbol:o,isSymbolOpen:l,symbolOpenTime:c}=t,{status:h}=n;if(!o)return null;const u=Zp[o.symbol]||$p,d=!l&&c.openTime,g=!l&&!c.openTime;return(0,_g.jsxs)(_g.Fragment,{children:[u&&(0,_g.jsx)(u,{className:`ic-${o.symbol}`}),(0,_g.jsxs)("div",{className:"cq-symbol-info",children:[(0,_g.jsx)("div",{className:e()("cq-symbol",{"closed-no-opentime":g}),children:o.name}),l&&(0,_g.jsx)(tx,{status:h,isVisible:i&&r,todayChange:a,todayChangePercent:s}),d&&(0,_g.jsx)(ex,{symbolOpenTime:c})]})]})}),JS=Li(()=>{const{chartTitle:t}=sb(),{isSymbolOpen:e}=t;return(0,_g.jsxs)("div",{className:"cq-symbol-select-btn",children:[(0,_g.jsxs)("div",{className:"cq-symbol-select-btn__container",children:[(0,_g.jsx)(ZS,{}),!e&&(0,_g.jsx)("div",{className:"cq-symbol-closed-text",children:XS.translate("CLOSED")})]}),(0,_g.jsx)(Hg,{className:"cq-symbol-dropdown"})]})}),tx=Li(({isVisible:t,status:r,todayChange:i,todayChangePercent:a})=>{const{chartTitle:s}=sb(),{animatedPrice:n,decimalPlaces:o}=s,{price:l,isIncrease:c}=n;return t?(0,_g.jsxs)("div",{className:"cq-chart-price",children:[(0,_g.jsx)(YS,{className:"cq-current-price",price:l,isIncrease:c,status:n.status,decimalPlaces:o}),(0,_g.jsx)("div",{className:"divider",children:"-"}),(0,_g.jsxs)("div",{className:e()("cq-change",r),children:[(0,_g.jsx)("span",{className:"cq-todays-change",children:i||0}),(0,_g.jsxs)("span",{className:"cq-todays-change-percent",children:["(",a,"%)"]})," "]})]}):null}),ex=({symbolOpenTime:t})=>(0,_g.jsxs)("div",{className:"cq-chart-closed",children:[(0,_g.jsx)(Rg,{className:"cq-closed-icon"}),(0,_g.jsxs)("div",{className:"cq-closed-opening",children:[XS.translate("Opens in:")," ",(0,_g.jsx)("span",{className:"cq-closed-opening-time",children:(0,_g.jsx)(QS,{symbolOpenTime:t})})]})]});var rx=h(9160).t;const ix=Li(t=>{const{chartTitle:e,chart:r,chartSetting:i,state:a}=sb(),{isMobile:s}=r,{theme:n}=i,{menuStore:o,currentSymbol:l,categoricalDisplay:c,setSymbol:h,onMouseEnter:u,onMouseLeave:d,updateProps:g}=e,p=t.onChange||h,m=o.setOpen,{containerId:f,enabled:_,portalNodeId:v,searchInputClassName:b,open:y,open_market:S,isNestedList:x}=t;if(yi().useEffect(()=>{const{...e}=t;g(e)},[y,S]),!l)return null;const w=(0,_g.jsxs)(kb,{store:o,enabled:_,className:"cq-chart-title stx-show cq-symbols-display",isFullscreen:!0,portalNodeId:v,title:s?rx.translate("Markets"):"",onMouseEnter:u,onMouseLeave:d,children:[(0,_g.jsx)(kb.Title,{children:(0,_g.jsx)(JS,{})}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)(KS,{store:c,isNestedList:x,searchInputClassName:b,onSelectItem:(t,e)=>{t.symbol!==l.symbol&&(p(t.symbol),a.stateChange("SYMBOL_CHANGE",{symbol:t.symbol,symbol_category:"favorite"===e?"favorites":zi(t)})),m(!1)}})})]});return f?xi().createPortal((0,_g.jsx)("div",{className:`smartcharts-${n}`,children:w}),document.getElementById(f)):w});var ax=h(9160).t;const sx=Li(({className:t})=>{const{drawTools:r}=sb(),i=(0,bi.useRef)(null),{showConfirmationToast:a,confirmationMessage:s,cancelAddingNewTool:n,hideDrawingConfirmation:o,addingStateInfo:l,selectedToolId:c}=r,h=(0,bi.useCallback)(()=>{return"horizontal"===(t=c)||"vertical"===t?ax.translate("Click on the chart to place the line."):0===l.currentStep&&l.totalSteps>1?ax.translate("Click on the chart to confirm the start point."):1===l.currentStep&&l.totalSteps>1?ax.translate("Click on the chart to confirm the end point."):l.currentStep>1&&!l.isFinished?ax.translate("Click on the chart to confirm point {{step}}.",{step:(l.currentStep+1).toString()}):s;var t},[c,l,s]),u=(0,bi.useCallback)(t=>{i.current&&!i.current.contains(t.target)&&o?.()},[o]),d=(0,bi.useCallback)(t=>{"Escape"===t.key&&o?.()},[o]);return(0,bi.useEffect)(()=>{if(a)return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[a,u,d]),!a||r.addingStateInfo.isFinished?null:(0,_g.jsx)("div",{ref:i,className:e()("sc-drawing-toast",t),role:"alert","aria-live":"polite",children:(0,_g.jsxs)("div",{className:"sc-drawing-toast__content",children:[(0,_g.jsx)("span",{className:"sc-drawing-toast__message",children:h()}),(0,_g.jsx)("button",{className:"sc-drawing-toast__cancel",onClick:n,"aria-label":ax.translate("Cancel"),type:"button",children:ax.translate("Cancel")})]})})});var nx=h(9160).t;const ox=Li(({className:t})=>{const{drawTools:r}=sb(),i=(0,bi.useRef)(null),a=(0,bi.useRef)(null),{showDeletionSnackbar:s,deletedToolName:n,hideDeletionSnackbar:o}=r,l=(0,bi.useCallback)(()=>{if(!n)return;const t=am(),e=Object.values(t).find(t=>t.id===n.replace("dt_",""));return e?`${e.text.replace(" [num]","")} ${nx.translate("removed")}`:void 0},[n]);(0,bi.useEffect)(()=>{if(s)return a.current=setTimeout(()=>{o?.()},4e3),()=>{a.current&&(clearTimeout(a.current),a.current=null)}},[s,o]);const c=(0,bi.useCallback)(t=>{"Escape"===t.key&&o?.()},[o]);return(0,bi.useEffect)(()=>{if(s)return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[s,c]),(0,bi.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),s?(0,_g.jsx)("div",{ref:i,className:e()("sc-deletion-snackbar",t),role:"alert","aria-live":"polite",children:(0,_g.jsxs)("div",{className:"sc-deletion-snackbar__content",children:[(0,_g.jsx)("span",{className:"sc-deletion-snackbar__message",children:l()}),(0,_g.jsx)("button",{className:"sc-deletion-snackbar__close",onClick:o,"aria-label":nx.translate("Close"),type:"button",children:(0,_g.jsx)(kg,{})})]})}):null}),lx=ox,cx=Li(t=>{const{chart:e,chartAdapter:r}=sb(),i=yi().useRef(null),a=yi().useRef(null),s=yi().useRef(null),n=yi().useRef(null),o=yi().useRef(t);o.current=t,yi().useEffect(()=>(r.painter.registerCallback(c),()=>{r.painter.unregisterCallback(c)}),[]),yi().useEffect(()=>{c()},[r.epochBounds,r.quoteBounds,r.isFeedLoaded,r.isChartLoaded,e.lastQuote]),yi().useEffect(()=>{const t=n.current?.querySelector(".chart-spot-label-profit");return t&&r.updateRightPadding(110),()=>{t&&r.updateRightPadding(0)}},[r]);const l=({epoch:t,price:e})=>{i.current=Number(e)||null,a.current=Om(Yi(t)),s.current=t?1e3*t:null,c()},c=()=>{if(!r.isFeedLoaded||!r.isChartLoaded)return;if(!n.current)return;if(!a.current)return void(n.current.style.visibility="hidden");const t=o.current.offsetTop||0,e=o.current.offsetLeft||0,l=n.current;let c=0,h=0,u=!0;if(s.current){const t=r.getXFromEpoch(s.current),e=i.current?r.getYFromQuote(i.current):0;t>0&&(null==i.current||e>0)?(c=+e,h=+t):u=!1}l.style.transform=`translate(${h+e}px, ${c+t}px)`,l.style.visibility=u?"visible":"hidden"},{children:h,className:u}=t;if(!r.isChartLoaded)return null;const{chartNode:d,yAxisWidth:g}=e,{overlap_y_axis:p=!0}=t,m=d&&!p?d.offsetWidth-g-50:"calc(100% - 50px)";return(0,_g.jsx)("div",{className:"fast-marker",style:{maxWidth:m},children:(0,_g.jsx)("div",{className:u,ref:t=>{n.current=t;const{markerRef:e}=o.current;e&&e(t?{div:t,setPosition:l}:null),null!==t&&c()},style:{position:"absolute"},children:h})})});h(6271);var hx=h(9160).t;const ux=Li(()=>{const{highestLowest:t}=sb(),{setHighestRef:e,setLowestRef:r}=t;return(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsxs)(cx,{markerRef:e,className:"sc-highlow sc-highlow--highest",offsetTop:-80,offsetLeft:-80,children:[(0,_g.jsx)("span",{className:"spot__shape-circule spot__fill-blue"}),(0,_g.jsxs)("span",{className:"spot__label","data-label-pos":"top",children:[(0,_g.jsx)("span",{children:`${hx.translate("H")}: `}),(0,_g.jsx)("span",{className:"spot__value"})]})]}),(0,_g.jsxs)(cx,{markerRef:r,className:"sc-highlow sc-highlow--lowest",offsetTop:-80,offsetLeft:-80,children:[(0,_g.jsx)("span",{className:"spot__shape-circule spot__fill-red"}),(0,_g.jsxs)("span",{className:"spot__label","data-label-pos":"bottom",children:[(0,_g.jsx)("span",{children:`${hx.translate("L")} : `}),(0,_g.jsx)("span",{className:"spot__value"})]})]})]})});h(1061);var dx=h(9160).t;const gx=Li(()=>{const{timeperiod:t}=sb(),{menuStore:e,dialogPortalNodeId:r,handleCancel:i,handleContinue:a}=t.predictionIndicator;return(0,_g.jsxs)(kb,{store:e,className:"cq-dialog--indicator-prediction",modalMode:!0,emptyMenu:!0,portalNodeId:r,handleOverlayClick:i,children:[(0,_g.jsx)(kb.Title,{}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsxs)("div",{className:"cq-indicator-prediction",children:[(0,_g.jsx)("strong",{children:dx.translate("Are you sure?")}),(0,_g.jsx)("p",{children:dx.translate("Some of your active indicators don’t support 1-tick intervals. If you change to a 1-tick interval, these indicators will be removed from your chart.")}),(0,_g.jsxs)("div",{className:"cq-indicator-prediction__footer",children:[(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:i,children:dx.translate("Cancel")}),(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:a,children:dx.translate("Continue")})]})]})})]})});h(1104);const px=Li(()=>{const{chart:t,chartSize:r,navigationWidget:i,chartSetting:a,chartAdapter:s}=sb(),{context:n,startWithDataFitMode:o}=t,{zoomIn:l,zoomOut:c}=r,{historical:h}=a,{onMouseEnter:u,onMouseLeave:d}=i,{isDataFitModeEnabled:g,toggleDataFitMode:p}=s;return n?(0,_g.jsxs)("div",{className:e()("sc-navigation-widget",{"sc-navigation-widget__item--indent":h}),onMouseEnter:u,onMouseLeave:d,children:[(0,_g.jsx)("div",{className:e()("sc-navigation-widget__item","sc-navigation-widget__item--scale",{"sc-navigation-widget__item--hidden":!o,"sc-navigation-widget__item--disabled":g}),onClick:p,children:(0,_g.jsx)(Kg,{})}),(0,_g.jsxs)("div",{className:"sc-navigation-widget__item sc-navigation-widget__item--zoom",children:[(0,_g.jsx)(Qg,{onClick:l}),(0,_g.jsx)(rS,{}),(0,_g.jsx)(Yg,{onClick:c})]})]}):null});h(273);const mx=Li(()=>{const{paginationLoader:t}=sb(),{isOnPagination:e,setRef:r}=t;return e?(0,_g.jsx)(cx,{markerRef:r,className:"pagination",children:(0,_g.jsx)("div",{className:"pagination__loader",children:(0,_g.jsx)("div",{className:"pagination__loader-background"})})}):(0,_g.jsx)(_g.Fragment,{})}),fx=Li(({at:t="holder",children:e})=>{const{chart:r,state:i}=sb(),{contextPromise:a}=r,{isChartReady:s}=i,[n,o]=yi().useState();return yi().useEffect(()=>{a?.then(e=>{const r=`cq-inchart-${t}`;let i=e.topNode?.querySelector(`.${r}`);i||(i=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstChild}(`<div class="${r}"></div>`)),o(i)})},[t,a]),s&&n?xi().createPortal(e,n):null});h(2445);var _x=h(9160).t;const vx=({group:t,title:e,type:r,Field:i})=>(0,_g.jsx)(Ib,{title:"select"===r||"pattern"===r||"colorpicker"===r||"numbercolorpicker"===r||"OverBought"===t||"OverSold"===t?null:e,type:r,children:i}),bx=({title:t,items:e,theme:r,onItemChange:i})=>{const a={switch:t=>{const e=t;return(0,_g.jsx)(Rb,{value:e.value,onChange:t=>i(e,t)})},colorpicker:t=>(0,_g.jsx)(Bb,{theme:r,color:t.value,subtitle:t.subtitle||t.title,setColor:e=>i(t,e)}),pattern:t=>(0,_g.jsx)(Mb,{pattern:t.value,lineWidth:"1",subtitle:t.title,onChange:e=>{i(t,e)}}),select:t=>{const e=t;return(0,_g.jsx)(Lb,{rows:Object.values(e.options||{}),value:e.options[e.value],subtitle:e.subtitle||e.title,onRowClick:t=>{const[r]=Object.entries(e.options).find(([e,r])=>r===t);i(e,r)},children:t=>(0,_g.jsx)("span",{children:t})})},number:t=>{const e=t;return(0,_g.jsx)(Db,{min:e.min??1,step:e.step??1,max:e.max??100,value:e.value,onChange:t=>i(e,t)})},numericinput:t=>{const e=t;return(0,_g.jsx)("span",{className:"ciq-num-input",children:(0,_g.jsx)(Vb,{value:e.value,onChange:t=>i(e,t),min:e.min,step:e.step,max:e.max})})},numbercolorpicker:t=>{const e=t;return(0,_g.jsx)(Hb,{props:e.value,theme:r,onChange:t=>i(e,t)})},font:t=>{const e=t;return(0,_g.jsx)(qb,{value:e.value,onChange:t=>i(e,t)})}},s=`form__input-group--${(t||"").toLowerCase().replace(" ","-")}`;return(0,_g.jsxs)("div",{className:`form__input-group ${s}`,children:["Show Zones"===t?"":(0,_g.jsx)("h4",{children:t}),e.map(e=>a[e.type]&&(0,_g.jsx)(vx,{type:e.type,title:"Show Zones"===t?e.title:e.title.replace(t,""),Field:a[e.type](e)},e.title)),(0,_g.jsx)(Ib,{type:"end"})]})},yx=({onDelete:t,onReset:e,onDone:r})=>(0,_g.jsxs)("div",{className:"buttons",children:[t&&(0,_g.jsx)(Ig,{className:"sc-btn--delete",onClick:t}),(0,_g.jsxs)("div",{children:[(0,_g.jsx)(xx,{onClick:e}),(0,_g.jsx)(wx,{onClick:r})]})]}),Sx=({itemGroups:t,theme:e,onItemChange:r,setScrollPanel:i,freezeScroll:a,formClassname:s})=>(0,_g.jsx)("div",{className:`form form--indicator-setting ${s}`,children:(0,_g.jsx)(_b,{setPanel:i,freeze:a,autoHide:!0,height:"282px",children:t.map(t=>t.fields.length>0&&(0,_g.jsx)(bx,{title:t.title,items:t.fields,theme:e,onItemChange:r},t.key))})}),xx=({onClick:t})=>(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary sc-btn--reset",onClick:t,children:_x.translate("Reset")}),wx=({onClick:t})=>(0,_g.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--save",onClick:t,children:_x.translate("Done")}),Cx=Li(({store:t})=>{const{itemGroups:e,title:r,formClassname:i,description:a,showTabs:s,onResetClick:n,onItemChange:o,onItemDelete:l,menuStore:c,theme:h,setScrollPanel:u,dialogPortalNodeId:d,freezeScroll:g}=t,p=c.handleCloseDialog;return(0,_g.jsxs)(kb,{store:c,className:"cq-modal--settings",title:r,modalMode:!0,enableTabular:s,emptyMenu:!0,portalNodeId:d,children:[(0,_g.jsx)(kb.Title,{}),(0,_g.jsx)(kb.Body,{children:(0,_g.jsx)("div",{className:"cq-chart-settings",children:s?(0,_g.jsxs)(wy,{className:"tabs--vertical",children:[(0,_g.jsxs)(jy,{children:[(0,_g.jsx)(Iy,{children:"Settings"}),(0,_g.jsx)(Iy,{children:"Description"})]}),(0,_g.jsxs)(By,{children:[(0,_g.jsx)(Sx,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g}),(0,_g.jsx)(yx,{onReset:n,onDone:p})]}),(0,_g.jsx)(By,{children:a})]}):(0,_g.jsxs)(_g.Fragment,{children:[(0,_g.jsx)(Sx,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g,formClassname:i}),(0,_g.jsx)(yx,{onDelete:l,onReset:n,onDone:p})]})})})]})}),Tx=Li(()=>{const{chart:t,chartAdapter:e}=sb(),{epochBounds:r,isFeedLoaded:i}=e,{feed:a}=t,s=a?.quotes;if(void 0===s||!1===i||0===s.length)return null;const n=s[s.length-1].DT?.getTime();return n?r.rightEpoch>n?null:(0,_g.jsx)("div",{className:"scroll_to_recent",onClick:()=>{e.flutterChart?.app.scrollToLastTick()},children:(0,_g.jsx)(Wg,{})}):null});var kx=h(9160).t;const jx=yi().forwardRef((t,r)=>{const{chart:i,drawTools:a,studies:s,chartSetting:n,chartType:o,state:l,loader:c,chartAdapter:h,timeperiod:u,crosshair:d}=sb(),{chartId:g,init:p,destroy:m,isChartAvailable:f,chartContainerHeight:_,containerWidth:v}=i,{settingsDialog:b,restoreStudies:y,activeItems:S}=s,{settingsDialog:x}=a,{settingsDialog:w,isCandle:C,isSpline:T}=o,{updateProps:k,isChartClosed:j}=l,{theme:A,position:O,isHighestLowestMarkerEnabled:E}=n,{isActive:N,show:I}=c,P=yi().useRef(null),D=yi().useRef(null);(0,bi.useImperativeHandle)(r,()=>({hasPredictionIndicators:()=>null!==localStorage.getItem("predictionIndicators"),triggerPopup(t){u.predictionIndicator.dialogPortalNodeId="modal_root",u.predictionIndicator.setOpen(!0),u.predictionIndicator.setCancel(()=>{localStorage.getItem("predictionIndicators")&&(t(),y([...S,...Hi(localStorage.getItem("predictionIndicators")||"")]))})}})),yi().useEffect(()=>(window.isProductionWebsite&&(function(t,e,r,i,a,s,n){t.GoogleAnalyticsObject=a,t[a]=t[a]||function(){(t[a].q=t[a].q||[]).push(arguments)},t[a].l=1*new Date,s=e.createElement(r),n=e.getElementsByTagName(r)[0],s.async=1,s.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(s,n)}(window,document,"script",0,"ga"),ga("create","UA-40877026-15","auto")),window.isProductionWebsite&&window.ga&&ga("send","pageview",window.location.pathname),void 0!==t.crosshairEnabled&&d.setInitialEnabledState(t.crosshairEnabled),k(t),p(P.current,t),()=>{m()}),[]),yi().useEffect(()=>{k(t)});const L=(t=>{const e=yi().useRef();return yi().useEffect(()=>{e.current=t},[t]),e.current})(kx.lang);yi().useEffect(()=>{L&&L!==kx.lang&&!N&&I?.()},[kx.lang]);const{id:M,isMobile:B=!1,barriers:R=[],children:F,chartControlsWidgets:V,topWidgets:H,bottomWidgets:U,enabledChartFooter:q=!0,enabledNavigationWidget:z=!0,toolbarWidget:$=()=>null,historical:G,contracts_array:W=[]}=t,K=V&&O&&!B,Q=H||(()=>(0,_g.jsx)(ix,{})),Y=yi().useCallback($,[kx.lang]);return yi().useEffect(()=>(h.onMount(D.current),()=>{h.onUnmount()}),[]),yi().useEffect(()=>{h.updateContracts(W)},[W]),(0,_g.jsx)("div",{id:M||g,className:e()("smartcharts",`smartcharts-${A}`,{"smartcharts--navigation-widget":z,"smartcharts--loading":N,"smartcharts--has-markers":F&&yi().Children.count(F)>0,[`smartcharts-${v}`]:!B}),children:(0,_g.jsxs)("div",{className:e()({"smartcharts-mobile":B,"smartcharts-desktop":!B}),children:[(0,_g.jsx)("div",{className:"cq-context",ref:P,children:(0,_g.jsx)("div",{className:e()({[`cq-chart-control-${O}`]:K,"cq-chart-control-bottom":!K}),children:(0,_g.jsxs)("div",{className:"ciq-chart-area",children:[(0,_g.jsxs)("div",{className:e()("ciq-chart",{"closed-chart":j}),children:[(0,_g.jsx)(fx,{at:"subholder",children:R.map(({key:t,...e},r)=>(0,_g.jsx)(gb,{...e},`barrier-${r}`))}),(0,_g.jsx)(fx,{at:"subholder",children:!C&&!T&&E&&(0,_g.jsx)(ux,{})}),(0,_g.jsx)(fx,{at:"subholder",children:F}),(0,_g.jsx)(fx,{at:"subholder",children:(0,_g.jsx)(mx,{})}),!c.isActive&&(0,_g.jsx)("div",{className:"cq-top-ui-widgets",children:(0,_g.jsx)(Q,{})}),(0,_g.jsx)("div",{className:"chartContainer",ref:D,style:{height:G&&_&&B?_-30:_}}),z&&(0,_g.jsx)(px,{}),Y&&(0,_g.jsx)(Y,{}),!f&&(0,_g.jsx)("div",{className:"cq-chart-unavailable",children:kx.translate("Chart data is not available for this symbol.")}),(0,_g.jsx)("div",{className:"cq-inchart-subholder"}),(0,_g.jsx)(xS,{children:(0,_g.jsx)(SS,{bottomWidgets:U})})]}),null!==V&&!q&&(0,_g.jsx)(CS,{widgets:V}),(0,_g.jsx)(Tx,{}),q&&(0,_g.jsx)(jS,{}),(0,_g.jsx)($b,{})]})})}),(0,_g.jsx)(Cx,{store:x}),(0,_g.jsx)(Cx,{store:w}),(0,_g.jsx)(Cx,{store:b}),(0,_g.jsx)(gx,{}),(0,_g.jsx)(sx,{}),(0,_g.jsx)(lx,{}),(0,_g.jsx)("div",{id:"smartcharts_modal",className:"ciq-modal"})]})})}),Ax=Li(jx),Ox=yi().forwardRef(({children:t,...e},r)=>{const i=yi().useRef(!1);i.current||((()=>{const t=new ib;ab=yi().createContext(t)})(),i.current=!0);const a=sb(),s=ab.Provider;return(0,_g.jsx)(s,{value:a,children:(0,_g.jsx)(Ax,{...e,ref:r,children:t})})});h(2313);const Ex=Li(({position:t="top",children:r})=>{const{chart:i,toolbarWidget:a}=sb(),{context:s}=i,{onMouseEnter:n,onMouseLeave:o}=a;return s?(0,_g.jsx)("div",{className:e()("sc-toolbar-widget",{[`sc-toolbar-widget--${t}`]:!!t}),onMouseEnter:n,onMouseLeave:o,children:r}):null});h(9758);const Nx={Barrier:gb,ChartSetting:mS,ChartSize:aS,ChartTitle:ix,ChartTypes:Ob,ChartMode:Jb,createObjectFromLocalStorage:Vi,CrosshairToggle:rS,DrawTools:dS,FastMarker:cx,Marker:cx,PendingPromise:Bi,setSmartChartsPublicPath:function(t){h.p=t},Share:_S,SmartChart:Ox,StudyLegend:Ky,Timeperiod:Kb,Views:tS,ToolbarWidget:Ex,logEvent:jm,LogCategories:Tm,LogActions:km}})(),u.default})());
|
|
3
3
|
//# sourceMappingURL=smartcharts.js.map
|