@ -377,7 +377,7 @@ TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=fu
this . onDisconnect = new t , this . _ quoteApi = new n ( ChartApiInstance ) , this . _ type = e || "full" , this . fieldsSent = new $ . Deferred , this . _ delayUpdateFastSymbols = s ( this . _ updateFastSymbols , 250 ) , this . _ throttledSymbolData = { } , this . _ formatterValuesCache = { } , this . _ waitingForFormatters = { } , this . _ snapshotValuesCache = { } , this . _ waitingForSnapshot = { } , this . connect ( ) } var n , r = i ( 41 ) . PriceFormatter , s = i ( 374 ) , a = i ( 710 ) , l = i ( 711 ) , c = i ( 64 ) ; n = i ( 736 ) , o . prototype . destroy = function ( ) { this . _ quoteApi . destroy ( ) , this . _ quoteApi = null , this . _ connected = ! 1 , this . onDisconnect . fire ( ) } , o . prototype . typeFields = { } , o . prototype . typeFields . simple = [ "ch" , "chp" , "current_session" , "description" , "local_description" , "language" , "exchange" , "fractional" , "is_tradable" , "lp" , "minmov" , "minmove2" , "original_name" , "pricescale" , "pro_name" , "short_name" , "type" , "update_mode" , "volume" ] , o . prototype . typeFields . simpleDetailed = [ ] . concat ( o . prototype . typeFields . simple , [ "ask" , "bid" , "fundamentals" , "high_price" , "is_tradable" , "low_price" , "open_price" , "prev_close_price" , "rch" , "rchp" , "rtc" , "status" , "basic_eps_net_income" , "beta_1_year" , "earnings_per_share_basic_ttm" , "industry" , "market_cap_basic" , "price_earnings_ttm" , "sector" , "volume" ] ) , o . prototype . typeFields . full = [ ] , o . prototype . connect = function ( t ) { this . _ quoteApi . connect ( this . quoteHandler . bind ( this ) ) } , o . prototype . quoteHandler = function ( t ) { var e = t . method , i = t . params ; switch ( e ) { case "connected" : this . _ connected || ( this . _ connected = ! 0 , this . onConnected ( ) ) ; break ; case "quote_list_fields" : break ; case "quote_symbol_data" : this . _ connected && this . onSymbolData ( i [ 0 ] ) ; break ; case "disconnected" : this . _ connected && ( this . _ connected = ! 1 , this . onDisconnect . fire ( ) ) } } , o . prototype . onConnected = function ( ) { this . setFields ( ) ; var t = Object . keys ( this . _ symbol_data ) ; t . length && this . _ quoteApi . quoteAddSymbols ( t , { forcePermission : ! 0 } ) , this . _ delayed_subscriptions . forEach ( function ( t ) { this . subscribe . apply ( this , t ) } , this ) , this . _ delayed_subscriptions = [ ] , this . onConnect . fire ( ) } , o . prototype . setFields = function ( ) { var t = o . prototype . typeFields [ this . _ type ] ; t && t . length && this . _ quoteApi . quoteSetFields ( t ) , this . fieldsSent . resolve ( ) } , o . prototype . onSymbolData = function ( t ) { var e = t . symbolname , i = this . _ throttledSymbolData [ e ] ; i || ( i = this . _ throttledSymbolData [ e ] = { fnDispatch : a ( this . dipatchSymbolData . bind ( this ) , this . options . throttleTimeout ) } ) , i . cache ? $ . extend ( ! 0 , i . cache , t ) : i . cache = t , i . fnDispatch ( e ) } , o . prototype . _ parseUpdateMode = function ( t ) { var e = t . update_mode ; e && ( e = e . match ( /(delayed_streaming){1}(?:_([\d]+))?/ ) ) && e [ 1 ] && ( e [ 2 ] && ( t . update_mode_seconds = + e [ 2 ] ) , t . update_mode = e [ 1 ] ) } , o . prototype . dipatchSymbolData = function ( t ) { var e , i , o = this . _ symbol_data [ t ] , n = this . _ throttledSymbolData [ t ] . cache ; if ( delete this . _ throttledSymbolData [ t ] . cache , this . _ symbol_data [ t ] ) { $ . extend ( ! 0 , o , n ) , o . values && this . _ parseUpdateMode ( o . values ) ; for ( e in this . _ subscriptions ) i = this . _ subscriptions [ e ] , i [ t ] && i [ t ] . forEach ( function ( t ) { t ( o , n ) } ) } } , o . prototype . subscribe = function ( t , e , i ) { var o , n ; if ( ! this . _ connected ) return void this . _ delayed_subscriptions . push ( arguments ) ; this . _ subscriptions [ t ] = this . _ subscriptions [ t ] || { } , o = this . _ subscriptions [ t ] , e = [ ] . concat ( e ) , n = [ ] , e . forEach ( function ( t ) {
this . _ symbol_data [ t ] ? o && o [ t ] || this . _ symbol_data [ t ] . subscribers_count ++ : ( this . _ symbol_data [ t ] = { subscribers_count : 1 } , n . push ( t ) ) , o [ t ] = o [ t ] || [ ] , o [ t ] . push ( i ) , o [ t ] . fast = ! 0 , this . _ symbol_data [ t ] && this . _ symbol_data [ t ] . values && i ( this . _ symbol_data [ t ] , this . _ symbol_data [ t ] ) } , this ) , n . length && ( this . _ quoteApi . quoteAddSymbols ( n , { forcePermission : ! 0 } ) , this . _ delayUpdateFastSymbols ( ) ) } , o . prototype . unsubscribe = function ( t , e , i ) { var o , n = this . _ subscriptions [ t ] ; n && ( n [ e ] && i ? ( o = n [ e ] . indexOf ( i ) , ~ o && n [ e ] . splice ( o , 1 ) , n [ e ] . length || delete n [ e ] ) : delete n [ e ] ) , n && 0 === Object . keys ( n ) . length && delete this . _ subscriptions [ t ] , this . _ symbol_data . hasOwnProperty ( e ) && ( n && ! n [ e ] && this . _ symbol_data [ e ] . subscribers_count -- , this . _ symbol_data [ e ] . subscribers_count || ( delete this . _ symbol_data [ e ] , this . _ quoteApi . quoteRemoveSymbols ( [ e ] ) , this . _ delayUpdateFastSymbols ( ) ) ) } , o . prototype . setFastSymbols = function ( t , e ) { var i , o ; if ( this . _ subscriptions [ t ] ) { i = this . _ subscriptions [ t ] ; for ( o in i ) i [ o ] . fast = - 1 !== e . indexOf ( o ) } this . _ delayUpdateFastSymbols ( ) } , o . prototype . _ updateFastSymbols = function ( ) { if ( this . _ connected ) { var t = this . _ fastSymbols ( ) ; 0 === t . length ? this . _ quoteApi . quoteHibernateAll ( ) : this . _ quoteApi . quoteFastSymbols ( t ) } } , o . prototype . _ delayUpdateFastSymbols = o . prototype . _ updateFastSymbols , o . prototype . _ fastSymbols = function ( ) { var t , e , i , o = [ ] ; for ( t in this . _ subscriptions ) { e = this . _ subscriptions [ t ] ; for ( i in e ) e [ i ] . fast && o . push ( i ) } return o = l ( o ) } , o . prototype . formatter = function ( t ) { function e ( t ) { return new r ( t . pricescale , t . minmov , t . fractional , t . minmove2 ) } function i ( t ) { return t && null != t . pricescale && null != t . minmov } var o , n = this ; return this . _ waitingForFormatters [ t ] ? this . _ waitingForFormatters [ t ] : ( o = new Promise ( function ( o , r ) { if ( n . _ formatterValuesCache [ t ] ) o ( e ( n . _ formatterValuesCache [ t ] ) ) ; else { var s = c . guid ( ) ; n . subscribe ( s , [ t ] , function ( a ) { a . error && ( n . _ waitingForFormatters [ t ] = null , r ( a . error ) ) , i ( a . values ) && ( n . _ waitingForFormatters [ t ] = null , n . _ formatterValuesCache [ t ] = a . values , o ( e ( a . values ) ) , n . unsubscribe ( s , t ) ) } ) } } ) , this . _ waitingForFormatters [ t ] = o , o ) } , o . prototype . snapshot = function ( t ) { var e , i = this ; return this . _ waitingForSnapshot [ t ] ? this . _ waitingForSnapshot [ t ] : ( e = new Promise ( function ( e , o ) { if ( i . _ snapshotValuesCache [ t ] ) e ( i . _ snapshotValuesCache [ t ] ) ; else { var n = c . guid ( ) ; i . subscribe ( n , [ t ] , function ( r ) { r . error && ( i . _ waitingForSnapshot [ t ] = null , o ( r . error ) ) ; var s = r . values ; s && s . minmov && s . pricescale && s . description && ( i . _ waitingForSnapshot [ t ] = null , i . _ snapshotValuesCache [ t ] = s , e ( s ) , i . unsubscribe ( n , t ) ) } ) } } ) , this . _ waitingForSnapshot [ t ] = e , e ) } , TradingView . QuoteSessionMultiplexer = o , void 0 !== e && e && e . exports && ( e . exports = o ) } ) . call ( e , i ( 20 ) , i ( 78 ) ( t ) ) } , , function ( t , e ) { "use strict" ; function i ( t , e ) { this . array = [ ] ; for ( var i in t ) t [ i ] . key = i , this . array . push ( t [ i ] ) ; this . rearrange ( e ) } i . prototype . rearrange = function ( t ) { if ( "function" != typeof t ) throw Error ( "sort param is not a function" ) ; return this . array . sort ( t ) } , i . byValue = function ( t ) { return function ( t , e ) { return t - e } } , i . byField = function ( t ) { return function ( e , i ) { return e [ t ] > i [ t ] ? 1 : e [ t ] < i [ t ] ? - 1 : e [ t ] === i [ t ] ? 0 : void 0 } } , i . byOrder = function ( t ) { return function ( e , i ) { return t . indexOf ( e . key ) - t . indexOf ( i . key ) } } ,
t . exports = i } , function ( t , e ) { "use strict" ; ! function ( t ) { t . fn . contextMenu = function ( e ) { t ( this ) . bind ( "contextmenu" , function ( t ) { return e ( t ) , ! 1 } ) } } ( jQuery ) } , , function ( t , e ) { "use strict" ; ! function ( t , e , i ) { "$:nomunge" ; function o ( o , n ) { function r ( e ) { t ( s ) . each ( function ( ) { var i = t ( this ) ; this === e . target || i . has ( e . target ) . length || i . triggerHandler ( n , [ e . target ] ) } ) } n = n || o + i ; var s = t ( ) , a = o + "." + n + "-special-event" ; t . event . special [ n ] = { setup : function ( ) { s = s . add ( this ) , delete s . prevObject , 1 === s . length && t ( e ) . bind ( a , r ) } , teardown : function ( ) { s = s . not ( this ) , delete s . prevObject , 0 === s . length && t ( e ) . unbind ( a ) } , add : function ( t ) { var e = t . handler ; t . handler = function ( t , i ) { t . target = i , e . apply ( this , arguments ) } } } } t . map ( "click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup" . split ( " " ) , function ( t ) { o ( t ) } ) , o ( "focusin" , "focus" + i ) , o ( "focusout" , "blur" + i ) , Modernizr . touch && ( o ( "touchstart" , "mousedown" + i ) , o ( "touchmove" , "mousemove" + i ) , o ( "touchend" , "mouseup" + i ) ) , t . addOutsideEvent = o } ( jQuery , document , "outside" ) } , function ( t , e ) { "use strict" ; ! function ( t ) { t . fn . selectable = function ( e ) { return this . each ( function ( ) { var i = t ( this ) ; i . css ( "user-select" , e ? "text" : "none" ) , i . css ( "-moz-user-select" , e ? "text" : "-moz-none" ) , i . css ( "-webkit-user-select" , e ? "auto" : "none" ) , ( t . browser . msie || t . browser . opera ) && i . attr ( "unselectable" , e ? "off" : "on" ) } ) } } ( jQuery ) } , function ( t , e , i ) { ( function ( e ) { "use strict" ; function o ( ) { } var n = i ( 367 ) . AddCompareDialog , r = i ( 43 ) , s = i ( 180 ) , a = i ( 13 ) . getLogger ( "Chart.ChartHeaderWidget" ) ; TradingView . SYMBOL_SEARCH_MAX_LENGTH = 1e3 , o . prototype . _ createBarsGroup = function ( t ) { var e = this . createGroup ( "bars-style" , { single : ! 0 } ) ; return t . _ style_list . element ( ) . appendTo ( e ) , e } , o . prototype . _ createPropertiesGroup = function ( t , o ) { var n , r = this . createGroup ( "properties" , { single : ! 0 } ) ; return this . _ onWidget && ! e . enabled ( "header_settings" ) || ( n = $ ( "<span>" ) . addClass ( "button iconed properties apply-common-tooltip" ) . append ( $ ( i ( 1235 ) ) . attr ( { width : 17 , height : 17 } ) ) . appendTo ( r ) , n . on ( t , function ( t ) { t . pageX = n . offset ( ) . left , t . pageY = n . offset ( ) . top + n . height ( ) + 15 , TVSettings . getValue ( "properties_dialog.active_tab.chart" ) || TVSettings . setValue ( "properties_dialog.active_tab.chart" , $ . t ( "Style" ) ) , o . activeChartWidget . value ( ) . showChartProperties ( { _ lastEvent : t } ) . then ( function ( t ) { null !== t && ( n . addClass ( "active" ) , t . on ( "destroy" , function ( ) { n . removeClass ( "active" ) } ) ) } ) } ) , n . attr ( "title" , $ . t ( "Chart Properties" ) ) ) , r } , o . prototype . _ createCompareGroup = function ( t , e , o ) { var r = this . createGroup ( "compare" , { single : ! 0 } ) , s = $ ( '<a class="button toggle-caption compare apply-common-tooltip">' ) . append ( $ ( i ( 1202 ) ) ) . append ( $ ( '<span class="caption">' + $ . t ( "Compare" ) + "</span>" ) ) . appendTo ( r ) ; return this . _ compareButton = s , this . _ compareButton . on ( o , function ( t ) { var i , o ; t . preventDefault ( ) , i = new n ( e ) , o = i . show ( ) , s . addClass ( "active" ) , o . on ( "destroy" , function ( ) { s . removeClass ( "active" ) } ) } ) , this . _ compareButton . attr ( "title" , $ . t ( "Compare or Add Symbol" ) ) , r } , o . prototype . _ createIndicatorsGroup = function ( t , o ) { var n , a = this . createGroup ( "indicators" , { single : ! 0 , showInNarrowView : ! 0 } )
; return this . _ indicatorsButton = $ ( '<a class="button toggle-caption indicators' + ( this . _ onWidget ? " no-last" : "" ) + ' apply-common-tooltip">' ) . append ( $ ( i ( 1213 ) ) ) . append ( $ ( '<span class="caption">' + $ . t ( "Indicators" ) + "</span>" ) ) . appendTo ( a ) , n = "\n" + $ . t ( "Slash" , { context : "hotkey" } ) + " /" , e . enabled ( "charting_library_base" ) || e . enabled ( "widget" ) ? this . _ indicatorsButton . attr ( "title" , $ . t ( "Indicators" ) + n ) : this . _ indicatorsButton . attr ( "title" , $ . t ( "Indicators, Fundamentals, Economy and Add-ons" ) + n ) , this . _ indicatorsButton . on ( t , function ( t ) { t . preventDefault ( ) , window . studyMarket . isVisible ( ) ? window . studyMarket . hide ( ) : ( window . studyMarket . show ( ) , r . emit ( "indicators_dialog" ) ) } ) , s . registerListener ( "IndicatorsHotkey" , function ( t ) { if ( 47 === t . which && $ ( t . target ) . is ( "body" ) && ! window . studyMarket . isVisible ( ) ) return window . studyMarket . show ( ) , window . studyMarket . selectSearchPage ( ) , t . preventDefault ( ) , t . stopPropagation ( ) , ! 0 } ) , window . studyMarket . visibilityChanged . subscribe ( this , function ( t ) { this . _ indicatorsButton . toggleClass ( "active" , t ) } ) , ! TradingView . onWidget ( ) && e . enabled ( "study_templates" ) && studyTemplates . appendMenuButtonTo ( a ) , a } , o . prototype . createGroup = function ( t , e ) { e = e || { } ; var i = $ ( "<div>" ) . addClass ( "group" ) ; return e . right && i . addClass ( "right" ) , e . single && i . addClass ( "space-single" ) , t && i . addClass ( "header-group-" + t ) , i } , o . prototype . bindToModel = function ( ) { var t = this . _ chartWidget . model ( ) ; this . _ model = t } , o . prototype . backButton = function ( ) { return this . _ backButton } , o . prototype . saveLoadWidget = function ( ) { return this . _ saveLoad || a . logWarn ( "No save-load widget created in footer" ) } , o . prototype . styleIconPosition = function ( t ) { return "-%1px 0" . replace ( "%1" , 19 * ~ ~ t ) } , o . styleIconPosition = o . prototype . styleIconPosition , t . exports = o } ) . call ( e , i ( 7 ) ) } , function ( t , e , i ) { ( function ( e ) { "use strict" ; function o ( t ) { function o ( ) { if ( ! t . favoriteChartTypes ) return [ ] ; var e = { Bars : p . STYLE_BARS , Candles : p . STYLE_CANDLES , Line : p . STYLE_LINE , Area : p . STYLE_AREA , "Heiken Ashi" : p . STYLE_HEIKEN_ASHI , "Hollow Candles" : p . STYLE_HOLLOW_CANDLES , Baseline : p . STYLE_BASELINE } ; return t . favoriteChartTypes . map ( function ( t ) { return e [ t ] } ) } var a , f , m , g , v , y , b , S , w , T , x , C , P , L , I , k , A , M , E , V , D ; t = t || { } , a = this . _ chartWidgetCollection = t . chartWidgetCollection , f = this . _ chartWidget = a . activeChartWidget . value ( ) , m = this . _ onWidget = f . onWidget ( ) , g = this , v = Modernizr . touch ? "touchstart" : "click" , this . _ onResizeRequested = ! 1 , this . _ resizerBridge = t . resizerBridge , this . _ $root = $ ( t . resizerBridge . body . value ( ) ) , this . _ $root . addClass ( "header-chart-panel" ) . html ( '<div class="header-chart-panel-sizer"><div class="header-chart-panel-content"><div class="right"></div><div class="left"></div></div></div>' ) , this . _ $sizer = this . _ $root . find ( ".header-chart-panel-sizer" ) , this . _ $content = this . _ $root . find ( ".header-chart-panel-content" ) , this . _ $left = this . _ $root . find ( ".left" ) , this . _ $right = this . _ $root . find ( ".right" ) , this . _ itemsVisibility = t . itemsVisibility , a . readOnly ( ) || ( e . enabled ( "header_symbol_search" ) && ( y = this . createGroup ( "symbol-search" ) . appendTo ( this . _ $left ) , b = $ ( '<div class="symbol-edit-widget no-last"></div>' ) . appendTo ( y ) , S = $ ( '<div class="symbol-edit-wrap">' ) . appendTo ( b ) , w = null ,
; return this . _ indicatorsButton = $ ( '<a class="button toggle-caption indicators' + ( this . _ onWidget ? " no-last" : "" ) + ' apply-common-tooltip">' ) . append ( $ ( i ( 1213 ) ) ) . append ( $ ( '<span class="caption">' + $ . t ( "Indicators" ) + "</span>" ) ) . appendTo ( a ) , n = "\n" + $ . t ( "Slash" , { context : "hotkey" } ) , e . enabled ( "charting_library_base" ) || e . enabled ( "widget" ) ? this . _ indicatorsButton . attr ( "title" , $ . t ( "Indicators" ) + n ) : this . _ indicatorsButton . attr ( "title" , $ . t ( "Indicators, Fundamentals, Economy and Add-ons" ) + n ) , this . _ indicatorsButton . on ( t , function ( t ) { t . preventDefault ( ) , window . studyMarket . isVisible ( ) ? window . studyMarket . hide ( ) : ( window . studyMarket . show ( ) , r . emit ( "indicators_dialog" ) ) } ) , s . registerListener ( "IndicatorsHotkey" , function ( t ) { if ( 47 === t . which && $ ( t . target ) . is ( "body" ) && ! window . studyMarket . isVisible ( ) ) return window . studyMarket . show ( ) , window . studyMarket . selectSearchPage ( ) , t . preventDefault ( ) , t . stopPropagation ( ) , ! 0 } ) , window . studyMarket . visibilityChanged . subscribe ( this , function ( t ) { this . _ indicatorsButton . toggleClass ( "active" , t ) } ) , ! TradingView . onWidget ( ) && e . enabled ( "study_templates" ) && studyTemplates . appendMenuButtonTo ( a ) , a } , o . prototype . createGroup = function ( t , e ) { e = e || { } ; var i = $ ( "<div>" ) . addClass ( "group" ) ; return e . right && i . addClass ( "right" ) , e . single && i . addClass ( "space-single" ) , t && i . addClass ( "header-group-" + t ) , i } , o . prototype . bindToModel = function ( ) { var t = this . _ chartWidget . model ( ) ; this . _ model = t } , o . prototype . backButton = function ( ) { return this . _ backButton } , o . prototype . saveLoadWidget = function ( ) { return this . _ saveLoad || a . logWarn ( "No save-load widget created in footer" ) } , o . prototype . styleIconPosition = function ( t ) { return "-%1px 0" . replace ( "%1" , 19 * ~ ~ t ) } , o . styleIconPosition = o . prototype . styleIconPosition , t . exports = o } ) . call ( e , i ( 7 ) ) } , function ( t , e , i ) { ( function ( e ) { "use strict" ; function o ( t ) { function o ( ) { if ( ! t . favoriteChartTypes ) return [ ] ; var e = { Bars : p . STYLE_BARS , Candles : p . STYLE_CANDLES , Line : p . STYLE_LINE , Area : p . STYLE_AREA , "Heiken Ashi" : p . STYLE_HEIKEN_ASHI , "Hollow Candles" : p . STYLE_HOLLOW_CANDLES , Baseline : p . STYLE_BASELINE } ; return t . favoriteChartTypes . map ( function ( t ) { return e [ t ] } ) } var a , f , m , g , v , y , b , S , w , T , x , C , P , L , I , k , A , M , E , V , D ; t = t || { } , a = this . _ chartWidgetCollection = t . chartWidgetCollection , f = this . _ chartWidget = a . activeChartWidget . value ( ) , m = this . _ onWidget = f . onWidget ( ) , g = this , v = Modernizr . touch ? "touchstart" : "click" , this . _ onResizeRequested = ! 1 , this . _ resizerBridge = t . resizerBridge , this . _ $root = $ ( t . resizerBridge . body . value ( ) ) , this . _ $root . addClass ( "header-chart-panel" ) . html ( '<div class="header-chart-panel-sizer"><div class="header-chart-panel-content"><div class="right"></div><div class="left"></div></div></div>' ) , this . _ $sizer = this . _ $root . find ( ".header-chart-panel-sizer" ) , this . _ $content = this . _ $root . find ( ".header-chart-panel-content" ) , this . _ $left = this . _ $root . find ( ".left" ) , this . _ $right = this . _ $root . find ( ".right" ) , this . _ itemsVisibility = t . itemsVisibility , a . readOnly ( ) || ( e . enabled ( "header_symbol_search" ) && ( y = this . createGroup ( "symbol-search" ) . appendTo ( this . _ $left ) , b = $ ( '<div class="symbol-edit-widget no-last"></div>' ) . appendTo ( y ) , S = $ ( '<div class="symbol-edit-wrap">' ) . appendTo ( b ) , w = null ,
! e . enabled ( "charting_library_base" ) && u . canShowSpreadActions ( ) && ( T = $ ( '<div class="symbol-edit-buttonswrap">' ) . appendTo ( S ) , w = $ ( '<div class="spread-actions">' ) . appendTo ( T ) . on ( "mousedown" , function ( t ) { t . preventDefault ( ) } ) ) , x = $ ( '<div class="symbol-edit-inputspacer">' ) . appendTo ( S ) , C = $ ( '<input type="text" class="symbol-edit" maxlength="' + TradingView . SYMBOL_SEARCH_MAX_LENGTH + '">' ) . appendTo ( x ) , u . bindToInput ( C , { syncWithChartWidget : ! 0 , spreadActions : w } ) , function ( ) { var t = ! 1 ; C . on ( "focus" , function ( ) { t = ! 0 , S . addClass ( "expanded" ) } ) , C . on ( "blur" , function ( ) { t = ! 1 , setTimeout ( function ( ) { t || S . removeClass ( "expanded" ) } , 40 ) } ) } ( ) ) , e . enabled ( "header_resolutions" ) && ( y = this . createGroup ( "intervals" , { single : ! 0 , showInNarrowView : ! 0 } ) . appendTo ( this . _ $left ) , P = { onWidget : m , submenuBtnAddClass : "apply-common-tooltip" } , t . interval_options && $ . extend ( P , t . interval_options ) , e . enabled ( "items_favoriting" ) || $ . extend ( P , { notShowQuicks : ! 0 , popupSpacing : 1 } ) , TradingView . isOnFeaturePage && $ . extend ( P , { notShowQuicks : ! 0 } ) , this . _ interval = new l ( P ) , loginStateChange . subscribe ( this , function ( ) { window . is_authenticated && this . _ interval . forceUpdate ( ) } ) , e . enabled ( "charting_library_base" ) && ChartApiInstance . on ( "configuration_received" , function ( ) { g . _ interval . forceUpdate ( ) } ) , this . _ interval . element ( ) . addClass ( "no-first" ) . appendTo ( y ) , this . _ interval . onResize . subscribe ( this , this . _ onInternalResize ) , t . favoriteIntervals && this . _ interval . setUpStarredItemsList ( t . favoriteIntervals ) ) , e . enabled ( "header_chart_type" ) && ( L = [ { id : p . STYLE_BARS , title : $ . t ( "Bars" ) } , { id : p . STYLE_CANDLES , title : $ . t ( "Candles" ) } , { id : p . STYLE_HOLLOW_CANDLES , title : $ . t ( "Hollow Candles" ) } , { id : p . STYLE_HEIKEN_ASHI , title : $ . t ( "Heikin Ashi" ) } , { id : p . STYLE_LINE , title : $ . t ( "Line" ) } , { id : p . STYLE_AREA , title : $ . t ( "Area" ) } , { id : p . STYLE_BASELINE , title : $ . t ( "Baseline" ) } ] , I = o ( ) || [ 1 , 4 , 5 , 6 ] , TradingView . isOnFeaturePage && ! e . enabled ( "charting_library_base" ) && ( I = [ ] ) , m ? I = [ 1 , 3 ] : e . enabled ( "collapsible_header" ) && this . _ createMinimizeButton ( t . headerChartPanel ) , this . _ style_list = new d ( "StyleWidget" , L . map ( function ( t ) { return { id : t . id , title : t . title , svg : $ ( _ [ t . id ] ) . attr ( { width : 26 , height : 26 } ) , favoriteButton : { title : t . title , addClass : "apply-common-tooltip" } } } ) , { defaultFavorites : I , addClass : "chart-style-widget" , popupAddClass : "chart-style-popup" , notShowQuicks : ! e . enabled ( "items_favoriting" ) , showJustDefaultQuicks : I && I . length && e . enabled ( "predefined_items_only_may_be_starred" ) , tooltip : $ . t ( "Bar's Style" ) , addTooltipClass : "apply-common-tooltip" } ) , a . activeChartStyle . subscribe ( function ( t ) { g . _ style_list . setValue ( t ) } , { callWithLast : ! 0 } ) , k = ! 1 , g . _ style_list . onChange ( ) . subscribe ( this , function ( t ) { k || a . trySetChartStyleToActiveWidget ( t ) || ( k = ! 0 , g . _ style_list . setValue ( a . activeChartStyle . value ( ) ) , k = ! 1 ) } ) , g . _ style_list . onResize ( ) . subscribe ( this , this . _ onInternalResize ) ) , window . studyMarket = new c ( a , window . user , { onWidget : m , fundamentalsOnly : t . fundamentalsOnly } ) , this . _ createLayout ( t , g , v ) , this . _ resizerBridge . width . subscribe ( this . _ onInternalResize . bind ( this ) ) ) , ! this . _ chartWidget . readOnly ( ) && e . enabled ( "header_undo_redo" ) && ( this . _ undoRedo = new n ( this . _ $left , this . _ chartWidget ) ) , e . enabled ( "header_screenshot" ) && ( A = "Alt+S" ,
M = this . createGroup ( "screenshot" , { single : ! 0 } ) . appendTo ( this . _ $right ) , E = $ ( '<a class="button getimage"></a>' ) . append ( $ ( i ( 1238 ) ) . 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" + A ) . appendTo ( M ) , M . click ( function ( t ) { if ( ! e . enabled ( "show_dialog_on_snapshot_ready" ) ) { if ( E . hasClass ( "process" ) ) return ; E . addClass ( "process" ) , h . subscribe ( "onScreenshotReady" , function ( t ) { E . removeClass ( "process" ) } , null , ! 0 ) } f . actions ( ) . takeScreenshot . callbacks ( ) . fire ( ) , t . preventDefault ( ) } ) ) , e . enabled ( "header_saveload" ) && ( V = e . enabled ( "header_saveload_to_the_right" ) ? this . _ $right : this . _ $left , y = this . createGroup ( "save-load" , { single : ! 0 , showInNarrowView : ! 0 } ) . appendTo ( V ) , D = $ ( "<div>" ) . addClass ( "save-load-buttons" ) . appendTo ( y ) , this . _ saveLoad = new s ( 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 , r . prototype . bindToModel ) , this . _ resizerBridge . availWidth . subscribe ( this . _ onAvailSizeChange . bind ( this ) ) , this . _ resizerBridge . availHeight . subscribe ( this . _ onAvailSizeChange . bind ( this ) ) , this . _ onAvailSizeChange ( ) , this . _ onInternalResize ( ) } var n = i ( 819 ) , r = i ( 744 ) , s = i ( 1130 ) . SaveLoadWidget , a = i ( 753 ) , l = i ( 398 ) , c = i ( 812 ) , h = i ( 43 ) , u = i ( 104 ) , d = i ( 474 ) . FavoredList , p = i ( 85 ) , _ = i ( 397 ) ; inherit ( o , r ) , o . prototype . saveLoadWidget = function ( ) { return this . _ saveLoad } , o . prototype . _ onAvailSizeChange = function ( ) { var t = 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 ( ) { return this . _ undoRedo = new n ( 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 = new a ( this . _ chartWidgetCollection ) ; var t = this . createGroup ( "fullscreen" , { single : ! 0 } ) ; return this . _ fullscreen . element ( ) . addClass ( "apply-common-tooltip" ) . appendTo ( t ) , t } , o . prototype . _ createLayout = function ( t , i , o ) { var n = [ ] ; 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 . _ onInternalResize = function ( ) { if ( this . hidden ) return void this . _ resizerBridge . negotiateHeight ( 0 ) ; this . _ onResizeRequested || ( this . _ onResizeRequested = ! 0 , this . _ resizerBridge . visible . when ( function ( ) { var t , i ; this . _ onResizeRequested = ! 1 , e . enabled ( "caption_buttons_text_if_possible" ) && ( t = this . _ $left , i = t . children ( ".group" ) , t . addClass ( "captions" ) , i . size ( ) > 1 && i . last ( ) . offset ( ) . top > i . first ( ) . offset ( ) . top + 5 && t . removeClass ( "captions" ) ) , this . _ $content . find ( "svg" ) . pixelSnap ( ) , this . _ resizerBridge . negotiateHeight ( { min : 0 , max : this . _ $content . height ( ) } ) } . bind ( this ) ) ) } , o . prototype . _ setupCaptionButtons = function ( ) { window . studyTemplates && studyTemplates . onFavoriteListResize . subscribe ( this , this . _ onInternalResize ) } , o . prototype . _ createMinimizeButton = function ( ) { var t = this , e = $ ( "<span>" , this . _ $root ) . addClass ( "tv-close-panel top" ) . appendTo ( this . _ $root ) . on ( "click" , function ( i ) { i . isDefaultPrevented ( ) || ( t . hidden = ! t . hidden , e . toggleClass ( "top" , ! t . hidden ) , e . toggleClass ( "bottom" , t . hidden ) , i . preventDefault ( ) , h . emit ( "toggle_header" , ! t . hidden ) , t . _ onInternalResize ( ) ) } ) } , t . exports = o } ) . call ( e , i ( 7 ) ) } , , function ( t , e , i ) { ( function ( e ) { "use strict" ; function o ( t ) { var i , o , n , r , s , a , l , c , h , u , d , p , m , g , v , y , b , S , T = this ; this . _ guid = q ( ) , this . _ startSpinner ( t . body . value ( ) ) , P . init ( ) , i = this , P . tool . subscribe ( function ( t ) { var e , o , n , r ; i . _ model && ( e = t , i . _ model . model ( ) . setCurrentTool ( e ) , TradingView . isMobile . any ( ) && ( o = i . _ paneWidgets [ 0 ] , w . isLineTool ( e ) && "LineToolBrush" !== e && ! i . selectBarMode ( ) . value ( ) ? ( n = . 5 * i . _ model . model ( ) . timeScale ( ) . width ( ) , r = . 5 * o . _ state . defaultPriceScale ( ) . height ( ) , i . _ model . model ( ) . setAndSaveCurrentPosition ( n , r , o . _ state ) , o . _ updateTooltip ( n , r ) ) : o . _ hideTooltip ( ) ) , i . _ model && TradingView . isMobile . any ( ) && i . _ model . model ( ) . crossHairSource ( ) . updateAllViews ( ) ) } ) , o = function ( t , e , i ) { var o , n = e . mainSeries ( ) . syncModel ( ) , r = t . mainSeries ( ) . syncModel ( ) , s = i ; return n && r && ( o = t . _ createSyncPoint ( n , r ) , s = o . sourceTimeToTargetTime ( i ) ) , t . timeScale ( ) . points ( ) . roughIndex ( s , r && r . distance . bind ( r ) ) } , P . createdLineTool . subscribe ( null , function ( t ) { var e , i , n ; T . _ model && ( e = T . _ model . model ( ) , t . model !== e && ( i = e . paneForSource ( T . _ model . model ( ) . mainSeries ( ) ) , n = { index : o ( e , t . model , t . point . timeStamp ) , price : t . point . price } , T . _ model . createLineTool ( i , n , t . linetool , t . properties , t . linkKey ) ) ) } ) , P . continuedLineTool . subscribe ( null , function ( t ) { var e , i , n ; T . _ model && ( e = T . _ model . model ( ) , t . model !== e && ( i = { index : o ( e , t . model , t . point . timeStamp ) , price : t . point . price } , ( n = T . _ model . lineBeingCreated ( ) ) && T . _ model . model ( ) . coninueCreatingLine ( i , t . envState , ! ! t . finalState ) && t . finalState && n . restoreExternalPoints ( t . finalState ) ) ) } ) , P . cancelledLineTool . subscribe ( null , function ( t ) { if ( T . _ model ) { var e = T . _ model . model ( ) ; t . model !== e && T . _ model . model ( ) . cancelCreatingLine ( ) } } ) , P . startedMovingLineTool . subscribe ( null , function ( t ) { var e , i , n ; T . _ model && ( e = T . _ model . model ( ) , t . model !== e && ( i = e . dataSources ( ) . filter ( function ( e ) { return e . linkKey === t . linkKey } ) [ 0 ] ) && ( n = { index : o ( e , t . model , t . point . timeStamp ) , price : t . point . price } ,