webpackJsonp([18],{1085:function(e,t){e.exports={group:"group-wWM3zP_M-",noLeftDecoration:"noLeftDecoration-15F5a1TB-",noRightDecoration:"noRightDecoration-2GcAAgVb-",noMinimalWidth:"noMinimalWidth-1sbl_ff5-"}},1086:function(e,t){e.exports={"css-value-header-toolbar-height":"38px",wrap:"wrap-3tiHesTk-"}},1087:function(e,t){e.exports=''},1088:function(e,t){e.exports={wrap:"wrap-3K4w_7te-",icon:"icon-1dNdRXKB-"}},1089:function(e,t){e.exports={wrap:"wrap-1GG7GnNO-",scrollWrap:"scrollWrap-1icOiezT-",noScrollBar:"noScrollBar-2zw2auFK-",content:"content-3_f7yH29-",icon:"icon-2fZsO52g-",scrollLeft:"scrollLeft-3OUcqYWy-",scrollRight:"scrollRight-UDsPWprP-",isVisible:"isVisible-zZk7F7wr-",iconWrap:"iconWrap-1U8J-Qkw-",fadeLeft:"fadeLeft-31arUEZY-",fadeRight:"fadeRight-36gcjOQb-"}},1090:function(e,t){e.exports={fake:"fake-37paHC6T-",inner:"inner-v8eiKwdM-",subGroup:"subGroup-1JpgB9zD-",fill:"fill-2axUON87-",minimalPriority:"minimalPriority-1MGEuVHu-",button:"button-3xrjDzA4-",iconButton:"iconButton-3vyD3BPg-",hidden:"hidden-2kSvETGo-",symbolSearch:"symbolSearch-3I4QF1U_-"}},1091:function(e,t){e.exports={"css-value-header-toolbar-height":"38px",toolbar:"toolbar-2n2cwgp5-",isHidden:"isHidden-GTob3P_C-",overflowWrap:"overflowWrap-PWdgT-U_-",customButton:"customButton--jqJTfH5-",hovered:"hovered-1mGRUp3y-"}},700:function(e,t,n){"use strict";function i(e){var t,n=e.children,i=e.className,a=e.noLeftDecoration,o=e.noRightDecoration,r=e.noMinimalWidth;return u.createElement("div",{className:m(i,M.group,(t={},t[M.noMinimalWidth]=r,t[M.noLeftDecoration]=a,t[M.noRightDecoration]=o,t))},n)}function a(e){return u.createElement(L.a,c.a({},e,{forceInteractive:!0,icon:B}))}function o(e){return u.createElement("div",{className:N.wrap},u.createElement(k.a,{className:N.icon,icon:x}),V.text)}function r(e){return[e.findIndex(function(e){return u.isValidElement(e)&&!!e.key&&-1!==(""+e.key).indexOf("view-only-badge")}),e.findIndex(function(e){return u.isValidElement(e)&&!!e.key&&-1!==(""+e.key).indexOf("blue-screenshot")}),e.findIndex(function(e){return u.isValidElement(e)&&!!e.key&&-1!==(""+e.key).indexOf("popup")})].filter(function(e){return e>=0}).forEach(function(t){e=u.Children.map(e,function(e,n){var i,a,o;if(u.isValidElement(e))switch([t-1,t,t+1].indexOf(n)){case 0:i={noRightDecoration:!0},e=u.cloneElement(e,i);break;case 1:a={noLeftDecoration:!0,noRightDecoration:!0},e=u.cloneElement(e,a);break;case 2:o={noLeftDecoration:!0},e=u.cloneElement(e,o)}return e})}),e}function s(e){void 0===e&&(e=[]);var t=e.map(function(e){return se[e]})||[S.STYLE_CANDLES,S.STYLE_RENKO,S.STYLE_KAGI,S.STYLE_PNF];return Object(E.isOnFeaturePage)()&&!y.enabled("charting_library_base")&&(t=[]),y.enabled("widget")&&(t=[S.STYLE_BARS,S.STYLE_CANDLES,S.STYLE_AREA]),t}function l(e){return void 0===e&&(e=[]),Object(Q.mergeResolutions)(e,y.enabled("star_some_intervals_by_default")?le:[])} var c,d,u,h,p,m,f,v,y,b,S,E,_,g,w,C,M,W,R,L,B,k,N,x,V,T,A,O,I,F,D,P,j,H,z,G,Y,U,K,J,Q,q,X,Z,ee,te,ne,ie,ae,oe,re,se,le,ce,de,ue;Object.defineProperty(t,"__esModule",{value:!0}),c=n(1),d=n(14),u=n(20),h=n(104),p=n(313),m=n(102),f=n(301),v=n.n(f),y=n(5),b=n(31),S=n(40),E=n(71),_=n(205),g=n.n(_),w=n(127),C=n(106),M=n(1085),W=n(1086),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleMeasure=function(e){var n=e.width;t.props.onWidthChange(n)},t}return c.c(t,e),t.prototype.render=function(){var e=this.props.children;return u.createElement(p,{onMeasure:this._handleMeasure,whitelist:["width"]},u.createElement("div",{className:W.wrap},e))},t}(u.PureComponent),L=n(848),B=n(1087),n(11),k=n(300),N=n(1088),x=n(885),V={text:window.t("View Only Mode")},T=n(59),A=n(194),O=n(1089),I=n(184),F=n(990),D=n(38),P=function(e){function t(t){var n=e.call(this,t)||this;return n._wrapMeasureRef=null,n._contentMeasureRef=null,n._handleScrollLeft=function(){n.animateTo(Math.max(0,n.currentPosition()-(n.state.widthWrap-50)))},n._handleScrollRight=function(){n.animateTo(Math.min((n.state.widthContent||0)-(n.state.widthWrap||0),n.currentPosition()+(n.state.widthWrap-50)))},n._handleResizeWrap=function(e){var t=e.width;n.setState({widthWrap:t}),n._checkButtonsVisibility()},n._handleResizeContent=function(e){var t=e.width;n.setState({widthContent:t})},n._handleScroll=function(){var e=n.props.onScroll;e&&e(n.currentPosition(),n.isAtLeft(),n.isAtRight()),n._checkButtonsVisibility()},n._checkButtonsVisibility=function(){var e,t,i,a,o;(n.props.isVisibleButtons||n.props.isVisibleFade)&&(e=n.state,t=e.isVisibleLeftButton,i=e.isVisibleRightButton,a=n.isAtLeft(),o=n.isAtRight(),a||t?a&&t&&n.setState({isVisibleLeftButton:!1}):n.setState({isVisibleLeftButton:!0}),o||i?o&&i&&n.setState({isVisibleRightButton:!1}):n.setState({isVisibleRightButton:!0}))},n._setWrapMeasureRef=function(e){n._wrapMeasureRef=e},n._setContentMeasureRef=function(e){n._contentMeasureRef=e},n.state={widthContent:0,widthWrap:0,isVisibleRightButton:!1,isVisibleLeftButton:!1},n}return c.c(t,e),t.prototype.componentDidMount=function(){this._checkButtonsVisibility()},t.prototype.componentDidUpdate=function(e,t){t.widthWrap===this.state.widthWrap&&t.widthContent===this.state.widthContent||this._handleScroll(),this.props.shouldMeasure&&this._wrapMeasureRef&&this._contentMeasureRef&&(this._wrapMeasureRef.measure(),this._contentMeasureRef.measure())},t.prototype.currentPosition=function(){return this._scroll?D.IS_RTL?Object(D.getLTRScrollLeft)(this._scroll):this._scroll.scrollLeft:0},t.prototype.isAtLeft=function(){return this.currentPosition()<=1},t.prototype.isAtRight=function(){return this.currentPosition()+this.state.widthWrap>=this.state.widthContent-1},t.prototype.animateTo=function(e,t){if(void 0===t&&(t=I.dur),this._scroll){D.IS_RTL&&(e=Object(D.getLTRScrollLeftOffset)(this._scroll,e));var n=T.findDOMNode(this._scroll);Object(A.doAnimate)({onStep:function(e,t){n.scrollLeft=Math.round(t)},from:n.scrollLeft,to:Math.round(e), easing:I.easingFunc.easeInOutCubic,duration:t})}},t.prototype.render=function(){var e,t,n,i,a,o=this,r=this.props,s=r.children,l=r.isVisibleScrollbar,c=r.isVisibleFade,d=r.isVisibleButtons,h=r.shouldMeasure,f=this.state,v=f.widthContent,y=f.widthWrap,b=f.isVisibleRightButton,S=f.isVisibleLeftButton;return u.createElement(p,{whitelist:["width"],onMeasure:this._handleResizeWrap,shouldMeasure:h,ref:this._setWrapMeasureRef},u.createElement("div",{className:O.wrap},u.createElement("div",{className:m(O.scrollWrap,(e={},e[O.noScrollBar]=!l,e)),onScroll:this._handleScroll,ref:function(e){return o._scroll=e}},u.createElement(p,{onMeasure:this._handleResizeContent,whitelist:["width"],shouldMeasure:h,ref:this._setContentMeasureRef},u.createElement("div",{className:O.content},s))),c&&u.createElement("div",{className:m(O.fadeLeft,(t={},t[O.isVisible]=S&&v>y,t))}),c&&u.createElement("div",{className:m(O.fadeRight,(n={},n[O.isVisible]=b&&v>y,n))}),d&&u.createElement("div",{className:m(O.scrollLeft,(i={},i[O.isVisible]=S&&v>y,i)),onClick:this._handleScrollLeft},u.createElement("div",{className:O.iconWrap},u.createElement(k.a,{icon:F,className:O.icon}))),d&&u.createElement("div",{className:m(O.scrollRight,(a={},a[O.isVisible]=b&&v>y,a)),onClick:this._handleScrollRight},u.createElement("div",{className:O.iconWrap},u.createElement(k.a,{icon:F,className:O.icon})))))},t.defaultProps={isVisibleScrollbar:!0,shouldMeasure:!0},t}(u.PureComponent),j=n(1090),function(e){e.SymbolSearch="header-toolbar-symbol-search",e.Intervals="header-toolbar-intervals",e.ChartStyles="header-toolbar-chart-styles",e.Compare="header-toolbar-compare",e.Indicators="header-toolbar-indicators",e.StudyTemplates="header-toolbar-study-templates",e.Alerts="header-toolbar-alerts",e.Layouts="header-toolbar-layouts",e.SaveLoad="header-toolbar-save-load",e.UndoRedo="header-toolbar-undo-redo",e.Properties="header-toolbar-properties"}(H||(H={})),z=Object(C.isFeatureEnabled)("hide-copy-readonly"),G=function(e){function t(t,n){var a=e.call(this,t,n)||this;return a._activateSymbolSearchMode=function(){a._setMode(2)},a._activateNormalMode=function(){a._setMode(1)},a._handleInnerMeasure=function(e){var t=a.props.onWidthChange;t&&t(e)},a._processCustoms=function(e){var t=a.props.isFake,n=a.state.mode,o=a.context.tools;return e.map(function(e){return u.createElement(i,{className:m(1!==n&&j.hidden)},u.createElement(o.Custom,c.a({},e,{isFake:t})))})},a.state={mode:1},a}return c.c(t,e),t.prototype.render=function(){var e,t=this.context.tools,n=this.props,s=n.features,l=n.displayMode,c=n.chartSaver,d=n.studyMarket,h=n.readOnly,p=n.templateSyncEmitter,f=n.saveLoadSyncEmitter,v=n.leftCustomButtons,y=n.rightCustomButtons,b=n.showScrollbarWhen,S=n.width,E=void 0===S?0:S,_=n.isFake,g=void 0!==_&&_,w=this.state.mode,C=this._processCustoms(v),M=this._processCustoms(y),W=b.includes(l);return u.createElement("div",{className:m(j.inner,(e={},e[j.fake]=g,e))},u.createElement(P,{isVisibleFade:Modernizr.touch&&W,isVisibleButtons:!Modernizr.touch&&W,isVisibleScrollbar:!1,shouldMeasure:W&&!g },u.createElement(R,{onWidthChange:this._handleInnerMeasure},!h&&u.Children.toArray([t.SymbolSearch&&u.createElement(i,{key:"symbol",className:2===w&&j.symbolSearch},u.createElement(t.SymbolSearch,{id:g?void 0:H.SymbolSearch,isActionsVisible:s.allowSymbolSearchSpread,isExpanded:2===w,onFocus:this._activateSymbolSearchMode,onBlur:this._activateNormalMode,maxWidth:E})),t.DateRange&&u.createElement(i,{key:"range"},u.createElement(t.DateRange,null)),t.Intervals&&1===w&&u.createElement(i,{key:"intervals"},u.createElement(t.Intervals,{id:g?void 0:H.Intervals,isShownQuicks:s.allowFavoriting,isFavoritingAllowed:s.allowFavoriting,displayMode:l,isFake:g})),t.Bars&&1===w&&u.createElement(i,{key:"styles"},u.createElement(t.Bars,{id:g?void 0:H.ChartStyles,isShownQuicks:s.allowFavoriting,isFavoritingAllowed:s.allowFavoriting,displayMode:l,isFake:g})),t.Compare&&1===w&&u.createElement(i,{key:"compare"},u.createElement(t.Compare,{id:g?void 0:H.Compare,className:j.button,displayMode:l})),1===w&&(t.Compare||t.Indicators)&&u.createElement(i,{key:"study"},u.createElement("div",{className:j.subGroup},t.Indicators&&u.createElement(t.Indicators,{id:g?void 0:H.Indicators,className:j.button,studyMarket:d,displayMode:l}),t.Templates&&u.createElement(t.Templates,{id:g?void 0:H.StudyTemplates,isShownQuicks:s.allowFavoriting,isFavoritingAllowed:s.allowFavoriting,displayMode:l,stateSyncEmitter:p,isFake:g}))),1===w&&t.Alert&&u.createElement(i,{key:"alert"},u.createElement(t.Alert,{id:g?void 0:H.Alerts,className:j.button,displayMode:l})),1===w&&t.AlertReferral&&u.createElement(i,{key:"alert-referral"},u.createElement(t.AlertReferral,{className:j.button,displayMode:l})),t.Replay&&1===w&&u.createElement(i,{key:"replay"},u.createElement(t.Replay,{className:j.button,displayMode:l})),t.UndoRedo&&1===w&&u.createElement(i,{key:"undo-redo"},u.createElement(t.UndoRedo,{id:g?void 0:H.UndoRedo})),t.ScalePercentage&&u.createElement(i,{key:"percentage"},u.createElement(t.ScalePercentage,null)),t.ScaleLogarithm&&u.createElement(i,{key:"logarithm"},u.createElement(t.ScaleLogarithm,null))].concat(C)),1===w?r(u.Children.toArray([h&&u.createElement(i,{key:"view-only-badge"},u.createElement(o,null)),u.createElement(i,{key:"gap",className:m(j.fill)}),!h&&t.Layout&&u.createElement(i,{key:"layout"},u.createElement(t.Layout,{id:g?void 0:H.Layouts})),t.SaveLoad&&!(h&&z)&&u.createElement(i,{key:"save-load-right"},u.createElement(t.SaveLoad,{id:g?void 0:H.SaveLoad,chartSaver:c,isReadOnly:h,displayMode:l,isFake:g,stateSyncEmitter:f})),t.SaveLoadReferral&&u.createElement(i,{key:"save-load-referral"},u.createElement(t.SaveLoadReferral,{isReadOnly:h,displayMode:l})),s.showLaunchInPopupButton&&t.OpenPopup&&u.createElement(i,{key:"popup"},u.createElement(t.OpenPopup,{className:m(j.iconButton,j.popupButton)})),t.Screenshot&&s.accentScreenshotButton&&u.createElement(i,{key:"blue-screenshot"},u.createElement(t.Screenshot,{color:"blue",className:j.iconButton})),!h&&t.Properties&&u.createElement(i,{key:"properties"},u.createElement(t.Properties,{id:g?void 0:H.Properties, className:j.iconButton})),!h&&t.Fullscreen&&u.createElement(i,{key:"fullscreen"},u.createElement(t.Fullscreen,null)),t.Screenshot&&!s.accentScreenshotButton&&u.createElement(i,{key:"screenshot"},u.createElement(t.Screenshot,{className:j.iconButton}))].concat(M))):[u.createElement(i,{key:"gap",className:m(j.fill,2===w&&j.minimalPriority)}),u.createElement(i,{key:"symbol-search-close"},u.createElement(a,{className:j.iconButton}))])))},t.prototype._setMode=function(e){this.setState({mode:e})},t.contextTypes={tools:h.object.isRequired},t}(u.PureComponent),Y=n(16),U=n.n(Y),K=n(199),J=function(e){function t(t,n,i){return void 0===i&&(i=[]),e.call(this,t,n,"FAVORITE_CHART_STYLES_CHANGED","StyleWidget.quicks",i)||this}return c.c(t,e),t}(K.b),Q=n(61),q=n(204),X=n.n(q),Z=function(e){function t(t,n,i){return e.call(this,t,n,"FAVORITE_INTERVALS_CHANGED","IntervalWidget.quicks",i)||this}return c.c(t,e),t.prototype._serialize=function(e){return X()(e.map(Q.normalizeIntervalString))},t.prototype._deserialize=function(e){return X()(Object(Q.convertResolutionsFromSettings)(e).filter(Q.isResolutionMultiplierValid).map(Q.normalizeIntervalString))},t}(K.a),ee=n(852),te=n(324),ne=n(844),ie=n(107),ae=n(49),oe=n(198),re=n(1091),n.d(t,"HeaderToolbar",function(){return ue}),se={Area:S.STYLE_AREA,Bars:S.STYLE_BARS,Candles:S.STYLE_CANDLES,"Heiken Ashi":S.STYLE_HEIKEN_ASHI,"Hollow Candles":S.STYLE_HOLLOW_CANDLES,Line:S.STYLE_LINE},le=["1","30","60"],ce=[],de=["full","medium"],ue=function(e){function t(t){var n,i,a,o,r=e.call(this,t)||this;return r._templateSyncEmitter=new v.a,r._saveLoadSyncEmitter=new v.a,r._handleFullWidthChange=function(e){r._fullWidth=e,r.setState({measureValid:!1})},r._handleFavoritesWidthChange=function(e){r._favoritesWidth=e,r.setState({measureValid:!1})},r._handleCollapseWidthChange=function(e){r._collapseWidth=e,r.setState({measureValid:!1})},r._handleMeasure=function(e){var t=e.width;r.setState({availableWidth:t,measureValid:!1})},r._handleEsc=function(){Object(ne.b)()},r._showScrollbarWhen=t.allowedModes.slice(-1),n=t.chartWidgetCollection,i=t.chartChangesWatcher,r._chartChangesWatcher=i,a=s(r.props.defaultFavoriteStyles),r._favoriteChartStylesService=new J(ie.TVXWindowEvents,ae,a),o=l(r.props.defaultFavoriteIntervals),r._favoriteIntervalsService=new Z(ie.TVXWindowEvents,ae,o),r.state={isVisible:!0,availableWidth:0,displayMode:"full",measureValid:!1,leftCustomButtons:[],rightCustomButtons:[]},r._readOnly=n.readOnly(),r._features={accentScreenshotButton:!!r.props.accentScreenshot,allowFavoriting:y.enabled("items_favoriting"),showIdeasButton:!!r.props.ideas,showLaunchInPopupButton:!!r.props.popupButton,allowSymbolSearchSpread:y.enabled("header_symbol_search")&&!y.enabled("charting_library_base"),allowToolbarHiding:y.enabled("collapsible_header")},r._setDisplayMode=g()(r._setDisplayMode,100),r._negotiateResizer(),r}return c.c(t,e),t.prototype.getChildContext=function(){var e=this.props,t=e.tools,n=e.windowMessageService,i=e.chartWidgetCollection,a=e.chartApiInstance,o=e.availableTimeFrames;return{tools:t, isFundamental:e.isFundamental,chartWidgetCollection:i,windowMessageService:n,chartApiInstance:a,availableTimeFrames:o,favoriteStudyTemplatesService:e.favoriteStudyTemplatesService,studyTemplates:e.studyTemplates,saveChartService:e.saveChartService,loadChartService:e.loadChartService,favoriteChartStylesService:this._favoriteChartStylesService,favoriteIntervalsService:this._favoriteIntervalsService,customIntervalsService:this._customIntervalsService,chartChangesWatcher:this._chartChangesWatcher,chartWidget:i.activeChartWidget.value()}},t.prototype.componentDidUpdate=function(e,t){var n=this.state,i=n.isVisible,a=n.measureValid;i!==t.isVisible&&(b.emit("toggle_header",i),this._negotiateResizer()),a||this._setDisplayMode()},t.prototype.render=function(){var e,t=this.props,n=(t.resizerBridge,t.allowedModes),i=c.e(t,["resizerBridge","allowedModes"]),a=this.state,o=a.displayMode,r=a.availableWidth,s=a.isVisible,l=a.leftCustomButtons,d=a.rightCustomButtons,h=c.a({features:this._features,readOnly:this._readOnly,isFake:!1,templateSyncEmitter:this._templateSyncEmitter,saveLoadSyncEmitter:this._saveLoadSyncEmitter,width:r,leftCustomButtons:l,rightCustomButtons:d},i),f=c.a({},h,{isFake:!0,showScrollbarWhen:ce});return u.createElement("div",{className:m(re.toolbar,(e={},e[re.isHidden]=!s,e))},u.createElement("div",{className:re.overflowWrap},u.createElement(p,{onMeasure:this._handleMeasure,whitelist:["width"]},u.createElement(G,c.a({showScrollbarWhen:this._showScrollbarWhen,displayMode:o},h))),n.includes("full")&&u.createElement(G,c.a({displayMode:"full",onWidthChange:this._handleFullWidthChange},f)),n.includes("medium")&&u.createElement(G,c.a({displayMode:"medium",onWidthChange:this._handleFavoritesWidthChange},f)),n.includes("small")&&u.createElement(G,c.a({displayMode:"small",onWidthChange:this._handleCollapseWidthChange},f))),u.createElement(ee.a,{keyCode:te.a.Escape,handler:this._handleEsc}))},t.prototype.addButton=function(e){var t,n,i,a,o,r;return void 0===e&&(e="left"),t=new U.a(0),n=$('