(window.webpackJsonp = window.webpackJsonp || []).push([ ['chart-bottom-toolbar'], { '+GaQ': function (e, t, n) { 'use strict'; n.d(t, 'a', function () { return i; }); var a = n('q1tI'); function i(e) { return e.map ? a.Children.toArray(e.children).map(e.map) : e.children; } }, '02pg': function (e, t, n) { 'use strict'; n.d(t, 'a', function () { return r; }); var a = n('q1tI'), i = n('TSYQ'), o = n('XiJV'); function r(e) { return a.createElement('div', { className: i(o.separator, e.className), }); } }, '20PO': function (e, t) { e.exports = ''; }, '2mG+': function (e, t, n) { e.exports = { button: 'button-37qwTsBL' }; }, '5o6O': function (e, t, n) { e.exports = { tabs: 'tabs-1LGqoVz6', tab: 'tab-1Yr0rq0J', noBorder: 'noBorder-oc3HwerO', disabled: 'disabled-s8cEYElA', active: 'active-37sipdzm', defaultCursor: 'defaultCursor-Np9BHjTg', slider: 'slider-1-X4lOmE', content: 'content-2asssfGq', }; }, '9VJd': function (e, t) { e.exports = ''; }, ApAi: function (e, t) { e.exports = ''; }, J3OW: function (e, t, n) { e.exports = { button: 'button-1VVj8kLG', separator: 'separator-2I6DZkMH', }; }, K3s3: function (e, t, n) { 'use strict'; n.d(t, 'a', function () { return c; }), n.d(t, 'b', function () { return l; }), n.d(t, 'c', function () { return u; }); var a = n('mrSG'), i = n('q1tI'), o = n('TSYQ'), r = n('Eyy1'), s = n('5o6O'), c = s; function l(e) { var t, n = o( e.className, s.tab, (((t = {})[s.active] = e.isActive), (t[s.disabled] = e.isDisabled), (t[s.defaultCursor] = !!e.shouldUseDefaultCursor), (t[s.noBorder] = !!e.noBorder), t), ); return i.createElement( 'div', { className: n, onClick: e.onClick, ref: e.reference }, e.children, ); } function u(e) { return (function (t) { function n() { var e = (null !== t && t.apply(this, arguments)) || this; return (e.activeTab = { current: null }), e; } return ( Object(a.__extends)(n, t), (n.prototype.componentDidUpdate = function () { (Object(r.ensureNotNull)(this._slider).style.transition = 'transform 350ms'), this._componentDidUpdate(); }), (n.prototype.componentDidMount = function () { this._componentDidUpdate(); }), (n.prototype.render = function () { var t = this, n = this.props.className, a = this._generateTabs(); return i.createElement( 'div', { className: o(n, s.tabs), 'data-name': this.props['data-name'], }, a, i.createElement(e, { reference: function (e) { t._slider = e; }, }), ); }), (n.prototype._generateTabs = function () { var e = this; return ( (this.activeTab.current = null), i.Children.map(this.props.children, function (t) { var n = t, a = Boolean(n.props.isActive), o = { reference: function (t) { a && (e.activeTab.current = t), n.props.reference && n.props.reference(t); }, }; return i.cloneElement(n, o); }) ); }), (n.prototype._componentDidUpdate = function () { var e = Object(r.ensureNotNull)(this._slider).style; if (this.activeTab.current) { var t = this.activeTab.current.offsetWidth, n = this.activeTab.current.offsetLeft; (e.transform = 'translateX(' + n + 'px)'), (e.width = t + 'px'), (e.opacity = '1'); } else e.opacity = '0'; }), n ); })(i.PureComponent); } u(function (e) { return i.createElement('div', { className: s.slider, ref: e.reference, }); }); }, MfqI: function (e, t, n) { 'use strict'; n.r(t); var a = n('q1tI'), i = n('i8i4'), o = n('mrSG'), r = n('YFKU'), s = n('17x9'), c = n('TSYQ'), l = n('XmVn'), u = n('Kxc7'), d = n('82wv'), h = n('Iksw'), p = n('tWVy'), m = n('l4ku'), g = n('02pg'), b = n('/KDZ'), v = n('N5tr'), f = n('KKsp'), _ = n('dfhE'), C = n('Eyy1'), y = n('aIyQ'), S = n.n(y), E = n('PC8g'), x = n('1TxM'), w = Object(x.b)(); function R(e) { var t; return ( ((t = (function (t) { function n(e, n) { var a = t.call(this, e, n) || this; (a._handleUpdate = function (e) { a.setState(e); }), (a._handleSelectRange = function (e) { Object(E.trackEvent)( 'GUI', 'Chart Bottom Toolbar', 'range ' + e.value, ), a._binding.selectRange(e); }), Object(x.c)(n, { availableTimeFrames: s.any.isRequired, chartWidgetCollection: s.any.isRequired, chartWidget: s.any.isRequired, }), N.has(n.chartWidget) || N.set(n.chartWidget, new k(n)); var i = (a._binding = Object(C.ensureDefined)( N.get(n.chartWidget), )); return (a.state = i.state()), a; } return ( Object(o.__extends)(n, t), (n.prototype.componentDidMount = function () { this._binding.onChange().subscribe(this, this._handleUpdate); }), (n.prototype.componentWillUnmount = function () { this._binding.onChange().unsubscribe(this, this._handleUpdate); }), (n.prototype.render = function () { return a.createElement(e, { goToDateButton: this.props.goToDateButton, className: this.props.className, ranges: this.state.ranges, activeRange: this.state.activeRange, onSelectRange: this._handleSelectRange, }); }), n ); })(a.PureComponent)).contextType = w), t ); } var N = new WeakMap(), k = (function () { function e(e) { var t = this; (this._state = { ranges: [] }), (this._change = new S.a()); var n = (this._context = e).chartWidget; n.withModel(null, function () { var e = n.model(), a = e.mainSeries(); a.onStatusChanged().subscribe(t, t._updateAvailableRanges), u.enabled('update_timeframes_set_on_symbol_resolve') && a .dataEvents() .symbolResolved() .subscribe(t, t._updateAvailableRanges), a .priceScale() .properties() .childs() .lockScale.subscribe(t, t._updateAvailableRanges), a.onIntervalChanged().subscribe(t, t._onRangeChanged), e.model().onResetScales().subscribe(t, t._resetActiveInterval), a .dataEvents() .symbolResolved() .subscribe(t, t._resetActiveInterval), a .properties() .extendedHours.subscribe(t, t._resetActiveInterval), t._updateAvailableRanges(); }), n.onScroll().subscribe(this, this._resetActiveInterval); } return ( (e.prototype.state = function () { return this._state; }), (e.prototype.onChange = function () { return this._change; }), (e.prototype.selectRange = function (e) { this._setState({ activeRange: e.value }); var t = this._context.chartWidgetCollection, n = { val: e.value, res: e.targetResolution }; t.setTimeFrame(n); }), (e.prototype.destroy = function () { var e = this, t = this._context.chartWidget; t.withModel(null, function () { var n = t.model(), a = n.mainSeries(); a.onStatusChanged().unsubscribe(e, e._updateAvailableRanges), u.enabled('update_timeframes_set_on_symbol_resolve') && a .dataEvents() .symbolResolved() .unsubscribe(e, e._updateAvailableRanges), a .priceScale() .properties() .childs() .lockScale.unsubscribe(e, e._updateAvailableRanges), a.onIntervalChanged().unsubscribe(e, e._onRangeChanged), n .model() .onResetScales() .unsubscribe(e, e._resetActiveInterval), a .dataEvents() .symbolResolved() .unsubscribe(e, e._resetActiveInterval), a .properties() .extendedHours.unsubscribe(e, e._resetActiveInterval); }), t.onScroll().unsubscribe(this, this._resetActiveInterval), this._change.destroy(); }), (e.prototype._setState = function (e) { (this._state = Object.assign({}, this._state, e)), this._change.fire(this._state); }), (e.prototype._onRangeChanged = function (e, t) { this._setState({ activeRange: t.timeframe }); }), (e.prototype._resetActiveInterval = function () { this._setState({ activeRange: void 0 }); }), (e.prototype._updateAvailableRanges = function () { var e = this._context, t = e.availableTimeFrames, n = e.chartWidget; if (n.model()) { var a = n.model().mainSeries(), i = a.status(); if (i !== _.STATUS_LOADING && i !== _.STATUS_RESOLVING) { var o = t(a.symbolInfo(), a.status()); 0 !== o.length && this._setState({ ranges: o }); } } }), e ); })(), M = n('cdbK'), W = n('9VJd'), T = n('J3OW'), A = { title: window.t('Date Range'), goToDate: window.t('Go to...') }, O = Object(x.b)(), j = R( (function (e) { function t(t, n) { var i = e.call(this, t, n) || this; return ( (i._handleGoToDateClick = function () { var e = i.context.chartWidget; Object(M.showGoToDateDialog)(e.model()), Object(p.b)(); }), (i._handleRangeSelect = function (e) { e && i.props.onSelectRange && i.props.onSelectRange(e), Object(p.b)(); }), (i._renderChildren = function (e) { var t = i.props, n = t.ranges, o = t.activeRange, r = t.goToDateButton; return e ? a.createElement( a.Fragment, null, n.map(function (e) { return a.createElement(m.a, { key: e.value, label: e.description || e.text, active: o === e.value, checked: o === e.value, checkable: !0, disabled: !1, onClick: i._handleRangeSelect.bind(null, e), doNotCloseOnClick: !1, subItems: [], }); }), r && a.createElement(g.a, { className: T.separator }), r && a.createElement(m.a, { key: 'go-to-date', icon: W, label: A.goToDate, onClick: i._handleGoToDateClick, active: !1, checked: !1, checkable: !1, disabled: !1, doNotCloseOnClick: !1, subItems: [], }), ) : a.createElement( a.Fragment, null, n.map(function (e) { return a.createElement(v.b, { key: e.value, label: e.description || e.text, isActive: o === e.value, onClick: i._handleRangeSelect, onClickArg: e, }); }), r && a.createElement(f.a, null), r && a.createElement(v.b, { label: A.goToDate, onClick: i._handleGoToDateClick, }), ); }), Object(x.c)(n, { chartWidget: s.any.isRequired }), i ); } return ( Object(o.__extends)(t, e), (t.prototype.render = function () { var e = this; return a.createElement( b.a, { rule: 'screen and (max-width: 419px)' }, function (t) { return a.createElement( d.a, { className: T.button, content: A.title, arrow: !0, verticalAttachEdge: h.a.Top, verticalDropDirection: h.b.FromBottomToTop, horizontalMargin: 4, 'data-name': 'date-ranges-menu', isDrawer: t, }, e._renderChildren(t), ); }, ); }), (t.contextType = O), t ); })(a.PureComponent), ), B = n('K3s3'), D = n('W9Y+'); function z(e) { var t, n = c( e.className, D.item, (((t = {})[D.isActive] = e.isActive), (t[D.isFirst] = e.isFirst), (t[D.isLast] = e.isLast), t), ); return a.createElement( 'div', { className: n, onClick: e.onClick, ref: e.reference }, e.children, ); } var I = n('nPPD'), L = n('RZ2Z'), P = Object(I.a)(B.a, L); var F = n('qSb5'), q = Object(B.c)(function (e) { return a.createElement( 'div', { className: c(e.className, P.slider), ref: e.reference }, a.createElement('div', { className: P.inner }), ); }); var U = R(function (e) { var t = e.className, n = e.ranges, i = e.activeRange, o = e.onSelectRange; return a.createElement( q, { className: c(F.sliderRow, t), 'data-name': 'date-ranges-tabs' }, n.map(function (e, t) { return a.createElement( z, { key: e.value, isFirst: 0 === t, isLast: t === n.length - 1, isActive: i === e.value, onClick: o && o.bind(null, e), }, a.createElement( 'div', { title: e.description || e.text, className: 'apply-common-tooltip', }, e.text, ), ); }), ); }), H = n('Iivm'), G = n('ei7k'), V = n('ul7r'), Z = n('c7H2'), X = Object(G.b)({ keys: ['Alt', 'G'], text: '{0} + {1}' }), Q = Object(x.b)(), K = R( (function (e) { function t(t, n) { var a = e.call(this, t, n) || this; return ( (a._handleClick = function () { var e = a.context.chartWidget; Object(E.trackEvent)('GUI', 'Chart Bottom Toolbar', 'go to'), Object(M.showGoToDateDialog)(e.model()); }), Object(x.c)(n, { chartWidget: s.any.isRequired }), a ); } return ( Object(o.__extends)(t, e), (t.prototype.render = function () { var e = this.props, t = e.className; return ( e.ranges.length > 0 && a.createElement( 'div', { className: c('apply-common-tooltip', Z.button, t), 'data-name': 'go-to-date', 'data-tooltip-hotkey': X, onClick: this._handleClick, title: Object(r.t)('Go to'), }, a.createElement(H.Icon, { className: Z.icon, icon: V }), ) ); }), (t.contextType = Q), t ); })(a.PureComponent), ), Y = n('URQ3'); function J(e) { var t = e.reference, n = e.className, i = e.children, r = Object(o.__rest)(e, ['reference', 'className', 'children']); return a.createElement( 'button', Object(o.__assign)({}, r, { className: c(n, Y.button), ref: t }), a.createElement('span', { className: Y.inner }, i), ); } var $ = n('U/gD'), ee = n('4kQX'), te = n('7KDR'), ne = n('5VQP'), ae = (function (e) { function t(t) { var n = e.call(this, t) || this; return ( (n._element = null), (n._menu = null), (n._handleRef = function (e) { n._element = e; }), (n._showMenu = function () { if (n._menu && n._menu.isShown()) return n._menu.hide(), void n._menu.destroy(); var e = n.props, t = e.getActions, a = e.right, i = Object(C.ensureNotNull)(n._element), o = t(); 0 !== o.length && ne.ContextMenuManager.createMenu(o).then(function (e) { (n._menu = e), e.show(function (e, t) { var n = i.getBoundingClientRect(); return { clientX: a ? n.right - e : n.left, clientY: n.top - Math.min(t, n.top), overrideHeight: n.top < t ? n.top : void 0, }; }, n._element || void 0); }); }), n ); } return ( Object(o.__extends)(t, e), (t.prototype.render = function () { var e = this.props.children; return a.createElement( 'span', { onClick: this._showMenu, ref: this._handleRef }, e, ); }), t ); })(a.PureComponent), ie = n('2mG+'), oe = { hint: window.t('Timezone') }; var re = Object(x.b)(), se = (function (e) { function t(t, n) { var a = e.call(this, t, n) || this; return ( (a._timeFormatter = new ee.TimeFormatter()), (a._tickInterval = void 0), (a._tickClock = function () { var e = a.context.chartApiInstance, t = a._timezoneOffset; if (void 0 !== t) { var n = 1e3 * e.serverTimeOffset(), i = new Date(Date.now() + t + n); a.setState({ time: a._timeFormatter.format(i) }); } }), (a._getActions = function () { return a.props.withMenu ? (function (e) { e.updateActions(); var t = e.actions(); return t && t.applyTimeZone instanceof te.Action ? t.applyTimeZone.getSubItems() : []; })(a.context.chartWidget) : []; }), Object(x.c)(n, { chartWidget: s.any.isRequired, chartApiInstance: s.any.isRequired, }), (a.state = { time: '', timezone: '' }), a ); } return ( Object(o.__extends)(t, e), (t.prototype.componentDidMount = function () { var e = this, t = this.context.chartWidget; (this._tickInterval = setInterval(this._tickClock, 1e3)), t.withModel(null, function () { var n = t.model(); n .model() .mainSeries() .dataEvents() .symbolResolved() .subscribe(e, e.updateTimezonesButton), n .model() .properties() .timezone.subscribe(e, e.updateTimezonesButton); }); }), (t.prototype.componentWillUnmount = function () { var e = this, t = this.context.chartWidget; clearInterval(this._tickInterval), t.withModel(null, function () { var n = t.model(); n .model() .mainSeries() .dataEvents() .symbolResolved() .unsubscribe(e, e.updateTimezonesButton), n .model() .properties() .timezone.unsubscribe(e, e.updateTimezonesButton); }); }), (t.prototype.render = function () { var e = this.props, t = e.className, n = e.withMenu, i = this.state, o = i.time, r = i.timezone; return a.createElement( ae, { getActions: this._getActions }, a.createElement( J, { className: c(t, ie.button, 'apply-common-tooltip'), title: n ? oe.hint : void 0, disabled: !n, 'data-name': 'time-zone-menu', }, o && r && o + ' (' + r + ')', ), ); }), (t.prototype.updateTimezonesButton = function () { var e = this.context.chartWidget; if (e.model() && null !== e.model().mainSeries().symbolInfo()) { var t = e.model().model().timezone(); if ('exchange' === t) { var n = Object(C.ensureNotNull)( e.model().mainSeries().symbolInfo(), ).timezone; n && (t = n); } var a = Object($.a)(t); (this._timezoneOffset = a.offset), this.setState({ timezone: a.string }), this._tickClock(); } }), (t.contextType = re), t ); })(a.PureComponent), ce = n('z6ID'); function le(e) { return a.createElement('span', { className: c(ce.separator, e.className), }); } var ue = n('tU7i'), de = Object(x.b)(); var he = Object(x.b)(); var pe = Object(x.b)(); var me = Object(x.b)(); var ge, be, ve, fe, _e, Ce = n('+GaQ'), ye = n('XAms'), Se = n('T4/F'), Ee = n('ApAi'), xe = n('PP+v'), we = { extLabel: window.t('ext'), extHint: window.t( 'Extended Hours is available only for intraday charts', ), percentageHint: window.t('Toggle Percentage'), logLabel: window.t('log', { context: 'scale' }), logHint: window.t('Toggle Log Scale'), autoLabel: window.t('auto', { context: 'scale' }), autoHint: window.t('Toggle Auto Scale'), fullscreenHint: window.t('Toggle Maximize Chart'), adjLabel: window.t('adj', { context: 'adjustments' }), adjHint: window.t('Adjust data for dividends'), adjForDividendsOnlyHint: window.t( 'Data is adjusted for dividends only', ), adjForSplitsOnlyHint: window.t('Data is adjusted for splits only'), }, Re = ((fe = function (e) { return a.createElement(ue.b, { text: we.logLabel, title: we.logHint, className: e.className, isActive: e.isLogarithm, isGrouped: !0, onClick: e.onClick, 'data-name': 'logarithm', }); }), ((_e = (function (e) { function t(t, n) { var a = e.call(this, t, n) || this; return ( (a._priceScale = null), (a._handleSelect = function () { var e = a.context.chartWidget.model(), t = Object(C.ensureNotNull)(a.state.series), n = t.priceScale(), i = n.mode(); t.priceScale().isLockScale() || e.setPriceScaleMode( { log: !i.log }, n, window.t('Toggle Log Scale'), ); }), Object(x.c)(n, { chartWidget: s.any.isRequired, }), (a.state = { isActive: !1, series: null }), a ); } return ( Object(o.__extends)(t, e), (t.prototype.componentDidMount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { var n = t.model().mainSeries(), a = n.priceScale(); e._handleMainSeriesPriceScaleChanged(a), n .priceScaleChanged() .subscribe(e, e._handleMainSeriesPriceScaleChanged), e._handleModeChanged({}, a.mode()), e.setState({ isActive: n.priceScale().isLog(), series: n }); }); }), (t.prototype.componentWillUnmount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { t.model() .mainSeries() .priceScaleChanged() .unsubscribe(e, e._handleMainSeriesPriceScaleChanged); }), null !== this._priceScale && (this._priceScale.modeChanged().unsubscribeAll(this), (this._priceScale = null)); }), (t.prototype.render = function () { var e = this.props.className, t = this.state, n = t.isActive, i = t.series; return a.createElement(fe, { className: e, isLogarithm: n, isDisabled: null === i, onClick: this._handleSelect, }); }), (t.prototype._handleMainSeriesPriceScaleChanged = function (e) { var t = {}; null !== this._priceScale && ((t = this._priceScale.mode()), this._priceScale .modeChanged() .unsubscribe(this, this._handleModeChanged)), (this._priceScale = e), this._priceScale .modeChanged() .subscribe(this, this._handleModeChanged), this._handleModeChanged(t, e.mode()); }), (t.prototype._handleModeChanged = function (e, t) { e.log !== t.log && this.setState({ isActive: t.log }); }), t ); })(a.PureComponent)).contextType = de), _e), Ne = (function (e) { var t; return ( ((t = (function (t) { function n(e, n) { var a = t.call(this, e, n) || this; return ( (a._priceScale = null), (a._handleSelect = function () { var e = a.context.chartWidget.model(), t = Object(C.ensureNotNull)(a.state.series).priceScale(), n = t.mode(); e.setPriceScaleMode( { autoScale: !n.autoScale }, t, window.t('Toggle Auto Scale'), ); }), Object(x.c)(n, { chartWidget: s.any.isRequired }), (a.state = { isActive: !1, series: null }), a ); } return ( Object(o.__extends)(n, t), (n.prototype.componentDidMount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { var n = t.model().mainSeries(), a = n.priceScale(); e._handleMainSeriesPriceScaleChanged(a), n .priceScaleChanged() .subscribe(e, e._handleMainSeriesPriceScaleChanged), e._handleModeChanged({}, a.mode()), e.setState({ isActive: n.priceScale().isAutoScale(), series: n, }); }); }), (n.prototype.componentWillUnmount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { t.model() .mainSeries() .priceScaleChanged() .unsubscribe(e, e._handleMainSeriesPriceScaleChanged); }), null !== this._priceScale && (this._priceScale.modeChanged().unsubscribeAll(this), (this._priceScale = null)); }), (n.prototype.render = function () { var t = this.props.className, n = this.state, i = n.isActive, o = n.series; return a.createElement(e, { className: t, isAuto: i, isDisabled: null === o, onClick: this._handleSelect, }); }), (n.prototype._handleMainSeriesPriceScaleChanged = function (e) { var t = {}; null !== this._priceScale && ((t = this._priceScale.mode()), this._priceScale .modeChanged() .unsubscribe(this, this._handleModeChanged)), (this._priceScale = e), this._priceScale .modeChanged() .subscribe(this, this._handleModeChanged), this._handleModeChanged(t, e.mode()); }), (n.prototype._handleModeChanged = function (e, t) { e.autoScale !== t.autoScale && this.setState({ isActive: t.autoScale }); }), n ); })(a.PureComponent)).contextType = he), t ); })(function (e) { return a.createElement(ue.b, { text: we.autoLabel, title: we.autoHint, className: e.className, isActive: e.isAuto, isGrouped: !0, onClick: e.onClick, 'data-name': 'auto', }); }), ke = (function (e) { var t; return ( ((t = (function (t) { function n(e, n) { var a = t.call(this, e, n) || this; return ( (a._priceScale = null), (a._handleSelect = function () { var e = a.context.chartWidget.model(), t = Object(C.ensureNotNull)(a.state.series), n = t.priceScale(), i = n.mode(); t.priceScale().isLockScale() || e.setPriceScaleMode( { percentage: !i.percentage }, n, window.t('Toggle Percentage Scale'), ); }), Object(x.c)(n, { chartWidget: s.any.isRequired }), (a.state = { isActive: !1, series: null }), a ); } return ( Object(o.__extends)(n, t), (n.prototype.componentDidMount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { var n = t.model().mainSeries(), a = n.priceScale(); e._handleMainSeriesPriceScaleChanged(a), n .priceScaleChanged() .subscribe(e, e._handleMainSeriesPriceScaleChanged), e._handleScaleChange({}, a.mode()), e.setState({ isActive: n.priceScale().isPercentage(), series: n, }); }); }), (n.prototype.componentWillUnmount = function () { var e = this, t = this.context.chartWidget; t.withModel(null, function () { t.model() .mainSeries() .priceScaleChanged() .unsubscribe(e, e._handleMainSeriesPriceScaleChanged); }), null !== this._priceScale && (this._priceScale.modeChanged().unsubscribeAll(this), (this._priceScale = null)); }), (n.prototype.render = function () { var t = this.props.className, n = this.state, i = n.isActive, o = n.series; return a.createElement(e, { className: t, isPercentage: i, isDisabled: null === o, onClick: this._handleSelect, }); }), (n.prototype._handleMainSeriesPriceScaleChanged = function (e) { var t = {}; null !== this._priceScale && ((t = this._priceScale.mode()), this._priceScale .modeChanged() .unsubscribe(this, this._handleScaleChange)), (this._priceScale = e), this._priceScale .modeChanged() .subscribe(this, this._handleScaleChange), this._handleScaleChange(t, e.mode()); }), (n.prototype._handleScaleChange = function (e, t) { e.percentage !== t.percentage && this.setState({ isActive: t.percentage }); }), n ); })(a.PureComponent)).contextType = pe), t ); })(function (e) { return a.createElement(ue.b, { icon: Se, title: we.percentageHint, className: e.className, isActive: e.isPercentage, isDisabled: e.isDisabled, isGrouped: !0, onClick: e.onClick, 'data-name': 'percentage', }); }); var Me, We = Object(G.b)({ keys: ['Alt', 'Enter'], text: '{0} + {1}' }), Te = (function (e) { var t; return ( ((t = (function (t) { function n(e, n) { var a = t.call(this, e, n) || this; (a._handleClick = function (e) { var t = a.context, n = t.resizerDetacher; t.chartWidgetCollection; e.shiftKey && n.detachable.value() ? n.detach() : a.state.isFullscreen ? n.exitFullscreen() : n.requestFullscreen(); }), (a._handleLayoutChange = function (e) { a.setState({ isFullscreen: e }); }), (a._handlePhoneSize = function () { 0; }), Object(x.c)(n, { chartWidgetCollection: s.any.isRequired, resizerDetacher: s.any.isRequired, }); var i = n.resizerDetacher; return ( (a.state = { isFullscreen: i.fullscreen.value(), isChangeLayoutButton: a._isChangeLayoutButton(), }), a ); } return ( Object(o.__extends)(n, t), (n.prototype.componentDidMount = function () { var e = this.context, t = e.resizerDetacher; e.chartWidgetCollection, this.props.mobileChangeLayoutEnabled; t.fullscreen.subscribe(this._handleLayoutChange); }), (n.prototype.componentWillUnmount = function () { var e = this.context, t = e.resizerDetacher; e.chartWidgetCollection, this.props.mobileChangeLayoutEnabled; t.fullscreen.unsubscribe(this._handleLayoutChange); }), (n.prototype.render = function () { var t = this.props.className, n = this.state, i = n.isFullscreen; n.isChangeLayoutButton; return a.createElement(e, { className: t, isFullscreen: i, onClick: this._handleClick, }); }), (n.prototype._isChangeLayoutButton = function () { return !1; }), n ); })(a.PureComponent)).contextType = me), t ); })(function (e) { return a.createElement(ue.b, { icon: Ee, title: we.fullscreenHint, className: e.className, isActive: e.isFullscreen, onClick: e.onClick, 'data-tooltip-hotkey': We, 'data-name': 'fullscreen', }); }), Ae = (((ge = {}).properties = !0), (ge.fullscreen = !0), (ge.preventPhoneLayout = !0), ge), Oe = (((be = {}).fullscreen = Number.MIN_SAFE_INTEGER), (be.preventPhoneLayout = Number.MIN_SAFE_INTEGER), (be.properties = Number.MIN_SAFE_INTEGER), (be.timeZones = -1), (be.auto = 0), (be.logarithm = 1), (be.percentage = 2), (be.ext = 3), (be.adj = 4), be), je = ((Me = new Map()).set(Re, 'logarithm'), Me.set(ke, 'percentage'), Me.set(Ne, 'auto'), Me.set(Te, 'fullscreen'), Me); function Be(e) { 0; } var De = (((ve = { dateRangeMode: 'hidden' }).timeZones = !0), (ve.fullscreen = !0), (ve.preventPhoneLayout = !0), (ve.properties = !0), (ve.auto = !0), (ve.logarithm = !0), (ve.percentage = !0), (ve.ext = !0), (ve.adj = !0), ve), ze = Object(x.b)(), Ie = (function (e) { function t(t, n) { var o, r, l = e.call(this, t, n) || this; (l._timezoneButtonRef = null), (l._layout = Object.assign({}, De)), (l._raf = null), (l._toolbar = null), (l._rangeExpanded = null), (l._rangeCollapsed = null), (l._seriesComponents = {}), (l._injector = ((o = function () { return l._layout; }), (r = function (e, t) { return (l._seriesComponents[t] = e); }), function (e, t, n) { if (a.isValidElement(e) && 'string' != typeof e.type) { var i = e.props; if ('string' == typeof i.className) { var s = { className: c( i.className, 0 === t && xe.first, t === n.length - 1 && xe.last, ), }, l = o(), u = Object(C.ensureDefined)(je.get(e.type)); return a.createElement( 'div', { key: null === e.key ? void 0 : e.key, className: c(xe.inline, l[u] && xe.collapsed), ref: function (e) { return r(e, u); }, onClick: function () { return Be(); }, }, a.cloneElement(e, s), ); } } return e; })), (l._handleResize = function () { null === l._raf && (l._raf = requestAnimationFrame(function () { var e, t, n, a, o = l._layout, r = Object(C.ensureNotNull)(l._toolbar), s = Object(C.ensureNotNull)(l._rangeExpanded), c = ((a = (function (e) { var t = {}; return ( Object.keys(e).forEach(function (n) { var a = e[n]; if (null !== a) { var o = i.findDOMNode(a); null !== o && (t[n] = o); } }), t ); })(l._seriesComponents)), Object.keys(a) .map(function (e) { return { name: e, width: a[e].offsetWidth }; }) .sort(function (e, t) { return Oe[e.name] - Oe[t.name]; })), u = r.offsetWidth, d = c.reduce(function (e, t) { return e + t.width; }, 0), h = s.offsetWidth, p = !Boolean(s.textContent) || u - d - h <= 0 ? 'collapsed' : 'expanded'; if ( (Object.assign(o, { dateRangeMode: p }), 'expanded' !== p) ) { for ( var m = u - Object(C.ensureNotNull)(l._rangeCollapsed) .offsetWidth - 0, g = 0, b = 0, v = 0, f = c; v < f.length; v++ ) { var _ = f[v]; (g += _.width), _.name in Ae ? ((b += _.width), Object.assign(o, (((e = {})[_.name] = !1), e))) : Object.assign( o, (((t = {})[_.name] = m <= g), t), ); } m <= b && Object.assign(o, { dateRangeMode: 'hidden' }); } else Object.assign(o, (((n = {}).timeZones = !1), (n.fullscreen = !1), (n.preventPhoneLayout = !1), (n.properties = !1), (n.auto = !1), (n.logarithm = !1), (n.percentage = !1), (n.ext = !1), (n.adj = !1), n)); l._applyResizing(), (l._raf = null); })); }), (l._handleTimezoneButtonRef = function (e) { l._timezoneButtonRef = e; }), (l._handleMeasure = function () { null !== l._toolbar && l.resizeUI(); }), (l._handleFullscreenableChange = function (e) { l._setStateWithResize({ isFullscreenable: e }); }), (l._handlePreventPhoneLayoutButtonVisibility = function () { 0; }), (l._handleToolbarRef = function (e) { return (l._toolbar = e); }), (l._handleRangeCollapsedRef = function (e) { return (l._rangeCollapsed = e); }), (l._handleRangeExpandedRef = function (e) { return (l._rangeExpanded = e); }), (l._handleTimeZonesRef = function (e) { l._seriesComponents.timeZones = e; }), Object(x.c)(n, { onContentBoxChanged: s.any.isRequired, chartApiInstance: s.any.isRequired, chartWidget: s.any.isRequired, chartWidgetCollection: s.any.isRequired, resizerDetacher: s.any.isRequired, }); var u = l.context.resizerDetacher; return ( (l.state = { isFullscreenable: u.fullscreenable.value(), isPreventPhoneLayoutButton: l._isPreventPhoneLayoutButton(), }), l ); } return ( Object(o.__extends)(t, e), (t.prototype.componentDidMount = function () { var e = this.context, t = e.onContentBoxChanged, n = e.resizerDetacher; e.chartWidgetCollection, e.chartWidget; t.subscribe(this, this._handleResize), n.fullscreenable.subscribe(this._handleFullscreenableChange), this.updateTimezonesButton(), this.resizeUI(); }), (t.prototype.componentWillUnmount = function () { var e = this.context, t = e.onContentBoxChanged, n = e.resizerDetacher; e.chartWidgetCollection, e.chartWidget; t.unsubscribe(this, this._handleResize), n.fullscreenable.unsubscribe(this._handleFullscreenableChange), null !== this._raf && (cancelAnimationFrame(this._raf), (this._raf = null)); }), (t.prototype.render = function () { var e = this._layout; return a.createElement( 'div', { className: xe.toolbar, ref: this._handleToolbarRef, onContextMenu: ye.a, }, this.props.timeFramesWidgetEnabled && a.createElement( Ce.a, null, a.createElement( 'div', { className: c( xe.dateRangeWrapper, 'collapsed' !== e.dateRangeMode && xe.collapsed, ), ref: this._handleRangeCollapsedRef, }, a.createElement( 'div', { className: c(xe.dateRangeCollapsed) }, a.createElement(j, { goToDateButton: this.props.goToDateEnabled, }), ), ), a.createElement( l, { onMeasure: this._handleMeasure }, a.createElement( 'div', { className: c( xe.dateRangeWrapper, 'expanded' !== e.dateRangeMode && xe.collapsed, ), ref: this._handleRangeExpandedRef, }, a.createElement( 'div', { className: c(xe.dateRangeExpanded) }, a.createElement(U, null), this.props.goToDateEnabled && a.createElement(le, null), this.props.goToDateEnabled && a.createElement(K, null), ), ), ), ), a.createElement( 'div', { className: xe.seriesControlWrapper }, this.props.timeWidgetEnabled && a.createElement( l, { onMeasure: this._handleMeasure }, a.createElement( 'div', { className: c(xe.inline, e.timeZones && xe.collapsed), ref: this._handleTimeZonesRef, }, a.createElement( 'div', { className: xe.inline, onClick: this._trackTimezonesButtonClick, }, a.createElement(se, { className: xe.timezone, withMenu: this.props.timezoneMenuEnabled, ref: this._handleTimezoneButtonRef, }), ), a.createElement( 'div', { className: xe.inline }, a.createElement(le, null), ), ), ), a.createElement( Ce.a, { map: this._injector }, !1, !1, this.props.percentageScaleButtonEnabled && !u.enabled('fundamental_widget') && a.createElement(ke, { className: xe.icon }), this.props.logScaleButtonEnabled && a.createElement(Re, { className: xe.item }), this.props.autoScaleButtonEnabled && a.createElement(Ne, { className: xe.item }), this.props.fullscreenButtonEnabled && this.state.isFullscreenable && a.createElement(Te, { className: xe.icon, mobileChangeLayoutEnabled: this.props .mobileChangeLayoutEnabled, }), !1, ), ), ); }), (t.prototype.updateTimezonesButton = function () { null !== this._timezoneButtonRef && this._timezoneButtonRef.updateTimezonesButton(); }), (t.prototype.resizeUI = function () { this._handleResize(); }), (t.prototype._updateButtonsVisibility = function () {}), (t.prototype._trackTimezonesButtonClick = function () { Be(); }), (t.prototype._setStateWithResize = function (e) { var t = this; Object.assign(this._layout, De), this._applyResizing(), this.setState(e, function () { return t._handleResize(); }); }), (t.prototype._applyResizing = function () { var e = this, t = this._layout, n = t.dateRangeMode, a = Object(o.__rest)(t, ['dateRangeMode']); this._rangeExpanded && this._rangeExpanded.classList.toggle( xe.collapsed, 'expanded' !== n, ), this._rangeCollapsed && this._rangeCollapsed.classList.toggle( xe.collapsed, 'collapsed' !== n, ), Object.keys(a).forEach(function (t) { var n = t, i = e._seriesComponents[n]; i && i.classList.toggle(xe.collapsed, a[n]); }); }), (t.prototype._isPreventPhoneLayoutButton = function () { return !1; }), (t.contextType = ze), t ); })(a.PureComponent), Le = { onContentBoxChanged: s.any, computeContentBox: s.any, chartWidget: s.any, chartApiInstance: s.any, chartWidgetCollection: s.any, resizerDetacher: s.any, availableTimeFrames: s.any, }, Pe = (function (e) { function t(t) { var n = e.call(this, t) || this; n._setActiveChart = function (e) { n._defineRegistry(e), n.setState({ chartWidget: e }); }; var a = n.props.chartWidgetCollection.activeChartWidget.value(); return (n.state = { chartWidget: a }), n._defineRegistry(a), n; } return ( Object(o.__extends)(t, e), (t.prototype.componentDidMount = function () { this.props.chartWidgetCollection.activeChartWidget.subscribe( this._setActiveChart, ); }), (t.prototype.componentWillUnmount = function () { this.props.chartWidgetCollection.activeChartWidget.unsubscribe( this._setActiveChart, ); }), (t.prototype.render = function () { var e = this.state.chartWidget; if (!e) return null; var t = this.props.options, n = { timeFramesWidgetEnabled: t.timeFramesWidgetEnabled, goToDateEnabled: t.timeFramesWidget.goToDateEnabled, timeWidgetEnabled: t.timeWidgetEnabled, timezoneMenuEnabled: t.timeWidget && t.timeWidget.timezoneMenuEnabled, extendedHoursButtonEnabled: t.extendedHoursButtonEnabled, adjustForDividendsButtonEnabled: t.adjustForDividendsButtonEnabled, logScaleButtonEnabled: t.logScaleButtonEnabled, percentageScaleButtonEnabled: t.percentageScaleButtonEnabled, autoScaleButtonEnabled: t.autoScaleButtonEnabled, fullscreenButtonEnabled: t.fullscreenButtonEnabled, mobileChangeLayoutEnabled: t.mobileChangeLayoutEnabled, }; return a.createElement( x.a, { validation: Le, value: this._registry }, a.createElement(Ie, Object(o.__assign)({ key: e.id() }, n)), ); }), (t.prototype._defineRegistry = function (e) { var t = this.props, n = t.onContentBoxChanged, a = t.computeContentBox, i = t.chartApiInstance, o = t.chartWidgetCollection, r = t.options, s = r.timeFramesWidgetEnabled, c = r.timeFramesWidget, l = s ? c.availableTimeFrames : void 0; this._registry = { onContentBoxChanged: n, computeContentBox: a, chartWidget: e, availableTimeFrames: l, chartApiInstance: i, chartWidgetCollection: o, resizerDetacher: e.getResizerDetacher(), }; }), t ); })(a.PureComponent); n.d(t, 'BottomToolbarRenderer', function () { return Fe; }); var Fe = (function () { function e(e, t, n, o, r, s, c) { this._container = e; var l = a.createElement(Pe, { onContentBoxChanged: t, computeContentBox: n, chartWidgetCollection: o, chartApiInstance: r, chartWidgetOptions: s, options: c, }); i.render(l, e), e.setAttribute('data-initialized', 'true'); } return ( (e.prototype.destroy = function () { i.unmountComponentAtNode(this._container), this._container.removeAttribute('data-initialized'); }), e ); })(); }, 'PP+v': function (e, t, n) { e.exports = { toolbar: 'toolbar-2MJefnwP', dateRangeWrapper: 'dateRangeWrapper-yS_7EK1i', seriesControlWrapper: 'seriesControlWrapper-1c7dZFwu', dateRangeExpanded: 'dateRangeExpanded-Eh9SAOEe', dateRangeCollapsed: 'dateRangeCollapsed-1-pFg0M1', item: 'item-2cWFW_ze', first: 'first-1XNI05qr', last: 'last-2VBe7EFW', inline: 'inline-2rwBBIxN', timezone: 'timezone-34WAZb8x', icon: 'icon-3VRthUnU', hidden: 'hidden-3Tq8Bf9V', collapsed: 'collapsed-2lhil-Rc', }; }, RZ2Z: function (e, t, n) { e.exports = { slider: 'slider-1ealLtjI', inner: 'inner-3lmAEIjy' }; }, 'T4/F': function (e, t) { e.exports = ''; }, URQ3: function (e, t, n) { e.exports = { button: 'button-88UE6omC', hover: 'hover-3_vVP91F', inner: 'inner-2FptJsfC', }; }, 'W9Y+': function (e, t, n) { e.exports = { item: 'item-3cgIlGYO', hover: 'hover-2y46_KNk', isActive: 'isActive-2M6dwA7-', isFirst: 'isFirst-2kfAV5tf', isLast: 'isLast-voJ1bqZh', }; }, XXQ5: function (e, t, n) { e.exports = { item: 'item-3uG--HK9', loading: 'loading-cNheEKQv', disabled: 'disabled-3ilLPdQ4', interactive: 'interactive-2W_Hkhdy', hovered: 'hovered-D1oc5kww', icon: 'icon-1Mb1FjSX', label: 'label-3O4C0UM-', title: 'title-22oXfKpQ', nested: 'nested-1ZM4Mhrc', shortcut: 'shortcut-3ZjqDeQg', remove: 'remove-3gWfSy1e', }; }, XiJV: function (e, t, n) { e.exports = { separator: 'separator-1TZB5HZ-' }; }, Xy1d: function (e, t) { e.exports = ''; }, Xzy5: function (e, t) { e.exports = ''; }, c7H2: function (e, t, n) { e.exports = { button: 'button-2gir_Bbb', hover: 'hover-SrAyrKlT', icon: 'icon-MwaAItz1', }; }, l4ku: function (e, t, n) { 'use strict'; n.d(t, 'a', function () { return p; }); var a = n('q1tI'), i = n.n(a), o = n('TSYQ'), r = n('w+Rv'), s = n('Iivm'), c = n('6KyJ'), l = n('Xy1d'), u = n('Xzy5'), d = n('20PO'), h = n('XXQ5'); function p(e) { var t = e.isTitle, n = e.isLoading, a = e.isHovered, p = e.active, m = e.checkable, g = e.disabled, b = e.checked, v = e.icon, f = e.iconChecked, _ = e.hint, C = e.subItems, y = e.label, S = e.onClick, E = e.children, x = e.toolbox, w = !!C.length; return n ? i.a.createElement( 'li', { className: o(h.item, h.loading) }, i.a.createElement(c.Loader, { color: 'gray' }), ) : i.a.createElement( 'li', { className: o( h.item, h.interactive, t && h.title, g && h.disabled, a && h.hovered, p && h.active, ), onClick: S, }, i.a.createElement(s.Icon, { className: o(h.icon), icon: (function () { if (m && b) return f || v || l; return v; })(), }), i.a.createElement('span', { className: h.label }, y), !!x && i.a.createElement(s.Icon, { onClick: function () { x && x.action(); }, className: h.remove, icon: d, }), !w && _ && i.a.createElement(r.a, { className: h.shortcut, text: _ }), w && i.a.createElement(s.Icon, { className: h.nested, icon: u }), E, ); } }, qSb5: function (e, t, n) { e.exports = { sliderRow: 'sliderRow-Tv1W7hM5' }; }, ul7r: function (e, t) { e.exports = ''; }, 'w+Rv': function (e, t, n) { 'use strict'; n.d(t, 'a', function () { return s; }); var a = n('q1tI'), i = n('TSYQ'), o = n.n(i), r = n('ycgn'); function s(e) { var t = e.text, n = void 0 === t ? '' : t, i = e.className; return a.createElement('span', { className: o()(r.shortcut, i) }, n); } }, ycgn: function (e, t, n) { e.exports = { item: 'item-stVdeCwG', interactive: 'interactive-3E0jwVyG', hovered: 'hovered-2HCCgw6c', disabled: 'disabled-2K7FyUI3', active: 'active-muW4lycL', shortcut: 'shortcut-2P38AivB', iconCell: 'iconCell-OhwVvlgA', icon: 'icon-3DDcYD-t', checkmark: 'checkmark-2UE1siCn', content: 'content-1GXgstZ5', label: 'label-1If3beUH', checked: 'checked-5eQn8630', toolbox: 'toolbox-2XX2mSNw', showToolboxOnHover: 'showToolboxOnHover-iCrUIcOG', arrowIcon: 'arrowIcon-2FMesq_x', subMenu: 'subMenu-QM4GIDtY', }; }, z6ID: function (e, t, n) { e.exports = { separator: 'separator-3bp1jCsV' }; }, }, ]);