webpackJsonp([1],{1040:function(t,e){t.exports=''},1148:function(t,e){t.exports=''},1149:function(t,e){t.exports=''},1150:function(t,e){t.exports=''},1151:function(t,e){t.exports=''},1152:function(t,e){t.exports=''},1153:function(t,e){t.exports=''},1154:function(t,e){t.exports=''},1155:function(t,e){t.exports=''},1178:function(t,e){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){
for(var e=this;e&&1===e.nodeType;e=e.parentNode)if(e.matches(t))return e;return null})},1179:function(t,e){t.exports=''},1180:function(t,e){t.exports=''},1181:function(t,e){t.exports=''},1182:function(t,e){t.exports=''},1183:function(t,e){t.exports=''},1184:function(t,e){t.exports=''},1185:function(t,e){},814:function(t,e,i){"use strict";(function(t){function s(t,e,i,s){var n,o;this._options=Object.assign({},h,s),this._model=e,this._paneWidget=t,this._chart=t._chart,this.$el=$(document.createElement("div")).addClass("pane-legend"),this._itemsBinding=[],this._mouseEventHandlers=[],this._chart.properties().paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showSeriesTitle.listeners().subscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showSeriesOHLC.listeners().subscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showBarChange.listeners().subscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showOnlyPriceSource.listeners().subscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showStudyValues.listeners().subscribe(this,this.updateLayout),this._model.mainSeries().properties().style.listeners().subscribe(this,this.updateLayout),n=this._chart.properties().scalesProperties.textColor,n.listeners().subscribe(this,function(t){this.$el.css("color",t.value())}),this.$el.css("color",n.value()),o=this._chart.properties().paneProperties.legendProperties.showLegend,o.subscribe(this,this.updateLayout),this.updateLayout()}var n=(i(34).Study,i(39).trackEvent),o=(i(4).getLogger("Chart.LegendWidget"),i(29)),r=i(197).showEditObjectDialog,a=i(38).IS_RTL,l=i(110).MouseEventHandler,h={contextMenuEnabled:!0,sourceSelectionEnabled:!0,symbolMarkerEnabled:!1};s.prototype.destroy=function(){this._removeMouseEventHandlers(),
this._chart.properties().paneProperties.legendProperties.showLegend.unsubscribeAll(this),this._chart.properties().paneProperties.legendProperties.showStudyTitles.listeners().unsubscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showSeriesTitle.listeners().unsubscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showSeriesOHLC.listeners().unsubscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showBarChange.listeners().unsubscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showOnlyPriceSource.listeners().unsubscribe(this,this.updateLayout),this._chart.properties().paneProperties.legendProperties.showStudyValues.listeners().unsubscribe(this,this.updateLayout),this._model.mainSeries().properties().style.listeners().unsubscribe(this,this.updateLayout)},s.prototype.contextMenuEvent=function(t,e){if(!this._model.chartModel().readOnly()&&this._options.contextMenuEnabled){var i=e.source;this._paneWidget.showContextMenuForSource(i,t)}},s.prototype._removeMouseEventHandlers=function(){this._mouseEventHandlers.forEach(function(t){t.destroy()}),this._mouseEventHandlers=[]},s.prototype.updateLayout=function(){var e,s,n,o,r,a,h,d,u,p,c;if(this._removeMouseEventHandlers(),this._itemsBinding.length=0,this.$el.find(".apply-common-tooltip").trigger("mouseleave"),this.$el.empty(),(e=this._paneWidget.state())&&this._model){for(s={showStudyTitles:this._model.model().properties().paneProperties.legendProperties.showStudyTitles.value(),showSeriesTitle:this._chart.properties().paneProperties.legendProperties.showSeriesTitle.value(),showSeriesOHLC:this._chart.properties().paneProperties.legendProperties.showSeriesOHLC.value(),showStudyValues:this._chart.properties().paneProperties.legendProperties.showStudyValues.value(),showLegend:this._model.model().properties().paneProperties.legendProperties.showLegend.value()},n=this._model.mainSeries(),o=e.orderedSources().slice(),r=o.indexOf(n),r>-1&&(o.splice(r,1),o.push(n)),a=o.length-1;a>=0;a--)h=o[a],(d=h.statusView())&&(!(u=h===n)||s.showSeriesTitle||s.showSeriesOHLC||s.showStudyTitles||s.showStudyValues)&&(u&&t.enabled("fundamental_widget")||(s.showLegend||!u?(u||s.showStudyTitles||s.showStudyValues)&&s.showLegend&&(p=$("
").addClass("pane-legend-line pane-legend-wrap"),this._options.sourceSelectionEnabled||p.addClass("legend-selection-disabled"),p.appendTo(this.$el),p.source=h,u?this._chartHasStudies()?(c=$('
').append($(i(1149)).attr({class:"expand"})),p.addClass("main").append(c.on("click touchend",this.toggleTitles.bind(this)))):p.addClass("pane-legend-line--without-child-studies"):p.addClass("study"),h.properties().visible.value()||p.addClass("disabled"),this._generateItemsForRow(p,d,s),this._mouseEventHandlers.push(new l(p,this,!0))):this.$el.find(".expand-line").length||(p=$("
").addClass("pane-legend-line pane-legend-wrap main expand-line"),
this._options.sourceSelectionEnabled||p.addClass("legend-selection-disabled"),p.appendTo(this.$el),this._chartHasStudies()?(c=$('
').append($(i(1148)).attr({class:"expand closed"})),p.append(c.on("click touchend",this.toggleTitles.bind(this)))):p.addClass("pane-legend-line--without-child-studies"),p.source=h,h.properties().visible.value()||p.addClass("disabled"),s={showStudyTitles:!1,showSeriesTitle:s.showSeriesTitle,showSeriesOHLC:s.showSeriesOHLC,showStudyValues:!1},this._generateItemsForRow(p,d,s),this._mouseEventHandlers.push(new l(p,this,!0)),this.update())));this.update()}},s.prototype._chartHasStudies=function(){return this._model.model().allStudies().some(function(t){return t.statusView()})},s.prototype._generateItemsForRow=function(e,s,n){var o,r,l,h,d,u,p,c,_,v,m,g=e.source,b=this,y=g===this._model.mainSeries();if((y&&n.showSeriesTitle||!y&&n.showStudyTitles)&&(r=$("
"),r.addClass("pane-legend-line apply-overflow-tooltip"),this._options.contextMenuEnabled&&!this._chart.readOnly()||r.addClass("no-context-menu"),this._options.sourceSelectionEnabled||r.addClass("legend-selection-disabled"),y&&r.addClass("main"),g.properties().visible.value()||r.addClass("disabled"),r.css({"font-weight":s.bold()?"bold":"normal","font-size":s.size()}),this._options.contextMenuEnabled&&r.click(function(t){b.contextMenuEvent(t,e)}),r.appendTo(e),this._itemsBinding.push({value:s,cell:r,source:e.source}),!this._chart.readOnly()&&g.userEditEnabled()&&t.enabled("edit_buttons_in_legend")&&(o=$(''),a||o.appendTo(e),!y&&t.enabled("show_hide_button_in_legend")&&$('').append($(i(1150)).attr({width:14,height:14})).appendTo(o).on("click touchend",this._generateItemsForRow._onShowhideClick.bind(this,g)),!y&&t.enabled("property_pages")&&t.enabled("format_button_in_legend")&&$('').append($(i(1151)).attr({width:14,height:14})).appendTo(o).on("click touchend",this._generateItemsForRow._onFormatClick.bind(this,g)),!y&&t.enabled("delete_button_in_legend")&&$('').append($(i(1040)).attr({width:14,height:14})).appendTo(o).on("click touchend",this._generateItemsForRow._onDeleteClick.bind(this,g)))),l=g.legendView(),this.isDataWindowValuesVisible(l)&&l.isValuesVisible()){for(h=[],d=[],u=$(''),this._options.contextMenuEnabled||u.addClass("no-context-menu"),this._options.sourceSelectionEnabled||u.addClass("legend-selection-disabled"),p=0;p
").appendTo(u),_=y?$("").appendTo(c):null,v=$("").appendTo(c),y&&(_.addClass("pane-legend-item-value-title__main"),
v.addClass("pane-legend-item-value__main")),g.properties().visible.value()||(v.addClass("disabled"),_&&_.addClass("disabled")),h.push(v),_&&d.push(_);m=$("").appendTo(u.appendTo(e)),this._itemsBinding.push({value:l,cell:h,titleCells:d.length?d:null,source:g,additional:m})}o&&a&&o.appendTo(e)},s.prototype.isDataWindowValuesVisible=function(t){return this._chart.onWidget()?!!t&&!this._chart.isSmall():!!t},s.prototype._generateItemsForRow._onShowhideClick=function(t){this._model.setProperty(t.properties().visible,!t.properties().visible.value(),"Show/Hide "+t.title())},s.prototype._generateItemsForRow._onFormatClick=function(t,e){t.userEditEnabled()&&(TVSettings.setValue("properties_dialog.active_tab.chart",$.t("Style")),r(t,this._model))},s.prototype._generateItemsForRow._onDeleteClick=function(t){t.isUserDeletable()&&(t.hasChildren()?showDeleteStudyTreeConfirm(this._model.removeSource.bind(this._model,t)):this._model.removeSource(t))},s.prototype._generateItemsForRow._onAddChildSourceClick=function(t){var e,i,s=this._chart.showIndicators(t);s&&(e=function(){n("SOS","Apply SOS","Apply by Plus SOS")},i=this._model.model().studyInserted(),i.subscribe(this,e),s.visibilityChanged.subscribe(this,function(t){t||i.unsubscribe(this,e)},!0))},s.prototype._generateItemsForRow._onViewSorceClick=function(t){var e=t.metaInfo();this._getPineSourceCode(e).done(function(t){TradingView.bottomWidgetBar&&TradingView.bottomWidgetBar.activateScriptEditorTab(t)})},s.prototype._getPineSourceCode=function(t){return $.Deferred()},s.prototype.setItemEnabled=function(t,e){var i=!t.hasClass("disabled"),s=t.closest(".pane-legend-wrap");e&&!i?(t.removeClass("disabled"),s.removeClass("disabled")):!e&&i&&(t.addClass("disabled"),s.addClass("disabled"))},s.prototype.valueChanged=function(t,e,i){return t[e]!==i&&(t[e]=i,!0)},s.prototype.firstTitle=function(){return this.$el.find(".pane-legend-line.pane-legend-wrap:first-child")},s.prototype.updateTitle=function(){var e,i,s,n,o,r,a,l,h,d,u,p,c;for(s=this._itemsBinding.length;s--;)i=this._itemsBinding[s],Array.isArray(i.cell)||(i.last||(i.last={}),n=i.last,o=i.source,e=o.properties().visible.value(),this.valueChanged(n,"sourceVisible",e)&&this.setItemEnabled(i.cell,e),r=i.value.color(),a=o!==this._model.mainSeries()&&o===this._model.selectedSource()?"bold":"normal","function"==typeof i.value.getSplitTitle?(u=i.value.getSplitTitle(),l=u[0].trim(),h=u[1].trim(),d=u[2].trim()):(l=i.value.text().trim(),h="",d=""),t.enabled("fundamental_widget")&&(p=this._model.mainSeries(),c=p.symbolInfo(),l=(c?c.name:p.actualSymbol())+" "+l),i.isCellInited||(i.isCellInited=!0,d||h?(i.titleElement=document.createElement("div"),i.titleElement.classList.add("pane-legend-title__container"),i.cell[0].appendChild(i.titleElement),i.descriptionElement=document.createElement("div"),i.descriptionElement.classList.add("pane-legend-title__description"),i.titleElement.appendChild(i.descriptionElement),h&&(i.intervalElement=document.createElement("div"),
i.intervalElement.classList.add("pane-legend-title__interval"),i.titleElement.appendChild(i.intervalElement)),d&&(i.detailsElement=document.createElement("div"),i.detailsElement.classList.add("pane-legend-title__details"),i.titleElement.appendChild(i.detailsElement)),i.titleElement.classList.add("apply-overflow-tooltip","apply-overflow-tooltip--allow-text","apply-overflow-tooltip--check-children")):(i.titleElement=i.cell[0],i.descriptionElement=i.titleElement,i.descriptionElement.classList.add("apply-overflow-tooltip"))),(this.valueChanged(n,"color",r)||this.valueChanged(n,"fontWeight",a))&&(i.titleElement.style.color=r,i.titleElement.style.borderColor=r,i.titleElement.style.fontWeight=a),l!==i.description&&(i.descriptionElement.textContent=TradingView.clean(l,!0),i.description=l),i.intervalElement&&h&&h!==i.interval&&(i.intervalElement.textContent=TradingView.clean(h,!0),i.interval=h),i.detailsElement&&d&&d!==i.details&&(i.detailsElement.textContent=TradingView.clean(d,!0),i.details=d));this._chart.resizeIndicator()},s.prototype.update=function(t){var e,i,s,n,r,a,l,h,d,u,p;for(this.updateTitle(),h=this._itemsBinding.length;h--;)if(n=this._itemsBinding[h],e=n.cell,i=n.titleCells,s=n.source.properties().visible.value(),Array.isArray(e))for(n.last||(n.last={},n.last.dwView||(n.last.dwView={})),d=n.last,r=n.value.items(),u=this.valueChanged(d,"sourceVisible",s),a=0;a'),this._initVisibility(),this.update(),this.jqDiv.appendTo(i)}var n=i(976);s.prototype.update=function(){var t,e,s,n,o,r,a,l=this._paneWidget.state();if(l){if(!this._visible||!this._chart.isActive())return void this.jqDiv[0].classList.add("pane-controls--hidden");if(this.jqDiv[0].classList.remove("pane-controls--hidden"),t=this,
e=t._model,s=e.panes().indexOf(l),this.jqDiv.toggleClass("toppane",0===s||this._chart.isMaximizedPane()),n=!1,!l.containsMainSeries()&&!this._chart.isMaximizedPane()){for(o=0,r=l.dataSources(),a=r.length;a--;)if(r[a]instanceof TradingView.Study&&++o>1){n=!0;break}r=null}s>0&&!this._chart.isMaximizedPane()?(this._$upButton||(this._$upButton=$(document.createElement("a")).addClass("pane-legend-icon up").append($(i(1152)).attr({width:14,height:14})).attr("title",$.t("Move Up")).on("click",function(){t._model.rearrangePanes(t._chart,t._model.panes().indexOf(t._paneWidget.state()),"up")})),this._$upButton.appendTo(this.jqDiv)):this._$upButton&&this._$upButton.detach(),s1&&!this._chart.isMaximizedPane()?(this._$maximizeButton||(this._$maximizeButton=$(document.createElement("a")).addClass("pane-legend-icon maximize").append($(i(1154)).attr({width:14,height:14})).attr("title",$.t("Toggle Maximize Pane")).on("click",function(){t._chart.toggleMaximizePane(t._paneWidget)})),this._$maximizeButton.appendTo(this.jqDiv)):this._$maximizeButton&&this._$maximizeButton.detach(),this._model.panes().length>1&&this._chart.isMaximizedPane()?(this._$restoreButton||(this._$restoreButton=$(document.createElement("a")).addClass("pane-legend-icon restore").append($(i(1155)).attr({width:14,height:14})).attr("title",$.t("Toggle Maximize Pane")).on("click",function(){t._chart.toggleMaximizePane(t._paneWidget)})),this._$restoreButton.appendTo(this.jqDiv)):this._$restoreButton&&this._$restoreButton.detach()}},s.prototype.destroy=function(){this._visibilityProperty&&(this._visibilityProperty.unsubscribe(this,this._onVisibilityPropertyChange),this._visibilityProperty=null),this._boundMouseHandler&&(this._mainDiv[0].removeEventListener("mouseenter",this._boundMouseHandler,!1),this._mainDiv[0].removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null),this.jqDiv.remove()},s.prototype._initVisibility=function(){this._visible=!0,this._visibilityProperty=n.actualBehavior(),this._visibilityProperty.subscribe(this,this._onVisibilityPropertyChange),this._onVisibilityPropertyChange()},s.prototype._onVisibilityPropertyChange=function(){var t=this._visibilityProperty.value()
;"alwaysOn"===t||"alwaysOff"===t?(this._visible="alwaysOn"===t,this._boundMouseHandler&&(this._mainDiv[0].removeEventListener("mouseenter",this._boundMouseHandler),this._mainDiv[0].removeEventListener("mouseleave",this._boundMouseHandler),this._boundMouseHandler=null)):(this._boundMouseHandler||(this._boundMouseHandler=this._visibilityMouseHandler.bind(this),this._mainDiv[0].addEventListener("mouseenter",this._boundMouseHandler),this._mainDiv[0].addEventListener("mouseleave",this._boundMouseHandler)),this._visible=!1),this.update()},s.prototype._visibilityMouseHandler=function(t){this._visible="mouseenter"===t.type,this.update()},t.exports=s},817:function(t,e,i){"use strict";var s,n,o,r,a,l,h,d,u,p,c,_,v,m,g,b,y,w,f,M,B,C,S,x,T;Object.defineProperty(e,"__esModule",{value:!0}),i.d(e,"ControlBarNavigation",function(){return T}),i(11),s=i(1178),i.n(s),n=i(976),o=i(38),r=i(202),a=i(29),l=i(306),h=i(71),i.n(h),i(39),d=i(873),i.n(d),u=i(1179),i.n(u),p=i(1180),i.n(p),c=i(1181),i.n(c),_=i(973),i.n(_),v=i(1182),i.n(v),m=i(1183),i.n(m),g=i(1184),i.n(g),b=i(1185),i.n(b),w=Object(l.b)({keys:["Alt","R"],text:"{0} + {1}"}),f=Object(l.b)({keys:[m],text:"{0}"}),M=Object(l.b)({keys:[g],text:"{0}"}),B='\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t'+u+'\n\t\t\t
\n\t\t\t
\n\t\t\t\t'+c+'\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t'+d+'\n\t\t\t
\n\t\t\t
\n\t\t\t\t'+_+'\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t'+p+"\n\t\t
\n\t
\n
",C='\n\t'+v+"\n
",y={},y.moving="wait_finishing",y.wait_finishing="stop",y.stop="moving",S=y,x="control-bar__btn--btn-hidden",T=function(){function t(t,e){this._back=null,this._backButtonVisible=!1,this._boundKeydownHandler=null,this._boundKeyupHandler=null,this._boundMouseHandler=null,this._chartBackgroundProperty=null,this._chartModel=null,this._checkIntervalId=0,this._controlBar=null,this._controlBarVisible=!1,this._currentDistance=0,this._deferredFinishTimeout=0,this._finishingTimeout=0,this._moveType="",
this._movingTimeout=0,this._pressedKey=[],this._priceAxisChanged=null,this._resetAvailabilityChanged=null,this._priceAxisName="",this._rafId=0,this._startTime=0,this._state="stop",this._visibilityTypeProperty=null,this._widget=null,this._btnGroups=null,this._chart=t,this._parent=e,this._init(),this._initHandlers()}return t.prototype.destroy=function(){null!==this._visibilityTypeProperty&&(this._visibilityTypeProperty.unsubscribe(this,this._onVisibilityTypeChange),this._visibilityTypeProperty=null),null!==this._boundMouseHandler&&(this._parent.removeEventListener("mousemove",this._boundMouseHandler,!1),this._parent.removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null),null!==this._boundKeydownHandler&&(this._parent.ownerDocument.removeEventListener("keydown",this._boundKeydownHandler),this._boundKeydownHandler=null),null!==this._boundKeyupHandler&&(this._parent.ownerDocument.removeEventListener("keyup",this._boundKeyupHandler),this._boundKeyupHandler=null),clearTimeout(this._movingTimeout),null!==this._priceAxisChanged&&(this._priceAxisChanged.unsubscribe(this,this._updateBackBtnPosition),this._priceAxisChanged=null),null!==this._chartBackgroundProperty&&(clearInterval(this._checkIntervalId),this._chartBackgroundProperty.unsubscribe(this,this._updateBgBarStyle),this._chartBackgroundProperty=null),null!==this._resetAvailabilityChanged&&(this._resetAvailabilityChanged.unsubscribe(this,this._updateResetScalesButtonVisibility),this._resetAvailabilityChanged=null),this._chart=null},t.prototype.updatePosition=function(t){null!==this._widget&&null!==this._controlBar&&this._updateBtnGroupVisibility(t)},t.prototype._init=function(){var t,e,i,s=this;if(this._widget=Object(r.a)(B).querySelector(".control-bar-wrapper"),this._back=Object(r.a)(C).querySelector(".control-bar__btn--back-present"),this._controlBar=this._widget.querySelector(".control-bar"),this._btnGroups=Array.from(this._controlBar.querySelectorAll(".js-btn-group")),h.CheckMobile.any())for(t=0,e=this._btnGroups;t=i.left-100&&t.clientX<=i.right+100&&t.clientY>=i.top-100&&t.clientY<=i.bottom+100),this._controlBarVisible!==e&&(this._controlBarVisible=e,null!==this._controlBar&&null===this._rafId&&(this._rafId=this._controlBar.ownerDocument.defaultView.requestAnimationFrame(this._updateControlBarVisibility.bind(this)))))},t.prototype._updateControlBarVisibility=function(){this._rafId=null,null!==this._controlBar&&this._controlBar.classList.toggle("control-bar--hidden",!this._controlBarVisible)},t.prototype._updateBackBtnPosition=function(){if("left"===this._priceAxisName||"right"===this._priceAxisName){var t=this._chart.getPriceAxisMaxWidthByName(this._priceAxisName)+14;t&&null!==this._back&&(this._back.style.marginRight=t+"px")}},t.prototype._updateBgBarStyle=function(){var t,e,i,s;if(null!==this._chartModel){for(t=Object(a.getLuminance)(this._chartModel.model().properties().paneProperties.background.value())<.5,e=0,i=Object.values(this._buttons);e0?86*e.length:50,this._widget.style.left="calc(50% - "+Math.ceil(t/2)+"px)")},t.prototype._updateResetScalesButtonVisibility=function(){if(null!==this._chartModel){var t=this._chartModel.model().isScalesResetAvailable();this._buttons.turn.classList.toggle(x,!t)}},t.prototype._move=function(t){var e,i,s,n=this;null!==this._chartModel&&"stop"===this._state&&this._chartModel.beginUndoMacro(1===t?"Move Left":"Move Right"),this._state=S.stop,this._moveType="animated",this._deferredFinishTimeout&&(clearTimeout(this._deferredFinishTimeout),this._deferredFinishTimeout=0),this._finishingTimeout&&(clearTimeout(this._finishingTimeout),this._finishingTimeout=0),this._startTime=Date.now(),0===this._movingTimeout&&(e=this._startTime,i=10,s=function(){n._moveStep(e,0,50*t,1e3),n._movingTimeout=setTimeout(s.bind(n),i)},this._movingTimeout=setTimeout(s.bind(this),i))},t.prototype._moveStep=function(t,e,i,s){var n,o,r;return null===this._chartModel||this._chartModel.timeScale().isEmpty()?void 0:(n=Date.now(),n1||!isFinite(o))&&(o=1),r=1-Math.pow(1-o,3),this._currentDistance=(i-e)*r+e,
this._chartModel.scrollChart(this._currentDistance),o)},t.prototype._finishMove=function(){var t,e,i,s=this;clearTimeout(this._movingTimeout),this._movingTimeout=0,this._deferredFinishTimeout=0,t=this._currentDistance,e=Date.now(),i=function(){var n=s._moveStep(e,t,0,700);n&&n<1?s._finishingTimeout=setTimeout(i.bind(s),10):null!==s._chartModel&&(s._state=S.wait_finishing,s._moveType="",s._movingTimeout=0,s._currentDistance=0,s._chartModel.endUndoMacro())},this._finishingTimeout=setTimeout(i.bind(this),10)},t.prototype._stopMove=function(){"moving"===this._state&&(this._state=S.moving,Date.now()-this._startTime<200?this._deferredFinishTimeout=setTimeout(this._finishMove.bind(this),200-(Date.now()-this._startTime)):this._finishMove())},t.prototype._moveByBar=function(t){var e,i,s,n,o,r,a=this;if(null!==this._chartModel){if(e=this._chartModel.timeScale(),e.isEmpty())return;"stop"===this._state&&this._chartModel.beginUndoMacro(1===t?"Move Left":"Move Right"),null!==e.visibleBars()&&(i=e.indexToCoordinate(e.visibleBars().lastBar())+e.barSpacing()/2,Math.abs(e.width()-i)>e.barSpacing()/6&&this._chartModel.scrollChart(e.width()-i)),this._state=S.stop,this._moveType="by_bar",this._startTime=Date.now(),this._movingTimeout||(s=0,n=150,o=400,r=function(){a._moveByBarStep(t),s++,n>100&&(n-=s/5*20),a._movingTimeout=setTimeout(r,n)},this._movingTimeout=setTimeout(r,o),this._moveByBarStep(t))}},t.prototype._moveByBarStep=function(t){if(null!==this._chartModel){if(this._chartModel.timeScale().isEmpty())return;this._chartModel.scrollChartByBar(t)}},t.prototype._stopMoveByBar=function(){"moving"===this._state&&(clearTimeout(this._movingTimeout),this._movingTimeout=0,this._state=S.wait_finishing,this._moveType="",this._movingTimeout=0,this._currentDistance=0,null!==this._chartModel&&this._chartModel.endUndoMacro())},t.prototype._keydownHandler=function(t){var e,i;t.metaKey||37!==(e=t.which)&&39!==e||this._pressedKey[e]||(this._pressedKey[e]=!0,t.target.closest("input, textarea")||(i=37===e?1:-1,t.ctrlKey||t.altKey?this._move(i):this._moveByBar(i),t.preventDefault()))},t.prototype._keyupHandler=function(t){var e=t.which;37!==e&&39!==e||t.target.closest("input, textarea")||(this._pressedKey[t.which]=!1,"by_bar"===this._moveType?this._stopMoveByBar():this._stopMove())},t.prototype._trackEvent=function(t){},t}()},873:function(t,e){t.exports=''},973:function(t,e){t.exports=''},976:function(t,e,i){"use strict";function s(t){return"alwaysOn"===t||"alwaysOff"===t?t:"visibleOnMouseOver"}function n(){if(!u){var t="NavigationButtons.visibility";u=new h.a,u.setValue(s(d.getValue(t))),u.subscribe(u,function(e){d.setValue(t,s(e.value()))})}return u}function o(){
return[{value:"visibleOnMouseOver",title:window.t("Visible on Mouse Over")},{value:"alwaysOn",title:window.t("Always Visible")},{value:"alwaysOff",title:window.t("Always Invisible")}]}function r(){var t,e;return p||(p=new h.a,t=n(),e=function(){var e=t.value();"alwaysOn"!==e&&"alwaysOff"!==e&&(e=Modernizr.touch?"alwaysOn":"visibleOnMouseOver"),p&&p.setValue(e)},t.subscribe(p,e),e()),p}var a,l,h,d,u,p;Object.defineProperty(e,"__esModule",{value:!0}),e.property=n,e.availableValues=o,e.actualBehavior=r,i(11),a=i(127),i.n(a),l=i(13),h=i.n(l),d=i(49),i.n(d)}});