(m(e)||(d=Array.isArray(e)))?(d?(d=!1,c=c&&Array.isArray(c)?c:[]):c=c&&m(c)?c:{},f[b]=k(l,c,e)):void0!==e&&(f[b]=e));returnf}functiong(a){d.widget.prototype[a]=function(b){console.warn("Method `"+a+"` is obsolete. Please use `chart."+a+"()` subscription method instead.")}}if(!window.TradingView){varn={mobile:{disabledFeatures:"left_toolbar header_widget timeframes_toolbar edit_buttons_in_legend context_menus control_bar border_around_the_chart".split(" "),enabledFeatures:[]}},d={BARS:0,CANDLES:1,
LINE:2,AREA:3,HEIKEN_ASHI:8,HOLLOW_CANDLES:9,version:function(){return"1.11 (internal id 18168320 @ 2017-10-20 04:31:58.628107)"},gEl:function(a){returndocument.getElementById(a)},gId:function(){return"tradingview_"+(1048576*(1+Math.random())|0).toString(16).substring(1)},onready:function(a){window.addEventListener?window.addEventListener("DOMContentLoaded",a,!1):window.attachEvent("onload",a)},css:function(a){varb=document.getElementsByTagName("head")[0],c=document.createElement("style");c.type=
LINE:2,AREA:3,HEIKEN_ASHI:8,HOLLOW_CANDLES:9,version:function(){return"1.11 (internal id fe319232 @ 2017-11-14 03:44:26.632703)"},gEl:function(a){returndocument.getElementById(a)},gId:function(){return"tradingview_"+(1048576*(1+Math.random())|0).toString(16).substring(1)},onready:function(a){window.addEventListener?window.addEventListener("DOMContentLoaded",a,!1):window.attachEvent("onload",a)},css:function(a){varb=document.getElementsByTagName("head")[0],c=document.createElement("style");c.type=
"text/css";c.styleSheet?c.styleSheet.cssText=a:(a=document.createTextNode(a),c.appendChild(a));b.appendChild(c)},bindEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},unbindEvent:function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},widget:function(a){this.id=d.gId();if(!a.datafeed)throwError("Datafeed is not defined");varb={width:800,height:500,symbol:"AA",interval:"D",timeframe:null,
ga("set","anonymizeIp",!0),ga("set",{hostname:e,page:e,referrer:e}),ga("send","pageview")}}),function(){vart=!0;window.parent[urlParams.uid].datafeed.onReady(function(e){t&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,V.resolve()}),t=!1}(),window.getFunctionFromArguments=function(t){returnwindow.parent[urlParams.uid][t]},window.createShortcutAction=function(){vart={};returnfunction(e,i){void0===t[e]&&(t[e]=newa({shortcut:e})),t[e].callbacks().subscribe(null,i)}}(),window.addCustomCSSFile=function(t){vare=document.createElement("link");document.getElementsByTagName("head")[0].appendChild(e),e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",t)},urlParams.customCSS&&window.addCustomCSSFile(urlParams.customCSS),window._initializationFinished=function(){P.clearStack()},window.resizeWindow=function(){$(window).resize()},window.createButton=function(){vart=null;returnfunction(e){vari,o,n,s;returne=e||{},i=e.align||"left",o=window.headerWidget,n=o.createGroup("",{single:!0}),s=$('<div class="button"></div>').appendTo(n),t&&clearTimeout(t),t=setTimeout(function(){window.resizeWindow(),clearTimeout(t)},5),setTimeout(function(){o.addButton(n,"left"===i)}),s}}()}).call(e,i(3))},function(t,e,i){(function(t){"use strict";functiono(t,e){r.call(this,t,e),this._linetool=t,this._pointIndex=e,this._text="",this._coordinate=0,this._background="#5592C9",this._activeBackground="#0F6DBF",this._borderColor="#2E84A6",this._color="white",this._invalidated=!0,this._model=t._model}functionn(t,e){l.call(this),this._linetool=t,this._pointindex=e,this._model=t._model,this._text="",this._coordinate=0,this._background="#5592C9",this._activeBackground="#0F6DBF",this._borderColor="#2E84A6",this._color="white",this._visible=!1,this._invalidated=!0}functions(t,e,i){varo,r,a;if(c.call(this),this._model=t,this._properties=i,this._pointAdded=neww,this._pointChanged=neww,i.visible&&i.frozen||this._properties.merge(defaults("linetool")),o=defaults("linetoolvisibilities"),i.intervalsVisibilities)for(rino.intervalsVisibilities)this._properties.intervalsVisibilities[r]||this._properties.intervalsVisibilities.addProperty(r,o.intervalsVisibilities[r]);elsethis._properties.merge(o);if($.isArray(e)?this._paneViews=e:this._paneViews=[e],this._points=[],this._fixedPoints=[],this._timePoint=[],this._properties.symbol||this._properties.merge({symbol:t.mainSeries().symbol()}),this._properties.interval||this._properties.merge({interval:t.mainSeries().interval()}),this._properties.addExclusion&&(this._properties.addExclusion("symbol"),this._properties.addExclusion("symbolInfo"),this._properties.addExclusion("points"),this._properties.addExclusion("interval"),this._properties.addExclusion("visible"),this._properties.addExclusion("lastUpdateTime")),this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,s.prototype.calcIsActualSymbol),
;returnTradingView.isNaN(o)?t:o}}functionc(){returnfunction(t){for(vare=t,i=t.replace(/[^\u0000-\u007F]/,"");i.length!==e.length;)e=i,i=e.replace(/[^\u0000-\u007F]/,"");returni}}functiond(t){returnfunction(e){return0===e.length?t:e}}functionp(t,e,i,o,s,r){n.call(this,t,e,o,s,r),this._transformFunction=i,this._attachToControl(t,o)}functionu(t,e,i,o,n){p.call(this,t,e,h(e.value()),i,o,n),this.addFormatter(function(t){return(newV).format(t)})}function_(t,e,i,o,s,r){this._subControlIds=e,n.call(this,t,i,o,s,r),this._forEachSubControl(function(t){this._attachToControl(t,o)})}functionf(t,e,i,o,s,r,a){this._model=o,this._mainSeries=r,this._toIntTransformer=l(a),this._disabled=!1,n.call(this,t,e,i,o,s);varh=this;i&&t.change(function(){h.setValueToProperty(h.value())}),this._mainSeries.onBarReceived().subscribe(this,function(t){h.setValue(this.property().value())})}functionm(t,e,i,o,s){n.call(this,t,e,i,o,s),i&&t.on("accept-symbol",function(t,e){this.setValueToProperty(e)}.bind(this))}functiong(t,e,i,o,s,r,a,l){n.call(this,t,e,o,s,r),this._transformFunction=i,this._propertyChangedHook=l,this._setter=a;varh=this;o&&t.change(function(){h._setter?h._setter.call(h,h.value()):h.setValueToProperty(h.value())})}functionv(t,e){n.call(this,t,e)}functiony(t,e,i,o,s,r){if(!t.is(":checkbox, :radio"))returnneww(t,e,i,o,s);n.call(this,t,e,i,o,s),this._setter=r;vara=this;i&&t.change(function(){a._setter?a._setter.call(a,a.value()):a.setValueToProperty(a.value())})}functionb(t,e,i,o,s,r){n.call(this,t,e,i,o,s),this._inverted=!0===r}functionw(t,e,i,o,s){n.call(this,t,e,i,o,s);varr=this;i&&t.click(function(){vart=$(this).toggleClass("active").hasClass("active");r.setValueToProperty(t)})}functionS(t,e,i,o,s){if(!i)returnvoidN.logDebug("ActionBinder: Missed undo model");n.call(this,t,e,!0,i,o),s?t.callbacks().subscribe(this,s):t.callbacks().subscribe(this,S.prototype.onActionCallback)}functionT(t,e,i,o,s,r){vara,l;a=t.is("input")?t:t.find("input"),n.call(this,a,e,i,o,s),this._transparencyProperty=r,this.applyOldTransparency(),l=this,i&&a.change(function(){l.setValueToProperty(l.value())})}functionC(e,i,o,s,r,a){functionl(t,e){vari=c.control().slider("option","min"),o=c.control().slider("option","max"),n=c._property.value();(i<=n&&n<=o||i<e.value&&e.value<o)&&c.setValueToProperty(e.value)}functionh(t,e){c.setValueToProperty(e.value)}isNumber(i.value())||(N.logWarn("Property cannot be binded to control, bad value (expect number): "+i.value()),i=newt),n.call(this,e,i,o,s,r);varc=this;o&&(a?(e.bind("slidechange",l),e.bind("slide",l)):(e.bind("slidechange",h),e.bind("slide",h))),e.bind("slidestart",function(t,e){s.beginUndoMacro(r)}),e.bind("slidestop",function(t,e){s.endUndoMacro()})}functionx(t,e,i,o,n,s){y.call(this,t,e,o,n,s),this._intervalProperty=i,this._intervalProperty.listeners().subscribe(this,this.onIntervalChanged),this.onIntervalChanged()}functionP(t,e,i,o){this._control=t,this._wv=e,this._transformFunction=i,this._undoText=o,this._attachToControl(this._control),
s.color?console.log("%c"+l,"color: "+s.color):console.log(l);break;caseu.WARNING:console.warn(l);break;caseu.ERROR:console.error(l)}w=e,S=s.id,T&&clearTimeout(T),T=setTimeout(function(){w=null,S=null,T=NaN},1e3)}}functionc(t,e){functioni(t){returnfunction(e){returnh(t,e,o,n)}}varo,n;returnvoid0===e&&(e={}),o=[],y.push(o),n=Object.assign(e,{id:t}),{logDebug:i(u.DEBUG),logError:i(u.ERROR),logInfo:i(u.INFO),logNormal:i(u.NORMAL),logWarn:i(u.WARNING)}}vard,p,u,_,f,m,g,v,y,b,w,S,T,C,x,P;Object.defineProperty(e,"__esModule",{value:!0}),d=i(69),p="undefined"!=typeofTradingView?TradingView:{},function(t){t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO",t[t.NORMAL=4]="NORMAL",t[t.DEBUG=5]="DEBUG"}(u=e.LOGLEVEL||(e.LOGLEVEL={})),_=0,f=u.INFO,m=75497472,g="loglevel",v="logHighRate",y=[],b=null,w=null,S=null,T=NaN,C=void0,x=void0,e.getLogLevel=o,e.isHighRateEnabled=n,e.setLogLevel=s,e.getLogHistory=l,e.getLogger=c,P=c("logger"),e.loggingOn=window.lon=p.loggingOn=function(t,e){s(u.DEBUG),P.logNormal("Debug logging enabled"),x=t,d.setValue(v,t),b=e||null},e.loggingNormal=p.loggingNormal=function(){s(u.NORMAL),P.logNormal("Logging set to normal level")},e.loggingOff=window.loff=function(){s(f),P.logInfo("Debug logging disabled")}},function(t,e,i){"use strict";functiono(){return$('<div class="linewidth-slider">').slider({max:4,min:1,step:1})}Object.defineProperty(e,"__esModule",{value:!0}),i(17),e.createLineWidthEditor=o},function(t,e,i){"use strict";functiono(t,e,i){varo,n,r,l,h;if(e=e||0,!s(t))returni?a.rgbaToString(a.rgba(a.parseRgb(t),a.normalizeAlphaComponent(1-e/100))):t;if(e<0&&e>100)throwError("invalid transparency");returno=a.parseRgb(t),n=o[0],r=o[1],l=o[2],h=a.normalizeAlphaComponent(1-e/100),a.rgbaToString([n,r,l,h])}functionn(t){returns(t)?t:a.rgbaToString(a.rgba(a.parseRgb(t),a.normalizeAlphaComponent(1)))}functions(t){return0===t.indexOf("#")}functionr(t){vare=a.parseRgb(t).map(function(t){returnt/=255,t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return+(.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3)}Object.defineProperty(e,"__esModule",{value:!0});vara=i(36);e.generateColor=o,e.resetTransparency=n,e.isHexColor=s,e.getLuminance=r},function(t,e,i){(function(t){"use strict";functione(){this._listeners=[]}e.prototype.subscribe=function(t,e,i){varo={object:t,member:e,singleshot:!!i};this._listeners.push(o)},e.prototype.unsubscribe=function(t,e){vari,o;for(i=0;i<this._listeners.length;++i)if(o=this._listeners[i],o.object===t&&o.member.prototype===e.prototype){this._listeners.splice(i,1);break}},e.prototype.unsubscribeAll=function(t){vare,i;for(e=this._listeners.length-1;e>=0;--e)i=this._listeners[e],i.object===t&&this._listeners.splice(e,1)},e.prototype.fire=function(){vart,e,i=this._listeners.slice();for(t=0;t<i.length;++t)e=i[t],e.member.apply(e.object||null,arguments);for(t=this._listeners.length-1;t>=0;t--)this._listeners[t].singleshot&&this._listeners.splice(t,1)},"undefined"!=typeofwindow&&(window.Delegate=e),void0!==t&&t&&t.exports&&(t.exports=e)
s.color?console.log("%c"+l,"color: "+s.color):console.log(l);break;caseu.WARNING:console.warn(l);break;caseu.ERROR:console.error(l)}w=e,S=s.id,T&&clearTimeout(T),T=setTimeout(function(){w=null,S=null,T=NaN},1e3)}}functionc(t,e){functioni(t){returnfunction(e){returnh(t,e,o,n)}}varo,n;returnvoid0===e&&(e={}),o=[],y.push(o),n=Object.assign(e,{id:t}),{logDebug:i(u.DEBUG),logError:i(u.ERROR),logInfo:i(u.INFO),logNormal:i(u.NORMAL),logWarn:i(u.WARNING)}}vard,p,u,_,f,m,g,v,y,b,w,S,T,C,x,P;Object.defineProperty(e,"__esModule",{value:!0}),d=i(69),p="undefined"!=typeofTradingView?TradingView:{},function(t){t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO",t[t.NORMAL=4]="NORMAL",t[t.DEBUG=5]="DEBUG"}(u=e.LOGLEVEL||(e.LOGLEVEL={})),_=0,f=u.INFO,m=75497472,g="loglevel",v="logHighRate",y=[],b=null,w=null,S=null,T=NaN,C=void0,x=void0,e.getLogLevel=o,e.isHighRateEnabled=n,e.setLogLevel=s,e.getLogHistory=l,e.getLogger=c,P=c("logger"),e.loggingOn=window.lon=p.loggingOn=function(t,e){s(u.DEBUG),P.logNormal("Debug logging enabled"),x=t,d.setValue(v,t),b=e||null},e.loggingNormal=p.loggingNormal=function(){s(u.NORMAL),P.logNormal("Logging set to normal level")},e.loggingOff=window.loff=function(){s(f),P.logInfo("Debug logging disabled")}},function(t,e,i){"use strict";functiono(){return$('<div class="linewidth-slider">').slider({max:4,min:1,step:1})}Object.defineProperty(e,"__esModule",{value:!0}),i(17),e.createLineWidthEditor=o},function(t,e,i){"use strict";functiono(t,e,i){varo,n,r,l,h;if(e=e||0,!s(t))returni?a.rgbaToString(a.rgba(a.parseRgb(t),a.normalizeAlphaComponent(1-e/100))):t;if(e<0&&e>100)throwError("invalid transparency");returno=a.parseRgb(t),n=o[0],r=o[1],l=o[2],h=a.normalizeAlphaComponent(1-e/100),a.rgbaToString([n,r,l,h])}functionn(t){returns(t)?t:a.rgbaToString(a.rgba(a.parseRgb(t),a.normalizeAlphaComponent(1)))}functions(t){return0===t.indexOf("#")}functionr(t){vare=a.parseRgb(t).map(function(t){returnt/=255,t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return+(.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3)}Object.defineProperty(e,"__esModule",{value:!0});vara=i(37);e.generateColor=o,e.resetTransparency=n,e.isHexColor=s,e.getLuminance=r},function(t,e,i){(function(t){"use strict";functione(){this._listeners=[]}e.prototype.subscribe=function(t,e,i){varo={object:t,member:e,singleshot:!!i};this._listeners.push(o)},e.prototype.unsubscribe=function(t,e){vari,o;for(i=0;i<this._listeners.length;++i)if(o=this._listeners[i],o.object===t&&o.member.prototype===e.prototype){this._listeners.splice(i,1);break}},e.prototype.unsubscribeAll=function(t){vare,i;for(e=this._listeners.length-1;e>=0;--e)i=this._listeners[e],i.object===t&&this._listeners.splice(e,1)},e.prototype.fire=function(){vart,e,i=this._listeners.slice();for(t=0;t<i.length;++t)e=i[t],e.member.apply(e.object||null,arguments);for(t=this._listeners.length-1;t>=0;t--)this._listeners[t].singleshot&&this._listeners.splice(t,1)},"undefined"!=typeofwindow&&(window.Delegate=e),void0!==t&&t&&t.exports&&(t.exports=e)
varr,a,l,h,c,d,p=i(80);if(lt.versionOf(t)<1)throwError("This function cannot work with metainfo of the old format version. Required format version >= 1");returnr=TradingView.clone(defaults("study")),g(r,t),a=TradingView.clone(defaults("study_"+t.id,s)),t.isTVScript&&t.TVScriptSourceCode!==a.TVScriptSourceCode&&(a=TradingView.clone(TradingView.factoryDefaults("study_"+t.id,s))),TradingView.merge(r,a),o&&(ct(!(oinstanceofe),"propsState should not be an instance of Property"),TradingView.merge(r,o)),l=v(t),h={},p.mergeInputs(h,l.defaults.inputs),p.mergeInputsObjPart(h,r.inputs),p.mergeInputsArrPart(h,l.inputs),r.inputs=h,deletel.inputs,deletel.defaults.inputs,c={},TradingView.merge(c,l.defaults),TradingView.merge(c,TradingView.factoryDefaults("study_"+l.id)),TradingView.merge(c,r),TradingView.merge(c,l),deletec.defaults,r=c,d=y(n,t),TradingView.merge(r,b(r,d)),o&&TradingView.merge(r.styles,o.styles),r}function_(t,e,o,n,s){varr,a,l,h,c,d,p=i(80),u=lt.versionOf(t);returnt.version&&o.version&&t.version!==o.version&&dt.logWarn("Serialized metaInfo version "+t.version+" is not equal to the saved state version "+o.version),r=TradingView.clone(defaults("study")),0===u?(TradingView.merge(r,TradingView.clone(t)),a=v(t),TradingView.merge(r.inputs,a.inputs)):u>=1&&TradingView.merge(r,TradingView.clone(t.defaults)),TradingView.merge(r,TradingView.factoryDefaults("study_"+t.id)),g(r,t),TradingView.merge(r,o),u>=1&&(TradingView.merge(r,TradingView.clone(t)),deleter.defaults),r=s.updateStudyState(r,t,e),l=e||t,l&<.versionOf(l)>=1&&(l=v(l),h={},p.mergeInputs(h,l.defaults.inputs),p.mergeInputs(h,r.inputs),p.mergeInputsArrPart(h,l.inputs),r.inputs=h,deletel.inputs,deletel.defaults.inputs,c={},TradingView.merge(c,l.defaults),TradingView.merge(c,TradingView.factoryDefaults("study_"+l.id)),TradingView.merge(c,r),TradingView.merge(c,l),deletec.defaults,r=c),d=y(n,l),TradingView.merge(r,b(r,d)),r}functionf(t){vare=JSON.stringify(t);returne=e.replace(/'/g,"\\'")}functionm(t,e){vari,o,n,s,r,a={};if(e.isTVScript)i=e.defaults.inputs.text,a.text=TVScript.patchILTemplate(i,e,t);elsefor(o=Object.keys(t),n=o.length-1;n>=0;n--)s=o[n],(r=t[s]?t[s].id:null)&&t[r]&&(a[r]=t[r]);returnf(a)}functiong(t,e){vari,o,n,s;if(e.plots)for(i=0;i<e.plots.length;i++)o=e.plots[i].id,(n=e.plots[i].type)!==ht.PlotTypes.COLORER&&(s=a(),n===ht.PlotTypes.COLORER&&(s.transparency=0),s.plottype=n,s.title=o,t.styles&&oint.styles&&TradingView.merge(s,t.styles[o]),t.styles[o]=s)}functionv(t){vare,i,o=TradingView.clone(t);if(o.inputs={},t.inputs)for(e=0;e<t.inputs.length;e++)i=t.inputs[e].id,o.inputs[i]=t.inputs[e].defval,o.inputs[e]=t.inputs[e];returno}functiony(t,e){vari,o,n,s,r=0;if(t)for(i=0;i<t.dataSources().length;i++)o=t.dataSources()[i],o.metaInfo&&o.metaInfo()&&(n=o.metaInfo().id===e.id,s=(o.metaInfo().pine&&o.metaInfo().pine.version)===(e.pine&&e.pine.version),n&&s&&r++);returnr}functionb(t,e){vari,o;if(!e)returnt;for(iint.styles)(o=t.styles[i].color)&&(t.styles[i].color=w(o,e));returnt}functionw(t,e){vari=Q(J(t)),o=i[0]+.05*e
for(vart=0;t<this._metaInfo.inputs.length;t++)if("bar_time"===this._metaInfo.inputs[t].type)return!1;return!0},S.prototype.restoreData=function(t){this.m_data.restoreState(t),this._resolvedSymbols=t.symbols,this._graphics.setGraphics(t.graphics),this._postProcessGraphics(),this._plotOffsets=t.plotOffsets},S.prototype.restart=function(){this._restarting=!0,this.clearData(),n.enabled("stop_study_on_restart")&&this.stop(),setTimeout(this.start.bind(this),0)},S.prototype.stop=function(t){if(!0===t&&this._children)for(vare=0;e<this._children.length;++e)this._children[e].stop(!0);this._chartApi&&this._chartApi.connected()&&this._studyId&&this._chartApi.removeStudy(this._studyId,this._handler,this._isChildStudy),n.enabled("update_study_formatter_on_symbol_resolve")&&this._model.mainSeries().onSymbolResolved().unsubscribe(this,S.prototype._createFormatter),this._studyId=null,this.clearData(),this._unsubscribeExtendedHours(),this.recalculate()},S.prototype._resolveSymbol=function(t){vare=functione(i,o){this._chartApi.resolveSymbol(this._makeNextSymbolId(),i,function(i){switch(i.method){case"symbol_resolved":this._resolvedSymbols[t]=i.params[1],this.invalidateTitleCache(!0),o.resolve(t);break;case"symbol_error":if("permission denied"===i.params[1]&&i.params[2])switch(i.params[2]){caseTradingView.Series.PD_REASON_EXTENDED_HOURS:break;caseTradingView.Series.PD_REASON_SYMBOL:if(i.params[3])returnvoide(i.params[3],o);break;default:returnvoide(i.params[2],o)}o.reject(t)}}.bind(this))}.bind(this),i=$.Deferred();returne(t,i),i.promise()},S.prototype._allSymbolsAreResolved=function(){vart,e,i,o,n=$.Deferred(),s=[];for(t=0;t<this._metaInfo.inputs.length;t++)"symbol"===this._metaInfo.inputs[t].type&&(e=this._metaInfo.inputs[t].id,i=this._properties.inputs[e].value(),this._resolvedSymbols[i]||(o=this._resolveSymbol(i),s.push(o)));returns.length>0?$.when.apply($,s).done(function(){0!==this._studyId&&this.stop(!0),this.start(!0),n.resolve("All symbols are resolved now")}.bind(this)).fail(function(t){this._status=$.t("Invalid Symbol"),this.stop(!0),this._model.updateSource(this),n.reject("Invalid symbol, "+t)}.bind(this)):n.resolve("There are no symbols to resolve"),n.promise()},S.prototype._allInputsAreValid=function(){vart,e,i;for(t=0;t<this._metaInfo.inputs.length;t++)if("bar_time"===this._metaInfo.inputs[t].type&&(e=this._metaInfo.inputs[t].id,void0===(i=this._properties.inputs[e].value())||null==i))return!1;return!0},S.prototype.sourceId=function(){returnthis._studyId},S.prototype.source=function(){returnthis._source||this._series},S.prototype.ownerSource=function(){returnthis._isChildStudy?this._source:W.prototype.ownerSource.call(this)},S.prototype.getAllOwnerSources=function(){for(vart=[],e=this.ownerSource();null!=e;)t.push(e),e=e.ownerSource();returnt},S.prototype.isChildStudy=function(){return!!this._isChildStudy},S.prototype.setChild=function(t){tinstanceofS&&t.source()===this&&(this._children||(this._children=[]),-1===this._children.indexOf(t)&&this._children.push(t))},S.prototype.unsetChild=function(t){
returnthis._metaInfo.plots[t].type===ht.PlotTypes.OHLC_HIGH},S.prototype.isOHLCLowPlot=function(t){returnthis._metaInfo.plots[t].type===ht.PlotTypes.OHLC_LOW},S.prototype.isOHLCClosePlot=function(t){returnthis._metaInfo.plots[t].type===ht.PlotTypes.OHLC_CLOSE},S.prototype.isOHLCColorerPlot=function(t){returnthis._metaInfo.plots[t].type===ht.PlotTypes.OHLC_COLORER},S.prototype.isDataOffsetPlot=function(t){returnthis._metaInfo.plots[t].type===ht.PlotTypes.DATAOFFSET},S.prototype.hasBarColorer=function(){for(vart=0;t<this._metaInfo.plots.length;++t)if(this.isBarColorerPlot(t))return!0;return!1},S.prototype.barColorer=function(){vart,e,i=null;for(t=0;t<this._metaInfo.plots.length;++t)this.isBarColorerPlot(t)&&(e=newT(this,t),null==i?i=e:i.pushBackBarColorer(e));if(null==i)throwError("Cannot create BarColorer: study doesn't have a bar_colorer plot!");returni},S.prototype.base=function(){return"Volume"===this._metaInfo.id?1:0},S.prototype._createFormatter=function(){vart,e,i;"default"===this.properties().precision.value()?this.metaInfo().defaults&&(t=parseInt(this.metaInfo().defaults.precision)):t=parseInt(this.properties().precision.value()),isFinite(t)||(t=-1!==["Volume@tv-basicstudies","VbPVisible@tv-volumebyprice","VbPSessions@tv-volumebyprice"].indexOf(this._metaInfo.id)?0:1e4),e=this.series().symbolInfo(),0===t?(i=0,e&&(i=e.volume_precision?e.volume_precision:e.has_fractional_volume?2:0),this._formatter=newst(i)):this._formatter=newnt(Math.pow(10,t)),this.priceScale()&&this.priceScale().updateFormatter()},S.prototype.formatter=function(){returnthis._formatter},S.prototype.nearestIndex=function(t,e){if(!TradingView.isInteger(t))returnvoiddt.logDebug("Study.nearestIndex: incorrect logicalPoint");vari=this._series.data().bars().search(t,e);returni?i.index:void0},S.prototype.updateAllViews=function(){vart;for(t=0;t<this._paneViews.length;t++)this._paneViews[t].update();for(this._dataWindowView.update(),this._statusView.update(),t=0;t<this._priceAxisViews.length;t++)this._priceAxisViews[t].update()},S.prototype.tags=function(){return!this._metaInfo||!this._metaInfo.description||this._metaInfo.isTVScriptStub||this._metaInfo.is_hidden_study||this._metaInfo.isTVScript&&"tv-scripting"===this._metaInfo.productId?[]:[this._metaInfo.description]},S.isPointsBasedStudy=function(t){switch(t){case"VbPFixed@tv-volumebyprice":case"mtp_tsanalysis@mtp-mtpredictor":case"mtp_riskreward@mtp-mtpredictor":case"mtp_decisionpoint@mtp-mtpredictor":case"mtp_ew_main@mtp-mtpredictor":case"mtp_ew_major@mtp-mtpredictor":case"mtp_ew_minor@mtp-mtpredictor":case"mtp_wpt_down1ora@mtp-mtpredictor":case"mtp_wpt_down2orb@mtp-mtpredictor":case"mtp_wpt_down3@mtp-mtpredictor":case"mtp_wpt_down4@mtp-mtpredictor":case"mtp_wpt_down5@mtp-mtpredictor":case"mtp_wpt_downc@mtp-mtpredictor":case"mtp_wpt_up1ora@mtp-mtpredictor":case"mtp_wpt_up2orb@mtp-mtpredictor":case"mtp_wpt_up3@mtp-mtpredictor":case"mtp_wpt_up4@mtp-mtpredictor":case"mtp_wpt_up5@mtp-mtpredictor":case"mtp_wpt_upc@mtp-mtpredictor":return!0;default:return!1}},
S.lineToolNameForPointsBasedStudy=function(t){switch(t){case"VbPFixed@tv-volumebyprice":return"LineToolVbPFixed";case"RegressionTrend@tv-basicstudies":return"LineToolRegressionTrend";case"mtp_tsanalysis@mtp-mtpredictor":return"LineStudyMtpAnalysis";case"mtp_riskreward@mtp-mtpredictor":return"LineStudyMtpRiskReward";case"mtp_decisionpoint@mtp-mtpredictor":return"LineStudyMtpDecisionPoint";case"mtp_ew_main@mtp-mtpredictor":return"LineStudyMtpElliotWaveMain";case"mtp_ew_major@mtp-mtpredictor":return"LineStudyMtpElliotWaveMajor";case"mtp_ew_minor@mtp-mtpredictor":return"LineStudyMtpElliotWaveMinor";case"mtp_wpt_down1ora@mtp-mtpredictor":return"LineStudyMtpDownWave1OrA";case"mtp_wpt_down2orb@mtp-mtpredictor":return"LineStudyMtpDownWave2OrB";case"mtp_wpt_down3@mtp-mtpredictor":return"LineStudyMtpDownWave3";case"mtp_wpt_down4@mtp-mtpredictor":return"LineStudyMtpDownWave4";case"mtp_wpt_down5@mtp-mtpredictor":return"LineStudyMtpDownWave5";case"mtp_wpt_downc@mtp-mtpredictor":return"LineStudyMtpDownWaveC";case"mtp_wpt_up1ora@mtp-mtpredictor":return"LineStudyMtpUpWave1OrA";case"mtp_wpt_up2orb@mtp-mtpredictor":return"LineStudyMtpUpWave2OrB";case"mtp_wpt_up3@mtp-mtpredictor":return"LineStudyMtpUpWave3";case"mtp_wpt_up4@mtp-mtpredictor":return"LineStudyMtpUpWave4";case"mtp_wpt_up5@mtp-mtpredictor":return"LineStudyMtpUpWave5";case"mtp_wpt_upc@mtp-mtpredictor":return"LineStudyMtpUpWaveC";default:throwError("There is no line tool name, associated with study id "+t)}},S.isStudyLineTool=function(t){vare=i(78).StudyLineDataSource,o=TradingView[t];return"function"==typeofo&&o.prototypeinstanceofe},S.prototype.onExtendedHoursChanged=function(){this.restart()},S.prototype.hasSymbolInputs=function(){for(vart=this._metaInfo.inputs.length;t--;)if("symbol"===this._metaInfo.inputs[t].type)return!0;return!1},S.prototype._subscribeExtendedHours=function(){!this._isSubscribedToExtendedHours&&this.hasSymbolInputs()&&(this._series.extendedHours.listeners().subscribe(this,this.onExtendedHoursChanged),this._isSubscribedToExtendedHours=!0)},S.prototype._unsubscribeExtendedHours=function(){this._isSubscribedToExtendedHours&&(this._series.extendedHours.listeners().unsubscribe(this,this.onExtendedHoursChanged),deletethis._isSubscribedToExtendedHours)},S.prototype.removeByRemoveAllStudies=function(){return!0},S.prototype.canHaveChildren=function(){returnvoid0===this._canHaveChildren&&(this._canHaveChildren=!!lt.canHaveChildren(this._metaInfo)),this._canHaveChildren},S.getInputRebindType=function(t,e,i){varo=lt.isSourceInput(t);returno&&!~e.indexOf("$")&&~i.indexOf("$")?X.REBIND_STUDY_STANDALONE_TO_CHILD:o&&~e.indexOf("$")&&!~i.indexOf("$")?X.REBIND_STUDY_CHILD_TO_STANDALONE:0},S.prototype.getPlotFields=function(){returnthis._plotFields},t.exports={Study:S,createStudy:l,prepareCallStudyArgs:m,prepareStudyProperties:h,prepareStudyPropertiesForLoadChart:d,prepareStudyPropsStateForLoadChart:_,shiftColor:w}}).call(e,i(24),i(15),i(3),i(107))},function(t,e,i){"use strict";functiono(t){vare=r.parseRgb(t),i=e.map(function(t){returnt>50?t-50:0})
;returnr.rgbToString(i)}functionn(t){vare,i,o,n=[];for(e=0,i=t;e<i.length;e++)o=i[e],null!==r.tryParseRgb(o)&&n.push(o);returnn}functions(t,e){void0===e&&(e={});vari=$('<span class="tvcolorpicker-container">');returnnull!==t&&i.appendTo(t),void0!==e.addClass&&i.addClass(e.addClass),$('<div class="tvcolorpicker-transparency">').appendTo(i),$('<input class="colorpicker-widget">').tvcolorpicker({customColors:n(a.getJSON("pickerCustomColors",[])),direction:e.direction,hideTransparency:!!e.hideTransparency}).on("change",function(){$(this).css("border-color",o($(this).val()||l))}).bind("customcolorchange",function(t,e){a.setJSON("pickerCustomColors",e)}).appendTo(i),i}varr,a,l;Object.defineProperty(e,"__esModule",{value:!0}),i(17),i(360),r=i(36),a=i(69),l="#727272",e.addColorPicker=s},function(t,e,i){"use strict";functiono(t,e,i){varo,r,h,c,d,p;if(s.enabled("charting_library_base")){for(e=e||t||i||"",o="",r=0;r<l.length;r++)if((h=e.match(l[r]))&&3===h.length){e=h[1],o=h[2];break}returnvoidn.emit(e.toLowerCase().replace(" ","_"),{category:t,label:i,value:o})}c=(t?t+":":"")+e,i&&(c+=i),a.logNormal(c),d=window._gaq,window._UNIT_TESTS||void0===d||(p=["_trackEvent",t,e],void0!==i&&p.push(i),d.push(p))}varn,s,r,a,l;Object.defineProperty(e,"__esModule",{value:!0}),n=i(34),s=i(3),r=i(12),a=r.getLogger("Common.TrackEvent"),l=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],e.trackEvent=o,window.TradingView=window.TradingView||{},window.TradingView.trackEvent=o},function(t,e,i){"use strict";functiono(t,e,i){c[t].unsubscribe(i,e)}functionn(t,e,i){s(t,e,i)}functions(t,e,i,o){if(c.hasOwnProperty(t)||(c[t]=newh),p[t])returnvoide.call(i);c[t].subscribe(i,e,o)}functionr(t){d.push(t)}functiona(t){vare,i,o=[];for(e=1;e<arguments.length;e++)o[e-1]=arguments[e];i=[t].concat(o),d.forEach(function(t){t.apply(null,i)}),c.hasOwnProperty(t)&&c[t].fire.apply(c[t],o)}functionl(t){p[t]&&console.warn("Something went wrong: emitOnce called multiple times with same event ("+t+")"),p[t]=!0,a.apply(null,arguments)}varh,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),h=i(15),c={},d=[],p={},e.unsubscribe=o,e.on=n,e.subscribe=s,e.subscribeToAll=r,e.emit=a,e.emitOnce=l},function(t,e,i){(function(t){functione(t){return"number"==typeoft&&isFinite(t)}functioni(t){return"string"==typeoft?JSON.parse(t):t}functiono(t){returnnull!==t&&void0!==t&&t.constructor===Function}functionn(t,e){t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),t.prototype.superclass=e}functions(t,e){for(variint.prototype)"function"==typeoft.prototype[i]&&t.prototype.hasOwnProperty(i)&&(t.prototype[i]=function(){throwError(e+"::"+i+" is an interface member declaration and must be overloaded in order to be called")})}functionr(t,e,i,o){for(varnini.prototype)if("function"==typeofi.prototype[n]&&!t.prototype[n])throwError("Interface implementation assertion failed: "+e+" does not implement "+o+"::"+n+" function")}functiona(t){
;returnr.rgbToString(i)}functionn(t){vare,i,o,n=[];for(e=0,i=t;e<i.length;e++)o=i[e],null!==r.tryParseRgb(o)&&n.push(o);returnn}functions(t,e){void0===e&&(e={});vari=$('<span class="tvcolorpicker-container">');returnnull!==t&&i.appendTo(t),void0!==e.addClass&&i.addClass(e.addClass),$('<div class="tvcolorpicker-transparency">').appendTo(i),$('<input class="colorpicker-widget">').tvcolorpicker({customColors:n(a.getJSON("pickerCustomColors",[])),direction:e.direction,hideTransparency:!!e.hideTransparency}).on("change",function(){$(this).css("border-color",o($(this).val()||l))}).bind("customcolorchange",function(t,e){a.setJSON("pickerCustomColors",e)}).appendTo(i),i}varr,a,l;Object.defineProperty(e,"__esModule",{value:!0}),i(17),i(360),r=i(37),a=i(69),l="#727272",e.addColorPicker=s},function(t,e,i){"use strict";functiono(t,e,i){varo,r,h,c,d,p;if(s.enabled("charting_library_base")){for(e=e||t||i||"",o="",r=0;r<l.length;r++)if((h=e.match(l[r]))&&3===h.length){e=h[1],o=h[2];break}returnvoidn.emit(e.toLowerCase().replace(" ","_"),{category:t,label:i,value:o})}c=(t?t+":":"")+e,i&&(c+=i),a.logNormal(c),d=window._gaq,window._UNIT_TESTS||void0===d||(p=["_trackEvent",t,e],void0!==i&&p.push(i),d.push(p))}varn,s,r,a,l;Object.defineProperty(e,"__esModule",{value:!0}),n=i(34),s=i(3),r=i(12),a=r.getLogger("Common.TrackEvent"),l=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],e.trackEvent=o,window.TradingView=window.TradingView||{},window.TradingView.trackEvent=o},function(t,e,i){"use strict";functiono(t,e,i){c[t].unsubscribe(i,e)}functionn(t,e,i){s(t,e,i)}functions(t,e,i,o){if(c.hasOwnProperty(t)||(c[t]=newh),p[t])returnvoide.call(i);c[t].subscribe(i,e,o)}functionr(t){d.push(t)}functiona(t){vare,i,o=[];for(e=1;e<arguments.length;e++)o[e-1]=arguments[e];i=[t].concat(o),d.forEach(function(t){t.apply(null,i)}),c.hasOwnProperty(t)&&c[t].fire.apply(c[t],o)}functionl(t){p[t]&&console.warn("Something went wrong: emitOnce called multiple times with same event ("+t+")"),p[t]=!0,a.apply(null,arguments)}varh,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),h=i(15),c={},d=[],p={},e.unsubscribe=o,e.on=n,e.subscribe=s,e.subscribeToAll=r,e.emit=a,e.emitOnce=l},function(t,e,i){(function(t){functione(t){return"number"==typeoft&&isFinite(t)}functioni(t){return"string"==typeoft?JSON.parse(t):t}functiono(t){returnnull!==t&&void0!==t&&t.constructor===Function}functionn(t,e){t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),t.prototype.superclass=e}functions(t,e){for(variint.prototype)"function"==typeoft.prototype[i]&&t.prototype.hasOwnProperty(i)&&(t.prototype[i]=function(){throwError(e+"::"+i+" is an interface member declaration and must be overloaded in order to be called")})}functionr(t,e,i,o){for(varnini.prototype)if("function"==typeofi.prototype[n]&&!t.prototype[n])throwError("Interface implementation assertion failed: "+e+" does not implement "+o+"::"+n+" function")}functiona(t){
if(null===t||void0===t)throwError("Object is not defined");returnt}varl,h=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t){return"object"==typeoft&&null!==t},d=function(t){returnc(t)&&-1!==(""+t.constructor).indexOf("function Object")};"undefined"!=typeofwindow?(l=window.TradingView=window.TradingView||{},window.isNumber=e,window.isFunction=o,window.inherit=n,window.isArray=h):l=this.TradingView=this.TradingView||{},l.isNaN=function(t){return!(t<=0||t>0)},l.isAbsent=function(t){returnnull===t||void0===t},l.isExistent=function(t){returnnull!==t&&void0!==t},Number.isNaN=Number.isNaN||function(t){returnt!=t},l.isSameType=function(t,e){returnNumber.isNaN(t)||Number.isNaN(e)?Number.isNaN(t)===Number.isNaN(e):{}.toString.call(t)==={}.toString.call(e)},l.isInteger=function(t){return"number"==typeoft&&t%1==0},l.parseBool=function(t){return!0===t||"true"===t},l.isBoolean=function(t){return!0===t||!1===t},l.isString=function(t){returnnull!==t&&void0!==t&&t.constructor===String},l.isInherited=function(t,e){returnt===e||!(!t||!t.prototype)&&(void0!==t.prototype.superclass&&null!==t.prototype.superclass&&(t.prototype.superclass===e||l.isInherited(t.prototype.superclass,e)))},l.TypeValidator=function(t){this.m_type=t},l.TypeValidator.prototype.check=function(t){returnt.constructor===this.m_type||l.isInherited(t.constructor,this.m_type)},l.PredicateValidator=function(t){this.m_predicate=t},l.PredicateValidator.prototype.check=function(t){returnthis.m_predicate(t)},l.clone=function(t){vare,i,o;if(!t||"object"!=typeoft)returnt;e="function"==typeoft.pop?[]:{};for(iint)t.hasOwnProperty(i)&&(o=t[i],e[i]=o&&"object"==typeofo?l.clone(o):o);returne},l.deepEquals=function(t,e,i){varn,s,r,a,c;if(i||(i=""),t===e)return[!0,i];if(o(t)&&(t=void0),o(e)&&(e=void0),void0===t&&void0!==e)return[!1,i];if(void0===e&&void0!==t)return[!1,i];if(null===t&&null!==e)return[!1,i];if(null===e&&null!==t)return[!1,i];if("object"!=typeoft&&"object"!=typeofe)return[t===e,i];if(Array.isArray(t)&&Array.isArray(e)){if(n=t.length,s=e.length,n!==s)return[!1,i];for(r=0;r<n;r++)if(a=l.deepEquals(t[r],e[r],i+"["+r+"]"),!a[0])returna;return[!0,i]}if(h(t)||h(e))return[!1,i];for(cint)if(a=l.deepEquals(t[c],e[c],i+"["+c+"]"),!a[0])returna;return[!0,i]},l.merge=function(t,e){for(variine)"object"==typeofe[i]&&t.hasOwnProperty(i)?l.merge(t[i],e[i]):t[i]=e[i];returnt},l.mergeObj=function(t,e){for(variine)e[i].constructor===Object&&t.hasOwnProperty(i)?l.mergeObj(t[i],e[i]):t[i]=e[i];returnt},l.mergeWithRules=function(t,e,i,o){varn,s;for(nine)s=o?o+"."+n:n,i&&sini?t[n]=i[s](t[n],e[n]):"object"==typeofe[n]&&t.hasOwnProperty(n)?l.merge(t[n],e[n],i,s):t[n]=e[n]},l.sortMultipleFunction=function(){vart=[].slice.call(arguments),e=t.length;returnfunction(i,o){varn,s,r,a,l,h,c;for(c=0;c<e&&(h=0,r=t[c],a="string"==typeofr?r:r.name,n=i[a],s=o[a],"function"==typeofr.fn&&(n=r.fn(n),s=r.fn(s)),l=r.reverse?-1:1,n<s&&(h=-1*l),n>s&&(h=1*l),0===h);c++);returnh}},
void0!==t&&t&&t.exports&&(t.exports={inherit:n,clone:l.clone,merge:l.merge,isNumber:e,isInteger:l.isInteger,isBoolean:l.isBoolean,isString:l.isString,isObject:c,isHashObject:d,isNaN:l.isNaN,isAbsent:l.isAbsent,isExistent:l.isExistent,isSameType:l.isSameType,isArray:h,parseBool:l.parseBool,parseJSONorNot:i,ensure:a,declareClassAsPureInterface:s,requireFullInterfaceImplementation:r})}).call(e,i(50)(t))},,,,,function(t,e,i){(function(t){"use strict";functione(){}functioni(t){if(!(thisinstanceofi))returnnewi(t);arguments.length>0&&(this._value=t),this._listeners=[]}i.prototype.value=function(){returnthis._owner?this._owner._value:this._value},i.prototype.setValue=function(t,e){vari,o,n,s=this._owner?this._owner:this;if("function"==typeofs.hook&&(t=s.hook(t)),s.writeLock)returns._value;if(!e&&s._value===t&&s.hasOwnProperty("_value"))returnt;for(s._value=t,i=s._listeners.slice(),o=0,n=0;n<i.length;n++)i[n].once&&(s._listeners.splice(n-o,1),o++),i[n].cb(t);returnt},i.prototype.deleteValue=function(){vart,e,i,o=this._owner?this._owner:this;if(o.hasOwnProperty("_value")){if(o.writeLock)returno._value;for(deleteo._value,t=o._listeners.slice(),e=0,i=0;i<t.length;i++)t[i].once&&(o._listeners.splice(i-e,1),e++),t[i].cb()}},i.prototype.subscribe=function(t,e){vari,o,n;if("function"!=typeoft)thrownewTypeError("callback must be a function");i=!!e&&!!e.once,o=!!e&&!!e.callWithLast,n=this._owner?this._owner:this,o&&n.hasOwnProperty("_value")&&(t(n._value),i)||n._listeners.push({cb:t,owner:this,once:!!e&&!!e.once})},i.prototype.unsubscribe=function(t){vare,i,o=this._owner?this._owner:this;for(void0===t&&(t=null),e=o._listeners,i=e.length;i--;)e[i].owner!==this&&o!==this||e[i].cb!==t&&null!==t||e.splice(i,1)},i.prototype.listeners=function(){return(this._owner?this._owner:this)._listeners},i.prototype.readonly=function(){if(this._readonlyInstance)returnthis._readonlyInstance;vart=this._readonlyInstance=newe;returnt.subscribe=this.subscribe.bind(this),t.unsubscribe=this.unsubscribe.bind(this),t.value=this.value.bind(this),t.when=this.when.bind(this),t.spawn=function(){returnthis.spawn().readonly()}.bind(this),t},i.prototype.spawn=function(){vart=newi;returndeletet._listeners,t._owner=this._owner||this,t.destroy=function(){this.unsubscribe(),deletethis._owner},t},i.prototype.when=function(t){vare,i=this;if(this.value())returnvoidt();e=function(o){o&&(i.unsubscribe(e),t())},i.subscribe(e)},i.prototype.opposite=function(){vart,e;returnthis._opposite||(t=this,e=newi(!this.value()),this.subscribe(function(t){e.setValue(!t)}),e.subscribe(function(e){t.setValue(!e)}),this._opposite=e),this._opposite},"undefined"!=typeofwindow&&(window.WatchedValue=i),void0!==t&&t&&t.exports&&(t.exports=i)}).call(e,i(50)(t))},function(t,e,i){(function(e,o,n){"use strict";functions(t){return"cursor"===t||"arrow"===t||"dot"===t}functionr(t){!t&&d&&d.stayInDrawingMode.value()||this.tool.setValue(this.cursorTool.value())}functiona(t,e){returnfunction(e){t.inFire||(t.inFire=!0,t.fire(e),t.inFire=!1)}}functionl(){
l.prototype.onData=function(t){vare,i,o,n,s,r,a,h,c,d,p,u,_,f,m,g,v,y,w=this;switch(t.method){case"symbol_resolved":if(t.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+t.params[0]);break}this.updateSymbolInfo(t.params[1]),this.m_model.updateSource(this),this._symbolResolved.fire(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||F("Symbol",t.params[1].listed_exchange,t.params[1].name),e=this.symbolInfo().minmov/this.symbolInfo().pricescale,i=this.properties(),i.style.value()===l.STYLE_RENKO&&i.renkoStyle.inputs.boxSize.value()<e?i.renkoStyle.inputs.merge({boxSize:e}):i.style.value()===l.STYLE_PNF&&i.pnfStyle.inputs.boxSize.value()<e?i.pnfStyle.inputs.merge({boxSize:e}):i.style.value()===l.STYLE_KAGI&&i.kagiStyle.inputs.reversalAmount.value()<e&&i.kagiStyle.inputs.merge({reversalAmount:e});break;case"symbol_error":if(t.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+t.params[0]);break}if(this._setStatus(l.STATUS_INVALID_SYMBOL),this._properties.shortName.setValue(this._properties.symbol.value()),this.m_model.clearAllStudies(),this.updateAllViews(),this.m_model.updateSource(this),t.params[1]===l.PERMISSION_DENIED)switch(t.params[2]){casel.PD_REASON_EXTENDED_HOURS:this._extendedHoursNotPermitted.fire();break;casel.PD_REASON_SYMBOL:this._symbolNotPermitted.fire(t.params[3]);break;casel.PD_REASON_GROUP_PERMISSION:this._symbolGroupNotPermitted.fire(t.params[3]);break;default:this._symbolNotPermitted.fire(t.params[2])}elsethis.m_model.resetTimeScale(),this._symbolError.fire();this.m_model.realignLineTools();break;case"series_timeframe":if(t.params[1]!==this._turnaround)break;o=t.params[2],n=t.params[3],s=t.params[4],r=void0!==s&&s?n:n+10,this.m_model.setTimeViewport(o,r);break;case"series_error":a=t.params[2],deletethis._loadingStartTime,b.enabled("charting_library_debug_mode")&&U.logNormal("Error reason: "+a),this._setStatus(b.enabled("no_bars_status")&&this._symbolInfo?l.STATUS_NO_BARS:l.STATUS_INVALID_SYMBOL),a&&a.startsWith("study_not_auth:")?(h=a.split(":",2)[1].split("@",2)[0],hin{BarSetRenko:!0,BarSetPriceBreak:!0,BarSetKagi:!0,BarSetPnF:!0}?this.chartTypeNotPermitted.fire(h):"BarSetSpread"===h&&this.intradaySpreadNotPermitted.fire()):"resolution_not_entitled"===a?this.intradayExchangeNotPermitted.fire():"custom_resolution"===a&&this.customIntervalNotPermitted.fire(),this._seriesLoaded=!0;break;case"series_loading":if(t.params[1]!==this._turnaround)break;if(t.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}this._setStatus(l.STATUS_LOADING),w._loadingStartTime=(newDate).getTime();break;case"series_completed":if(t.params[2]!==this._turnaround)break;if(t.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}switch(c="chartSession:"+w._chartApi._sessionid,d=(newDate).getTime()-this._loadingStartTime,
U.logDebug(c+", Series loading took "+d+" ms, eod:"+this._endOfData),deletethis._loadingStartTime,p=t.params[1],"pulsed"===p&&(p="delayed"),p){case"streaming":this._setStatus(l.STATUS_READY);break;case"endofday":this._setStatus(l.STATUS_EOD);break;case"delayed":this._setStatus(l.STATUS_DELAYED);break;case"pulsed":this._setStatus(l.STATUS_PULSE)}p.match(/delayed_streaming/)&&this._setStatus(l.STATUS_DELAYED_STREAMING),u=this.m_model.paneForSource(this),u.recalculatePriceScale(this.priceScale()),this.m_model.invalidate(newM(M.FULL_UPDATE)),this.m_data.size()&&this._tickmarksRangeChanged.fire({start:this.data().first().value[TradingView.TIME_PLOT],end:this.data().last().value[TradingView.TIME_PLOT]}),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0),this.model().recalcStudyBasedLineTools(),!this.isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale()._correctOffset(),this.model().timeScale().correctBarSpacing(),_=this.model().timeScale().visibleBars(),this.priceScale().setPriceRange(this.priceRange(_.firstBar(),_.lastBar()))),this._seriesLoaded=!0,this._onCompleted.fire(this._endOfData),this.requestMoreData();break;case"series_deleted":break;case"data_update":if(t.params.customId!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}if(this.status()===l.STATUS_INVALID_SYMBOL)break;t.params.plots.length?(f=this.m_data.m_bars.size(),m=this.m_data.m_bars.first(),g=void0!==m?m.valueOf():null,v=this.m_data.m_bars.merge(t.params.plots),(null===g||v.earliestRow.index<g)&&(this._endOfData=!1),y="Merge bars. Changes:{length:"+v.length+", earliestRow:"+v.earliestRow.index+"} ",y+="bars state:{firstBar:"+this.m_data.m_bars.first()+",lastBar:"+this.m_data.m_bars.last()+",size:"+this.m_data.m_bars.size()+"}",j.logDebug(y),f!==this.bars().size()&&(this._barReceived.fire(this.m_data.m_bars.size()),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0))):(this.m_data.clear(),this._startLoading.fire()),newPromise(function(e){vari=w.properties().style.value();!t.params.nonseries||i!==l.STYLE_RENKO&&i!==l.STYLE_KAGI&&i!==l.STYLE_PNF&&i!==l.STYLE_HEIKEN_ASHI&&i!==l.STYLE_PB?(t.params.nonseries||(w.m_data.m_nsBars.clear(),w.m_data.lastProjectionPrice=void0),e(),e()):w.parseJapProjBars(t.params.nonseries).then(function(t){w.m_data.m_nsBars=t.nsBars,w.m_data.lastProjectionPrice=t.lastPrice;vari=w.m_data.boxSize!==t.boxSize;w.m_data.boxSize=t.boxSize,w.m_data.reversalAmount=t.reversalAmount,i&&w._boxSizeChanged.fire(w.m_data.boxSize),e()})}).then(function(){vart=w.m_model.paneForSource(w);w.m_model.updateAllVolumeStudies(),w.m_model.recalculatePane(t),w.m_model.updateSource(w),w.m_model.updateLineTools(),w.m_model.updateCrossHair()})}this._dataLoaded.fire(t)},l.prototype.fixBoxSize=function(){vart=this.model().timeScale(),e=this.priceScale();e.isEmpty()||t.isEmpty()||(this.m_data.boxSize=Math.abs(e.coordinateToPrice(t.barSpacing())-e.coordinateToPrice(0)))},l.prototype.parseJapProjBars=function(t){
i=l._SYMBOL_STRING_DATA[this._properties.style.value()],t={symbol:t,type:i.type,inputs:i.inputNames.map(function(t){returne[t].value()})}),"string"!=typeoft&&(t="="+JSON.stringify(t)),t},l.parseSymbolString=function(t){vare,i,o,n,s,r,a,h=Object.keys(l._SYMBOL_STRING_DATA),c={symbol:null,style:null,extendedHours:null,inputs:null};if(t&&0===t.indexOf("=")){if(e=t.slice(1),e=JSON.parse(e),c.symbol=e.symbol,e.type)for(r=0;r<h.length;r++)if(o=h[r],i=l._SYMBOL_STRING_DATA[o],i.type===e.type){for(c.style=parseInt(o),c.inputs={},a=0;a<i.inputNames.length;a++)s=e.inputs[a],n=i.inputNames[a],c.inputs[n]=s;break}"extended"===c.symbol.session&&(c.extendedHours=!0,c.symbol=c.symbol.symbol)}elsec.symbol=t;returnc},l.prototype.getStyleShortName=function(){vart=this._properties.style.value();if(l.STYLE_SHORT_NAMES.hasOwnProperty(t))returnl.STYLE_SHORT_NAMES[t];throwError("Missed short name for style "+t)},l.prototype.getInputsProperties=function(){returnthis._properties[this.getStyleShortName()+"Style"].inputs||news},l.prototype.getRealVisibleRange=function(){vart=this.model().timeScale().visibleBars(),e=this.data().search(t.m_firstBar,TradingView.SEARCH_NEAREST_RIGHT),i=this.data().search(t.m_lastBar,TradingView.SEARCH_NEAREST_LEFT);returnvoid0===e||void0===i?null:neww(e.index,i.index)},l.prototype.isLockScale=function(){returnthis.properties().lockScale.value()},l.prototype.firstValue=function(){returnthis.data().firstValue()},l.prototype.firstBar=function(){returnthis.data().firstBar()};l.prototype.sessionsStudy=function(){vart,e,i,o;if(this._sessionsStudy)returnthis._sessionsStudy;for(t=this.model().paneForSource(this),e=t.dataSources(),i=0;i<e.length;i++)if((o=e[i])instanceofTradingView.Study&&"Sessions"===o.metaInfo().shortId)returnthis._sessionsStudy=o,this._sessionsStudy;return!1},l.prototype.createSessStudy=function(){if(!b.enabled("charting_library_base")&&!this.sessionsStudy()){vart=R.findStudyMetaInfo(this.model().studiesMetaData(),"Sessions@tv-basicstudies");this.model().insertStudy(t,!1,!0),this._onSessionsStudyCreated.fire()}},l.prototype.checkSessStudy=function(){b.enabled("charting_library_base")||(this.sessionsStudy()||this.createSessStudy(),this.sessionsStudy().start())},l.prototype.isSpread=function(){return"spread"===this._symbolInfo.type},l.prototype.firstSymbol=function(){returnthis._symbolInfo?this._symbolInfo.legs[0]:""},l.prototype.firstShortName=function(){returnO.ticker(this.firstSymbol())},l.prototype.onSessionsStudyCreated=function(){returnthis._onSessionsStudyCreated},l.prototype.loadDataTo=function(t){this._turnaround="s"+++this._turnaroundCounter;vare=this._properties.interval.value();e=this._generateTimeframe(e,t),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,e,this._handler)},l.prototype.checkInterval=function(){if(this._symbolInfo&&(k.kind(this.interval())!==k.MINUTES||this._symbolInfo.has_intraday||this.requestingIntradayWhenNotSupported.fire(),this._symbolInfo.hasOwnProperty("supported_resolutions"))){
vart=this._properties.interval.value();-1===this._symbolInfo.supported_resolutions.indexOf(t)&&this.requestingResolutionWhenNotSupported.fire(this._symbolInfo.supported_resolutions[0])}},l.prototype.setPriceScale=function(t){this.m_priceScale!==t&&(this.m_priceScale=t,this.priceScaleChanged.fire(t))},l.prototype.setGotoDateResult=function(t){this._gotoDateResult=t},l.prototype.gotoDateResult=function(){returnthis._gotoDateResult},l.prototype.syncModel=function(){vart,e;if(!this._syncModel){if(t=this.symbolInfo(),e=this.interval(),!t||!e)returnnull;this._syncModel=newN(t,e)}returnthis._syncModel},l.prototype.turnaround=function(){returnthis._turnaround},TradingView.Series=l,t.exports=l}).call(e,i(15),i(40),i(107),i(24))},function(t,e){"use strict";vari,o,n,s;Object.defineProperty(e,"__esModule",{value:!0}),i={},o=RegExp("^([0-9]*)$"),n=RegExp("^(\\d*)([DWMS])$"),s=function(){functiont(e,i){if(void0===i&&e!==t.INVALID)returnt.parse(e);varo=e;o!==t.SECONDS&&o!==t.MINUTES&&o!==t.HOURS&&o!==t.DAYS&&o!==t.WEEKS&&o!==t.MONTHS&&o!==t.INVALID&&(o="invalid"),this._kind=o,this._multiplier=i}returnt.prototype.kind=function(){returnthis._kind},t.prototype.multiplier=function(){returnthis._multiplier},t.prototype.isValid=function(){returnthis.kind()!==t.INVALID},t.prototype.isDWM=function(){returnthis.isValid()&&!this.isIntraday()},t.prototype.isIntraday=function(){return-1!==[t.SECONDS,t.MINUTES,t.HOURS].indexOf(this.kind())},t.prototype.letter=function(){returnthis.isValid()&&this.kind()!==t.MINUTES?this.kind()[0].toUpperCase():""},t.prototype.value=function(){returnthis.isValid()?this.kind()===t.MINUTES?this.multiplier()+"":this.multiplier()+this.letter():""},t.prototype.isEqualTo=function(e){if(!(einstanceoft))throwError("Argument is not an Interval");returnthis.kind()!==t.INVALID&&e.kind()!==t.INVALID&&(this.kind()===e.kind()&&this.multiplier()===e.multiplier())},t.prototype.inMilliseconds=function(){if(!this.isValid()||this.kind()===t.MONTHS)returnNaN;vare=this.multiplier();returnvoid0===e?NaN:i[this.kind()]*e},t.isEqual=function(e,i){returnt.parse(e).isEqualTo(t.parse(i))},t.parse=function(e){vari,s;returne=(e+"").toUpperCase().split(",")[0],i={D:t.DAYS,W:t.WEEKS,M:t.MONTHS,H:t.HOURS,S:t.SECONDS},(s=o.exec(e))?newt(t.MINUTES,parseInt(e,10)):(s=n.exec(e),s?newt(i[s[2]],parseInt(s[1],10)?parseInt(s[1],10):1):newt(t.INVALID))},t.isDWM=function(e){returnt.parse(e).isDWM()},t.kind=function(e){returnt.parse(e).kind()},t.isValid=function(e){returnt.parse(e).isValid()},t}(),s.SECONDS="seconds",s.MINUTES="minutes",s.HOURS="hours",s.DAYS="days",s.WEEKS="weeks",s.MONTHS="months",s.INVALID="invalid",e.Interval=s,i[s.SECONDS]=1e3,i[s.MINUTES]=60*i[s.SECONDS],i[s.HOURS]=60*i[s.MINUTES],i[s.DAYS]=24*i[s.HOURS],i[s.WEEKS]=7*i[s.DAYS]},function(t,e){"use strict";functioni(t,e){if(!t)throwError("Assertion failed"+(e?": "+e:""))}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=i},function(t,e,i){"use strict";functiono(t,e,i){this._data=t,this._hittestResult=e||newc(c.MOVEPOINT),
this._id=r.randomHashN(6),this._ownerSource=null,this._userEditEnabled=!0,this.hasAlert=newt(!1)}functionn(t){o.call(this),this._isOverlay=null,this._model=t}vars=i(7).DefaultProperty,r=i(60);o.prototype.createPropertiesObject=function(t,e,i){returnnews(t,e,i)},o.prototype.id=function(){returnthis._id},o.prototype.uniqueId=function(){returnthis._id},o.prototype.setId=function(t){this._id=t},o.prototype.zorder=function(){returnthis._zorder},o.prototype.setZorder=function(t){"number"==typeoft&&this._zorder!==t&&(this._zorder=t)},o.prototype.title=function(){throwError("Implement this fun in a subclass")},o.prototype.priceScale=function(){returnthis.m_priceScale},o.prototype.setPriceScale=function(t){this.m_priceScale=t},o.prototype.ownerSource=function(){returnthis._ownerSource},o.prototype.setOwnerSource=function(t){this._ownerSource=t,t&&this.setPriceScale(t.priceScale())},o.prototype.isSavedInChart=function(t){return!0},o.prototype.isSavedInStudyTemplates=function(){return!0},o.prototype.isRemovedByStudyTemplates=function(){return!0},o.prototype.hasContextMenu=function(){return!0},o.prototype.showInObjectTree=function(){return!0},o.prototype.setUserEditEnabled=function(t){this._userEditEnabled=t},o.prototype.userEditEnabled=function(){returnthis._userEditEnabled},o.prototype.canBeHidden=function(){returnthis.userEditEnabled()},o.prototype.isUserDeletable=function(){returnthis.userEditEnabled()},o.prototype.canHasAlert=function(){return!1},o.prototype.properties=function(){throwError("Implement this fun in a subclass")},o.prototype.statusView=function(){returnnull},o.prototype.dataWindowView=function(){returnnull},o.prototype.priceAxisViews=function(t,e){returnnull},o.prototype.updateAllViews=function(){},o.prototype.paneViews=function(t){returnnull},o.prototype.isChildStudy=function(){return!1},o.prototype.hasChildren=function(){return!1},o.prototype.canHaveChildren=function(){return!1},o.prototype.onClickOutside=function(){},inherit(n,o),n.prototype.isNoScale=function(){return!!this._isOverlay},n.prototype.base=function(){return0},n.prototype.formatter=function(){returnnull},n.prototype.model=function(){returnthis._model},n.prototype.priceRange=function(t,e){returnnull},n.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},e.DataSource=o,e.PriceDataSource=n}).call(e,i(40))},function(t,e,i){"use strict";functiono(t,e,i,o,n){this._wptStudyId=o,this._pointsCount=n,m.call(this,t,e,i)}functionn(t,e,i){o.call(this,t,e,i,"mtp_wpt_down1ora",2)}functions(t,e,i){o.call(this,t,e,i,"mtp_wpt_down2orb",2)}functionr(t,e,i){o.call(this,t,e,i,"mtp_wpt_down3",3)}functiona(t,e,i){o.call(this,t,e,i,"mtp_wpt_down4",2)}functionl(t,e,i){o.call(this,t,e,i,"mtp_wpt_down5",5)}functionh(t,e,i){o.call(this,t,e,i,"mtp_wpt_downc",3)}functionc(t,e,i){o.call(this,t,e,i,"mtp_wpt_up1ora",2)}functiond(t,e,i){o.call(this,t,e,i,"mtp_wpt_up2orb",2)}functionp(t,e,i){o.call(this,t,e,i,"mtp_wpt_up3",3)}functionu(t,e,i){o.call(this,t,e,i,"mtp_wpt_up4",2)}function_(t,e,i){
o.call(this,t,e,i,"mtp_wpt_up5",5)}functionf(t,e,i){o.call(this,t,e,i,"mtp_wpt_upc",3)}varm=i(104);inherit(o,m),o.prototype._studyInputs=function(){vart,e,i,o,n=this.points();if(n.length<this.pointsCount())returnnull;for(t=[this.properties().inputs.displayZoneLabels.value()],e=0;e<this.pointsCount();++e){if(i=n[e].index,!(o=this._model.mainSeries().bars().valueAt(i)))returnnull;t.push(1e3*o[TradingView.TIME_PLOT])}returnt},o.prototype._mtpStudyId=function(){returnthis._wptStudyId},o.prototype.pointsCount=function(){returnthis._pointsCount},inherit(n,o),n.getTooltipText=function(t){return"Down Wave 1 or A: Select Point "+((t?t._points.length:0)+1)},inherit(s,o),s.getTooltipText=function(t){return"Down Wave 2 or B: Select Point "+((t?t._points.length:0)+1)},inherit(r,o),r.getTooltipText=function(t){return"Down Wave 3: Select Point "+((t?t._points.length:0)+1)},inherit(a,o),a.getTooltipText=function(t){return"Down Wave 4: Select Point "+((t?t._points.length:0)+1)},inherit(l,o),l.getTooltipText=function(t){return"Down Wave 5: Select Point "+((t?t._points.length:0)+1)},inherit(h,o),h.getTooltipText=function(t){return"Down Wave C: Select Point "+((t?t._points.length:0)+1)},inherit(c,o),c.getTooltipText=function(t){return"Up Wave 1 or A: Select Point "+((t?t._points.length:0)+1)},inherit(d,o),d.getTooltipText=function(t){return"Up Wave 2 or B: Select Point "+((t?t._points.length:0)+1)},inherit(p,o),p.getTooltipText=function(t){return"Up Wave 3: Select Point "+((t?t._points.length:0)+1)},inherit(u,o),u.getTooltipText=function(t){return"Up Wave 4: Select Point "+((t?t._points.length:0)+1)},inherit(_,o),_.getTooltipText=function(t){return"Up Wave 5: Select Point "+((t?t._points.length:0)+1)},inherit(f,o),f.getTooltipText=function(t){return"Up Wave C: Select Point "+((t?t._points.length:0)+1)},e.LineStudyMtpDownWave1OrA=n,e.LineStudyMtpDownWave2OrB=s,e.LineStudyMtpDownWave3=r,e.LineStudyMtpDownWave4=a,e.LineStudyMtpDownWave5=l,e.LineStudyMtpDownWaveC=h,e.LineStudyMtpUpWave1OrA=c,e.LineStudyMtpUpWave2OrB=d,e.LineStudyMtpUpWave3=p,e.LineStudyMtpUpWave4=u,e.LineStudyMtpUpWave5=_,e.LineStudyMtpUpWaveC=f},,,function(t,e,i){"use strict";functiono(t){this._data=t}functionn(t,e){c.call(this,t,e),this._invalidated=!0}functions(t,e){n.call(this,t,e),this._invalidated=!0}functionr(t,e){s.call(this,t,e),this._invalidated=!0}functiona(t,e){n.call(this,t,e),this._invalidated=!0}functionl(t,e){this._constructor="LineToolPitchfork";vari=e||this.createPropertiesObject("linetoolpitchfork");d.call(this,t,newn(this,t),i),this._properties.style.listeners().subscribe(this,l.prototype._recreatePaneView),this._recreatePaneView()}varh=i(2),c=i(9),d=i(1).LineDataSource,p=i(23),u=i(11).TrendLineRenderer,_=i(47).Action,f=i(8),m=i(6),g=i(14);o.prototype.extendPoints=function(t,e,i){varo=newh.Point(0,-5e3),n=newh.Point(i,5e3),s=e.substract(t),r=h.intersectRayWithRect(e,e.add(s),o,n);returnr&&(e=r),!h.pointInRect(t,o,n)&&h.pointInRect(e,o,n)&&(r=h.intersectRayWithRect(e,t,o,n))&&(t=r),
void0!==t&&t&&t.exports&&(t.exports={inherit:n,clone:l.clone,merge:l.merge,isNumber:e,isInteger:l.isInteger,isBoolean:l.isBoolean,isString:l.isString,isObject:c,isHashObject:d,isNaN:l.isNaN,isAbsent:l.isAbsent,isExistent:l.isExistent,isSameType:l.isSameType,isArray:h,parseBool:l.parseBool,parseJSONorNot:i,ensure:a,declareClassAsPureInterface:s,requireFullInterfaceImplementation:r})}).call(e,i(50)(t))},function(t,e){"use strict";vari,o,n,s;Object.defineProperty(e,"__esModule",{value:!0}),i={},o=RegExp("^([0-9]*)$"),n=RegExp("^(\\d*)([DWMS])$"),s=function(){functiont(e,i){if(void0===i&&e!==t.INVALID)returnt.parse(e);varo=e;o!==t.SECONDS&&o!==t.MINUTES&&o!==t.HOURS&&o!==t.DAYS&&o!==t.WEEKS&&o!==t.MONTHS&&o!==t.INVALID&&(o="invalid"),this._kind=o,this._multiplier=i}returnt.prototype.kind=function(){returnthis._kind},t.prototype.multiplier=function(){returnthis._multiplier},t.prototype.isValid=function(){returnthis.kind()!==t.INVALID},t.prototype.isDWM=function(){returnthis.isValid()&&!this.isIntraday()},t.prototype.isIntraday=function(){return-1!==[t.SECONDS,t.MINUTES,t.HOURS].indexOf(this.kind())},t.prototype.letter=function(){returnthis.isValid()&&this.kind()!==t.MINUTES?this.kind()[0].toUpperCase():""},t.prototype.value=function(){returnthis.isValid()?this.kind()===t.MINUTES?this.multiplier()+"":this.multiplier()+this.letter():""},t.prototype.isEqualTo=function(e){if(!(einstanceoft))throwError("Argument is not an Interval");returnthis.kind()!==t.INVALID&&e.kind()!==t.INVALID&&(this.kind()===e.kind()&&this.multiplier()===e.multiplier())},t.prototype.inMilliseconds=function(){if(!this.isValid()||this.kind()===t.MONTHS)returnNaN;vare=this.multiplier();returnvoid0===e?NaN:i[this.kind()]*e},t.isEqual=function(e,i){returnt.parse(e).isEqualTo(t.parse(i))},t.parse=function(e){vari,s;returne=(e+"").toUpperCase().split(",")[0],i={D:t.DAYS,W:t.WEEKS,M:t.MONTHS,H:t.HOURS,S:t.SECONDS},(s=o.exec(e))?newt(t.MINUTES,parseInt(e,10)):(s=n.exec(e),s?newt(i[s[2]],parseInt(s[1],10)?parseInt(s[1],10):1):newt(t.INVALID))},t.isDWM=function(e){returnt.parse(e).isDWM()},t.kind=function(e){returnt.parse(e).kind()},t.isValid=function(e){returnt.parse(e).isValid()},t}(),s.SECONDS="seconds",s.MINUTES="minutes",s.HOURS="hours",s.DAYS="days",s.WEEKS="weeks",s.MONTHS="months",s.INVALID="invalid",e.Interval=s,i[s.SECONDS]=1e3,i[s.MINUTES]=60*i[s.SECONDS],i[s.HOURS]=60*i[s.MINUTES],i[s.DAYS]=24*i[s.HOURS],i[s.WEEKS]=7*i[s.DAYS]},,,,,function(t,e,i){(function(t){"use strict";functione(){}functioni(t){if(!(thisinstanceofi))returnnewi(t);arguments.length>0&&(this._value=t),this._listeners=[]}i.prototype.value=function(){returnthis._owner?this._owner._value:this._value},i.prototype.setValue=function(t,e){vari,o,n,s=this._owner?this._owner:this;if("function"==typeofs.hook&&(t=s.hook(t)),s.writeLock)returns._value;if(!e&&s._value===t&&s.hasOwnProperty("_value"))returnt;for(s._value=t,i=s._listeners.slice(),o=0,n=0;n<i.length;n++)i[n].once&&(s._listeners.splice(n-o,1),o++),i[n].cb(t);returnt},
i.prototype.deleteValue=function(){vart,e,i,o=this._owner?this._owner:this;if(o.hasOwnProperty("_value")){if(o.writeLock)returno._value;for(deleteo._value,t=o._listeners.slice(),e=0,i=0;i<t.length;i++)t[i].once&&(o._listeners.splice(i-e,1),e++),t[i].cb()}},i.prototype.subscribe=function(t,e){vari,o,n;if("function"!=typeoft)thrownewTypeError("callback must be a function");i=!!e&&!!e.once,o=!!e&&!!e.callWithLast,n=this._owner?this._owner:this,o&&n.hasOwnProperty("_value")&&(t(n._value),i)||n._listeners.push({cb:t,owner:this,once:!!e&&!!e.once})},i.prototype.unsubscribe=function(t){vare,i,o=this._owner?this._owner:this;for(void0===t&&(t=null),e=o._listeners,i=e.length;i--;)e[i].owner!==this&&o!==this||e[i].cb!==t&&null!==t||e.splice(i,1)},i.prototype.listeners=function(){return(this._owner?this._owner:this)._listeners},i.prototype.readonly=function(){if(this._readonlyInstance)returnthis._readonlyInstance;vart=this._readonlyInstance=newe;returnt.subscribe=this.subscribe.bind(this),t.unsubscribe=this.unsubscribe.bind(this),t.value=this.value.bind(this),t.when=this.when.bind(this),t.spawn=function(){returnthis.spawn().readonly()}.bind(this),t},i.prototype.spawn=function(){vart=newi;returndeletet._listeners,t._owner=this._owner||this,t.destroy=function(){this.unsubscribe(),deletethis._owner},t},i.prototype.when=function(t){vare,i=this;if(this.value())returnvoidt();e=function(o){o&&(i.unsubscribe(e),t())},i.subscribe(e)},i.prototype.opposite=function(){vart,e;returnthis._opposite||(t=this,e=newi(!this.value()),this.subscribe(function(t){e.setValue(!t)}),e.subscribe(function(e){t.setValue(!e)}),this._opposite=e),this._opposite},"undefined"!=typeofwindow&&(window.WatchedValue=i),void0!==t&&t&&t.exports&&(t.exports=i)}).call(e,i(50)(t))},function(t,e,i){(function(e,o,n){"use strict";functions(t){return"cursor"===t||"arrow"===t||"dot"===t}functionr(t){!t&&d&&d.stayInDrawingMode.value()||this.tool.setValue(this.cursorTool.value())}functiona(t,e){returnfunction(e){t.inFire||(t.inFire=!0,t.fire(e),t.inFire=!1)}}functionl(){K||(g.setValue(TVSettings.getValue("chart.cursorPreference","cursor")),g.subscribe(function(t){s(t)&&v.setValue(t)},{callWithLast:!0}),v.subscribe(function(t){t&&TVSettings.setValue("chart.cursorPreference",t)}),d=newh("drawings"),p=newn,u=newn,_=newn,f=newn,p.setValue(!1),u.setValue(!1),_.setValue(!1),f.setValue(!1),g.subscribe(function(){c.emit("onSelectedLineToolChanged")}),K=!0)}varh=i(7).DefaultProperty,c=i(34),d=null,p=null,u=null,_=null,f=null,m=newe,g=newe,v=newe,y=newo,b=newo,w=newo,S=newo,T=newo,C=newo,x=newo,P=newo,L=newo,k=newo,I=newo,A=newo,E=newo,M=newo,D=newo,O=a(y),$=a(b),V=a(w),B=a(S),R=a(T),N=a(C),F=a(x),z=a(P),W=a(L),H=a(k),U=a(I),j=a(A),q=a(E),Y=a(M),G=a(D),K=!1;t.exports={tool:g,cursorTool:v,toolIsCursor:s,resetToCursor:r,init:l,createdLineTool:y,continuedLineTool:b,cancelledLineTool:w,createLineTool:O,continueLineTool:$,cancelLineTool:V,startedMovingLineTool:S,movedLineTool:T,finishedMovingLineTool:C,startMovingLineTool:B,
symbolDescription:"",interval:"",exchange:"",chartStyle:""};switch(s.description&&r?2===s.description.split("/").length?h.symbolDescription=s.description.split("/")[1]:(i=s.description.split("'").filter(function(t){returnt.length}),i.forEach(function(t){t=t&&("/"===t[0]||/\d+\/\(?/.test(t))?[t]:t.split("/").filter(function(t){returnt.length}),h.symbolDescription+=t[2===t.length?1:0]})):s.description?h.symbolDescription=s.description:h.symbolDescription=s.symbol,s.interval&&(h.interval=z(s.interval)),r&&s.description&&(o=/[\w_]+\/[\w_]+/.exec(s.description),o&&o[0]?h.provider=o[0].split("/")[0]:h.provider=s.description.split("/")[0]),s.exchange&&(h.exchange=s.exchange),s.style){casel.STYLE_RENKO:n=s.inputs.style+("ATR"===s.inputs.style?"("+s.inputs.atrLength+")":""),h.chartStyle=$.t("Renko")+" ["+s.inputs.source+", "+n+", "+e(s.boxSize,4)+"]";break;casel.STYLE_PB:h.chartStyle=$.t("Line Break")+" ["+s.inputs.source+", "+s.inputs.lb+"]";break;casel.STYLE_KAGI:n=s.inputs.style+("ATR"===s.inputs.style?"("+s.inputs.atrLength+")":""),h.chartStyle=$.t("Kagi")+" ["+s.inputs.source+", "+n+", "+e(s.reversalAmount,8)+"]";break;casel.STYLE_PNF:n=s.inputs.style+("ATR"===s.inputs.style?"("+s.inputs.atrLength+")":""),h.chartStyle=$.t("PnF")+" ["+s.inputs.sources+", "+n+", "+e(s.boxSize,8)+", "+s.inputs.reversalAmount+"]";break;casel.STYLE_HEIKEN_ASHI:h.chartStyle=$.t("Heikin Ashi")}returna=h.symbolDescription+(h.interval?", "+h.interval:"")+(h.provider?", "+h.provider:"")+(h.exchange?", "+h.exchange:"")+(h.chartStyle?", "+h.chartStyle:""),a=a.replace(/\'/g,"")},l.prototype.changeProperties=function(t){t!==this._properties.symbol&&t!==this._properties.interval&&t!==this._properties.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews(),this.m_model.updateSource(this))},l.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},l.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},l.prototype.onData=function(t){vare,i,o,n,s,r,a,h,c,d,p,u,_,f,m,g,v,y,w=this;switch(t.method){case"symbol_resolved":if(t.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+t.params[0]);break}this.updateSymbolInfo(t.params[1]),this.m_model.updateSource(this),this._symbolResolved.fire(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||F("Symbol",t.params[1].listed_exchange,t.params[1].name),e=this.symbolInfo().minmov/this.symbolInfo().pricescale,i=this.properties(),i.style.value()===l.STYLE_RENKO&&i.renkoStyle.inputs.boxSize.value()<e?i.renkoStyle.inputs.merge({boxSize:e}):i.style.value()===l.STYLE_PNF&&i.pnfStyle.inputs.boxSize.value()<e?i.pnfStyle.inputs.merge({boxSize:e}):i.style.value()===l.STYLE_KAGI&&i.kagiStyle.inputs.reversalAmount.value()<e&&i.kagiStyle.inputs.merge({reversalAmount:e});break;case"symbol_error":if(t.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+t.params[0]);break}if(this._setStatus(l.STATUS_INVALID_SYMBOL),
this._properties.shortName.setValue(this._properties.symbol.value()),this.m_model.clearAllStudies(),this.updateAllViews(),this.m_model.updateSource(this),t.params[1]===l.PERMISSION_DENIED)switch(t.params[2]){casel.PD_REASON_EXTENDED_HOURS:this._extendedHoursNotPermitted.fire();break;casel.PD_REASON_SYMBOL:this._symbolNotPermitted.fire(t.params[3]);break;casel.PD_REASON_GROUP_PERMISSION:this._symbolGroupNotPermitted.fire(t.params[3]);break;default:this._symbolNotPermitted.fire(t.params[2])}elsethis.m_model.resetTimeScale(),this._symbolError.fire();this.m_model.realignLineTools();break;case"series_timeframe":if(t.params[1]!==this._turnaround)break;o=t.params[2],n=t.params[3],s=t.params[4],r=void0!==s&&s?n:n+10,this.m_model.setTimeViewport(o,r);break;case"series_error":a=t.params[2],deletethis._loadingStartTime,b.enabled("charting_library_debug_mode")&&U.logNormal("Error reason: "+a),this._setStatus(b.enabled("no_bars_status")&&this._symbolInfo?l.STATUS_NO_BARS:l.STATUS_INVALID_SYMBOL),a&&a.startsWith("study_not_auth:")?(h=a.split(":",2)[1].split("@",2)[0],hin{BarSetRenko:!0,BarSetPriceBreak:!0,BarSetKagi:!0,BarSetPnF:!0}?this.chartTypeNotPermitted.fire(h):"BarSetSpread"===h&&this.intradaySpreadNotPermitted.fire()):"resolution_not_entitled"===a?this.intradayExchangeNotPermitted.fire():"custom_resolution"===a&&this.customIntervalNotPermitted.fire(),this._seriesLoaded=!0;break;case"series_loading":if(t.params[1]!==this._turnaround)break;if(t.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}this._setStatus(l.STATUS_LOADING),w._loadingStartTime=(newDate).getTime();break;case"series_completed":if(t.params[2]!==this._turnaround)break;if(t.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}switch(c="chartSession:"+w._chartApi._sessionid,d=(newDate).getTime()-this._loadingStartTime,U.logDebug(c+", Series loading took "+d+" ms, eod:"+this._endOfData),deletethis._loadingStartTime,p=t.params[1],"pulsed"===p&&(p="delayed"),p){case"streaming":this._setStatus(l.STATUS_READY);break;case"endofday":this._setStatus(l.STATUS_EOD);break;case"delayed":this._setStatus(l.STATUS_DELAYED);break;case"pulsed":this._setStatus(l.STATUS_PULSE)}p.match(/delayed_streaming/)&&this._setStatus(l.STATUS_DELAYED_STREAMING),u=this.m_model.paneForSource(this),u.recalculatePriceScale(this.priceScale()),this.m_model.invalidate(newM(M.FULL_UPDATE)),this.m_data.size()&&this._tickmarksRangeChanged.fire({start:this.data().first().value[TradingView.TIME_PLOT],end:this.data().last().value[TradingView.TIME_PLOT]}),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0),this.model().recalcStudyBasedLineTools(),!this.isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale()._correctOffset(),this.model().timeScale().correctBarSpacing(),_=this.model().timeScale().visibleBars(),this.priceScale().setPriceRange(this.priceRange(_.firstBar(),_.lastBar()))),
this._seriesLoaded=!0,this._onCompleted.fire(this._endOfData),this.requestMoreData();break;case"series_deleted":break;case"data_update":if(t.params.customId!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+t.params.customId);break}if(this.status()===l.STATUS_INVALID_SYMBOL)break;t.params.plots.length?(f=this.m_data.m_bars.size(),m=this.m_data.m_bars.first(),g=void0!==m?m.valueOf():null,v=this.m_data.m_bars.merge(t.params.plots),(null===g||v.earliestRow.index<g)&&(this._endOfData=!1),y="Merge bars. Changes:{length:"+v.length+", earliestRow:"+v.earliestRow.index+"} ",y+="bars state:{firstBar:"+this.m_data.m_bars.first()+",lastBar:"+this.m_data.m_bars.last()+",size:"+this.m_data.m_bars.size()+"}",j.logDebug(y),f!==this.bars().size()&&(this._barReceived.fire(this.m_data.m_bars.size()),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0))):(this.m_data.clear(),this._startLoading.fire()),newPromise(function(e){vari=w.properties().style.value();!t.params.nonseries||i!==l.STYLE_RENKO&&i!==l.STYLE_KAGI&&i!==l.STYLE_PNF&&i!==l.STYLE_HEIKEN_ASHI&&i!==l.STYLE_PB?(t.params.nonseries||(w.m_data.m_nsBars.clear(),w.m_data.lastProjectionPrice=void0),e(),e()):w.parseJapProjBars(t.params.nonseries).then(function(t){w.m_data.m_nsBars=t.nsBars,w.m_data.lastProjectionPrice=t.lastPrice;vari=w.m_data.boxSize!==t.boxSize;w.m_data.boxSize=t.boxSize,w.m_data.reversalAmount=t.reversalAmount,i&&w._boxSizeChanged.fire(w.m_data.boxSize),e()})}).then(function(){vart=w.m_model.paneForSource(w);w.m_model.updateAllVolumeStudies(),w.m_model.recalculatePane(t),w.m_model.updateSource(w),w.m_model.updateLineTools(),w.m_model.updateCrossHair()})}this._dataLoaded.fire(t)},l.prototype.fixBoxSize=function(){vart=this.model().timeScale(),e=this.priceScale();e.isEmpty()||t.isEmpty()||(this.m_data.boxSize=Math.abs(e.coordinateToPrice(t.barSpacing())-e.coordinateToPrice(0)))},l.prototype.parseJapProjBars=function(t){vare,i,o,n=newB(["time","open","high","low","close","adt","style"]),s=this.model().timeScale(),r=this.properties().style.value(),a=this;returnnewPromise(function(h){t.d&&""!==t.d?TradingView.Study.prototype._makeJSONForNSData.call(a,{params:{nonseries:t}}).then(function(a){varc,d,p,u,_=a.data;for(e=_.price,i=_.boxSize,o=_.reversalAmount,c=_.bars,d=0;c&&d<c.length;d++)p=[],u=t.indexes[c[d].time],p.push(s.points().valueAt(u)),p.push(c[d].open),p.push(c[d].high),p.push(c[d].low),p.push(c[d].close),p.push(c[d].volume),r===l.STYLE_KAGI?p.push(c[d].additionalPrice):r===l.STYLE_PNF&&p.push(c[d].factor),n.add(u,p);h({nsBars:n,lastPrice:e,boxSize:i,reversalAmount:o})}):h({nsBars:n,lastPrice:e,boxSize:i,reversalAmount:o})})},l.prototype.disconnect=function(){this._symbolId=null,this._seriesId=null,this._predictBars=0,this._status=l.STATUS_OFFLINE},l.prototype.isStarted=function(){return!!this._symbolId},l.prototype.restart=function(){vart,e=i(153);this._onRestarted.fire(),this._setStatus(l.STATUS_RESOLVING),this.m_data=newE(this,this.model()),this._prevSymbolId=this._symbolId,
;throwError("Missed short name for style "+t)},l.prototype.getInputsProperties=function(){returnthis._properties[this.getStyleShortName()+"Style"].inputs||news},l.prototype.getRealVisibleRange=function(){vart=this.model().timeScale().visibleBars(),e=this.data().search(t.m_firstBar,TradingView.SEARCH_NEAREST_RIGHT),i=this.data().search(t.m_lastBar,TradingView.SEARCH_NEAREST_LEFT);returnvoid0===e||void0===i?null:neww(e.index,i.index)},l.prototype.isLockScale=function(){returnthis.properties().lockScale.value()},l.prototype.firstValue=function(){returnthis.data().firstValue()},l.prototype.firstBar=function(){returnthis.data().firstBar()};l.prototype.sessionsStudy=function(){vart,e,i,o;if(this._sessionsStudy)returnthis._sessionsStudy;for(t=this.model().paneForSource(this),e=t.dataSources(),i=0;i<e.length;i++)if((o=e[i])instanceofTradingView.Study&&"Sessions"===o.metaInfo().shortId)returnthis._sessionsStudy=o,this._sessionsStudy;return!1},l.prototype.createSessStudy=function(){if(!b.enabled("charting_library_base")&&!this.sessionsStudy()){vart=R.findStudyMetaInfo(this.model().studiesMetaData(),"Sessions@tv-basicstudies");this.model().insertStudy(t,!1,!0),this._onSessionsStudyCreated.fire()}},l.prototype.checkSessStudy=function(){b.enabled("charting_library_base")||(this.sessionsStudy()||this.createSessStudy(),this.sessionsStudy().start())},l.prototype.isSpread=function(){return"spread"===this._symbolInfo.type},l.prototype.firstSymbol=function(){returnthis._symbolInfo?this._symbolInfo.legs[0]:""},l.prototype.firstShortName=function(){returnO.ticker(this.firstSymbol())},l.prototype.onSessionsStudyCreated=function(){returnthis._onSessionsStudyCreated},l.prototype.loadDataTo=function(t){this._turnaround="s"+++this._turnaroundCounter;vare=this._properties.interval.value();e=this._generateTimeframe(e,t),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,e,this._handler)},l.prototype.checkInterval=function(){if(this._symbolInfo&&(k.kind(this.interval())!==k.MINUTES||this._symbolInfo.has_intraday||this.requestingIntradayWhenNotSupported.fire(),this._symbolInfo.hasOwnProperty("supported_resolutions"))){vart=this._properties.interval.value();-1===this._symbolInfo.supported_resolutions.indexOf(t)&&this.requestingResolutionWhenNotSupported.fire(this._symbolInfo.supported_resolutions[0])}},l.prototype.setPriceScale=function(t){this.m_priceScale!==t&&(this.m_priceScale=t,this.priceScaleChanged.fire(t))},l.prototype.setGotoDateResult=function(t){this._gotoDateResult=t},l.prototype.gotoDateResult=function(){returnthis._gotoDateResult},l.prototype.syncModel=function(){vart,e;if(!this._syncModel){if(t=this.symbolInfo(),e=this.interval(),!t||!e)returnnull;this._syncModel=newN(t,e)}returnthis._syncModel},l.prototype.turnaround=function(){returnthis._turnaround},TradingView.Series=l,t.exports=l}).call(e,i(15),i(41),i(107),i(24))},function(t,e){"use strict";functioni(t,e){if(!t)throwError("Assertion failed"+(e?": "+e:""))}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=i
e.ActionSeparator=n,e.ActionPlaceholder=s}).call(e,i(15))},function(t,e,i){(function(t){"use strict";functiono(){this._zorder=0,this.m_priceScale=null,this._id=r.randomHashN(6),this._ownerSource=null,this._userEditEnabled=!0,this.hasAlert=newt(!1)}functionn(t){o.call(this),this._isOverlay=null,this._model=t}vars=i(7).DefaultProperty,r=i(60);o.prototype.createPropertiesObject=function(t,e,i){returnnews(t,e,i)},o.prototype.id=function(){returnthis._id},o.prototype.uniqueId=function(){returnthis._id},o.prototype.setId=function(t){this._id=t},o.prototype.zorder=function(){returnthis._zorder},o.prototype.setZorder=function(t){"number"==typeoft&&this._zorder!==t&&(this._zorder=t)},o.prototype.title=function(){throwError("Implement this fun in a subclass")},o.prototype.priceScale=function(){returnthis.m_priceScale},o.prototype.setPriceScale=function(t){this.m_priceScale=t},o.prototype.ownerSource=function(){returnthis._ownerSource},o.prototype.setOwnerSource=function(t){this._ownerSource=t,t&&this.setPriceScale(t.priceScale())},o.prototype.isSavedInChart=function(t){return!0},o.prototype.isSavedInStudyTemplates=function(){return!0},o.prototype.isRemovedByStudyTemplates=function(){return!0},o.prototype.hasContextMenu=function(){return!0},o.prototype.showInObjectTree=function(){return!0},o.prototype.setUserEditEnabled=function(t){this._userEditEnabled=t},o.prototype.userEditEnabled=function(){returnthis._userEditEnabled},o.prototype.canBeHidden=function(){returnthis.userEditEnabled()},o.prototype.isUserDeletable=function(){returnthis.userEditEnabled()},o.prototype.canHasAlert=function(){return!1},o.prototype.properties=function(){throwError("Implement this fun in a subclass")},o.prototype.statusView=function(){returnnull},o.prototype.dataWindowView=function(){returnnull},o.prototype.priceAxisViews=function(t,e){returnnull},o.prototype.updateAllViews=function(){},o.prototype.paneViews=function(t){returnnull},o.prototype.isChildStudy=function(){return!1},o.prototype.hasChildren=function(){return!1},o.prototype.canHaveChildren=function(){return!1},o.prototype.onClickOutside=function(){},inherit(n,o),n.prototype.isNoScale=function(){return!!this._isOverlay},n.prototype.base=function(){return0},n.prototype.formatter=function(){returnnull},n.prototype.model=function(){returnthis._model},n.prototype.priceRange=function(t,e){returnnull},n.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},e.DataSource=o,e.PriceDataSource=n}).call(e,i(41))},function(t,e,i){"use strict";functiono(t,e,i,o,n){this._wptStudyId=o,this._pointsCount=n,m.call(this,t,e,i)}functionn(t,e,i){o.call(this,t,e,i,"mtp_wpt_down1ora",2)}functions(t,e,i){o.call(this,t,e,i,"mtp_wpt_down2orb",2)}functionr(t,e,i){o.call(this,t,e,i,"mtp_wpt_down3",3)}functiona(t,e,i){o.call(this,t,e,i,"mtp_wpt_down4",2)}functionl(t,e,i){o.call(this,t,e,i,"mtp_wpt_down5",5)}functionh(t,e,i){o.call(this,t,e,i,"mtp_wpt_downc",3)}functionc(t,e,i){o.call(this,t,e,i,"mtp_wpt_up1ora",2)}functiond(t,e,i){
o.call(this,t,e,i,"mtp_wpt_up2orb",2)}functionp(t,e,i){o.call(this,t,e,i,"mtp_wpt_up3",3)}functionu(t,e,i){o.call(this,t,e,i,"mtp_wpt_up4",2)}function_(t,e,i){o.call(this,t,e,i,"mtp_wpt_up5",5)}functionf(t,e,i){o.call(this,t,e,i,"mtp_wpt_upc",3)}varm=i(104);inherit(o,m),o.prototype._studyInputs=function(){vart,e,i,o,n=this.points();if(n.length<this.pointsCount())returnnull;for(t=[this.properties().inputs.displayZoneLabels.value()],e=0;e<this.pointsCount();++e){if(i=n[e].index,!(o=this._model.mainSeries().bars().valueAt(i)))returnnull;t.push(1e3*o[TradingView.TIME_PLOT])}returnt},o.prototype._mtpStudyId=function(){returnthis._wptStudyId},o.prototype.pointsCount=function(){returnthis._pointsCount},inherit(n,o),n.getTooltipText=function(t){return"Down Wave 1 or A: Select Point "+((t?t._points.length:0)+1)},inherit(s,o),s.getTooltipText=function(t){return"Down Wave 2 or B: Select Point "+((t?t._points.length:0)+1)},inherit(r,o),r.getTooltipText=function(t){return"Down Wave 3: Select Point "+((t?t._points.length:0)+1)},inherit(a,o),a.getTooltipText=function(t){return"Down Wave 4: Select Point "+((t?t._points.length:0)+1)},inherit(l,o),l.getTooltipText=function(t){return"Down Wave 5: Select Point "+((t?t._points.length:0)+1)},inherit(h,o),h.getTooltipText=function(t){return"Down Wave C: Select Point "+((t?t._points.length:0)+1)},inherit(c,o),c.getTooltipText=function(t){return"Up Wave 1 or A: Select Point "+((t?t._points.length:0)+1)},inherit(d,o),d.getTooltipText=function(t){return"Up Wave 2 or B: Select Point "+((t?t._points.length:0)+1)},inherit(p,o),p.getTooltipText=function(t){return"Up Wave 3: Select Point "+((t?t._points.length:0)+1)},inherit(u,o),u.getTooltipText=function(t){return"Up Wave 4: Select Point "+((t?t._points.length:0)+1)},inherit(_,o),_.getTooltipText=function(t){return"Up Wave 5: Select Point "+((t?t._points.length:0)+1)},inherit(f,o),f.getTooltipText=function(t){return"Up Wave C: Select Point "+((t?t._points.length:0)+1)},e.LineStudyMtpDownWave1OrA=n,e.LineStudyMtpDownWave2OrB=s,e.LineStudyMtpDownWave3=r,e.LineStudyMtpDownWave4=a,e.LineStudyMtpDownWave5=l,e.LineStudyMtpDownWaveC=h,e.LineStudyMtpUpWave1OrA=c,e.LineStudyMtpUpWave2OrB=d,e.LineStudyMtpUpWave3=p,e.LineStudyMtpUpWave4=u,e.LineStudyMtpUpWave5=_,e.LineStudyMtpUpWaveC=f},,,function(t,e,i){"use strict";functiono(t){this._data=t}functionn(t,e){c.call(this,t,e),this._invalidated=!0}functions(t,e){n.call(this,t,e),this._invalidated=!0}functionr(t,e){s.call(this,t,e),this._invalidated=!0}functiona(t,e){n.call(this,t,e),this._invalidated=!0}functionl(t,e){this._constructor="LineToolPitchfork";vari=e||this.createPropertiesObject("linetoolpitchfork");d.call(this,t,newn(this,t),i),this._properties.style.listeners().subscribe(this,l.prototype._recreatePaneView),this._recreatePaneView()}varh=i(2),c=i(9),d=i(1).LineDataSource,p=i(23),u=i(11).TrendLineRenderer,_=i(47).Action,f=i(8),m=i(6),g=i(14);o.prototype.extendPoints=function(t,e,i){
void0!==e.counter&&("function"==typeofe.counter?(T=$('<span class="counter"></span>').html(e.counter()),T.appendTo(p)):(C=e.counterBlue?"blue":"",$('<span class="counter"></span>').text(e.counter+"").addClass(C).appendTo(p))),r.append(p),voidt.data("popup-menu",r))}var_,f,m,g,v,y,b,w,S,T,C,x,P,L,k,I,A,E,M,D,O,V,B,R,N,F,z=r||e;if("function"==typeofz&&(z=z()),$(this).hasClass("open")||$(this).hasClass("active"))returns.preventDefault(),l(),void(_=h.scrollTop);switch(l=function(){h.scrollTop=f.scrollTop(),f.remove(),t.removeClass("active open "+o.activeClass),t.data("popup-menu",null),$(document).off("click",p),$(document).off("mousedown",d),Modernizr.touch&&$(document).off("touchstart.chartgui",d),$(document).off("selectstart.popup-menu"),l=a,o.onRemove&&o.onRemove()},t.addClass("active open "+o.activeClass),f=$('<div class="charts-popup-list">'),o.addClass&&f.addClass(o.addClass),o.zIndex&&f.css("z-index",o.zIndex),m=f,o.listInner&&(m=$('<div class="list-inner">').appendTo(m)),o.listTable&&(m=$('<div class="list-table">').appendTo(m)),$.each(z,function(t){u(this,t,m)}),setTimeout(function(){$(document).on("click",p),$(document).on("mousedown",d),Modernizr.touch&&$(document).on("touchstart.chartgui",d)},0),o.upAction&&$(document).on("selectstart.popup-menu",function(){return!1}),f.appendTo(document.body),g=$(window).width(),v=Math.min($(window).height(),$("body").height()),y=t.outerWidth(),b=t.outerHeight(),w=t.offset(),_=$(window).scrollTop()||0,w.top-=_,w.top=Math.round(w.top),w.left=Math.round(w.left),S=f.outerWidth(),T=f.outerHeight(),C=void0!==o.viewportSpacing?o.viewportSpacing:10,x=o.popupSpacing?~~o.popupSpacing:1,P=o.popupDrift?~~o.popupDrift:0,L=T-f.height(),k="down",o.direction&&(k="function"==typeofo.direction?o.direction():o.direction),I=!!o.reverse,"down"===k?(A=v-w.top-b-x-C-L,E=w.top-x-C-L,A<Math.max(T||0,100)&&E>A&&(k="up")):"right"===k&&(M=g-w.left-y-x-C-L,D=w.left-x-C-L,M<Math.max(S||0,100)&&D>M&&(k="left")),k){case"down":case"up":"down"===k?f.css("top",w.top+b+x+"px"):f.css("bottom",v-w.top+x+"px").css("top","auto"),I?f.css("left",Math.max(w.left+P+y-S,C)+"px").css("right","auto"):f.css("left",w.left+P+"px").css("right","auto");break;case"right":case"left":x=Math.max(x,4),"right"===k?f.css("left",Math.floor(w.left+y+x)+"px").css("right","auto"):f.css("left",Math.floor(Math.max(w.left-S-x,C))+"px").css("right","auto"),I?f.css("top",Math.floor(Math.max(w.top+P+b-T,C))+"px"):f.css("top",Math.floor(w.top+P)+"px")}for(f.show(),O=w.top,"up"===k||{left:1,right:1}[k]&&I?"up"!==k?O+=b:O-=b+x+L+C:O=v-O-b-2*x-L,f.height()>O&&f.addClass("popup-menu-scroll-y"),f.css("max-height",O+"px"),o.careRightBorder&&(V=g+$(window).scrollLeft(),parseInt(f.css("left"))+f.width()+C>V&&f.css("left",V-f.width()-C+"px").css("right","auto")),o.careBottomBorder&&parseInt(f.css("top"))+f.height()+C>v+_&&f.css("top",v-f.height()-C+_+"px"),R=t.parents().andSelf(),N=R.size();N--;)if("fixed"===R.eq(N).css("position")){B=R.eq(N);break}B&&(F=f.offset(),f.css({position:"fixed",left:F.left-$(document).scrollLeft(),right:"auto"})),
f[0].scrollHeight>f.height()&&f.addClass("popup-with-scroll"),s&&s.preventDefault()},s&&t.bind(s,c),r&&t.bind(r,function(){l()}),o.runOpened&&c()};n.TabGroup=functiont(e){if(!(thisinstanceoft))returnnewt(e);e=e||{},this.tabs=[],"function"==typeofe.onChange&&(this.onChange=e.onChange)},n.TabGroup.prototype.appendTab=function(t,e,i){if(null==t?t="":t+="",e||(e=[]),i||(i={}),!Array.isArray(e))thrownewTypeError("items must be an array");returnthis.tabs.push({name:t,items:e,active:!!i.active}),e},n.Header=functiont(e){if(!(thisinstanceoft))returnnewt(e);this.title=e},n.Group=functiont(e){if(!(thisinstanceoft))returnnewt(e);e=e||{},this.items=[],this.title=null==e.title?"":e.title+"",this.collapsible=!!e.collapsible,this.collapsed=!!e.collapsed,"function"==typeofe.onChange&&(this.onChange=e.onChange)},n.Group.prototype.push=function(){this.items.push.apply(this.items,arguments)},e.bindPopupMenu=n,o=function(t){t=$(t),t.unbind(".popup-menu"),t.removeData("popup-menu")},e.unbindPopupMenu=o},function(t,e,i){"use strict";functiono(t,e,i){s.call(this,t,e),this._linetool=i,this.prepareLayout()}varn=i(5),s=n.PropertyPage,r=n.GreateTransformer,a=n.LessTransformer,l=n.ToIntTransformer,h=n.SimpleStringBinder;i(126),inherit(o,s),o.BarIndexPastLimit=-5e4,o.BarIndexFutureLimit=15e3,o.prototype.bindBarIndex=function(t,e,i,n){vars=[l(t.value()),r(o.BarIndexPastLimit),a(o.BarIndexFutureLimit)];this.bindControl(newh(e,t,s,!1,i,n))},o.prototype.createPriceEditor=function(t){vare,i=this._linetool.ownerSource().formatter(),o=function(t){returni.format(t)},n=function(t){vare=i.parse(t);if(e.res)returne.price?e.price:e.value},s=$("<input type='text'>");returns.TVTicker({step:i._minMove/i._priceScale||1,formatter:o,parser:n}),t&&(e=[function(e){vari=n(e);returnvoid0===i?t.value():i}],this.bindControl(newh(s,t,e,!1,this.model(),"Change "+this._linetool+" point price")).addFormatter(function(t){returni.format(t)})),s},o.prototype._createPointRow=function(t,e,i){varo,n,s,r,a,l=$("<tr>"),h=$("<td>");returnh.html($.t("Price")+i),h.appendTo(l),o=$("<td>"),o.appendTo(l),n=this.createPriceEditor(e.price),n.appendTo(o),s=$("<td>"),s.html($.t("Bar #")),s.appendTo(l),r=$("<td>"),r.appendTo(l),a=$("<input type='text'>"),a.appendTo(r),a.addClass("ticker"),this.bindBarIndex(e.bar,a,this.model(),"Change "+this._linetool+" point bar index"),l},o.prototype.prepareLayoutForTable=function(t){vare,i,o,n,s,r=this._linetool.points(),a=r.length;for(e=0;e<r.length;e++)i=r[e],(o=this._linetool.properties().points[e])&&(n=e||a>1?" "+(e+1):"",s=this._createPointRow(i,o,n),s.appendTo(t))},o.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},o.prototype.widget=function(){returnthis._table},t.exports=o},function(t,e,i){"use strict";functiono(t,e){b.call(this,t,e),this._rendererCache=[{},{},{},{},{},{}],this._invalidated=!0}functionn(t,e){
functione(t){returnvoid0===t.x||TradingView.isNaN(t.x)||null===t.x||void0===t.y||TradingView.isNaN(t.y)||null===t.y}vari,o,n;if(this._data)for(t.strokeStyle="#6B6B6B",t.fillStyle="#D6D6D6",i=this._data.vertOffset||0,o=0;o<this._data.points.length;o++)n=this._data.points[o],e(n)||this._drawMarker(t,n,i)},o.prototype._drawMarker=function(t,e,i){t.beginPath(),t.arc(e.x+.5,e.y+.5+i,o.RADIUS,0,2*Math.PI,!0),t.closePath(),t.fill(),t.stroke()},o.prototype.hitTest=function(t){vare,i;if(!this._data)returnnull;for(e=0;e<this._data.points.length;e++)if(i=this._data.points[e],i.substract(t).length()<=o.RADIUS+this.tolerance)returnnewr(this._data.hittestResult,i.data);returnnull},n.OUTER_RADIUS=TradingView.isMobile.any()?16:8,n.prototype.tolerance=2,n.prototype.draw=function(t){vare,i,o,n,s,r,a,l,h,c=this._data.currentPoint,d=this._data.outerStrokeWidth||1;for(e=0;e<this._data.points.length;e++)i=this._data.points[e],o=i.substract(c).length(),n=TradingView.isInteger(i.data)&&this._data.linePointBeingEdited===i.data,s=this.radius,r=this._data.strokeWidth||2,a=o<=s+this.tolerance,l=a?1:0,s+=l,r+=l,n||(i.square?(t.fillStyle=this._data.backgroundColor,t.fillRect(i.x-s,i.y-s,2*s,2*s),t.fillStyle=this._data.color,h=s-d,t.fillRect(i.x-h,i.y-h,2*h,2*h),h=s-d-r,t.fillStyle=this._data.backgroundColor,t.fillRect(i.x-h,i.y-h,2*h,2*h)):(t.beginPath(),t.arc(i.x,i.y,s,0,2*Math.PI,!0),t.closePath(),t.fillStyle=this._data.backgroundColor,t.fill(),t.beginPath(),t.arc(i.x,i.y,s-d,0,2*Math.PI,!0),t.closePath(),t.fillStyle=this._data.color,t.fill(),t.beginPath(),t.arc(i.x,i.y,s-d-r,0,2*Math.PI,!0),t.closePath(),t.fillStyle=this._data.backgroundColor,t.fill()))},n.prototype.hitTest=function(t){vare,i,o;for(e=0;e<this._data.points.length;e++)if(i=this._data.points[e],o=i.substract(t).length(),o<=this.radius+this.tolerance)returnnewr(this._data.hittestResult,i.data);returnnull},inherit(s,o),s.prototype._drawMarker=function(t,e,i){varn=e.isUp?1:-1,s=a.prototype._calculateVerticalOffset(this._data.barSpacing),r=a.prototype._calculateMinHeight(this._data.barSpacing),l=i+n*s+n*r;t.beginPath(),t.arc(e.x+.5,e.y+.5+l,o.RADIUS,0,2*Math.PI,!0),t.closePath(),t.fill(),t.stroke()},e.SelectionRenderer=o,e.LineAnchor=n,e.SelectionRendererArrowsUpDown=s},function(t,e,i){(function(t,e,o){"use strict";varn=i(222).regExpEscape,s=i(128).TVXWindowEvents,r=i(216).TVLocalStorage,a=window.TVSettings=function(){functioni(t){returnE+"."+t}functiono(t,e){vari;returni=M[t],window.is_authenticated&&!F||null!=i||(i=M[t]),null==i?e:i}functionl(t,e){vari=o(t,void0);if(null==i)returne;try{returnJSON.parse(i)}catch(i){return_(t),e}}functionh(t,e){vari=o(t);returnnull==i?e:!(!i||"false"===i||0==+i)}functionc(t,e,i){varn,s=o(t,void0,i);if(null==s)returne;if(n=parseFloat(s),!isFinite(n))thrownewTypeError('"'+s+'" is not float (key: "'+t+'")');returnn}functiond(t,e,i){varn,s=o(t,void0,i);if(null==s)returne;if(n=parseInt(s,10),!isFinite(n))thrownewTypeError('"'+s+'" is not int (key: "'+t+'")');returnn}functionp(t,e,i){i=i||{};varo=""+e
;returnM[t]!==o&&(M[t]=o,m(t)),i.forceFlush&&!V&&(V=setTimeout(function(){V=void0,g()},A)),a}functionu(t,e,i){returnp(t,JSON.stringify(e),i),a}function_(t,e){returne=e||{},null!=M[t]&&(deleteM[t],m(t)),e.forceFlush&&g(),a}functionf(){O=void0,D.length&&g()}functionm(t){if(z)null==M[t]?z.removeValue(i(t)):z.setValue(i(t),M[t]);elseif(!window.is_authenticated||F)try{null==M[t]?r.removeItem(i(t)):r.setItem(i(t),M[t])}catch(t){}elseD.push(t),O||(O=setTimeout(f,I));s.emit("settings",JSON.stringify({key:t,value:M[t]}))}functiong(e){vari,o,n,s,r;if(!t.enabled("widget")&&window.is_authenticated&&!F&&0!==D.length){for(i=D,D=[],o={},n=i.length;n--;)s=i[n],r=M[s],void0===r&&(r=null),o[s]=r;$.ajax({url:"/savesettings/",type:"POST",data:{delta:JSON.stringify(o)},async:!e})}}functionv(){vart,e,i;for(t=0;t<r.length;t++)e=r.key(t),i=E.length,e.substring(0,i+1)===E+"."&&(D=[],r.removeItem(e));$.post("/restoredefaults/",{},function(t){TVDialogs.showNotice("Success","Defaults has been successfully restored")}).error(function(t){})}functiony(){returnObject.keys(M)}functionb(t,e){vari,o=y(e),s=[];for(t=RegExp("^"+n(t).replace(/\\\*\\\*/gi,".+").replace(/\\\*/gi,"[^.]+")+"$","gi"),i=o.length-1;i>=0;i--)t.test(o[i])&&s.push(o[i]),t.lastIndex=0;returns}functionw(t){for(vare=0;e<B.length;++e)if(B[e].exec(t))return!0;return!1}functionS(){vare,i,o,n,s;for(M={},e=E+".",i=!t.enabled("save_chart_properties_to_local_storage"),o=r.length;o--;)(n=r.key(o))&&n.substring(0,e.length)===e&&(s=n.substring(e.length),i&&!w(s)||(M[s]=r.getItem(n)))}functionT(t){vare,i,o,n,s;for(M={},e=0===Object.keys(t).length,i=E+".",o=r.length;o--;)(n=r.key(o))&&n.substring(0,i.length)===i&&(e&&(s=n.substring(i.length),p(s,r.getItem(n))),r.removeItem(n));Object.keys(t).forEach(function(e){M[e]=t[e]+""})}functionC(t){z?T(z.initialSettings||{}):window.is_authenticated&&!F?T(t||{}):S(),R.fire()}functionx(t){z=t}varP,L,k,I,A,E,M,D,O,V,B,R,N=!1,F=t.enabled("cqg_terminal"),z=null;try{N=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(t){}returnN?(P={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},L=function(t,e,i){varo=P[t];returnnull==o?e:o},k=function(){},{loaded:!1,loadedModel:!1,getValue:L,getJSON:L,getBool:L,getFloat:L,getInt:L,setValue:k,setJSON:k,remove:k,restoreDefaults:k,keys:function(){returnObject.keys(P)},keysMask:function(){return[]},sync:k,onSync:{subscribe:function(){}}}):(I=12e4,A=10,"local"===window.environment&&(I=5e3),E="tradingview",M={},D=[],B=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/],s.on("settings",function(t){vare=JSON.parse(t);null==e.value?deleteM[e.key]:M[e.key]=e.value}),R=newe,document.addEventListener("visibilitychange",function(){
caseo.BoundToWidget:if(!this._activeChartWidget)throwError("ChartWidget is undefined");this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);break;caseo.BoundToModel:this._symbolProperty().unsubscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.unsubscribe(this._watchedSymbolListenerBound),this._mainSeries().onSymbolResolved().unsubscribe(this,this._updateSeriesSymbolInfo),this._mainSeries().onSymbolError().unsubscribe(this,this._updateSeriesSymbolInfo),this._intervalProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedInterval.unsubscribe(this._watchedIntervalListenerBound),deletethis._watchedSymbol.hook,deletethis._watchedSymbol.writeLock}this._activeChartWidget=null,this._chartWidgetBindingState=o.NotBound},t.prototype.getChartWidget=function(){returnthis._activeChartWidget},t.prototype.bindToChartWidgetCollection=function(t){vare=this;this._chartWidgetCollection=t,this.unbindFromChartWidget(),t.activeChartWidget.subscribe(function(t){e.unbindFromChartWidget(),e.bindToChartWidget(t)},{callWithLast:!0})},t.prototype.bindToSearchCharts=function(t){this.unbindFromSearchCharts(),this._searchCharts=t,t.onSearchBySymbol.subscribe(this,this._onSearchBySymbol),this._watchedSymbol.subscribe(this._onSymbolLinkBound)},t.prototype.unbindFromSearchCharts=function(){this._searchCharts&&(this._searchCharts.onSearchBySymbol.unsubscribe(this,this._onSearchBySymbol),this._watchedSymbol.unsubscribe(this._onSymbolLinkBound),this._searchCharts=null)},t.prototype._onSearchBySymbol=function(t){if(!t.resolved_symbol)throwError("no resolved_symbol");this._selfEmit=!0,this._watchedSymbol.setValue(t.resolved_symbol),this._selfEmit=!1},t.prototype._onSymbolLink=function(t){if(!this._selfEmit){if(!this._searchCharts)throwError("No search charts defined");this._searchCharts.search(t)}},t.prototype._mainSeries=function(){if(!this._activeChartWidget)throwError("ChartWidget is undefined");returnthis._activeChartWidget.model().mainSeries()},t.prototype._properties=function(){returnthis._mainSeries().properties()},t.prototype._symbolProperty=function(){returnthis._properties().symbol},t.prototype._intervalProperty=function(){returnthis._properties().interval},t.prototype._watchedSymbolListener=function(t){(r.enabled("same_data_requery")||this._symbolProperty().value()!==t)&&this._chartWidgetCollection.setSymbol(t)},t.prototype._onSymbolPropertyChange=function(){this._watchedSymbol.setValue(this._symbolProperty().value())},t.prototype._onSymbolResolved=function(t){this._proSymbol.setValue(t.pro_name||r.enabled("trading_terminal")&&(t.full_name||t.name)||""),t.aliases&&this._symbolNamesList.setValue(t.aliases)},t.prototype._updateSeriesSymbolInfo=function(){this._seriesShortSymbol.setValue(this._properties().shortName.value());vart=this._mainSeries().symbolInfo();t?(this._onSymbolResolved(t),t.hasOwnProperty("supported_resolutions")?this._watchedSupportedResolutions.setValue(t.supported_resolutions):this._watchedSupportedResolutions.setValue(void0),
this._watchedIntraday.setValue(!!t.has_intraday)):(this._watchedIntraday.deleteValue(),this._proSymbol.deleteValue())},t.prototype._watchedIntervalListener=function(t){(r.enabled("same_data_requery")||this._intervalProperty().value()!==t)&&this._chartWidgetCollection.setResolution(t)},t.prototype._onIntervalPropertyChange=function(){this._watchedInterval.setValue(this._intervalProperty().value())},t.prototype._onChartModelCreated=function(t){vare,i,n;if(!this._activeChartWidget)throwError("ChartWidget is undefined");this._chartWidgetBindingState=o.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated),e=this._symbolProperty(),e.subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(e.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound),i=this._mainSeries(),i.onSymbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=function(t){returni.symbolSameAsCurrent(t)&&(t=i.symbol()),t},i.onSymbolResolved().subscribe(this,this._updateSeriesSymbolInfo),i.onSymbolError().subscribe(this,this._updateSeriesSymbolInfo),i.onSymbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.onSymbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.onExtendedHoursNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo(),n=this._intervalProperty(),n.subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(n.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)},t}(),window.TradingView=window.TradingView||{},window.TradingView.Linking=newn,t.exports=window.TradingView.Linking},function(t,e,i){varo,n;(function(i){vars,r,a,l,h,c,d,p,u,_,f,m,g,v,y,b;!function(s){functionr(t,e){returnfunction(i,o){returnt[i]=e?e(i,o):o}}vara="object"==typeofi?i:"object"==typeofself?self:"object"==typeofthis?this:{};o=[e],void0!==(n=function(t){s(r(a,r(t)))}.apply(e,o))&&(t.exports=n)}(function(t){vare=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(variine)e.hasOwnProperty(i)&&(t[i]=e[i])};s=function(t,i){functiono(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,newo)},r=Object.assign||function(t){vare,i,o,n;for(i=1,o=arguments.length;i<o;i++){e=arguments[i];for(nine)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}returnt},a=function(t,e){vari,o,n={};for(iint)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeofObject.getOwnPropertySymbols)for(o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&(n[i[o]]=t[i[o]]);returnn},l=function(t,e,i,o){varn,s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeofReflect&&"function"==typeofReflect.decorate)a=Reflect.decorate(t,e,i,o);elsefor(s=t.length-1;s>=0;s--)(n=t[s])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a)
;returnr>3&&a&&Object.defineProperty(e,i,a),a},h=function(t,e){returnfunction(i,o){e(i,o,t)}},c=function(t,e){if("object"==typeofReflect&&"function"==typeofReflect.metadata)returnReflect.metadata(t,e)},d=function(t,e,i,o){returnnew(i||(i=Promise))(function(n,s){functionr(t){try{l(o.next(t))}catch(t){s(t)}}functiona(t){try{l(o.throw(t))}catch(t){s(t)}}functionl(t){t.done?n(t.value):newi(function(e){e(t.value)}).then(r,a)}l((o=o.apply(t,e||[])).next())})},p=function(t,e){functioni(t){returnfunction(e){returno([t,e])}}functiono(i){if(n)thrownewTypeError("Generator is already executing.");for(;l;)try{if(n=1,s&&(r=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(r=r.call(s,i[1])).done)returnr;switch(s=0,r&&(i=[0,r.value]),i[0]){case0:case1:r=i;break;case4:returnl.label++,{value:i[1],done:!1};case5:l.label++,s=i[1],i=[0];continue;case7:i=l.ops.pop(),l.trys.pop();continue;default:if(r=l.trys,!(r=r.length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){l.label=i[1];break}if(6===i[0]&&l.label<r[1]){l.label=r[1],r=i;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(i);break}r[2]&&l.ops.pop(),l.trys.pop();continue}i=e.call(t,l)}catch(t){i=[6,t],s=0}finally{n=r=0}if(5&i[0])throwi[1];return{value:i[0]?i[1]:void0,done:!0}}varn,s,r,a,l={label:0,sent:function(){if(1&r[0])throwr[1];returnr[1]},trys:[],ops:[]};returna={next:i(0),throw:i(1),return:i(2)},"function"==typeofSymbol&&(a[Symbol.iterator]=function(){returnthis}),a},u=function(t,e){for(variint)e.hasOwnProperty(i)||(e[i]=t[i])},_=function(t){vare="function"==typeofSymbol&&t[Symbol.iterator],i=0;returne?e.call(t):{next:function(){returnt&&i>=t.length&&(t=void0),{value:t&&t[i++],done:!t}}}},f=function(t,e){vari,o,n,s,r="function"==typeofSymbol&&t[Symbol.iterator];if(!r)returnt;i=r.call(t),n=[];try{for(;(void0===e||e-->0)&&!(o=i.next()).done;)n.push(o.value)}catch(t){s={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throws.error}}returnn},m=function(){for(vart=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));returnt},g=function(t){returnthisinstanceofg?(this.v=t,this):newg(t)},v=function(t,e,i){functiono(t){c[t]&&(h[t]=function(e){returnnewPromise(function(i,o){d.push([t,e,i,o])>1||n(t,e)})})}functionn(t,e){try{s(c[t](e))}catch(t){l(d[0][3],t)}}functions(t){t.valueinstanceofg?Promise.resolve(t.value.v).then(r,a):l(d[0][2],t)}functionr(t){n("next",t)}functiona(t){n("throw",t)}functionl(t,e){t(e),d.shift(),d.length&&n(d[0][0],d[0][1])}if(!Symbol.asyncIterator)thrownewTypeError("Symbol.asyncIterator is not defined.");varh,c=i.apply(t,e||[]),d=[];returnh={},o("next"),o("throw"),o("return"),h[Symbol.asyncIterator]=function(){returnthis},h},y=function(t){functione(e,n){t[e]&&(i[e]=function(i){return(o=!o)?{value:g(t[e](i)),done:"return"===e}:n?n(i):i})}vari,o;returni={},e("next"),e("throw",function(t){throwt}),e("return"),i[Symbol.iterator]=function(){returnthis},i},b=function(t){
if(!Symbol.asyncIterator)thrownewTypeError("Symbol.asyncIterator is not defined.");vare=t[Symbol.asyncIterator];returne?e.call(t):"function"==typeof_?_(t):t[Symbol.iterator]()},t("__extends",s),t("__assign",r),t("__rest",a),t("__decorate",l),t("__param",h),t("__metadata",c),t("__awaiter",d),t("__generator",p),t("__exportStar",u),t("__values",_),t("__read",f),t("__spread",m),t("__await",g),t("__asyncGenerator",v),t("__asyncDelegator",y),t("__asyncValues",b)})}).call(e,function(){returnthis}())},,,function(t,e,i){(function(e){"use strict";functiono(t,e,i){this._source=t,this._model=e,this._undoCheckpoint=i}varn=i(1).LineDataSource,s=i(31).Study,r=i(42),a=i(48).DataSource,l=i(34),h=i(63).bindPopupMenu,c=i(191),d=i(33).trackEvent;i(126),$.extend(o,{TAB_PRIORITY_COORDINATES:100,TAB_PRIORITY_DISPLAY:100,TAB_PRIORITY_STYLE:200,TAB_PRIORITY_INPUTS:300,TAB_PRIORITY_PROPERTIES:250,TAB_NAME_COORDINATES:"Coordinates",TAB_NAME_DISPLAY:"Properties",TAB_NAME_STYLE:"Style",TAB_NAME_INPUTS:"Inputs",TAB_NAME_PROPERTIES:"Properties",TAB_NAME_GRAPHICS:"Graphics",TAB_NAME_VISIBILITY:"Visibility",TAB_NAME_SOURCE_CODE:"Source Code",LOCALIZED_TAB_NAME_COORDINATES:$.t("Coordinates"),LOCALIZED_TAB_NAME_DISPLAY:$.t("Properties"),LOCALIZED_TAB_NAME_STYLE:$.t("Style"),LOCALIZED_TAB_NAME_INPUTS:$.t("Inputs"),LOCALIZED_TAB_NAME_PROPERTIES:$.t("Properties"),LOCALIZED_TAB_NAME_GRAPHICS:$.t("Graphics"),LOCALIZED_TAB_NAME_VISIBILITY:$.t("Visibility"),LOCALIZED_TAB_NAME_SOURCE_CODE:$.t("Source Code"),TAB_OPEN_DEFAULT:100,TAB_OPEN_USERSAVE:200,TAB_OPEN_OVERRIDE:300}),o.prototype.hide=function(t){TVDialogs.destroy(this._dialogTitle,{undoChanges:!!t})},o.prototype._onDestroy=function(t,e){vari,o=(e||{}).undoChanges;$(window).unbind("keyup.hidePropertyDialog"),o?(i=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow)&&this._model.undoToCheckpoint(i):this._source.hasAlert.value()&&this._source.localAndServerAlersMismatch&&this._source.synchronizeAlert(!0),this._undoCheckpointOnShow&&deletethis._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},o.prototype.isVisible=function(){returnthis._dialog&&this._dialog.is(":visible")},o.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},o.prototype.switchTab=function(t,e){vari,o;if(this._tabs)returni=null,t?t=t.valueOf():null===t&&(t=void0),"string"==typeoft&&$.each(this._tabs,function(e,o){if(o.name===t)returni=o,!1}),"object"==typeoft&&$.each(this._tabs,function(e,o){if(t===o||$(o.labelObject).is(t)||$(o.wrapperObject).is(t))returni=o,!1}),i||(i=this._tabs[~~t]),!!i&&($.each(this._tabs,function(t,e){varo=e===i;$(e.wrapperObject)[o?"show":"hide"](),$(e.labelObject)[o?"addClass":"removeClass"]("active")}),e&&(o=this.activeTabSettingsName())&&TVSettings.setValue(o,i.name),this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0)},o.prototype.makeScrollable=function(t){vare=t.wrapperObject,i=$(t.objects[0]),o=i.width();e.css({
if(!Symbol.asyncIterator)thrownewTypeError("Symbol.asyncIterator is not defined.");vare=t[Symbol.asyncIterator];returne?e.call(t):"function"==typeof_?_(t):t[Symbol.iterator]()},t("__extends",s),t("__assign",r),t("__rest",a),t("__decorate",l),t("__param",h),t("__metadata",c),t("__awaiter",d),t("__generator",p),t("__exportStar",u),t("__values",_),t("__read",f),t("__spread",m),t("__await",g),t("__asyncGenerator",v),t("__asyncDelegator",y),t("__asyncValues",b)})}).call(e,function(){returnthis}())},,,function(t,e,i){(function(e){"use strict";functiono(t,e,i){this._source=t,this._model=e,this._undoCheckpoint=i}varn=i(1).LineDataSource,s=i(31).Study,r=i(43),a=i(48).DataSource,l=i(34),h=i(63).bindPopupMenu,c=i(191),d=i(33).trackEvent;i(126),$.extend(o,{TAB_PRIORITY_COORDINATES:100,TAB_PRIORITY_DISPLAY:100,TAB_PRIORITY_STYLE:200,TAB_PRIORITY_INPUTS:300,TAB_PRIORITY_PROPERTIES:250,TAB_NAME_COORDINATES:"Coordinates",TAB_NAME_DISPLAY:"Properties",TAB_NAME_STYLE:"Style",TAB_NAME_INPUTS:"Inputs",TAB_NAME_PROPERTIES:"Properties",TAB_NAME_GRAPHICS:"Graphics",TAB_NAME_VISIBILITY:"Visibility",TAB_NAME_SOURCE_CODE:"Source Code",LOCALIZED_TAB_NAME_COORDINATES:$.t("Coordinates"),LOCALIZED_TAB_NAME_DISPLAY:$.t("Properties"),LOCALIZED_TAB_NAME_STYLE:$.t("Style"),LOCALIZED_TAB_NAME_INPUTS:$.t("Inputs"),LOCALIZED_TAB_NAME_PROPERTIES:$.t("Properties"),LOCALIZED_TAB_NAME_GRAPHICS:$.t("Graphics"),LOCALIZED_TAB_NAME_VISIBILITY:$.t("Visibility"),LOCALIZED_TAB_NAME_SOURCE_CODE:$.t("Source Code"),TAB_OPEN_DEFAULT:100,TAB_OPEN_USERSAVE:200,TAB_OPEN_OVERRIDE:300}),o.prototype.hide=function(t){TVDialogs.destroy(this._dialogTitle,{undoChanges:!!t})},o.prototype._onDestroy=function(t,e){vari,o=(e||{}).undoChanges;$(window).unbind("keyup.hidePropertyDialog"),o?(i=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow)&&this._model.undoToCheckpoint(i):this._source.hasAlert.value()&&this._source.localAndServerAlersMismatch&&this._source.synchronizeAlert(!0),this._undoCheckpointOnShow&&deletethis._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},o.prototype.isVisible=function(){returnthis._dialog&&this._dialog.is(":visible")},o.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},o.prototype.switchTab=function(t,e){vari,o;if(this._tabs)returni=null,t?t=t.valueOf():null===t&&(t=void0),"string"==typeoft&&$.each(this._tabs,function(e,o){if(o.name===t)returni=o,!1}),"object"==typeoft&&$.each(this._tabs,function(e,o){if(t===o||$(o.labelObject).is(t)||$(o.wrapperObject).is(t))returni=o,!1}),i||(i=this._tabs[~~t]),!!i&&($.each(this._tabs,function(t,e){varo=e===i;$(e.wrapperObject)[o?"show":"hide"](),$(e.labelObject)[o?"addClass":"removeClass"]("active")}),e&&(o=this.activeTabSettingsName())&&TVSettings.setValue(o,i.name),this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0)},o.prototype.makeScrollable=function(t){vare=t.wrapperObject,i=$(t.objects[0]),o=i.width();e.css({
y._source.properties().minTick&&y._source.properties().minTick.listeners().fire(y._source.properties().minTick),y._source.properties().precision&&y._source.properties().precision.listeners().fire(y._source.properties().precision),f&&f.loadData(),_&&_.loadData(),m.onResoreDefaults&&m.onResoreDefaults(),m&&m.loadData(),g&&g.loadData())},M=function(){g&&g.loadData(),f&&f.loadData()},(!u||window.is_authenticated)&&m&&"function"==typeofm.createTemplateButton&&e.enabled("linetoolpropertieswidget_template_button")?m.createTemplateButton({popupZIndex:A,defaultsCallback:E,loadTemplateCallback:M}).addClass("tv-left").appendTo(k):TradingView.isInherited(this._source.constructor,s)?(D=[{title:$.t("Reset Settings"),action:E},{title:$.t("Save As Default"),action:function(){y._source.properties().saveDefaults()}}],O=$('<a href="#" class="_tv-button tv-left">'+$.t("Defaults")+'<span class="icon-dropdown"></span></a>'),O.on("click",function(t){t.preventDefault();vare=$(this);e.is(".active")||e.trigger("button-popup",[D,!0])}).appendTo(k),h(O,null,{direction:"down",event:"button-popup",notCloseOnButtons:!0,zIndex:A})):$('<a class="_tv-button tv-left">'+$.t("Defaults")+"</a>").appendTo(k).click(E),$('<a class="_tv-button ok">'+$.t("OK")+"</a>").appendTo(k).click(function(){y.hide()}),$('<a class="_tv-button cancel">'+$.t("Cancel")+"</a>").appendTo(k).on("click",c),S.find("._tv-dialog-title a").on("click",c),$(window).bind("keyup.hidePropertyDialog",function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&y.hide()}),$("select",T).each(function(){vart=$(this),e="tv-select-container dialog";t.hasClass("tv-select-container-fontsize")&&(e+=" tv-select-container-fontsize"),t.selectbox({speed:100,classHolder:e})}),$('input[type="text"]',T).addClass("tv-text-input inset dialog"),$("input.ticker",T).TVTicker(),S.css("min-width",P+"px"),TVDialogs.applyHandlers(S,t),V={top:($(window).height()-S.height())/2,left:($(window).width()-S.width())/2},m&&"function"==typeofm.dialogPosition&&(V=m.dialogPosition(V,S)||V),TVDialogs.positionDialog(S,V),window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide(),l.emit("edit_object_dialog",{objectType:this._source===this._model.mainSeries()?"mainSeries":this._sourceinstanceofn?"drawing":this._sourceinstanceofs?"study":"other",scriptTitle:this._source.title()}),S},o.prototype._helpItemRequired=function(){returnthis._source._metaInfo&&!!this._source._metaInfo.helpURL},o.prototype._createHelp=function(){vart=$('<a class="help" href="#" target="_blank" title="'+$.t("Help")+'"></a>');t.attr("href",this._source._metaInfo.helpURL),this._tabContainer.prepend(t)},t.exports=o}).call(e,i(3))},function(t,e,i){(function(e){"use strict";varo=i(215),n=i(72),s=i(668),r=i(140),a=i(127).unifiedSpinner,l=i(125),h=i(222).regExpEscape,c=i(740),d=i(214).isFeatureEnabled,p=i(113),u=function(){functiont(i){varo,n,s,r;if(!(thisinstanceoft))thrownewTypeError("SymbolSearch is a constructor");if(i=i||{},
@@ -135,7 +135,7 @@ var e=n.symbol.value()||"";e=h(e,t),i.val(e),S.resetState()}var u,_,f,g,v,y,b,w,
r.setAttribute("data-item-ticker",l),this._roots[o].tbody.appendChild(r);elsethis._currentTbody||(this._currentTbody=document.createElement("tbody"),this._container.appendChild(this._currentTbody)),a=t.createSuggestListRow(e,this._tickerRegExp,this._translationCache),this._currentTbody.appendChild(a);l=e.ticker||e.full_name,this._itemsByTicker[l]=e,a.setAttribute("data-item-ticker",l)},v.prototype.toggleCollapsed=function(t,e){vari;if(t)(i=this._roots[t])&&($(i.titleRow).toggleClass("collapsed",!!e),$(i.tbody).find("tr:not(.group-title)").toggleClass("hidden",!!e));elsefor(tinthis._roots)this.toggleCollapsed(t,e)},v.prototype.collapse=function(t){this.toggleCollapsed(t,!0)},v.prototype.expand=function(t){this.toggleCollapsed(t,!1)},v.prototype.getItemByTicker=function(t){returnthis._itemsByTicker[t]||null},t.GroupListHandler=v,t.isIntervalInit=function(t){return/[\d,]/.test(t)&&e.enabled("show_interval_dialog_on_key_press")},t.isIntervalChar=function(t){returne.enabled("seconds_resolution")?/[\dhdwms]/i.test(t):/[\dhdwm]/i.test(t)},t.parseIntervalValue=function(t){vare=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(t)||[],i=~~e[1],o=e[2]&&e[2].toUpperCase(),n={qty:!i&&o?1:i,unit:o||null};returnn.error=!i&&!o,n.intraday=!(n.error||n.unit&&"H"!==n.unit),n},t.sanitizeIntervalValue=function(e){vari=t.parseIntervalValue(e),o=i.qty,n=i.unit;returni.error?null:("H"===n&&(o*=60,n=null),o&&!n?o+"":n&&(!o||1===o&&"S"!==n)?n:o+n)},t.detachInterval=function(t){vare=/,[^,]*$/i.exec(t)||[];if(e[0])return{rest:t.substr(0,t.length-e[0].length),detached:e[0]}},t.intervalIsSupported=function(i){vars,r,a;returne.enabled("allow_supported_resolutions_set_only")?null!==(s=this.sanitizeIntervalValue(i))&&o.isAvailable(s):(r=t.parseIntervalValue(i),!r.error&&(r.intraday?n.intraday.value():!(a=n.supportedResolutions.value())||!!~a.indexOf(r.unit)))},function(){vare="",i=null;t.resetStoredInterval=function(){e="",i=null},t.detachStoreInterval=function(o){varn=t.detachInterval(o);returnn?(e=n.detached,i=t.sanitizeIntervalValue(e),n.rest):(t.resetStoredInterval(),o)},t.recallAttachInterval=function(t){returnt+e},t.getInterval=function(e){varo=i;return!0===e&&t.resetStoredInterval(),o},t.getInputValueGetter=function(e){returnfunction(){returnt.detachStoreInterval(e.value)}},t.getInputValueSetter=function(e){returnfunction(i){e.value=t.recallAttachInterval(i)}},t.intervalError=function(){return!(!e||/^,\s*$/.test(e))&&!i}}(),t.registerDialogKeypressHandler=function(o){if(!o)thrownewTypeError("chartWidget is required");r.pushBackListener("symbolEdit",function(o){vars,r=i(190);if(g(o))if(o.preventDefault(),s=String.fromCharCode(o.charCode),t.isIntervalInit(s))newr({callback:function(t){n.interval.setValue(t)}}).show(s);else{if(!e.enabled("symbol_search_hot_key"))return;t.showDialog({initialValue:s,callback:function(t,e){n.symbol.setValue(t),e&&n.interval.setValue(e)}})}})},t.canShowSpreadActions=function(){
return"undefined"!=typeofSymbolSearchInputParserMixin&&"cme"!==TradingView.widgetCustomer&&"bovespa"!==TradingView.widgetCustomer},t}();t.exports=u}).call(e,i(3))},function(t,e,i){"use strict";functiono(t,e,i,s){vara=newn(this,t);e.push(a),r.call(this,t,e,i),this.properties().listeners().subscribe(this,o.prototype.changeStyles),this._constructor=s,this._studyId=null,this._nonseriesdata=null,this._indexes=null,this._metaInfo=null,this._graphics=null,this._inputs=null}functionn(t,e){a.call(this,t,e)}functions(t,e){a.call(this,t,e)}varr=i(1).LineDataSource,a=i(9),l=i(90).VertLineRenderer,h=i(11).TrendLineRenderer,c=i(68).SelectionRenderer,d=i(6),p=i(155),u=i(86),_=i(25);inherit(o,r),o.prototype.pointsCount=function(){throwError("Reimplement this in a child class")},o.prototype.title=function(){returnthis._metaInfo.description},o.prototype.studyId=function(){returnthis._metaInfo.id},o.prototype._requestStudy=function(){throwError("Reimplement this in a child class")},o.prototype.changeStyles=function(){vart,e,o,n=i(80);if(this._inputs){t=n.splitInputs(this.properties().inputs.state()),e=t.obj;for(oine)if(e[o]!==this._inputs[o]){this._inputs=e,this._requestStudy(),this._properties.lastUpdateTime.setValue((newDate).valueOf());break}}elset=n.splitInputs(this.properties().inputs.state()),this._inputs=TradingView.clone(t.obj),this._requestStudy(),this._properties.lastUpdateTime.setValue((newDate).valueOf())},o.prototype._checkTurnaround=function(t){returnt===this._turnaround||t===this._model.mainSeries()._turnaround||t===this._model.mainSeries()._turnaround+"_"+this._turnaround},o.prototype.stop=function(){r.prototype.stop.call(this),this._studyId&&this._model.chartApi().removeStudy(this._studyId)},o.prototype.onData=function(t){throwError("Reimplement this in a child class")},o.prototype._correctedPoint=function(t){vare=parseInt(this._model.mainSeries().bars().first(),10),i=parseInt(this._model.mainSeries().bars().last(),10);returnt.index=Math.max(t.index,e),t.index=Math.min(t.index,i),t},o.prototype.addPoint=function(t){returnr.prototype.addPoint.call(this,this._correctedPoint(t))},o.prototype.setLastPoint=function(t){returnr.prototype.setLastPoint.call(this,this._correctedPoint(t))},o.prototype.move=function(t){},o.prototype.clearData=function(){void0!==this.m_data&&(this.m_data=newu(this._plotFields)),this._nonseriesdata=null,this._indexes=null,this._graphics=newp(this._metaInfo),this.updateAllViews()},o.prototype.state=function(t){vare=r.prototype.state.call(this,t);returnt&&(void0!==this.m_data&&(e.data=this.m_data.state()),e.nonseriesdata=this._nonseriesdata,e.nonseriesindexes=this._indexes,e.graphics=this._graphics.graphics()),this.metaInfo()instanceof_?e.metaInfo=this.metaInfo().state():(e.metaInfo=$.extend({},this.metaInfo()),e.metaInfo.id=_.parseIdString(e.metaInfo.id+(e.metaInfo.version?"-"+e.metaInfo.version:"")).fullId),e},o.prototype.restoreData=function(t){void0!==this.m_data&&void0!==t.data&&this.m_data.restoreState(t.data),
this._nonseriesdata=t.nonseriesdata?t.nonseriesdata:null,this._indexes=t.nonseriesindexes?t.nonseriesindexes:null,this._graphics.setGraphics(t.graphics?t.graphics:p.emptyGraphics())},o.prototype.setPoint=function(t,e){this._nonseriesdata=null,this._indexes=null,r.prototype.setPoint.call(this,t,this._correctedPoint(e))},o.prototype.disconnect=function(){this._studyId=0},o.prototype.graphics=function(){returnthis._graphics.graphics()},o.prototype.firstValue=function(){returnthis._model.mainSeries().data().firstValue()},o.prototype.formatter=function(){returnthis._model.mainSeries().data().formatter()},o.prototype.metaInfo=function(){returnthis._metaInfo},inherit(n,a),n.prototype.renderer=function(){vart,e,i,o,n,s=newd;returnthis._points.length<2?s:this._source._nonseriesdata?s:this._source._graphics&&!this._source._graphics.isEmpty()?s:(t=this._points[0],e=this._points[1],i={},i.points=[t],i.color="#808080",i.linewidth=this._source._doNotNeedLine?0:1,i.linestyle=CanvasEx.LINESTYLE_SOLID,s.append(newl(i)),o={},o.points=[e],o.color="#808080",o.linewidth=this._source._doNotNeedLine?0:1,o.linestyle=CanvasEx.LINESTYLE_SOLID,s.append(newl(o)),n={points:[t,e],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:"#808080",linewidth:this._source._doNotNeedLine?0:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:r.LINEEND_NORMAL,rightend:r.LINEEND_NORMAL},s.append(newh(n)),s)},inherit(s,a),s.prototype.renderer=function(){vart=newd;returnthis.isAnchorsRequired()&&(t.append(newc({points:this._points})),t.append(this.createLineAnchor({points:this._points}))),t},e.StudyLineDataSource=o,e.StudyLineDataSourcePaneView=s},function(t,e,i){"use strict";functiono(t,e,i,o){varn,s;for(this.m_study=t,this.m_series=e,this.m_model=i,this._plotName=o,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=H.enabled("source_selection_markers"),n=this.m_study.metaInfo().plots,this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0,s=0;s<n.length;s++)n[s].id===this._plotName&&(this._plotIndex=s),this.m_study.isSelfColorerPlot(s)&&n[s].target===this._plotName&&(this._colorer=s,this._palette=this.m_study.metaInfo().palettes[n[s].palette],this._paletterProps=this.m_study.properties().palettes[n[s].palette])}functionn(t,e,i,o){varn,s;for(this._study=t,this._series=e,this._model=i,this._plotName=o,this._items=[],this._invalidated=!0,this._isMarkersEnabled=H.enabled("source_selection_markers"),n=this._study.metaInfo().plots,s=0;s<n.length;s++)n[s].id===this._plotName&&(this._plotIndex=s,z(this._study.isBgColorerPlot(s),"Plot '"+this._plotName+"' is not a background colorer!"))}functions(t,e,i,o){varn,s;for(this.m_study=t,this.m_series=e,this.m_model=i,this.m_plotName=o,this.m_items=[],this.m_invalidated=!0,this._isMarkersEnabled=H.enabled("source_selection_markers"),this.m_plotIndex=null,n=this.m_study.metaInfo().plots,s=0;s<n.length;s++)if(n[s].id===this.m_plotName){this.m_plotIndex=s;break}for(n=this.m_study.metaInfo().plots,this._colorer=null,
;if(n.visible.value()&&this.m_study.priceScale()){switch(this._invalidated&&(this._updateImpl(),this._invalidated=!1),t={},t.barSpacing=this.m_model.timeScale().barSpacing(),t.items=this.m_items,t.histogramBase=this._histogramBase?this._histogramBase:this.m_study.priceScale().height(),t.lineIndex=0,t.lineStyle=n.linestyle.value(),t.lineColor=this._lineColor,t.lineWidth=this._lineWidth,t.lineWidth=isNumber(t.lineWidth)?t.lineWidth:1,t.color1=this._color1,t.color2=this._color2,t.bottom=t.histogramBase,this._colorer||(t.simpleMode=!0),e=newV,i=!!n.joinPoints&&n.joinPoints.value(),n.plottype.value()){caseN.PlotType.Line:caseN.PlotType.Line_with_breaks:e.append(newP(t));break;caseN.PlotType.Area:caseN.PlotType.Area_with_breaks:e.append(newL(t));break;caseN.PlotType.Histogram:e.append(newC(t));break;caseN.PlotType.Columns:e.append(newx(t));break;caseN.PlotType.Cross:e.append(newI(t)),i&&(o=TradingView.merge({},t),o.lineWidth=1,o.forceLineWidth=!0,e.append(newP(o)));break;caseN.PlotType.Circles:e.append(newA(t)),i&&(o=TradingView.merge({},t),o.lineWidth=1,o.ignorePaletteLineWidth=!0,e.append(newP(o)));break;default:e.append(newP(t))}returnthis.m_study===this.m_model.selectedSource()&&this._isMarkersEnabled&&e.append(newb(this._selectionData)),e}},n.prototype.items=function(){returnthis._items},n.prototype.update=function(){this._invalidated=!0},n.prototype._scalesReady=function(){vart=this._model.timeScale(),e=this._study.priceScale();returnt&&e&&!t.isEmpty()&&!e.isEmpty()},n.prototype._getTranspValue=function(){vart=this._study.properties(),e=t.styles[this._plotName],i=0;returne.transparency&&(i=e.transparency.value(),i=isNumber(i)?i:40),i},n.prototype._updateImpl=function(){vart,e,i,o,n,s,r,a,l,h,c,d,p,u,_,f,m,g,v;if(this._items=[],z(this._scalesReady(),"Scales must be ready!"),t=this._model.timeScale().visibleBars().clone(),!t.isEmpty()){for(e=this._study.metaInfo().plots,i=e[this._plotIndex].palette,o=this._study.properties().palettes[i],n=o.colors,s=this._study.metaInfo().palettes[i],r=this._getTranspValue(),a=this._series.nearestIndex(t.firstBar(),TradingView.SEARCH_NEAREST_RIGHT),l=this._series.nearestIndex(t.lastBar(),TradingView.SEARCH_NEAREST_LEFT),h=this._study.offset(this._plotName),h>0?(a-=h,l+=h):(a+=h,l-=h),c=this._study.data(),d=c.range(a,l),p=d._start;p<d._end;++p)u=d._indexAt(p),u+=h,_=d._valueAt(p),f=_[this._plotIndex+1],m=newR.Point(Math.floor(u)-.5),g=isNumber(r)?r:50,g=Math.min(g,100),g=Math.max(g,0),null!=f?(v=s.valToIndex?s.valToIndex[f]:f,m.color=W.generateColor(n[v].color.value(),g)):m.color=null,this._items.push(m);this._model.timeScale().indexesToCoordinates(this._items)}},n.prototype.renderer=function(){vart,e;if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady())returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),t={items:this._items,y:0,h:this._study.priceScale().height(),w:Math.ceil(this._model.timeScale().barSpacing())},e=newV,e.append(newO(t)),e},
;if(!t.panes)returnvoidx.logDebug("ChartModel.restoreAxisState: invalid state");if(!Array.isArray(t.panes))returnvoidx.logDebug("ChartModel.restoreAxisState: invalid state");if(t.panes.length<1)returnvoidx.logDebug("ChartModel.restoreAxisState: invalid state");for(this.m_timeScale.restoreState(t.timeScale,!1,!0),e=0;e<t.panes.length;e++)i=this.panes()[e],i.m_leftPriceScale.restoreState(t.panes[e].leftAxisState),i.m_rightPriceScale.restoreState(t.panes[e].rightAxisState);this.recalculateAllPanes(),this.invalidate(newM(M.FULL_UPDATE))},E.prototype.state=function(t,e,i,o){functionn(t){returni&&!t.isSavedInStudyTemplates()||!t.state||!t.state()||!t.isSavedInChart(e)||o&&t.isActualSymbol&&!t.isActualSymbol()}vars,r,a={};if(t)for(a.sources=[],s=0;s<this.m_dataSources.length;s++)n(this.m_dataSources[s])||a.sources.push(this.m_dataSources[s].state(e));for(a.leftAxisState=this.m_leftPriceScale.state(),a.leftAxisSources=[],s=0;s<this.m_leftPriceScale.dataSources().length;s++)n(this.m_leftPriceScale.dataSources()[s])||a.leftAxisSources.push(this.m_leftPriceScale.dataSources()[s].id());for(a.rightAxisState=this.m_rightPriceScale.state(),a.rightAxisSources=[],s=0;s<this.m_rightPriceScale.dataSources().length;s++)n(this.m_rightPriceScale.dataSources()[s])||a.rightAxisSources.push(this.m_rightPriceScale.dataSources()[s].id());for(a.overlayPriceScales={},s=0;s<this.m_dataSources.length;s++)r=this.m_dataSources[s],this.isOverlay(r)&&r.isSavedInChart(e)&&(a.overlayPriceScales[r.id()]=r.priceScale().state());returna.stretchFactor=this._stretchFactor,this.m_mainDataSource&&(a.mainSourceId=this.m_mainDataSource.id()),a},E.prototype.sourceById=function(t){for(vare=0;e<this.m_dataSources.length;e++)if(this.m_dataSources[e].id()===t)returnthis.m_dataSources[e];returnnull},E.prototype.isESDStudy=function(t){return"Script$TV_EARNINGS@tv-scripting"===t.id||"Script$TV_DIVIDENDS@tv-scripting"===t.id||"Script$TV_SPLITS@tv-scripting"===t.id||"ESD$TV_EARNINGS@tv-scripting"===t.id||"ESD$TV_DIVIDENDS@tv-scripting"===t.id||"ESD$TV_SPLITS@tv-scripting"===t.id},E.prototype.restoreState=function(t,e,i,o){varn,s,r,a,l,c,d,u,_,f,m,v,y,b,S;if(o=o||{},!t.leftAxisState||!t.rightAxisState)throwError("invalid state");if(!t.leftAxisSources||!t.rightAxisSources)throwError("invalid state");if(t.stretchFactor&&(this._stretchFactor=t.stretchFactor),n={},t.sources)for(s=-1!==this.m_dataSources.indexOf(this._model.mainSeries()),this.clearSeries(),this.m_mainDataSource=null,s&&this.m_dataSources.push(this._model.mainSeries()),r=this.getZOrderMinMax(),a=r.minZOrder,l=r.maxZOrder,c=0;c<t.sources.length;c++)d=t.sources[c],u=d.type,Math.abs(d.zorder)>1e200?(_=a-1,x.logWarn("Datasource zorder has bad value: "+d.zorder+" Resetting it to "+_),d.zorder=_):this.isZOrderAvailable(d.zorder)||s&&"MainSeries"===u&&this._model.mainSeries().zorder()===d.zorder||(d.zorder=l+1),f=d.id,n[f]=d.ownerSource,
I.migrateState(t),o=t.type,n=t.id,s=t.state,r=i?t.zorder:this._newZOrderForLineTool(),a=TradingView[o],D(TradingView.isInherited(a,p),"invalid data source type:"+o+" (expected to be a Line Tool)"),l=t.points,h=!1,m=0;m<l.length;m++)if(Math.abs(l[m].offset)>1e4){h=!0;break}if(!h){if(g=null,y=TradingView.factoryDefaults("linetool"),TradingView.isInherited(a,u)){if(g=this._model.studyVersioning(),t=g.patchPointsBasedStudyState(t),TradingView.merge(y,s),x=t.metaInfo,$.extend(x,T.parseIdString(x.fullId)),!e&&(A=x.productId,!pro.hasPackage(A)))returnE=newc(this._model,t,x.shortDescription),E.setId(n),this.m_dataSources.push(E),void0!==r&&E.setZorder(r),E.setStatus($.t("not authorized")),voidE.setFailed(!0);M=g.updateMetaInfo(x),O=M||x,y=v(O,x,y,null,g),e?TradingView.merge(y,{fixedSize:!1}):TradingView.merge(y,{fixedSize:!0}),w=newS("study_"+O.id,y,!0),b=d.create(o,this._model,w,O,this.mainDataSource())}elseV=o.toLowerCase(),TradingView.merge(y,TradingView.factoryDefaults(V)),w=TradingView[o].prototype.createPropertiesObject(V,y),w.merge(s),e?w.merge({fixedSize:!1}):w.merge({fixedSize:!0}),b=newTradingView[o](this._model,w,!0);returnb.setId(n),b.linkKey=t.linkKey,B=t.alertId,B&&"function"==typeofb.setAlert&&C.enabled("alerts")&&!this._model.readOnly()&&!this._model.isJustClonedChart()&&b.setAlert(B,{noChartSave:!0}),R=t.indexes?t.indexes:[],R=R.slice(0,t.points.length),b.isFixed()?b.restorePositionPercents(t.positionPercents):b.restorePoints(t.points,R,e),binstanceof_||binstanceoff||binstanceofL||binstanceofk||binstanceofP?b.restoreData(t):e&&b.restoreData&&(N=t,g&&(N.graphics=g.patchPointsBasedStudyData(N.metaInfo,N.graphics)),b.restoreData(N)),F=null==t.version?1:t.version,z=null==b.version?1:b.version,F!==z&&"function"==typeofb.migrateVersion&&b.migrateVersion(F,z,{pane:this,model:this._model,properties:w}),this.m_dataSources.push(b),deletethis._cachedOrderedSoruces,deletethis._cachedHitTestSources,void0!==r&&b.setZorder(r),b}},E.prototype._restoreSpecialSource=function(t,e){vari,o=TradingView[t.type];o&&o.createFromState&&(i=o.createFromState(t,e,this._model))&&(i.setId(t.id),this.m_dataSources.push(i),i.zorder&&i.setZorder(i.zorder))},l.prototype.studyTemplate=function(t){vare,i,o,n,s={};for(s.panes=[],e=0;e<this.panes().length;e++)i=!0,o=!1,n=!0,s.panes.push(this.panes()[e].state(i,o,n));returnt&&(s.interval=this.mainSeries().interval()),s.version=l.version,s},l.prototype.restoreStudyTemplate=function(t,e){this._undoModel.studyLoadTemplate(this._undoModel,this.studyTemplate(),t,e)},l.prototype.theme=function(){vart={};returnt.chartProperties={paneProperties:this.properties().paneProperties.state(),scalesProperties:this.properties().scalesProperties.state(),symbolWatermarkProperties:this.properties().symbolWatermarkProperties.state()},t.mainSourceProperties=this.mainSeries().state().state,deletet.mainSourceProperties.symbol,deletet.mainSourceProperties.interval,deletet.chartProperties.paneProperties.topMargin,deletet.chartProperties.paneProperties.bottomMargin,t.version=l.version,t},
this._items[i].setColor(v.colors[y].color.value())):this._items[i].setColor(m)):this._items[i].setColor(m)))}},o.prototype.items=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},inherit(n,o),n.prototype.additional=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),this._additional},n.prototype._updateImpl=function(){vart=l(this._study.symbolInfo());returnthis._additional=t?"(Data Provided by "+t+")":void0,o.prototype._updateImpl.call(this)},e.StudyDataWindowView=o,e.DataVendorStudyDataWindowView=n}).call(e,i(3))},function(t,e,i){"use strict";functiono(t){this._graphics=o.emptyGraphics(),n(!!t,"Study metaInfo is absent!"),this._metaInfo=t}varn=i(44).assert,s=i(12).getLogger("Chart.StudyGraphics");o.emptyGraphics=function(){return{indexes:[]}},o.prototype.isEmpty=function(){vart=Object.keys(this._graphics).length>1;return0===this._graphics.indexes.length&&!t},o.prototype.graphics=function(){returnthis._graphics},o.prototype.setGraphics=function(t){this._graphics=t,this._postProcessGraphicsData()},o.prototype.process=function(t){if(""!==t.d)returnt.d.indexes_replace?voidthis.replaceIndexes(t):void(t.d.graphicsCmds&&(this.processEraseCmds(t.d.graphicsCmds.erase),this.processCreateCmds(t.d.graphicsCmds.create,t.indexes)))},o.prototype.replaceIndexes=function(t){""!==t.d&&(n(!!t.d.indexes_replace),this._graphics.indexes=t.indexes)},o.prototype.processEraseCmds=function(t){vare,i,s,r,a;if(t)for(n(!!this._graphics,"_graphics object doesn't exist in the study!"),n(!!this._graphics.indexes,"_graphics.indexes array doesn't exist in the study!"),e=0;e<t.length;++e)if(i=t[e],"all"===i.action)this._graphics=o.emptyGraphics();else{if("one"!==i.action)throwError("Unknown graphics command "+i.action);for(sinthis._graphics[i.type])r=this._graphics[i.type][s],(a=o._findGraphicsObjIndexById(r.data,i.id))>=0&&r.data.splice(a,1)}},o._findGraphicsObjIndexById=function(t,e){for(vari=0;i<t.length;++i)if(t[i].id===e)returni;return-1},o.prototype.processCreateCmds=function(t,e){vari,o,s,r,a,l;if(t){n(!!e,"indexes are missing in the study nonseries response!"),n(!!this._graphics,"_graphics object doesn't exist in the study!"),n(!!this._graphics.indexes,"_graphics.indexes array doesn't exist in the study!");for(iint){n(iinthis._metaInfo.graphics,"There is a '"+i+"' in study response, but it doesn't present in metaInfo!");for(o=0;o<t[i].length;++o){s=t[i][o],r=s.styleId,n(rinthis._metaInfo.graphics[i]),this._graphics[i]||(this._graphics[i]=[]),a=null;for(l=0;l<this._graphics[i].length;++l)if(this._graphics[i][l].styleId===r){a=this._graphics[i][l];break}null===a&&(a={styleId:r,data:[]},this._graphics[i].push(a)),a.data=a.data.concat(s.data)}}"nochange"===e||(n(Array.isArray(e)),this._graphics.indexes=e),this._postProcessGraphicsData()}},o.prototype._postProcessGraphicsData=function(){vart,e,i;if(this._graphics)for(tinthis._graphics.hhists)e=this._graphics.hhists[t],o._sortHHistItemsByPrice(e.data),i=this._graphics.indexes,
e.dataObj=o._splitHHistItemsBySession(e.data,i)},o._sortHHistItemsByPrice=function(t){t.sort(function(t,e){returnt.priceLow-e.priceLow})},o._splitHHistItemsBySession=function(t,e){vari,o,n,r={};for(i=0;i<t.length;++i)o=t[i],n=e[o.firstBarTime],void0!==n?(ninr||(r[n]=[]),r[n].push(o)):s.logError("Cannot find index "+o.firstBarTime+" in study timescale indexes");returnr},t.exports=o},function(t,e,i){"use strict";functiono(t,e){n.call(this,e),this._study=t,this._inputValueReplacements={NONE:"Default"}}varn=i(348);inherit(o,n),o.prototype.color=function(){returnthis._study._failed||this._study.metaInfo&&this._study.metaInfo().isTVScriptStub?"#ff0000":n.prototype.color.call(this)},o.prototype.update=function(){this._study._failed?this._text=this._study.title(!0,this._inputValueReplacements)+": "+this._study.status():this._text=this._study.title(!0,this._inputValueReplacements)+" "+this._study.status()},t.exports=o},function(t,e,i){(function(e){"use strict";functiono(t,i,o){s.call(this,t),this._origState=i,this._title=o;vara={visible:!0};this._properties=newe(a),this._statusView=newn(this,t.properties()),this._status=$.t("compiling..."),this._statusView.setText(this._title+" "+this._status),this._formatter=newr(Math.pow(10,2)),this._failed=!1}varn=i(156),s=i(48).PriceDataSource,r=i(27).PriceFormatter;inherit(o,s),o.prototype.properties=function(){returnthis._properties},o.prototype.statusView=function(){returnthis._statusView},o.prototype.state=function(t){returnthis._origState},o.prototype.setStatus=function(t){this._status=t,this._statusView.setText(this._title+" "+this._status)},o.prototype.formatter=function(){returnthis._formatter},o.prototype.title=function(){returnthis._title},o.prototype.setFailed=function(t){this._failed=t},o.prototype.start=function(t){},o.prototype.firstValue=function(t){returnnull},t.exports=o}).call(e,i(24))},function(t,e,i){(function(e){"use strict";functiono(t){this._data=t,this._textWidthCache=newl}functionn(t,e,i,o,n){this._model=t,this._source=e,this._plotIndex=i,this._getterName=o||"symbol",this._propertyName=n,this._cache={},this._invalidated=!0,this._rendererData={}}vars=i(36),r=s.parseRgb,a=s.rgbToBlackWhiteString,l=i(159),h=i(6),c=i(163).makeFont,d=i(14);o.prototype.hitTest=function(t){returnnull},o.prototype.draw=function(t){vare,i,o,n,s,r,a,l,h,c;this._data.visible&&(this._textWidthCache.font!==this._data.font&&(this._textWidthCache.reset(),this._textWidthCache.font=this._data.font),t.font=this._data.font,e=this._data.fontSize,i=Math.floor(e/4.5),o=Math.ceil(e/4.5),n=Math.ceil(e/3),s=Math.ceil(this._textWidthCache.measureText(t,this._data.text)),r=Math.round(e/10),a=e+i+o,l=s+2*n,h=this._data.x-.5,"right"===this._data.align&&(h-=l),c=this._data.y-Math.floor(e/2)-i-.5,t.fillStyle=d.resetTransparency(this._data.backColor),t.fillRect(h,c,l,a),t.fillStyle=this._data.color,t.textAlign="left",t.fillText(this._data.text,h+n,c+i+e-r))},n.prototype.isPropertyEnabled=function(){returnthis._model.properties().scalesProperties[this._propertyName].value()},
e.dataObj=o._splitHHistItemsBySession(e.data,i)},o._sortHHistItemsByPrice=function(t){t.sort(function(t,e){returnt.priceLow-e.priceLow})},o._splitHHistItemsBySession=function(t,e){vari,o,n,r={};for(i=0;i<t.length;++i)o=t[i],n=e[o.firstBarTime],void0!==n?(ninr||(r[n]=[]),r[n].push(o)):s.logError("Cannot find index "+o.firstBarTime+" in study timescale indexes");returnr},t.exports=o},function(t,e,i){"use strict";functiono(t,e){n.call(this,e),this._study=t,this._inputValueReplacements={NONE:"Default"}}varn=i(348);inherit(o,n),o.prototype.color=function(){returnthis._study._failed||this._study.metaInfo&&this._study.metaInfo().isTVScriptStub?"#ff0000":n.prototype.color.call(this)},o.prototype.update=function(){this._study._failed?this._text=this._study.title(!0,this._inputValueReplacements)+": "+this._study.status():this._text=this._study.title(!0,this._inputValueReplacements)+" "+this._study.status()},t.exports=o},function(t,e,i){(function(e){"use strict";functiono(t,i,o){s.call(this,t),this._origState=i,this._title=o;vara={visible:!0};this._properties=newe(a),this._statusView=newn(this,t.properties()),this._status=$.t("compiling..."),this._statusView.setText(this._title+" "+this._status),this._formatter=newr(Math.pow(10,2)),this._failed=!1}varn=i(156),s=i(48).PriceDataSource,r=i(27).PriceFormatter;inherit(o,s),o.prototype.properties=function(){returnthis._properties},o.prototype.statusView=function(){returnthis._statusView},o.prototype.state=function(t){returnthis._origState},o.prototype.setStatus=function(t){this._status=t,this._statusView.setText(this._title+" "+this._status)},o.prototype.formatter=function(){returnthis._formatter},o.prototype.title=function(){returnthis._title},o.prototype.setFailed=function(t){this._failed=t},o.prototype.start=function(t){},o.prototype.firstValue=function(t){returnnull},t.exports=o}).call(e,i(24))},function(t,e,i){(function(e){"use strict";functiono(t){this._data=t,this._textWidthCache=newl}functionn(t,e,i,o,n){this._model=t,this._source=e,this._plotIndex=i,this._getterName=o||"symbol",this._propertyName=n,this._cache={},this._invalidated=!0,this._rendererData={}}vars=i(37),r=s.parseRgb,a=s.rgbToBlackWhiteString,l=i(159),h=i(6),c=i(163).makeFont,d=i(14);o.prototype.hitTest=function(t){returnnull},o.prototype.draw=function(t){vare,i,o,n,s,r,a,l,h,c;this._data.visible&&(this._textWidthCache.font!==this._data.font&&(this._textWidthCache.reset(),this._textWidthCache.font=this._data.font),t.font=this._data.font,e=this._data.fontSize,i=Math.floor(e/4.5),o=Math.ceil(e/4.5),n=Math.ceil(e/3),s=Math.ceil(this._textWidthCache.measureText(t,this._data.text)),r=Math.round(e/10),a=e+i+o,l=s+2*n,h=this._data.x-.5,"right"===this._data.align&&(h-=l),c=this._data.y-Math.floor(e/2)-i-.5,t.fillStyle=d.resetTransparency(this._data.backColor),t.fillRect(h,c,l,a),t.fillStyle=this._data.color,t.textAlign="left",t.fillText(this._data.text,h+n,c+i+e-r))},n.prototype.isPropertyEnabled=function(){returnthis._model.properties().scalesProperties[this._propertyName].value()},
}),S.removedLineTool.subscribe(null,function(t){vare,i=k._model.model();t.model!==i&&(e=i.dataSources().filter(function(e){returne.linkKey===t.linkKey})[0])&&k._model.model().removeSource(e)}),S.finishedLineTool.subscribe(null,function(t){vare=k._model.model();t.model!==e&&e.dataSources().filter(function(e){returne.linkKey===t.linkKey})[0]&&k._model.model().finishLineTool()}),S.changedLineStyle.subscribe(null,function(t){vare,i=k._model.model();t.model!==i&&(e=i.dataSources().filter(function(e){returne.linkKey===t.linkKey})[0])&&(e.properties().merge(t.state),e.propertiesChanged())}),S.restoredLineToolState.subscribe(null,function(t){vare,i,o=k._model.model();t.model!==o&&(e=o.dataSources().filter(function(e){returne.linkKey===t.linkKey})[0])&&(i=$.extend({},t.state),i.points=n(t.state.points,t.model,o),i.indexes=i.points.map(function(t){return{index:t.index,price:t.price}}),o.restoreLineToolState(e,i))}),S.restoredLineTool.subscribe(null,function(t){vare=k._model.model();t.model!==e&&e.restoreSource(t.state.restorePane,t.state.paneIndex,t.state.paneState,t.state.sourceState,t.state.priceScaleName)}),S.copiedLineTool.subscribe(null,function(t){vare,i,o,s,r,a=k._model.model();if(t.model!==a&&k._model.model().mainSeries().symbol()===t.symbol){if(t.model.mainSeries().syncModel(),a.mainSeries().syncModel(),e=a.paneForSource(k._model.model().mainSeries()),i=n(t.points,t.model,a),o=i[0],s=a.createLineTool(e,o,t.linetool,null,t.linkKey),a.lineBeingCreated())for(r=1;r<i.length;r++)r!==i.length-1||"LineToolBrush"!==t.linetool&&"LineToolGhostFeed"!==t.linetool||a.finishLineTool(!0),a.coninueCreatingLine(i[r],{},r<i.length-1,!0);s.properties().interval.setValue(t.state.interval),s.properties().merge(t.state),s.restoreData&&s.restoreData(t),s.propertiesChanged()}}),this._options=t=t||{},s=t.jqParent,r=t.sizeFunc,a=t.content,l=t.readOnly,h=t.containsData,c=t.onWidget,d=t.onCmeWidget,d&&X.logWarn("[ChartWidget] 'onCmeWidget' option is depricated"),p=t.widgetCustomer,_=t.timezone,m=t.withDateRanges,g=t.hideSymbolSearch,y=t.defSymbol,b=t.defInterval,w=t.defExtendedHours,C=t.defTimeframe,x=-1!==$.inArray(t.defStyle,$.map($.grep(Object.keys(u),function(t){return/^STYLE_\w+/.test(t)}),function(t){returnu[t]})),P=x?t.defStyle:void0,this._chartWidgetCollection=t.chartWidgetCollection||null,this._withDateRanges=(void0===m?!l:!!m)&&f.enabled("timeframes_toolbar"),this._jqParent=void0!==s?s:$(document.body),this._setContent(a),this._readOnly=l,this._containsData=h,this._defSymbol=y,this._defInterval=b,this._defTimeframe=C,this._defStyle=P,this._onWidget=!!c,this._onWidget&&(d?this._widgetCustomer="cme":p&&(this._widgetCustomer=p)),this.controlBarHeight=22,this._sizeFunc=r||function(){vart=k._jqParent.width(),e=k._jqParent.height(),i=k._jqParent[0];returnwindow.self!==window.top&&i.offsetWidth<i.clientWidth&&i.getBoundingClientRect().width<100&&(t=Math.round(100*i.getBoundingClientRect().width),e=Math.round(100*i.getBoundingClientRect().height)),{x:0,y:0,w:t,h:e-(k._withDateRanges?k.controlBarHeight:0)}},
returnnewt(N.CURRENT_METAINFO_FORMAT_VERSION).generateMetaInfo()}return[]},o.prototype._onScriptSources=function(t,e){vari,o,n,s,r,a,l,h;for(X.logDebug("ChartWidget _onScriptSources called"),i=null,o=0;o<e.length;++o)if(n=e[o],n.id.startsWith("Script@tv-scripting-")){i=N.parseIdString(n.id).version;break}if(null!=i){for(this.studyScriptingPkgVers=i,s=0,r=0,o=0;o<t.length;++o){a=t[o],l=a&&a.scriptName,s++;try{h=N.createMetaInfoStub(a,i),e.push(h)}catch(t){X.logError("Could not process script (skipped): "+l+" ("+t.message+")"),r++}}X.logDebug("User's Pine Scripts loaded "+s+", skipped "+r)}elseX.logError("Could not find tv-scripting package in metadata response");for(o=0;o<e.length;o++)N.addOrReplaceStudyMetaInfo(this._studiesMetaData,e[o]);this._inited?this.model().model().setStudiesMetaData(this._studiesMetaData,this._studiesMigrations):(this._init(),this.chartWidgetInitialized.fire(),X.logDebug("ChartWidget _onScriptSources done"))},o.prototype._init=function(){vart,e,o=this;this._containsData||this._content&&this._content.timeScale&&!this._content.timeScale.m_lastVisibleBar&&(this._content.timeScale.m_rightOffset=this._properties.timeScale.rightOffset.value()),this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui(),t=function(){vart,e;o._checkObsoleteTimezone(),o._chartSession&&o._chartSession.connected()&&o._restartModel(),this._content&&(this.initColors(),this._updateGui(),this.update()),t=o._model.mainSeries(),t.marketStatus.subscribe(function(e){o.indicatorImage&&o._updateDataAndMarketStatus(e,t.status(),t.quoteData.update_mode_seconds)},{callWithLast:!0}),this._resizeHandler=function(t){this._rect=this._sizeFunc(),t&&(this._rect.w+=t,this._rect.h+=t),this._updateAbsoluteRect(),this._adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),t||(this.paint(),this.resizeSeriesControlUI(),this.checkCompactMode(),this.resizeIndicator())}.bind(this),this._resizeHandler(),this._jqMainDiv.appendTo(this._jqParent),this._spinner&&(this._spinner.stop(),deletethis._spinner),e=i(214),e.isFeatureEnabled("chrome_canvas_fix")&&navigator.userAgent.match(/windows.+chrome/i)&&$(window).on("visibilitychange",function(t,e){e&&(o._resizeHandler(1),setTimeout(function(){o._resizeHandler()},0))}),$(window).keydown(function(t){27===t.which&&t.preventDefault()}),this._containsData||this._jqMainDiv.mousewheel(function(t,e,i,o){varn,s,r,a,l;if((TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty())returnn=t.pageX-5,s=this._paneWidgets[0].lhsPriceAxisWidget.size.w,r=this._timeAxisWidget.size.w,s&&(n=Math.max(0,n-s)),n=Math.min(n,r),a=f.enabled("right_bar_stays_on_scroll")?1:2*(n/r-.5),l=Math.min(1,Math.abs(o)),o>0?this.model().zoomIn(a,l):o<0&&this.model().zoomOut(a,l),i&&this.model().scrollChart(-80*i),!1}.bind(this)),this._initBarsMarksSources(),this.setAutoScaleOnSymbolChange(),this.readOnly()||this._hideSymbolSearch||E.registerDialogKeypressHandler(this),
o.prototype.getResolution=function(){returnthis._model?this._model.mainSeries().properties().interval.value():this._properties.mainSeriesProperties.interval.value()},o.prototype._addSymbol=function(t,e){vari=this.model(),o=i.studiesMetaData(),n="study_Overlay@tv-basicstudies",s=f.enabled("use_overrides_for_overlay")&&TradingView.defaultProperties[n]&&TradingView.defaultProperties[n].style,r=s||(i.mainSeries().properties().style.value()===u.STYLE_CANDLES?u.STYLE_BARS:u.STYLE_CANDLES),a={inputs:{symbol:t},style:r},l=o.filter(function(t){return"Overlay@tv-basicstudies"===t.id})[0];i.insertStudy(l,a,e)},o.prototype.addSymbol=function(t,e){this._addSymbol.apply(this,arguments)},o.prototype.updateActions=function(){functiont(){vart,e,i=studyTemplates.plainList("custom"),o=studyTemplates.plainList("default");l.applyStudyTemplate.subActions||(l.applyStudyTemplate.subActions=[]),t=l.applyStudyTemplate.subActions,t.splice(0,t.length),e=newb({text:studyTemplates._SAVE_AS_TITLE}),e.callbacks().subscribe(studyTemplates,studyTemplates.showSaveAsDialog),t.push(e,neww),i.length||o.length?(i.length&&($.each(i,function(e,i){functiono(t){returnfunction(){returnstudyTemplates.deleteStudyTemplate(t),this._parentMenu._parentMenuItem._parentMenu.destroy(),!1}}varn=newb({text:i});n.callbacks().subscribe(studyTemplates,function(){this.applyStudyTemplate(i)}),n.deleteButton={action:o(n.text)},t.push(n)}),o.length&&t.push(neww)),$.each(o,function(e,i){varo=newb({text:i});o.callbacks().subscribe(studyTemplates,function(){this.applyStudyTemplate(i)}),t.push(o)})):t.push(newb({text:$.t("No study templates saved"),enabled:!1}))}vare,i,o,n,s,r,a,l=this.actions(),h=this._model.dataSources(),c=!1,d=!1;for(e=0,i=h.length;e<i;e++)o=h[e],TradingView.isInherited(o.constructor,v)&&o.isUserDeletable()&&(c=!0),TradingView.isInherited(o.constructor,m)&&o.removeByRemoveAllStudies()&&(d=!0),TradingView.isInherited(o.constructor,g)&&(d=!0);this._readOnly||(l.paneRemoveAllStudies&&l.paneRemoveAllStudies.setEnabled(d),l.paneRemoveAllDrawingTools&&l.paneRemoveAllDrawingTools.setEnabled(c),l.paneRemoveAllStudiesDrawingTools&&l.paneRemoveAllStudiesDrawingTools.setEnabled(d||c)),window.studyTemplates&&(t(),studyTemplates.refreshStudyTemplateList(t)),n=this,s=[],r=O,a=function(t){returnt.id===n.model().model().properties().timezone.value()},r.forEach(function(t){if(!t.separator){vare=newb({text:t.title,checkable:!0,checked:a(t)});e.callbacks().subscribe(this,function(){n.model().setProperty(n.model().model().properties().timezone,t.id,"Changed Time Zone")}),s.push(e)}},this),l.applyTimeZone.subActions=s,l.addToWatchlist&&(l.addToWatchlist.text=$.t("Add {0} To Watchlist").format(this.getSymbol(!0))),l.addToTextNotes&&(l.addToTextNotes.text=$.t("Add Text Note For {0}").format(this.getSymbol(!0))),this.updateActionForIntradayOnly(l.sessionBreaks)},o.prototype.actions=function(){returnthis._actions||this._setActions(),this._actions},o.prototype._setActions=function(){
@@ -284,7 +284,7 @@ var e=this.pane.chart().model(),i=this.pane.state(),o=this.priceScale();e.scaleP
i(90).LineToolVertLine),T=i(147),C=i(339),x=i(318),P=i(309),L=i(311),k=i(331),I=i(310),A=i(150).LineToolParallelChannel,E=i(208),M=i(11).LineToolTrendLine,D=i(103).LineToolArrowMark,O=i(203).LineToolExecution,$=i(326),V=i(322),B=i(316),R=i(320),N=i(321),F=i(206).LineToolFibWedge,z=i(52).LineToolPitchfork,W=i(312),H=i(319),U=i(118),j=i(333),q=i(317),Y=i(323),G=i(119).LineToolTriangle,K=i(340),X=i(200).LineTool5PointsPattern,Z=i(337),J=i(306),Q=i(151).LineToolRiskReward,tt=i(327),et=i(329),it=i(330),ot=i(149).LineToolNote,nt=i(201),st=i(307),rt=i(202),at=i(308),lt=i(16).LineToolText,ht=i(89).LineToolHorzLine,ct=i(324),dt=i(45).LineToolRectangle,pt=i(313),ut=i(336),_t=i(335),ft=i(207),mt=i(148).LineToolBezierQuadro,gt=i(148).LineToolBezierCubic,vt=i(31).Study,yt=i(78).StudyLineDataSource,bt=i(351).study_Overlay,wt=i(349),St=i(619),Tt=i(302),Ct=i(87).StudyInputsPropertyPage,xt=i(87).StudyStylesPropertyPage,Pt=i(599),Lt=i(663),kt=i(64),It=i(293).LineToolHorzLineStylesPropertyPage,At=i(293).LineToolHorzLineInputsPropertyPage,Et=i(296).LineToolTrendAngleStylesPropertyPage,Mt=i(296).LineToolTrendAngleInputsPropertyPage,Dt=i(294).LineToolRiskRewardStylesPropertyPage,Ot=i(294).LineToolRiskRewardInputsPropertyPage,$t=i(297).LineToolVertLineStylesPropertyPage,Vt=i(297).LineToolVertLineInputsPropertyPage,Bt=i(611).LineToolBarsPatternStylesPropertyPage,Rt=i(292).LineToolGhostFeedInputsPropertyPage,Nt=i(292).LineToolGhostFeedStylesPropertyPage,Ft=i(614),zt=i(647),Wt=i(672),Ht=i(612),Ut=i(638),jt=i(637),qt=i(645),Yt=i(644),Gt=i(620),Kt=i(608),Xt=i(649),Zt=i(636),Jt=i(609),Qt=i(641),te=i(610),ee=i(613),ie=i(640),oe=i(639),ne=i(633),se=i(631),re=i(632),ae=i(622),le=i(628),he=i(624),ce=i(625),de=i(626),pe=i(629),ue=i(615),_e=i(646),fe=i(617),me=i(616),ge=i(606),ve=i(607),ye=i(635),be=i(648),we=i(618),Se=i(630),Te=i(634),Ce=i(627),xe=i(596);e.createInputsPropertyPage=function(t,e){vari=o(t);returni?newi(t.properties(),e,t):null},e.createStudyStrategyPropertyPage=function(t,e){varo=i(354),n=i(665);returntinstanceofo?newn(t.properties(),e,t):null},e.createStylesPropertyPage=function(t,e){vari=n(t);returni?newi(t.properties(),e,t):null},e.createDisplayPropertyPage=function(t,e){vari=s(t);returni?newi(t.properties(),e,t):null},e.createVisibilitiesPropertyPage=function(t,e){vari=r(t);returni?newi(t.properties(),e,t):null},e.hasInputsPropertyPage=function(t){return!!o(t)},e.hasStylesPropertyPage=function(t){return!!n(t)},e.hasDisplayPropertyPage=function(t){return!!s(t)}}).call(e,i(3))},function(t,e){"use strict";functioni(){this.backColorers=[]}functiono(t){i.call(this),this._series=t}functionn(t,e){i.call(this),this._study=t,this._plotIndex=e}i.prototype.barStyle=function(t,e,i){varo,n={};for(o=this.backColorers.length-1;o>=0;o--)this.backColorers[o].applyBarStyle(t,e,n,i);returnthis.applyBarStyle(t,e,n,i),n},i.prototype.pushBackBarColorer=function(t){this.backColorers.push(t)},i.prototype.applyBarStyle=function(t,e,i){throwError("This function is supposed to be reimplemented in a subclass")},inherit(o,i),
t=n.sortSources(t),this._cachedOrderedSoruces=t,this._cachedOrderedSoruces},a.prototype.invalidateSourcesCache=function(){this._cachedOrderedSoruces=null},a.prototype.hasSeries=function(){returnthis._hasSeries},a.prototype.addDataSource=function(t,e){if(e||-1===this.m_dataSources.indexOf(t)){TradingView.isInherited(t.constructor,p)&&(this._hasSeries=!0);vari=this;t.properties().visible.listeners().subscribe(null,function(){i._sourcesForAutoscale=null}),this.m_dataSources.push(t),this._mainSource=void0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.initScaleProperties(),this.invalidateSourcesCache()}},a.prototype.initScaleProperties=function(){vart=this.mainSource()instanceofp&&this.mainSource().properties().lockScale.value();t&&(this.properties().percentage.setValue(!1),this.properties().log.setValue(!1),this.properties().autoScale.setValue(!1)),this.properties().percentageDisabled.setValue(t),this.properties().logDisabled.setValue(t),this.properties().autoScaleDisabled.setValue(this.properties().percentage.value()),this.properties().percentage.value()&&this.properties().log.setValue(!1)},a.prototype.removeDataSource=function(t){vare=this.m_dataSources.indexOf(t);if(-1===e)throwError("source is not attached to scale");this.m_dataSources.splice(e,1),TradingView.isInherited(t.constructor,p)&&(this._hasSeries=!1),this.mainSource()||this.setAutoScale(!0),this._mainSource=void0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache()},a.prototype.setAutoScale=function(t){this._properties.autoScale.setValue(t)},a.prototype.isScaled=function(){return"number"==typeofthis.m_scaleStartPoint},a.prototype.startScale=function(t){this.isPercentage()||null===this.m_scaleStartPoint&&null===this.m_priceRangeSnapshot&&(this.isEmpty()||(this.m_scaleStartPoint=this.m_height-t,this.m_priceRangeSnapshot=this.priceRange().clone()))},a.prototype.marks=function(){returnthis._marksCache?this._marksCache:(this.m_markBuilder.rebuildTickMarks(),this._marksCache=this.m_markBuilder.marks(),this.onMarksChanged.fire(),this._marksCache)},a.prototype.scaleTo=function(t){vare,i;this.isPercentage()||(this._marksCache=null,null!==this.m_scaleStartPoint&&(this.setAutoScale(!1),e=this.m_priceRange.clone(),t=this.m_height-t,t<0&&(t=0),i=(this.m_scaleStartPoint+.2*(this.m_height-1))/(t+.2*(this.m_height-1)),i=Math.max(i,.1),this.m_priceRange=this.m_priceRangeSnapshot.clone(),this.m_priceRange.scaleAroundCenter(i),this.recalcLockedScale(e)))},a.prototype.recalcLockedScale=function(t){vare,i,n,s;if(this.mainSource()instanceofp&&this.mainSource().properties().lockScale.value()){if(e=this.mainSource().model().timeScale(),i=this.mainSource().data().boxSize,(void0===i||isNaN(i))&&this.mainSource().fixBoxSize(),void0===i||isNaN(i))return;this.properties().percentage.value()&&(n=this.mainSource().data().search(this.mainSource().getRealVisibleRange().m_firstBar).value[TradingView.CLOSE_PLOT],
icon:i(830),localizedName:$.t("Trend Line")},LineToolTriangle:{icon:i(831),localizedName:$.t("Triangle")},LineToolTrianglePattern:{icon:i(832),localizedName:$.t("Triangle Pattern")},LineToolVertLine:{icon:i(833),localizedName:$.t("Vertical Line")},SyncDrawing:{icon:i(834),localizedName:$.t("Sync drawings to all charts")},arrow:{icon:i(837),localizedName:$.t("Arrow")},cursor:{icon:i(850),localizedName:$.t("Cross")},dot:{icon:i(851),localizedName:$.t("Dot")},drawginmode:{icon:i(853),localizedName:$.t("Stay in Drawing Mode")},eraser:{icon:i(854),localizedName:$.t("Eraser")},group:{icon:i(858),localizedName:$.t("Show Hidden Tools")},hideAllDrawings:{icon:i(861),localizedName:$.t("Hide All Drawing Tools")},lockAllDrawings:{icon:i(885),localizedName:$.t("Lock All Drawing Tools")},magnet:{icon:i(886),localizedName:$.t("Magnet Mode")},measure:{icon:i(887),localizedName:$.t("Measure (Shift + Click on the chart)")},removeAllDrawingTools:{icon:i(891),localizedName:$.t("Remove All Drawing Tools")},showObjectsTree:{icon:i(894),localizedName:$.t("Show Objects Tree")},zoom:{icon:i(902),localizedName:$.t("Zoom In")},"zoom-out":{icon:i(901),localizedName:$.t("Zoom Out")}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.layouts={s:{title:"1 chart",count:1,sizer:function(t,e,i,o){return{width:e.width-o-o,height:e.height-o-o,top:o,left:o}}}}},function(t,e,i){"use strict";varo,n,s;Object.defineProperty(e,"__esModule",{value:!0}),o=i(73),n=i(27),s=function(t){functione(e,i,o,n){vars=this;returni||(i=1),"forex"!==o&&"cfd"!==o||!n?(s=t.call(this,1)||this,s._isForex=!1):(s=t.call(this,n)||this,s._isForex=!0),s._pipPriceScale=e,s._pipMinMove=i,s._pipMinMove2=n,s}returno.__extends(e,t),e.prototype.format=function(e,i,o){varn=this._isForex?this._pipMinMove2:this._pipMinMove;returnvoid0===n&&(n=NaN),t.prototype.format.call(this,e*this._pipPriceScale/n,i,o)},e}(n.PriceFormatter),e.PipFormatter=s},function(t,e,i){"use strict";varo,n,s;Object.defineProperty(e,"__esModule",{value:!0}),o=i(26),n=i(35),s=function(){functiont(t){this._numericFormatter=newo.NumericFormatter(t),this._fractionalValues=void0!==t&&t>0}returnt.prototype.format=function(t){if(!n.isNumber(t))return"---";vare="";returnt<0&&(e="-",t=-t),t>=1e100?"N/A":((!this._fractionalValues||t>=995)&&(t=Math.round(t)),t<995?e+this._formatNumber(t):t<999995?e+this._formatNumber(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),e+this._formatNumber(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),e+this._formatNumber(t/1e9)+"B"))},t.prototype.parse=function(t){vare,i,o;return"---"===t?{error:"not a number",res:!1,value:NaN}:(e={K:1e3,M:1e6,B:1e9},i=t.slice(-1),e.hasOwnProperty(i)?(o=this._numericFormatter.parse(t.slice(0,-1)),n.isNumber(o)?{res:!0,value:o*e[i]}:{error:"not a number",res:!1,value:NaN}):(o=this._numericFormatter.parse(t),n.isNumber(o)?{res:!0,value:o}:{error:"not a number",res:!1,value:NaN}))},t.prototype._formatNumber=function(t){returnthis._numericFormatter.format(t).replace(/(\.[1-9]*)0+$/,function(t,e){returne})},t}(),e.VolumeFormatter=s
emit:function(){this.state==fe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),dt.VERSION="2.0.7",dt.defaults={domEvents:!1,touchAction:ne,enable:!0,inputTarget:null,inputClass:null,preset:[[lt,{enable:!1}],[rt,{enable:!1},["rotate"]],[ht,{direction:Bt}],[st,{direction:Bt},["swipe"]],[ct],[ct,{event:"doubletap",taps:2},["tap"]],[at]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ve=1,ye=2,pt.prototype={set:function(t){returnft(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?ye:ve},recognize:function(t){vare,i,o,n,s=this.session;if(!s.stopped)for(this.touchAction.preventDefaults(t),i=this.recognizers,o=s.curRecognizer,(!o||o&&o.state&fe)&&(o=s.curRecognizer=null),n=0;n<i.length;)e=i[n],s.stopped===ye||o&&e!=o&&!e.canRecognizeWith(o)?e.reset():e.recognize(t),!o&&e.state&(pe|ue|_e)&&(o=s.curRecognizer=e),n++},get:function(t){vare,i;if(tinstanceoftt)returnt;for(e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)returne[i];returnnull},add:function(t){if(h(t,"add",this))returnthis;vare=this.get(t.options.event);returne&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){vare,i;returnh(t,"remove",this)?this:(t=this.get(t),t&&(e=this.recognizers,-1!==(i=w(e,t))&&(e.splice(i,1),this.touchAction.update())),this)},on:function(t,e){if(t!==a&&e!==a){vari=this.handlers;returnc(b(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==a){vari=this.handlers;returnc(b(t),function(t){e?i[t]&&i[t].splice(w(i[t],e),1):deletei[t]}),this}},emit:function(t,e){vari,o;if(this.options.domEvents&&_t(t,e),(i=this.handlers[t]&&this.handlers[t].slice())&&i.length)for(e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()},o=0;o<i.length;)i[o](e),o++},destroy:function(){this.element&&ut(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ft(dt,{INPUT_START:kt,INPUT_MOVE:It,INPUT_END:At,INPUT_CANCEL:Et,STATE_POSSIBLE:de,STATE_BEGAN:pe,STATE_CHANGED:ue,STATE_ENDED:_e,STATE_RECOGNIZED:fe,STATE_CANCELLED:me,STATE_FAILED:ge,DIRECTION_NONE:Mt,DIRECTION_LEFT:Dt,DIRECTION_RIGHT:Ot,DIRECTION_UP:$t,DIRECTION_DOWN:Vt,DIRECTION_HORIZONTAL:Bt,DIRECTION_VERTICAL:Rt,DIRECTION_ALL:Nt,Manager:pt,Input:L,TouchAction:Z,TouchInput:j,MouseInput:z,PointerEventInput:W,TouchMouseInput:Y,SingleTouchInput:H,Recognizer:tt,AttrRecognizer:nt,Tap:ct,Pan:st,Swipe:ht,Pinch:rt,Rotate:lt,Press:at,on:m,off:g,each:c,merge:gt,extend:mt,assign:ft,inherit:p,bindFn:u,prefixed:C}),be=a!==n?n:"undefined"!=typeofself?self:{},be.Hammer=dt,(o=function(){returndt}.call(e,i,e,t))!==a&&(t.exports=o)}(window,document)},function(t,e){"use strict";functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varo
;Object.defineProperty(e,"__esModule",{value:!0}),o=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),e.KeyboardListener=function(){functiont(){vare=arguments.length>0&&void0!==arguments[0]?arguments[0]:"keydown";i(this,t),this._event=e}returno(t,[{key:"regHandlers",value:function(t){this._handlers=t}},{key:"watchOn",value:function(t){this._listener=this._regListener(),this._watchingEl=t,t.addEventListener(this._event,this._listener)}},{key:"stopWatching",value:function(){this._watchingEl.removeEventListener(this._event,this._listener)}},{key:"_regListener",value:function(){vart=this;returnfunction(e){vari=e.which,o=t._getHandler(i);e.stopPropagation(),o(e)}}},{key:"_getHandler",value:function(t){vare=this._handlers[t],i=function(){},o=function(t){t.preventDefault(),e(t)};returne?o:i}}]),t}()},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});vari={SELECT:"select",AFTER_CLOSE_MENU:"afterCloseMenu",BEFORE_OPEN_MENU:"beforeOpenMenu"};e.events=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});vari={SELECT:"select"};e.events=i},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a,l;Object.defineProperty(e,"__esModule",{value:!0}),e.AddCompareDialog=void0,n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),s=i(534),r=i(532),a=i(263),i(497),l=null,e.AddCompareDialog=function(){functiont(e){o(this,t),this._chartWidgetCollection=e,this._$symbolSearchPopup=null,this._dialog=null,this._compareTab=news.CompareTab(this._chartWidgetCollection,this),this._addSymbolTab=newr.AddSymbolTab(this._chartWidgetCollection,this)}returnn(t,[{key:"show",value:function(){vart,e=this,i=[];returni.push({name:$.t("Compare"),page:this._compareTab.$tab.addClass("tv-compare-dialog__tab-page")}),i.push({name:$.t("Add Symbol"),page:this._addSymbolTab.$tab.addClass("tv-compare-dialog__tab-page")}),t=(0,a.createTabbedDialog)({tabs:i,width:400,tabStateSaveKey:"CompareAddDialog.tab",destroyOnClose:!0,withScroll:!1,addClass:"tv-compare-dialog",tabsScrollBoxAddClass:"tv-compare-dialog__scroll-box",tabAddClass:"tv-compare-dialog__tab",isClickOutFn:function(t){if(e._compareTab.isClickOnTab(t)||e._addSymbolTab.isClickOnTab(t))return!1}}),l&&l.close(),this._dialog=t.dialog,this._dialog.open(),l=this._dialog,this._dialog}},{key:"getZIndex",value:function(){returnthis._dialog.zIndex}}]),t}()},function(t,e,i){"use strict";functiono(t){returnt&&t.__esModule?t:{default:t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){
if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionr(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vara,l;Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolCheckbox=void0,a=i(187),l=o(a),e.AddSymbolCheckbox=function(t){functione(t){n(this,e),t.checked=TVSettings.getBool("showAddSymbolDialog.checkboxState",!0);vari=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));returni.$checkbox.change(function(){setTimeout(function(){TVSettings.setValue("showAddSymbolDialog.checkboxState",i.checked)})}),i}returnr(e,t),e}(l.default)},function(t,e,i){"use strict";functiono(t){returnt&&t.__esModule?t:{default:t}}functionn(t,e){vari,o,n,s,h,u,_,f,m,g,v,y=arguments.length>2&&void0!==arguments[2]?arguments[2]:{};for(y=$.extend({},{title:$.t("Confirm Inputs"),callback:function(t){}},y),i=null,o=(0,r.createDialog)({title:y.title,contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"></div>',width:d,closeOnClickAtOtherDialogs:!0,destroyOnClose:!0,actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--actions-adaptive tv-dialog__section--no-border">',isClickOutFn:function(t){vare=i.symbolSearchPopup();if(e)returne[0]!==t.target&&!e[0].contains(t.target)&&void0},actions:[{name:"apply",type:"primary",text:$.t("Apply"),key:13}]}),p=o,n=(0,l.merge)({},e.defaults.inputs),s=0;s<e.inputs.length;++s)h=e.inputs[s],h.confirm||deleten[h.id];u=newc.default({inputs:n}),_={metaInfo:function(){returne}},f=o.$content,o.open(),i=newa.StudyInputsPropertyPage(u,t.model(),_,!0,o.zIndex),m=i.widget(),f.append(m),Array.prototype.forEach.call(f.find("select"),function(t){vare=$(t),i="tv-select-container dialog";e.hasClass("tv-select-container-fontsize")&&(i+=" tv-select-container-fontsize"),e.selectbox({speed:100,classHolder:i})}),$('input[type="text"]',f).addClass("tv-text-input inset dialog"),$("input.ticker",f).TVTicker(),o.on("action:apply",function(){(0,y.callback)(u.state()),o.close()}),g=o.$content.innerWidth()-o.$content.width(),v=m.width()+g,v>d&&o.$el.css("max-width",v),f.find("input,select").first().focus()}functions(){returnp}varr,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.show=n,e.instance=s,r=i(71),a=i(87),l=i(35),h=i(24),c=o(h),i(126),d=450,p=null},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a,l;Object.defineProperty(e,"__esModule",{value:!0}),n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),
o&&t(e,o),e}}(),s=i(40),r=["alive","owner","body","width","height","fullscreen","detachable","visible","availWidth","availHeight"],a=["remove","negotiateWidth","negotiateHeight","requestFullscreen","exitFullscreen","detach","attach"],e.ResizerDetacherState=function(){functiont(e){vari,n,a,l,h,c,d,p;o(this,t),this._internals={},this._ownersStack=[],i=this._internals,n=this,a=!0,l=!1,h=void0;try{for(c=r[Symbol.iterator]();!(a=(d=c.next()).done);a=!0)p=d.value,i[p]=news,n[p]=i[p].readonly()}catch(t){l=!0,h=t}finally{try{!a&&c.return&&c.return()}finally{if(l)throwh}}e&&this.pushOwner(e)}returnn(t,[{key:"bridge",value:function(){returnnewl(this)}},{key:"pushOwner",value:function(t){vare,i,o,n,s,r,a;if(t.alive.value()){e=!0,i=!1,o=void0;try{for(n=this._ownersStack[Symbol.iterator]();!(e=(s=n.next()).done);e=!0)r=s.value,this._unsubscribeOwner(r)}catch(t){i=!0,o=t}finally{try{!e&&n.return&&n.return()}finally{if(i)throwo}}a={owner:t},this._ownersStack.push(a),this._subscribeOwner(a)}}},{key:"detachToPopup",value:function(t){vare=i(259).createPopup,o=e(t);return!!o&&(this.pushOwner(o.allocate()),!0)}},{key:"_subscribeOwner",value:function(t){vare,i,o,n,s,a,l,h,c=this,d=t.owner;if(t.deathWatcher||(this._internals.alive.setValue(!0),t.deathWatcher=d.alive.spawn(),t.deathWatcher.subscribe(function(e){e||c._deadHandler(t)})),!t.subscriptions){t.subscriptions=[],e=function(t,e,i){varo,n;returnt[i]?(o=t[i].spawn(),n=c._internals[i],o.subscribe(function(t){returnn.setValue(t)},{callWithLast:!0}),o):null},this._internals.visible.setValue(!1),i=!0,o=!1,n=void0;try{for(s=r[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)"alive"!==(l=a.value)&&"owner"!==l&&(h=e(d,this._internals,l),h?t.subscriptions.push(h):this._internals[l].deleteValue())}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}}this._internals.owner.setValue(d)}},{key:"_unsubscribeOwner",value:function(t,e){vari,o,n,s,r,a;if(t.subscriptions){i=!0,o=!1,n=void0;try{for(s=t.subscriptions[Symbol.iterator]();!(i=(r=s.next()).done);i=!0)a=r.value,a.unsubscribe()}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}t.subscriptions=null}e&&t.deathWatcher&&(t.deathWatcher.unsubscribe(),t.deathWatcher=null)}},{key:"_deadHandler",value:function(t){vare,i,o,n,s,a,l,h=0;if(t&&-1===(h=this._ownersStack.indexOf(t)))throwError("cannot sanitize owner that is not in stack");for(e=this._ownersStack.length-1;e>=h;e--)this._unsubscribeOwner(this._ownersStack[e],!0);if(this._ownersStack.length=h,h>0)this._subscribeOwner(this._ownersStack[h-1]);else{i=!0,o=!1,n=void0;try{for(s=r[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)l=a.value,this._internals[l].deleteValue()}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}}}},{key:"destroy",value:function(){}}]),t}(),l=functiont(e){vari,n,s,l,h,c,d;o(this,t),i=this,n=!0,s=!1,l=void0;try{for(h=r[Symbol.iterator]();!(n=(c=h.next()).done);n=!0)"owner"!==(d=c.value)&&(i[d]=e[d])}catch(t){s=!0,l=t}finally{try{!n&&h.return&&h.return()}finally{if(s)throwl}}
a.forEach(function(t){i[t]=function(){vari=e.owner.value();i&&i[t]&&i[t].apply(i,arguments)}})},e.determineSize=function(t,e){vari,o,n,s,r,a,l=0,h=!0,c=!1,d=void0;try{for(i=e[Symbol.iterator]();!(h=(o=i.next()).done)&&(n=o.value,s=n.min,r=n.max,t<s||r<s||(a=Math.min(t,r),l=Math.max(l,a),t!==l));h=!0);}catch(t){c=!0,d=t}finally{try{!h&&i.return&&i.return()}finally{if(c)throwd}}returnl},e.processNegotiation=function(t){vare,i,o,n,s=[],r=[].concat(t);for(e=0;e<r.length;e++)i=r[e],o=void0,n=void0,isFinite(+i)?o=n=+i:(o=+i.min,n=+i.max),(o<0||isNaN(o))&&(o=0),isNaN(n)&&(n=1/0),o<=n&&n>0&&s.push({min:o,max:n});returns.sort(function(t,e){returnt.min-e.min||t.max-e.max}),s},e.negotiationsAreEqual=function(t,e){if(t.length!==e.length)return!1;for(vari=t.length;i--;){if(t[i].min!==e[i].min)return!1;if(t[i].max!==e[i].max)return!1}}},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.createPopup=e.screenMetrics=e.Root=void0,n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),i(491),s=i(258),r=i(537),a=i(538),l=i(40),h=e.Root=function(){functiont(e){o(this,t),this._width=newl,this._height=newl,this._window=e,this._window||(console&&console.warn&&console.warn("using default window"),this._window=window),this._initFullscreen()}returnn(t,[{key:"allocate",value:function(t){vare,i,o,n=this;returnthis.free(),e=this._window.document,i=$("<div>",e).addClass("js-rootresizer__contents").css({position:"relative",width:"100%",height:"100%"}).prependTo(e.body),this._visibilityApi=newa.VisibilityApi(this._window.document),o={alive:newl(!0),body:newl(i),width:newl,height:newl,availWidth:newl,availHeight:newl,visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:function(){o.alive.setValue(!1)},attach:function(){o.alive.setValue(!1),n._window.close()},requestFullscreen:function(){n._requestFullscreen()},exitFullscreen:function(){n._exitFullscreen()}},o.alive.subscribe(function(t){t||o!==n._area||n.free()}),this._area=o,this._resizeHandler=function(){vart=o.body.value(),e=t[0].clientWidth,i=t[0].clientHeight;o.availHeight.setValue(i),o.availWidth.setValue(e),o.height.setValue(i),o.width.setValue(e)},this._resizeHandler(),$(this._window).on("resize",this._resizeHandler),news.ResizerDetacherState(o).bridge()}},{key:"free",value:function(){if(this._resizeHandler&&($(this._window).off("resize",this._resizeHandler),this._resizeHandler=null),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=null),this._area){vart=this._area;this._area=null,t.alive.setValue(!1),t.body.value().remove()}}},{key:"_requestFullscreen",value:function(){this._fullscreenApi.enter()}},{key:"_exitFullscreen",value:function(){this._fullscreenApi.exit()}},{
o&&t(e,o),e}}(),s=i(41),r=["alive","owner","body","width","height","fullscreen","detachable","visible","availWidth","availHeight"],a=["remove","negotiateWidth","negotiateHeight","requestFullscreen","exitFullscreen","detach","attach"],e.ResizerDetacherState=function(){functiont(e){vari,n,a,l,h,c,d,p;o(this,t),this._internals={},this._ownersStack=[],i=this._internals,n=this,a=!0,l=!1,h=void0;try{for(c=r[Symbol.iterator]();!(a=(d=c.next()).done);a=!0)p=d.value,i[p]=news,n[p]=i[p].readonly()}catch(t){l=!0,h=t}finally{try{!a&&c.return&&c.return()}finally{if(l)throwh}}e&&this.pushOwner(e)}returnn(t,[{key:"bridge",value:function(){returnnewl(this)}},{key:"pushOwner",value:function(t){vare,i,o,n,s,r,a;if(t.alive.value()){e=!0,i=!1,o=void0;try{for(n=this._ownersStack[Symbol.iterator]();!(e=(s=n.next()).done);e=!0)r=s.value,this._unsubscribeOwner(r)}catch(t){i=!0,o=t}finally{try{!e&&n.return&&n.return()}finally{if(i)throwo}}a={owner:t},this._ownersStack.push(a),this._subscribeOwner(a)}}},{key:"detachToPopup",value:function(t){vare=i(259).createPopup,o=e(t);return!!o&&(this.pushOwner(o.allocate()),!0)}},{key:"_subscribeOwner",value:function(t){vare,i,o,n,s,a,l,h,c=this,d=t.owner;if(t.deathWatcher||(this._internals.alive.setValue(!0),t.deathWatcher=d.alive.spawn(),t.deathWatcher.subscribe(function(e){e||c._deadHandler(t)})),!t.subscriptions){t.subscriptions=[],e=function(t,e,i){varo,n;returnt[i]?(o=t[i].spawn(),n=c._internals[i],o.subscribe(function(t){returnn.setValue(t)},{callWithLast:!0}),o):null},this._internals.visible.setValue(!1),i=!0,o=!1,n=void0;try{for(s=r[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)"alive"!==(l=a.value)&&"owner"!==l&&(h=e(d,this._internals,l),h?t.subscriptions.push(h):this._internals[l].deleteValue())}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}}this._internals.owner.setValue(d)}},{key:"_unsubscribeOwner",value:function(t,e){vari,o,n,s,r,a;if(t.subscriptions){i=!0,o=!1,n=void0;try{for(s=t.subscriptions[Symbol.iterator]();!(i=(r=s.next()).done);i=!0)a=r.value,a.unsubscribe()}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}t.subscriptions=null}e&&t.deathWatcher&&(t.deathWatcher.unsubscribe(),t.deathWatcher=null)}},{key:"_deadHandler",value:function(t){vare,i,o,n,s,a,l,h=0;if(t&&-1===(h=this._ownersStack.indexOf(t)))throwError("cannot sanitize owner that is not in stack");for(e=this._ownersStack.length-1;e>=h;e--)this._unsubscribeOwner(this._ownersStack[e],!0);if(this._ownersStack.length=h,h>0)this._subscribeOwner(this._ownersStack[h-1]);else{i=!0,o=!1,n=void0;try{for(s=r[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)l=a.value,this._internals[l].deleteValue()}catch(t){o=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(o)thrown}}}}},{key:"destroy",value:function(){}}]),t}(),l=functiont(e){vari,n,s,l,h,c,d;o(this,t),i=this,n=!0,s=!1,l=void0;try{for(h=r[Symbol.iterator]();!(n=(c=h.next()).done);n=!0)"owner"!==(d=c.value)&&(i[d]=e[d])}catch(t){s=!0,l=t}finally{try{!n&&h.return&&h.return()}finally{if(s)throwl}}
a.forEach(function(t){i[t]=function(){vari=e.owner.value();i&&i[t]&&i[t].apply(i,arguments)}})},e.determineSize=function(t,e){vari,o,n,s,r,a,l=0,h=!0,c=!1,d=void0;try{for(i=e[Symbol.iterator]();!(h=(o=i.next()).done)&&(n=o.value,s=n.min,r=n.max,t<s||r<s||(a=Math.min(t,r),l=Math.max(l,a),t!==l));h=!0);}catch(t){c=!0,d=t}finally{try{!h&&i.return&&i.return()}finally{if(c)throwd}}returnl},e.processNegotiation=function(t){vare,i,o,n,s=[],r=[].concat(t);for(e=0;e<r.length;e++)i=r[e],o=void0,n=void0,isFinite(+i)?o=n=+i:(o=+i.min,n=+i.max),(o<0||isNaN(o))&&(o=0),isNaN(n)&&(n=1/0),o<=n&&n>0&&s.push({min:o,max:n});returns.sort(function(t,e){returnt.min-e.min||t.max-e.max}),s},e.negotiationsAreEqual=function(t,e){if(t.length!==e.length)return!1;for(vari=t.length;i--;){if(t[i].min!==e[i].min)return!1;if(t[i].max!==e[i].max)return!1}}},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.createPopup=e.screenMetrics=e.Root=void0,n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),i(491),s=i(258),r=i(537),a=i(538),l=i(41),h=e.Root=function(){functiont(e){o(this,t),this._width=newl,this._height=newl,this._window=e,this._window||(console&&console.warn&&console.warn("using default window"),this._window=window),this._initFullscreen()}returnn(t,[{key:"allocate",value:function(t){vare,i,o,n=this;returnthis.free(),e=this._window.document,i=$("<div>",e).addClass("js-rootresizer__contents").css({position:"relative",width:"100%",height:"100%"}).prependTo(e.body),this._visibilityApi=newa.VisibilityApi(this._window.document),o={alive:newl(!0),body:newl(i),width:newl,height:newl,availWidth:newl,availHeight:newl,visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:function(){o.alive.setValue(!1)},attach:function(){o.alive.setValue(!1),n._window.close()},requestFullscreen:function(){n._requestFullscreen()},exitFullscreen:function(){n._exitFullscreen()}},o.alive.subscribe(function(t){t||o!==n._area||n.free()}),this._area=o,this._resizeHandler=function(){vart=o.body.value(),e=t[0].clientWidth,i=t[0].clientHeight;o.availHeight.setValue(i),o.availWidth.setValue(e),o.height.setValue(i),o.width.setValue(e)},this._resizeHandler(),$(this._window).on("resize",this._resizeHandler),news.ResizerDetacherState(o).bridge()}},{key:"free",value:function(){if(this._resizeHandler&&($(this._window).off("resize",this._resizeHandler),this._resizeHandler=null),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=null),this._area){vart=this._area;this._area=null,t.alive.setValue(!1),t.body.value().remove()}}},{key:"_requestFullscreen",value:function(){this._fullscreenApi.enter()}},{key:"_exitFullscreen",value:function(){this._fullscreenApi.exit()}},{
key:"_initFullscreen",value:function(){vart=this,e=this._window.document;this._fullscreenApi=newr.FullscreenApi(e),this._fullscreenApi.isFullscreen.subscribe(function(i){i?(t._$exitFullscreenButton=$("<div>",e).addClass("tv-exit-fullscreen-button").text($.t("Exit Full Screen (ESC)")).on("click",function(e){e.preventDefault(),t._exitFullscreen()}).appendTo(e.body),t._onExitFullscreenEsc=function(e){27===e.keyCode&&(e.preventDefault(),t._exitFullscreen())},$(e).on("keyup",t._onExitFullscreenEsc)):(t._$exitFullscreenButton&&(t._$exitFullscreenButton.remove(),t._$exitFullscreenButton=null),t._onExitFullscreenEsc&&($(e).off("keyup",t._onExitFullscreenEsc),t._onExitFullscreenEsc=null)),t._resizeHandler&&t._resizeHandler()})}}]),t}(),c=e.screenMetrics=function(t){vare,i,o=$(t),n=o.offset(),s={left:+n.left,top:+n.top,width:o.width(),height:o.height()},r=o.prop("ownerDocument");returnr&&(e=r.defaultView)?(i=e.innerWidth/$(r.documentElement).width(),isFinite(i)&&(s.left*=i,s.top*=i,s.width*=i,s.height*=i),s.left+=e.screenLeft||e.screenX||0,s.top+=e.screenTop||e.screenY||0,s):s},d=function(t,e){$(t).find("style, link").each(function(t,i){varo,n,s=i.tagName.toLowerCase();if("link"!==s||"stylesheet"===i.getAttribute("rel")){for(o=$("<"+s+">",e),n=0;n<i.attributes.length;n++)o.attr(i.attributes[n].nodeName,i.attributes[n].nodeValue);o.text(i.textContent),o.appendTo(e)}})},e.createPopup=function(){vart,e,i,o,n,s,r,a=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},l="menubar=no,toolbar=no,location=no,personalbar=no,status=no",u={width:a.width,height:a.height,top:a.top,left:a.left};if(a.useElementMetrics){t=c(a.useElementMetrics);for(einu)isFinite(u[e])||(u[e]=t[e])}for(iinu)null!=u[i]&&(l+=","+i+"="+u[i]);if(o=void0,o=null!=a.name?a.name:"_blank",!(n=window.open("",o,l))||n.closed)returnnull;s=null;try{s=n.document,s.close()}catch(t){returnnull}returns.open(),s.write('<!DOCTYPE html>\n<html>\n<head>\n\t<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n</head>\n<body>\n</body>\n</html>'),s.close(),s.body.innerHTML="",null!=a.title&&(s.title=a.title+""),a.useStyles&&d(a.useStyles,s.head),$("<style>",s).text("html, body {min-width: 0 !important; max-width: none !important}").appendTo(s.head),r=newh(n),p(window,n,r),r},p=function(t,e,i){varo=functiono(){t&&(t.removeEventListener("unload",o,!1),t=null),e&&(e.removeEventListener("unload",o,!1),e.close(),e=null),i&&(i.free(),i=null)};t.addEventListener("unload",o,!1),e.addEventListener("unload",o,!1)}},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionn(t,e){vari=newDate(t+e),o=Math.round(Math.abs(e)/6e4),n="UTC";return0!==o&&(n+=e>0?"+":"-",n+=Math.floor(o/60),o%60&&(n+=":"+o%60)),i.getUTCFullYear()+"-"+("0"+(i.getUTCMonth()+1)).slice(-2)+"-"+("0"+i.getUTCDate()).slice(-2)+" "+("0"+i.getUTCHours()).slice(-2)+":"+("0"+i.getUTCMinutes()).slice(-2)+" ("+n+")"}functions(t){return"string"==typeoft&&0!==t.trim().length}functionr(t){vare,i,o,n,r;if(!t||0===t.length)return!0
vart,e,i,o,n,s,a,l,c,u,_,f,m,g,v,y,b,w,S,T=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},C=T.items,x=void0===C?[]:C,P=T.x,L=void0===P?0:P,k=T.y,I=void0===k?0:k,A=T.wrapElement,E=void0===A?null:A,M=T.timeOffset,D=void0===M?"":M,O=T.leftBorderColor,V=void0===O?null:O;if(E&&!r(x)){if(t=$(E).width(),e=$(E).height(),i=!1,o=!1,this._tooltipShown||(this._$tooltip.appendTo(E),this._tooltipShown=!0,i=!0,o=!0),L===this._tooltipX&&I===this._tooltipY||(i=!0),i&&(n=Math.max(Math.min(L-100,t-200),0),this._$tooltip.css({left:Math.round(n),bottom:Math.round(e-I+10)})),this._tooltipItems||(o=!0),!o)for(s=x.length;s--;)if(this._tooltipItems[s]!==x[s]){o=!0;break}if(o){if(a=void0,x.length<=1)a=x;else{for(l={},c=x.length;c--;)u=x[c].importance,null==u&&(u=-1),l[u]||(l[u]=[]),l[u].push(x[c]);if(_=Object.keys(l).sort(function(t,e){returnt-e}),_.length<=1)a=l[_[0]];elsefor(a=[],f=_.length;f--;)for(m=l[_[f]],g=m.length;g--;)a.push(m[g])}for(this._$tooltipContent.empty(),v=a.length;v--;)y=a[v],b="",y.hasOwnProperty("importance")?("string"==typeofy.importance&&("earnings"===y.importance?b="--importance-earnings":"splits"===y.importance?b="--importance-splits":"dividends"===y.importance&&(b="--importance-dividends")),0===y.importance?b="--importance-normal":y.importance>0&&(b="--importance-high")):V||(b="--importance-none"),w="tv-chart-events-source__tooltip__item",b&&(w+=" "+w+b),S=$("<div>").attr("class",w),V&&S.css("border-left-color",V),h(y,S,D),S.appendTo(this._$tooltipContent);this._tooltipItems=x}"bottom"===this._direction&&this._$tooltip.css({bottom:Math.round(e-I-this._$tooltipContent.height()+10)}),this._$tooltip.stop().animate({"margin-bottom":"top"===this._direction?0:d,opacity:1},p)}}},{key:"hide",value:function(){vart=this;this._tooltipShown&&this._$tooltip.stop().animate({"margin-bottom":"top"===this._direction?d:0,opacity:0},u,function(){t._$tooltip.detach(),t._tooltipShown=!1})}},{key:"isOpened",value:function(){returnthis._tooltipShown}}]),t}()},function(t,e,i){"use strict";functiono(t){vare,i;if(t&&t.__esModule)returnt;if(e={},null!=t)for(iint)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);returne.default=t,e}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vars,r,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownView=void0,s=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),i(517),r=i(186),a=i(54),l=o(a),h=i(145),c=i(113),d=o(c),p=e.DropdownView=function(){functiont(e){vari=this,o=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};n(this,t),this.$el=e,this.$wrap=o.$wrap||e.find(".tv-dropdown-behavior__button"),this.$body=o.$body||e.find(".tv-dropdown-behavior__body"),this.notCloseWithCtrl=!!o.notCloseWithCtrl&&o.notCloseWithCtrl,this.closeWithEsc=void0===o.closeWithEsc||o.closeWithEsc,
url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"GET",crossDomain:!0}).done(function(t){r(n(t).data)})},r.saveStudyTemplate=function(o,r){$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"POST",crossDomain:!0,data:{name:o.name,content:o.content}}).done(function(t){vare=n(t);"ok"!==e.status&&console.warn("Template save request failed: "+e.message),r({error:"ok"===e.status?"":e.status})})},r._templatesCache=null,r.getStudyTemplatesList=function(o){if(r._templatesCache)returnvoido(r._templatesCache);r._templatesCache=[],$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(t){vare,i;if(null!==r._templatesCache){if(e=n(t),"ok"!==e.status)returnvoidconsole.warn("Templates list request failed: "+e.message);i=e.data.map(function(t){return{is_default:!1,name:t.name}}),r._templatesCache=i,o(i)}})},r.invalidateStudyTemplatesList=function(){r._templatesCache=null},r}();t.exports=s},function(t,e,i){(function(e){"use strict";varo=i(58),n=i(43).Interval,s=i(15),r=function(t,e){this._server=t,this._session=e,this._timezone=null,this._timezoneId="",this._isDWM=!1,this._resolution=null,this.seriesCompleted=news,this._lastBarTimes={}};r.prototype.lastBarTime=function(t){returnthis._lastBarTimes[t]},r.prototype._userTimezone=function(){returnthis._timezone},r.prototype.setTimezone=function(t){this._timezone="exchange"===t?"exchange":e.get_timezone(t),this._timezoneId=t},r.prototype.timezone=function(){returnthis._timezoneId},r.prototype.setResolution=function(t){this._isDWM=n.isDWM(t),this._resolution=t},r.prototype.onRequestMetadata=function(t,e){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,t,e]})},r.prototype.onSymbolResolved=function(t,e){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,t,e]})},r.prototype.onSymbolError=function(t,e){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,t,e]})},r.prototype.onStudyError=function(t,e){this._server.receiveLocalResponse({method:"study_error",params:[this._session,t,e]})},r.prototype.onSeriesLoading=function(t,e){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,t,e]})},r.prototype.onSeriesCompleted=function(t,e,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,t,i,e]}),this.seriesCompleted.fire(t)},r.prototype.onSeriesError=function(t,e){this._server.receiveLocalResponse({method:"series_error",params:[this._session,t,e]})},r.prototype.onSeriesClearData=function(t,e){vari={};i[t]={series:[],turnaround:e},this._server.receiveLocalResponse({method:"timescale_update",params:[this._session,i,{index:0,zoffset:0,changes:[],marks:[]}]})},r.prototype.onStudyCompleted=function(t,e){
this._server.receiveLocalResponse(n)},r.prototype.timeInTimezone=function(t,i){return"exchange"===this._userTimezone()?parseInt(e.utc_to_cal(i,1e3*t).valueOf()/1e3):parseInt(e.utc_to_cal(this._userTimezone(),1e3*t).valueOf()/1e3)},r.prototype._spanByTime=function(t,e){functioni(t){return60*t*60*1e3}functiono(t){return60*t*1e3}functionn(t){return1e3*t}vars,r,a,l=[{divisor:1,span:20},{divisor:n(1),span:19},{divisor:o(5),span:21},{divisor:o(30),span:22},{divisor:i(1),span:30},{divisor:i(3),span:31},{divisor:i(6),span:32},{divisor:i(12),span:33}];if(!e)return20;if(s=newDate(1e3*e),r=newDate(1e3*t),r.getYear()!==s.getYear())return70;if(r.getUTCMonth()!==s.getUTCMonth())return60;if(r.getUTCDate()!==s.getUTCDate())return50;for(a=l.length-1;a>=0;--a)if(Math.floor(s/l[a].divisor)!==Math.floor(r/l[a].divisor))returnl[a].span},TradingView.ChartapiMessagerInstances=[],t.exports=r}).call(e,i(57))},function(t,e,i){(function(e){"use strict";varo=i(81).PlotType,n=i(25),s=function(){functiont(t){e.enabled("charting_library_debug_mode")&&console.warn("Overrides:"+t)}functions(t,e,i,o){t.defaults.inputs[e]=o,t.inputs[i].defval=o}functionr(t,e){t.defaults.precision=e}functiona(e,i,o,n){vars,r,a=o[1];if("color"===a){if(s=c(e,i),r=o.length>2?parseInt(o[2]):NaN,null==s&&!isNaN(r)&&r>0)returnvoidt("Plot `{1}` of `{0}` does not have color #{2}".format(e.description,o[0],r));0==r||isNaN(r)?(e.defaults.styles[i].color=n,null!=s&&(s.colors[0].color=n)):s.colors[r].color=n}else{if(!e.defaults.styles[i].hasOwnProperty(a))returnvoidt("Plot `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],a));"plottype"===a&&(n=y[n]),e.defaults.styles[i][a]=n}}functionl(e,i,o,n){vars=o[1];if(!e.defaults.bands[i].hasOwnProperty(s))returnvoidt("Band `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],s));"plottype"===s&&(n=y[n]),e.defaults.bands[i][s]=n}functionh(e,i,o,n){vars=o[1];if(!e.defaults.filledAreasStyle[i].hasOwnProperty(s))returnvoidt("Area `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],s));e.defaults.filledAreasStyle[i][s]=n}functionc(t,e){for(variint.plots)if("colorer"===t.plots[i].type&&t.plots[i].target===e)returnt.defaults.palettes[t.plots[i].palette];returnnull}functiond(t){vare,i,o=JSServer.studyLibrary;for(e=0;e<o.length;++e)if(i=o[e].metainfo,i.description.toLowerCase()===t.toLowerCase()||i.shortDescription.toLowerCase()===t.toLowerCase())returni;returnnull}functionp(t,e){for(vari=0;i<t.inputs.length;++i)if(t.inputs[i].name.toLowerCase()===e.toLowerCase())return{id:t.inputs[i].id,index:i};returnnull}functionu(t,e){for(variint.styles)if(t.styles[i].title.toLowerCase()===e.toLowerCase())returni;returnnull}function_(t,e){for(variint.filledAreas)if(t.filledAreas[i].title.toLowerCase()===e.toLowerCase())returnt.filledAreas[i].id;returnnull}functionf(t,e){if(!t.bands)returnnull;for(variint.bands)if(t.bands[i].name.toLowerCase()===e.toLowerCase())returni;returnnull}varm,g,v={"volume.transparency":"!transparency",
"upper limit":"UpperLimit","lower limit":"LowerLimit"},y={};if(Object.keys(o).forEach(function(t){y[t.toLowerCase()]=o[t]}),m={},m.setMetainfoProperty=function(e,i,o){varn,c,d,m,g,y,b,w,S,T,C;if(i=v[i]||i,n=i.split("."),c=n[0],0===c.indexOf("!"))returnvoid(e[c.slice(1)]=o);d=c.split(":"),c=d[0],c=v[c]||c,m=null,g=null,y=null,b=null,w="options"===c,S="precision"===c&&e.defaults&&e.defaults.precision,T=2===d.length?d[1]:null,"plot"!==T&&T||(m=u(e,c)),"band"!==T&&T||(g=f(e,c)),"area"!==T&&T||(y=_(e,c)),"input"!==T&&T||(b=p(e,c)),C=!!m+!!g+!!b+!!w+!!y+!!S,0===C?t("Study `{0}` has no plot or input `{1}`".format(e.description,c)):C>1?t("Study `{0}` ambiguous identifier `{1}`".format(e.description,c)):m?a(e,m,n,o):b?s(e,b.id,b.index,o):g?l(e,g,n,o):y?h(e,y,n,o):S?r(e,o):e[n[1]]=o},m.setProperty=function(e,i){varo=e.split(".")[0],n=d(o);if(!n)returnvoidt("Study `{0}` not found".format(o));m.setMetainfoProperty(n,e.substring(o.length+1),i)},m.applyDefaultsToFactoryDefaults=function(t){vare={};t.forEach(function(t){vari=t.split(".")[0],o=d(i);o&&(e[o.id]=o)}),Object.keys(e).forEach(function(t){vari=e[t];n.createDefaultsForStudy(i)})},i(141),"undefined"!=typeof__initialMetainfoOverrides&&__initialMetainfoOverrides)for(gin__initialMetainfoOverrides)m.setProperty(g,__initialMetainfoOverrides[g]);returnm}();t.exports=s}).call(e,i(3))},function(t,e,i){"use strict";functiono(t,e){this._chartApi=t,this.generateSessionId(),this._sessionDisabled=!1,this._disableStatistics=!!e}varn=i(60);i(12).getLogger("ChartSession");o.prototype.destroy=function(){this._sessionDisabled||this.stopSession()},o.prototype.generateSessionId=function(){this._sessionid="cs_"+n.randomHash()},o.prototype.serverTimeOffset=function(){returnthis._chartApi.serverTimeOffset()},o.prototype.connected=function(){returnthis._chartApi.connected()&&!this._sessionDisabled},o.prototype.disconnected=function(){vart=this;this.restartSession(),Object.keys(this).forEach(function(e){/^(s|st|symbol_)\d+$/.test(e)&&deletet[e]})},o.prototype.initSession=function(){returnthis._chartApi.createSession(this._sessionid,this)},o.prototype.stopSession=function(){returnthis._chartApi.removeSession(this._sessionid)},o.prototype.restartSession=function(){this.stopSession(),this.generateSessionId(),this.initSession()},o.prototype.setHandler=function(t){this._globalHandler=t},o.prototype.sessionId=function(){returnthis._sessionid},o.prototype.connect=function(t){returnthis._globalHandler=t,this.initSession(),this._chartApi.connect()},o.prototype.disconnect=function(){returnthis._chartApi.disconnect()},o.prototype.switchTimezone=function(t){returnthis._chartApi.switchTimezone(this._sessionid,t)},o.prototype.resolveSymbol=function(t,e,i){returnthis._chartApi.resolveSymbol(this._sessionid,t,e,i)},o.prototype.createSeries=function(t,e,i,o,n,s){returnthis._chartApi.createSeries(this._sessionid,t,e,i,o,n,s)},o.prototype.removeSeries=function(t,e){returnthis._chartApi.removeSeries(this._sessionid,t,e)},o.prototype.modifySeries=function(t,e,i,o,n){
url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"GET",crossDomain:!0}).done(function(t){r(n(t).data)})},r.saveStudyTemplate=function(o,r){$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"POST",crossDomain:!0,data:{name:o.name,content:o.content}}).done(function(t){vare=n(t);"ok"!==e.status&&console.warn("Template save request failed: "+e.message),r({error:"ok"===e.status?"":e.status})})},r._templatesCache=null,r.getStudyTemplatesList=function(o){if(r._templatesCache)returnvoido(r._templatesCache);r._templatesCache=[],$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(t){vare,i;if(null!==r._templatesCache){if(e=n(t),"ok"!==e.status)returnvoidconsole.warn("Templates list request failed: "+e.message);i=e.data.map(function(t){return{is_default:!1,name:t.name}}),r._templatesCache=i,o(i)}})},r.invalidateStudyTemplatesList=function(){r._templatesCache=null},r}();t.exports=s},function(t,e,i){(function(e){"use strict";varo=i(58),n=i(36).Interval,s=i(15),r=i(3),a=function(t,e){this._server=t,this._session=e,this._timezone=null,this._timezoneId="",this._isDWM=!1,this._resolution=null,this.seriesCompleted=news,this._lastBarTimes={}};a.prototype.lastBarTime=function(t){returnthis._lastBarTimes[t]},a.prototype._userTimezone=function(){returnthis._timezone},a.prototype.setTimezone=function(t){this._timezone="exchange"===t?"exchange":e.get_timezone(t),this._timezoneId=t},a.prototype.timezone=function(){returnthis._timezoneId},a.prototype.setResolution=function(t){this._isDWM=n.isDWM(t),this._resolution=t},a.prototype.onRequestMetadata=function(t,e){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,t,e]})},a.prototype.onSymbolResolved=function(t,e){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,t,e]})},a.prototype.onSymbolError=function(t,e){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,t,e]})},a.prototype.onStudyError=function(t,e){this._server.receiveLocalResponse({method:"study_error",params:[this._session,t,e]})},a.prototype.onSeriesLoading=function(t,e){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,t,e]})},a.prototype.onSeriesCompleted=function(t,e,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,t,i,e]}),this.seriesCompleted.fire(t)},a.prototype.onSeriesError=function(t,e){this._server.receiveLocalResponse({method:"series_error",params:[this._session,t,e]})},a.prototype.onSeriesClearData=function(t,e){vari={};i[t]={series:[],turnaround:e},this._server.receiveLocalResponse({method:"timescale_update",params:[this._session,i,{index:0,zoffset:0,changes:[],marks:[]}]})},a.prototype.onStudyCompleted=function(t,e){
params:[this._session,l]},this._server.receiveLocalResponse(n)},a.prototype.timeInTimezone=function(t,i){return"exchange"===this._userTimezone()?parseInt(e.utc_to_cal(i,1e3*t).valueOf()/1e3):parseInt(e.utc_to_cal(this._userTimezone(),1e3*t).valueOf()/1e3)},a.prototype._spanByTime=function(t,e){functioni(t){return60*t*60*1e3}functiono(t){return60*t*1e3}functionn(t){return1e3*t}vars,r,a,l=[{divisor:1,span:20},{divisor:n(1),span:19},{divisor:o(5),span:21},{divisor:o(30),span:22},{divisor:i(1),span:30},{divisor:i(3),span:31},{divisor:i(6),span:32},{divisor:i(12),span:33}];if(!e)return20;if(s=newDate(1e3*e),r=newDate(1e3*t),r.getYear()!==s.getYear())return70;if(r.getUTCMonth()!==s.getUTCMonth())return60;if(r.getUTCDate()!==s.getUTCDate())return50;for(a=l.length-1;a>=0;--a)if(Math.floor(s/l[a].divisor)!==Math.floor(r/l[a].divisor))returnl[a].span},TradingView.ChartapiMessagerInstances=[],t.exports=a}).call(e,i(57))},function(t,e,i){(function(e){"use strict";varo=i(81).PlotType,n=i(25),s=function(){functiont(t){e.enabled("charting_library_debug_mode")&&console.warn("Overrides:"+t)}functions(t,e,i,o){t.defaults.inputs[e]=o,t.inputs[i].defval=o}functionr(t,e){t.defaults.precision=e}functiona(e,i,o,n){vars,r,a=o[1];if("color"===a){if(s=c(e,i),r=o.length>2?parseInt(o[2]):NaN,null==s&&!isNaN(r)&&r>0)returnvoidt("Plot `{1}` of `{0}` does not have color #{2}".format(e.description,o[0],r));0==r||isNaN(r)?(e.defaults.styles[i].color=n,null!=s&&(s.colors[0].color=n)):s.colors[r].color=n}else{if(!e.defaults.styles[i].hasOwnProperty(a))returnvoidt("Plot `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],a));"plottype"===a&&(n=y[n]),e.defaults.styles[i][a]=n}}functionl(e,i,o,n){vars=o[1];if(!e.defaults.bands[i].hasOwnProperty(s))returnvoidt("Band `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],s));"plottype"===s&&(n=y[n]),e.defaults.bands[i][s]=n}functionh(e,i,o,n){vars=o[1];if(!e.defaults.filledAreasStyle[i].hasOwnProperty(s))returnvoidt("Area `{1}` of `{0}` does not have property `{2}`".format(e.description,o[0],s));e.defaults.filledAreasStyle[i][s]=n}functionc(t,e){for(variint.plots)if("colorer"===t.plots[i].type&&t.plots[i].target===e)returnt.defaults.palettes[t.plots[i].palette];returnnull}functiond(t){vare,i,o=JSServer.studyLibrary;for(e=0;e<o.length;++e)if(i=o[e].metainfo,i.description.toLowerCase()===t.toLowerCase()||i.shortDescription.toLowerCase()===t.toLowerCase())returni;returnnull}functionp(t,e){for(vari=0;i<t.inputs.length;++i)if(t.inputs[i].name.toLowerCase()===e.toLowerCase())return{id:t.inputs[i].id,index:i};returnnull}functionu(t,e){for(variint.styles)if(t.styles[i].title.toLowerCase()===e.toLowerCase())returni;returnnull}function_(t,e){for(variint.filledAreas)if(t.filledAreas[i].title.toLowerCase()===e.toLowerCase())returnt.filledAreas[i].id;returnnull}functionf(t,e){if(!t.bands)returnnull;for(variint.bands)if(t.bands[i].name.toLowerCase()===e.toLowerCase())returni;returnnull}varm,g,v={
"volume.transparency":"!transparency","upper limit":"UpperLimit","lower limit":"LowerLimit"},y={};if(Object.keys(o).forEach(function(t){y[t.toLowerCase()]=o[t]}),m={},m.setMetainfoProperty=function(e,i,o){varn,c,d,m,g,y,b,w,S,T,C;if(i=v[i]||i,n=i.split("."),c=n[0],0===c.indexOf("!"))returnvoid(e[c.slice(1)]=o);d=c.split(":"),c=d[0],c=v[c]||c,m=null,g=null,y=null,b=null,w="options"===c,S="precision"===c&&e.defaults&&e.defaults.precision,T=2===d.length?d[1]:null,"plot"!==T&&T||(m=u(e,c)),"band"!==T&&T||(g=f(e,c)),"area"!==T&&T||(y=_(e,c)),"input"!==T&&T||(b=p(e,c)),C=!!m+!!g+!!b+!!w+!!y+!!S,0===C?t("Study `{0}` has no plot or input `{1}`".format(e.description,c)):C>1?t("Study `{0}` ambiguous identifier `{1}`".format(e.description,c)):m?a(e,m,n,o):b?s(e,b.id,b.index,o):g?l(e,g,n,o):y?h(e,y,n,o):S?r(e,o):e[n[1]]=o},m.setProperty=function(e,i){varo=e.split(".")[0],n=d(o);if(!n)returnvoidt("Study `{0}` not found".format(o));m.setMetainfoProperty(n,e.substring(o.length+1),i)},m.applyDefaultsToFactoryDefaults=function(t){vare={};t.forEach(function(t){vari=t.split(".")[0],o=d(i);o&&(e[o.id]=o)}),Object.keys(e).forEach(function(t){vari=e[t];n.createDefaultsForStudy(i)})},i(141),"undefined"!=typeof__initialMetainfoOverrides&&__initialMetainfoOverrides)for(gin__initialMetainfoOverrides)m.setProperty(g,__initialMetainfoOverrides[g]);returnm}();t.exports=s}).call(e,i(3))},function(t,e,i){"use strict";functiono(t,e){this._chartApi=t,this.generateSessionId(),this._sessionDisabled=!1,this._disableStatistics=!!e}varn=i(60);i(12).getLogger("ChartSession");o.prototype.destroy=function(){this._sessionDisabled||this.stopSession()},o.prototype.generateSessionId=function(){this._sessionid="cs_"+n.randomHash()},o.prototype.serverTimeOffset=function(){returnthis._chartApi.serverTimeOffset()},o.prototype.connected=function(){returnthis._chartApi.connected()&&!this._sessionDisabled},o.prototype.disconnected=function(){vart=this;this.restartSession(),Object.keys(this).forEach(function(e){/^(s|st|symbol_)\d+$/.test(e)&&deletet[e]})},o.prototype.initSession=function(){returnthis._chartApi.createSession(this._sessionid,this)},o.prototype.stopSession=function(){returnthis._chartApi.removeSession(this._sessionid)},o.prototype.restartSession=function(){this.stopSession(),this.generateSessionId(),this.initSession()},o.prototype.setHandler=function(t){this._globalHandler=t},o.prototype.sessionId=function(){returnthis._sessionid},o.prototype.connect=function(t){returnthis._globalHandler=t,this.initSession(),this._chartApi.connect()},o.prototype.disconnect=function(){returnthis._chartApi.disconnect()},o.prototype.switchTimezone=function(t){returnthis._chartApi.switchTimezone(this._sessionid,t)},o.prototype.resolveSymbol=function(t,e,i){returnthis._chartApi.resolveSymbol(this._sessionid,t,e,i)},o.prototype.createSeries=function(t,e,i,o,n,s){returnthis._chartApi.createSeries(this._sessionid,t,e,i,o,n,s)},o.prototype.removeSeries=function(t,e){returnthis._chartApi.removeSeries(this._sessionid,t,e)},
h!==o&&c.warnings.push({status:"incomplete"}),v=null;d.length;)u=d.pop(),g={status:"incomplete",reason:"unbalanced_brace",offset:u._offset,token:u},h===o&&(g.recover={append:newa}),c.warnings.push(g);returnc.currentState=h,0===c.warnings.length&&deletec.warnings,0===c.errors.length&&deletec.errors,c}functionw(t){vare,i=[];for(e=0;e<t.length;e++)t[e]instanceofs||i.push(t[e]);returni}functionS(t){vare,i,o,n,s,h,c;for(t=w(t),e=[],i=[],n=0;n<t.length;n++)s=t[n],sinstanceofl?i.length&&i[i.length-1].minPrecedence>s.precedence&&(i[i.length-1].minPrecedence=s.precedence):sinstanceofr?i.push(o={minPrecedence:1/0,openBraceIndex:n}):sinstanceofa&&(o=i.pop(),h=t[o.openBraceIndex-1],(c=t[n+1])instanceofl&&!(c.precedence<=o.minPrecedence)||!(!(hinstanceofl)||h.precedence<o.minPrecedence||h.precedence===o.minPrecedence&&h.commutative)||(e.unshift(o.openBraceIndex),e.push(n),i.length&&i[i.length-1].minPrecedence>o.minPrecedence&&(i[i.length-1].minPrecedence=o.minPrecedence)));for(n=e.length;n--;)t.splice(e[n],1);returnt}functionT(t){for(vare=0;e<t.length;e++)t[e].parse&&t[e].parse();returnt}functionC(t){vare=x(t);returnS(e?e:[newf("1"),newp,newr].concat(t).concat(newa))}functionx(t){vare,i,o,n=0,h=1,c=2,d=3,u=n,_=0;for(i=0;i<t.length;i++)if(!((o=t[i])instanceofs))switch(u){casen:if(!(oinstanceoff&&1==+o.value))return!1;u=h;break;caseh:if(!(u===h&&oinstanceofp))return!1;u=c,e=i+1;break;casec:if(oinstanceofr)u=d,_=1;elseif(oinstanceofl)return!1;break;cased:oinstanceofr?_++:oinstanceofa&&--_<=0&&(u=c)}returnt.slice(e)}functionP(t){returnnew_(t).ticker()}functionL(t){if("string"!=typeoft)thrownewTypeError("expression must be a string");returnt=y(t),t.filter(function(t){returntinstanceof_}).map(function(t){returnt.exchange()}).filter(function(t){returnt})}functionk(t){returnt=L(t),1!==t.length?null:t[0]}functionI(t,e){returnt=L(t),t.some(function(t){return!!~e.indexOf((t||"").toUpperCase())})}functionA(t){returnI(t,["BATS"])}functionE(t){return(t=k(t))&&-1!==t.toUpperCase().indexOf("_EOD")}functionM(t){returnI(t,["CHXEUR"])}functionD(t){returnI(t,["CHXJPY"])}functionO(t){returnI(t,["MOEX_DLY","LSE_DLY","LSIN_DLY","BSE_DLY","NSE_DLY","CME_DL","CME_MINI_DL","CBOT_DL","CBOT_MINI_DL","COMEX_DL","COMEX_MINI_DL","NYMEX_DL","NYMEX_MINI_DL","ASX_DLY","BME_DLY","NZX_DLY","NAG_DLY","BMFBOVESPA_DLY","TSE_DLY","TFX_DLY","BCBA_DLY","OTC_DLY","FSE_DLY","SSE_DLY","BIST_DLY","TOCOM_DLY","SIX_DLY","EURONEXT_DLY","BMV_DLY","TSX_DLY","TSXV_DLY","HKEX_DLY","TWSE_DLY"])}function$(t,e){return!!(t=k(t))&&t.substr(0,e.length)===e}functionV(t){if("string"!=typeoft)thrownewTypeError("expression must be a string");vare=S(w(y(t)));returne.forEach(function(t){tinstanceof_&&t.exchange(null)}),R(e)}functionB(t){if("string"!=typeoft)thrownewTypeError("expression must be a string");returnR(S(w(y(t))))}functionR(t){returnt.join("")}varN,F,z,W=[{pattern:"(",ctor:r},{pattern:")",ctor:a},{pattern:"+",ctor:h},{pattern:"-",ctor:c},{pattern:"*",ctor:d},{pattern:"/",ctor:p},{
returnthis.m_bars},o.prototype.nsBars=function(){returnthis.m_nsBars},o.prototype.size=function(){returnthis.m_nsBars._end-this.m_nsBars._start+(this.m_bars._end-this.m_bars._start)},o.prototype.each=function(t){vare;for(e=this.m_bars._start;e<this.m_bars._end&&!t(this.m_bars._indexAt(e),this.m_bars._valueAt(e));++e);for(e=this.m_nsBars._start;e<this.m_nsBars._end&&!t(this.m_nsBars._indexAt(e),this.m_nsBars._valueAt(e));++e);},o.prototype.clear=function(){this.m_bars=newn(["time","open","high","low","close","adt","style"]),this.m_nsBars=newn(["time","open","high","low","close","adt","style"]),this.lastProjectionPrice=void0},o.prototype.first=function(){returnthis.m_bars.isEmpty()?this.m_nsBars._items[0]:this.m_bars._items[0]},o.prototype.isEmpty=function(){returnthis.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},o.prototype.last=function(){returnthis.m_nsBars.isEmpty()?this.m_bars._items[this.m_bars._end-1]:this.m_nsBars._items[this.m_nsBars._end-1]},o.prototype.search=function(t,e){returnthis.nsBars().isEmpty()?this.bars().search(t,e):this.bars().isEmpty()?this.nsBars().search(t,e):this.nsBars().firstTimeIndex()<=t?this.nsBars().search(t,e):this.bars().search(t,e)},o.prototype.valueAt=function(t){vare=this.search(t);if(e)returne.value},o.prototype.firstBar=function(){vart,e,i;returnthis.m_model.timeScale().isEmpty()?null:(t=this.m_model.timeScale().visibleBars(),e=t.firstBar(),i=this.search(e,TradingView.SEARCH_NEAREST_RIGHT),i?i.value:null)},o.prototype.firstValue=function(){vart=this.firstBar();returnt?t[TradingView.CLOSE_PLOT]:null},o.prototype.calculateATR=function(){vart,e,i,o=[];for(t=this.m_bars.lastIndex();t>=this.m_bars.firstIndex();t--)e=this.m_bars._valueAt(t),o.push(e[TradingView.HIGH_PLOT]-e[TradingView.LOW_PLOT]);returni=0===o.length?0:o.reduce(function(t,e){returnt+e},0)/o.length,i*=this.m_series.base()},o.prototype.timeToBarIndex=function(t,e){vari,o;if(null===t)returns.logDebug("SeriesData.timeToBarIndex: time should be a number of seconds since 1970. But it is null"),0;if(e===TradingView.SEARCH_FROM_RIGHT){for(i=this.m_bars.lastIndex();i>=this.m_bars.firstIndex();i--)if(o=this.m_bars._valueAt(i),t>=o[TradingView.TIME_PLOT])returni;for(i=this.m_nsBars.lastIndex();i>=this.m_nsBars.firstIndex();i--)if(o=this.m_nsBars._valueAt(i),t>=o[TradingView.TIME_PLOT])returni;returnthis.m_bars.firstIndex()}if(e===TradingView.SEARCH_FROM_LEFT){for(i=this.m_bars.firstIndex();i<=this.m_bars.lastIndex();i++)if(o=this.m_bars._valueAt(i),t<=o[TradingView.TIME_PLOT])returni;for(i=this.m_nsBars.firstIndex();i<=this.m_nsBars.lastIndex();i++)if(o=this.m_nsBars._valueAt(i),t<=o[TradingView.TIME_PLOT])returni;returnthis.m_bars.lastIndex()}returns.logDebug("SeriesData.timeToBarIndex: Incorrect options value"),0},t.exports=o},function(t,e,i){"use strict";functiono(t,e){this.m_series=t,this.m_model=e,this.m_bars=[],this._invalidated=!0,this._isMarkersEnabled=S.enabled("source_selection_markers")}functionn(t,e){o.call(this,t,e)}functions(t,e){o.call(this,t,e)}functionr(t,e){o.call(this,t,e)}
o.prototype.createPlotLabels=function(t){},o.prototype._showLastValueOnPriceScale=function(){returnthis._model.properties().scalesProperties.showSeriesLastValue.value()},o.prototype.createViews=function(){this._dataWindowView||(this._dataWindowView=newn(this,this._model)),TradingView.Study.prototype.createViews.call(this),this._paneViews.push(this._symbolLabelView)},o.prototype._createFormatter=function(){vart,e,i,o,n,s=this.properties().inputs.symbol.value(),r=this._resolvedSymbols?this._resolvedSymbols[s]:null;"default"===this.properties().minTick.value()?this._formatter=newa(r?r.pricescale:100,r?r.minmov:1,!!r&&r.fractional):(t=this.properties().minTick.value(),e=isNumber(t)?["100","1","false"]:t.split(","),i=parseInt(e[0]),o=parseInt(e[1]),n="true"===e[2],this._formatter=newa(i,o,n)),this.priceScale()&&this.priceScale().updateFormatter()},o.prototype.symbol=function(){vart,e=this.properties().inputs.symbol.value(),i=this._resolvedSymbols?this._resolvedSymbols[e]:null;returnt=i?i.name:e,t.toUpperCase()},o.prototype.title=function(t){vare,i=this.properties().inputs.symbol.value(),o=this._resolvedSymbols?this._resolvedSymbols[i]:null;returno?(e=o.name,o.exchange&&0!==o.exchange.length&&(e+=", "+o.exchange)):e=i,e.toUpperCase()},o.prototype.symbolInfo=function(){if(!this._resolvedSymbols)returnnull;vart=this._properties.inputs.symbol.value();returnt?this._resolvedSymbols[t]:null},o.prototype.lastPriceLabelFixedCoordinate=function(){returnthis._priceAxisViews[0]._fixedCoordinate},o.prototype.tags=function(){vart=this.symbol();returnt?[t]:[]},t.exports=o},function(t,e,i){"use strict";functiono(t){this._studyId=t,this._maxToVers=s.ZERO,this._maxFromVers=s.ZERO,this._migrs=[]}varn=i(80),s=i(732).Version,r=i(12).getLogger("Chart.StudyMigration");o.prototype.addMigration=function(t,e,i){varo=s.parse(t),n=s.parse(e);o.isGreater(this._maxFromVers)&&(this._maxFromVers=o),n.isGreater(this._maxToVers)&&(this._maxToVers=n),this._migrs.push({fromVers:o,toVers:n,rules:i})},o.prototype.updateInputs=function(t,e){vari,o,n;if(!e)returne;for(i=TradingView.clone(e),o=t;o.isLess(this._maxToVers);){if(n=this._findMigration(o),i=this._applyMigration(i,n),!o.isLess(n.toVers))throwError("Problems in study migration process... Possible infinite cycle has been detected and stopped.");o=n.toVers,r.logDebug("Applied migration rule to study: "+this._studyId+" from vers: "+n.fromVers+" to vers: "+n.toVers)}returni},o.prototype._findMigration=function(t){vare,i,o=-1,n=this._maxFromVers;for(e=0;e<this._migrs.length;e++)i=this._migrs[e],i.fromVers.isLess(t)||i.fromVers.isLessOrEqual(n)&&(n=i.fromVers,o=e);if(o<0)throwError("Could not find matching migration for study: "+this._studyId+" vers: "+t);returnthis._migrs[o]},o.prototype._applyMigration=function(t,e){vari,o,n,s=t;for(i=0;i<e.rules.length;i++)o=e.rules[i],n=this._getApplyRuleFun(o.type),s=n(s,o);returns},o.prototype._getApplyRuleFun=function(t){if("inputRemoved"===t)returno._applyInputRemovedRule;if("inputChangedType"===t)returno._applyInputChangedTypeRule
;throwError("Unknown migration rule type: "+t)},o._applyInputRemovedRule=function(t,e){vari,o,s,r;if(!(e.inputIdint))returnt;if(!(i=n.findInputKeyById(t,e.inputId)))returnt;deletet[i],deletet[e.inputId],o={},s=0;for(rint)isNumber(parseInt(r,10))?(o[s]=t[r],s++):o[r]=t[r];returno},o._applyInputChangedTypeRule=function(t,e){vari=n.getInputKeyById(t,e.inputId);if("resetToDefVal"!==e.action)throwError("Unknown action "+e.action+" for rule with type "+e.type);returnt[e.inputId]=e.defVal,t[i].defval=e.defVal,t[i].type=e.inputType,t},t.exports=o},function(t,e,i){"use strict";functiono(t,e){this._source=t,this._model=e,this._points=[newa.Point(0,0)]}functionn(t,e){this._source=t,this._model=e,this._invalidated=!0,this._text="",this._coordinate=0,this._background="black",this._color="white"}functions(t,e){b.call(this),this._study=t,this._model=e,this._items.push(neww("Open","")),this._items.push(neww("High","")),this._items.push(neww("Low","")),this._items.push(neww("Close","")),this._invalidated=!0,this.update()}functionr(t,e,i,o){this._symbolLabelView=newC(t,this,"close","symbol","showSymbolLabels"),h.call(this,t,e,i,o),this._formatter=null,this._paneView=null;varn=this;this.properties().minTick.listeners().subscribe(null,function(){n._createFormatter(),n.updateAllViews(),n._model.invalidate(newL(L.FULL_UPDATE))})}vara=i(2),l=i(42),h=i(31).Study,c=i(66),d=i(67),p=i(346),u=p.SeriesAreaPaneView,_=p.SeriesLinePaneView,f=p.SeriesHollowCandlesPaneView,m=p.SeriesCandlesPaneView,g=p.SeriesBarsPaneView,v=i(156),y=i(146),b=y.DataWindowView,w=y.DataWindowItem,S=i(196).SeriesBarColorer,T=i(89).HorzLineRenderer,C=i(158),x=i(8),P=i(198),L=i(21),k=i(27).PriceFormatter;o.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){vart=this._source.lastValueData("close",!0);t.noData||(this._visible=!0,this._points=[newa.Point(0,t.coordinate)],this._color=t.color)}},o.prototype.renderer=function(){vart={};returnt.points=this._points,t.color=this._color,t.linewidth=1,t.linestyle=CanvasEx.LINESTYLE_DOTTED,t.hitTestResult=x.REGULAR,t.visible=this._visible,newT(t)},inherit(n,c),n.prototype.update=function(){this._invalidated=!0},n.prototype.coordinate=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),c.prototype.coordinate.call(this)},n.prototype._updateImpl=function(){this._visible=!1,this._text="";vart=this._source.lastValueData("close",!1);t.noData||(this._text=t.text,this._floatCoordinate=t.floatCoordinate,this._coordinate=t.coordinate,this._background=t.color,this._visible=!0)},n.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);vart={text:this._text,coordinate:this._coordinate,color:this.color(),background:this._background,visible:this._visible};returnnewd(t)},inherit(s,b),s.prototype._updateImpl=function(){vart,e,i,o,n,s,r,a,h,c,d,p;if(this._header=this._study.title(),!this._model.timeScale().isEmpty()&&0!==this._study.data().length){if(i=!1,
;throwError("Unknown migration rule type: "+t)},o._applyInputRemovedRule=function(t,e){vari,o,s,r;if(!(e.inputIdint))returnt;if(!(i=n.findInputKeyById(t,e.inputId)))returnt;deletet[i],deletet[e.inputId],o={},s=0;for(rint)isNumber(parseInt(r,10))?(o[s]=t[r],s++):o[r]=t[r];returno},o._applyInputChangedTypeRule=function(t,e){vari=n.getInputKeyById(t,e.inputId);if("resetToDefVal"!==e.action)throwError("Unknown action "+e.action+" for rule with type "+e.type);returnt[e.inputId]=e.defVal,t[i].defval=e.defVal,t[i].type=e.inputType,t},t.exports=o},function(t,e,i){"use strict";functiono(t,e){this._source=t,this._model=e,this._points=[newa.Point(0,0)]}functionn(t,e){this._source=t,this._model=e,this._invalidated=!0,this._text="",this._coordinate=0,this._background="black",this._color="white"}functions(t,e){b.call(this),this._study=t,this._model=e,this._items.push(neww("Open","")),this._items.push(neww("High","")),this._items.push(neww("Low","")),this._items.push(neww("Close","")),this._invalidated=!0,this.update()}functionr(t,e,i,o){this._symbolLabelView=newC(t,this,"close","symbol","showSymbolLabels"),h.call(this,t,e,i,o),this._formatter=null,this._paneView=null;varn=this;this.properties().minTick.listeners().subscribe(null,function(){n._createFormatter(),n.updateAllViews(),n._model.invalidate(newL(L.FULL_UPDATE))})}vara=i(2),l=i(43),h=i(31).Study,c=i(66),d=i(67),p=i(346),u=p.SeriesAreaPaneView,_=p.SeriesLinePaneView,f=p.SeriesHollowCandlesPaneView,m=p.SeriesCandlesPaneView,g=p.SeriesBarsPaneView,v=i(156),y=i(146),b=y.DataWindowView,w=y.DataWindowItem,S=i(196).SeriesBarColorer,T=i(89).HorzLineRenderer,C=i(158),x=i(8),P=i(198),L=i(21),k=i(27).PriceFormatter;o.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){vart=this._source.lastValueData("close",!0);t.noData||(this._visible=!0,this._points=[newa.Point(0,t.coordinate)],this._color=t.color)}},o.prototype.renderer=function(){vart={};returnt.points=this._points,t.color=this._color,t.linewidth=1,t.linestyle=CanvasEx.LINESTYLE_DOTTED,t.hitTestResult=x.REGULAR,t.visible=this._visible,newT(t)},inherit(n,c),n.prototype.update=function(){this._invalidated=!0},n.prototype.coordinate=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),c.prototype.coordinate.call(this)},n.prototype._updateImpl=function(){this._visible=!1,this._text="";vart=this._source.lastValueData("close",!1);t.noData||(this._text=t.text,this._floatCoordinate=t.floatCoordinate,this._coordinate=t.coordinate,this._background=t.color,this._visible=!0)},n.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);vart={text:this._text,coordinate:this._coordinate,color:this.color(),background:this._background,visible:this._visible};returnnewd(t)},inherit(s,b),s.prototype._updateImpl=function(){vart,e,i,o,n,s,r,a,h,c,d,p;if(this._header=this._study.title(),!this._model.timeScale().isEmpty()&&0!==this._study.data().length){if(i=!1,
this._study.properties().style.value()===l.STYLE_BARS?(t=this._study.properties().barStyle.upColor.value(),e=this._study.properties().barStyle.downColor.value(),i=this._study.properties().barStyle.barColorsOnPrevClose.value()):this._study.properties().style.value()===l.STYLE_CANDLES?(t=this._study.properties().candleStyle.upColor.value(),e=this._study.properties().candleStyle.downColor.value(),i=this._study.properties().candleStyle.barColorsOnPrevClose.value()):this._study.properties().style.value()===l.STYLE_HOLLOW_CANDLES?(t=this._study.properties().hollowCandleStyle.upColor.value(),e=this._study.properties().hollowCandleStyle.downColor.value(),i=!0):this._study.properties().style.value()===l.STYLE_LINE?t=e=this._study.properties().lineStyle.color.value():this._study.properties().style.value()===l.STYLE_AREA&&(t=e=this._study.properties().areaStyle.linecolor.value()),o=this._study.series(),n=this._model.crossHairSource().appliedIndex(),void0!==(s=o.nearestIndex(n,TradingView.SEARCH_NEAREST_LEFT))){if(!((r=this._study.data().valueAt(s))&&r[TradingView.OPEN_PLOT]&&r[TradingView.HIGH_PLOT]&&r[TradingView.LOW_PLOT]&&r[TradingView.CLOSE_PLOT]))return;for(a=this._study.formatter(),this._items[0].setValue(a.format(r[TradingView.OPEN_PLOT])),this._items[1].setValue(a.format(r[TradingView.HIGH_PLOT])),this._items[2].setValue(a.format(r[TradingView.LOW_PLOT])),this._items[3].setValue(a.format(r[TradingView.CLOSE_PLOT])),i&&s>=1?(c=this._study.data().valueAt(s-1),h=c[TradingView.CLOSE_PLOT]<=r[TradingView.CLOSE_PLOT]?t:e):h=r[TradingView.OPEN_PLOT]<=r[TradingView.CLOSE_PLOT]?t:e,d=0;d<4;d++)this._items[d].setColor(h)}p=P(this._study.symbolInfo()),this._additional=p?"(Data Provided by "+p+")":void0}},s.prototype.items=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},s.prototype.update=function(){this._invalidated=!0},s.prototype.additional=function(){returnthis._invalidated&&(this._updateImpl(),this._invalidated=!1),this._additional},inherit(r,h),r.prototype.createPlotLabels=function(t){},r.prototype._showLastValueOnPriceScale=function(){returnthis._model.properties().scalesProperties.showSeriesLastValue.value()},r.prototype.symbol=function(){vart,e=this.properties().inputs.symbol.value(),i=this._resolvedSymbols?this._resolvedSymbols[e]:null;returnt=i?i.name:e,t.toUpperCase()},r.prototype.lastValueData=function(t,e){vari,o,n=h.prototype.lastValueData.call(this,"close",e);if(n.noData)returnn;switch(i=this.properties(),o=n.item,i.style.value()){casel.STYLE_BARS:n.color=o[TradingView.OPEN_PLOT]<=o[TradingView.CLOSE_PLOT]?i.barStyle.upColor.value():i.barStyle.downColor.value();break;casel.STYLE_CANDLES:casel.STYLE_HOLLOW_CANDLES:n.color=o[TradingView.OPEN_PLOT]<=o[TradingView.CLOSE_PLOT]?i.candleStyle.upColor.value():i.candleStyle.downColor.value();break;casel.STYLE_LINE:n.color=i.lineStyle.color.value();break;casel.STYLE_AREA:n.color=i.areaStyle.color1.value()}returnn},r.prototype.createViews=function(){this._priceAxisViews=[],
priceArrow:this._priceArrow,text:this._textIsVisible&&this._text||null},this._textWidths));returne}},t.exports=o},function(t,e,i){"use strict";functiono(t){returnt+"("+newDate(1e3*t).toUTCString()+")"}functionn(t){vare,i,o,n;returnt+="",e=t.slice(0),i=!1,o=e[e.length-1],-1==="DWM".indexOf(o)&&"S"!==o&&(i=!0,o=""),n=parseInt(i?e:e.length>1?e.slice(0,e.length-1):1),{resolution:o,interval:n}}vars,r=i(58),a=i(57),l=i(43).Interval,h=!1,c=null,d=0,p=function(t,e){this._session=newr.Session,this._session.init(t.timezone,t.session),this._symbolInfo=t,this._resolution=e,this._extrapolatedData=[],this._modelId=d++,this._valid=!!t.timezone&&!!t.session,h&&console.log('Created model "{0}", interval "{1}", session "{2}", tz "{3}"'.format(this._modelId,this._resolution,t.session,t.timezone))};p.prototype.uniqueId=function(){returnthis._modelId},p.prototype.isValid=function(){returnthis._valid},p.prototype._barBuilder=function(){if(!this._builderCache){vart=n(this._resolution);this._builderCache=r.newBarBuilder(t.resolution,t.interval,this._session,this._session)}returnthis._builderCache},p.prototype.distance=function(t,e){vari,n,s,a,l;returnisNumber(t)&&isNumber(e)&&this.isValid()?(i=this._extrapolatedData.length>0?this._extrapolatedData[0]:null,n=i&&this._extrapolatedData[this._extrapolatedData.length-1],1e3*t!==i&&(this._extrapolatedData=[1e3*t],i=null,n=null),(null===i||1e3*e>n)&&(s=500,a=r.extrapolateBarsFrontToTime(this._barBuilder(),n||1e3*t,1e3*e,s),this._extrapolatedData=this._extrapolatedData.concat(a)),(n=this._extrapolatedData[this._extrapolatedData.length-1])<1e3*e?{success:!1}:(l=this._extrapolatedData.indexOf(1e3*e),-1!==l?(h&&console.log('Model "{0}" "{1}", distance between "{2}" and "{3}" is "{4}"'.format(this._modelId,this._resolution,o(t),o(e),l)),{success:!0,result:l}):{success:!1})):{success:!1}},p.prototype.projectTime=function(t,e){vari,n,s,a;returnisNumber(t)&&isNumber(e)&&this.isValid()?(i=this._extrapolatedData.length>0?this._extrapolatedData[0]:null,n=i&&this._extrapolatedData[this._extrapolatedData.length-1],1e3*t!==i&&(this._extrapolatedData=[1e3*t],i=null,n=null),(null===i||e>=this._extrapolatedData.length)&&(s=r.extrapolateBarsFrontByCount(this._barBuilder(),n||1e3*t,e-this._extrapolatedData.length+1),this._extrapolatedData=this._extrapolatedData.concat(s)),e<this._extrapolatedData.length?(a=this._extrapolatedData[e]/1e3,h&&console.log('Model "{0}" "{1}", proj.time from "{2}" offset "{3}" is "{4}"'.format(this._modelId,this._resolution,o(t),e,o(a))),a):t):t},s=function(t,e){this._source=t,this._target=e,this._isSessionTheSame=t._symbolInfo.timezone===e._symbolInfo.timezone&&t._symbolInfo.session===e._symbolInfo.session,this._isResolutionTheSame=t._resolution===e._resolution,this._shouldCorrectTradingDay=l.isDWM(t._resolution)&&!this._isSessionTheSame,this._cache={},null===c&&(c=newr.Session,c.init("UTC","24x7"))},s.prototype._sourceTargetBuilder=function(){vart,e;returnthis._sourceTargetBuilderCache||(t=n(this._target._resolution),e=this._isSessionTheSame?this._target._session:c,
priceArrow:this._priceArrow,text:this._textIsVisible&&this._text||null},this._textWidths));returne}},t.exports=o},function(t,e,i){"use strict";functiono(t){returnt+"("+newDate(1e3*t).toUTCString()+")"}functionn(t){vare,i,o,n;returnt+="",e=t.slice(0),i=!1,o=e[e.length-1],-1==="DWM".indexOf(o)&&"S"!==o&&(i=!0,o=""),n=parseInt(i?e:e.length>1?e.slice(0,e.length-1):1),{resolution:o,interval:n}}vars,r=i(58),a=i(57),l=i(36).Interval,h=!1,c=null,d=0,p=function(t,e){this._session=newr.Session,this._session.init(t.timezone,t.session),this._symbolInfo=t,this._resolution=e,this._extrapolatedData=[],this._modelId=d++,this._valid=!!t.timezone&&!!t.session,h&&console.log('Created model "{0}", interval "{1}", session "{2}", tz "{3}"'.format(this._modelId,this._resolution,t.session,t.timezone))};p.prototype.uniqueId=function(){returnthis._modelId},p.prototype.isValid=function(){returnthis._valid},p.prototype._barBuilder=function(){if(!this._builderCache){vart=n(this._resolution);this._builderCache=r.newBarBuilder(t.resolution,t.interval,this._session,this._session)}returnthis._builderCache},p.prototype.distance=function(t,e){vari,n,s,a,l;returnisNumber(t)&&isNumber(e)&&this.isValid()?(i=this._extrapolatedData.length>0?this._extrapolatedData[0]:null,n=i&&this._extrapolatedData[this._extrapolatedData.length-1],1e3*t!==i&&(this._extrapolatedData=[1e3*t],i=null,n=null),(null===i||1e3*e>n)&&(s=500,a=r.extrapolateBarsFrontToTime(this._barBuilder(),n||1e3*t,1e3*e,s),this._extrapolatedData=this._extrapolatedData.concat(a)),(n=this._extrapolatedData[this._extrapolatedData.length-1])<1e3*e?{success:!1}:(l=this._extrapolatedData.indexOf(1e3*e),-1!==l?(h&&console.log('Model "{0}" "{1}", distance between "{2}" and "{3}" is "{4}"'.format(this._modelId,this._resolution,o(t),o(e),l)),{success:!0,result:l}):{success:!1})):{success:!1}},p.prototype.projectTime=function(t,e){vari,n,s,a;returnisNumber(t)&&isNumber(e)&&this.isValid()?(i=this._extrapolatedData.length>0?this._extrapolatedData[0]:null,n=i&&this._extrapolatedData[this._extrapolatedData.length-1],1e3*t!==i&&(this._extrapolatedData=[1e3*t],i=null,n=null),(null===i||e>=this._extrapolatedData.length)&&(s=r.extrapolateBarsFrontByCount(this._barBuilder(),n||1e3*t,e-this._extrapolatedData.length+1),this._extrapolatedData=this._extrapolatedData.concat(s)),e<this._extrapolatedData.length?(a=this._extrapolatedData[e]/1e3,h&&console.log('Model "{0}" "{1}", proj.time from "{2}" offset "{3}" is "{4}"'.format(this._modelId,this._resolution,o(t),e,o(a))),a):t):t},s=function(t,e){this._source=t,this._target=e,this._isSessionTheSame=t._symbolInfo.timezone===e._symbolInfo.timezone&&t._symbolInfo.session===e._symbolInfo.session,this._isResolutionTheSame=t._resolution===e._resolution,this._shouldCorrectTradingDay=l.isDWM(t._resolution)&&!this._isSessionTheSame,this._cache={},null===c&&(c=newr.Session,c.init("UTC","24x7"))},s.prototype._sourceTargetBuilder=function(){vart,e;returnthis._sourceTargetBuilderCache||(t=n(this._target._resolution),e=this._isSessionTheSame?this._target._session:c,
;for(r.id.value()&&(o.id=r.id.value()),o.name=r.name.value()||"",o.description=r.description.value()||"",o.resolution=a.properties().interval.value(),o.symbol_type=h.type||"",o.exchange=h.exchange||"",o.listed_exchange=h.listed_exchange||"",a.isSpread()?(c=h.legs[0],d=h.base_name[0],d=d.split(":")[1],o.symbol=c,o.short_name=d,o.expression=h.full_name):(p=h.ticker||l.symbol.value(),u=l.shortName.value(),o.symbol=p,o.short_name=u),_=[],f=0,m=h.legs.length;f<m;f++)_.push({symbol:h.legs[f],pro_symbol:h.base_name[f]});returno.legs=JSON.stringify(_),o.content=e?JSON.stringify(n.state(!!t,i)):JSON.stringify(s.state(!!t,i)),t&&(o.image=JSON.stringify(n.images({onlyActiveChart:!e}))),o.is_realtime=t?"0":"1",o},s.prototype.publishChart=function(t){},s.prototype.onPublish=function(t,e){functioni(i){varn,s,r,l,h,c,d;a.publishInProgress=!1,n=i.responseText,"ok:"===n.substr(0,3)?(s=!1,e.savePrivacySetting&&(s=!t.is_public,TVSettings.setValue("publishchart.private",s)),kmRecord("Chart","{0} Published".format(void0===t.script_type?"Chart":"Script"),{is_private:s}),r=n.substr(3),l=JSON.parse(r),a._chartWidgetCollection.metaInfo.id.value()||a._chartWidgetCollection.metaInfo.id.setValue(l.id),e.closeForm&&e.closeForm(),a._lastPublishUrl=l.publishUrl,a.hWnd&&(h=l.publishUrl,e.ideaUrl&&(h=o.render(e.ideaUrl,{idea:l.idea})),a.hWnd.location=h)):(e.showError&&((413===i.status||/^[\d\s]*request.+large/i.test(n.trim()))&&(c="support@tradingview.com",n=$.t("This chart layout has a lot of objects and can't be published! Please report to {0} for further details.").format('<a href="mailto:'+c+'">'+c+"</a>")),d={html:!0},e.showError(n||$.t("Error occured while publishing"),d)),a.hWnd&&(a.hWnd.close(),a.hWnd=null))}varn,s,r,a=this;a.publishInProgress||(n=a._fillSavingInfo(!0,e&&e.publishAllLayout,!0),a._fillAsyncInfo(n,!0,e&&e.publishAllLayout).then(function(e){varo=t.scriptPublication;newPromise(function(e,i){o?ScriptLib.publishNew(o.scriptSource,o.scriptProtection).done(function(i){deletet.scriptPublication,o.scriptProtection===TVScript.Access.ACCESS_CLOSED_NEEDS_AUTH&&PinePerm.add(window.user.username,i.pineId),e(i.publishedstudyscript_id)}).fail(function(){i()}):e()}).then(function(o){o&&(t.publishedstudyscript_id=o),$.ajax({url:"/publishchart/",type:"post",dataType:"text",data:$.extend({},e,t),complete:i})})}),a.publishInProgress=!0,e.onWidget&&!e.ideaUrl||""!==t.name&&""!==t.description&&t.description.length<=4e3&&t.name.length<=64&&($.cookie("publish_request_id",n.publish_request_id,{path:"/"}),s="/loading/",e.ideaUrl&&(r=urlParams.createUrlParams({ideaUrl:e.ideaUrl}),s="/loading?"+r),a.hWnd=window.open(s,"_blank")))},s._saveChart=function(t,e,i,o,n){vars=i,r=o;returns=function(t){e.id.value()||(e.id.setValue(t),e.uid.setValue(t)),"function"==typeofi&&i()},a.saveChart(t.name,t.short_name,t.resolution,t,e,s,r)},s.prototype.saveChartSilently=function(t,e,i,o){varn=this._chartWidgetCollection.metaInfo,r=this._fillSavingInfo(e);if(o=o||{},o.chartName&&(r.name=o.chartName),
;this._options.showJustDefaultQuicks?this._quicks=this._options.defaultFavorites||[]:this._options.notShowQuicks?this._quicks=[]:this._quicks=o.getJSON(this._name+".quicks",this._options.defaultFavorites||[]),this._list=[],t.filter(function(t){return!t.separator}).forEach(function(t,i){varo,n={data:t,drop:function(){n.data.drop&&n.data.drop()},favorite_button:null,index:i,isFavorite:function(){returne._quicks.indexOf(t.id)>-1},markFavorite:function(){n.toQuickButton&&n.toQuickButton.attr("title",$.t("Remove from favorites")).addClass("quicked")},svg:t.svg&&$(t.svg).clone(),toQuickButton:e._options.notShowQuicks?null:$('<span class="to-quick">').append($(l).attr({height:16,width:16})),toggleFavorite:function(t,i){varo=void0!==t?t:!n.isFavorite();o?n.markFavorite():n.unmarkFavorite(),e._toggleFavorite(n,o,i)},unmarkFavorite:function(){n.toQuickButton&&n.toQuickButton.attr("title",$.t("Add to favorites")).removeClass("quicked")}};n.data.toQuickButtonStyle&&n.toQuickButton&&n.toQuickButton.css(n.data.toQuickButtonStyle),e._list.push(n),t.action=e._change.bind(e,n),t.active=e._options.notShowActive?function(){return!1}:function(){return!(!e._active||n!==e._active)},t.buttons=[],e._options.notShowQuicks||t.buttons.push({el:n.toQuickButton,handler:function(t){n.toggleFavorite(),t.preventDefault(),t.stopPropagation()}}),n.data.drop&&(o=$("<span>").addClass("delete").attr("title",$.t("Delete")).html(h),e._options.notShowQuicks&&o.css("right","7px"),t.buttons.push({el:o,handler:function(t){n.drop(),t.stopPropagation()}})),n.toggleFavorite(n.isFavorite(),!0)}),this._data=t,this._options.notShowActive||this._addActive(this._list[0]),this._onResize.fire()},t.prototype._toggleFavorite=function(t,e,i){if(!this._options.notShowQuicks||this._options.showJustDefaultQuicks){if(e){t.favorite_button=this._createButton(t);varo=this._lastFavoriteButton(t);o?t.favorite_button.insertAfter(o.favorite_button):t.favorite_button.prependTo(this._quickContainer)}elsei||this._removeButton(t);i||(e?-1===this._quicks.indexOf(t.data.id)&&this._quicks.push(t.data.id):this._quicks.indexOf(t.data.id)>-1&&this._quicks.splice(this._quicks.indexOf(t.data.id),1),this._saveFavorite(),this._markActive(),this._onResize.fire())}},t.prototype._lastFavoriteButton=function(t){for(vare=t.index-1;e>=0;e--)if(this._list[e]&&this._list[e].favorite_button)returnthis._list[e];returnnull},t.prototype._saveFavorite=function(){this._options.notShowQuicks||(o.setJSON(this._name+".quicks",this._quicks),n.TVXWindowEvents.emit(this._name+"-change"))},t.prototype._createButton=function(t){vare=this,i=t.data.favoriteButton,o=$("<span>").data("item",t);returni.addClass&&o.addClass(i.addClass),i.title&&o.prop("title",r.clean(i.title+"",!0)),t.svg&&$(t.svg).clone().appendTo(o),o.on("click",function(i){e._change(t),0===e._quicks.length&&e.openMenu(),i.preventDefault()}),o},t.prototype._removeButton=function(t){t.favorite_button&&(t.favorite_button.remove(),t.favorite_button=null)},t.prototype._markActive=function(t){vare,i,o=this;this._options.notShowActive||(e=null,
this._active&&(t=this._active,t.isFavorite()?(i=this._quickContainer.find(".just_active"),this._btnToggleActiveView(i,!1)):(e=this._addActive(t),0!==this._quicks.length&&this._btnToggleActiveView(e,!0))),this._list.forEach(function(e){t!==e||0===o._quicks.length?o._btnToggleActiveView(e.favorite_button,!1):e.favorite_button&&o._btnToggleActiveView(t.favorite_button,!0)}),e&&e.hasClass("selected")?this._container.addClass("not-favored-active"):this._container.removeClass("not-favored-active"))},t.prototype._btnToggleActiveView=function(t,e){t&&(e?t.addClass("selected"):t.removeClass("selected"))},t.prototype._addActive=function(t){returnthis._quickContainer.find(".just_active").remove(),this._createButton(t).appendTo(this._quickContainer).addClass("just_active")},t.prototype._setActive=function(t){returnthis._active!==t&&(this._active=t,this._markActive(),!0)},t.prototype._change=function(t){this._onSelect.fire(t.data.id),this._setActive(t)&&this._onChange.fire(t.data.id)},t.prototype._getItemByValue=function(t){for(vareinthis._list)if(this._list[e].data.id===t)returnthis._list[e];throwError("undefined value "+t+" in FavoredList")},t}(),e.FavoredList=c},function(t,e,i){"use strict";varo,n,s,r,a,l,h,c,d;Object.defineProperty(e,"__esModule",{value:!0}),o=i(17),i(286),i(105),n=i(251),s=i(54),r=i(69),a=i(15),l=i(40),h=i(379),c='<div class="tv-floating-toolbar i-closed i-hidden">'+(Modernizr.touch?'<div class="tv-floating-toolbar__drag-ext js-drag"></div>':"")+'<div class="tv-floating-toolbar__widget-wrapper"><div class="tv-floating-toolbar__drag js-drag">'+h+'</div><div class="tv-floating-toolbar__content js-content"></div></div></div>',i(500),d=function(){functiont(e){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=newl(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._reorderedDelegate=newa,t._toolbars.push(this),this._options=e,this._widget=o(c).get(0),this._content=this._widget.getElementsByClassName("js-content").item(0),this._setZIndex(t._startZIndex+t._toolbars.length-1),this._options.addClass&&(this._widget.className+=" "+this._options.addClass),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType())}returnt.prototype.destroy=function(){this.hide(!0),t._toolbars.splice(t._toolbars.indexOf(this),1),document.body.contains(this._widget)&&document.body.removeChild(this._widget),this._widget.innerHTML=""},t.prototype.isVisible=function(){returnthis._visibility.value()},t.prototype.visibility=function(){returnthis._visibility.readonly()},t.prototype.isVertical=function(){returnthis._isVertical},t.prototype.show=function(){vart=this;this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),
this._active&&(t=this._active,t.isFavorite()?(i=this._quickContainer.find(".just_active"),this._btnToggleActiveView(i,!1)):(e=this._addActive(t),0!==this._quicks.length&&this._btnToggleActiveView(e,!0))),this._list.forEach(function(e){t!==e||0===o._quicks.length?o._btnToggleActiveView(e.favorite_button,!1):e.favorite_button&&o._btnToggleActiveView(t.favorite_button,!0)}),e&&e.hasClass("selected")?this._container.addClass("not-favored-active"):this._container.removeClass("not-favored-active"))},t.prototype._btnToggleActiveView=function(t,e){t&&(e?t.addClass("selected"):t.removeClass("selected"))},t.prototype._addActive=function(t){returnthis._quickContainer.find(".just_active").remove(),this._createButton(t).appendTo(this._quickContainer).addClass("just_active")},t.prototype._setActive=function(t){returnthis._active!==t&&(this._active=t,this._markActive(),!0)},t.prototype._change=function(t){this._onSelect.fire(t.data.id),this._setActive(t)&&this._onChange.fire(t.data.id)},t.prototype._getItemByValue=function(t){for(vareinthis._list)if(this._list[e].data.id===t)returnthis._list[e];throwError("undefined value "+t+" in FavoredList")},t}(),e.FavoredList=c},function(t,e,i){"use strict";varo,n,s,r,a,l,h,c,d;Object.defineProperty(e,"__esModule",{value:!0}),o=i(17),i(286),i(105),n=i(251),s=i(54),r=i(69),a=i(15),l=i(41),h=i(379),c='<div class="tv-floating-toolbar i-closed i-hidden">'+(Modernizr.touch?'<div class="tv-floating-toolbar__drag-ext js-drag"></div>':"")+'<div class="tv-floating-toolbar__widget-wrapper"><div class="tv-floating-toolbar__drag js-drag">'+h+'</div><div class="tv-floating-toolbar__content js-content"></div></div></div>',i(500),d=function(){functiont(e){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=newl(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._reorderedDelegate=newa,t._toolbars.push(this),this._options=e,this._widget=o(c).get(0),this._content=this._widget.getElementsByClassName("js-content").item(0),this._setZIndex(t._startZIndex+t._toolbars.length-1),this._options.addClass&&(this._widget.className+=" "+this._options.addClass),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType())}returnt.prototype.destroy=function(){this.hide(!0),t._toolbars.splice(t._toolbars.indexOf(this),1),document.body.contains(this._widget)&&document.body.removeChild(this._widget),this._widget.innerHTML=""},t.prototype.isVisible=function(){returnthis._visibility.value()},t.prototype.visibility=function(){returnthis._visibility.readonly()},t.prototype.isVertical=function(){returnthis._isVertical},t.prototype.show=function(){vart=this;this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),
this._widget.classList.contains("i-hidden")?(this._widget.classList.remove("i-hidden"),setTimeout(function(){t.isVisible()&&t._widget.classList.remove("i-closed")})):this._widget.classList.remove("i-closed"),this._onWindowResize())},t.prototype.hide=function(t){vare,i,o=this;void0===t&&(t=!1),this.isVisible()&&(e=this._widget.classList.contains("i-closed"),this._widget.classList.add("i-closed"),this._visibility.setValue(!1),t||e?(this._setHiddingTimeout(null),this._widget.classList.add("i-hidden")):(i=setTimeout(function(){o._setHiddingTimeout(null),o._widget.classList.add("i-hidden")},this.hideDuration()),this._setHiddingTimeout(i)),window.removeEventListener("resize",this._windowResizeListener))},t.prototype.raise=function(){t._toolbars.length+t._startZIndex!==this._zIndex()&&(t._toolbars.splice(t._toolbars.indexOf(this),1),t._toolbars.push(this),t._updateAllZIndexes())},t.prototype.hideDuration=function(){return.75*s.dur},t.prototype.addWidget=function(t,e){vari,o,n;if(void0===e&&(e={}),i=this.widgetsCount(),void0===e.index&&(e.index=i),e.index<0||e.index>i)throwError("Index must be in [0, "+i+"]");o=document.createElement("div"),o.className="tv-floating-toolbar__widget js-widget",o.appendChild(t),n=e.index===i?null:this._content.childNodes.item(e.index),this._content.insertBefore(o,n),this._onWindowResize()},t.prototype.removeWidget=function(t){vare=this._findWrapperForWidget(t);e&&(this._content.removeChild(e),this._onWindowResize())},t.prototype.widgetsCount=function(){returnthis._content.childNodes.length},t.prototype.showWidget=function(t){vare=this._findWrapperForWidget(t);e&&e.classList.remove("i-hidden")},t.prototype.hideWidget=function(t){vare=this._findWrapperForWidget(t);e&&e.classList.add("i-hidden")},t.prototype.removeWidgets=function(){for(;this._content.firstChild;)this._content.removeChild(this._content.firstChild);this._onWindowResize()},t.prototype.onWidgetsReordered=function(){returnthis._reorderedDelegate},t.prototype.onContextMenu=function(t){vare,i=this;Modernizr.touch?(e=newn(this._widget),e.get("press").set({time:500}),e.on("press",function(e){i._preventWidgetTouchEndEvent(),t(e.srcEvent)})):this._widget.addEventListener("contextmenu",t)},t.prototype._determineCurrentLayoutVertical=function(t){vare=this._isVertical?t.height:t.width;returnwindow.innerWidth<e},t.prototype._getWidget=function(){returnthis._widget},t.prototype._findWrapperForWidget=function(t){vare,i,o=this._content.getElementsByClassName("js-widget");for(e=0;e<o.length;++e)if(i=o.item(e),i.contains(t))returni;returnnull},t.prototype._onVerticalChanged=function(t,e){},t.prototype._setHiddingTimeout=function(t){null!==this._hiddingTimeoutId&&clearTimeout(this._hiddingTimeoutId),this._hiddingTimeoutId=t},t.prototype._preventWidgetTouchEndEvent=function(){vart=this,e=function(i){i.preventDefault(),t._widget.removeEventListener("touchend",e)};this._widget.addEventListener("touchend",e)},t.prototype._updateLayoutType=function(){this._widget.classList.toggle("i-vertical",this._isVertical)},
t.prototype._onWindowResize=function(){vart,e;"auto"===(this._options.layout||"auto")&&(t=this._isVertical,e=this._getCorrectedWidgetRect(),this._isVertical=this._determineCurrentLayoutVertical(e),this._updateLayoutType(),t!==this._isVertical&&this._onVerticalChanged(this._isVertical,t)),this._checkPosition()},t.prototype._checkPosition=function(){vart=this._getCorrectedWidgetRect(),e={left:t.left,top:t.top};this._correctPosition(e),t.left===e.left&&t.top===e.top||(this._widget.style.left=e.left+"px",this._widget.style.top=e.top+"px")},t.prototype._correctPosition=function(t){vare=this._getCorrectedWidgetRect();t.left+e.width>window.innerWidth&&(t.left=Math.max(0,window.innerWidth-e.width)),t.top+e.height>window.innerHeight&&(t.top=Math.max(0,window.innerHeight-e.height)),t.left=Math.max(0,t.left),t.top=Math.max(0,t.top)},t.prototype._setZIndex=function(t){this._widget.style.zIndex=t+""},t.prototype._zIndex=function(){return+this._widget.style.zIndex},t.prototype._loadPosition=function(){vart=r.getJSON(this._options.positionSettingsKey,this._options.defaultPosition);this._widget.style.left=Math.round(t.left)+"px",this._widget.style.top=Math.round(t.top)+"px",this._onWindowResize()},t.prototype._savePosition=function(){vart=this._widget.getBoundingClientRect();r.setJSON(this._options.positionSettingsKey,{left:t.left,top:t.top})},t.prototype._init=function(){this._loadPosition(),o(this._widget).draggable({containment:"window",drag:this._onDragEvent.bind(this),handle:".js-drag",stop:this._savePosition.bind(this)}),this._options.allowSortable&&this._initSortable(),this._widget.addEventListener(Modernizr.touch?"touchstart":"mousedown",this.raise.bind(this))},t.prototype._onDragEvent=function(t,e){this._correctPosition(e.position)},t.prototype._initSortable=function(){vart=this,e=-1;o(this._content).sortable({start:function(t,i){e=i.item.index()},stop:function(i,o){varn=o.item.index();e!==n&&t._reorderedDelegate.fire(e,n)},tolerance:"point"})},t.prototype._getCorrectedWidgetRect=function(){vart,e,i,o,n=this._widget.getBoundingClientRect();returnthis._widget.classList.contains("i-closed")?(t=.925,e=1/t-1,i=n.width*e,o=n.height*e,{bottom:n.bottom+o/2,height:n.height+o,left:n.left-i/2,right:n.right+i/2,top:n.top-o/2,width:n.width+i}):n},t._updateAllZIndexes=function(){t._toolbars.forEach(function(e,i){e._setZIndex(t._startZIndex+i)})},t}(),d._startZIndex=20,d._toolbars=[],e.FloatingToolbar=d},function(t,e,i){"use strict";functiono(){vart=$("<select />");return$('<option value="'+n.PlotType.Line+'">'+$.t("Line")+"</option>").appendTo(t),$('<option value="'+n.PlotType.Line_with_breaks+'">'+$.t("Line With Breaks")+"</option>").appendTo(t),$('<option value="'+n.PlotType.Histogram+'">'+$.t("Histogram")+"</option>").appendTo(t),$('<option value="'+n.PlotType.Cross+'">'+$.t("Cross",{context:"chart_type"})+"</option>").appendTo(t),$('<option value="'+n.PlotType.Area+'">'+$.t("Area")+"</option>").appendTo(t),$('<option value="'+n.PlotType.Area_with_breaks+'">'+$.t("Area With Breaks")+"</option>").appendTo(t),
@@ -461,12 +461,12 @@ var s,r,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void
;functiono(t){returnt&&t.__esModule?t:{default:t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vars,r,a,l,h;Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolTab=void0,s=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(77),a=o(r),l=i(256),i(250),i(496),h='\n\t<div class="tv-add-symbol-tab">\n\t\t<input type="text" class="tv-control-input js-add-symbol-tab-input" placeholder="'+$.t("Symbol")+'" autocomplete="off">\n\t\t<div class="tv-add-symbol-tab__add-symbol-overlay js-add-symbol-tab-checkbox"></div>\n\t</div>',e.AddSymbolTab=function(){functiont(e,i){n(this,t),this._chartWidgetCollection=e,this._dialog=i,this._$popup=null,this.init()}returns(t,[{key:"init",value:function(){vart=this;this.$tab=$(h),this._$input=this.$tab.find(".js-add-symbol-tab-input"),this._checkbox=newl.AddSymbolCheckbox({labelRight:$.t("Overlay the main chart"),labelAddClass:"tv-add-symbol-tab__checkbox-label",boxAddClass:"tv-add-symbol-tab__checkbox-box"}),this.$tab.find(".js-add-symbol-tab-checkbox").append(this._checkbox.$el),a.default.bindToInput(this._$input,{callback:function(e){vari=t._chartWidgetCollection.activeChartWidget.value();i&&i.addSymbol(e,t._checkbox.checked)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"focus",value:function(){Modernizr.touch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),t}()},function(t,e,i){"use strict";functiono(t){returnt&&t.__esModule?t:{default:t}}functionn(t){vare,i;if(t&&t.__esModule)returnt;if(e={},null!=t)for(iint)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);returne.default=t,e}functions(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionr(t,e,i){returneint?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}functiona(t,e,i){varo,n=2*H,s=document.createElement("canvas");returns.width=e*n,s.height=i*n,s.style.width=e+"px",s.style.height=i+"px",o=s.getContext("2d"),o.setTransform(n,0,0,n,0,0),o.drawImage(t,0,0,e,i),s}functionl(t,e){returnfunction(){i.e(3,function(){q=i(535),t.call(e)})}}varh,c,d,p,u,_,f,m,g,v,y,b,w,S,T,C,x,P,L,k,I,A,E,M,D,O,V,B,R,N,F,z,W,H,U,j,q,Y,G;Object.defineProperty(e,"__esModule",{value:!0}),e.Branding=void0,h=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),d=i(3),p=n(d),u=i(2),_=n(u),f=i(8),m=o(f),g=i(264),v=o(g),y=i(54),b=i(14),w="tvLogoBlack",S="tvLogoWhite",c={},r(c,w,i(912)),r(c,S,i(913)),T=c,
C="images/widget-embed-logo/",x="site_branding",P="widget_branding",L="widget_referral_branding",k="widget_custom_branding",I="widget_custom_no_powered_branding",A="fundamental_branding",E="fundamental_custom_branding",M="fundamental_custom_no_powered_branding",D="library_branding",O="library_custom_branding",V="library_custom_no_powered_branding",B=.2,R=$(window),N=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,F=function(){vart,e=window.navigator.userAgent,i=e.indexOf("MSIE ");returni>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):e.indexOf("Trident/")>0&&(t=e.indexOf("rv:"),parseInt(e.substring(t+3,e.indexOf(".",t)),10))}(),z=window.urlParams||{},W=window.initData||{},H=window.hidpiCanvasRatio||1,U=!0,j=null,q=null,Y=function(){functiont(e){vari=e.layout,o=void0===i?x:i,n=e.symbol,r=void0===n?"":n,a=e.model,h=e.onReadyCallback;s(this,t),this._model=a,this._logo=null,this._logoReady=!1,this._showLogo=!1,this._logoWidth=28,this._logoHeight=19,this.show=!0,this.width=100,this.height=20,this._layout=o,this._symbol=r,this._strokeColor=y.color.black255,this._fillСolor=y.color.brand,this._colorOldBlue=y.color.brandDown,this._colorOldGray=y.color.black30,this._strokeOpacity=.6,this._strokeWidth=2,this._fontSize=14,this._font='px "Trebuchet MS", Tahoma, Arial, sans-serif',this._txt="TradingView",this._onReadyCallback=h,this._upscaleRatio=2,this._strokeCanv=null,this._fillCanv=null,F&&(this._init=l(this._init,this)),this._init()}returnh(t,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){vart=(0,b.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,t>B?(this._strokeColor=y.color.black255,this._strokeWidth=2.5,this._loadLogo(S)):(this._strokeColor=y.color.black0,this._strokeWidth=3,this._loadLogo(w))}},{key:"_loadLogo",value:function(t){vare=this;this._showLogo&&(this._logo=newImage,this._logo.src=F?q.fallbackImages[t]:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(T[t]),this._logo.addEventListener("load",function(){N&&(e._logo=a(e._logo,e._logoWidth,e._logoHeight)),e._logoReady=!0,"function"==typeofe._onReadyCallback&&e._onReadyCallback()}))}},{key:"_checkLayout",value:function(){switch(this._layout){caseP:caseL:casek:caseA:caseE:caseO:caseD:this.show=!0;break;casex:caseI:caseM:caseV:this.show=!1}switch(this._layout){caseP:this._txt=$.t("{0} chart by TradingView").format(this._symbol);break;caseA:this._txt=$.t("{0} financials by TradingView").format(this._symbol);break;caseL:this._txt=$.t("More features on tradingview.com");break;casek:caseE:this._txt=$.t("powered by ");break;caseD:this._showLogo=!0,this._txt=$.t("charts by TradingView");break;caseO:this._txt=$.t("powered by TradingView")}}},{key:"_drawTextStroke",value:function(t){vare,i
e+="utm_source="+window.location.origin+"&utm_medium=library"+(t?"&utm_campaign="+t:"")}returne}},{key:"draw",value:function(t){if(U){vare=0;this._poweredBy&&this._poweredBy.show&&(e=this._poweredBy.height,t.save(),t.translate(this._left,this._paneHeight-this._bottom-this._poweredBy.height),this._poweredBy.draw(t),t.restore()),this._customLogo&&this._customLogo.show&&(t.save(),t.translate(this._left,this._paneHeight-this._bottom-e-this._customLogo.height),this._customLogo.draw(t),t.restore())}}},{key:"renderer",value:function(){returnthis._paneHeight=j.height(),{draw:this.draw.bind(this)}}},{key:"paneViews",value:function(t){vare=p.enabled("move_logo_to_main_pane");returne&&t.isMainPane()||!e&&t.isLast()||t.isMaximized()?(j=t,[{renderer:this.renderer.bind(this)}]):[]}}]),t}()},function(t,e,i){(function(t,o){"use strict";functionn(t){returnt&&t.__esModule?t:{default:t}}functions(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varr,a,l,h,c,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.CompareTab=void0,r=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),a=i(77),l=n(a),h=i(33),i(250),i(249),i(498),c='\n\t<div class="tv-compare-tab">\n\t\t<input type="text" class="tv-control-input js-compare-tab-input" placeholder="'+$.t("Company Comparison")+'" autocomplete="off">\n\t</div>',d='<div class="tv-compare-tab__predefines js-compare-tab-predefines"></div>',p='\n\t<div class="tv-compare-tab__predefine-cell">\n\t\t<label for="{{symbolId}}">\n\t\t\t<span class="tv-control-checkbox">\n\t\t\t\t<input class="tv-control-checkbox__input js-predefine-checkbox" type="checkbox" id="{{symbolId}}">\n\t\t\t<span class="tv-control-checkbox__box tv-compare-tab__checkbox-box">'+i(382)+'</span>\n\t\t\t<span class="tv-control-checkbox__ripple js-ripple"></span>\n\t\t\t</span>\n\t\t\t<span class="tv-control-checkbox__label tv-compare-tab__checkbox-label">{{label}}</span>\n\t\t</label>\n\t</div>',e.CompareTab=function(){functione(t,i){s(this,e),this._chartWidgetCollection=t,this._dialog=i,this._$popup=null,this._predefines={},this._symbolAlias={},this.init()}returnr(e,[{key:"addCompareSymbol",value:function(t,e,i){varo,n,s,r,a,l,c=this._chartWidgetCollection.activeChartWidget.value();if(c&&(o=c.model())){for(n=o.mainSeries().interval(),s=o.studiesMetaData(),r=void0,a=0;a<s.length;a++)"Compare@tv-basicstudies"===s[a].id&&(r=s[a]);returnl={exchange:i,inputs:{symbol:t,resolution:n}},(0,h.trackEvent)("GUI","Add Compare"),o.insertStudy(r,l)}}},{key:"removeCompareSymbol",value:function(t){vare,i=this,o=this._chartWidgetCollection.activeChartWidget.value();o&&(e=o.model())&&e.dataSources().forEach(function(o){if(o._metaInfo&&"Compare@tv-basicstudies"===o._metaInfo.id){varn=o.properties().inputs.symbol.value();(n===t||i._symbolAlias[n]&&i._symbolAlias[n]===t)&&e.removeSource(o)}})}},{key:"init",
value:function(){vare,i,o,n=this,s=this._chartWidgetCollection.activeChartWidget.value();s&&(e=s.model())&&(i=e.dataSources(),this.$tab=$(c),this._initSymbolSearch(),t.enabled("charting_library_base")||(this._createPredefinesList(),o=this.$tab.find(".js-compare-tab-predefines"),o.find(".js-predefine-checkbox").attr("checked",!1),Object.keys(this._predefines).forEach(function(t){vare=n._symbolToId(t),s=o.find("#"+e);i.forEach(function(e){if(e._metaInfo&&"Compare@tv-basicstudies"===e._metaInfo.id){vari=e.properties().inputs.symbol.value();(i===t||n._symbolAlias[i]&&n._symbolAlias[i]===t)&&s.attr("checked",!0)}})})))}},{key:"_initSymbolSearch",value:function(){vart=this;this._$input=this.$tab.find(".js-compare-tab-input"),l.default.bindToInput(this._$input,{callback:function(e){returnt.addCompareSymbol(e)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"_createPredefinesList",value:function(){functiont(t){vare=this;setTimeout(function(){if($(e).is(":checked")){i.addCompareSymbol(t.data.symbol)||$(e).attr("checked",!1)}elsei.removeCompareSymbol(t.data.symbol)})}vare=this,i=this,n=$(d);Object.keys(this._predefines).forEach(function(i){vars=$(o.render(p,{symbolId:e._symbolToId(i),label:e._predefines[i]}));s.find(".js-predefine-checkbox").change({symbol:i},t),s.appendTo(n)}),n.appendTo(this.$tab)}},{key:"_symbolToId",value:function(t){returnt.replace(/[^a-z0-9]/gi,"_")}},{key:"focus",value:function(){Modernizr.touch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),e}()}).call(e,i(3),i(30))},,function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e.ChartPage=void0,n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),s=i(258),r=i(40),a=i(3),e.ChartPage=function(){functiont(e,i){varn=this;if(o(this,t),this._$body=$(e.body.value()),0===this._$body.size())throwError("bridge.body.value() must be an element or not empty jQuery object");this._availableAreas=["left","dompanel","right","top","footer","bottom","center"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._visible=e.visible,this._width.subscribe(function(){returnn.recalculate()}),this._height.subscribe(function(){returnn.recalculate()}),this._bridge.visible.subscribe(function(){returnn._updateVisibility()}),this._bridge.fullscreen.subscribe(function(){returnn._onParentFullscreenChange()}),this.recalculate()}returnn(t,[{key:"_updateVisibility",value:function(){vart,e,i,o=!!this._bridge.visible.value();for(t=0;t<this._availableAreas.length;t++)e=this._availableAreas[t],
value:function(){vare,i,o,n=this,s=this._chartWidgetCollection.activeChartWidget.value();s&&(e=s.model())&&(i=e.dataSources(),this.$tab=$(c),this._initSymbolSearch(),t.enabled("charting_library_base")||(this._createPredefinesList(),o=this.$tab.find(".js-compare-tab-predefines"),o.find(".js-predefine-checkbox").attr("checked",!1),Object.keys(this._predefines).forEach(function(t){vare=n._symbolToId(t),s=o.find("#"+e);i.forEach(function(e){if(e._metaInfo&&"Compare@tv-basicstudies"===e._metaInfo.id){vari=e.properties().inputs.symbol.value();(i===t||n._symbolAlias[i]&&n._symbolAlias[i]===t)&&s.attr("checked",!0)}})})))}},{key:"_initSymbolSearch",value:function(){vart=this;this._$input=this.$tab.find(".js-compare-tab-input"),l.default.bindToInput(this._$input,{callback:function(e){returnt.addCompareSymbol(e)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"_createPredefinesList",value:function(){functiont(t){vare=this;setTimeout(function(){if($(e).is(":checked")){i.addCompareSymbol(t.data.symbol)||$(e).attr("checked",!1)}elsei.removeCompareSymbol(t.data.symbol)})}vare=this,i=this,n=$(d);Object.keys(this._predefines).forEach(function(i){vars=$(o.render(p,{symbolId:e._symbolToId(i),label:e._predefines[i]}));s.find(".js-predefine-checkbox").change({symbol:i},t),s.appendTo(n)}),n.appendTo(this.$tab)}},{key:"_symbolToId",value:function(t){returnt.replace(/[^a-z0-9]/gi,"_")}},{key:"focus",value:function(){Modernizr.touch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),e}()}).call(e,i(3),i(30))},,function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e.ChartPage=void0,n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),s=i(258),r=i(41),a=i(3),e.ChartPage=function(){functiont(e,i){varn=this;if(o(this,t),this._$body=$(e.body.value()),0===this._$body.size())throwError("bridge.body.value() must be an element or not empty jQuery object");this._availableAreas=["left","dompanel","right","top","footer","bottom","center"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._visible=e.visible,this._width.subscribe(function(){returnn.recalculate()}),this._height.subscribe(function(){returnn.recalculate()}),this._bridge.visible.subscribe(function(){returnn._updateVisibility()}),this._bridge.fullscreen.subscribe(function(){returnn._onParentFullscreenChange()}),this.recalculate()}returnn(t,[{key:"_updateVisibility",value:function(){vart,e,i,o=!!this._bridge.visible.value();for(t=0;t<this._availableAreas.length;t++)e=this._availableAreas[t],
width:this._width.value(),height:this._height.value()},e=0;e<this._availableAreas.length;e++)if(i=this._availableAreas[e],o=this._areas[i],this._affectsLayout(i)){for("center"===i?(n=0,this._affectsLayout("left")&&(n+=this._areas.left.width.value()),r=0,this._affectsLayout("top")&&(r+=this._areas.top.height.value()),o.body.value().css({left:n,top:r})):"top"!==i&&"bottom"!==i&&"footer"!==i||(a=0,this._affectsLayout("left")&&(a+=this._areas.left.width.value()),o.body.value().css({left:a})),l=void0,l=o.canNegotiate.width&&!o.canNegotiate.height?["height","width"]:["width","height"],h=0;h<2;h++){if(c=l[h],d=void0,p=t[c],this._fullscreenArea===i)d=p;else{if("bottom"===i&&"height"===c&&(p-=5),"right"!==i&&"dompanel"!==i||"width"!==c||(p-=300),"width"===c?o.availWidth.setValue(p):"height"===c&&o.availHeight.setValue(p),g!==this._recalcSingleRunToken)return;o.canNegotiate[c]?(d=(0,s.determineSize)(p,o.negotiations[c]),t[c]-=d):d=p}if(o.body.value().css(c,d),o[c].setValue(d),g!==this._recalcSingleRunToken)return}o.body.value().toggleClass("js-hidden",!1)}elseo&&o.body.value().toggleClass("js-hidden",!0);this._affectsLayout("footer")&&(u=this._areas.footer,_=this._height.value()-u.height.value(),this._affectsLayout("bottom")&&(_-=this._areas.bottom.height.value()),u.body.value().css({top:_})),this._affectsLayout("dompanel")&&(f=this._areas.dompanel,m=0,this._affectsLayout("right")&&(m+=this._areas.right.width.value()),f.body.value().css({right:m}))}}]),t}()},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r;Object.defineProperty(e,"__esModule",{value:!0}),n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),s=i(40),r=function(t,e){vari,o,n=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"];for(i=0;i<n.length;i++)if((o=n[i])int){e.setValue(!!t[o]);break}},e.FullscreenApi=function(){functiont(e){vari,n,a=this;if(o(this,t),this._document=e,this.isFullscreen=news,r(e,this.isFullscreen),e.addEventListener)for(i=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],n=0;n<i.length;n++)e.addEventListener(i[n],function(t){r(e,a.isFullscreen)},!1)}returnn(t,[{key:"enter",value:function(){vart,e,i=this._document,o=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];for(t=0;t<o.length;t++)if(e=o[t],"function"==typeofi.documentElement[e]){i.documentElement[e]();break}this.isFullscreen.setValue(!0)}},{key:"exit",value:function(){vart,e,i=this._document,o=["exitFullscreen","mozCancelFullScreen","mozExitFullscreen","webkitExitFullscreen","msExitFullscreen"];for(t=0;t<o.length;t++)if(e=o[t],"function"==typeofi[e]){i[e]();break}this.isFullscreen.setValue(!1)}}]),t}()},function(t,e,i){"use strict";functiono(t,e){
if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn;Object.defineProperty(e,"__esModule",{value:!0}),n=i(40),e.VisibilityApi=functiont(e){vari,s,r,a,l,h,c,d=this;for(o(this,t),this.isVisible=newn(!0),i=null,s=void0,r=null,a=["","moz","ms","webkit"],l=0;l<a.length;l++)h=a[l],(c=h?h+"Hidden":"hidden")ine&&(i=c,s=h+"visibilitychange");i&&(r=function(){d.isVisible.setValue(!e[i])},r(),e.addEventListener&&e.addEventListener(s,r,!1)),this.destroy=function(){r&&(e.removeEventListener(s,r,!1),r=null)}}},function(t,e,i){"use strict";functiono(t){vare,i;if(t&&t.__esModule)returnt;if(e={},null!=t)for(iint)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);returne.default=t,e}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vars,r,a,l,h;Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonLoader=void0,s=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(186),a=i(54),l=o(a),$.fn.tvButtonLoader=(0,r.createTvBlockWithInstance)("tv-button-loader",function(t,e){returnnewh(t,e)}),h=e.ButtonLoader=function(){functiont(e,i){n(this,t),this.$btn=$(e).addClass("tv-button--loader"),0===this.$btn.find(".tv-button__loader").length&&this.$btn.html('<span class="tv-button__text">'+this.$btn.html()+'</span><span class="tv-button__loader"><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span></span>'),this.loading=this.$btn.hasClass("i-loading")}returns(t,[{key:"_start",value:function(){vart=this;this.starting=!0,this.$btn.addClass("i-start-load"),this.$btn.trigger("tv-button-loader:start"),setTimeout(function(){t.loading=!0,t.starting=!1,t._startPromise=!1,t.$btn.addClass("i-loading"),t.$btn.removeClass("i-start-load"),t._stopPromise&&t._stop()},2*l.dur)}},{key:"start",value:function(){this.starting||(this.stopping?this._startPromise=!0:this._start())}},{key:"_stop",value:function(){vart=this;this.stopping=!0,this.$btn.addClass("i-stop-load"),this.$btn.trigger("tv-button-loader:stop"),setTimeout(function(){t.loading=!1,t.stopping=!1,t._stopPromise=!1,t.$btn.removeClass("i-loading i-start-load i-stop-load"),t._startPromise&&t._start()},l.dur)}},{key:"stop",value:function(){this.stopping||(this.starting?this._stopPromise=!0:this._stop())}},{key:"toggle",value:function(){this.loading?this.stop():this.start()}},{key:"contentHtml",value:function(t){returnt?(this.$btn.find(".tv-button__text").html(t),t):this.$btn.find(".tv-button__text").html()}},{key:"contentNojQuery",value:function(){returnthis.$btn.get(0)}},{key:"disable",value:function(){this.stop(),this.$btn.addClass("i-disabled")}},{key:"enable",value:function(){this.$btn.removeClass("i-disabled")}}]),t}()},function(t,e,i){"use strict";functiono(t,e,i,o){varr=(0,n.createConfirmDialog)({type:"modal",
width:this._width.value(),height:this._height.value()},e=0;e<this._availableAreas.length;e++)if(i=this._availableAreas[e],o=this._areas[i],this._affectsLayout(i)){for("center"===i?(n=0,this._affectsLayout("left")&&(n+=this._areas.left.width.value()),r=0,this._affectsLayout("top")&&(r+=this._areas.top.height.value()),o.body.value().css({left:n,top:r})):"top"!==i&&"bottom"!==i&&"footer"!==i||(a=0,this._affectsLayout("left")&&(a+=this._areas.left.width.value()),o.body.value().css({left:a})),l=void0,l=o.canNegotiate.width&&!o.canNegotiate.height?["height","width"]:["width","height"],h=0;h<2;h++){if(c=l[h],d=void0,p=t[c],this._fullscreenArea===i)d=p;else{if("bottom"===i&&"height"===c&&(p-=5),"right"!==i&&"dompanel"!==i||"width"!==c||(p-=300),"width"===c?o.availWidth.setValue(p):"height"===c&&o.availHeight.setValue(p),g!==this._recalcSingleRunToken)return;o.canNegotiate[c]?(d=(0,s.determineSize)(p,o.negotiations[c]),t[c]-=d):d=p}if(o.body.value().css(c,d),o[c].setValue(d),g!==this._recalcSingleRunToken)return}o.body.value().toggleClass("js-hidden",!1)}elseo&&o.body.value().toggleClass("js-hidden",!0);this._affectsLayout("footer")&&(u=this._areas.footer,_=this._height.value()-u.height.value(),this._affectsLayout("bottom")&&(_-=this._areas.bottom.height.value()),u.body.value().css({top:_})),this._affectsLayout("dompanel")&&(f=this._areas.dompanel,m=0,this._affectsLayout("right")&&(m+=this._areas.right.width.value()),f.body.value().css({right:m}))}}]),t}()},function(t,e,i){"use strict";functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn,s,r;Object.defineProperty(e,"__esModule",{value:!0}),n=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),s=i(41),r=function(t,e){vari,o,n=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"];for(i=0;i<n.length;i++)if((o=n[i])int){e.setValue(!!t[o]);break}},e.FullscreenApi=function(){functiont(e){vari,n,a=this;if(o(this,t),this._document=e,this.isFullscreen=news,r(e,this.isFullscreen),e.addEventListener)for(i=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],n=0;n<i.length;n++)e.addEventListener(i[n],function(t){r(e,a.isFullscreen)},!1)}returnn(t,[{key:"enter",value:function(){vart,e,i=this._document,o=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];for(t=0;t<o.length;t++)if(e=o[t],"function"==typeofi.documentElement[e]){i.documentElement[e]();break}this.isFullscreen.setValue(!0)}},{key:"exit",value:function(){vart,e,i=this._document,o=["exitFullscreen","mozCancelFullScreen","mozExitFullscreen","webkitExitFullscreen","msExitFullscreen"];for(t=0;t<o.length;t++)if(e=o[t],"function"==typeofi[e]){i[e]();break}this.isFullscreen.setValue(!1)}}]),t}()},function(t,e,i){"use strict";functiono(t,e){
if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varn;Object.defineProperty(e,"__esModule",{value:!0}),n=i(41),e.VisibilityApi=functiont(e){vari,s,r,a,l,h,c,d=this;for(o(this,t),this.isVisible=newn(!0),i=null,s=void0,r=null,a=["","moz","ms","webkit"],l=0;l<a.length;l++)h=a[l],(c=h?h+"Hidden":"hidden")ine&&(i=c,s=h+"visibilitychange");i&&(r=function(){d.isVisible.setValue(!e[i])},r(),e.addEventListener&&e.addEventListener(s,r,!1)),this.destroy=function(){r&&(e.removeEventListener(s,r,!1),r=null)}}},function(t,e,i){"use strict";functiono(t){vare,i;if(t&&t.__esModule)returnt;if(e={},null!=t)for(iint)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);returne.default=t,e}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vars,r,a,l,h;Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonLoader=void0,s=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(186),a=i(54),l=o(a),$.fn.tvButtonLoader=(0,r.createTvBlockWithInstance)("tv-button-loader",function(t,e){returnnewh(t,e)}),h=e.ButtonLoader=function(){functiont(e,i){n(this,t),this.$btn=$(e).addClass("tv-button--loader"),0===this.$btn.find(".tv-button__loader").length&&this.$btn.html('<span class="tv-button__text">'+this.$btn.html()+'</span><span class="tv-button__loader"><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span></span>'),this.loading=this.$btn.hasClass("i-loading")}returns(t,[{key:"_start",value:function(){vart=this;this.starting=!0,this.$btn.addClass("i-start-load"),this.$btn.trigger("tv-button-loader:start"),setTimeout(function(){t.loading=!0,t.starting=!1,t._startPromise=!1,t.$btn.addClass("i-loading"),t.$btn.removeClass("i-start-load"),t._stopPromise&&t._stop()},2*l.dur)}},{key:"start",value:function(){this.starting||(this.stopping?this._startPromise=!0:this._start())}},{key:"_stop",value:function(){vart=this;this.stopping=!0,this.$btn.addClass("i-stop-load"),this.$btn.trigger("tv-button-loader:stop"),setTimeout(function(){t.loading=!1,t.stopping=!1,t._stopPromise=!1,t.$btn.removeClass("i-loading i-start-load i-stop-load"),t._startPromise&&t._start()},l.dur)}},{key:"stop",value:function(){this.stopping||(this.starting?this._stopPromise=!0:this._stop())}},{key:"toggle",value:function(){this.loading?this.stop():this.start()}},{key:"contentHtml",value:function(t){returnt?(this.$btn.find(".tv-button__text").html(t),t):this.$btn.find(".tv-button__text").html()}},{key:"contentNojQuery",value:function(){returnthis.$btn.get(0)}},{key:"disable",value:function(){this.stop(),this.$btn.addClass("i-disabled")}},{key:"enable",value:function(){this.$btn.removeClass("i-disabled")}}]),t}()},function(t,e,i){"use strict";functiono(t,e,i,o){varr=(0,n.createConfirmDialog)({type:"modal",
content:$.t("Do you really want to delete Chart Layout '{0}' ?").format(t),addClass:"delete-chart-dialog"}),a=function(){vart=o;o=null,t&&t()};r.on("action:yes",function(){o=null,s.removeChart(e,i),r.close()}),r.on("action:no",a),r.on("afterClose",a),r.open()}varn,s;Object.defineProperty(e,"__esModule",{value:!0}),e.deleteChart=o,n=i(93),s=i(116)},function(t,e,i){"use strict";functiono(t){vare=0;!0===t&&(ChartApiInstance.disconnect(),e=500),setTimeout(ChartApiInstance.connect.bind(ChartApiInstance),e)}functionn(t,e,i,n){l||(l=(0,r.createDialog)({width:n||600,closeOnOutsideClick:!1,destroyOnClose:!0,type:"modal",contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text tv-text--position-outside"></div></div>',actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--actions-adaptive tv-dialog__section--no-border">',title:t,content:e,actions:[{name:"reconnect",type:"primary",text:$.t("Reconnect")},{name:"report",type:"primary",text:$.t("Report a data issue")}]}).on("action:reconnect",function(t){t.close(),o(i)}).on("action:report",function(t){t.close(),runOrSignIn(function(){},{source:"Report data issue from disconnect dialog"})}).on("destroy",function(){l=null}).open())}functions(){(0,a.trackEvent)("System","Critical Error"),n($.t("Oops, something went wrong"),$.t("Please report the issue or click Reconnect."),!0,500)}varr,a,l;Object.defineProperty(e,"__esModule",{value:!0}),e.showCriticalErrorMessage=s,r=i(71),a=i(33),l=null},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.CustomEvent=function(t){vare,i=arguments.length>1&&void0!==arguments[1]?arguments[1]:{},o=i.bubbles,n=void0!==o&&o,s=i.cancelable,r=void0!==s&&s,a=i.detail,l=void0===a?null:a;try{returnnewwindow.CustomEvent(t,{bubbles:n,cancelable:r,detail:l})}catch(i){returne=document.createEvent("CustomEvent"),e.initCustomEvent(t,n,r,l),e}}},function(t,e,i){(function(t,o,n){"use strict";functions(t){returnt&&t.__esModule?t:{default:t}}functionr(t){vare,i;if(t&&t.__esModule)returnt;if(e={},null!=t)for(iint)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);returne.default=t,e}functiona(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionl(){m.forEach(function(t){returnt.close()})}varh,c,d,p,u,_,f,m,g,v,y,b,w,S,T;Object.defineProperty(e,"__esModule",{value:!0}),e.TVDialogAbstract=void0,h=Object.assign||function(t){vare,i,o;for(e=1;e<arguments.length;e++){i=arguments[e];for(oini)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}returnt},c=function(){functiont(t,e){vari,o;for(i=0;i<e.length;i++)o=e[i],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),e.closeAllDialogs=l,d=i(54),p=r(d),i(539),u=i(187),_=s(u),i(522),i(514),f=0,m=[],g=void0,v=110,y=$(document),b={closeOnEsc:!0,closeButton:!0,focusFirstControl:!0,closeOnOutsideClick:!0,
closeButtonAddClass:"",focusClass:"i-focused",template:'<div class="tv-dialog">',errorTemplate:'<div class="tv-dialog__error i-slided{{# errorMod }} tv-dialog__error--{{ errorMod }}{{/ errorMod }}">{{{ error }}}</div>',titleTemplate:'<div class="tv-dialog__section tv-dialog__section--title js-dialog__drag"><div class="js-title-text tv-dialog__title">{{{ title }}}</div></div>',contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border">',actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--no-border">',closeButtonTemplate:'<div class="tv-dialog__close js-dialog__close">'+i(129)+"</div>",helpButtonTemplate:'<a href="{{{ link }}}" target="_blank" class="tv-dialog__help apply-common-tooltip" title="{{{ title }}}"></a>',helpActionsMod:"tv-dialog__section--actions_with-help"},w={default:"tv-button tv-button--default",primary:"tv-button tv-button--primary",success:"tv-button tv-button--success",danger:"tv-button tv-button--danger",warning:"tv-button tv-button--warning",link:"tv-button tv-button--link",checkbox:"tv-control-checkbox tv-control-checkbox--in-actions","default-ghost":"tv-button tv-button--default_ghost","primary-ghost":"tv-button tv-button--primary_ghost","success-ghost":"tv-button tv-button--success_ghost","danger-ghost":"tv-button tv-button--danger_ghost","warning-ghost":"tv-button tv-button--warning_ghost"},S={_default:'<div data-name="{{ name }}" class="js-dialog__action-click {{ class }}">{{ text }}</div>',"submit-success":'<button type="submit" class="tv-button tv-button--success">{{ text }}</button>'},$(function(){b.$wrap=$(document.all&&!document.querySelector?"html":"body")}),T=function(){functione(){vari,s,r,l,c=this,d=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};for(a(this,e),t.extend(this,o),this.id=f++,this.loadingActions=[],this.disabledActions=[],this.firstFocusControl=null,this.options=h({},b,d),this.$el=$(n.render(this.options.template,{title:this.options.title,closeButton:this.options.closeButton})),this.$el.addClass("js-dialog"),this.el=this.$el[0],this.options.addClass&&this.$el.addClass(this.options.addClass),this.options.width&&this.$el.css({width:"100%","max-width":this.options.width}),this.options.title&&(this.$title=$(n.render(this.options.titleTemplate,{title:this.options.title})).appendTo(this.$el)),this.$content=$(this.options.contentWrapTemplate).appendTo(this.$el),this.$contentIn=this.$content;this.$contentIn.length;)this.$contentIn=this.$contentIn.children();if(this.$contentIn=this.$contentIn.end(),this.options.content&&this.renderContent(this.options.content),(this.options.actions||this.options.help)&&(this.$content.hasClass("tv-dialog__section")&&this.$content.addClass("tv-dialog__section--no-padding_bottom"),this.$actions=$(this.options.actionsWrapTemplate).appendTo(this.$el)),this.options.actions)for(this.actions={},this.$el.on("click",".js-dialog__action-click",function(t){c.actionDispatcher($(t.currentTarget).data("name"))}),i=function(t){vare,i,o,s,r,a,l=c.options.actions[t]
return-1!==e.indexOf(void0)&&(console.warn("Got undefined in quoteAddSymbols"),e=e.filter(function(t){return!!t})),this._studyEngine.quoteAddSymbols(t,e)},JSServer.ChartApi.prototype.quoteRemoveSymbols=function(t,e){returnthis._studyEngine.quoteRemoveSymbols(t,e)},JSServer.ChartApi.prototype.quoteFastSymbols=function(t,e){returnthis._studyEngine.quoteFastSymbols(t,e)},JSServer.ChartApi.prototype.quoteHibernateAll=function(t){returnthis._studyEngine.quoteHibernateAll(t)},JSServer.ChartApi.prototype.depthCreateSession=function(t){returnthis._studyEngine.depthCreateSession(t)},JSServer.ChartApi.prototype.depthDeleteSession=function(t){returnthis._studyEngine.depthDeleteSession(t)},JSServer.ChartApi.prototype.depthSetSymbol=function(t,e){returnthis._studyEngine.depthSetSymbol(t,e)},JSServer.ChartApi.prototype.depthClearSymbol=function(t){},JSServer.ChartApi.prototype.depthSetScale=function(t,e){},JSServer.ChartApi.prototype.createStudiesAccessController=function(t,e,i){returnnewthis.StudiesAccessController(this._studyEngine,t&&JSON.parse(t)||{type:"black",tools:[]})},JSServer.ChartApi.prototype.StudiesAccessController=function(t,e){this._studyEngine=t,this._studiesAccess=e},JSServer.ChartApi.prototype.StudiesAccessController.prototype._findTool=function(t){vare,i,o=null;for(e=0;e<this._studiesAccess.tools.length;++e)if(i=this._studiesAccess.tools[e],i.name===t||i===t){o=i;break}returno},JSServer.ChartApi.prototype.StudiesAccessController.prototype.getEnabledTools=function(){returnthis._studyEngine.studiesMetadata().filter(function(t){vare=this._findTool(t.description);return"black"===this._studiesAccess.type?!e||e.grayed:!!e},this)},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolGrayed=function(t){vare=this._findTool(t);returne&&e.grayed},JSServer.ChartApi.prototype.serverTimeOffset=function(){returnthis._studyEngine.serverTimeOffset()},JSServer.ChartApi.prototype.alignTimePoint=function(t,e,i){returnthis._studyEngine.alignTimePoint(t,e,i)},JSServer.ChartApi.prototype.disconnectCount=function(){return0},d(JSServer.ChartApi,"JSServer.ChartApi",h,"ChartApiInterface"),t.exports=JSServer.ChartApi},function(t,e,i){"use strict";varo=function(){functiont(t,e,i){returnt+","+e+","+i}functione(e,i,o){deleten[t(e,i,o)]}functiono(e,i,o){functionr(t){return"undefined"!=typeofTradingView&&TradingView.ChartapiMessagerInstances?n[t]=newa(TradingView.ChartapiMessagerInstances[e],l.pureResolution):n[t]=newa(null,l.pureResolution),n[t]}varl=s.Symbol.parsePeriod(o),h=t(e,i,l.pureResolution);returnn[h]?n[h]:r(h)}varn={},s=i(56),r=i(58),a=function(t,e,i){this._chartApiMessager=t,this._lastRealBarTime=null,this._lastRealBarIndex=null,this._resolution=e,this._extrapolatedBarsCache=[],this._onReadyCallbacks=[],this._requestedAmountOfBars=0,this._maxDepth=i||100};returna.prototype.ready=function(){returnnull!==this._lastRealBarIndex},a.prototype.rebuild=function(t,e){this._lastRealBarTime=t;vari=Math.max(this._extrapolatedBarsCache.length,this._requestedAmountOfBars)
;this._extrapolatedBarsCache=[],this.ensureExtrapolatedToBar(e,i)},a.prototype.historyExtrapolator=function(){returnvoid0===this._historyExtrapolator&&(this._historyExtrapolator=newa(null,this._resolution,Math.max(this._maxDepth,1e3))),this._historyExtrapolator},a.prototype.getPointTimeUTC=function(t,e,i){varo,n;return0===e?t:!this.ready()||t<this._lastRealBarTime/1e3?(this.historyExtrapolator().setLastBarTime(0,1e3*t),this.historyExtrapolator().getPointTimeUTC(t,e,i)):(o=0===this._extrapolatedBarsCache.length||t===this._lastRealBarTime/1e3,n=o?-1:this.indexOfBar(t,i)-this._lastRealBarIndex-1,this.ensureExtrapolatedToBar(i,n+e+1),this._extrapolatedBarsCache[n+e])},a.prototype.findDistanceInBars=function(t,e,i){returnt===e?0:(this.historyExtrapolator().setLastBarTime(0,1e3*t),this.historyExtrapolator().indexOfBar(e,i))},a.prototype.indexOfBar=function(t,e){this._ensureExtrapolatedToTime(e,1e3*t);vari=r.lower_bound(this._extrapolatedBarsCache,t,function(t,e){returnt>e?1:t<e?-1:0});return-1===i?i:this._lastRealBarIndex+i+1},a.prototype._extrapolateData=function(t,e){vari,o,n;if(!this._lastRealBarTime)throwError("No real bars known, so cannot extrapolate anything");if(!(i=e(this._lastRealBarTime))||0===i.length)returnvoid(null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,this._extrapolatedBarsCache,t,this._resolution));for(o=0;o<i.length;++o)i[o]=i[o]/1e3;for(i[0]===this._lastRealBarTime/1e3&&(i=i.slice(1)),this._extrapolatedBarsCache=i,n=i.slice(0),n.sort(),o=0;o<n.length-1;++o)n[o]===n[o+1]&&console.error("Duplicating extrapolated bars: duplicated "+newDate(1e3*n[o]));null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,i,t,this._resolution)},a.prototype.onTickmarksNeeded=function(t,e){if(this.ready())this.ensureExtrapolatedToBar(t,e);else{vari=this;this._onReadyCallbacks.push(function(){i.ensureExtrapolatedToBar(t,e)})}},a.prototype.ensureExtrapolatedToBar=function(t,e){vari=this;returnthis._requestedAmountOfBars=e,this._extrapolateData(t,function(o){returni._extrapolatedBarsCache.length>=e||!i._shouldExtrapolateMore()?null:r.extrapolateBarsFrontByCount(i.newBarBuilder(t),o,e)})},a.prototype._ensureExtrapolatedToTime=function(t,e){vari=this;returnthis._extrapolateData(t,function(o){varn,s;returno>=e||!i._shouldExtrapolateMore()?null:(n=2e3,s=r.extrapolateBarsFrontToTime(i.newBarBuilder(t),o,e,n),s[s.length-1]<e&&console.warn("Extrapolation error: not enough data created"),s)})},a.prototype.newBarBuilder=function(t){vare=s.Symbol.newSession(t.timezone,t.session);returns.Symbol.newBarBuilder(this._resolution,e)},a.prototype._shouldExtrapolateMore=function(){returnthis._extrapolatedBarsCache.length<this._maxDepth},a.prototype.setLastBarTime=function(t,e){(null===this._lastRealBarIndex||this._lastRealBarIndex===t&&this._lastRealBarTime!==e)&&(this._extrapolatedBarsCache=[]),
this._extrapolatedBarsCache&&this._extrapolatedBarsCache.length&&this._lastRealBarIndex!==t&&(this._lastRealBarIndex>t?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==e&&this._extrapolatedBarsCache.shift(t-this._lastRealBarIndex)),this._lastRealBarIndex=t,this._lastRealBarTime=e;for(vari=0;i<this._onReadyCallbacks.length;++i)this._onReadyCallbacks[i]();this._onReadyCallbacks=[]},{remove:e,storage:o}}();t.exports=o},function(t,e){"use strict";vari=function(){functiont(t){returnt.is_price_study}functione(t,e){vari,o=e.slice(0).toLowerCase();if(t){for(i=0;i<t.length;++i)if(t[i].description.toLowerCase()===o||t[i].shortDescription.toLowerCase()===o)returnt[i];throwError("Can't find metainfo for `"+e+"`")}throwError("There is no studies metainfo at all")}functioni(t){returnt.inputs.map(function(t){return{id:t.id,type:t.type,name:t.name}})}functiono(o,n){vars,a,l,h,c,d,p,u,_;if(!Array.isArray(o))returns=e(n.model().studiesMetaData(),o),{id:s.id,overlay:t(s)};for(a=o.slice(0),l=a[0],s=e(n.model().studiesMetaData(),l),h=t(s),c=i(s),p=a.splice(1),u=0;u<p.length;++u)d||(d={}),_=r[c[u].type]||r.string,d[c[u].id]=_(p[u]);return{id:s.id,name:l,overlay:h,inputs:d}}functionn(t,o,n){functions(t){returnt.name.toLowerCase()===a}varr,a,l,h=e(n.model().studiesMetaData(),t),c=i(h),d={};for(rino)a=r.toLowerCase(),l=c.filter(s),0!==l.length?(l=l[0],d[l.id]=o[r]):console.warn("Uknown input `"+r+"` of `"+t+"`");return{id:h.id,name:t,inputs:d}}vars={},r={bool:function(t){return!!t},integer:function(t){returnparseInt(t)},float:function(t){returnparseFloat(t)},string:function(t){returnt}};returns.getStudyRecordFromArray=function(t,e){returne=e||chartWidget,o(t,e)},s.getStudyRecordFromObject=function(t,e,i){returni=i||chartWidget,n(t,e,i)},s}();t.exports=i},function(t,e,i){"use strict";varo=i(3);window.onload=function(){functiont(){vart=0;returnJSON.parse(urlParams.logo).image&&(t="C",o.enabled("link_to_tradingview")||(t="D")),t}functione(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(t){return!1}}location.hostname.indexOf(".")>=0&&!e()&&setTimeout(function(){try{vare=t();window.ga&&0!==e&&ga("send","event","s",e)}catch(t){}},3e4)}},function(t,e,i){(function(e){"use strict";varo=i(58),n={},s=function(t,i,s){functionr(){vart={};t.symbolname=_,t.status="ok",t.values={},t.values.current_session=p,n[_]=p,TradingView.ChartapiMessagerInstances[f].onQuotesData([f].concat([t]))}functiona(t,i,n){vars=e.get_timezone(i);h=(newo.Session).init(s,t),c=n,m=setTimeout(l,6e4),l(),r()}functionl(){vart,e;if(h){if(c)returnvoid(p="out_of_session");t=o.isTradingNow(newDate,h),e=t?"market":"out_of_session",e!==p&&(p=e,r())}}varh,c,d={},p=n[s]||"out_of_session",u=!1,_=s,f=i,m=null;returnt.resolveSymbol(s,function(t){u||a(t.session,t.timezone,t.expired)},function(){}),d.stop=function(){u=!0,m&&clearTimeout(m)},d.marketStatus=function(){returnp},d};t.exports=s}).call(e,i(57))},function(t,e,i){
this.subs&&this.host.unsubscribe(this.subs)},h.prototype.calculateFromTo=function(t,i,o,n){vars,r,a,l,h,c,d,p,f=_.parsePeriod(i),m=(newDate).valueOf(),g=t.expired?e.cal_to_utc(e.get_timezone(t.timezone),newDate(1e3*t.expiration_date))||m:m;return""===f.resolution?(r=f.interval,a="D"):"S"===f.resolution?(r=10*f.interval,a=""):(l="D"===f.resolution?1:"W"===f.resolution?5:30,r=12*l*f.interval,a="M"),f.range?(r=f.range.interval,a=f.range.resolution):this.host.calculateHistoryDepth&&(h=this.host.calculateHistoryDepth(i,a,r))&&(r=h.intervalBack||r,a=void0===h.resolutionBack?a:h.resolutionBack),c=t.sessionString||t.session,s=u.alignPeriodsBack(c,a,r,1,g),n&&n.getRangeExtensionTime&&(d=n.getRangeExtensionTime())&&(s=Math.min(1e3*d,s)),n&&n.getRangeExtensionCount&&(p=n.getRangeExtensionCount())>0&&(s=u.alignPeriodsBack(c,f.resolution,f.interval,p,s)),{from:s,to:g+6e4}},c=function(t,e,i,o,n,s,r){if(this.listeners=t,this.isRecalculated=!1,""===o)returnconsole.error("unsupported resolution for rebuild: "+i),voidthis.listeners.onError("unsupported resolution for rebuild: "+i);this.symbolInfo=s;vara=this;this.engine=newf({tickerid:e,period:o,periodBase:i,body:n,symbolInfo:s,rangeExtension:r,recalc:function(t,e){a._recalc(e)},out:function(t,e){a._out(t,e)},nonseriesOut:function(t,e){a._nonseriesOut(t,e)},setNoMoreData:function(){a.barset&&(a.barset.endOfData=!0)},onErrorCallback:function(t){a.listeners.onError(t)}})},c.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},c.prototype._recalc=function(t){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=newg(this.symbolInfo)),t&&(this.barset.nextTime=t.nextTime,this.barset.endOfData=t.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},c.prototype._nonseriesOut=function(t,e){vari=Object.assign({},e);i.nonseries=!0,i.data=e.bars,deletei.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},c.prototype._out=function(t,e){vari,o,n,s,r,a,l,h=e[0];if(!isNaN(h)){if(i={time:h,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],updatetime:e[6]},o=e[7],this.barset||(this.barset=newg(t.info)),(n=e[8])instanceofArray)for(s=0;s<n.length;s++)r=e[9],a=n[s],l={time:a,open:r,high:r,low:r,close:r,volume:0,updatetime:a},this.barset.add(l,!0),this.isRecalculated&&this.listeners.fire(this.barset);this.barset.add(i,o),this.barset.isBarClosed=o,this.isRecalculated&&this.listeners.fire(this.barset)}},d=function(){this.listeners=[]},d.prototype.listenersCount=function(){returnthis.listeners.reduce(function(t,e){returnt+(e?1:0)},0)},d.prototype.addListener=function(t,e){this.listeners.push({dataListener:t,onErrorCallback:e}),this.barset&&t(this.barset),this.errorMsg&&e(this.errorMsg)},d.prototype.removeListener=function(t){vare,i=this.listeners.filter(function(e){returne.dataListener===t});0!==i.length&&(e=this.listeners.indexOf(i[0]),deletethis.listeners[e])},d.prototype.onError=function(t){
c.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},c.prototype.calculateFromTo=function(t,i,o,n){vars,r,a,l,h,c,d,p,u=f.parsePeriod(i),m=(newDate).valueOf(),g=t.expired?e.cal_to_utc(e.get_timezone(t.timezone),newDate(1e3*t.expiration_date))||m:m;return""===u.resolution?(r=u.interval,a="D"):"S"===u.resolution?(r=10*u.interval,a=""):(l="D"===u.resolution?1:"W"===u.resolution?5:30,r=12*l*u.interval,a="M"),u.range?(r=u.range.interval,a=u.range.resolution):this.host.calculateHistoryDepth&&(h=this.host.calculateHistoryDepth(i,a,r))&&(r=h.intervalBack||r,a=void0===h.resolutionBack?a:h.resolutionBack),c=t.sessionString||t.session,s=_.alignPeriodsBack(c,a,r,1,g),n&&n.getRangeExtensionTime&&(d=n.getRangeExtensionTime())&&(s=Math.min(1e3*d,s)),n&&n.getRangeExtensionCount&&(p=n.getRangeExtensionCount())>0&&(s=_.alignPeriodsBack(c,u.resolution,u.interval,p,s)),{from:s,to:g+6e4}},d=function(t,e,i,o,n,s,r){if(this.listeners=t,this.isRecalculated=!1,""===o)returnconsole.error("unsupported resolution for rebuild: "+i),voidthis.listeners.onError("unsupported resolution for rebuild: "+i);this.symbolInfo=s;vara=this;this.engine=newm({tickerid:e,period:o,periodBase:i,body:n,symbolInfo:s,rangeExtension:r,recalc:function(t,e){a._recalc(e)},out:function(t,e){a._out(t,e)},nonseriesOut:function(t,e){a._nonseriesOut(t,e)},setNoMoreData:function(){a.barset&&(a.barset.endOfData=!0)},onErrorCallback:function(t){a.listeners.onError(t)}})},d.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},d.prototype._recalc=function(t){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=newv(this.symbolInfo)),t&&(this.barset.nextTime=t.nextTime,this.barset.endOfData=t.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},d.prototype._nonseriesOut=function(t,e){vari=Object.assign({},e);i.nonseries=!0,i.data=e.bars,deletei.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},d.prototype._out=function(t,e){vari,o,n,s,r,a,l,h=e[0];if(!isNaN(h)){if(i={time:h,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],updatetime:e[6]},o=e[7],this.barset||(this.barset=newv(t.info)),(n=e[8])instanceofArray)for(s=0;s<n.length;s++)r=e[9],a=n[s],l={time:a,open:r,high:r,low:r,close:r,volume:0,updatetime:a},this.barset.add(l,!0),this.isRecalculated&&this.listeners.fire(this.barset);this.barset.add(i,o),this.barset.isBarClosed=o,this.isRecalculated&&this.listeners.fire(this.barset)}},p=function(){this.listeners=[]},p.prototype.listenersCount=function(){returnthis.listeners.reduce(function(t,e){returnt+(e?1:0)},0)},p.prototype.addListener=function(t,e){this.listeners.push({dataListener:t,onErrorCallback:e}),this.barset&&t(this.barset),this.errorMsg&&e(this.errorMsg)},p.prototype.removeListener=function(t){vare,i=this.listeners.filter(function(e){returne.dataListener===t});0!==i.length&&(e=this.listeners.indexOf(i[0]),deletethis.listeners[e])},
p._externalDatafeed.getServerTime&&p._externalDatafeed.getServerTime(function(t){p._serverTimeOffset=t-(newDate).valueOf()/1e3}),this._pointsetsManager=d,this._rangeExtensionData={},this._quotesInfo=[],this._depthInfo=[],this._fullNameSymbolInfoMap={},this._endOfData={},this._computeStudyCounter=0,this._createDWMAligner=e,this._cachedDatafeed=news(t,e),this._extendedRange=function(t){returnp._rangeExtensionData[t]&&p._rangeExtensionData[t].summary},this._extendedTime=function(t){returnp._rangeExtensionData[t]&&p._rangeExtensionData[t].time},h.setupFeed({resolve:l,subscribe:r,unsubscribe:a,calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void0})},r.prototype._barsCoefficients=function(t,e){if(0!==t.indexOf("="))return{};vari=t+e;returnthis._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},r.prototype.destroy=function(){this._externalDatafeed=null},r.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={}},r.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},r.prototype._logMessage=function(t){o.enabled("charting_library_debug_mode")&&console.log(t)},r.prototype._extendRange=function(t,e){this._rangeExtensionData[t]||(this._rangeExtensionData[t]={}),void0===this._rangeExtensionData[t].summary&&(this._rangeExtensionData[t].summary=0),this._rangeExtensionData[t].summary+=e},r.prototype.on=function(t,e){returnthis._callbacks.hasOwnProperty(t)||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},r.prototype._fireEvent=function(t,e,i){varo,n;if(this._callbacks.hasOwnProperty(t)){for(o=this._callbacks[t],n=0;n<o.length;++n)o[n](e);i||(this._callbacks[t]=[])}},r.prototype._adoptConfigurationData=function(t){vare,i,o,n=TradingView.merge({},t),s=n.supported_resolutions;if(!s||0===s.length)returnn.supported_resolutions=void0,n;for(e={},i=0;i<s.length;i++){if(o=s[i],e.hasOwnProperty(o))throwError("Duplicating resolution `"+o+"`");e[o]=1}returnn.supported_resolutions=e,n},r.prototype.supportedResolutions=function(){returnthis._datafeedConfiguration.supported_resolutions},r.prototype.supportedSymbolsTypes=function(){returnthis._datafeedConfiguration.symbols_types||[]},r.prototype.supportedExchangesList=function(){returnthis._datafeedConfiguration.exchanges||[]},r.prototype.futuresRegex=function(){returnthis._datafeedConfiguration.futures_regex||/$a/},r.prototype._findStudyObject=function(t){vare=t.split("@")[0],i=JSServer.studyLibrary.filter(function(i){returni.metainfo.id===t||i.metainfo.shortDescription===e});if(0===i.length)throwError("Study `"+t+"` not found");returni[0]},r.prototype.getMarks=function(t,e,i,o,n){functions(t){functione(e,i){returnisArray(t[e])?t[e][i]:t[e]}vari,o;if(isArray(t))returnt;for(i=[],o=0;o<t.id.length;++o)i.push({id:e("id",o),time:e("time",o),color:e("color",o),text:e("text",o),label:e("label",o),labelFontColor:e("labelFontColor",o),minSize:e("minSize",o)});returni}varr,a={red:6,green:5,blue:4,
yellow:3};this._externalDatafeed.getMarks&&this._datafeedConfiguration.supports_marks&&(this._logMessage("Requesting bars marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(t.full_name,n,newDate(1e3*e).toUTCString(),newDate(1e3*i).toUTCString())),r=this,this._externalDatafeed.getMarks(t,e,i,function(e){vari,l,h=s(e).map(function(t){returnt.time=parseInt(t.time),t});r._logMessage("Received bars marks: symbol {0}, resolution {1}, marks {2}".format(t.full_name,n,JSON.stringify(h))),i=r._createDWMAligner(n,t),l=h.map(function(t){returnt.tickmark=null!==i?i.tradingDayToSessionStart(1e3*t.time)/1e3:t.time,t.direction=a[t.color],t.onClicked=function(){_.emit("onMarkClick",t.id)},t.label=!!t.label&&t.label[0],t}),o(l)},n))},r.prototype.getTimescaleMarks=function(t,e,i,o,n){if(this._externalDatafeed.getTimescaleMarks&&this._datafeedConfiguration.supports_timescale_marks){this._logMessage("Requesting timescale marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(t.full_name,n,newDate(1e3*e).toUTCString(),newDate(1e3*i).toUTCString()));vars=this;this._externalDatafeed.getTimescaleMarks(t,e,i,function(e){vari,r;s._logMessage("Received timescale marks: symbol {0}, resolution {1}, marks {2}".format(t.full_name,n,JSON.stringify(e))),i=s._createDWMAligner(n,t),r=e.map(function(t){returnt.tickmark=null!==i?i.tradingDayToSessionStart(1e3*t.time)/1e3:t.time,t}),o(r)},n)}},r.prototype._computeStudy=function(t,e,i,o,n,s,r,a,h,c){functiond(t,e){switch(t.type){case"projection":returnc(t,e);default:returnconsole.warn("Unexpected non-series output type: "+t.type)}}functionp(t,e,i){varo,n,s,r,l=t.time,h="number"==typeofe?[e]:e;for(o=0;o<h.length;++o)n=h[o],n&&"object"==typeofn&&(m["plot_"+o]=n.offset,n=n.value,g++),"number"==typeofn&&isNaN(n)&&(n=void0),h[o]=n;s=f.length-1,r=s<0||l>f[s].value[0],r?f.push({index:f.length,value:[l].concat(h)}):f[s].value=[l].concat(h),u||a([f[f.length-1]],r,f.length,m,i)}varu=!0,_=this._computeStudyCounter++,f=[],m={},g=0,v=!1,y=this,b=function(a){varc;if(l.Symbol.parsePeriod(o).isIntraday&&!a.has_intraday)returnvoidh("Unsupported resolution");if(c=newl.StudyEngine({tickerid:i,symbolInfo:a,period:o,body:e,sessionId:t,onErrorCallback:h,rangeExtension:{getRangeExtensionCount:y._extendedRange.bind(this,t),getRangeExtensionTime:y._extendedTime.bind(this,t)},input:function(t){returns[t]},out:function(t,e){p(t,e,a)},nonseriesOut:function(t){d(t,a)},setNoMoreData:function(){v=!0},recalc:function(t,e){u=!1,f.endOfData=v,r(f,g>0?m:void0,a,e)}}),!y._studiesCache[t]||!y._studiesCache[t][n])throwError("This should never happen");y._studiesCache[t][n].engine=c},w=function(t){h(t)},S=function(){returny._studiesCache[t]&&y._studiesCache[t][n]&&y._studiesCache[t][n].activeResolve===_};y._studiesCache[t][n].activeResolve=_,this.resolveSymbol(i,function(){S()&&b.apply(y,arguments)},function(){S()&&w.apply(y,arguments)})},r.prototype._createStudy=function(t,e,i,o,n,s,a){functionl(t){vare,i,s;if(Array.isArray(t))returnt;for(e=[],i=h._studiesCache[o][n].metainfo.inputs,
s=0;s<i.length;s++)e[s]=t[i[s].id];returne}varh=this;a=l(a),TradingView.ChartapiMessagerInstances[o].onStudyLoading(n,s),h._computeStudy(o,i,t,e,n,a,function(i,r,a){TradingView.ChartapiMessagerInstances[o].onDataUpdate(n,s,h._convertBarsTimeToUnix(i),r,a,h._extendedRange(t,e)),TradingView.ChartapiMessagerInstances[o].onStudyCompleted(n,s)},function(i,r,a,l,c){TradingView.ChartapiMessagerInstances[o].onDataUpdate(n,s,h._convertBarsTimeToUnix(i),l,c,h._extendedRange(t,e))},function(t){TradingView.ChartapiMessagerInstances[o].onStudyError(n,t)},r.prototype._updateProjectionData.bind(this,o,n,s))},r.prototype.purgeEndOfDataFlags=function(t,e){for(variinthis._studiesCache[t])e&&e!==i||(this._studiesCache[t][i].firstBarTime=null)},r.prototype.stopSources=function(t){vare,i;for(einthis._studiesCache[t])(i=this._studiesCache[t][e])&&(i.engine&&i.engine.stop(),i.activeResolve=-1);h.unsubscribeUnused()},r.prototype.recreateSources=function(t,e,i,o){varn,s;this.stopSources(i);for(ninthis._studiesCache[i])(s=this._studiesCache[i][n])&&(s.symbol=t,s.resolution=e,"series"===s.type&&this.createSeries(t,e,i,n,s.turnaround,o));for(ninthis._studiesCache[i])(s=this._studiesCache[i][n])&&"study"===s.type&&this._createStudy(t,e,s.studyObject,i,n,s.turnaround,s.inputs)},r.prototype.removeStudy=function(t,e){this._studiesCache[t]&&this._studiesCache[t][e]&&this._studiesCache[t][e].engine&&(this._studiesCache[t][e].engine.stop(),h.unsubscribeUnused()),this._studiesCache[t][e]=null},r.prototype.removeSeries=function(t,e){this.removeStudy(t,e)},r.prototype.recomputeStudy=function(t,e,i,o){varn=this._studiesCache[i][t];if(!n)throwError("This should never happen");n.inputs=e,n.turnaround=o,n.engine&&n.engine.stop(),this._createStudy(n.symbol,n.resolution,n.studyObject,i,t,o,e)},r.prototype._convertBarsTimeToUnix=function(t){vare,i,o=[];for(e=0;e<t.length;++e)i={index:t[e].index,value:[].concat(t[e].value)},i.value[0]/=1e3,o.push(i);returno.endOfData=t.endOfData,o},r.prototype.createStudy=function(t,e,i,o,n,s,r){vara=this._findStudyObject(s),l=newa.constructor;this._studiesCache[i]=this._studiesCache[i]||{},this._studiesCache[i][o]={studyObject:l,symbol:t,resolution:e,guid:o,type:"study",inputs:r,metainfo:a.metainfo,turnaround:n},this._createStudy(t,e,l,i,o,n,r)},r.prototype.purgeRangeExtensionData=function(t){t?this._rangeExtensionData[t]={summary:0}:this._rangeExtensionData={}},r.prototype.ensureExtendedTo=function(t,e,i){varo,n=this._studiesCache[e][t];if(!n)throwError("This should never happen");this.purgeRangeExtensionData(e),this._rangeExtensionData[e]||(this._rangeExtensionData[e]={}),this._rangeExtensionData[e].time=i,o=this,setTimeout(function(){o.recreateSources(n.symbol,n.resolution,e,!0)},0)},r.prototype.extendSeriesRange=function(t,e,i){varo,n,s,r,a=this._studiesCache[e][t];if(!a)throwError("This should never happen");if(this._isEndOfData(e,t,a.turnaround))returno=a.engine.runner.host.symbolInfo.data_status,voidsetTimeout(function(){TradingView.ChartapiMessagerInstances[e].onSeriesCompleted(t,a.turnaround,o)
E=$('<a class="button getimage"></a>').append($(i(896)).attr({class:"icon"})).addClass("apply-common-tooltip").attr("title",$.t("Take instant snapshot of your chart. No more Paint or other editors to save screenshots – simply click the button and copy the link of the picture.")+"\n"+I).appendTo(A),A.click(function(t){if(!e.enabled("show_dialog_on_snapshot_ready")){if(E.hasClass("process"))return;E.addClass("process"),c.subscribe("onScreenshotReady",function(t){E.removeClass("process")},null,!0)}f.actions().takeScreenshot.callbacks().fire(),t.preventDefault()})),e.enabled("header_saveload")&&(M=e.enabled("header_saveload_to_the_right")?this._$right:this._$left,y=this.createGroup("save-load",{single:!0,showInNarrowView:!0}).appendTo(M),D=$("<div>").addClass("save-load-buttons").appendTo(y),this._saveLoad=newr(D,a,{popupDirection:"down",popupReverse:!0}),this._saveLoad.onTitleSizeChanged.subscribe(this,this._onInternalResize),TradingView.isOnFeaturePage&&this._saveLoad.hideTitle()),e.enabled("header_widget_dom_node")||$(".header-chart-panel").css("display","none"),f.withModel(this,s.prototype.bindToModel),this._resizerBridge.availWidth.subscribe(this._onAvailSizeChange.bind(this)),this._resizerBridge.availHeight.subscribe(this._onAvailSizeChange.bind(this)),this._onAvailSizeChange(),this._onInternalResize()}varn=i(671),s=i(594),r=i(660),a=i(602),l=i(291),h=i(664),c=i(34),d=i(77),p=i(367).FavoredList,u=i(42),_=i(290);inherit(o,s),o.prototype.saveLoadWidget=function(){returnthis._saveLoad},o.prototype._onAvailSizeChange=function(){vart=this._resizerBridge.availWidth.value()<=520||this._resizerBridge.availHeight.value()<=250;!!this._compactMode!==t&&(this._compactMode=t,this._$root.toggleClass("header-chart-panel--compact",t),this._onInternalResize())},o.prototype.addButton=function(t,e){(e?this._$left:this._$right).append(t),this._onInternalResize()},o.prototype._createUndoRedoGroup=function(){returnthis._undoRedo=newn(this._$left,this._chartWidget),this._undoRedo.undoElement().addClass("apply-common-tooltip"),this._undoRedo.redoElement().addClass("apply-common-tooltip"),this.createGroup("undo-redo",{single:!0}).append(this._undoRedo.element())},o.prototype._createFullscreenGroup=function(){this._fullscreen=newa(this._chartWidgetCollection);vart=this.createGroup("fullscreen",{single:!0});returnthis._fullscreen.element().addClass("apply-common-tooltip").appendTo(t),t},o.prototype._createLayout=function(t,i,o){varn=[];e.enabled("header_chart_type")&&n.push(this._createBarsGroup(i)),e.enabled("header_settings")&&e.enabled("show_chart_property_page")&&n.push(this._createPropertiesGroup(o,t.chartWidgetCollection)),e.enabled("header_indicators")&&n.push(this._createIndicatorsGroup(o)),e.enabled("header_compare")&&n.push(this._createCompareGroup(i,t.chartWidgetCollection,o)),e.enabled("header_undo_redo")&&!this._chartWidget.readOnly()&&n.push(this._createUndoRedoGroup()),e.enabled("header_fullscreen_button")&&n.push(this._createFullscreenGroup()),n.forEach(function(t){t.appendTo(this._$left)},this)},
E=$('<a class="button getimage"></a>').append($(i(896)).attr({class:"icon"})).addClass("apply-common-tooltip").attr("title",$.t("Take instant snapshot of your chart. No more Paint or other editors to save screenshots – simply click the button and copy the link of the picture.")+"\n"+I).appendTo(A),A.click(function(t){if(!e.enabled("show_dialog_on_snapshot_ready")){if(E.hasClass("process"))return;E.addClass("process"),c.subscribe("onScreenshotReady",function(t){E.removeClass("process")},null,!0)}f.actions().takeScreenshot.callbacks().fire(),t.preventDefault()})),e.enabled("header_saveload")&&(M=e.enabled("header_saveload_to_the_right")?this._$right:this._$left,y=this.createGroup("save-load",{single:!0,showInNarrowView:!0}).appendTo(M),D=$("<div>").addClass("save-load-buttons").appendTo(y),this._saveLoad=newr(D,a,{popupDirection:"down",popupReverse:!0}),this._saveLoad.onTitleSizeChanged.subscribe(this,this._onInternalResize),TradingView.isOnFeaturePage&&this._saveLoad.hideTitle()),e.enabled("header_widget_dom_node")||$(".header-chart-panel").css("display","none"),f.withModel(this,s.prototype.bindToModel),this._resizerBridge.availWidth.subscribe(this._onAvailSizeChange.bind(this)),this._resizerBridge.availHeight.subscribe(this._onAvailSizeChange.bind(this)),this._onAvailSizeChange(),this._onInternalResize()}varn=i(671),s=i(594),r=i(660),a=i(602),l=i(291),h=i(664),c=i(34),d=i(77),p=i(367).FavoredList,u=i(43),_=i(290);inherit(o,s),o.prototype.saveLoadWidget=function(){returnthis._saveLoad},o.prototype._onAvailSizeChange=function(){vart=this._resizerBridge.availWidth.value()<=520||this._resizerBridge.availHeight.value()<=250;!!this._compactMode!==t&&(this._compactMode=t,this._$root.toggleClass("header-chart-panel--compact",t),this._onInternalResize())},o.prototype.addButton=function(t,e){(e?this._$left:this._$right).append(t),this._onInternalResize()},o.prototype._createUndoRedoGroup=function(){returnthis._undoRedo=newn(this._$left,this._chartWidget),this._undoRedo.undoElement().addClass("apply-common-tooltip"),this._undoRedo.redoElement().addClass("apply-common-tooltip"),this.createGroup("undo-redo",{single:!0}).append(this._undoRedo.element())},o.prototype._createFullscreenGroup=function(){this._fullscreen=newa(this._chartWidgetCollection);vart=this.createGroup("fullscreen",{single:!0});returnthis._fullscreen.element().addClass("apply-common-tooltip").appendTo(t),t},o.prototype._createLayout=function(t,i,o){varn=[];e.enabled("header_chart_type")&&n.push(this._createBarsGroup(i)),e.enabled("header_settings")&&e.enabled("show_chart_property_page")&&n.push(this._createPropertiesGroup(o,t.chartWidgetCollection)),e.enabled("header_indicators")&&n.push(this._createIndicatorsGroup(o)),e.enabled("header_compare")&&n.push(this._createCompareGroup(i,t.chartWidgetCollection,o)),e.enabled("header_undo_redo")&&!this._chartWidget.readOnly()&&n.push(this._createUndoRedoGroup()),e.enabled("header_fullscreen_button")&&n.push(this._createFullscreenGroup()),n.forEach(function(t){t.appendTo(this._$left)},this)},
o.prototype.defaultProperties=function(){vart=this,e=[t._seriesProperty.extendedHours,t._property.scalesProperties.showLeftScale,t._property.scalesProperties.showRightScale,t._property.timeScale.rightOffset].map(function(t){return{property:t,previousValue:t.value()}});returnsetTimeout(function(){e.forEach(function(t){t.property.value()!==t.previousValue&&t.property.listeners().fire(t.property)});vari=newC("chartproperties.paneProperties.rightAxisProperties");$.each(["autoScale","percentage","log"],function(e,o){varn=t._scaleProperty[o],s=i[o].value();s!==n.value()&&n.setValue(s)})},0),[this._property,this._seriesProperty]},o.prototype.createEventsTable=function(t){vari,o,n,s,r,a,l,h,c,d,g,v,y,T,C,x,P,L,k,I,A,E,M,D,O,V,B,R,N=$("<tr>").appendTo(t),F=$('<input type="checkbox" />'),z=this.addLabeledRow(N,$.t("Show Dividends on Chart"),F);$("<td>").append(F).prependTo(z),z.append("<td>"),this.bindControl(newp(F,this._seriesProperty.esdShowDividends,!0,this.model(),"Change Show or Hide Dividends")),i=$('<input type="checkbox" />'),z=this.addLabeledRow(N,$.t("Show Splits on Chart"),i),$("<td>").append(i).prependTo(z),z.append("<td>"),this.bindControl(newp(i,this._seriesProperty.esdShowSplits,!0,this.model(),"Change Show or Hide Splits")),o=$('<input type="checkbox" />'),z=this.addLabeledRow(N,$.t("Show Earnings on Chart"),o),$("<td>").append(o).prependTo(z),z.append("<td>"),this.bindControl(newp(o,this._seriesProperty.esdShowEarnings,!0,this.model(),"Change Show or Hide Earnings")),n=this.createTableInTable(t),s=$('<input type="checkbox" />'),r=w(),a=S(),z=this.addLabeledRow(n,$.t("Earnings breaks"),s),$("<td>").append(s).prependTo(z),l=b($("<td>").appendTo(z)),$("<td>").append(r.render()).appendTo(z),$("<td>").append(a).appendTo(z),z.addClass("offset-row"),z.append("<td>"),this.bindControl(newp(s,this._seriesProperty.esdShowBreaks,!0,this.model(),"Change Show or Hide Earnings")),this.bindControl(new_(l,this._seriesProperty.esdBreaksStyle.color,!0,this.model(),"Change earnings color")),this.bindControl(newf(r,this._seriesProperty.esdBreaksStyle.style,parseInt,!0,this.model(),"Change style")),this.bindControl(newu(a,this._seriesProperty.esdBreaksStyle.width,!0,this.model(),"Change width")),h=function(t){s.prop("disabled",!t.value())},this._seriesProperty.esdShowEarnings.listeners().subscribe(this,h),e.enabled("chart_events")&&(c=$('<input type="checkbox">'),d=$('<input type="checkbox">'),g=$('<input type="checkbox" />'),v=w(),y=S(),T=this.createColorPicker(),C=this._property.chartEventsSourceProperties,this.bindControl(newp(c,C.visible,!0,this.model(),"Change Show Economic Events on Chart")),this.bindControl(newp(d,C.futureOnly,!0,this.model(),"Change Show Only Future Events")),this.bindControl(newm(d,C.visible,!0,this.model(),"",!0)),this.bindControl(newm(g,C.visible,!0,this.model(),"",!0)),this.bindControl(newp(g,C.breaks.visible,!0,this.model(),"Change Show or Hide Events Breaks")),this.bindControl(new_(T,C.breaks.color,!0,this.model(),"Change Events Breaks Color")),
this.bindControl(newf(v,C.breaks.style,parseInt,!0,this.model(),"Change Events Breaks Style")),this.bindControl(newu(y,C.breaks.width,!0,this.model(),"Change Events Breaks Width")),x=$("<tr>").appendTo(t),z=this.addLabeledRow(x,$.t("Show Economic Events on Chart"),c),$("<td>").append(c).prependTo(z),P=this.createTableInTable(t),z=this.addLabeledRow(P,$.t("Show Only Future Events"),d),$("<td>").append(d).prependTo(z),z.addClass("offset-row"),L=this.createTableInTable(t),z=this.addLabeledRow(L,$.t("Events Breaks"),g),$("<td>").append(g).prependTo(z),$("<td>").append(T).appendTo(z),$("<td>").append(v.render()).appendTo(z),$("<td>").append(y).appendTo(z),z.addClass("offset-row")),e.enabled("alerts")&&(k=$("<tr>").appendTo(t),I=$('<input type="checkbox" />'),z=this.addLabeledRow(k,$.t("Show Alert Labels"),I),$("<td>").append(I).prependTo(z),z.append("<td>"),A=this._property.alertsProperties.labels.visible,this.bindControl(newp(I,A,!0,this.model(),"Change Show or Hide Alert Labels",function(t){this._model.beginUndoMacro("Show Alert Labels"),this._model.setProperty(A,t,"Show Alert Labels"),this._model.endUndoMacro()}.bind(this))),E=this.createTableInTable(t),M=$('<input type="checkbox">'),D=S(),O=w(),V=O.render(),z=this.addLabeledRow(E,$.t("Extended Alert Line"),M),$("<td>").append(M).prependTo(z),B=b($("<td>").appendTo(z)),$("<td>").append(V).appendTo(z),$("<td>").append(D).appendTo(z),z.addClass("offset-row"),z.append("<td>"),this.bindControl(newp(M,this._property.alertsProperties.labels.line.visible,!0,this.model(),"Change Show or Hide Alert Labels Lines")),this.bindControl(new_(B,this._property.alertsProperties.labels.color,!0,this.model(),"Change Alerts Labels color")),this.bindControl(newf(O,this._property.alertsProperties.labels.line.style,parseInt,!0,this.model(),"Change style")),this.bindControl(newu(D,this._property.alertsProperties.labels.line.width,!0,this.model(),"Change width")),R=function(t){M.prop("disabled",!t.value()),V.prop("disabled",!t.value()),D.prop("disabled",!t.value())},A.listeners().subscribe(this,R))},o.prototype.createSessTable=function(t){vare,i,o,n,s,r=this._series.sessionsStudy().properties(),a=this.createTableInTable(t),l=r.name.value(),h=$("<input type='checkbox' />"),c=this.addLabeledRow(a,$.t("Session Breaks"),h),d=w(),m=this.createColorPicker(),g=S();return$("<td>").append(h).prependTo(c),$("<td>").append(m).appendTo(c),$("<td>").append(d.render()).appendTo(c),$("<td>").append(g).appendTo(c),this.bindControl(newp(h,r.graphics.vertlines.sessBreaks.visible,!0,this.model(),"Change "+l+" visibility")),this.bindControl(new_(m,r.graphics.vertlines.sessBreaks.color,!0,this.model(),"Change "+l+" color")),this.bindControl(newf(d,r.graphics.vertlines.sessBreaks.style,parseInt,!0,this.model(),"Change "+l+" style")),this.bindControl(newu(g,r.graphics.vertlines.sessBreaks.width,!0,this.model(),"Change "+l+" width")),a=this.createTableInTable(t),e=this._extendedHoursEditor=$('<input type="checkbox" />'),c=this.addLabeledRow(a,$.t("Extended Hours (Intraday Only)"),e),
;for(e=0;e<n;++e)if(i=o[e],u[i].name===t)returni;returnnull}functionn(t){return"LineToolRiskRewardLong"===t||"LineToolRiskRewardShort"===t}vars=i(574),r=i(281),a=i(25),l=i(7).DefaultProperty,h=i(118).availIcons,c=i(58),d=i(43).Interval,p=i(57),u=i(189),_=i(262).createTooManyStudiesNotice,f=function(t){this._chartWidget=t};f.prototype._makeSubscriptionFromDelegate=function(t){vare=$.extend({},t);returndeletee.fire,e},f.prototype.executeAction=function(t){this._chartWidget.executeActionByName(t)},f.prototype.executeActionById=function(t){this._chartWidget.executeActionById(t)},f.prototype.getCheckableActionState=function(t){returnthis._chartWidget.getCheckableActionState(t)},f.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},f.prototype.clearMarks=function(){this._chartWidget.clearMarks()},f.prototype.symbol=function(){returnthis._chartWidget.getSymbol()},f.prototype.symbolExt=function(){vart=this._chartWidget.model().mainSeries().symbolInfo();returnt?{symbol:t.name,full_name:t.full_name,exchange:t.exchange,description:t.description,type:t.type}:null},f.prototype.resolution=function(){returnthis._chartWidget.model().mainSeries().properties().interval.value()},f.prototype.setSymbol=function(t,i){functiono(){n._chartWidget.model().mainSeries().onDataLoaded().unsubscribe(null,o),i&&i()}if(t!==this.symbol()||e.enabled("same_data_requery")){varn=this;returnthis._chartWidget.model().mainSeries().onDataLoaded().subscribe(null,o),this._chartWidget.setSymbol(t)}},f.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},f.prototype.setResolution=function(t,e){functioni(){o._chartWidget.model().mainSeries().onDataLoaded().unsubscribe(null,i),e&&e()}if((t=t.toUpperCase())!==this.resolution()){varo=this;returnthis._chartWidget.model().mainSeries().onDataLoaded().subscribe(null,i),this._chartWidget.setResolution(t)}},f.prototype.setEntityVisibility=function(t,e){vari,o=this._chartWidget.model().model().dataSourceForId(t);o&&(i=o.properties())&&i.visible&&i.visible.setValue(e)},f.prototype.getAllStudies=function(){returnthis._chartWidget.model().model().allStudies().map(function(t){return{id:t._id,name:t._metaInfo.description}})},f.prototype.getAllShapes=function(){returnthis._chartWidget.model().model().allLineTools().map(function(t){return{id:t._id,name:o(t.toolname)}}).filter(function(t){returnnull!==t.name})},f.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},f.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},f.prototype.removeEntity=function(t){vare=this._chartWidget.model().chartModel().dataSourceForId(t);if(!e)returnvoidconsole.warn("Can't find a source with id: "+t);this._chartWidget.model().chartModel().removeSource(e,!0)},f.prototype.createStudyTemplate=function(t){returnthis._chartWidget.model().model().studyTemplate(t.saveInterval)},f.prototype.applyStudyTemplate=function(t){this._chartWidget.model().model().restoreStudyTemplate(t,""+1e3*Math.random())},
;for(e=0;e<n;++e)if(i=o[e],u[i].name===t)returni;returnnull}functionn(t){return"LineToolRiskRewardLong"===t||"LineToolRiskRewardShort"===t}vars=i(574),r=i(281),a=i(25),l=i(7).DefaultProperty,h=i(118).availIcons,c=i(58),d=i(36).Interval,p=i(57),u=i(189),_=i(262).createTooManyStudiesNotice,f=function(t){this._chartWidget=t};f.prototype._makeSubscriptionFromDelegate=function(t){vare=$.extend({},t);returndeletee.fire,e},f.prototype.executeAction=function(t){this._chartWidget.executeActionByName(t)},f.prototype.executeActionById=function(t){this._chartWidget.executeActionById(t)},f.prototype.getCheckableActionState=function(t){returnthis._chartWidget.getCheckableActionState(t)},f.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},f.prototype.clearMarks=function(){this._chartWidget.clearMarks()},f.prototype.symbol=function(){returnthis._chartWidget.getSymbol()},f.prototype.symbolExt=function(){vart=this._chartWidget.model().mainSeries().symbolInfo();returnt?{symbol:t.name,full_name:t.full_name,exchange:t.exchange,description:t.description,type:t.type}:null},f.prototype.resolution=function(){returnthis._chartWidget.model().mainSeries().properties().interval.value()},f.prototype.setSymbol=function(t,i){functiono(){n._chartWidget.model().mainSeries().onDataLoaded().unsubscribe(null,o),i&&i()}if(t!==this.symbol()||e.enabled("same_data_requery")){varn=this;returnthis._chartWidget.model().mainSeries().onDataLoaded().subscribe(null,o),this._chartWidget.setSymbol(t)}},f.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},f.prototype.setResolution=function(t,e){functioni(){o._chartWidget.model().mainSeries().onDataLoaded().unsubscribe(null,i),e&&e()}if((t=t.toUpperCase())!==this.resolution()){varo=this;returnthis._chartWidget.model().mainSeries().onDataLoaded().subscribe(null,i),this._chartWidget.setResolution(t)}},f.prototype.setEntityVisibility=function(t,e){vari,o=this._chartWidget.model().model().dataSourceForId(t);o&&(i=o.properties())&&i.visible&&i.visible.setValue(e)},f.prototype.getAllStudies=function(){returnthis._chartWidget.model().model().allStudies().map(function(t){return{id:t._id,name:t._metaInfo.description}})},f.prototype.getAllShapes=function(){returnthis._chartWidget.model().model().allLineTools().map(function(t){return{id:t._id,name:o(t.toolname)}}).filter(function(t){returnnull!==t.name})},f.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},f.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},f.prototype.removeEntity=function(t){vare=this._chartWidget.model().chartModel().dataSourceForId(t);if(!e)returnvoidconsole.warn("Can't find a source with id: "+t);this._chartWidget.model().chartModel().removeSource(e,!0)},f.prototype.createStudyTemplate=function(t){returnthis._chartWidget.model().model().studyTemplate(t.saveInterval)},f.prototype.applyStudyTemplate=function(t){this._chartWidget.model().model().restoreStudyTemplate(t,""+1e3*Math.random())},
f.prototype.setVisibleRange=function(t,i){varo,n,s,r;if(void0===t||!t.from||!t.to||isNaN(t.from)||isNaN(t.to))returnvoidconsole.warn("Wrong time range: "+JSON.stringify(t)+'. Expected an object with "from" and "to" numeric values.');o=this._chartWidget.model().model(),n=o.mainSeries(),s=[parseInt(t.from),parseInt(t.to)],r=d.isDWM(n.interval())&&!e.enabled("disable_resolution_rebuild")?this._alignPoints(s):s,t.from=r[0],t.to=r[1],this._chartWidget.setVisibleTimeRange(t.from,t.to,i)},f.prototype.getVisibleRange=function(){vart=this._chartWidget.model().timeScale(),e=t.visibleBars(),i={from:t.indexToUserTime(e.firstBar()<0?0:e.firstBar()),to:t.indexToUserTime(e.lastBar())};return{from:(+i.from||0)/1e3,to:(+i.to||0)/1e3}},f.prototype.getVisiblePriceRange=function(){returnthis._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},f.prototype._createTradingPrimitive=function(t,e){functioni(){vart=o._chartWidget.model().timeScale().m_points.lastTimePointIndex();return{index:t,price:o._chartWidget.model().mainSeries().data().valueAt(t)[4]}}varo=this,n=this._chartWidget.model().model(),s=n.paneForSource(this._chartWidget.model().model().mainSeries());return(e?this._chartWidget.model().chartModel():this._chartWidget.model()).createLineTool(s,i(),t)._adapter},f.prototype.createOrderLine=function(t){vart=t||{};returnthis._createTradingPrimitive("LineToolOrder",t.disableUndo)},f.prototype.createPositionLine=function(t){vart=t||{};returnthis._createTradingPrimitive("LineToolPosition",t.disableUndo)},f.prototype.createExecutionShape=function(t){vart=t||{};returnthis._createTradingPrimitive("LineToolExecution",t.disableUndo)},f.prototype.createVerticalLine=function(t,e){this._chartWidget.createShape(t,$.extend(e,{shape:"vertical_line"}))},f.prototype.createShape=function(t,e,i){returnthis.createMultipointShape([t],e,i)},f.prototype._alignPoints=function(t){vare,i=this._chartWidget.model().model(),o=i.mainSeries(),n=o.symbolInfo(),s=p.get_timezone(n.timezone);returni.timeScale().isEmpty()?t:(e=(newc.Session).init(s,n.session),t.map(function(t){returnt?c.alignExchangeTimeToSessionStartAndReturnUTC(e.timezone,e.spec,newDate(1e3*t))/1e3:t}))},f.prototype.createMultipointShape=function(t,i,o){functions(t,e,i,o){varn,s,r,a=T.closestIndexLeft(e)||0,l={index:a},h=T.valueAt(a);returne>h&&(n=S.syncModel().distance(h,e),n.success&&(l.index=l.index+n.result)),i?l.price=i:(s=["open","high","low","close"],r=o?s.indexOf(o)+1:1,r<=0&&(r=1),l.price=C.valueAt(a)[r]),l}varr,a,c,p,_,f,m,g,v,y,b=i.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),w=this._chartWidget.model().model(),S=w.mainSeries(),T=w.timeScale().points(),C=S.data();if(!w.timeScale().isEmpty()){for(r=w.paneForSource(S),a=t.map(function(t){returnt.time}),c=d.isDWM(S.interval())&&!e.enabled("disable_resolution_rebuild")?this._alignPoints(a):a,_=[],p=0;p<t.length;p++)f=t[p],_.push(s(f.time,c[p],f.price,f.channel));if(m=u[i.shape]||u.flag,
"LineToolPolyline"===m.name)_[0].price===_[_.length-1].price&&_[0].index===_[_.length-1].index||_.push(_[0]);elseif("LineToolIcon"===m.name){if(i.icon=i.icon||i.overrides&&i.overrides.icon,!i.hasOwnProperty("icon"))throwError("icon must be specified in options");if(-1===h.indexOf(i.icon))throwError("icon value must be valid");i.overrides=i.overrides||{},i.overrides.icon=i.icon}if(g=newl(m.name.toLowerCase()),i.overrides)for(vini.overrides)g[v]?g[v].setValue(i.overrides[v]):n(m.name)&&-1!==["profitLevel","stopLevel"].indexOf(v)&&g.addProperty(v,i.overrides[v]);if(m.supportsText&&i.text&&g.text.setValue(i.text),y=b.createLineTool(r,_[0],m.name,g),y.pointsCount()!==_.length&&-1!==y.pointsCount())throwError("Wrong points count for "+i.shape+". Required "+y.pointsCount());for(p=1;p<_.length&&this._chartWidget.model().lineBeingCreated();p++)b.coninueCreatingLine(_[p],{},p<_.length-1);returni.lock&&y.setUserEditEnabled(!1),i.disableSelection&&(y.customization.disableSelection=!0),i.disableSave&&(y.customization.disableSave=!0),i.hasOwnProperty("showInObjectsTree")&&(y.customization.showInObjectsTree=i.showInObjectsTree),i.zOrder&&("top"===i.zOrder?b.bringToFront(y):"bottom"===i.zOrder&&b.sendToBack(y)),o&&o(y.id()),y.id()}},f.prototype.createStudy=function(t,e,i,o,n,l,h){varc,d,p,u;if(h&&h.checkLimit&&!this._chartWidget.model().canCreateStudy())returnvoid_().open();if(t=t.toLowerCase(),c=a.findStudyMetaInfoByDescription(this._chartWidget.model().studiesMetaData(),t),c=$.extend({},c),deletec.state,c||console.warn("Study `"+t+"` not found."),d={},l){l=l;for(pinl)r.setMetainfoProperty(c,p,l[p]);d.styles=c.defaults.styles,d.bands=c.defaults.bands,d.filledAreasStyle=c.defaults.filledAreasStyle}o&&(d.inputs=s.getStudyRecordFromArray([t].concat(o),this._chartWidget).inputs),u=this._chartWidget.model().chartModel().insertStudy(c,d,e),i&&u.setUserEditEnabled(!1),n&&n(u.id())},f.prototype.chartType=function(){returnthis._chartWidget.model().mainSeries().properties().style.value()},f.prototype.setChartType=function(t){this._chartWidget.model().mainSeries().properties().style.setValue(t)},f.prototype.priceFormatter=function(){returnthis._chartWidget.model().mainSeries().priceScale().formatter()},f.prototype.onDataLoaded=function(){returnthis._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onCompleted())},f.prototype.onSymbolChanged=function(){returnthis._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onSymbolResolved())},f.prototype.onIntervalChanged=function(){returnthis._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())},f.prototype.dataReady=function(t){vare=!this._chartWidget.model()||!this._chartWidget.model().mainSeries()||this._chartWidget.model().mainSeries().data().isEmpty();returnt&&(e?this.onDataLoaded().subscribe(null,t,!0):t()),!e},f.prototype.crossHairMoved=function(t){this._makeSubscriptionFromDelegate(this._chartWidget.model().chartModel().crossHairMoved()).subscribe(null,t)},f.prototype.setTimezone=function(t){
functionj(){vare={snapshotUrl:t.snapshotUrl};(u.enabled("show_dialog_on_snapshot_ready")?p.getImageOfChart:p.getImageOfChartSilently)(this,e,function(t){d.emit("onScreenshotReady",t)})}functionq(){for(vart=s[xt].count;t<bt.length;t++)bt[t].chartWidget.destroy();bt.splice(s[xt].count)}functionY(t){for(vare=0;e<bt.length;e++)bt[e].chartWidget.applyOverrides(t)}functionG(){t.resizerBridge.requestFullscreen()}functionK(){t.resizerBridge.exitFullscreen()}functionX(){returnlt}functionZ(t){returnu.enabled("charting_library_base")?t:"s"===t||u.enabled(productFeatures.MULTIPLE_CHARTS)&&u.getConfig(productFeatures.MULTIPLE_CHARTS).layout.indexOf(t)>=0||st.containsData||yt?t:"s"}functionJ(t){if(Pt=[],t){t.charts||(t={layout:"s",charts:[t]}),xt=Z(t.layout||"s");for(vare=0;e<t.charts.length;e++)Pt.push({content:t.charts[e]});t.symbolLock&&kt.setValue(!0),t.intervalLock&&It.setValue(!0),t.trackTimeLock&&At.setValue(!0),t.hideAllDrawings&&Et.setValue(!0)}tt.setValue(xt),b(xt,ot)&&(l.hideAllDrawings().setValue(Et.value()),Pt.splice(0,Pt.length))}functionQ(){0===--_t&&d.emitOnce("onChartReady")}vartt,et,it,ot,nt,st,rt,at,lt,ht,ct,dt,pt,ut,_t,ft=this,mt=2,gt=0,vt=newe,yt=!1,bt=[],wt=[],St=0,Tt=0,Ct=null,xt="s",Pt=[],Lt=!1,kt=newe(!1),It=newe(!1),At=newe(!1),Et=newe(!1),Mt=newe(TVSettings.getBool("chart.syncCrosshair",!0)),Dt=Mt.value();Mt.subscribe(function(t){t=!!t,Dt=t,TVSettings.setValue("chart.syncCrosshair",t)}),tt=newe(xt),et=t.resizerBridge.width,it=t.resizerBridge.height,ot=!1,nt=newe(ot),t=t||{},"padding"int&&(mt=t.padding),"edge"int&&(gt=t.edge),st=t.widgetOptions||{},st.readOnly&&(yt=!0),rt=t.metaInfo||{},at={id:newe(rt.id),name:newe(rt.name),description:newe(rt.description),username:newe(rt.username),uid:newe(rt.uid)},lt=$(t.resizerBridge.body.value()).eq(0),ht=$.Deferred(),ct=newo,et.subscribe(f),it.subscribe(f),this.updateLayout=f,dt=newe,pt=newe,dt.subscribe(function(t){vare,i,o=vt.value();o&&(e=o.model())&&(i=e.mainSeries().properties().style,i.value()!==t&&e.setChartStyleProperty(i,t,"Change Series Style"))}),ut=null,vt.subscribe(function(t){vare,i;if(t){for(i=bt.length;i--;)if(bt[i].chartWidget===t){e=i;break}if(!isFinite(e))throwError("Cannot make detached ChartWidget active");if(Tt!==e){for(Tt=e,S(),wt.length&&(St=wt.indexOf(bt[Tt])),i=bt.length;i--;)bt[i].chartWidget.setActive(!1);t.setActive(!0)}x(t)}},{callWithLast:!0}),Object.assign(this,{createChartWidget:y,getAll:function(){returnbt.map(function(t){returnt.chartWidget})},destroy:z,layout:tt,maximizeCurrentChart:nt,activeChartWidget:vt,activeChartStyle:dt,selectedSource:pt.readonly(),metaInfo:at,state:i,asyncState:n,readOnly:function(){returnyt},lock:{symbol:kt,setSymbolLockWithUndo:I,interval:It,setIntervalLockWithUndo:A,crosshair:Mt,trackTime:At,setTrackTimeWithUndo:E},setSymbol:D,setResolution:V,updateLayout:f,setChartLayoutWithUndo:M,resizeWidgetsUI:g,images:B,tags:R,syncCrosshair:N,syncScroll:F,setSymbolAll:O,clearChartMetaInfo:U,onfeatures:t.onfeatures,takeScreenshot:j,loadContent:J,purgeUnusedWidgets:q,
varn=i(10),s=i(5),r=s.ColorBinding,a=s.SliderBinder,l=i(13).createLineWidthEditor;inherit(o,n),o.prototype.prepareLayout=function(){vart,e,i,o,n,s,h,c,d,p,u,_,f,m,g,v,y,b,w=$('<table class="property-page" cellspacing="0" cellpadding="2">'),S=$('<table class="property-page property-page-unpadded" cellspacing="0" cellpadding="0">').css({width:"100%"}),T=$('<table class="property-page" cellspacing="0" cellpadding="2">');this._table=w.add(S).add(T),t=this.createColorPicker(),e=l(),i=this.addLabeledRow(w,"Line"),$("<td>").append(t).appendTo(i),$("<td>").append(e).appendTo(i),o=$("<tr>").appendTo(S),n=$("<td>").appendTo(o).css({"vertical-align":"top",width:"50%"}),s=$("<td>").appendTo(o).css({"vertical-align":"top",width:"50%"}),h=$('<table class="property-page" cellspacing="0" cellpadding="0">').appendTo(n),c=$('<table class="property-page" cellspacing="0" cellpadding="0">').appendTo(s),d=this.addColorPickerRow(h,$.t("Source back color")),p=this.addColorPickerRow(h,$.t("Source text color")),u=this.addColorPickerRow(h,$.t("Source border color")),_=this.addColorPickerRow(h,$.t("Success back color")),f=this.addColorPickerRow(h,$.t("Success text color")),m=this.addColorPickerRow(c,$.t("Target back color")),g=this.addColorPickerRow(c,$.t("Target text color")),v=this.addColorPickerRow(c,$.t("Target border color")),y=this.addColorPickerRow(c,$.t("Failure back color")),b=this.addColorPickerRow(c,$.t("Failure text color")),this.bindControl(newr(t,this._linetool.properties().linecolor,!0,this.model(),"Forecast Line Color")),this.bindControl(newa(e,this._linetool.properties().linewidth,!0,this.model(),"Forecast Line Width")),this.bindControl(newr(t,this._linetool.properties().linecolor,!0,this.model(),"Forecast Line Color")),this.bindControl(newa(e,this._linetool.properties().linewidth,!0,this.model(),"Forecast Line Width")),this.bindControl(newr(d,this._linetool.properties().sourceBackColor,!0,this.model(),"Forecast Source Background Color",this._linetool.properties().transparency)),this.bindControl(newr(u,this._linetool.properties().sourceStrokeColor,!0,this.model(),"Forecast Source Border Color")),this.bindControl(newr(p,this._linetool.properties().sourceTextColor,!0,this.model(),"Forecast Source Text Color")),this.bindControl(newr(m,this._linetool.properties().targetBackColor,!0,this.model(),"Forecast Target Background Color")),this.bindControl(newr(v,this._linetool.properties().targetStrokeColor,!0,this.model(),"Forecast Target Border Color")),this.bindControl(newr(g,this._linetool.properties().targetTextColor,!0,this.model(),"Forecast Target Text Color")),this.bindControl(newr(_,this._linetool.properties().successBackground,!0,this.model(),"Forecast Success Back Color")),this.bindControl(newr(f,this._linetool.properties().successTextColor,!0,this.model(),"Forecast Success Text Color")),this.bindControl(newr(y,this._linetool.properties().failureBackground,!0,this.model(),"Forecast Failure Back Color")),
this.bindControl(newr(b,this._linetool.properties().failureTextColor,!0,this.model(),"Forecast Failure Text Color")),this.loadData()},o.prototype.widget=function(){returnthis._table},t.exports=o},function(t,e,i){"use strict";functiono(t,e,i){n.call(this,t,e,i),this.prepareLayout()}varn=i(10),s=i(5),r=s.SimpleComboBinder,a=s.ColorBinding;inherit(o,n),o.prototype.prepareLayout=function(){vart,e,i,o,n;this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),t=this.createColorPicker(),e=this.createFontSizeEditor(),i=this.createColorPicker(),o=this.createColorPicker(),n=this.addLabeledRow(this._table,$.t("Text")),$("<td>").append(t).appendTo(n),$("<td>").append(e).appendTo(n),n=this.addLabeledRow(this._table,$.t("Background")),$("<td>").append(i).appendTo(n),n=this.addLabeledRow(this._table,$.t("Border")),$("<td>").append(o).appendTo(n),this.bindControl(newa(t,this._linetool.properties().color,!0,this.model(),"Change Price Text Color")),this.bindControl(newr(e,this._linetool.properties().fontsize,parseInt,!0,this.model(),"Change Price Text Font Size")),this.bindControl(newa(i,this._linetool.properties().backgroundColor,!0,this.model(),"Change Background Color",this._linetool.properties().transparency)),this.bindControl(newa(o,this._linetool.properties().borderColor,!0,this.model(),"Change Border Color")),this.loadData()},o.prototype.widget=function(){returnthis._table},t.exports=o},function(t,e,i){"use strict";functiono(t,e,i){n.call(this,t,e,i),this.prepareLayout()}varn=i(10),s=i(5),r=s.SliderBinder,a=s.ColorBinding,l=i(13).createLineWidthEditor;inherit(o,n),o.prototype.prepareLayout=function(){vart,e,i,o,n;this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),t=this.createColorPicker(),e=this.createColorPicker(),i=this.addLabeledRow(this._table,"Background"),$("<td>").append(t).appendTo(i),$("<td>").append(e).appendTo(i),o=l(),n=this.createColorPicker(),i=this.addLabeledRow(this._table,"Border"),$("<td>").append(n).appendTo(i),$("<td>").appendTo(i),$("<td>").append(o).appendTo(i),this.bindControl(newa(n,this._linetool.properties().trendline.color,!0,this.model(),"Change Projection Line Color")),this.bindControl(newa(t,this._linetool.properties().color1,!0,this.model(),"Change Projection Background Color",this._linetool.properties().transparency)),this.bindControl(newa(e,this._linetool.properties().color2,!0,this.model(),"Change Projection Background Color",this._linetool.properties().transparency)),this.bindControl(newr(o,this._linetool.properties().linewidth,!0,this.model(),"Change Projection Border Width")),this.loadData()},o.prototype.widget=function(){returnthis._table},t.exports=o},function(t,e,i){(function(e,o){"use strict";functionn(t){this._chartWidgetCollection=t,this._bindings=[],this._hasAlertWathcedValue=null,this._$templatesButton=null,this._currentProperties=null,this._toolbarWidgets=[],
t.classList.contains("i-dropped")||$(t).trigger("button-popup",[this._getZOrderActions()])}.bind(this),svgIcon:$(i(883))[0],addCaret:!0});returnE($(t),null,{direction:this._bindPopupMenuDirection.bind(this),event:"button-popup",reverse:!1,notCloseOnButtons:!0,activeClass:"i-dropped"}),t},n.prototype._createCloneButton=function(){vart,o=$.t("Clone");returne.enabled("datasource_copypaste")&&(o+=", "+$.t("Copy")),e.enabled("support_multicharts")&&(o+=", "+$.t("Sync")),t=this._createButton({title:o,callback:function(){t.classList.contains("i-dropped")||$(t).trigger("button-popup",[this._getCloneActions()])}.bind(this),svgIcon:$(i(882))[0],addCaret:!0}),E($(t),null,{direction:this._bindPopupMenuDirection.bind(this),event:"button-popup",reverse:!1,notCloseOnButtons:!0,activeClass:"i-dropped"}),t},n.prototype._createLockButton=function(){vart=this._createButton({title:$.t("Lock"),callback:function(){this.activeChartWidget().toggleLockSelectedObject()}.bind(this),svgIcon:$(i(377))[0]});returnthis._lockChangeListener=function(e){t.classList.toggle("i-active",!!e.value())},t},n.prototype._createHideButton=function(){returnthis._createButton({title:$.t("Hide"),callback:function(){this.activeChartWidget().hideSelectedObject()}.bind(this),svgIcon:$(i(884))[0]})},n.prototype._createRemoveButton=function(){returnthis._createButton({title:$.t("Remove"),callback:function(){this.activeChartWidget().removeSelectedSource()}.bind(this),svgIcon:$(i(898))[0]})},n.prototype._createSourceActions=function(){vart=[];returne.enabled("property_pages")&&t.push({button:this._createSettingsButton()}),t.push({button:this._createZOrderButton()},{button:this._createCloneButton(),isVisibleForSource:function(t){vare=TradingView.className(t.constructor);return!this.activeChartWidget().model().model().isSingleInstanceLineTool(e)}.bind(this)},{button:this._createLockButton()},{button:this._createHideButton()},{button:this._createRemoveButton()}),t},n.prototype._getCloneActions=function(){vart=this.activeChartWidget().model(),i=this.selectedSource(),o=[];returni.properties().clonable.value()&&o.push({title:$.t("Clone"),action:function(){t.cloneLineTool(i)}}),e.enabled("datasource_copypaste")?(o.push({title:$.t("Copy"),shortcut:"Ctrl-C",action:function(){t.copySourceToClip(i)}}),e.enabled("support_multicharts")?(i.linkKey?o.push({title:$.t("Stop syncing"),action:function(){t.unlinkLine(i)}}):o.push({title:$.t("Sync to all charts"),action:function(){t.copyToOtherCharts(i)}}),o):o):o},n.prototype._getZOrderActions=function(){vart=[],e=this.selectedSource(),i=this.activeChartWidget().model(),o={title:$.t("Bring to Front"),action:function(){i.bringToFront(e)}},n={title:$.t("Send to Back"),action:function(){i.sendToBack(e)}},s={title:$.t("Bring Forward"),action:function(){i.changeZOrder(e,1)}},r={title:$.t("Send Backward"),action:function(){i.changeZOrder(e,-1)}},a=i.paneForSource(this.selectedSource()),l=a.getZOrderMinMax();returne.zorder()===l.minZOrder&&(n.disabled=!0,r.disabled=!0),e.zorder()===l.maxZOrder&&(s.disabled=!0,o.disabled=!0),
o.prototype.Button.prototype._setTextAsIcon=function(t){this._main.text(t)},o.prototype.Button.prototype.setIcon=function(t){this.icon=t,this.textAsIcon?this._setTextAsIcon(t):this._setIcon(t)},o.prototype.Button.prototype._getPopupMenuItems=function(){functiont(t){returnt?$.t("Remove from favorites"):$.t("Add to favorites")}vare=this;return$.map(this.tools,function(o,n){vars,r;returno.separator?o:(s=function(){e._isToolGrayed(o)?d.emit("onGrayedObjectClicked",{type:"drawing",name:l[o.tool].localizedName}):(e.setCurrent(n),o.action.call(e,o),$(document).trigger("click"),$(document).trigger("touch"))},!e.textAsIcon&&o.favOptions.allowMakeFavorite&&(r=$('<span class="to-quick" title="'+t(o.favOptions.isFavorite)+'"></span>').append($(i(165)).attr({width:16,height:16})).toggleClass("quicked",!!o.favOptions.isFavorite)),{title:""+o.localizedName,action:s,shortcut:o.shortcut,active:n===e.current,svg:!e.textAsIcon&&$(l[o.icon].icon).attr({width:30,height:30}),addClass:o.addClass,buttons:e.textAsIcon||!o.favOptions.allowMakeFavorite?void0:[{el:r,handler:function(e){o.favOptions.isFavorite?(o.favOptions.removeFromFavorite(o),r.removeClass("quicked").attr("title",t(!1))):(o.favOptions.addToFavorite(o),r.addClass("quicked").attr("title",t(!0))),e.stopPropagation(),e.preventDefault()}}]})})},o.prototype.Button.prototype._defaultAction=function(){this.activate()},o.prototype.Button.prototype._startclick=function(){this._e.hasClass("active")?($(document).trigger("click"),this.action()):this._delay=setTimeout($.proxy(function(){this._delay=null,this.openSubmenu()},this),200)},o.prototype.Button.prototype._stopclick=function(){this._delay&&(clearTimeout(this._delay),this._delay=null,this.action())},o.prototype.Button.prototype._submenu=function(){if(this._e.hasClass("active"))returnvoid$(document).trigger("click");this.openSubmenu()},o.prototype.Button.prototype.activate=function(t){t=void0===t||!!t,this.activated=t,t?this._e.addClass("selected"):this._e.removeClass("selected"),this.textAsIcon||this._setIcon(this.icon)},o.prototype.Button.prototype.action=function(){vart=this.getCurrent();this._isToolGrayed(t)?d.emit("onGrayedObjectClicked",{type:"drawing",name:l[t.tool].localizedName}):t.action.call(this,t)},o.prototype.Button.prototype.openSubmenu=function(){this._e.trigger("button-popup",[this._getPopupMenuItems()])},o.prototype.Button.prototype.setCurrent=function(t){if(t>=0&&t<this.tools.length){vare=this.tools[t];this.setIcon(e.icon),this._isToolGrayed(e)?this._e.find(".main").addClass(" grayed"):this._e.find(".main").removeClass(" grayed"),this.isGroup&&!this.textAsIcon&&this._e.attr("title",e.localizedName),this.current=t}},o.prototype.Button.prototype.getCurrent=function(){returnthis.tools[this.current]},o.prototype.Button.prototype.setCurrentTool=function(t,e){vari,o=this;"LineToolIcon"===t?(i=String.fromCharCode(defaults("linetoolicon").icon),$.each(this.tools,function(t,e){if(e.icon===i)returno.setCurrent(t),o.activate(),!1})):$.each(this.tools,function(e,i){if(i.tool===t)returno.setCurrent(e),
i.__updateComboCurrency(d,u,"cash_per_contract",$.t(" per contract"))}))},o.prototype.prepareLayout=function(){this._$table=$(document.createElement("table")).addClass("property-page strategy-properties").attr("cellspacing","0").attr("cellpadding","2");vart=this._getStrategyInputs();t.initial_capital.min=1,this._setStdInput(t.initial_capital,$.t("Initial capital")),Array.isArray(t.currency.options)&&"NONE"===t.currency.options[0]&&(t.currency.options[0]=$('<option value="NONE">'+$.t("Default")+"</option>")),this._setStdInput(t.currency,$.t("Base currency")),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setPyramidingInputs(t),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setQtyInputs(t),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setStdInput(t.calc_on_order_fills,$.t("Recalculate After Order filled")),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setStdInput(t.calc_on_every_tick,$.t("Recalculate On Every Tick")),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setFillLimitsInputs(t),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setSlippageInputs(t),$('<tr class="spacer"><td colspan="3"></td></tr>').appendTo(this._$table),this._setCommissionInputs(t),this.loadData()},o.prototype.widget=function(){returnthis._$table},o.prototype.loadData=function(){vart,e,i;s.prototype.loadData.call(this),t=this._getStrategyInputs(),e=t.pyramiding,i=this._property.inputs[e.id],i.setValue(i.value(),!0)},o.prototype.destroy=function(){vart,e,i;s.prototype.destroy.call(this),t=this._getStrategyInputs(),e=t.pyramiding,i=this._property.inputs[e.id],i.unsubscribe(null,this._onAllowUpToChanged)},t.exports=o},function(t,e,i){(function(e){"use strict";functiono(t,e){d.invalidateStudyTemplatesList(),d.removeStudyTemplate(t,e)}functionn(t){this._options=t||{},this._chartWidgetCollection=this._options.chartWidgetCollection,this._SAVE_AS_TITLE=$.t("Save Indicator Template As..."),this._list=[],this._$wrapper=null,this._favoredList=null,this._loaded=!1,this._onFirstLoad=newe,this.onFavoriteListResize=newe,loginStateChange.subscribe(this,this.onLoginStateChange)}vars=i(367).FavoredList,r=i(139),a=r.SaveRenameDialog,l=r.CheckboxField,h=r.AutocompleteField,c=i(93).createConfirmDialog,d=i(116),p=i(33).trackEvent;n.prototype.onLoginStateChange=function(){d.invalidateStudyTemplatesList(),this.refreshFavoriteDropdownMenu()},n.prototype.appendMenuButtonTo=function(t){t&&(this._$wrapper=t,this._generateFavoriteList())},n.prototype.refreshStudyTemplateList=function(t){vare=this;d.getStudyTemplatesList(function(i){e._list=i||[],"function"==typeoft&&t()})},n.prototype._generateFavoriteList=function(){vart=this;this._favoredList=news("StudyTemplates",t._listPreparedForFavorite(),{addClass:"study-template-widget",popupAddClass:"study-template-popup",notShowActive:!0,svg:!1,popupSpacing:this._options.popupSpacing,
notShowQuicks:this._options.notShowQuicks,tooltip:$.t("Study Templates"),addTooltipClass:"apply-common-tooltip"}),t.refreshFavoriteDropdownMenu(),this._favoredList.element().appendTo(this._$wrapper),this._favoredList.onSelect().subscribe(t,function(t){t!==this._SAVE_AS_TITLE&&this.applyStudyTemplate(t)}),this._favoredList.onSelect().subscribe(t,function(t){t===this._SAVE_AS_TITLE&&this.showSaveAsDialog()}),this._favoredList.onResize().subscribe(t._chartWidgetCollection,t._chartWidgetCollection.updateLayout),this._favoredList.onResize().subscribe(this.onFavoriteListResize,this.onFavoriteListResize.fire),this._favoredList.onOpen().subscribe(t,function(){t.refreshFavoriteDropdownMenu()})},n.prototype._listPreparedForFavorite=function(t){vare,o,n,s,r;returnt=t||this._list,e=this,o=this.plainList("default"),n=this.plainList("custom"),s=[{id:e._SAVE_AS_TITLE,title:e._SAVE_AS_TITLE,addClass:"special",toQuickButtonStyle:{display:"none"}},{separator:!0}],r=function(t,o){return$.map(t,function(t){varn={id:t,title:$.t(t),svg:$(i(165)).attr({width:13,height:13}),favoriteButton:{icon:{},title:t,addClass:"apply-common-tooltip"}};returno&&(n.drop=function(){this.deleteStudyTemplate(t)}.bind(e)),n})},n.length&&(s=s.concat(r(n,!0)).concat([{separator:!0}])),s=s.concat(r(o))},n.prototype.applyStudyTemplate=function(t){functione(e){p("GUI","Load Study Template"),i.model().model().restoreStudyTemplate(JSON.parse(e.content),t),i.updateSeriesControlUI()}vari=this._chartWidgetCollection.activeChartWidget.value();TVSettings.setValue("defaultStudyTemplate",t),d.getStudyTemplateContent(t,e)},n.prototype.showSaveAsDialog=function(){vart=this,e=this._chartWidgetCollection.activeChartWidget.value(),i=function(i,o){varn,s,r,a,l,h;i=TradingView.clean(i),n=JSON.stringify(e.model().model().studyTemplate(o)),s={name:i,content:n},r=t.plainList().includes(i),a=function(){vare=function(e){e.error||(TVSettings.setValue("defaultStudyTemplate",i),d.invalidateStudyTemplatesList(),t.refreshFavoriteDropdownMenu())};d.saveStudyTemplate(s,e)},r?(l=$.t("Study Template '{0}' already exists. Do you really want to replace it?").format(i),h=c({type:"modal",content:l}),h.on("action:yes",function(t){a(),t.close()}),h.open()):a()};runOrSignIn(function(){varo="text",n="bool";t.refreshStudyTemplateList(function(){newa({fields:[newh({name:o,label:$.t("Template name")+":",error:$.t("Please enter template name"),source:t.list(),valueField:"name",textField:"name",maxLength:64}),newl({name:n,label:$.t("Save Interval"),hint:$.t('When selecting this checkbox the study template will set "__interval__" interval on a chart',{interval:e.model().model().mainSeries().interval()})})],title:$.t("Save Indicator Template As")}).show().then(function(t){i(t[o],t[n])})})},{source:"Study templates save as",sourceMeta:"Chart"})},n.prototype.refreshFavoriteDropdownMenu=function(){vart=this,e=this._favoredList;e&&t.refreshStudyTemplateList(function(){e.reload(t._listPreparedForFavorite()),e.element().hasClass("active")&&(e.element().trigger("click"),e.openMenu())})},
n.prototype.deleteStudyTemplate=function(t){vare=this,i=$.t("Do you really want to delete Study Template '{0}' ?").format(t);runOrSignIn(function(){varn=c({type:"modal",content:i});n.on("action:yes",function(i){e._favoredList.removeById(t),i.actionLoader("yes","start"),o(t,function(){setTimeout(function(){e.refreshFavoriteDropdownMenu(),i.actionLoader("yes","stop"),i.close()},0)})}),n.open()},{source:"Study templates delete"})},n.prototype.container=function(){returnthis._favoredList?this._favoredList.element():null},n.prototype.list=function(){returnthis._list},n.prototype.plainList=function(t){return"default"===t?$.map(jQuery.grep(this._list,function(t){return!!t.is_default}),function(t){returnt.name}):"custom"===t?$.map(jQuery.grep(this._list,function(t){return!t.is_default}),function(t){returnt.name}):$.map(this._list,function(t){returnt.name})},t.exports=n}).call(e,i(15))},function(t,e,i){(function(e,o,n){"use strict";functions(t,i){functiono(t,o,s){varr,a,l,h,c,d,p,u,_,f,m,g=[];if(s.openEveryDay)g=[0,1,2,3,4,5,6];elseif(s.openOnDays)for(r=s.openOnDays,a=0;a<r.length;a++)g.push(parseInt(r[a])-1);elseg=[1,2,3,4,5];for(l=function(t){return60*parseInt(t[0],10)+parseInt(t[1],10)},h=l(t),c=l(o),d=h&&h>=c,d&&0!==g[0]&&g.unshift(0),p="",u=[],_=g[0]-1,f=g.length,a=0;a<f;a++)_+1<g[a]||a+1===f?(p+=n+e.weekdaysMin(g[a]),u.push(p),p=""):p||(p=e.weekdaysMin(g[a])),_=g[a];returnm="{0}:{1}{2}{3}:{4}".format(t[0],t[1],n,o[0],o[1]),u.map(function(t){returnt+i+m})}varn,s,r,a,l;returni=i||"",n="-",t?"24x7"===t?o(["00","00"],["00","00"],{openEveryDay:!0}):(s=/([0-2]\d)([0-5]\d)-([0-2]\d)([0-5]\d)(?:\:(\d+))?/,(r=s.exec(t))?(a=[r[1],r[2]],l=[r[3],r[4]],o(a,l,{openOnDays:r[5]})):{}):{}}functionr(t,e){vari,r,d,p,u,_,f,m,g,v,y,b,w,S,T;if(null==t&&(t=a.symbol.value()),null!=t)returnt+="",i=e&&e.symbolInfo,r=$.t("Symbol Info"),d=TVDialogs.createDialog(r,{width:450}),p=d.find("._tv-dialog-content"),u=$(document.createElement("div")).addClass("main").addClass("symbol-info-dialog").appendTo(p),_=function(t){vare,i=l;for(e=0;e<i.length;e++)if(i[e].id===t)returni[e].title;returnt},f=function(t){returns(t).join("<br/>")},m=[{title:$.t("Symbol Name"),propName:o.enabled("charting_library_base")?"name":"pro_name"},{title:$.t("Symbol Description"),propName:"description"},{title:$.t("Symbol Type"),propName:"type"},{title:$.t("Point Value"),propName:"pointvalue"},{title:$.t("Exchange"),propName:"exchange"},{title:$.t("Listed Exchange"),propName:"listed_exchange"},{title:$.t("Currency"),propName:"currency_code",formatter:function(t){returnt||"USD"},defValue:"USD"},{title:$.t("Price Scale"),propName:"pricescale"},{title:$.t("Min Move"),propName:"minmov"},{title:$.t("Min Move 2"),propName:"minmove2"},{title:$.t("Sector"),propName:"sector"},{title:$.t("Industry"),propName:"industry"},{title:$.t("Timezone"),propName:"timezone",formatter:_,optional:!0},{title:$.t("Session"),propName:"session",formatter:f,optional:!0,setHtml:!0}],
o.prototype.mouseDownEvent=function(t){if(this._mousedown||!e.enabled("chart_zoom"))return!0;this._mousedown=!0;vari=this.chart.model();i.timeScale().isEmpty()||(this.setCursor("ew-resize"),i.startScaleTime(t.localX))},o.prototype.mouseDownOutsideEvent=function(t){vare=this.chart.model();!e.timeScale().isEmpty()&&this._mousedown&&(this._mousedown=!1,e.endScaleTime(),this.restoreDefaultCursor())},o.prototype.pressedMouseMoveEvent=function(t){vare,i,o=this.chart.model();o.timeScale().isEmpty()||(e=!1,i=(newDate).valueOf(),this._lastScrollScaleTime&&i-this._lastScrollScaleTime<100&&(e=!0),e||(o.scaleTimeTo(t.localX),this._lastScrollScaleTime=i))},o.prototype.mouseUpEvent=function(t){this._mousedown=!1;vare=this.chart.model();e.timeScale().isEmpty()||(e.endScaleTime(),this.restoreDefaultCursor())},o.prototype.contextMenuEvent=function(t,i){!this._disableContextMenu&&e.enabled("scales_context_menu")&&this._createContextMenu().show(t)},o.prototype._createContextMenu=function(){returnh.createMenu(this.getContextMenuActions())},o.prototype.getContextMenuActions=function(){vart,i,o=this.chart;returno.model().mainSeries().createSessStudy(),o.updateActions(),t=o.actions(),i=e.enabled("charting_library_base")?[t.timeScaleReset,newl,t.applyTimeZone]:[t.timeScaleReset,newl,t.applyTimeZone,t.sessionBreaks,t.extendedHours],e.enabled("timezone_menu")||i.splice(2,1),e.enabled("show_chart_property_page")&&e.enabled("chart_property_page_timezone_sessions")&&t.tmzProperties&&i.push(newl,t.tmzProperties),i},o.prototype.mouseClickEvent=function(t){},o.prototype.mouseDoubleClickEvent=function(t){g("GUI","Double click time scale"),this.chart.model().resetTimeScale()},o.prototype.optimalHeight=function(){vart=this.rendererOptions();returnMath.ceil(t.offsetSize+t.borderSize+t.tickLength+t.fontSize+t.paddingTop+t.paddingBottom)},o.prototype.setSize=function(t,e,i){this.size&&this.size.equals(t)||(this.lhsStubSize=e,p(this.lhsCanvas,e),this.jqLhsTimeAxisStub.width(e.w),this.jqLhsTimeAxisStub.height(e.h),this.rhsStubSize=i,p(this.rhsCanvas,i),this.jqRhsTimeAxisStub.width(i.w),this.jqRhsTimeAxisStub.height(i.h),this.size=t,p(this.canvas,t),p(this.top_canvas,t),this.lhsCanvas.getContext("2d"),this.rhsCanvas.getContext("2d"),this.canvas.getContext("2d"),this.top_canvas.getContext("2d"),this.jqCell.width(t.w),this.jqCell.height(t.h))},o.prototype._spanIndex=function(t){for(vare=[y.MINUTE_SPAN,y.HOUR_SPAN,y.DAY_SPAN,y.MONTH_SPAN,y.YEAR_SPAN],i=e.length-1;i>0;){if(e[i]<=t)returni;i--}returni},o.prototype._spanOffset=function(t,e){if(e<t)throwError("actual span cuold not be less then base");returnthis._spanIndex(e)-this._spanIndex(t)},o.prototype.update=function(){vart,e;this.chart.model()&&(t=this.chart.model().timeScale().marks())&&(e=this,this._minVisibleSpan=y.YEAR_SPAN,$.each(t,function(){e._minVisibleSpan=Math.min(this.span,e._minVisibleSpan)}))},o.prototype._hightlightBackground=function(t,e){vari,o,n,s,r=this.chart.model(),a=r.timeScale(),l=e[0].index,h=e[0].index;for(i=1;i<e.length;i++)l=Math.min(l,e[i].index),
vara=i(36),l=a.parseRgb,h=a.rgbToBlackWhiteString,c=i(2),d=i(199),p=i(1).LineDataSource,u=i(678),_=i(209),f=i(710),m=i(686),g=i(695),v=i(707),y=i(210),b=i(709),w=i(102).BarsMarksContainer,S=i(533).Branding,T=i(708),C=i(21),x=i(31),P=x.Study,L=x.createStudy,k=x.prepareStudyProperties,I=i(80),A=i(157),E=i(78).StudyLineDataSource,M=i(81).ScaleType,D=i(42),O=i(41),V=i(7).DefaultProperty,B=i(356).SyncPoint,R=i(33).trackEvent,N=i(60),F=i(12).getLogger("Chart.ChartModel");r.prototype.setStudiesMetaData=function(t,e){this._studiesMetaData=t,this._studyVersioning=newI(this._studiesMetaData,e)},r.prototype.isSnapshot=function(){returnthis._isSnapshot},r.prototype.currentTool=function(){returnthis._currentTool},r.prototype.setCurrentTool=function(t){this._currentTool=t},r.prototype.timezone=function(){returnthis._properties.timezone.value()},r.prototype.version=function(){returnthis._version},r.prototype.initConnection=function(){this._chartApi.switchTimezone(this.timezone())},r.prototype.dumpViews=function(){vart,e,i,o,n={};for(n.panes=[],t=0;t<this.m_panes.length;t++)n.panes.push(this.m_panes[t].dumpViews());for(n.dataWindow=[],e=this.dataSources(),t=0;t<e.length;t++)i=e[t],(o=i.dataWindowView())&&n.dataWindow.push(o.dump());returnn},r.prototype._paneInvalidationMask=function(t,e){vari=newC,o=this.m_panes.indexOf(t);returnvoid0===e&&(e=C.LIGHT_UPDATE),i.invalidatePane(o,e),i},r.prototype.updatePane=function(t){vare=this._paneInvalidationMask(t);this.invalidate(e)},r.prototype.fullUpdate=function(){this.invalidate(newC(C.FULL_UPDATE))},r.prototype.updateSource=function(t){vare=this.paneForSource(t),i=this._paneInvalidationMask(e);this.invalidate(i)},r.prototype.studiesMetaData=function(){returnthis._studiesMetaData},r.prototype.studyVersioning=function(){returnthis._studyVersioning},r.prototype.disconnect=function(){vart,e,i=this.dataSources();for(e=0;e<i.length;e++)t=i[e],t.disconnect&&t.disconnect()},r.prototype.restart=function(){vart,e,i;for(this.initConnection(),this.m_timeScale.reset(),this.m_mainSeries.restart(),t=this.dataSources(),e=0;e<t.length;e++)i=t[e],i.restart&&i!==this.m_mainSeries&&i.restart()},r.prototype.startNotStartedStudies=function(){vart,e;if(!this.m_mainSeries.isStarted())throwError("Cannot start studies: main series is not started");for(t=this.dataSources(),e=0;e<t.length;e++)t[e]instanceofP&&!t[e].isStarted()&&t[e].restart&&t[e]!==this.m_mainSeries&&t[e].restart()},r.prototype.updateLineTools=function(){vart,e,i=this.dataSources();for(t=0;t<i.length;t++)TradingView.isInherited(i[t].constructor,p)&&(e=i[t],e.tryCreateServerPoints(),e.checkAlert&&e.checkAlert())},r.prototype.realignLineTools=function(){vart,e,i=this.dataSources();for(t=0;t<i.length;t++)TradingView.isInherited(i[t].constructor,p)&&(e=i[t],e.calcIsActualSymbol());for(t=0;t<this.m_panes.length;t++)this.m_panes[t].invalidateSourcesCache()},r.prototype.readOnly=function(){returnthis._readOnly},r.prototype.properties=function(){returnthis._properties},r.prototype.lineCancelled=function(){returnthis._lineCancelled},
vara=i(37),l=a.parseRgb,h=a.rgbToBlackWhiteString,c=i(2),d=i(199),p=i(1).LineDataSource,u=i(678),_=i(209),f=i(710),m=i(686),g=i(695),v=i(707),y=i(210),b=i(709),w=i(102).BarsMarksContainer,S=i(533).Branding,T=i(708),C=i(21),x=i(31),P=x.Study,L=x.createStudy,k=x.prepareStudyProperties,I=i(80),A=i(157),E=i(78).StudyLineDataSource,M=i(81).ScaleType,D=i(43),O=i(42),V=i(7).DefaultProperty,B=i(356).SyncPoint,R=i(33).trackEvent,N=i(60),F=i(12).getLogger("Chart.ChartModel");r.prototype.setStudiesMetaData=function(t,e){this._studiesMetaData=t,this._studyVersioning=newI(this._studiesMetaData,e)},r.prototype.isSnapshot=function(){returnthis._isSnapshot},r.prototype.currentTool=function(){returnthis._currentTool},r.prototype.setCurrentTool=function(t){this._currentTool=t},r.prototype.timezone=function(){returnthis._properties.timezone.value()},r.prototype.version=function(){returnthis._version},r.prototype.initConnection=function(){this._chartApi.switchTimezone(this.timezone())},r.prototype.dumpViews=function(){vart,e,i,o,n={};for(n.panes=[],t=0;t<this.m_panes.length;t++)n.panes.push(this.m_panes[t].dumpViews());for(n.dataWindow=[],e=this.dataSources(),t=0;t<e.length;t++)i=e[t],(o=i.dataWindowView())&&n.dataWindow.push(o.dump());returnn},r.prototype._paneInvalidationMask=function(t,e){vari=newC,o=this.m_panes.indexOf(t);returnvoid0===e&&(e=C.LIGHT_UPDATE),i.invalidatePane(o,e),i},r.prototype.updatePane=function(t){vare=this._paneInvalidationMask(t);this.invalidate(e)},r.prototype.fullUpdate=function(){this.invalidate(newC(C.FULL_UPDATE))},r.prototype.updateSource=function(t){vare=this.paneForSource(t),i=this._paneInvalidationMask(e);this.invalidate(i)},r.prototype.studiesMetaData=function(){returnthis._studiesMetaData},r.prototype.studyVersioning=function(){returnthis._studyVersioning},r.prototype.disconnect=function(){vart,e,i=this.dataSources();for(e=0;e<i.length;e++)t=i[e],t.disconnect&&t.disconnect()},r.prototype.restart=function(){vart,e,i;for(this.initConnection(),this.m_timeScale.reset(),this.m_mainSeries.restart(),t=this.dataSources(),e=0;e<t.length;e++)i=t[e],i.restart&&i!==this.m_mainSeries&&i.restart()},r.prototype.startNotStartedStudies=function(){vart,e;if(!this.m_mainSeries.isStarted())throwError("Cannot start studies: main series is not started");for(t=this.dataSources(),e=0;e<t.length;e++)t[e]instanceofP&&!t[e].isStarted()&&t[e].restart&&t[e]!==this.m_mainSeries&&t[e].restart()},r.prototype.updateLineTools=function(){vart,e,i=this.dataSources();for(t=0;t<i.length;t++)TradingView.isInherited(i[t].constructor,p)&&(e=i[t],e.tryCreateServerPoints(),e.checkAlert&&e.checkAlert())},r.prototype.realignLineTools=function(){vart,e,i=this.dataSources();for(t=0;t<i.length;t++)TradingView.isInherited(i[t].constructor,p)&&(e=i[t],e.calcIsActualSymbol());for(t=0;t<this.m_panes.length;t++)this.m_panes[t].invalidateSourcesCache()},r.prototype.readOnly=function(){returnthis._readOnly},r.prototype.properties=function(){returnthis._properties},r.prototype.lineCancelled=function(){returnthis._lineCancelled},
this._property=t,this._priceScale=i,this._newValue=e,this._model=n}functionr(t,e,i,o,n){st.call(this,o),this._percentage=t,this._priceScale=i,this._newValue=e,this._model=n}functiona(t,e,i,o,n){st.call(this,o),this._log=t,this._priceScale=i,this._newValue=e,this._model=n}functionl(t,e,i,o,n,s){st.call(this,o),this._style=t,this._mainSeries=i,this._priceAxisProperties=i.properties().priceAxisProperties,this._newValue=e,this._model=n,this._chartWidget=s}functionh(t,e,i,o,n){st.call(this,o),this._property=t,this._mainSeries=i,this._priceAxisProperties=i.properties().priceAxisProperties,this._newValue=e,this._model=n}functionc(t,e,i,o){st.call(this,"scale price",!1),this.m_model=t,this.m_pane=e,this.m_priceScale=i,this.m_state=o,this.m_newPriceScaleState=null}functiond(t,e,i){st.call(this,i,!1),this.setCustomFlag("doesnt_affect_save",!0),this.m_model=t,this.m_state=e,this.m_newTimeScaleState=null}functionp(t,e,i,o){this._model=t,this._series=e,this._oldSymbol=e.symbol(),this._oldInterval=e.interval(),this._symbol=i,this._interval=o}functionu(t,e,i,o,n){st.call(this,"Insert "+e.id),this._model=t,this._studyMetaInfo=e,this._props=i,this._isOverlay=o,this._parentSource=n}function_(t,e){st.call(this,"Remove Source"),this._model=t,this._sourceId=e.id()}functionf(t,e){st.call(this,"Remove Drawing(s)"),this._model=t,this._linetools=e,this._statesByPaneIndexes={}}functionm(t,e,i,o){this._model=t,this._oldPane=this._model.paneForSource(e),st.call(this,this._oldPane===i?"Change Price Scale":"Move Source"),this._sourceId=e.id(),this._oldPaneIndex=t.panes().indexOf(this._oldPane),this._oldScaleName=this._oldPane.priceScaleName(e.priceScale()),this._pane=i,this._paneIndex=t.panes().indexOf(i),this._pane?this._scaleName=this._pane.priceScaleName(o):this._paneIndex=t.panes().length}functiong(t,e,i){st.call(this,"Create line "+i,!1),this._model=t,this._paneIndex=t.panes().indexOf(e),this._lineTool=i}functionv(t,e,i,o){st.call(this,"Change Drawing",!1),this._model=t,this._prevState=e.state(!0),this._nextState=this._prevState}functiony(t,e,i,o){st.call(this,"Move Drawing",!1),this._model=t,this._sourceId=e.id(),iinstanceofN.Point?this._origPoint=i.clone():this._origPoint=TradingView.clone(i),this._pointIndex=o}functionb(t,e,i){st.call(this,"Change %1 Z order (%2)".format(e.title(),i>0?"Forward":"Backward")),this._model=t,this._sourceId=e.id(),this._shift=i}functionw(t,e){st.call(this,"Send "+e.title()+" to back"),this._model=t,this._sourceId=e.id()}functionS(t,e){st.call(this,"Bring "+e.title()+" to front"),this._model=t,this._sourceId=e.id()}functionT(t,e,i){st.call(this,"Remove pane"),this._model=t,this._index=e,this._pane=this._model.panes()[e],this._chart=i}functionC(t,e,i,o){st.call(this,"Rearrange panes"),this._model=t,this._index=e,this._direction=i,this._chart=o}functionx(t,e,i,o,n,s){st.call(this,"Zoom"),this._model=t,this._startBar=e,this._endBar=i,this._startPrice=o,this._endPrice=n,this._pane=s}functionP(t,e,i){st.call(this,"Zoom"),this._baseCmd=t,this._zoomStack=e,this._inOut=i}functionL(t,e,i,o,n){
s&&(this.pushUndoCommand(this._createLineCommand),deletethis._createLineCommand),r):voidit().open()},o.prototype.lineBeingCreated=function(){returnthis.m_model.lineBeingCreated()},o.prototype.paneBeingCreatedLineOn=function(){returnthis.m_model.paneBeingCreatedLineOn()},o.prototype.coninueCreatingLine=function(t,e,i){varo=this._createLineCommand.continueCreatingLine(t,e,i);returno&&(this.pushUndoCommand(this._createLineCommand),deletethis._createLineCommand),o},o.prototype.finishLineTool=function(t){this.m_model.finishLineTool(t)},o.prototype.cancelCreatingLine=function(){this.m_model.cancelCreatingLine()},o.prototype.lineCancelled=function(){returnthis.m_model.lineCancelled()},o.prototype.startChangingLinetool=function(t,e,i,o){this._currentLineChangeCommand=newv(this.m_model,t,i,o),this.m_model.startChangingLinetool(t,e,i,o)},o.prototype.lineBeingEdited=function(){returnthis.m_model.lineBeingEdited()},o.prototype.changeLinePoint=function(t,e){this._currentLineChangeCommand.setPoint(t,e),this.m_model.changeLinePoint(t,e)},o.prototype.endChangingLinetool=function(t){this.m_model.endChangingLinetool(t),this._currentLineChangeCommand.endChanging(),this.pushUndoCommand(this._currentLineChangeCommand),this._currentLineChangeCommand=null},o.prototype.startMovingSource=function(t,e,i){this._currentLineMoveCommand=newy(this.m_model,t,e,i),this.m_model.startMovingSource(t,e,i)},o.prototype.sourceBeingMoved=function(){returnthis.m_model.sourceBeingMoved()},o.prototype.moveSource=function(t){this._currentLineMoveCommand.setPoint(t),this.m_model.moveSource(t)},o.prototype.endMovingSource=function(t){this.m_model.endMovingSource(t),this._currentLineMoveCommand._point&&(this.pushUndoCommand(this._currentLineMoveCommand),this._currentLineChangeCommand=null)},o.prototype.dataSources=function(){returnthis.m_model.dataSources()},o.prototype.dataSourceForId=function(t){returnthis.m_model.dataSourceForId(t)},o.prototype.state=function(t,e){returnthis.m_model.state(t,e)},o.prototype.asyncState=function(t){returnthis.m_model.asyncState(t)},o.prototype.restoreState=function(t,e){returnthis.m_model.restoreState(t,e)},o.prototype.calculateDefaultTags=function(){returnthis.m_model.calculateDefaultTags()},o.prototype.onTagsChanged=function(){returnthis.m_model.onTagsChanged()},o.prototype.changeZOrder=function(t,e){vari=newb(this.m_model,t,e);this.pushUndoCommand(i),this.emitEvent("changeZOrder",[t,e])},o.prototype.sendToBack=function(t){vare=neww(this.m_model,t);this.pushUndoCommand(e),this.emitEvent("changeZOrder",[t])},o.prototype.bringToFront=function(t){vare=newS(this.m_model,t);this.pushUndoCommand(e),this.emitEvent("changeZOrder",[t])},o.prototype.removeAllStudies=function(){vart,e,i;for(this.beginUndoMacro("remove all studies"),t=this.m_model.dataSources(),e=0;e<t.length;e++)i=t[e],(TradingView.isInherited(i.constructor,Q)&&!i.isChildStudy()&&i.removeByRemoveAllStudies()||TradingView.isInherited(i.constructor,tt))&&this.removeSource(i);this.endUndoMacro()},o.prototype.removeAllDrawingTools=function(t){
this._model.model().mainSeries().onChartStyleChanged()},E.prototype.redo=function(){vart,e,i;this._merge(this._newProps),t=this._model.model(),t.mainSeries().onChartStyleChanged(),e=this._model.model().mainSeries().properties(),i=this._model.model().mainSeries().properties().priceAxisProperties,this._model._preparePriceAxisProperties(e,i),t._recalcVisibleRangeStudy(t.dataSources(),!0)},inherit(M,st),M.prototype.redo=function(){this._cw.screen.show().done(function(){this._property.setValue(this._value,this._forceSetProperty)}.bind(this))},M.prototype.undo=function(){this._cw.screen.show().done(function(){this._property.setValue(this._prevValue,this._forceSetProperty)}.bind(this))},inherit(O,st),O.prototype.redo=function(){vart,e,i,o,n,s,r,a,l,h,c;if(this._lineState)s=this._model.restoreSource(!1,this._paneIndex,null,this._lineState,null);else{for(t=this._originalSource,e=t.priceScale(),i=this._model.paneForSource(t),o=TradingView.className(t.constructor),n=t.properties().clone(),s=F.create(o,this._model,n,null,t.ownerSource()),s.setOwnerSource(t.ownerSource()),s.properties().visible._value=!0,s._fixedPoints=s._fixedPoints.concat(t._fixedPoints),r=0;r<s._fixedPoints.length;r++)s._fixedPoints[r]=s._fixedPoints[r].add(newN.Point(20,20));a=t._timePoint,l=this._withoutShift?TradingView.clone(a):D(a,t.ownerSource()),h=t._points,c=h,s.restorePoints(l,c),s.cloneData&&s.cloneData(t),i.addDataSource(s,e),this._model.updateSource(s),s.checkAlert&&s.checkAlert(),this._paneIndex=this._model.panes().indexOf(i),U.drawOnAllCharts().value()&&this._model.copyToOtherCharts(s),this._lineState=s.state()}},O.prototype.undo=function(){this._lineState||rt.logError("This command was never executed - nothing to undo");vart=this._model.dataSourceForId(this._lineState.id);this._model.removeSource(t)},O.prototype.clonedLineToolId=function(){returnthis._lineState.id},inherit(V,st),V.prototype.redo=function(){deletethis._model.dataSourceForId(this._sourceId).linkKey},V.prototype.undo=function(){this._model.dataSourceForId(this._sourceId).linkKey=this._linkKey},inherit(B,st),B.prototype.redo=function(){vart,e,i,o,n,s,r,a,l,h=this._model.panes()[this._paneIndex],c=h.dataSourceForId(this._clipboardData.source.ownerSource)||h.mainDataSource();this._sourceState||(t=!0,e=this._clipboardData.source.state.symbol,i=h.mainDataSource(),o=i.symbol?i.symbol():"",n=e===o,n&&(cinstanceofZ&&(t=!1),cinstanceofQ&&(t=!c.metaInfo().is_price_study)),s=TradingView.clone(this._clipboardData.source),deletes.state.symbol,t?(r=this._model,a=function(t){vare=t.x*r.timeScale().width(),i=t.y*c.priceScale().height();returnnewN.Point(e,i)},s.points=this._clipboardData.geometry.map(function(t){vare,i=a(t),o=r.timeScale().coordinateToIndex(i.x),n=r.timeScale().normalizeBarIndex(o);returnn.price=c.priceScale().coordinateToPrice(i.y),c.priceScale().isPercent()&&(e=c.firstValue(),n.price=c.priceScale().priceRange().convertFromPercent(n.price,e)),n
})):this._model._id===this._clipboardData.modelId&&c.id()===this._clipboardData.source.ownerSource&&(s.points=D(this._clipboardData.source.points,c)),s.id=et.guid(),this._sourceState=s),l=h._restoreLineTool(this._sourceState,null,!1),l.calcIsActualSymbol(),l.setOwnerSource(c),l.setPriceScale(c.priceScale()),c.priceScale().addDataSource(l),l.createServerPoints(),this._model.invalidate(newj(j.LIGHT_UPDATE,!0))},B.prototype.undo=function(){vart,e;this._sourceState||rt.logError("This command was never executed - nothing to undo"),t=this._model.panes()[this._paneIndex],e=t.dataSourceForId(this._sourceState.id),this._model.removeSource(e)},inherit(R,st),R.prototype.redo=function(){vart,e,i,o;this._sourceState||(t=TradingView.clone(this._clipboardData.source),t.id=et.guid(),this._sourceState=t),e=null,i=null,this._sourceState.metaInfo.is_price_study?(e=this._model.paneForSource(this._model.mainSeries()),i=this._model.mainSeries().priceScale()):(e=this._model.createPane(),i=e.defaultPriceScale()),o=e._restoreStudy(this._sourceState),o.start(),o.setPriceScale(i),e.move(o,i)},R.prototype.undo=function(){this._sourceState||rt.logError("This command was never executed - nothing to undo");vart=this._model.dataSourceForId(this._sourceState.id);this._model.removeSource(t)},e.ChartUndoModel=o}).call(e,i(15))},function(t,e,i){(function(e){"use strict";functioni(t){e.call(this,""),this.subscribe(this,i.prototype.checkSelfColor),this.reloadProperties(t)}inherit(i,e),i.prototype.reloadProperties=function(t){for(;this._childs.length>0;)this.removeProperty(this._childs[0]);this._initValues=[];for(vare=0;e<t.length;++e)this._initValues.push(t[e].defaultValue),this.addChild(e,t[e].property);this.checkSelfColor()},i.prototype.setValue=function(t,i){if(this._value!==t||i){varo=this;this._childs.forEach(function(e){o[e].setValue(t||o._initValues[e])}),e.prototype.setValue.call(this,t,i)}},i.prototype.checkSelfColor=function(){vart,i=!0;for(t=0;t<this._initValues.length;++t)if(this[t].value()!==this[0].value()){i=!1;break}e.prototype.setValue.call(this,i?this[0].value():"")},t.exports=i}).call(e,i(24))},function(t,e,i){(function(e){"use strict";functiono(t,i){varo=this;f.call(this),this._properties=i,this._model=t,this._dataWindowView=newc(this,t),this._priceAxisView=newh(this,t),this._startMeasurePriceAxisView=newh(this,t,"measureStartY"),this._endMeasurePriceAxisView=newh(this,t,"measureEndY"),this._timeAxisView=newd(this,t),this._startMeasureTimeAxisView=newd(this,t,"measureStartX"),this._endMeasureTimeAxisView=newd(this,t,"measureEndX"),this.visible=!0,t.readOnly()?this.areLinesVisible=!0:m.cursorTool.subscribe(function(t){o.areLinesVisible="arrow"!==t},{callWithLast:!0}),this._movedDelegate=newe,this._subscribed=!1,this._model.readOnly()&&(this.visibleTrap=!0)}functionn(t,e){this._source=t,this._pane=e,this._rendererCache={}}functions(t,e,i){this.source=t,this.pane=e,this._horzVisible=i}functionr(t,e,i){this.source=t,this.pane=e,this._axis=i||"x"}
null===this.m_scrollStartPoint&&null===this.m_stateSnapshot&&(this.isEmpty()||(this.m_scrollStartPoint=t,this.m_stateSnapshot=this.state()))},s.prototype.scrollTo=function(t){if(this._visibleBarsCache=null,deletethis.m_restoredLastTimePoint,null!==this.m_scrollStartPoint){vare=(this.m_scrollStartPoint-t)/this.barSpacing();this.m_rightOffset=this.m_stateSnapshot.m_rightOffset+e,this._correctOffset(),this._model.mainSeries().priceScale().properties().percentage.value()&&this.recalcLockedScale(),this._onScroll.fire()}},s.prototype.scrollToOffsetAnimated=function(t,e){vari,o,n,s;if(!isFinite(t))thrownewRangeError("offset is required and must be finite number");if(void0===e&&(e=400),!isFinite(e)||e<=0)thrownewRangeError("animationDuration (optional) must be finite positive number");i=this,o=this.m_rightOffset,n=+newDate,s=this._model,functionr(){i._visibleBarsCache=null;vara=(newDate-n)/e;if(a>=1)returni.m_rightOffset=t,i._visibleBarsCache=null,s.recalculateAllPanes(),voids.invalidate(newc(c.LIGHT_UPDATE));i.m_rightOffset=o+(t-o)*a,s.recalculateAllPanes(),setTimeout(r,20)}()},s.prototype.endScroll=function(){null!==this.m_scrollStartPoint&&(this.m_scrollStartPoint=null,this.m_stateSnapshot=null)},s.prototype._currentSavedPosition=function(){vart,e,i;this.isEmpty()||(t=this.m_points.indexOf(this.m_restoredLastTimePoint,!0),TradingView.isInteger(t)&&(e=this.m_points.lastTimePointIndex(),i=e-t,this.m_rightOffset-=i),deletethis.m_restoredLastTimePoint)},s.prototype.update=function(t,e,i,o){this._visibleBarsCache=null,this.m_tickmarks.merge(o),this.m_points.merge(t,e,i),this.m_restoredLastTimePoint&&this._currentSavedPosition()},s.prototype.addTail=function(t,e,i){varo,n,s;for(this.m_tickmarks.removeTail(e),o=t.params,n=this.m_tickmarks.maxIndex+(i?0:1),s=0;s<o.marks.length;s++)o.marks[s].index=n+s;this.m_tickmarks.addTail(o.marks),this.m_points.addTail(o.changes,i),this.m_rightOffset-=o.changes.length},s.prototype.formatLabel=function(t,e){if(this._formattedBySpan[e])returnthis._formattedBySpan[e].format(t.valueOf());vari=this;returnthis._formattedBySpan[e]=newl(function(t){returni.formatLabelImpl(newDate(t),e)}),this._formattedBySpan[e].format(t)},s.prototype.formatLabelImpl=function(t,e){if(!(t&&tinstanceofDate))return"incorrect time";vari=this._model.mainSeries().isDWM();returne<_.MINUTE_SPAN&&!i?p(t.getUTCHours(),2)+":"+p(t.getUTCMinutes(),2)+":"+p(t.getUTCSeconds(),2):e<_.DAY_SPAN&&!i?p(t.getUTCHours(),2)+":"+p(t.getUTCMinutes(),2):e<_.WEEK_SPAN?t.getUTCDate():e<_.MONTH_SPAN?t.getUTCDate():e<_.YEAR_SPAN?(g||(g=n()),g[t.getUTCMonth()]):t.getUTCFullYear()},s.prototype.normalizeBarIndex=function(t){vare=0,i=0;returnt<this.m_points.firstTimePointIndex()?(e=this.m_points.valueAt(this.m_points.firstTimePointIndex()),i=t-this.m_points.firstTimePointIndex()):t>this.m_points.lastTimePointIndex()?(e=this.m_points.valueAt(this.m_points.lastTimePointIndex()),i=t-this.m_points.lastTimePointIndex()):(e=this.m_points.valueAt(t),i=0),{time_t:e,offset:i}},s.prototype.denormalizeTimePoint=function(t){
$("html").toggleClass("is-authenticated",is_authenticated).toggleClass("is-not-authenticated",!is_authenticated).toggleClass("is-pro",is_authenticated&&user&&!!user.is_pro).toggleClass("is-not-pro",!(is_authenticated&&user&&user.is_pro)).toggleClass("is-trial",is_authenticated&&user&&!!user.is_trial).toggleClass("is-not-trial",!(is_authenticated&&user&&user.is_trial)).toggleClass("is-not-trial-available",!user.trial_availiable).toggleClass("is-trial-available",!!user.trial_availiable),TVSettings.sync(user.settings),$(".js-header__gopro-button").attr("href",is_authenticated?"/gopro/":""),is_authenticated?($(".saved_charts_count").html(user.saved_charts),$(".treated_charts_count").html(user.treated_charts_count),$(".js-trial-days-left").html(user.trial_days_left_text||""),$(".js-header-gopro-button").attr("href","/gopro/"),user.fastpass_script&&eval(user.fastpass_script),user.is_first_login&&($(function(){}),trackEvent("Conversion","First login"),user.prort_trial_started&&deleteuser.prort_trial_started,deleteuser.is_first_login),TradingView.setTrialAvailiable(user.trial_availiable)):(user={username:"Guest",following:"0",followers:"0",ignore_list:{}},$(".user-info-username").html(user.username),TVLocalStorage.removeItem("trial_availiable"))}varloginStateChange,TVXWindowEvents=__webpack_require__(128).TVXWindowEvents,trackEvent=__webpack_require__(33).trackEvent;__webpack_require__(743),$(document).ajaxSend(function(t,e,i){"POST"!==i.type||i.crossDomain||e.setRequestHeader("X-CSRFToken",$.cookie("csrftoken")),i.crossDomain&&!i.forceLanguageHeader||(window.locale?e.setRequestHeader("X-Language",window.locale):console.warn("window.locale is not defined"))}),loginStateChange=window.loginStateChange=newDelegate,loginStateChange.subscribe(null,onLoginStateChange),TVXWindowEvents.on("loginStateChange",function(){vart=JSON.parse(this);window.user=t.user,window.is_authenticated=!!t.is_authenticated,loginStateChange.fire()}),function(){vart="user-obj-changed",e={};window.crossTabSyncUserAttr=function(e){vari={};einstanceofArray?e.forEach(function(t){i[t]=window.user[t]}):i[e]=window.user[e],TVXWindowEvents.emit(t,JSON.stringify(i))},window.onChangeUserAttrInAnotherTab=function(t){vari=newDelegate;returne[t]||(e[t]=[]),e[t].push(i),i},TVXWindowEvents.on(t,function(t){vari,o;t=JSON.parse(t);for(iint)if(window.user[i]=t[i],e[i])for(o=0;o<e[i].length;o++)e[i][o].fire(t[i])})}(),TradingView.changeLoginState=function(t){window.is_authenticated=!!t,TVXWindowEvents.emit("loginStateChange",JSON.stringify({is_authenticated:is_authenticated,user:user})),loginStateChange.fire()},window.loginUser=loginUser,TradingView.signOut=function(){vart=_.clone(window.user);TradingView.changeLoginState(!1),$.ajax({type:"POST",url:"/accounts/logout/",dataType:"html"}).fail(function(){window.user=t,TradingView.changeLoginState(!0)})},window.loginRequiredDelegate=newDelegate,window.runOrSignIn=function(t,e){e||(e={}),e.verifiedPhoneRequired,(is_authenticated||Featuresets.enabled("charting_library_base"))&&t()},
TradingView.runOrGoPro=function(t,e,i){Featuresets.enabled(e)&&t()},window.onLoginStateChange=onLoginStateChange,TradingView.isPro=function(){returnis_authenticated&&user.is_pro},TradingView.setTrialAvailiable=function(t){TVLocalStorage.setItem("trial_availiable",t?1:0)},$.fn.reverse=[].reverse,$(window).load(function(){window.loaded=!0}),TradingView.notificationsChanged=newDelegate,loginStateChange.subscribe(null,function(t){t||$(".js-billing-link").each(function(){vart=$(this),e=window.is_authenticated;t.toggleClass("i-hidden",!e),"A"!==this.tagName&&(t=t.find("a")),t.attr("href",e?"/u/"+user.username+"/#billing":"")})})}).call(exports,__webpack_require__(15),__webpack_require__(130),__webpack_require__(3))},function(t,e,i){(function(t,e,o){"use strict";varn,s,r,a=i(2),l=i(138).createNoticeDialog;i(126),n=null,s=function(t){n||(n=l({type:"modal",title:t.title,content:t.content}).open(),n.on("beforeClose",function(){n=null}))},r=window.TVDialogs={modalDialog:null,dialogs:[],messageInterval:null,messageDelay:4e3,NOTIFICATION_ANIMATION_START_OFFSET:"-33px",_constrainDraggableOptionsIfNeeded:function(e){returnt.enabled("constraint_dialogs_movement")&&(e.containment=".chart-page"),e},validateHelpers:{isErrorListening:function(t){t.on("keyup.error-checker",r.validateHelpers.isError(t.val(),t))},isError:function(t,e){returnfunction(){e.val()!==t&&(e.removeClass("error"),e.off("keyup.error-checker"))}},makeValidator:function(t,e,i,o,n){returnfunction(s){vara,l,h;if(t.removeClass("error"),$("._tv-dialog-field-error").hide(),""!==s.errors)if("object"==typeofs.errors){for(ains.errors)l=t.filter("input[name^="+a+"]"),l.addClass("error").data("error",s.errors[a][0]),r.validateHelpers.isErrorListening(l);h=t.filter(".error").first().focus(),r.showError(h.data("error"),n)}elser.showError($.t("Error:")+s.errors,n);else"function"==typeofo&&o(s,i);e.removeClass("process")}}},applyMQMatcher:function(t){vare,i;t||(t=r.modalDialog),e=function(){r.positionDialog()},window.matchMedia&&(i=["(max-height: 645px)","(max-width: 460px)"].map(function(t){vari=matchMedia(t);returni.addListener(e),i}),t.on("destroy",function(){i.forEach(function(t){t.removeListener(e)})}))},showBrowserExtensionDialog:function(t){varo,n;if(t)returno={chrome:{logo:"images/svg/google-chrome-logo.svg",name:"Google Chrome",href:"https://chrome.google.com/webstore/detail/tradingview-free-quotes-a/ommjfbdmijjlbhlhnnnfkmbnkpnjpipj"}},n=i(160),r.createModalDialog("Browser Extension",{noHeader:!0,width:"730px",content:e.render(n.dialogs.browserExtension,{browser:o[t]})}),r.modalDialog.find(".install-extension, ._tv-dialog-title-close").click(function(t){r.destroy()}),r.positionDialog(),r.modalDialog},showIntervalMismatchDialog:function(t){vare,i,o,n,s,a,l=!1;l=l||!1,r.createModalDialog($.t("Interval is not applicable"),{addClass:"tv-interval-is-not-applicable-dialog"}),e=r.modalDialog,e.css({zIndex:1e3}),e.find("._tv-dialog").css("width","400px"),i=r.modalDialog.find("._tv-dialog-content"),
labelMap:r,modeInterval:l,short:!1,shortLabelMap:a,showTooltip:!0},d=function(t){functione(e){vari=t.call(this)||this;returni._quoteSessionPrefix="data-mode-indicator",i._componentClass="tv-data-mode",i._init(e),i}returno.__extends(e,t),e.prototype.getLabel=function(){return!0===this._shortMode?this._shortLabelMap[this._value]||"":t.prototype.getLabel.call(this)},e.prototype.setMode=function(t,e){this.update({values:{update_mode:t}})},e.prototype.hide=function(){this._el.classList.add("i-hidden")},e.prototype.show=function(){this._el.classList.remove("i-hidden")},e.prototype.getTooltipText=function(){vart="",e=this.getValue();if(""===e)returnt;switch(e){case"delayed":t=$.t("Quotes are delayed by {0} min and updated every 30 seconds");break;case"delayed_streaming":t=$.t("Quotes are delayed by {0} min");break;default:t=this._labelMap[e]||t}return["delayed","delayed_streaming"].includes(e)&&(t=t.format(Math.round(this._modeInterval/60))),t},e.prototype._init=function(e){void0===e&&(e={});vari=Object.assign({},c,e);this._modeInterval=i.modeInterval||l,this._shortLabelMap=i.shortLabelMap||a,t.prototype._init.call(this,i),this._render()},e.prototype._getValueFromData=function(t){vare;returne=void0!==t.values&&void0!==t.values.update_mode?t.values.update_mode:this.getValue(),h[e]||e},e}(n.AbstractIndicator),e.DataModeIndicator=d},function(t,e,i){"use strict";varo,n,s,r,a,l;Object.defineProperty(e,"__esModule",{value:!0}),o=i(73),i(28),i(489),n=i(363),s={invalid:"tv-market-status--invalid",market:"tv-market-status--market",out_of_session:"tv-market-status--out-of-session",post_market:"tv-market-status--post-market",pre_market:"tv-market-status--pre-market",loading:"tv-market-status--loading"},r={invalid:$.t("Invalid Symbol"),market:$.t("Market Open"),out_of_session:$.t("Market Closed"),post_market:$.t("Post Market"),pre_market:$.t("Pre Market"),loading:$.t("Loading")},a={classMap:s,classSuffix:"",data:{},extraTitle:"",labelMap:r,short:!1,showTooltip:!0},l=function(t){functione(e){vari=t.call(this)||this;returni._quoteSessionPrefix="market-status-indicator",i._componentClass="tv-market-status",i._extraTitle="",i._init(e),i}returno.__extends(e,t),e.prototype.setStatus=function(t,e){vari={values:{current_session:t}};this.update(i,e)},e.prototype.getTooltipText=function(){vare=t.prototype.getTooltipText.call(this);return""===e?e:(""!==this._extraTitle&&(e=e+", "+this._extraTitle),e)},e.prototype.setExtraTitle=function(t){this._extraTitle=t},e.prototype.reset=function(){this._clearClasses(),this._labelEl.textContent="",this._extraTitle="",this._el.setAttribute("title",""),this._value=""},e.prototype.enableShortMode=function(e){void0===e&&(e=!0),void0!==this._labelEl&&this._labelEl.classList.add("i-hidden"),t.prototype.enableShortMode.call(this)},e.prototype.disableShortMode=function(){void0!==this._labelEl&&this._labelEl.classList.remove("i-hidden"),t.prototype.disableShortMode.call(this)},e.prototype._renderLabel=function(){this._labelEl.textContent=this.getLabel()},
t.prototype._purgeCache=function(){this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._needPurgeCache=!1,this._leftDate=null,this._endOfData=!1},t.prototype._processNextPendingSubscriber=function(){vart,e,i,o,r,a;if(this._pendingSubscribers.length&&!this._requesting){if(this._needPurgeCache&&this._purgeCache(),t=this._pendingSubscribers.pop(),this._logMessage("Processing bars request {0} from {1} to {2} ".format(t.key,n(1e3*t.range.from),n(1e3*t.range.to))),this._errorMessage)returnthis._logMessage("Return error:"+this._errorMessage),t.onErrorCallback(this._errorMessage),voidthis._processNextPendingSubscriber();if((!this._leftDate||t.range.from<this._leftDate)&&(e=news.Interval(this._resolution),i=(e.inMilliseconds()||0)/1e3,o=!this._leftDate,r=!o&&!!this._cache.bars.length&&this._cache.bars[0].time/1e3-t.range.from<i,(o||!r)&&!this._endOfData))returnthis._pendingSubscribers.push(t),voidthis._ensureRequestedTo(t.range.from);a=this._moveSubscriberToRealtime(t),this._returnHistoryDataToSubscriber(t,a),this._subscribeRealtimeIfNeeded(),this._processNextPendingSubscriber()}},t.prototype._moveSubscriberToRealtime=function(t){vare={key:t.key,onHistoryCallback:t.onHistoryCallback,barset:null};returnthis._subscribers.push(e),e},t.prototype._subscribeRealtimeIfNeeded=function(){!this._subscribers.length||this._realtimeOn||this._symbolInfo.expired||this._symbolInfo.expiration_date||this._subscribeRealtime()},t.prototype._subscribeRealtime=function(){vart,e,i=this;this._symbolInfo.expired||this._realtimeOn||(t=function(t){i._dwmAligner&&(t.time=i._dwmAligner.tradingDayToSessionStart(t.time)),i._putToCacheNewBar(t),i._subscribers.forEach(function(e){vari=e.barset;if(null===i)throwError("subscirber.barset is null");i.add(t),e.onHistoryCallback(i)})},e=function(){i._unsubscribeRealtime();vart=i._leftDate;i._purgeCache(),t&&i._ensureRequestedTo(t)},this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,t,o(this._symbolInfo,this._resolution),e),this._logMessage("Subscribed to realtime"))},t.prototype._unsubscribeRealtime=function(){!this._symbolInfo.expired&&this._realtimeOn&&(this._datafeed.unsubscribeBars(o(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)},t.prototype._returnHistoryDataToSubscriber=function(t,e){vari,o,s=t.range,r=l.enabled("cl_feed_return_all_data")?this._createBarset(this._leftDate||s.from):this._createBarset(s.from);r.count()>0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(t.key,r.count(),n(r.bars[0].time),n(r.bars[r.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(t.key)),e.barset=r,i=this._inGapNextTime(s.from),i?(this._logMessage("Request {0} is in gap, nextTime = {1}".format(t.key,n(1e3*i))),r.nextTime=i):0===r.count()&&(o=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3)&&s.from>o&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(t.key,n(1e3*o))),r.nextTime=o||void0),
this._endOfData&&null!==this._leftDate&&t.range.from<=this._leftDate&&(r.endOfData=!0),t.onHistoryCallback(r)},t.prototype._createBarset=function(t){vare=r.lowerbound(this._cache.bars,1e3*t,function(t,e){returnt.time<e});returnnewa.BarSet(this._symbolInfo,this._cache.bars.slice(e))},t.prototype._ensureRequestedTo=function(e){vari,o,s,r=this;if(this._leftDate&&this._leftDate<e)returnvoidthis._processNextPendingSubscriber();i=!this._leftDate,this._requesting=!0,o=e,s=this._leftDate?this._leftDate-1:this._symbolInfo.expiration_date||Math.floor(t._now()/1e3),this._leftDate=e,this._logMessage("Requesting data: [{0} ... {1}] ".format(n(1e3*o),n(1e3*s))),this._datafeed.getBars(this._symbolInfo,this._resolution,o,s,function(t,e){r._requesting=!1,r._processBars(t,e)},function(t){r._requesting=!1,r._errorMessage=t||null,r._processNextPendingSubscriber()},i)},t.prototype._processBars=function(t,e){this._checkBars(t),this._alignBarsTime(t),t.length>0?this._processFullBarset(t,e):this._processEmptyBarset(e),this._processNextPendingSubscriber()},t.prototype._processEmptyBarset=function(e){this._logMessage("Receiving bars: barset is empty"),e&&e.nextTime?(this._logMessage("Next time received: `{0}`".format(n(1e3*e.nextTime))),this._addGap(e.nextTime),this._leftDate=Math.min(this._leftDate||t._now()/1e3,e.nextTime+1)):e&&e.noData?(this._logMessage("EOD received"),this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned")},t.prototype._processFullBarset=function(t,e){vari=t[0].time,o=t[t.length-1].time;this._logMessage("Receiving bars: total {0} bars in [{1} ... {2}] ".format(t.length,n(i),n(o))),null!==this._leftDate&&i<1e3*this._leftDate&&!l.enabled("cl_feed_return_all_data")&&this._logMessage("Returned more data than needed"),this._putToCache(t)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),e&&e.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):e&&e.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},t.prototype._addGap=function(e){vari;this._gaps.find(function(t){returnt.from===e})||(i=(this._cache.bars.length?this._cache.bars[0].time:t._now())/1e3,this._gaps.push({from:e,to:i}))},t.prototype._inGapNextTime=function(t){vare=this._gaps.find(function(e){returne.from<t&&e.to>t});returne?e.from:null},t.prototype._getNextSubscriptionId=function(){returnthis._nextSubscriptionId++},t.prototype._checkBars=function(t,e){vari,o;if(void0===e&&(e=!1),l.enabled("charting_library_debug_mode"))for(i=1;i<t.length;i++)t[i].time<=t[i-1].time&&(o="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(t[i].time,i,t[i-1].time,i-1),
e&&this._dwmAligner&&(o+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(o))},t.prototype._putToCache=function(t){if(0===t.length)return!0;if(this._cache.bars.length===t.length&&this._cache.bars[0].time===t[0].time&&this._cache.bars[this._cache.bars.length-1].time===t[t.length-1].time)returnthis._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&t[t.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&t[t.length-1].time>=this._cache.bars[0].time){vare=this._cache.bars[this._cache.bars.length-1].time===t[t.length-1].time;if(this._cache.bars=[],!e)returnthis._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}returnArray.prototype.unshift.apply(this._cache.bars,t),this._checkBars(this._cache.bars,!0),!0},t.prototype._putToCacheNewBar=function(t){vare=this._cache.bars.length,i=t.time,o=0===e?NaN:this._cache.bars[e-1].time;0===e||o<i?this._cache.bars.push(t):o===i?this._cache.bars[e-1]=t:console.error("putToCacheNewBar: time violation, previous bar time: "+n(o)+" should be less or equal to new time: "+n(i))},t.prototype._alignBarsTime=function(t){if(this._dwmAligner)for(vare=0;e<t.length;e++)t[e].time=this._dwmAligner.tradingDayToSessionStart(t[e].time)},t._now=function(){returnDate.now()+6e4},t}(),c=function(){functiont(t,e){this._threads={},this._datafeed=t,this._dwmAlignerCreator=e}returnt.prototype.purgeCache=function(){this._forEachThread(function(t,e){returne.purgeCache()})},t.prototype.subscribe=function(t,e,i,n,s){varr,a=o(t,e);returnthis._threads[a]||(this._threads[a]=this._createThread(t,e)),r=this._threads[a].addSubscription(i,n,s),a+'"'+r},t.prototype.unsubscribe=function(t){vare,i,o=t.split('"');if(2!==o.length)returnvoidconsole.warn("Wrong guid format");e=o[0],i=parseInt(o[1]),this._threads[e].removeSubscription(i)},t.prototype._createThread=function(t,e){returnnewh(this._datafeed,t,e,this._dwmAlignerCreator(e,t))},t.prototype._forEachThread=function(t){vare=this;Object.keys(this._threads).forEach(function(i){returnt(i,e._threads[i])})},t}(),e.DatafeedRequestsCachedProcessor=c},function(t,e){"use strict";functioni(t){vare=newXMLHttpRequest;returne.open("GET",t,!1),e.send(),200===e.status?JSON.parse(e.responseText):null}if(Object.defineProperty(e,"__esModule",{value:!0}),window.language){if(!window._tv_languages){varo="localization/translations/"+window.language+".json";window._tv_languages={},window._tv_languages[window.language]=i(o)||{}}}elsewindow.language="en"},function(t,e,i){"use strict";varo,n;Object.defineProperty(e,"__esModule",{value:!0}),o=i(56),n=function(){functiont(){}returnt.prototype.main=function(t){vare,i,n,s,r=t.new_var(o.Std.open(t)),a=t.new_var(o.Std.close(t)),l=r.get(1),h=a.get(1),c=o.Std.ohlc4(t),d=o.Std.na(r.get(1))?(o.Std.open(t)+o.Std.close(t))/2:(l+h)/2;returnr.set(d),a.set(c),e=o.Std.max(o.Std.high(t),o.Std.max(d,c)),
i=o.Std.min(o.Std.low(t),o.Std.min(d,c)),n=o.Std.volume(t),s=t.symbol,[s.time,d,e,i,c,n,s.updatetime,s.isBarClosed]},t}(),e.HeikenAshi=n},function(t,e,i){"use strict";functiono(t,e,i,n){vars,r,a;if(n=!n||n<1e12?Date.now():n,s=n-t,r=Math.min(i.endValue,i.endValue*i.easing(s/i.duration)),a=r-e,i.onStep(a,r),s>=i.duration)returnvoid(i.onComplete&&i.onComplete());requestAnimationFrame(o.bind(null,t,r,i))}functionn(t){t.duration=t.duration||250,t.easing=t.easing||s.easingFunc.easeOutCubic,requestAnimationFrame(o.bind(null,Date.now(),0,t))}Object.defineProperty(e,"__esModule",{value:!0});vars=i(54);e.doAnimate=n},function(t,e,i){"use strict";varo,n;Object.defineProperty(e,"__esModule",{value:!0}),o=i(44),n=function(){functiont(t,e){this._major=t,this._minor=e}returnt.prototype.major=function(){returnthis._major},t.prototype.minor=function(){returnthis._minor},t.prototype.isZero=function(){return0===this._major&&0===this._minor},t.prototype.toString=function(){returnthis._major+"."+this._minor},t.prototype.compareTo=function(t){returnthis._major<t._major?-1:this._major>t._major?1:this._minor<t._minor?-1:this._minor>t._minor?1:0},t.prototype.isLess=function(t){returnthis.compareTo(t)<0},t.prototype.isLessOrEqual=function(t){returnthis.compareTo(t)<=0},t.prototype.isEqual=function(t){return0===this.compareTo(t)},t.prototype.isGreater=function(t){returnthis.compareTo(t)>0},t.prototype.isGreaterOrEqual=function(t){returnthis.compareTo(t)>=0},t.parse=function(e){vari,n,s;if(einstanceoft)returnnewt(e.major(),e.minor());if("number"==typeofe)returno.assert(Math.floor(e)===e,"Version should not be a float number"),newt(e,0);if("string"==typeofe){if(i=e.split("."),1===i.length)returnn=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),newt(n,0);if(2===i.length)returnn=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),s=parseInt(i[1],10),o.assert(!isNaN(s),"Bad version string: "+e),newt(n,s);throwError("Bad version string (one dot expected): "+e)}throwError("Bad version: "+e)},t}(),n.ZERO=newn(0,0),e.Version=n},function(t,e,i){(function(t){"use strict";varo,n,s,r,a,l,h,c,d,p,u,_;Object.defineProperty(e,"__esModule",{value:!0}),o=i(73),i(17),i(30),i(105),i(28),n=i(368),s=i(372),r=i(47),a=i(101),l=i(15),h=i(41),c=i(217),d=i(69),p=i(40),i(499),u='<span class="tv-favorited-drawings-toolbar__widget {{#isActive}}i-active{{/isActive}} apply-common-tooltip" title="{{title}}">{{{icon}}}</span>',_=function(e){functioni(t){vari=e.call(this,{allowSortable:!Modernizr.touch,defaultPosition:t,positionSettingsKey:"chart.favoriteDrawingsPosition"})||this;returni._linetoolsWidgets={},i._onButtonClicked=newl,i._canBeShownValue=newp(!1),i._attachHandlers(),i._loadVisibilityState(),i}returno.__extends(i,e),i.prototype.show=function(){this._canBeShownValue.value()&&(d.setValue(i._visibilitySettingsKey,!0),this.isVisible()||this._renderAllLinetools(),e.prototype.show.call(this))},i.prototype.hide=function(){d.setValue(i._visibilitySettingsKey,!1),e.prototype.hide.call(this)},
i=o.Std.min(o.Std.low(t),o.Std.min(d,c)),n=o.Std.volume(t),s=t.symbol,[s.time,d,e,i,c,n,s.updatetime,s.isBarClosed]},t}(),e.HeikenAshi=n},function(t,e,i){"use strict";functiono(t,e,i,n){vars,r,a;if(n=!n||n<1e12?Date.now():n,s=n-t,r=Math.min(i.endValue,i.endValue*i.easing(s/i.duration)),a=r-e,i.onStep(a,r),s>=i.duration)returnvoid(i.onComplete&&i.onComplete());requestAnimationFrame(o.bind(null,t,r,i))}functionn(t){t.duration=t.duration||250,t.easing=t.easing||s.easingFunc.easeOutCubic,requestAnimationFrame(o.bind(null,Date.now(),0,t))}Object.defineProperty(e,"__esModule",{value:!0});vars=i(54);e.doAnimate=n},function(t,e,i){"use strict";varo,n;Object.defineProperty(e,"__esModule",{value:!0}),o=i(44),n=function(){functiont(t,e){this._major=t,this._minor=e}returnt.prototype.major=function(){returnthis._major},t.prototype.minor=function(){returnthis._minor},t.prototype.isZero=function(){return0===this._major&&0===this._minor},t.prototype.toString=function(){returnthis._major+"."+this._minor},t.prototype.compareTo=function(t){returnthis._major<t._major?-1:this._major>t._major?1:this._minor<t._minor?-1:this._minor>t._minor?1:0},t.prototype.isLess=function(t){returnthis.compareTo(t)<0},t.prototype.isLessOrEqual=function(t){returnthis.compareTo(t)<=0},t.prototype.isEqual=function(t){return0===this.compareTo(t)},t.prototype.isGreater=function(t){returnthis.compareTo(t)>0},t.prototype.isGreaterOrEqual=function(t){returnthis.compareTo(t)>=0},t.parse=function(e){vari,n,s;if(einstanceoft)returnnewt(e.major(),e.minor());if("number"==typeofe)returno.assert(Math.floor(e)===e,"Version should not be a float number"),newt(e,0);if("string"==typeofe){if(i=e.split("."),1===i.length)returnn=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),newt(n,0);if(2===i.length)returnn=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),s=parseInt(i[1],10),o.assert(!isNaN(s),"Bad version string: "+e),newt(n,s);throwError("Bad version string (one dot expected): "+e)}throwError("Bad version: "+e)},t}(),n.ZERO=newn(0,0),e.Version=n},function(t,e,i){(function(t){"use strict";varo,n,s,r,a,l,h,c,d,p,u,_;Object.defineProperty(e,"__esModule",{value:!0}),o=i(73),i(17),i(30),i(105),i(28),n=i(368),s=i(372),r=i(47),a=i(101),l=i(15),h=i(42),c=i(217),d=i(69),p=i(41),i(499),u='<span class="tv-favorited-drawings-toolbar__widget {{#isActive}}i-active{{/isActive}} apply-common-tooltip" title="{{title}}">{{{icon}}}</span>',_=function(e){functioni(t){vari=e.call(this,{allowSortable:!Modernizr.touch,defaultPosition:t,positionSettingsKey:"chart.favoriteDrawingsPosition"})||this;returni._linetoolsWidgets={},i._onButtonClicked=newl,i._canBeShownValue=newp(!1),i._attachHandlers(),i._loadVisibilityState(),i}returno.__extends(i,e),i.prototype.show=function(){this._canBeShownValue.value()&&(d.setValue(i._visibilitySettingsKey,!0),this.isVisible()||this._renderAllLinetools(),e.prototype.show.call(this))},i.prototype.hide=function(){d.setValue(i._visibilitySettingsKey,!1),e.prototype.hide.call(this)},
i.prototype.onButtonClicked=function(){returnthis._onButtonClicked},i.prototype.canBeShown=function(){returnthis._canBeShownValue.readonly()},i.prototype._onFavoriteAdded=function(t){this._canBeShownValue.setValue(!0),this.addWidget(this._createLinetoolWidget(t)),this.show()},i.prototype._onFavoriteRemoved=function(t){this.removeWidget(this._linetoolsWidgets[t]),deletethis._linetoolsWidgets[t],0===s.LinetoolsFavoritesStore.favoritesCount()&&(this._canBeShownValue.setValue(!1),this.hide())},i.prototype._onFavoriteMoved=function(){this._renderAllLinetools()},i.prototype._onSelectedLinetoolChanged=function(t){vare=this;Object.keys(this._linetoolsWidgets).forEach(function(i){e._linetoolsWidgets[i].classList.toggle("i-active",t===i)})},i.prototype._createLinetoolWidget=function(e){vari=this,o=$(t.render(u,{icon:c.lineToolsInfo[e].icon,isActive:e===h.tool.value(),title:c.lineToolsInfo[e].localizedName}))[0];returno.addEventListener("click",function(t){t.preventDefault(),i._onButtonClicked.fire(e)}),this._linetoolsWidgets[e]=o,o},i.prototype._renderAllLinetools=function(){vart=this;this._linetoolsWidgets={},this.removeWidgets(),s.LinetoolsFavoritesStore.favorites().forEach(function(e){t.addWidget(t._createLinetoolWidget(e))})},i.prototype._attachHandlers=function(){vart=this;s.LinetoolsFavoritesStore.favoriteAdded.subscribe(this,this._onFavoriteAdded),s.LinetoolsFavoritesStore.favoriteRemoved.subscribe(this,this._onFavoriteRemoved),s.LinetoolsFavoritesStore.favoriteMoved.subscribe(this,this._onFavoriteMoved),s.LinetoolsFavoritesStore.favoritesSynced.subscribe(null,function(){t._loadVisibilityState(),t._renderAllLinetools()}),this.onWidgetsReordered().subscribe(this,function(e,i){if(s.LinetoolsFavoritesStore.favoriteMoved.unsubscribe(t,t._onFavoriteMoved),!s.LinetoolsFavoritesStore.moveFavorite(s.LinetoolsFavoritesStore.favorite(e),i))throwError("Something went wrong");s.LinetoolsFavoritesStore.favoriteMoved.subscribe(t,t._onFavoriteMoved)}),this.onContextMenu(function(e){e.preventDefault();vari=newr.Action({text:$.t("Hide Favorite Drawings Toolbar")});i.callbacks().subscribe(null,function(){t.hide()}),a.createMenu([i]).show(e)}),h.tool.subscribe(this._onSelectedLinetoolChanged.bind(this))},i.prototype._loadVisibilityState=function(){vart,e=s.LinetoolsFavoritesStore.favoritesCount()>0;this._canBeShownValue.setValue(e),t=d.getBool(i._visibilitySettingsKey,!0),t&&e?this.show():this.hide()},i}(n.FloatingToolbar),_._visibilitySettingsKey="ChartFavoriteDrawingToolbarWidget.visible",e.FavoriteDrawingToolbar=_}).call(e,i(30))},function(t,e,i){"use strict";varo,n,s,r;Object.defineProperty(e,"__esModule",{value:!0}),o=i(73),n=i(368),s=i(15),i(137),i(501),r=function(t){functione(i){varo=t.call(this,e._prepareOptions(i))||this;returno._onWidgetStateChangedDelegate=news,o._statedWidgets=[],o._currentPopup=null,o._onWindowClickedListener=o._onWindowClicked.bind(o),o}returno.__extends(e,t),e.prototype.show=function(){t.prototype.show.call(this),document.addEventListener("mousedown",this._onWindowClickedListener)},
e=this._currentPopup.element,this._currentPopup=null,t.forEach(function(t){t.widget.removeEventListener("click",t.clickListener)}),e.classList.remove("i-opened"),e.addEventListener("transitionend",function(t){t.target===e&&i._getWidget().removeChild(e)}))},e.prototype._updateWidgetPreview=function(t){vari,o=e._getStateIndexById(t.statedWidget,t.statedWidget.currentStateId);if(-1===o)throwError("Unknown state id: "+t.statedWidget.currentStateId);i=t.statedWidget.states[o].widget.cloneNode(!0),t.toolbarWidget.firstChild?t.toolbarWidget.replaceChild(i,t.toolbarWidget.firstChild):(t.toolbarWidget.appendChild(i),t.toolbarWidget.appendChild(e._createCaret()))},e.prototype._updateSubWidgetsState=function(t){this._currentPopup&&this._isPopupCreatedForWidget(t.id)&&this._currentPopup.widgets.forEach(function(i){i.widget.classList.toggle(e._activeSubWidgetClass,i.stateWidget.id===t.currentStateId)})},e.prototype._updatePopupPosition=function(){vart,e,i,o,n,s,r,a;if(this._currentPopup){if(t=this._currentPopup.createdFor,e=this._getWidget().getBoundingClientRect(),!(i=this._findWrapperForWidget(t))||!this._currentPopup)throwError("Toolbar has no wrapper for preview's widget or there is no popup");o=i.getBoundingClientRect(),n=this._currentPopup.element.getBoundingClientRect(),s=this._currentPopup.element,this.isVertical()?(s.classList.remove("tv-grouped-floating-toolbar__popup--at-top"),s.style.top=o.top-e.top-1+"px",s.style.left="",e.left>window.innerWidth-e.right?s.classList.add("tv-grouped-floating-toolbar__popup--at-left"):s.classList.remove("tv-grouped-floating-toolbar__popup--at-left")):(s.classList.remove("tv-grouped-floating-toolbar__popup--at-left"),r=o.left+n.width,a=0,a=r>window.innerWidth?e.left+n.width<=window.innerWidth?-1:e.width-n.width-1:o.left-e.left-1,s.style.left=a+"px",e.bottom+n.height>window.innerHeight?s.classList.add("tv-grouped-floating-toolbar__popup--at-top"):(s.classList.remove("tv-grouped-floating-toolbar__popup--at-top"),s.style.top=""))}},e.prototype._isPopupCreatedForWidget=function(t){return!(!this._currentPopup||this._currentPopup.stateWidgetId!==t)},e.prototype._createSubWidget=function(t,e){vari=document.createElement("div");returni.className+="tv-grouped-floating-toolbar__sub-widget",t.statedWidget.stateWidgetAddClass&&i.classList.add(t.statedWidget.stateWidgetAddClass),i.appendChild(e.widget),i},e.prototype._onSubWidgetClicked=function(t,e){this._closePopup(),t.statedWidget.currentStateId!==e&&(this.setGroupedWidgetState(t.statedWidget.id,e),this._onWidgetStateChangedDelegate.fire(t.statedWidget.id,e))},e.prototype._onWindowClicked=function(t){if(this.isVisible()&&this._currentPopup&&!e._isEventInElement(t,this._currentPopup.element)){for(vari=0;i<this._statedWidgets.length;++i)if(e._isEventInElement(t,this._statedWidgets[i].toolbarWidget))return;this._closePopup()}},e._getStateIndexById=function(t,e){for(vari=0;i<t.states.length;++i)if(t.states[i].id===e)returni;return-1},e._createCaret=function(){vart=document.createElement("div")
this._listAccessor().setNodeRemoveCallback(this._onNodeRemoveClick.bind(this)),s.prototype.initView.call(this)},i.prototype._clearRemoveNodeTimer=function(){clearInterval(this._clearRemoveNodeTimerId),this._clearRemoveNodeTimerId=null},i.prototype._renderViewForSymbol=function(t,e,o){vari,s,r,n,a,l="tv-manage-drawings-tab__symbol-drawings";if(t.next().hasClass(l))returnt.next().toggleClass("i-expanded",o),voidthis._scroll.updateScrollBar();for(i=$('<div class="i-expanded '+l+'">'),s=this._symbolDrawingsMap[e],r=0;r<s.length;++r)n=s[r],a=this._listAccessor().createItem(n,{showHide:!1,lockUnlock:!1,draggable:!1,largeLeftPadding:!0,addContextMenu:!1}),this._markItemForSource(a,n.datasource),i.append(a);i.insertAfter(t),this._scroll.updateScrollBar()},i.prototype._createSymbolItem=function(t){vare=this._list.createTreeNodeItem(t,this._symbolDrawingsMap[t],{isCurrent:this._getItems().currentSymbol===t});e.attr("data-symbol",t),this._$contentWrapper.append(e)},i.prototype._renderViewInternal=function(t){vare,o,i;for(this._symbolDrawingsMap={},e=this._getItems().drawings,o=0;o<e.length;o++)i=e[o],this._symbolDrawingsMap[i.symbol]=this._symbolDrawingsMap[i.symbol]||[],this._symbolDrawingsMap[i.symbol].push(i);Object.keys(this._symbolDrawingsMap).sort(function(t,e){returnthis._symbolDrawingsMap[t].length<this._symbolDrawingsMap[e].length?1:-1}.bind(this)).forEach(this._createSymbolItem.bind(this)),this._renderEmptyListMessageIfNeeded(),this._updateTotalCounter(),t()},i.prototype._updateTotalCounter=function(){vart=0;Object.keys(this._symbolDrawingsMap).forEach(function(e){t+=0|this._symbolDrawingsMap[e].length}.bind(this)),this._$totalValueContainer.text($.t("Total")+": "+t),this._$totalValueContainer.toggleClass("i-hidden",0===t)},i.prototype._renderEmptyListMessageIfNeeded=function(){this._$emptyListMessage.toggleClass("js-hidden",0!==Object.keys(this._symbolDrawingsMap).length)},i.prototype._removeSourceFromView=function(t){vare,o,i,s=this._getItemForSourceId(t.id());if(0===s.length)returnvoidthis._renderView(null);t.id()===this._selectedSourceId()&&this._listAccessor().activateItem(null,null),e=s.parent(),o=e.prev(),i=o.attr("data-symbol"),this._symbolDrawingsMap[i]=this._symbolDrawingsMap[i].filter(function(e){returne.datasource!==t}),0===this._symbolDrawingsMap[i].length?(e.remove(),o.remove(),deletethis._symbolDrawingsMap[i],this._renderEmptyListMessageIfNeeded()):(s.remove(),this._listAccessor().updateNodeItem(o,i,this._symbolDrawingsMap[i],{isCurrent:this._getItems().currentSymbol===i})),this._updateTotalCounter()},i.prototype._onNodeRemoveClick=function(t,e){if(!this._clearRemoveNodeTimerId){vare=t.attr("data-symbol");this._chartModel.beginUndoMacro($.t("Remove all line tools for ")+e),this._clearRemoveNodeTimerId=setInterval(function(){vart=this._symbolDrawingsMap[e],o=t.splice(0,200).map(function(t){returnt.datasource});this._chartModel.removeLineTools(o),0===t.length&&(this._chartModel.endUndoMacro(),this._clearRemoveNodeTimer())}.bind(this),50)}},i.prototype._removeSourcesFromView=function(t){
i.prototype.destroy=function(){Object.keys(this._delayedRenderIntervals).forEach(function(t){clearInterval(t)}),this._delayedRenderIntervals=null,r.prototype.destroy.call(this)},i.prototype.initView=function(){this._filter=news(this._$filterContainer),this._filter.onChange.subscribe(this,function(){this._renderView(this._scroll.scrollToStart.bind(this._scroll))}.bind(this)),r.prototype.initView.call(this)},i.prototype._addSortableToList=function(t,e){varo=0;this._listAccessor().createSortableForItemsList(t,function(t,e){o=e.item.index()},function(t,i){vars,r,n,a,l,c,d,h,p,u=i.item.index();if(o!==u){for(s=o>u?i.item.next():i.item.prev(),r=this._getSourceIdForItem(i.item),n=this._getSourceIdForItem(s),a=-1,l=-1,c=0;c<e.length;++c)d=e[c],d.datasource.id()===r?a=c:d.datasource.id()===n&&(l=c);for(h=this._chartModel.dataSourceForId(r),this._chartModel.removeListener("changeZOrder",this._zorderChangedHandler),this._chartModel.beginUndoMacro("Change "+h.title()+" Z order"),p=a>l?1:-1,c=0;c<Math.abs(a-l);c++)this._chartModel.changeZOrder(h,p);this._chartModel.endUndoMacro(),this._chartModel.on("changeZOrder",this._zorderChangedHandler)}}.bind(this))},i.prototype._getNewSelectedIdOnRemoval=function(t){vare=t.next();0===e.length&&(e=t.prev()),this._listAccessor().activateItem(e,this._getSourceForItem(e))},i.prototype._moveItemUp=function(t){vare=t.prev();e.length&&(t.insertBefore(e),this._scroll.scrollTo(t))},i.prototype._moveItemDown=function(t){vare=t.next();e.length&&(t.insertAfter(e),this._scroll.scrollTo(t))},i.prototype._removeSourceFromView=function(t){vare,o=this._getItemForSourceId(t.id()),i=t.id()===this._selectedSourceId();i&&this._getNewSelectedIdOnRemoval(o),e=o.parent(),1===e.children().length?e.remove():o.remove(),this._selectedSourceId()&&i&&this._scroll.scrollTo(this._getItemForSourceId(this._selectedSourceId()))},i.prototype._removeSourcesFromView=function(t){this._renderView(function(){this._scroll.scrollToStart()}.bind(this))},i.prototype._onZorderChanged=function(t,e){if(t)if(e){varo=this._getItemForSourceId(t.id());1===e?this._moveItemUp(o):this._moveItemDown(o)}elsethis._renderView(function(){this._scroll.scrollTo(this._getItemForSourceId(t.id()))}.bind(this))},i.prototype._subscribeListeners=function(){r.prototype._subscribeListeners.call(this),this._chartModel.on("setProperty",this._boundUpdateView),this._chartModel.on("cloneLineTool",this._boundRenderView),this._chartModel.on("setChartStyleProperty",this._boundUpdateView),this._chartModel.on("changeZOrder",this._zorderChangedHandler),this._chartModel.on("moveSource",this._boundRenderView)},i.prototype._unsubscribeListeners=function(){r.prototype._unsubscribeListeners.call(this),this._chartModel.removeListener("setProperty",this._boundUpdateView),this._chartModel.removeListener("cloneLineTool",this._boundRenderView),this._chartModel.removeListener("setChartStyleProperty",this._boundUpdateView),this._chartModel.removeListener("changeZOrder",this._zorderChangedHandler),this._chartModel.removeListener("moveSource",this._boundRenderView)},
Te.isFunction(e)&&(e=e.call(t,n,r)),null!=e.top&&(l.top=e.top-r.top+c),null!=e.left&&(l.left=e.left-r.left+h),"using"ine?e.using.call(t,l):i.css(l)}},Te.fn.extend({position:function(){if(!this[0])returnnull;vart=this[0],e=this.offsetParent(),n=this.offset(),i=ke.test(e[0].nodeName)?{top:0,left:0}:e.offset();returnn.top-=parseFloat(Te.css(t,"marginTop"))||0,n.left-=parseFloat(Te.css(t,"marginLeft"))||0,i.top+=parseFloat(Te.css(e[0],"borderTopWidth"))||0,i.left+=parseFloat(Te.css(e[0],"borderLeftWidth"))||0,{top:n.top-i.top,left:n.left-i.left}},offsetParent:function(){returnthis.map(function(){for(vart=this.offsetParent||Se.body;t&&!ke.test(t.nodeName)&&"static"===Te.css(t,"position");)t=t.offsetParent;returnt})}}),Te.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){varn=/Y/.test(e);Te.fn[t]=function(i){returnTe.access(this,function(t,i,r){varo=j(t);if(r===s)returno?eino?o[e]:Te.support.boxModel&&o.document.documentElement[i]||o.document.body[i]:t[i];o?o.scrollTo(n?Te(o).scrollLeft():r,n?r:Te(o).scrollTop()):t[i]=r},t,i,arguments.length,null)}}),Te.each({Height:"height",Width:"width"},function(t,e){varn="client"+t,i="scroll"+t,r="offset"+t;Te.fn["inner"+t]=function(){vart=this[0];returnt?t.style?parseFloat(Te.css(t,e,"padding")):this[e]():null},Te.fn["outer"+t]=function(t){varn=this[0];returnn?n.style?parseFloat(Te.css(n,e,t?"margin":"border")):this[e]():null},Te.fn[e]=function(t){returnTe.access(this,function(t,e,o){vara,l,u,c;returnTe.isWindow(t)?(a=t.document,l=a.documentElement[n],Te.support.boxModel&&l||a.body&&a.body[n]||l):9===t.nodeType?(a=t.documentElement,a[n]>=a[i]?a[n]:Math.max(t.body[i],a[i],t.body[r],a[r])):o===s?(u=Te.css(t,e),c=parseFloat(u),Te.isNumeric(c)?c:u):voidTe(t).css(e,o)},e,t,arguments.length,null)}}),o.jQuery=o.$=Te,n(385)&&n(385).jQuery&&(i=[],(r=function(){returnTe}.apply(e,i))!==s&&(t.exports=r))}(window),t.exports=$},function(t,e,n){vari=n(29);t.exports=function(t){if(!i(t))throwTypeError(t+" is not an object!");returnt}},,function(t,e){varn=t.exports="undefined"!=typeofwindow&&window.Math==Math?window:"undefined"!=typeofself&&self.Math==Math?self:Function("return this")();"number"==typeof__g&&(__g=n)},,function(t,e,n){vari=n(183)("wks"),r=n(112),o=n(20).Symbol,s="function"==typeofo;(t.exports=function(t){returni[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},,,,,,,function(t,e){t.exports=function(t){return"object"==typeoft?null!==t:"function"==typeoft}},function(t,e,n){(function(e){t.exports=e.Mustache=n(570)}).call(e,function(){returnthis}())},,,,,,function(t,e,n){"use strict";functioni(t,e,n){returnB.isNaN(e)?t:e<t?t:e>n?n:Math.round(e)}functionr(t,e,n){returnB.isNaN(e)?t:e<t?t:e>n?n:Math.round(1e4*e)/1e4}functiono(t){returni(0,t,255)}functions(t){returni(0,t,255)}functiona(t){returni(0,t,255)}functionl(t){returnr(0,t,1)}functionu(t,e,n){return[o(t),s(e),a(n)]}functionc(t,e){returnt[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}functionh(t,e,n,i){varr,u,c;returnArray.isArray(t)?(r=t,i=e,[r[0],r[1],r[2],l(i)]):(u=t,
Te.isFunction(e)&&(e=e.call(t,n,r)),null!=e.top&&(l.top=e.top-r.top+c),null!=e.left&&(l.left=e.left-r.left+h),"using"ine?e.using.call(t,l):i.css(l)}},Te.fn.extend({position:function(){if(!this[0])returnnull;vart=this[0],e=this.offsetParent(),n=this.offset(),i=ke.test(e[0].nodeName)?{top:0,left:0}:e.offset();returnn.top-=parseFloat(Te.css(t,"marginTop"))||0,n.left-=parseFloat(Te.css(t,"marginLeft"))||0,i.top+=parseFloat(Te.css(e[0],"borderTopWidth"))||0,i.left+=parseFloat(Te.css(e[0],"borderLeftWidth"))||0,{top:n.top-i.top,left:n.left-i.left}},offsetParent:function(){returnthis.map(function(){for(vart=this.offsetParent||Se.body;t&&!ke.test(t.nodeName)&&"static"===Te.css(t,"position");)t=t.offsetParent;returnt})}}),Te.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){varn=/Y/.test(e);Te.fn[t]=function(i){returnTe.access(this,function(t,i,r){varo=j(t);if(r===s)returno?eino?o[e]:Te.support.boxModel&&o.document.documentElement[i]||o.document.body[i]:t[i];o?o.scrollTo(n?Te(o).scrollLeft():r,n?r:Te(o).scrollTop()):t[i]=r},t,i,arguments.length,null)}}),Te.each({Height:"height",Width:"width"},function(t,e){varn="client"+t,i="scroll"+t,r="offset"+t;Te.fn["inner"+t]=function(){vart=this[0];returnt?t.style?parseFloat(Te.css(t,e,"padding")):this[e]():null},Te.fn["outer"+t]=function(t){varn=this[0];returnn?n.style?parseFloat(Te.css(n,e,t?"margin":"border")):this[e]():null},Te.fn[e]=function(t){returnTe.access(this,function(t,e,o){vara,l,u,c;returnTe.isWindow(t)?(a=t.document,l=a.documentElement[n],Te.support.boxModel&&l||a.body&&a.body[n]||l):9===t.nodeType?(a=t.documentElement,a[n]>=a[i]?a[n]:Math.max(t.body[i],a[i],t.body[r],a[r])):o===s?(u=Te.css(t,e),c=parseFloat(u),Te.isNumeric(c)?c:u):voidTe(t).css(e,o)},e,t,arguments.length,null)}}),o.jQuery=o.$=Te,n(385)&&n(385).jQuery&&(i=[],(r=function(){returnTe}.apply(e,i))!==s&&(t.exports=r))}(window),t.exports=$},function(t,e,n){vari=n(29);t.exports=function(t){if(!i(t))throwTypeError(t+" is not an object!");returnt}},,function(t,e){varn=t.exports="undefined"!=typeofwindow&&window.Math==Math?window:"undefined"!=typeofself&&self.Math==Math?self:Function("return this")();"number"==typeof__g&&(__g=n)},,function(t,e,n){vari=n(183)("wks"),r=n(112),o=n(20).Symbol,s="function"==typeofo;(t.exports=function(t){returni[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},,,,,,,function(t,e){t.exports=function(t){return"object"==typeoft?null!==t:"function"==typeoft}},function(t,e,n){(function(e){t.exports=e.Mustache=n(570)}).call(e,function(){returnthis}())},,,,,,,function(t,e,n){"use strict";functioni(t,e,n){returnB.isNaN(e)?t:e<t?t:e>n?n:Math.round(e)}functionr(t,e,n){returnB.isNaN(e)?t:e<t?t:e>n?n:Math.round(1e4*e)/1e4}functiono(t){returni(0,t,255)}functions(t){returni(0,t,255)}functiona(t){returni(0,t,255)}functionl(t){returnr(0,t,1)}functionu(t,e,n){return[o(t),s(e),a(n)]}functionc(t,e){returnt[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}functionh(t,e,n,i){varr,u,c;returnArray.isArray(t)?(r=t,i=e,[r[0],r[1],r[2],l(i)]):(u=t,
c=e,n=n||0,i=i||0,[o(u),s(c),a(n),l(i)])}functionf(t,e){returnt[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}functiond(t){returnr(0,t,1)}functionp(t){returnr(0,t,1)}functiong(t){returnr(0,t,1)}functionm(t){returnr(0,t,1)}functiony(t){returnr(0,t,1)}functionv(t,e,n){return[d(t),p(e),m(n)]}functionb(t,e){returnt[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function_(t,e,n){return[d(t),g(e),y(n)]}functionw(t,e){returnt[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}functionx(t){vare,n=t[0],i=t[1],r=t[2],o=n/255,s=i/255,a=r/255,l=Math.min(o,s,a),u=Math.max(o,s,a),c=0,h=0,f=(l+u)/2;if(l===u)c=0,h=0;elseswitch(e=u-l,h=f>.5?e/(2-u-l):e/(u+l),u){caseo:c=((s-a)/e+(s<a?6:0))/6;break;cases:c=((a-o)/e+2)/6;break;casea:c=((o-s)/e+4)/6}return[c,h,f]}functionk(t,e,n){returnn<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}functionS(t){vare,n,i,r,l,u=t[0],c=t[1],h=t[2];return0===c?e=n=i=h:(r=h<.5?h*(1+c):h+c-h*c,l=2*h-r,e=k(l,r,u+1/3),n=k(l,r,u),i=k(l,r,u-1/3)),[o(255*e),s(255*n),a(255*i)]}functionM(t){vare=t[0],n=t[1],i=t[2],r=e/255,o=n/255,s=i/255,a=Math.min(r,o,s),l=Math.max(r,o,s),u=l-a,c=0,h=0===l?0:u/l,f=l;if(l===a)c=0;elseswitch(l){casee:c=((o-s)/u+(o<s?6:0))/6;break;casen:c=((s-r)/u+2)/6;break;casei:c=((r-o)/u+4)/6}return[c,h,f]}functionD(t){vare=t[0],n=t[1],i=t[2],r=Math.floor(6*e),l=6*e-r,u=i*(1-n),c=i*(1-l*n),h=i*(1-(1-l)*n),f=0,d=0,p=0;switch(r%6){case0:f=i,d=h,p=u;break;case1:f=c,d=i,p=u;break;case2:f=u,d=i,p=h;break;case3:f=u,d=c,p=i;break;case4:f=h,d=u,p=i;break;case5:f=i,d=u,p=c}return[o(255*f),s(255*d),a(255*p)]}functionT(t){returnU[0]*t[0]+U[1]*t[1]+U[2]*t[2]}functionC(t,e){varn=t[0],i=t[1],r=t[2],o=e[0],s=e[1],a=e[2],l=o-n,u=s-i,c=a-r;returnMath.sqrt(l*l+u*u+c*c)}functionP(t){return[255-t[0],255-t[1],255-t[2]]}functionO(t,e){varn=x(t);returnS([n[0],n[1],m(n[2]-e/100)])}functionE(t,e){returneint}functionN(t){vare=$.re.exec(t);returnnull!==e?$.parse(e):null}functionL(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}functionA(t){vare=G.re.exec(t);returnnull!==e?G.parse(e):null}functionI(t){vare=t[0],n=t[1],i=t[2],r=e.toString(16),o=n.toString(16),s=i.toString(16);return"#"+(1===r.length?"0":"")+r+(1===o.length?"0":"")+o+(1===s.length?"0":"")+s}functionj(t){vare=X.re.exec(t);returnnull!==e?X.parse(e):null}functionF(t){vare=K.re.exec(t);returnnull!==e?K.parse(e):null}functionH(t){return"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}functionY(t){returnT(t)<150?"white":"black"}functionz(t){vare,n,i,r,o;if(t=t.toLowerCase(),E(q,t)){if(null!==(e=A(q[t])))returne;throwError("Invalid named color definition")}returnnull!==(n=N(t))?n:null!==(i=A(t))?i:null!==(r=j(t))?r:(o=F(t),null!==o?o:null)}functionR(t){vare=z(t);if(null!==e)returne;throwError("Passed color string does not match any of the known color representations")}functionW(t){vare,n,i,r,o,s,a,l;if(t=t.toLowerCase(),E(q,t)){if(null!==(e=A(q[t])))returnn=e[0],i=e[1],r=e[2],[n,i,r,1];throwError("Invalid named color definition")}returnnull!==(o=N(t))?(n=o[0],i=o[1],r=o[2],
[n,i,r,1]):null!==(s=A(t))?(n=s[0],i=s[1],r=s[2],[n,i,r,1]):null!==(a=j(t))?(n=a[0],i=a[1],r=a[2],[n,i,r,1]):(l=F(t),null!==l?l:null)}functionV(t){vare=W(t);if(null!==e)returne;throwError("Passed color string does not match any of the known color representations")}varB,U,q,$,G,X,K;Object.defineProperty(e,"__esModule",{value:!0}),B=n(386),e.normalizeRedComponent=o,e.normalizeGreenComponent=s,e.normalizeBlueComponent=a,e.normalizeAlphaComponent=l,e.rgb=u,e.areEqualRgb=c,e.rgba=h,e.areEqualRgba=f,e.normalizeHue=d,e.normalizeHslSaturation=p,e.normalizeHsvSaturation=g,e.normalizeLightness=m,e.normalizeValue=y,e.hsl=v,e.areEqualHsl=b,e.hsv=_,e.areEqualHsv=w,e.rgbToHsl=x,e.hslToRgb=S,e.rgbToHsv=M,e.hsvToRgb=D,U=[.199,.687,.114],e.rgbToGrayscale=T,e.distanceRgb=C,e.invertRgb=P,e.darkenRgb=O,q={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",
pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},function(t){functione(t){return[o(parseInt(t[1],10)),s(parseInt(t[2],10)),a(parseInt(t[3],10))]}t.re=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,t.parse=e}($||($={})),e.rgbToString=L,function(t){functione(t){return[o(parseInt(t[1],16)),s(parseInt(t[2],16)),a(parseInt(t[3],16))]}t.re=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,t.parse=e}(G||(G={})),e.rgbToHexString=I,function(t){functione(t){return[o(parseInt(t[1]+t[1],16)),s(parseInt(t[2]+t[2],16)),a(parseInt(t[3]+t[3],16))]}t.re=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,t.parse=e}(X||(X={})),function(t){functione(t){return[o(parseInt(t[1],10)),s(parseInt(t[2],10)),a(parseInt(t[3],10)),l(parseFloat(t[4]))]}t.re=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/,t.parse=e}(K||(K={})),e.rgbaToString=H,e.rgbToBlackWhiteString=Y,e.tryParseRgb=z,e.parseRgb=R,e.tryParseRgba=W,e.parseRgba=V},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){vari=n(18),r=n(233),o=n(111),s=Object.defineProperty;e.f=n(55)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{returns(t,e,n)}catch(t){}if("get"inn||"set"inn)throwTypeError("Accessors not supported!");return"value"inn&&(t[e]=n.value),t}},function(t,e,n){(function(t){!function(e,n){t.exports=n()}(0,function(){"use strict";functione(){returnjn.apply(null,arguments)}functioni(t){jn=t}functionr(t){return"[object Array]"===Object.prototype.toString.call(t)}functiono(t){returntinstanceofDate||"[object Date]"===Object.prototype.toString.call(t)}functions(t,e){varn,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));returni}functiona(t,e){returnObject.prototype.hasOwnProperty.call(t,e)}functionl(t,e){for(varnine)a(e,n)&&(t[n]=e[n]);returna(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}functionu(t,e,n,i){returnOt(t,e,n,i,!0).utc()}functionc(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}functionh(t){returnnull==t._pf&&(t._pf=c()),t._pf}functionf(t){if(null==t._isValid){vare=h(t);t._isValid=!(isNaN(t._d.getTime())||!(e.overflow<0)||e.empty||e.invalidMonth||e.invalidWeekday||e.nullInput||e.invalidFormat||e.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void0===e.bigHour)}returnt._isValid}functiond(t){vare=u(NaN)
Rn=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Vn=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Bn=/^\/?Date\((\-?\d+)/i,e.createFromInputFallback=nt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=newDate(t._i+(t._useUTC?" UTC":""))}),I(0,["YY",2],0,function(){returnthis.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),T("year","y"),R("Y",rr),R("YY",Zi,Xi),R("YYYY",er,Qi),R("YYYYY",nr,Ji),R("YYYYYY",nr,Ji),B(["YYYYY","YYYYYY"],cr),B("YYYY",function(t,n){n[cr]=2===t.length?e.parseTwoDigitYear(t):v(t)}),B("YY",function(t,n){n[cr]=e.parseTwoDigitYear(t)}),e.parseTwoDigitYear=function(t){returnv(t)+(v(t)>68?1900:2e3)},Un=O("FullYear",!1),I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),R("w",Zi),R("ww",Zi,Xi),R("W",Zi),R("WW",Zi,Xi),U(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=v(t)}),qn={dow:0,doy:6},I("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),R("DDD",tr),R("DDDD",Ki),B(["DDD","DDDD"],function(t,e,n){n._dayOfYear=v(t)}),e.ISO_8601=function(){},$n=nt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){vart=Et.apply(null,arguments);returnt<this?this:t}),Gn=nt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){vart=Et.apply(null,arguments);returnt>this?this:t}),Ft("Z",":"),Ft("ZZ",""),R("Z",or),R("ZZ",or),B(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ht(t)}),Xn=/([\+\-]|\d\d)/gi,e.updateOffset=function(){},Kn=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Qn=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Jt.fn=It.prototype,Jn=ne(1,"add"),Zn=ne(-1,"subtract"),e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ti=nt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){returnvoid0===t?this.localeData():this.locale(t)}),I(0,["gg",2],0,function(){returnthis.weekYear()%100}),I(0,["GG",2],0,function(){returnthis.isoWeekYear()%100}),Ee("gggg","weekYear"),Ee("ggggg","weekYear"),Ee("GGGG","isoWeekYear"),Ee("GGGGG","isoWeekYear"),T("weekYear","gg"),T("isoWeekYear","GG"),R("G",rr),R("g",rr),R("GG",Zi,Xi),R("gg",Zi,Xi),R("GGGG",er,Qi),R("gggg",er,Qi),R("GGGGG",nr,Ji),R("ggggg",nr,Ji),U(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=v(t)}),U(["gg","GG"],function(t,n,i,r){n[r]=e.parseTwoDigitYear(t)
hi.hour=hi.hours=si,hi.minute=hi.minutes=ai,hi.second=hi.seconds=li,hi.millisecond=hi.milliseconds=ci,hi.utcOffset=Rt,hi.utc=Vt,hi.local=Bt,hi.parseZone=Ut,hi.hasAlignedHourOffset=qt,hi.isDST=$t,hi.isDSTShifted=Gt,hi.isLocal=Xt,hi.isUtcOffset=Kt,hi.isUtc=Qt,hi.isUTC=Qt,hi.zoneAbbr=Qe,hi.zoneName=Je,hi.dates=nt("dates accessor is deprecated. Use date instead.",ei),hi.months=nt("months accessor is deprecated. Use month instead",J),hi.years=nt("years accessor is deprecated. Use year instead",Un),hi.zone=nt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Wt),fi=hi,di={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},pi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},gi="Invalid date",mi="%d",yi=/\d{1,2}/,vi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},bi=_.prototype,bi._calendar=di,bi.calendar=en,bi._longDateFormat=pi,bi.longDateFormat=nn,bi._invalidDate=gi,bi.invalidDate=rn,bi._ordinal=mi,bi.ordinal=on,bi._ordinalParse=yi,bi.preparse=sn,bi.postformat=sn,bi._relativeTime=vi,bi.relativeTime=an,bi.pastFuture=ln,bi.set=un,bi.months=G,bi._months=Hn,bi.monthsShort=X,bi._monthsShort=Yn,bi.monthsParse=K,bi.week=ft,bi._week=qn,bi.firstDayOfYear=pt,bi.firstDayOfWeek=dt,bi.weekdays=Ye,bi._weekdays=ni,bi.weekdaysMin=Re,bi._weekdaysMin=ri,bi.weekdaysShort=ze,bi._weekdaysShort=ii,bi.weekdaysParse=We,bi.isPM=Ge,bi._meridiemParse=oi,bi.meridiem=Xe,S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){vare=t%10;returnt+(1===v(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=nt("moment.lang is deprecated. Use moment.locale instead.",S),e.langData=nt("moment.langData is deprecated. Use moment.localeData instead.",D),_i=Math.abs,wi=Tn("ms"),xi=Tn("s"),ki=Tn("m"),Si=Tn("h"),Mi=Tn("d"),Di=Tn("w"),Ti=Tn("M"),Ci=Tn("y"),Pi=Pn("milliseconds"),Oi=Pn("seconds"),Ei=Pn("minutes"),Ni=Pn("hours"),Li=Pn("days"),Ai=Pn("months"),Ii=Pn("years"),ji=Math.round,Fi={s:45,m:45,h:22,d:26,M:11},Hi=Math.abs,Yi=It.prototype,Yi.abs=yn,Yi.add=bn,Yi.subtract=_n,Yi.as=Mn,Yi.asMilliseconds=wi,Yi.asSeconds=xi,Yi.asMinutes=ki,Yi.asHours=Si,Yi.asDays=Mi,Yi.asWeeks=Di,Yi.asMonths=Ti,Yi.asYears=Ci,Yi.valueOf=Dn,Yi._bubble=xn,Yi.get=Cn,Yi.milliseconds=Pi,Yi.seconds=Oi,Yi.minutes=Ei,Yi.hours=Ni,Yi.days=Li,Yi.weeks=On,Yi.months=Ai,Yi.years=Ii,Yi.humanize=An,Yi.toISOString=In,Yi.toString=In,Yi.toJSON=In,Yi.locale=be,Yi.localeData=_e,Yi.toIsoString=nt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",In),Yi.lang=ti,I("X",0,0,"unix"),I("x",0,0,"valueOf"),R("x",rr),R("X",sr),B("X",function(t,e,n){n._d=newDate(1e3*parseFloat(t,10))}),B("x",function(t,e,n){n._d=newDate(v(t))}),e.version="2.10.6",i(Et),e.fn=fi,e.min=Lt,e.max=At,e.utc=u,e.unix=Ze,e.months=fn,
e.isDate=o,e.locale=S,e.invalid=d,e.duration=Jt,e.isMoment=m,e.weekdays=pn,e.parseZone=tn,e.localeData=D,e.isDuration=jt,e.monthsShort=dn,e.weekdaysMin=mn,e.defineLocale=M,e.weekdaysShort=gn,e.normalizeUnits=C,e.relativeTimeThreshold=Ln,e})}).call(e,n(50)(t))},,,,,,,,,,,function(t,e){t.exports=function(t){returnt.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){varn={}.hasOwnProperty;t.exports=function(t,e){returnn.call(t,e)}},,,,function(t,e,n){t.exports=!n(37)(function(){return7!=Object.defineProperty({},"a",{get:function(){return7}}).a})},,,,,,function(t,e,n){vari=n(172),r=n(83);t.exports=function(t){returni(r(t))}},function(t,e,n){vari=n(136),r=Math.min;t.exports=function(t){returnt>0?r(i(t),9007199254740991):0}},,,,,,,,,,,,function(t,e,n){vari=n(94);t.exports=function(t,e,n){if(i(t),void0===e)returnt;switch(n){case1:returnfunction(n){returnt.call(e,n)};case2:returnfunction(n,i){returnt.call(e,n,i)};case3:returnfunction(n,i,r){returnt.call(e,n,i,r)}}returnfunction(){returnt.apply(e,arguments)}}},function(t,e){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vari,r,o;Object.defineProperty(e,"__esModule",{value:!0}),i=Object.assign||function(t){vare,n,i;for(e=1;e<arguments.length;e++){n=arguments[e];for(iinn)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}returnt},r={type:"logger",log:function(t){this._output("log",t)},warn:function(t){this._output("warn",t)},error:function(t){this._output("error",t)},_output:function(t,e){console&&console[t]&&console[t].apply(console,Array.prototype.slice.call(e))}},o=function(){functiont(e){vari=arguments.length<=1||void0===arguments[1]?{}:arguments[1];n(this,t),this.subs=[],this.init(e,i)}returnt.prototype.init=function(t){vare=arguments.length<=1||void0===arguments[1]?{}:arguments[1];this.prefix=e.prefix||"i18next:",this.logger=t||r,this.options=e,this.debug=!1!==e.debug},t.prototype.setDebug=function(t){this.debug=t,this.subs.forEach(function(e){e.setDebug(t)})},t.prototype.log=function(){this.forward(arguments,"log","",!0)},t.prototype.warn=function(){this.forward(arguments,"warn","",!0)},t.prototype.error=function(){this.forward(arguments,"error","")},t.prototype.deprecate=function(){this.forward(arguments,"warn","WARNING DEPRECATED: ",!0)},t.prototype.forward=function(t,e,n,i){i&&!this.debug||("string"==typeoft[0]&&(t[0]=n+this.prefix+" "+t[0]),this.logger[e](t))},t.prototype.create=function(e){varn=newt(this.logger,i({prefix:this.prefix+":"+e+":"},this.options));returnthis.subs.push(n),n},t}(),e.default=newo},,,,,,,function(t,e){varn={}.toString;t.exports=function(t){returnn.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void0==t)throwTypeError("Can't call method on "+t);returnt}},function(t,e,n){vari=n(38),r=n(85);t.exports=n(55)?function(t,e,n){returni.f(t,e,r(1,n))}:function(t,e,n){returnt[e]=n,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),
e.isDate=o,e.locale=S,e.invalid=d,e.duration=Jt,e.isMoment=m,e.weekdays=pn,e.parseZone=tn,e.localeData=D,e.isDuration=jt,e.monthsShort=dn,e.weekdaysMin=mn,e.defineLocale=M,e.weekdaysShort=gn,e.normalizeUnits=C,e.relativeTimeThreshold=Ln,e})}).call(e,n(50)(t))},,,,,,,,,,function(t,e){t.exports=function(t){returnt.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){varn={}.hasOwnProperty;t.exports=function(t,e){returnn.call(t,e)}},,,,function(t,e,n){t.exports=!n(38)(function(){return7!=Object.defineProperty({},"a",{get:function(){return7}}).a})},,,,,,function(t,e,n){vari=n(172),r=n(83);t.exports=function(t){returni(r(t))}},function(t,e,n){vari=n(136),r=Math.min;t.exports=function(t){returnt>0?r(i(t),9007199254740991):0}},,,,,,,,,,,,function(t,e,n){vari=n(94);t.exports=function(t,e,n){if(i(t),void0===e)returnt;switch(n){case1:returnfunction(n){returnt.call(e,n)};case2:returnfunction(n,i){returnt.call(e,n,i)};case3:returnfunction(n,i,r){returnt.call(e,n,i,r)}}returnfunction(){returnt.apply(e,arguments)}}},function(t,e){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vari,r,o;Object.defineProperty(e,"__esModule",{value:!0}),i=Object.assign||function(t){vare,n,i;for(e=1;e<arguments.length;e++){n=arguments[e];for(iinn)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}returnt},r={type:"logger",log:function(t){this._output("log",t)},warn:function(t){this._output("warn",t)},error:function(t){this._output("error",t)},_output:function(t,e){console&&console[t]&&console[t].apply(console,Array.prototype.slice.call(e))}},o=function(){functiont(e){vari=arguments.length<=1||void0===arguments[1]?{}:arguments[1];n(this,t),this.subs=[],this.init(e,i)}returnt.prototype.init=function(t){vare=arguments.length<=1||void0===arguments[1]?{}:arguments[1];this.prefix=e.prefix||"i18next:",this.logger=t||r,this.options=e,this.debug=!1!==e.debug},t.prototype.setDebug=function(t){this.debug=t,this.subs.forEach(function(e){e.setDebug(t)})},t.prototype.log=function(){this.forward(arguments,"log","",!0)},t.prototype.warn=function(){this.forward(arguments,"warn","",!0)},t.prototype.error=function(){this.forward(arguments,"error","")},t.prototype.deprecate=function(){this.forward(arguments,"warn","WARNING DEPRECATED: ",!0)},t.prototype.forward=function(t,e,n,i){i&&!this.debug||("string"==typeoft[0]&&(t[0]=n+this.prefix+" "+t[0]),this.logger[e](t))},t.prototype.create=function(e){varn=newt(this.logger,i({prefix:this.prefix+":"+e+":"},this.options));returnthis.subs.push(n),n},t}(),e.default=newo},,,,,,,function(t,e){varn={}.toString;t.exports=function(t){returnn.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void0==t)throwTypeError("Can't call method on "+t);returnt}},function(t,e,n){vari=n(39),r=n(85);t.exports=n(55)?function(t,e,n){returni.f(t,e,r(1,n))}:function(t,e,n){returnt[e]=n,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),
writable:!(4&t),value:e}}},,,,,,,,,function(t,e){t.exports=function(t){if("function"!=typeoft)throwTypeError(t+" is not a function!");returnt}},function(t,e,n){vari=n(22)("unscopables"),r=Array.prototype;void0==r[i]&&n(84)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e){varn=t.exports={version:"2.4.0"};"number"==typeof__e&&(__e=n)},function(t,e,n){vari=n(109),r=n(85),o=n(61),s=n(111),a=n(51),l=n(233),u=Object.getOwnPropertyDescriptor;e.f=n(55)?u:function(t,e){if(t=o(t),e=s(e,!0),l)try{returnu(t,e)}catch(t){}if(a(t,e))returnr(!i.f.call(t,e),t[e])}},function(t,e,n){vari=n(242),r=n(169);t.exports=Object.keys||function(t){returni(t,r)}},function(t,e,n){vari=n(20),r=n(84),o=n(51),s=n(112)("src"),a="toString",l=Function[a],u=(""+l).split(a);n(96).inspectSource=function(t){returnl.call(t)},(t.exports=function(t,e,n,a){varl="function"==typeofn;l&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(o(n,s)||r(n,s,t[e]?""+t[e]:u.join(e+""))),t===i?t[e]=n:a?t[e]?t[e]=n:r(t,e,n):(deletet[e],r(t,e,n)))})(Function.prototype,a,function(){return"function"==typeofthis&&this[s]||l.call(this)})},function(t,e,n){vari=n(83);t.exports=function(t){returnObject(i(t))}},,,,,function(t,e){"use strict";varn=window.Modernizr=function(t,e,n){functioni(t){v.cssText=t}functionr(t,e){returntypeoft===e}functiono(t,e){return!!~(""+t).indexOf(e)}functions(t,e){vari,r;for(iint)if(r=t[i],!o(r,"-")&&v[r]!==n)return"pfx"!=e||r;return!1}functiona(t,e,i){varo,s;for(oint)if((s=e[t[o]])!==n)return!1===i?t[o]:r(s,"function")?s.bind(i||e):s;return!1}functionl(t,e,n){vari=t.charAt(0).toUpperCase()+t.slice(1),o=(t+" "+w.join(i+" ")+i).split(" ");returnr(e,"string")||r(e,"undefined")?s(o,e):(o=(t+" "+x.join(i+" ")+i).split(" "),a(o,e,n))}varu,c,h,f="2.8.3",d={},p=!0,g=e.documentElement,m="modernizr",y=e.createElement(m),v=y.style,b=" -webkit- -moz- -o- -ms- ".split(" "),_="Webkit Moz O ms",w=_.split(" "),x=_.toLowerCase().split(" "),k={},S=[],M=S.slice,D=function(t,n,i,r){varo,s,a,l,u=e.createElement("div"),c=e.body,h=c||e.createElement("body");if(parseInt(i,10))for(;i--;)a=e.createElement("div"),a.id=r?r[i]:m+(i+1),u.appendChild(a);returno='­<style id="s'+m+'">'+t+"</style>",u.id=m,(c?u:h).innerHTML+=o,h.appendChild(u),c||(h.style.background="",h.style.overflow="hidden",l=g.style.overflow,g.style.overflow="hidden",g.appendChild(h)),s=n(u,t),c?u.parentNode.removeChild(u):(h.parentNode.removeChild(h),g.style.overflow=l),!!s},T=function(){functiont(t,o){o=o||e.createElement(i[t]||"div"),t="on"+t;vars=tino;returns||(o.setAttribute||(o=e.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(t,""),s=r(o[t],"function"),r(o[t],"undefined")||(o[t]=n),o.removeAttribute(t))),o=null,s}vari={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};returnt}(),C={}.hasOwnProperty;c=r(C,"undefined")||r(C.call,"undefined")?function(t,e){returneint&&r(t.constructor.prototype[e],"undefined")}:function(t,e){returnC.call(t,e)},
;varn,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))returnr;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))returnr;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))returnr;throwTypeError("Can't convert object to primitive value")}},function(t,e){varn=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void0===t?"":t,")_",(++n+i).toString(36))}},,function(t,e){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});vari=function(){functiont(){n(this,t),this.observers={}}returnt.prototype.on=function(t,e){varn=this;t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)})},t.prototype.off=function(t,e){varn=this;this.observers[t]&&this.observers[t].forEach(function(){if(e){vari=n.observers[t].indexOf(e);i>-1&&n.observers[t].splice(i,1)}elsedeleten.observers[t]})},t.prototype.emit=function(t){for(vare=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.observers[t]&&this.observers[t].forEach(function(t){t.apply(void0,n)}),this.observers["*"]&&this.observers["*"].forEach(function(e){vari;e.apply(e,(i=[t]).concat.apply(i,n))})},t}();e.default=i},function(t,e){"use strict";functionn(t){returnnull==t?"":""+t}functioni(t,e,n){t.forEach(function(t){e[t]&&(n[t]=e[t])})}functionr(t,e,n){functioni(t){returnt&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}for(varr,o="string"!=typeofe?[].concat(e):e.split(".");o.length>1;){if(!t)return{};r=i(o.shift()),!t[r]&&n&&(t[r]=newn),t=t[r]}returnt?{obj:t,k:i(o.shift())}:{}}functiono(t,e,n){vari=r(t,e,Object);i.obj[i.k]=n}functions(t,e,n,i){varo=r(t,e,Object),s=o.obj,a=o.k;s[a]=s[a]||[],i&&(s[a]=s[a].concat(n)),i||s[a].push(n)}functiona(t,e){varn=r(t,e),i=n.obj,o=n.k;if(i)returni[o]}functionl(t,e,n){for(variine)iint?"string"==typeoft[i]||t[i]instanceofString||"string"==typeofe[i]||e[i]instanceofString?n&&(t[i]=e[i]):l(t[i],e[i],n):t[i]=e[i];returnt}functionu(t){returnt.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}functionc(t){return"string"==typeoft?t.replace(/[&<>"'\/]/g,function(t){returnh[t]}):t}Object.defineProperty(e,"__esModule",{value:!0}),e.makeString=n,e.copy=i,e.setPath=o,e.pushPath=s,e.getPath=a,e.deepExtend=l,e.regexEscape=u,e.escape=c;varh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}},,,,,,,,,,,,,,,function(t,e,n){vari,r;(function(){functionn(t){functione(e,n,i,r,o,s){for(;o>=0&&o<s;o+=t){vara=r?r[o]:o;i=n(i,e[a],a,e)}returni}returnfunction(n,i,r,o){i=l(i,o,4);vars=!g(n)&&U.keys(n),a=(s||n).length,u=t>0?0:a-1;returnarguments.length<3&&(r=n[s?s[u]:u],u+=t),e(n,i,r,s,u,a)}}functiono(t){returnfunction(e,n,i){varr,o;for(n=u(n,i),r=p(e),o=t>0?0:r-1;o>=0&&o<r;o+=t)if(n(e[o],o,e))returno;return-1}}functions(t,e,n){returnfunction(i,r,o){vars=0,a=p(i);if("number"==typeofo)t>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;elseif(n&&o&&a)returno=n(i,r),i[o]===r?o:-1
;U.prototype[t]=function(){returnO(this,e.apply(this._wrapped,arguments))}}),U.prototype.value=function(){returnthis._wrapped},U.prototype.valueOf=U.prototype.toJSON=U.prototype.value,U.prototype.toString=function(){return""+this._wrapped},i=[],void0!==(r=function(){returnU}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e){t.exports={}},function(t,e){t.exports=!1},function(t,e,n){vari=n(18),r=n(404),o=n(169),s=n(182)("IE_PROTO"),a=function(){},l="prototype",u=function(){vart,e=n(168)("iframe"),i=o.length,r="<",s=">";for(e.style.display="none",n(232).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+s+"document.F=Object"+r+"/script"+s),t.close(),u=t.F;i--;)deleteu[l][o[i]];returnu()};t.exports=Object.create||function(t,e){varn;returnnull!==t?(a[l]=i(t),n=newa,a[l]=null,n[s]=t):n=u(),void0===e?n:r(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){vari=n(136),r=Math.max,o=Math.min;t.exports=function(t,e){returnt=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e){varn=Math.ceil,i=Math.floor;t.exports=function(t){returnisNaN(t=+t)?0:(t>0?i:n)(t)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(387)},function(t,e){t.exports=function(t,e,n,i){if(!(tinstanceofe)||void0!==i&&iint)throwTypeError(n+": incorrect invocation!");returnt}},function(t,e,n){vari=n(29),r=n(20).document,o=i(r)&&i(r.createElement);t.exports=function(t){returno?r.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){vari=n(22)("match");t.exports=function(t){vare=/./;try{"/./"[t](e)}catch(n){try{returne[i]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){vari=n(74),r=n(238),o=n(235),s=n(18),a=n(62),l=n(248),u={},c={};e=t.exports=function(t,e,n,h,f){vard,p,g,m,y=f?function(){returnt}:l(t),v=i(n,h,e?2:1),b=0;if("function"!=typeofy)throwTypeError(t+" is not iterable!");if(o(y)){for(d=a(t.length);d>b;b++)if((m=e?v(s(p=t[b])[0],p[1]):v(t[b]))===u||m===c)returnm}elsefor(g=y.call(t);!(p=g.next()).done;)if((m=r(g,v,p.value,e))===u||m===c)returnm},e.BREAK=u,e.RETURN=c},function(t,e,n){vari=n(82);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";vari=n(132),r=n(4),o=n(99),s=n(84),a=n(51),l=n(131),u=n(239),c=n(110),h=n(108),f=n(22)("iterator"),d=!([].keys&&"next"in[].keys()),p="keys",g="values",m=function(){returnthis};t.exports=function(t,e,n,y,v,b,_){varw,x,k,S,M,D,T,C,P,O,E,N;if(u(n,e,y),w=function(t){if(!d&&tinM)returnM[t];switch(t){casep:caseg:returnfunction(){returnnewn(this,t)}}returnfunction(){returnnewn(this,t)}},x=e+" Iterator",k=v==g,S=!1,M=t.prototype,D=M[f]||M["@@iterator"]||v&&M[v],T=D||w(v),C=v?k?w("entries"):T:void0,P="Array"==e?M.entries||D:D,P&&(N=h(P.call(newt)))!==Object.prototype&&(c(N,x,!0),i||a(N,f)||s(N,f,m)),k&&D&&D.name!==g&&(S=!0,T=function(){returnD.call(this)}),i&&!_||!d&&!S&&M[f]||s(M,f,T),l[e]=T,l[x]=m,v)if(O={
values:k?T:w(g),keys:b?T:w(p),entries:C},_)for(EinO)EinM||o(M,E,O[E]);elser(r.P+r.F*(d||S),e,O);returnO}},function(t,e,n){vari,r=n(22)("iterator"),o=!1;try{i=[7][r](),i.return=function(){o=!0},Array.from(i,function(){throw2})}catch(t){}t.exports=function(t,e){varn,i,s;if(!e&&!o)return!1;n=!1;try{i=[7],s=i[r](),s.next=function(){return{done:n=!0}},i[r]=function(){returns},t(i)}catch(t){}returnn}},function(t,e){varn=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e){t.exports=Math.sign||function(t){return0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){vari=n(112)("meta"),r=n(29),o=n(51),s=n(38).f,a=0,l=Object.isExtensible||function(){return!0},u=!n(37)(function(){returnl(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+++a,w:{}}})},h=function(t,e){if(!r(t))return"symbol"==typeoft?t:("string"==typeoft?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";c(t)}returnt[i].i},f=function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;c(t)}returnt[i].w},d=function(t){returnu&&p.NEED&&l(t)&&!o(t,i)&&c(t),t},p=t.exports={KEY:i,NEED:!1,fastKey:h,getWeak:f,onFreeze:d}},function(t,e,n){vari=n(242),r=n(169).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){returni(t,r)}},function(t,e,n){vari=n(99);t.exports=function(t,e,n){for(varrine)i(t,r,e[r],n);returnt}},function(t,e,n){vari=n(29),r=n(18),o=function(t,e){if(r(t),!i(e)&&null!==e)throwTypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(74)(Function.call,n(97).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(tinstanceofArray)}catch(t){e=!0}returnfunction(t,n){returno(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void0),check:o}},function(t,e,n){"use strict";vari=n(20),r=n(38),o=n(55),s=n(22)("species");t.exports=function(t){vare=i[t];o&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){returnthis}})}},function(t,e,n){vari=n(183)("keys"),r=n(112);t.exports=function(t){returni[t]||(i[t]=r(t))}},function(t,e,n){vari=n(20),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){returno[t]||(o[t]={})}},function(t,e,n){vari=n(400),r=n(83);t.exports=function(t,e,n){if(i(e))throwTypeError("String#"+n+" doesn't accept regex!");returnr(t)+""}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){vari=n(61),r=n(62),o=n(135);t.exports=function(t){returnfunction(e,n,s){vara,l=i(e),u=r(l.length),c=o(s,u);if(t&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}elsefor(;u>c;c++)if((t||cinl)&&l[c]===n)returnt||c||0;return!t&&-1}}},function(t,e,n){vari=n(74),r=n(172),o=n(100),s=n(62),a=n(394);t.exports=function(t,e){varn=1==t,l=2==t,u=3==t,c=4==t,h=6==t,f=5==t||h,d=e||a;returnfunction(e,a,p){for(varg,m,y=o(e),v=r(y),b=i(a,p,3),_=s(v.length),w=0,x=n?d(e,_):l?d(e,0):void0;_>w;w++)if((f||winv)&&(g=v[w],m=b(g,w,y),
values:k?T:w(g),keys:b?T:w(p),entries:C},_)for(EinO)EinM||o(M,E,O[E]);elser(r.P+r.F*(d||S),e,O);returnO}},function(t,e,n){vari,r=n(22)("iterator"),o=!1;try{i=[7][r](),i.return=function(){o=!0},Array.from(i,function(){throw2})}catch(t){}t.exports=function(t,e){varn,i,s;if(!e&&!o)return!1;n=!1;try{i=[7],s=i[r](),s.next=function(){return{done:n=!0}},i[r]=function(){returns},t(i)}catch(t){}returnn}},function(t,e){varn=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e){t.exports=Math.sign||function(t){return0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){vari=n(112)("meta"),r=n(29),o=n(51),s=n(39).f,a=0,l=Object.isExtensible||function(){return!0},u=!n(38)(function(){returnl(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+++a,w:{}}})},h=function(t,e){if(!r(t))return"symbol"==typeoft?t:("string"==typeoft?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";c(t)}returnt[i].i},f=function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;c(t)}returnt[i].w},d=function(t){returnu&&p.NEED&&l(t)&&!o(t,i)&&c(t),t},p=t.exports={KEY:i,NEED:!1,fastKey:h,getWeak:f,onFreeze:d}},function(t,e,n){vari=n(242),r=n(169).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){returni(t,r)}},function(t,e,n){vari=n(99);t.exports=function(t,e,n){for(varrine)i(t,r,e[r],n);returnt}},function(t,e,n){vari=n(29),r=n(18),o=function(t,e){if(r(t),!i(e)&&null!==e)throwTypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(74)(Function.call,n(97).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(tinstanceofArray)}catch(t){e=!0}returnfunction(t,n){returno(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void0),check:o}},function(t,e,n){"use strict";vari=n(20),r=n(39),o=n(55),s=n(22)("species");t.exports=function(t){vare=i[t];o&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){returnthis}})}},function(t,e,n){vari=n(183)("keys"),r=n(112);t.exports=function(t){returni[t]||(i[t]=r(t))}},function(t,e,n){vari=n(20),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){returno[t]||(o[t]={})}},function(t,e,n){vari=n(400),r=n(83);t.exports=function(t,e,n){if(i(e))throwTypeError("String#"+n+" doesn't accept regex!");returnr(t)+""}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){vari=n(61),r=n(62),o=n(135);t.exports=function(t){returnfunction(e,n,s){vara,l=i(e),u=r(l.length),c=o(s,u);if(t&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}elsefor(;u>c;c++)if((t||cinl)&&l[c]===n)returnt||c||0;return!t&&-1}}},function(t,e,n){vari=n(74),r=n(172),o=n(100),s=n(62),a=n(394);t.exports=function(t,e){varn=1==t,l=2==t,u=3==t,c=4==t,h=6==t,f=5==t||h,d=e||a;returnfunction(e,a,p){for(varg,m,y=o(e),v=r(y),b=i(a,p,3),_=s(v.length),w=0,x=n?d(e,_):l?d(e,0):void0;_>w;w++)if((f||winv)&&(g=v[w],m=b(g,w,y),
i=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeofpostMessage&&!c.importScripts?(i=function(t){c.postMessage(t+"","*")},c.addEventListener("message",b,!1)):i=yinu("script")?function(t){l.appendChild(u("script"))[y]=function(){l.removeChild(this),v.call(t)}}:function(t){setTimeout(s(v,t,1),0)}),t.exports={set:f,clear:d}},function(t,e,n){e.f=n(22)},function(t,e,n){vari=n(228),r=n(22)("iterator"),o=n(131);t.exports=n(96).getIteratorMethod=function(t){if(void0!=t)returnt[r]||t["@@iterator"]||o[i(t)]}},,,,,,,,,,,,,,,,,function(t,e,n){"use strict";functioni(t){returnt&&t.__esModule?t:{default:t}}functionr(t){returnt.interpolation={unescapeSuffix:"HTML"},t.interpolation.prefix=t.interpolationPrefix||"__",t.interpolation.suffix=t.interpolationSuffix||"__",t.interpolation.escapeValue=t.escapeInterpolation||!1,t.interpolation.nestingPrefix=t.reusePrefix||"$t(",t.interpolation.nestingSuffix=t.reuseSuffix||")",t}functiono(t){returnt.resStore&&(t.resources=t.resStore),t.ns&&t.ns.defaultNs?(t.defaultNS=t.ns.defaultNs,t.ns=t.ns.namespaces):t.defaultNS=t.ns||"translation",t.fallbackToDefaultNS&&t.defaultNS&&(t.fallbackNS=t.defaultNS),t.saveMissing=t.sendMissing,t.saveMissingTo=t.sendMissingTo||"current",t.returnNull=!t.fallbackOnNull,t.returnEmptyString=!t.fallbackOnEmpty,t.returnObjects=t.returnObjectTrees,t.joinArrays="\n",t.returnedObjectHandler=t.objectTreeKeyHandler,t.parseMissingKeyHandler=t.parseMissingKey,t.appendNamespaceToMissingKey=!0,t.nsSeparator=t.nsseparator,t.keySeparator=t.keyseparator,"sprintf"===t.shortcutFunction&&(t.overloadTranslationOptionHandler=function(t){vare,n=[];for(e=1;e<t.length;e++)n.push(t[e]);return{postProcess:"sprintf",sprintf:n}}),t.whitelist=t.lngWhitelist,t.preload=t.preload,"current"===t.load&&(t.load="currentOnly"),"unspecific"===t.load&&(t.load="languageOnly"),t.backend=t.backend||{},t.backend.loadPath=t.resGetPath||"locales/__lng__/__ns__.json",t.backend.addPath=t.resPostPath||"locales/add/__lng__/__ns__",t.backend.allowMultiLoading=t.dynamicLoad,t.cache=t.cache||{},t.cache.prefix="res_",t.cache.expirationTime=6048e5,t.cache.enabled=!!t.useLocalStorage,t=r(t),t.defaultVariables&&(t.interpolation.defaultVariables=t.defaultVariables),t}functions(t){returnt=r(t),t.joinArrays="\n",t}functiona(t){return(t.interpolationPrefix||t.interpolationSuffix||t.escapeInterpolation)&&(t=r(t)),t.nsSeparator=t.nsseparator,t.keySeparator=t.keyseparator,t.returnObjects=t.returnObjectTrees,t}functionl(t){t.lng=function(){returnc.default.deprecate("i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup."),t.services.languageUtils.toResolveHierarchy(t.language)[0]},t.preload=function(e,n){c.default.deprecate("i18next.preload() can be replaced with i18next.loadLanguages()"),t.loadLanguages(e,n)},t.setLng=function(e,n,i){if(c.default.deprecate("i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace."),
"function"==typeofn&&(i=n,n={}),n||(n={}),!0===n.fixLng&&i)returni(null,t.getFixedT(e));t.changeLanguage(e,i)},t.addPostProcessor=function(e,n){c.default.deprecate("i18next.addPostProcessor() can be replaced by i18next.use({ type: 'postProcessor', name: 'name', process: fc })"),t.use({type:"postProcessor",name:e,process:n})}}varu,c;Object.defineProperty(e,"__esModule",{value:!0}),e.convertAPIOptions=o,e.convertJSONOptions=s,e.convertTOptions=a,e.appendBackwardsAPI=l,u=n(75),c=i(u)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,i,r){varo=this;returnt.forEach(function(t){o.processors[t]&&(e=o.processors[t].process(e,n,i,r))}),e}}},function(t,e,n){t.exports=n(564).default},function(t,e,n){!function(t,e){e(n(39))}(0,function(t){"use strict";returnt.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){vare=t%10;returnt+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})},function(t,e,n){!function(t,e){e(n(39))}(0,function(t){"use strict";vare="Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),n="Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic".split("_");returnt.defineLocale("es",{months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:function(t,i){return/-MMM-/.test(i)?n[t.month()]:e[t.month()]},weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},
})).addClass("tvcolorpicker-user-swatches")),t(document.body).append(U),T(B,U,e),U}functionP(){t(".tvcolorpicker-popup").removeClass("opened").remove(),t(O).off("change"),t(O).off("afterChange"),t(E).data("tvcolorpicker",null),t(E).each(function(){vare,n=t(this).data("tvcolorpicker-custom-color");n&&(x(n)&&t(this).trigger("customcolorchange",[b]),t(this).data("tvcolorpicker-custom-color",null)),e=t(this).data("tvcolorpicker-previous-color"),e&&e!=t(this).val()&&t(this).trigger("change"),t(this).removeData("tvcolorpicker-previous-color")})}varO,E;returnw=t.extend({},i.options,w||{}),E=this,w&&"customColors"inw&&n(w.customColors),this.each(function(){functionn(){vart=e(s.val());M.call(s,t)}vari,r,o,s=t(this);s.val(e(s.val())),i=null,r=!1,s.addClass("tvcolorpicker-widget").attr("autocomplete","off").attr("readonly",!0),o=function(){s.data("tvcolorpicker")||(P.call(s),i=C.call(s,w),s.data("tvcolorpicker-custom-color",null),s.data("tvcolorpicker",i),s.data("tvcolorpicker-previous-color",s.val()),i.bind("mousedown click",function(e){t(e.target).parents().andSelf().is(i)&&(s.focus(),r=!0,setTimeout(function(){r=!1},0))}))},s.on("touchstart",o),s.focus(o),P.call(s),s.bind("blur",function(t){r?t.stopPropagation():P.call(s)}),s.change(function(t){n()}),n()})}varv,b,_;if(!t)throwError("This program cannot be run in DOS mode");i.setCustomColors=n,t.fn.tvcolorpicker=i,v=10,b=[],_="rgb(14, 15, 16)",i.options={direction:"down",offset:0,drift:0}}(window.jQuery)},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){vari,r;!function(t){"use strict";functione(t){vare=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeofe&&e>0&&e-1int))}varn,i,r,o,s,a,l;if(!t.jQuery){n=function(t,e){returnnewn.fn.init(t,e)},n.isWindow=function(t){returnt&&t===t.window},n.type=function(t){returnt?"object"==typeoft||"function"==typeoft?r[s.call(t)]||"object":typeoft:t+""},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){vare;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(eint);returnvoid0===e||o.call(t,e)},n.each=function(t,n,i){varr=0,o=t.length,s=e(t);if(i){if(s)for(;r<o&&!1!==n.apply(t[r],i);r++);elsefor(rint)if(t.hasOwnProperty(r)&&!1===n.apply(t[r],i))break}elseif(s)for(;r<o&&!1!==n.call(t[r],r,t[r]);r++);elsefor(rint)if(t.hasOwnProperty(r)&&!1===n.call(t[r],r,t[r]))break;returnt},n.data=function(t,e,r){varo,s,a;if(void0===r){if(o=t[n.expando],s=o&&i[o],void0===e)returns;if(s&&eins)returns[e]}elseif(void0!==e)returna=t[n.expando]||(t[n.expando]=++n.uuid),i[a]=i[a]||{},i[a][e]=r,r},n.removeData=function(t,e){varr=t[n.expando],o=r&&i[r];o&&(e?n.each(e,function(t,e){deleteo[e]}):deletei[r])},n.extend=function(){vart,e,i,r,o,s,a=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeofa&&(c=a,a=arguments[l]||{},l++),
if(i===r)if((!0===k||C.isString(k))&&(p.each(p.queue(i,C.isString(k)?k:""),function(t,e){C.isFunction(e)&&e(null,!0)}),p.queue(i,C.isString(k)?k:"",[])),"stop"===x){vara=s(i);a&&a.tweensContainer&&!1!==o&&p.each(a.tweensContainer,function(t,e){e.endValue=e.currentValue}),L.push(t)}else"finish"!==x&&"finishAll"!==x||(e[2].duration=1)})})}),"stop"===x&&(p.each(L,function(t,e){d(e,!0)}),S.promise&&S.resolver(w)),t();default:if(!p.isPlainObject(x)||C.isEmptyObject(x))returnC.isString(x)&&y.Redirects[x]?(u=p.extend({},k),A=u.duration,I=u.delay||0,!0===u.backwards&&(w=p.extend(!0,[],w).reverse()),p.each(w,function(t,e){parseFloat(u.stagger)?u.delay=I+parseFloat(u.stagger)*t:C.isFunction(u.stagger)&&(u.delay=I+u.stagger.call(e,t,M)),u.drag&&(u.duration=parseFloat(A)||(/^(callout|transition)/.test(x)?1e3:g),u.duration=Math.max(u.duration*(u.backwards?1-t/M:(t+1)/M),.75*u.duration,200)),y.Redirects[x].call(e,e,u||{},t,M,w,S.promise?S:i)}),t()):(j="Velocity: First argument ("+x+") was not a property map, a known action, or a registered redirect. Aborting.",S.promise?S.rejecter(Error(j)):e.console&&console.log(j),t());E="start"}if(F={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},H=[],p.each(w,function(t,e){C.isNode(e)&&r(e,t)}),u=p.extend({},y.defaults,k),u.loop=parseInt(u.loop,10),Y=2*u.loop-1,u.loop)for(z=0;z<Y;z++)R={delay:u.delay,progress:u.progress},z===Y-1&&(R.display=u.display,R.visibility=u.visibility,R.complete=u.complete),_(w,"reverse",R);returnt()},y=p.extend(_,y),y.animate=_,w=e.requestAnimationFrame||S,y.State.isMobile||n.hidden===i||(x=function(){n.hidden?(w=function(t){returnsetTimeout(function(){t(!0)},16)},f()):w=e.requestAnimationFrame||S},x(),n.addEventListener("visibilitychange",x)),t.Velocity=y,t!==e&&(t.fn.velocity=_,t.fn.velocity.defaults=y.defaults),p.each(["Down","Up"],function(t,e){y.Redirects["slide"+e]=function(t,n,r,o,s,a){varl=p.extend({},n),u=l.begin,c=l.complete,h={},f={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===i&&(l.display="Down"===e?"inline"===y.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),l.begin=function(){varn,i;0===r&&u&&u.call(s,s);for(ninf)f.hasOwnProperty(n)&&(h[n]=t.style[n],i=b.getPropertyValue(t,n),f[n]="Down"===e?[i,0]:[0,i]);h.overflow=t.style.overflow,t.style.overflow="hidden"},l.complete=function(){for(vareinh)h.hasOwnProperty(e)&&(t.style[e]=h[e]);r===o-1&&(c&&c.call(s,s),a&&a.resolver(s))},y(t,f,l)}}),p.each(["In","Out"],function(t,e){y.Redirects["fade"+e]=function(t,n,r,o,s,a){varl=p.extend({},n),u=l.complete,c={opacity:"In"===e?1:0};0!==r&&(l.begin=null),l.complete=r!==o-1?null:function(){u&&u.call(s,s),a&&a.resolver(s)},l.display===i&&(l.display="In"===e?"auto":"none"),y(this,c,l)}}),y)}(window.jQuery||window.Zepto||window,window,window?window.document:void0)})},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e){"use strict";functionn(t){return"number"==typeoft&&isFinite(t)}
functioni(t){return"number"==typeoft&&t%1==0}functionr(t){return!(t<=0||t>0)}Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=n,e.isInteger=i,e.isNaN=r},function(t,e,n){!function(){functionn(){return{keys:Object.keys||function(t){if("object"!=typeoft&&"function"!=typeoft||null===t)thrownewTypeError("keys() called on a non-object");vare,n=[];for(eint)t.hasOwnProperty(e)&&(n[n.length]=e);returnn},uniqueId:function(t){vare=++s+"";returnt?t+e:e},has:function(t,e){returnr.call(t,e)},each:function(t,e,n){varr,o,s;if(null!=t)if(i&&t.forEach===i)t.forEach(e,n);elseif(t.length===+t.length)for(r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t);elsefor(sint)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){vare,n=!1;returnfunction(){returnn?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}}}vari=Array.prototype.forEach,r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,s=0,a=n(),l={on:function(t,e,n){returnc(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){vari,r;returnc(this,"once",t,[e,n])&&e?(i=this,r=a.once(function(){i.off(t,r),e.apply(this,arguments)}),r._callback=e,this.on(t,r,n)):this},off:function(t,e,n){vari,r,o,s,l,u,h,f;if(!this._events||!c(this,"off",t,[e,n]))returnthis;if(!t&&!e&&!n)returnthis._events={},this;for(s=t?[t]:a.keys(this._events),l=0,u=s.length;l<u;l++)if(t=s[l],o=this._events[t]){if(this._events[t]=i=[],e||n)for(h=0,f=o.length;h<f;h++)r=o[h],(e&&e!==r.callback&&e!==r.callback._callback||n&&n!==r.context)&&i.push(r);i.length||deletethis._events[t]}returnthis},trigger:function(t){vare,n,i;returnthis._events?(e=o.call(arguments,1),c(this,"trigger",t,e)?(n=this._events[t],i=this._events.all,n&&h(n,e),i&&h(i,arguments),this):this):this},stopListening:function(t,e,n){vari,r,o=this._listeners;if(!o)returnthis;i=!e&&!n,"object"==typeofe&&(n=this),t&&((o={})[t._listenerId]=t);for(rino)o[r].off(e,n,this),i&&deletethis._listeners[r];returnthis}},u=/\s+/,c=function(t,e,n,i){varr,o,s,a;if(!n)return!0;if("object"==typeofn){for(rinn)t[e].apply(t,[r,n[r]].concat(i));return!1}if(u.test(n)){for(o=n.split(u),s=0,a=o.length;s<a;s++)t[e].apply(t,[o[s]].concat(i));return!1}return!0},h=function(t,e){varn,i=-1,r=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o);return;case2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o,s);return;case3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,o,s,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e)}},f={listenTo:"on",listenToOnce:"once"};a.each(f,function(t,e){l[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=a.uniqueId("l"))]=e,"object"==typeofn&&(i=this),e[t](n,i,this),this}}),l.bind=l.on,l.unbind=l.off,l.mixin=function(t){vare=["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"];returna.each(e,function(e){t[e]=this[e]},this),
t},void0!==t&&t.exports&&(e=t.exports=l),e.BackboneEvents=l}()},,,function(t,e,n){vari=n(82);t.exports=function(t,e){if("number"!=typeoft&&"Number"!=i(t))throwTypeError(e);return+t}},function(t,e,n){"use strict";vari=n(100),r=n(135),o=n(62);t.exports=[].copyWithin||function(t,e){varn=i(this),s=o(n.length),a=r(t,s),l=r(e,s),u=arguments.length>2?arguments[2]:void0,c=Math.min((void0===u?s:r(u,s))-l,s-a),h=1;for(l<a&&a<l+c&&(h=-1,l+=c-1,a+=c-1);c-->0;)linn?n[a]=n[l]:deleten[a],a+=h,l+=h;returnn}},function(t,e,n){"use strict";vari=n(100),r=n(135),o=n(62);t.exports=function(t){for(vare=i(this),n=o(e.length),s=arguments.length,a=r(s>1?arguments[1]:void0,n),l=s>2?arguments[2]:void0,u=void0===l?n:r(l,n);u>a;)e[a++]=t;returne}},function(t,e,n){vari=n(29),r=n(236),o=n(22)("species");t.exports=function(t){vare;returnr(t)&&(e=t.constructor,"function"!=typeofe||e!==Array&&!r(e.prototype)||(e=void0),i(e)&&null===(e=e[o])&&(e=void0)),void0===e?Array:e}},function(t,e,n){vari=n(393);t.exports=function(t,e){returnnew(i(t))(e)}},function(t,e,n){"use strict";vari=n(94),r=n(29),o=n(234),s=[].slice,a={},l=function(t,e,n){if(!(eina)){for(vari=[],r=0;r<e;r++)i[r]="a["+r+"]";a[e]=Function("F,a","return new F("+i.join(",")+")")}returna[e](t,n)};t.exports=Function.bind||function(t){vare=i(this),n=s.call(arguments,1),a=function(){vari=n.concat(s.call(arguments));returnthisinstanceofa?l(e,i.length,i):o(e,i,t)};returnr(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,n){"use strict";vari=n(18),r=n(111),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throwTypeError("Incorrect hint");returnr(i(this),t!=o)}},function(t,e,n){vari=n(98),r=n(134),o=n(109);t.exports=function(t){vare,n,s,a,l=i(t),u=r.f;if(u)for(e=u(t),n=o.f,s=0;e.length>s;)n.call(t,a=e[s++])&&l.push(a);returnl}},function(t,e,n){"use strict";vari=n(18);t.exports=function(){vart=i(this),e="";returnt.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){vari=n(29),r=n(180).set;t.exports=function(t,e,n){varo,s=e.constructor;returns!==n&&"function"==typeofs&&(o=s.prototype)!==n.prototype&&i(o)&&r&&r(t,o),t}},function(t,e,n){vari=n(29),r=n(82),o=n(22)("match");t.exports=function(t){vare;returni(t)&&(void0!==(e=t[o])?!!e:"RegExp"==r(t))}},function(t,e,n){vari=n(98),r=n(61);t.exports=function(t,e){for(varn,o=r(t),s=i(o),a=s.length,l=0;a>l;)if(o[n=s[l++]]===e)returnn}},function(t,e,n){vari=n(20),r=n(246).set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n(82)(s);t.exports=function(){vart,e,n,u,c,h,f=function(){vari,r;for(l&&(i=s.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throwt?n():e=void0,i}}e=void0,i&&i.enter()};returnl?n=function(){s.nextTick(f)}:o?(u=!0,c=document.createTextNode(""),newo(f).observe(c,{characterData:!0}),n=function(){c.data=u=!u}):a&&a.resolve?(h=a.resolve(),n=function(){h.then(f)}):n=function(){r.call(i,f)},function(i){varr={fn:i,next:void0};e&&(e.next=r),t||(t=r,
n()),e=r}}},function(t,e,n){"use strict";vari=n(98),r=n(134),o=n(109),s=n(100),a=n(172),l=Object.assign;t.exports=!l||n(37)(function(){vart={},e={},n=Symbol(),i="abcdefghijklmnopqrst";returnt[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(varn,l,u,c,h,f=s(t),d=arguments.length,p=1,g=r.f,m=o.f;d>p;)for(n=a(arguments[p++]),l=g?i(n).concat(g(n)):i(n),u=l.length,c=0;u>c;)m.call(n,h=l[c++])&&(f[h]=n[h]);returnf}:l},function(t,e,n){vari=n(38),r=n(18),o=n(98);t.exports=n(55)?Object.defineProperties:function(t,e){r(t);for(varn,s=o(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);returnt}},function(t,e,n){vari=n(61),r=n(178).f,o={}.toString,s="object"==typeofwindow&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{returnr(t)}catch(t){returns.slice()}};t.exports.f=function(t){returns&&"[object Window]"==o.call(t)?a(t):r(i(t))}},function(t,e,n){vari=n(178),r=n(134),o=n(18),s=n(20).Reflect;t.exports=s&&s.ownKeys||function(t){vare=i.f(o(t)),n=r.f;returnn?e.concat(n(t)):e}},function(t,e,n){vari=n(20).parseFloat,r=n(245).trim;t.exports=1/i(n(185)+"-0")!=-1/0?function(t){vare=r(t+"",3),n=i(e);return0===n&&"-"==e.charAt(0)?-0:n}:i},function(t,e,n){vari=n(20).parseInt,r=n(245).trim,o=n(185),s=/^[\-+]?0[xX]/;t.exports=8!==i(o+"08")||22!==i(o+"0x16")?function(t,e){varn=r(t+"",3);returni(n,e>>>0||(s.test(n)?16:10))}:i},function(t,e){t.exports=Object.is||function(t,e){returnt===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){vari=n(18),r=n(94),o=n(22)("species");t.exports=function(t,e){varn,s=i(t).constructor;returnvoid0===s||void0==(n=i(s)[o])?e:r(n)}},function(t,e,n){"use strict";vari=n(136),r=n(83);t.exports=function(t){vare=r(this)+"",n="",o=i(t);if(o<0||o==1/0)throwRangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);returnn}},function(t,e,n){vari=n(20),r=n(96),o=n(132),s=n(247),a=n(38).f;t.exports=function(t){vare=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||tine||a(e,t,{value:s.f(t)})}},function(t,e,n){vari=n(4);i(i.P,"Array",{copyWithin:n(391)}),n(95)("copyWithin")},function(t,e,n){vari=n(4);i(i.P,"Array",{fill:n(392)}),n(95)("fill")},function(t,e,n){"use strict";vari=n(4),r=n(227)(6),o="findIndex",s=!0;oin[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{findIndex:function(t){returnr(this,t,arguments.length>1?arguments[1]:void0)}}),n(95)(o)},function(t,e,n){"use strict";vari=n(4),r=n(227)(5),o="find",s=!0;oin[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{find:function(t){returnr(this,t,arguments.length>1?arguments[1]:void0)}}),n(95)(o)},function(t,e,n){"use strict";vari=n(74),r=n(4),o=n(100),s=n(238),a=n(235),l=n(62),u=n(231),c=n(248);r(r.S+r.F*!n(174)(function(t){Array.from(t)}),"Array",{from:function(t){vare,n,r,h,f=o(t),d="function"==typeofthis?this:Array,p=arguments.length,g=p>1?arguments[1]:void0,m=void0!==g,y=0,v=c(f);if(m&&(g=i(g,p>2?arguments[2]:void0,2)),void0==v||d==Array&&a(v))for(e=l(f.length),
configurable:!0,get:n(398)})},function(t,e,n){"use strict";vari=n(229);t.exports=n(230)("Set",function(t){returnfunction(){returnt(this,arguments.length>0?arguments[0]:void0)}},{add:function(t){returni.def(this,t=0===t?0:t,t)}},i)},function(t,e,n){"use strict";vari=n(4),r=n(244)(!1);i(i.P,"String",{codePointAt:function(t){returnr(this,t)}})},function(t,e,n){"use strict";vari=n(4),r=n(62),o=n(184),s="endsWith",a=""[s];i(i.P+i.F*n(170)(s),"String",{endsWith:function(t){vare=o(this,t,s),n=arguments.length>1?arguments[1]:void0,i=r(e.length),l=void0===n?i:Math.min(r(n),i),u=t+"";returna?a.call(e,u,l):e.slice(l-u.length,l)===u}})},function(t,e,n){vari=n(4),r=n(135),o=String.fromCharCode,s=String.fromCodePoint;i(i.S+i.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(vare,n=[],i=arguments.length,s=0;i>s;){if(e=+arguments[s++],r(e,1114111)!==e)throwRangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}returnn.join("")}})},function(t,e,n){"use strict";vari=n(4),r=n(184),o="includes";i(i.P+i.F*n(170)(o),"String",{includes:function(t){return!!~r(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void0)}})},function(t,e,n){"use strict";vari=n(244)(!0);n(173)(String,"String",function(t){this._t=t+"",this._i=0},function(){vart,e=this._t,n=this._i;returnn>=e.length?{value:void0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){vari=n(4),r=n(61),o=n(62);i(i.S,"String",{raw:function(t){for(vare=r(t.raw),n=o(e.length),i=arguments.length,s=[],a=0;n>a;)s.push(e[a++]+""),a<i&&s.push(arguments[a]+"");returns.join("")}})},function(t,e,n){vari=n(4);i(i.P,"String",{repeat:n(411)})},function(t,e,n){"use strict";vari=n(4),r=n(62),o=n(184),s="startsWith",a=""[s];i(i.P+i.F*n(170)(s),"String",{startsWith:function(t){vare=o(this,t,s),n=r(Math.min(arguments.length>1?arguments[1]:void0,e.length)),i=t+"";returna?a.call(e,i,n):e.slice(n,n+i.length)===i}})},function(t,e,n){"use strict";vari,r,o=n(20),s=n(51),a=n(55),l=n(4),u=n(99),c=n(177).KEY,h=n(37),f=n(183),d=n(110),p=n(112),g=n(22),m=n(247),y=n(412),v=n(401),b=n(397),_=n(236),w=n(18),x=n(61),k=n(111),S=n(85),M=n(133),D=n(405),T=n(97),C=n(38),P=n(98),O=T.f,E=C.f,N=D.f,L=o.Symbol,A=o.JSON,I=A&&A.stringify,j="prototype",F=g("_hidden"),H=g("toPrimitive"),Y={}.propertyIsEnumerable,z=f("symbol-registry"),R=f("symbols"),W=f("op-symbols"),V=Object[j],B="function"==typeofL,U=o.QObject,q=!U||!U[j]||!U[j].findChild,$=a&&h(function(){return7!=M(E({},"a",{get:function(){returnE(this,"a",{value:7}).a}})).a})?function(t,e,n){vari=O(V,e);i&&deleteV[e],E(t,e,n),i&&t!==V&&E(V,e,i)}:E,G=function(t){vare=R[t]=M(L[j]);returne._k=t,e},X=B&&"symbol"==typeofL.iterator?function(t){return"symbol"==typeoft}:function(t){returntinstanceofL},K=function(t,e,n){returnt===V&&K(W,e,n),w(t),e=k(e,!0),w(n),s(R,e)?(n.enumerable?(s(t,F)&&t[F][e]&&(t[F][e]=!1),n=M(n,{enumerable:S(0,!1)})):(s(t,F)||E(t,F,S(1,{})),t[F][e]=!0),$(t,e,n)):E(t,e,n)},Q=function(t,e){w(t)
configurable:!0,get:n(398)})},function(t,e,n){"use strict";vari=n(229);t.exports=n(230)("Set",function(t){returnfunction(){returnt(this,arguments.length>0?arguments[0]:void0)}},{add:function(t){returni.def(this,t=0===t?0:t,t)}},i)},function(t,e,n){"use strict";vari=n(4),r=n(244)(!1);i(i.P,"String",{codePointAt:function(t){returnr(this,t)}})},function(t,e,n){"use strict";vari=n(4),r=n(62),o=n(184),s="endsWith",a=""[s];i(i.P+i.F*n(170)(s),"String",{endsWith:function(t){vare=o(this,t,s),n=arguments.length>1?arguments[1]:void0,i=r(e.length),l=void0===n?i:Math.min(r(n),i),u=t+"";returna?a.call(e,u,l):e.slice(l-u.length,l)===u}})},function(t,e,n){vari=n(4),r=n(135),o=String.fromCharCode,s=String.fromCodePoint;i(i.S+i.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(vare,n=[],i=arguments.length,s=0;i>s;){if(e=+arguments[s++],r(e,1114111)!==e)throwRangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}returnn.join("")}})},function(t,e,n){"use strict";vari=n(4),r=n(184),o="includes";i(i.P+i.F*n(170)(o),"String",{includes:function(t){return!!~r(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void0)}})},function(t,e,n){"use strict";vari=n(244)(!0);n(173)(String,"String",function(t){this._t=t+"",this._i=0},function(){vart,e=this._t,n=this._i;returnn>=e.length?{value:void0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){vari=n(4),r=n(61),o=n(62);i(i.S,"String",{raw:function(t){for(vare=r(t.raw),n=o(e.length),i=arguments.length,s=[],a=0;n>a;)s.push(e[a++]+""),a<i&&s.push(arguments[a]+"");returns.join("")}})},function(t,e,n){vari=n(4);i(i.P,"String",{repeat:n(411)})},function(t,e,n){"use strict";vari=n(4),r=n(62),o=n(184),s="startsWith",a=""[s];i(i.P+i.F*n(170)(s),"String",{startsWith:function(t){vare=o(this,t,s),n=r(Math.min(arguments.length>1?arguments[1]:void0,e.length)),i=t+"";returna?a.call(e,i,n):e.slice(n,n+i.length)===i}})},function(t,e,n){"use strict";vari,r,o=n(20),s=n(51),a=n(55),l=n(4),u=n(99),c=n(177).KEY,h=n(38),f=n(183),d=n(110),p=n(112),g=n(22),m=n(247),y=n(412),v=n(401),b=n(397),_=n(236),w=n(18),x=n(61),k=n(111),S=n(85),M=n(133),D=n(405),T=n(97),C=n(39),P=n(98),O=T.f,E=C.f,N=D.f,L=o.Symbol,A=o.JSON,I=A&&A.stringify,j="prototype",F=g("_hidden"),H=g("toPrimitive"),Y={}.propertyIsEnumerable,z=f("symbol-registry"),R=f("symbols"),W=f("op-symbols"),V=Object[j],B="function"==typeofL,U=o.QObject,q=!U||!U[j]||!U[j].findChild,$=a&&h(function(){return7!=M(E({},"a",{get:function(){returnE(this,"a",{value:7}).a}})).a})?function(t,e,n){vari=O(V,e);i&&deleteV[e],E(t,e,n),i&&t!==V&&E(V,e,i)}:E,G=function(t){vare=R[t]=M(L[j]);returne._k=t,e},X=B&&"symbol"==typeofL.iterator?function(t){return"symbol"==typeoft}:function(t){returntinstanceofL},K=function(t,e,n){returnt===V&&K(W,e,n),w(t),e=k(e,!0),w(n),s(R,e)?(n.enumerable?(s(t,F)&&t[F][e]&&(t[F][e]=!1),n=M(n,{enumerable:S(0,!1)})):(s(t,F)||E(t,F,S(1,{})),t[F][e]=!0),$(t,e,n)):E(t,e,n)},Q=function(t,e){w(t)
;for(varn,i=b(e=x(e)),r=0,o=i.length;o>r;)K(t,n=i[r++],e[n]);returnt},J=function(t,e){returnvoid0===e?M(t):Q(M(t),e)},Z=function(t){vare=Y.call(this,t=k(t,!0));return!(this===V&&s(R,t)&&!s(W,t))&&(!(e||!s(this,t)||!s(R,t)||s(this,F)&&this[F][t])||e)},tt=function(t,e){if(t=x(t),e=k(e,!0),t!==V||!s(R,e)||s(W,e)){varn=O(t,e);return!n||!s(R,e)||s(t,F)&&t[F][e]||(n.enumerable=!0),n}},et=function(t){for(vare,n=N(x(t)),i=[],r=0;n.length>r;)s(R,e=n[r++])||e==F||e==c||i.push(e);returni},nt=function(t){for(vare,n=t===V,i=N(n?W:x(t)),r=[],o=0;i.length>o;)!s(R,e=i[o++])||n&&!s(V,e)||r.push(R[e]);returnr};for(B||(L=function(){vart,e;if(thisinstanceofL)throwTypeError("Symbol is not a constructor!");returnt=p(arguments.length>0?arguments[0]:void0),e=function(n){this===V&&e.call(W,n),s(this,F)&&s(this[F],t)&&(this[F][t]=!1),$(this,t,S(1,n))},a&&q&&$(V,t,{configurable:!0,set:e}),G(t)},u(L[j],"toString",function(){returnthis._k}),T.f=tt,C.f=K,n(178).f=D.f=et,n(109).f=Z,n(134).f=nt,a&&!n(132)&&u(V,"propertyIsEnumerable",Z,!0),m.f=function(t){returnG(g(t))}),l(l.G+l.W+l.F*!B,{Symbol:L}),i="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),r=0;i.length>r;)g(i[r++]);for(i=P(g.store),r=0;i.length>r;)y(i[r++]);l(l.S+l.F*!B,"Symbol",{for:function(t){returns(z,t+="")?z[t]:z[t]=L(t)},keyFor:function(t){if(X(t))returnv(z,t);throwTypeError(t+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),l(l.S+l.F*!B,"Object",{create:J,defineProperty:K,defineProperties:Q,getOwnPropertyDescriptor:tt,getOwnPropertyNames:et,getOwnPropertySymbols:nt}),A&&l(l.S+l.F*(!B||h(function(){vart=L();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void0!==t&&!X(t)){for(vare,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);returne=i[1],"function"==typeofe&&(n=e),!n&&_(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!X(e))returne}),i[1]=e,I.apply(A,i)}}}),L[j][H]||n(84)(L[j],H,L[j].valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(o.JSON,"JSON",!0)},function(t,e,n){"use strict";vari=n(4),r=n(226)(!0);i(i.P,"Array",{includes:function(t){returnr(this,t,arguments.length>1?arguments[1]:void0)}}),n(95)("includes")},function(t,e,n){vari=n(4),r=n(243)(!0);i(i.S,"Object",{entries:function(t){returnr(t)}})},function(t,e,n){vari=n(4),r=n(243)(!1);i(i.S,"Object",{values:function(t){returnr(t)}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){"use strict";varn=function(){functiont(t,e){this.mouseFlag=!1,this.accuracy=2,this.value=1,this.colorInput=t,this.$el=$('<div class="transparency-slider wide-slider ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all">'),e&&this.$el.hide(),this.$gradient=$('<div class="gradient">').appendTo(this.$el),this.$roller=$('<a href="#" class="ui-slider-handle ui-state-default ui-corner-all without-shift-handle-left">').appendTo(this.$gradient)}returnt.prototype.calculateRollerPosition=function(t){
vare=t.pageX,n=this.$gradient.offset().left,i=e-n,r=this.$gradient.width();returni>r?100:i<0?0:~~(i/r*100)},t.prototype.toRgb=function(t){vare;return~t.indexOf("#")?t:(e=t.match(/[0-9.]+/g),e?"rgb("+e.slice(0,3).join(", ")+")":"rgb(127, 127, 127)")},t.prototype.setValue=function(t){if(1===t)returnvoid(this.value=t);this.value=t.toFixed(this.accuracy)},t.prototype.updateRoller=function(){this.$roller.css("left",100-100*this.value+"%")},t.prototype.rollerMoveHandler=function(t){if(this.mouseFlag){vare=this.calculateRollerPosition(t);this.setValue((100-e)/100),$(this).trigger("change",[this.val()]),this.$roller.css("left",e+"%")}t.preventDefault()},t.prototype.mouseupHandler=function(t){this.mouseFlag&&(this.mouseFlag=!1,$(this).trigger("afterChange",[this.val()]))},t.prototype.initEvents=function(){vart=function(t){returnthis.rollerMoveHandler(t)}.bind(this),e=function(n){return$(document).off("mousemove mouseup",t),$(document).off("mouseup",e),this.mouseupHandler(n)}.bind(this);this.$el.on("mousedown",function(n){this.mouseFlag=!0,$(document).on("mousemove mouseup",t),$(document).on("mouseup",e),n.preventDefault()}.bind(this)),this.colorInput.on("change",function(t){this.updateColor()}.bind(this))},t.prototype.removeEvents=function(){},t.prototype.updateColor=function(){vart=this.colorInput.val()||"black",e=this.toRgb(t),n=["-moz-linear-gradient(left, %COLOR 0%, transparent 100%)","-webkit-gradient(linear, left top, right top, color-stop(0%,%COLOR), color-stop(100%,transparent))","-webkit-linear-gradient(left, %COLOR 0%,transparent 100%)","-o-linear-gradient(left, %COLOR 0%,transparent 100%)","linear-gradient(to right, %COLOR 0%,transparent 100%)"];$.browser.msie?this.$gradient.css("filter","progid:DXImageTransform.Microsoft.gradient(startColorstr='"+e+"', EndColor=0, GradientType=1)"):n.forEach(function(t){this.$gradient.css("background-image",t.replace(/%COLOR/,e))}.bind(this))},t.prototype.val=function(t){returnt&&(this.setValue(+t),this.updateRoller()),this.value},function(e,n){returnnewt(e,n)}}();t.exports=n},,,,function(t,e,n){"use strict";functioni(t){returnt&&t.__esModule?t:{default:t}}functionr(t){vare,n;if(t&&t.__esModule)returnt;if(e={},null!=t)for(nint)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);returne.default=t,e}functiono(t,e){varn,i,r,o=Object.getOwnPropertyNames(e);for(n=0;n<o.length;n++)i=o[n],(r=Object.getOwnPropertyDescriptor(e,i))&&r.configurable&&void0===t[i]&&Object.defineProperty(t,i,r);returnt}functions(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiona(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionl(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):o(t,e))}
functionu(t,e){for(varn=t.indexOf(e);-1!==n;)t.splice(n,1),n=t.indexOf(e)}varc,h,f,d,p,g,m,y,v;Object.defineProperty(e,"__esModule",{value:!0}),c=Object.assign||function(t){vare,n,i;for(e=1;e<arguments.length;e++){n=arguments[e];for(iinn)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}returnt},h=function(){functiont(t,e){varn,i,r=[],o=!0,s=!1,a=void0;try{for(n=t[Symbol.iterator]();!(o=(i=n.next()).done)&&(r.push(i.value),!e||r.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{!o&&n.return&&n.return()}finally{if(s)throwa}}returnr}returnfunction(e,n){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,n);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),f=n(115),d=r(f),p=n(75),g=i(p),m=n(114),y=i(m),v=function(t){functione(n,i,r){varo,l=arguments.length<=3||void0===arguments[3]?{}:arguments[3];returns(this,e),o=a(this,t.call(this)),o.backend=n,o.store=i,o.services=r,o.options=l,o.logger=g.default.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,l.backend,l),o}returnl(e,t),e.prototype.queueLoad=function(t,e,n){vari=this,r=[],o=[],s=[],a=[];returnt.forEach(function(t){varn=!0;e.forEach(function(e){vars=t+"|"+e;i.store.hasResourceBundle(t,e)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?o.indexOf(s)<0&&o.push(s):(i.state[s]=1,n=!1,o.indexOf(s)<0&&o.push(s),r.indexOf(s)<0&&r.push(s),a.indexOf(e)<0&&a.push(e)))}),n||s.push(t)}),(r.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:n}),{toLoad:r,pending:o,toLoadLanguages:s,toLoadNamespaces:a}},e.prototype.loaded=function(t,e,n){vari=this,r=t.split("|"),o=h(r,2),s=o[0],a=o[1];e&&this.emit("failedLoading",s,a,e),n&&this.store.addResourceBundle(s,a,n),this.state[t]=e?-1:2,this.queue.forEach(function(n){d.pushPath(n.loaded,[s],a),u(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(n.errors.length?n.callback(n.errors):n.callback(),i.emit("loaded",n.loaded),n.done=!0)}),this.queue=this.queue.filter(function(t){return!t.done})},e.prototype.read=function(t,e,n,i,r,o){vars=this;if(i||(i=0),r||(r=250),!t.length)returno(null,{});this.backend[n](t,e,function(a,l){if(a&&l&&i<5)returnvoidsetTimeout(function(){s.read.call(s,t,e,n,++i,2*r,o)},r);o(a,l)})},e.prototype.load=function(t,e,n){vari,r,o=this;returnthis.backend?(i=c({},this.backend.options,this.options.backend),"string"==typeoft&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeofe&&(e=[e]),r=this.queueLoad(t,e,n),r.toLoad.length?void(i.allowMultiLoading&&this.backend.readMulti?this.read(r.toLoadLanguages,r.toLoadNamespaces,"readMulti",null,null,function(t,e){t&&o.logger.warn("loading namespaces "+r.toLoadNamespaces.join(", ")+" for languages "+r.toLoadLanguages.join(", ")+" via multiloading failed",t),!t&&e&&o.logger.log("loaded namespaces "+r.toLoadNamespaces.join(", ")+" for languages "+r.toLoadLanguages.join(", ")+" via multiloading",e),r.toLoad.forEach(function(n){vari,r=n.split("|"),s=h(r,2),a=s[0],l=s[1],u=d.getPath(e,[a,l])
<!DOCTYPE html><html><head><metacharset="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=Edge"><linktype="text/css"href="bundles/library.2e4e86e4539a260f4a7b69dd55f2595b.css"rel="stylesheet"/></head><bodyclass="chart-page on-widget"><divclass="loading-indicator"id="loading-indicator"></div><scriptsrc="js/external/spin.min.js"></script><script>varloadingSpinner=newSpinner({lines:17,length:0,width:3,radius:30,scale:1,corners:1,color:"#00A2E2",opacity:0,rotate:0,direction:1,speed:1.5,trail:60,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",shadow:false,hwaccel:false}).spin(document.getElementById("loading-indicator"));</script><script>varJSServer={};var__initialEnabledFeaturesets=["charting_library"];</script><script>urlParams=(function(){vare,c=/\+/g,h=/([^&=]+)=?([^&]*)/g,a=function(j){returndecodeURIComponent(j.replace(c," ")).replace(/<\/?[^>]+(>|$)/g,"")},f=function(){vark=location.href;varj=k.indexOf("#");if(j>=0){returnk.substring(j+1)}else{throw"Unexpected use of this page"}}(),i={};while(e=h.exec(f)){i[a(e[1])]=a(e[2])}varg=window.parent[i.uid];vard=["datafeed","customFormatters","brokerFactory"];for(varbing){if(b==="tradingController"){window.tradingController=g[b]}else{if(d.indexOf(b)===-1){i[b]=JSON.stringify(g[b])}}}returni})();window.locale=urlParams.locale;window.language=urlParams.locale;</script><scriptsrc="bundles/vendors.037de1a224aecfed7020.js"></script><scriptsrc="bundles/library.5b9e0d4f842989964d56.js"></script></body></html>
<!DOCTYPE html><html><head><metacharset="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=Edge"><linktype="text/css"href="bundles/library.2e4e86e4539a260f4a7b69dd55f2595b.css"rel="stylesheet"/></head><bodyclass="chart-page on-widget"><divclass="loading-indicator"id="loading-indicator"></div><scriptsrc="js/external/spin.min.js"></script><script>varloadingSpinner=newSpinner({lines:17,length:0,width:3,radius:30,scale:1,corners:1,color:"#00A2E2",opacity:0,rotate:0,direction:1,speed:1.5,trail:60,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",shadow:false,hwaccel:false}).spin(document.getElementById("loading-indicator"));</script><script>varJSServer={};var__initialEnabledFeaturesets=["charting_library"];</script><script>urlParams=(function(){vare,c=/\+/g,h=/([^&=]+)=?([^&]*)/g,a=function(j){returndecodeURIComponent(j.replace(c," ")).replace(/<\/?[^>]+(>|$)/g,"")},f=function(){vark=location.href;varj=k.indexOf("#");if(j>=0){returnk.substring(j+1)}else{throw"Unexpected use of this page"}}(),i={};while(e=h.exec(f)){i[a(e[1])]=a(e[2])}varg=window.parent[i.uid];vard=["datafeed","customFormatters","brokerFactory"];for(varbing){if(b==="tradingController"){window.tradingController=g[b]}else{if(d.indexOf(b)===-1){i[b]=JSON.stringify(g[b])}}}returni})();window.locale=urlParams.locale;window.language=urlParams.locale;</script><scriptsrc="bundles/vendors.8c445fe91dc494c5dec6.js"></script><scriptsrc="bundles/library.52f448f933885e5e0fed.js"></script></body></html>
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.