Release v23.040 (from 689d7ee0)

This commit is contained in:
jenkins
2023-01-17 06:15:18 +00:00
parent 495ba83e96
commit a940f55c0b
74 changed files with 962 additions and 892 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.title-mAu74Mtg{color:#787b86;cursor:default;font-size:11px;letter-spacing:.4px;line-height:16px;margin:6px 0;padding:0 12px;text-transform:uppercase}

View File

@@ -0,0 +1 @@
.title-mAu74Mtg{color:#787b86;cursor:default;font-size:11px;letter-spacing:.4px;line-height:16px;margin:6px 0;padding:0 12px;text-transform:uppercase}

View File

@@ -1,9 +0,0 @@
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7387],{16717:(e,i,t)=>{t.d(i,{getSeriesStylePropertiesDefinitions:()=>me});var n=t(88537),r=t(28353),o=t(24980),l=t(50366),s=t(37667),a=t(52714),c=t.n(a),d=t(67337),h=t(37787),p=t(80054);const g=new o.TranslatedString("change color bars based on previous close",(0,r.t)("change color bars based on previous close")),u=new o.TranslatedString("change HLC bars",(0,r.t)("change HLC bars")),y=new o.TranslatedString("change bar up color",(0,r.t)("change bar up color")),f=new o.TranslatedString("change bar down color",(0,r.t)("change bar down color")),b=new o.TranslatedString("change thin bars",(0,r.t)("change thin bars")),w=new o.TranslatedString("change line price source",(0,r.t)("change line price source")),S=new o.TranslatedString("change line type",(0,r.t)("change line type")),T=new o.TranslatedString("change line color",(0,r.t)("change line color")),P=new o.TranslatedString("change line width",(0,r.t)("change line width")),m=new o.TranslatedString("change area price source",(0,r.t)("change area price source")),v=new o.TranslatedString("change area line color",(0,r.t)("change area line color")),D=new o.TranslatedString("change area line width",(0,r.t)("change area line width")),_=new o.TranslatedString("change area fill color",(0,r.t)("change area fill color")),C=new o.TranslatedString("change baseline price source",(0,r.t)("change baseline price source")),k=new o.TranslatedString("change baseline top line color",(0,r.t)("change baseline top line color")),M=new o.TranslatedString("change baseline top line width",(0,r.t)("change baseline top line width")),L=new o.TranslatedString("change baseline bottom line color",(0,r.t)("change baseline bottom line color")),I=new o.TranslatedString("change baseline bottom line width",(0,r.t)("change baseline bottom line width")),B=new o.TranslatedString("change baseline fill top area color",(0,r.t)("change baseline fill top area color")),O=new o.TranslatedString("change baseline fill bottom area color",(0,r.t)("change baseline fill bottom area color")),E=new o.TranslatedString("change base level",(0,r.t)("change base level")),W=new o.TranslatedString("change high-low body visibility",(0,r.t)("change high-low body visibility")),V=new o.TranslatedString("change high-low body color",(0,r.t)("change high-low body color")),$=new o.TranslatedString("change high-low borders visibility",(0,r.t)("change high-low borders visibility")),A=new o.TranslatedString("change high-low border color",(0,r.t)("change high-low border color")),j=new o.TranslatedString("change high-low labels visibility",(0,r.t)("change high-low labels visibility")),x=new o.TranslatedString("change high-low labels color",(0,r.t)("change high-low labels color")),N=new o.TranslatedString("change high-low labels font size",(0,r.t)("change high-low labels font size")),H=(new o.TranslatedString("change renko wick visibility",(0,r.t)("change renko wick visibility")),new o.TranslatedString("change renko wick up color",(0,
r.t)("change renko wick up color")),new o.TranslatedString("change renko wick down color",(0,r.t)("change renko wick down color")),new o.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",(0,r.t)("change the display of real prices on price scale (instead of Heiken-Ashi price)")),new o.TranslatedString("change range thin bars",(0,r.t)("change range thin bars")),new o.TranslatedString("change {candleType} body visibility",(0,r.t)("change {candleType} body visibility"))),z=new o.TranslatedString("change {candleType} up color",(0,r.t)("change {candleType} up color")),F=new o.TranslatedString("change {candleType} down color",(0,r.t)("change {candleType} down color")),U=new o.TranslatedString("change {candleType} border visibility",(0,r.t)("change {candleType} border visibility")),R=new o.TranslatedString("change {candleType} up border color",(0,r.t)("change {candleType} up border color")),Y=new o.TranslatedString("change {candleType} down border color",(0,r.t)("change {candleType} down border color")),G=new o.TranslatedString("change {candleType} wick visibility",(0,r.t)("change {candleType} wick visibility")),J=new o.TranslatedString("change {candleType} wick up color",(0,r.t)("change {candleType} wick up color")),K=new o.TranslatedString("change {candleType} wick down color",(0,r.t)("change {candleType} wick down color")),q=(new o.TranslatedString("change {chartType} up color",(0,r.t)("change {chartType} up color")),new o.TranslatedString("change {chartType} down color",(0,r.t)("change {chartType} down color")),new o.TranslatedString("change {chartType} projection bar up color",(0,r.t)("change {chartType} projection bar up color")),new o.TranslatedString("change {chartType} projection bar down color",(0,r.t)("change {chartType} projection bar down color")),new o.TranslatedString("change {chartType} border bar up color",(0,r.t)("change {chartType} border bar up color")),new o.TranslatedString("change {chartType} border bar down color",(0,r.t)("change {chartType} border bar down color")),new o.TranslatedString("change {chartType} projection border bar up color",(0,r.t)("change {chartType} projection border bar up color")),new o.TranslatedString("change {chartType} projection border bar up color",(0,r.t)("change {chartType} projection border bar up color")),new o.TranslatedString("change column up color",(0,r.t)("change column up color"))),Q=new o.TranslatedString("change column down color",(0,r.t)("change column down color")),X=new o.TranslatedString("change column price source",(0,r.t)("change column price source")),Z=(0,r.t)("Color bars based on previous close"),ee=(0,r.t)("HLC bars"),ie=(0,r.t)("Up color"),te=(0,r.t)("Down color"),ne=(0,r.t)("Thin bars"),re=(0,r.t)("Body"),oe=(0,r.t)("Borders"),le=(0,r.t)("Wick"),se=(0,r.t)("Price source"),ae=(0,r.t)("Type"),ce=(0,r.t)("Line"),de=(0,r.t)("Top line"),he=(0,r.t)("Bottom line"),pe=(0,r.t)("Fill"),ge=(0,r.t)("Fill top area"),ue=(0,r.t)("Fill bottom area"),ye=((0,r.t)("Up bars"),(0,r.t)("Down bars"),(0,
r.t)("Projection up bars"),(0,r.t)("Projection down bars"),(0,r.t)("Real prices on price scale (instead of Heikin-Ashi price)"),(0,r.t)("Base level")),fe=(0,r.t)("Body"),be=(0,r.t)("Borders"),we=(0,r.t)("Labels");function Se(e,i,t,n){return(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.barColorsOnPrevClose,g)},{id:`${t}${n}`,title:Z})}function Te(e,i,t,n,r,o){return(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(e,i.priceSource,o)},{id:`${n}${r}`,title:se,options:new(c())(t)})}function Pe(e,i,t,n){const r=(0,p.removeSpaces)(t.originalText());return[(0,l.createTwoColorsPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.drawBody,H.format({candleType:t})),color1:(0,l.getColorDefinitionProperty)(e,i.upColor,null,z.format({candleType:t})),color2:(0,l.getColorDefinitionProperty)(e,i.downColor,null,F.format({candleType:t}))},{id:`${n}Symbol${r}CandlesColor`,title:re}),(0,l.createTwoColorsPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.drawBorder,U.format({candleType:t})),color1:(0,l.getColorDefinitionProperty)(e,i.borderUpColor,null,R.format({candleType:t})),color2:(0,l.getColorDefinitionProperty)(e,i.borderDownColor,null,Y.format({candleType:t}))},{id:`${n}Symbol${r}BordersColor`,title:oe}),(0,l.createTwoColorsPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.drawWick,G.format({candleType:t})),color1:(0,l.getColorDefinitionProperty)(e,i.wickUpColor,null,J.format({candleType:t})),color2:(0,l.getColorDefinitionProperty)(e,i.wickDownColor,null,K.format({candleType:t}))},{id:`${n}Symbol${r}WickColors`,title:le})]}function me(e,i,t,a,p){switch(t){case 0:return function(e,i,t){return[Se(e,i,t,"SymbolBarStyleBarColorsOnPrevClose"),(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.dontDrawOpen,u)},{id:t+"SymbolDontDrawOpen",title:ee}),(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.upColor,null,y)},{id:t+"SymbolUpColor",title:ie}),(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.downColor,null,f)},{id:t+"SymbolDownColor",title:te}),(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.thinBars,b)},{id:t+"SymbolBarThinBars",title:ne})]}(e,i.barStyle.childs(),p);case 1:return function(e,i,t){return[Se(e,i,t,"SymbolCandleStyleBarColorsOnPrevClose"),...Pe(e,i,new o.TranslatedString("candle",(0,r.t)("candle")),t)]}(e,i.candleStyle.childs(),p);case 2:return function(e,i,t,n,r){return[Te(e,i,t,r,"SymbolLinePriceSource",w),(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(e,i.styleType,S)},{id:r+"SymbolStyleType",title:ae,options:new(c())(n)}),(0,l.createLinePropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.color,null,T),width:(0,l.convertToDefinitionProperty)(e,i.linewidth,P)},{id:r+"SymbolLineStyle",title:ce})]}(e,i.lineStyle.childs(),a.seriesPriceSources,a.lineStyleTypes,p);case 3:return function(e,i,t,n){
return[Te(e,i,t,n,"SymbolAreaPriceSource",m),(0,l.createLinePropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.linecolor,null,v),width:(0,l.convertToDefinitionProperty)(e,i.linewidth,D)},{id:n+"SymbolAreaLineStyle",title:ce}),(0,l.createTwoColorsPropertyDefinition)({color1:(0,l.getColorDefinitionProperty)(e,i.color1,i.transparency,_),color2:(0,l.getColorDefinitionProperty)(e,i.color2,i.transparency,_)},{id:n+"SymbolAreaFills",title:pe})]}(e,i.areaStyle.childs(),a.seriesPriceSources,p);case 9:return Pe(e,i.hollowCandleStyle.childs(),new o.TranslatedString("hollow candles",(0,r.t)("hollow candles")),p);case 10:return function(e,i,t,n){return[Te(e,i,t,n,"SymbolBaseLinePriceSource",C),(0,l.createLinePropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.topLineColor,null,k),width:(0,l.convertToDefinitionProperty)(e,i.topLineWidth,M)},{id:n+"SymbolBaseLineTopLine",title:de}),(0,l.createLinePropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.bottomLineColor,null,L),width:(0,l.convertToDefinitionProperty)(e,i.bottomLineWidth,I)},{id:n+"SymbolBaseLineBottomLine",title:he}),(0,l.createTwoColorsPropertyDefinition)({color1:(0,l.getColorDefinitionProperty)(e,i.topFillColor1,null,B),color2:(0,l.getColorDefinitionProperty)(e,i.topFillColor2,null,B)},{id:n+"SymbolBaseLineTopFills",title:ge}),(0,l.createTwoColorsPropertyDefinition)({color1:(0,l.getColorDefinitionProperty)(e,i.bottomFillColor1,null,O),color2:(0,l.getColorDefinitionProperty)(e,i.bottomFillColor2,null,O)},{id:n+"SymbolBaseLineBottomFills",title:ue}),(0,l.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(e,i.baseLevelPercentage,E,[h.floor])},{id:n+"SymbolBaseLevelPercentage",title:ye,type:0,min:new(c())(0),max:new(c())(100),step:new(c())(1),unit:new(c())("%")})]}(e,i.baselineStyle.childs(),a.seriesPriceSources,p);case 13:return function(e,i,t,n){return[Te(e,i,t,n,"SymbolColumnPriceSource",X),Se(e,i,n,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.upColor,null,q)},{id:n+"SymbolUpColor",title:ie}),(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(e,i.downColor,null,Q)},{id:n+"SymbolDownColor",title:te})]}(e,i.columnStyle.childs(),a.seriesPriceSources,p)}if(!i.hasOwnProperty("haStyle"))return[];if(a.isJapaneseChartsAvailable&&8===t){return function(e,i,t){const n=[];return n.push(Se(e,i,t,"SymbolHAStyleBarColorsOnPrevClose"),...Pe(e,i,new o.TranslatedString("Heikin Ashi",(0,r.t)("Heikin Ashi")),t)),n}(e,i.haStyle.childs(),p)}a.isJapaneseChartsAvailable&&d.enabled("japanese_chart_styles");if(d.enabled("chart_style_hilo")&&12===t){const t=i.hiloStyle.childs(),r=(0,s.chartStyleStudyId)(12);return function(e,i,t,n){const r=(0,l.createColorPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.drawBody,W),color:(0,l.getColorDefinitionProperty)(e,i.color,null,V)},{id:n+"SymbolBodiesColor",title:fe}),o=(0,l.createColorPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.showBorders,$),color:(0,
l.getColorDefinitionProperty)(e,i.borderColor,null,A)},{id:n+"SymbolBorderColor",title:be}),s=t.map(e=>({title:String(e),value:e}));return[r,o,(0,l.createTextPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,i.showLabels,j),color:(0,l.getColorDefinitionProperty)(e,i.labelColor,null,x),size:(0,l.convertToDefinitionProperty)(e,i.fontSize,N)},{id:n+"SymbolLabels",title:we,isEditable:!1,isMultiLine:!1,sizeItems:s})]}(e,t,(0,n.ensure)(a.defaultSeriesFontSizes)[r],p)}return[]}},87387:(e,i,t)=>{t.d(i,{SeriesPropertyDefinitionsViewModel:()=>oe,basePriceSources:()=>te,lineStyleTypes:()=>ne,seriesPrecisionValues:()=>re});var n=t(88537),r=t(28353),o=t(24980),l=t(67337),s=t(50366),a=(t(32449),t(52714)),c=t.n(a),d=t(37667),h=t(16654),p=t(16717),g=t(37787);const u=new o.TranslatedString("change {inputName} property",(0,r.t)("change {inputName} property"));function y(e){return e.map(e=>({value:e,title:(0,r.t)(e)}))}function f(e,i,t,l,a,h,p){const f=[];return t.forEach(t=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(t,l))return;const b=t.id;if(!l.hasOwnProperty(b))return;const w=l[b],S=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(t,a[b]),T=function(e){return(0,r.t)(e)}(S),P=new o.TranslatedString(S,T);if("options"in t){const i=(0,n.ensure)(t.options);f.push((0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,w,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,options:new(c())(y(i))}))}else if("integer"!==t.type){if("float"===t.type){let n;return n=function(e,i){return!((i===(0,d.chartStyleStudyId)(4)||i===(0,d.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,d.chartStyleStudyId)(5)&&"reversalAmount"===e)}(b,i)||null===h.value()?new(c())(t.min):h,void f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,type:1,min:n,max:new(c())(t.max),defval:t.defval}))}"text"!==t.type?"bool"!==t.type||f.push((0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,w,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T})):f.push((0,s.createTextPropertyDefinition)({text:(0,s.convertToDefinitionProperty)(e,w,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,isEditable:!0,isMultiLine:!1}))}else f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,u.format({inputName:P}),[g.floor])},{id:`${p}${t.name}`,title:T,type:0,min:new(c())(t.min),max:new(c())(t.max),defval:t.defval}))}),f}var b=t(98125),w=t(88461),S=t(81465),T=t(54089);const P=(0,b.getLogger)("Chart.Definitions.Series"),m=l.enabled("show_average_close_price_line_and_label"),v=new o.TranslatedString("change decimal places",(0,r.t)("change decimal places")),D=new o.TranslatedString("change timezone",(0,r.t)("change timezone")),_=(new o.TranslatedString("adjust data for dividends",(0,
r.t)("adjust data for dividends")),new o.TranslatedString("use settlement as close on daily interval",(0,r.t)("use settlement as close on daily interval")),new o.TranslatedString("adjust for contract changes",(0,r.t)("adjust for contract changes")),new o.TranslatedString("change session",(0,r.t)("change session")),new o.TranslatedString("change extended hours color",(0,r.t)("change extended hours color"))),C=new o.TranslatedString("change pre market color",(0,r.t)("change pre market color")),k=new o.TranslatedString("change post market color",(0,r.t)("change post market color")),M=new o.TranslatedString("change price line visibility",(0,r.t)("change price line visibility")),L=new o.TranslatedString("change price line color",(0,r.t)("change price line color")),I=new o.TranslatedString("change price line width",(0,r.t)("change price line width")),B=(new o.TranslatedString("change previous close price line visibility",(0,r.t)("change previous close price line visibility")),new o.TranslatedString("change previous close price line color",(0,r.t)("change previous close price line color")),new o.TranslatedString("change previous close price line width",(0,r.t)("change previous close price line width")),new o.TranslatedString("change pre/post market price lines visibility",(0,r.t)("change pre/post market price lines visibility")),new o.TranslatedString("change pre market line color",(0,r.t)("change pre market line color")),new o.TranslatedString("change post market line color",(0,r.t)("change post market line color")),new o.TranslatedString("change bid and ask lines visibility",(0,r.t)("change bid and ask lines visibility")),new o.TranslatedString("change bid line color",(0,r.t)("change bid line color")),new o.TranslatedString("change ask line color",(0,r.t)("change ask line color")),new o.TranslatedString("change high and low price lines visibility",(0,r.t)("change high and low price lines visibility"))),O=new o.TranslatedString("change high and low price line color",(0,r.t)("change high and low price line color")),E=new o.TranslatedString("change high and low price line width",(0,r.t)("change high and low price line width")),W=new o.TranslatedString("change average close price line visibility",(0,r.t)("change average close price line visibility")),V=new o.TranslatedString("change average close price line color",(0,r.t)("change average close price line color")),$=new o.TranslatedString("change average close price line width",(0,r.t)("change average close price line width")),A=((0,r.t)("Adjust data for dividends"),(0,r.t)("Session"),(0,r.t)("Adjust for contract changes"),(0,r.t)("Use settlement as close on daily interval"),(0,r.t)("Pre/post market hours background")),j=(0,r.t)("Last price line"),x=((0,r.t)("Previous day close price line"),(0,r.t)("Bid and ask lines"),(0,r.t)("Pre/post market price line"),(0,r.t)("Precision")),N=(0,r.t)("Timezone"),H=(0,r.t)("Open"),z=(0,r.t)("High"),F=(0,r.t)("Low"),U=(0,r.t)("Close"),R=(0,r.t)("(H + L)/2"),Y=(0,r.t)("(H + L + C)/3"),G=(0,r.t)("(O + H + L + C)/4"),J=(0,r.t)("Simple"),K=(0,
r.t)("With markers"),q=(0,r.t)("Step"),Q=(0,r.t)("Default"),X=(0,r.t)("High and low price lines"),Z=(0,r.t)("Average close price line"),ee={[(0,d.chartStyleStudyId)(12)]:[7,8,9,10,11,12,14,16,20,24,28,32,40]},ie=[{priceScale:1,minMove:1,frac:!1},{priceScale:10,minMove:1,frac:!1},{priceScale:100,minMove:1,frac:!1},{priceScale:1e3,minMove:1,frac:!1},{priceScale:1e4,minMove:1,frac:!1},{priceScale:1e5,minMove:1,frac:!1},{priceScale:1e6,minMove:1,frac:!1},{priceScale:1e7,minMove:1,frac:!1},{priceScale:1e8,minMove:1,frac:!1},{priceScale:1e9,minMove:1,frac:!1},{priceScale:1e10,minMove:1,frac:!1},{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],te=[{title:H,value:"open",id:"price-source-open"},{title:z,value:"high",id:"price-source-high"},{title:F,value:"low",id:"price-source-low"},{title:U,value:"close",id:"price-source-close"},{title:R,value:"hl2",id:"price-source-hl2"},{title:Y,value:"hlc3",id:"price-source-hlc3"},{title:G,value:"ohlc4",id:"price-source-ohlc4"}],ne=[{title:J,value:h.STYLE_LINE_TYPE_SIMPLE},{title:K,value:h.STYLE_LINE_TYPE_MARKERS},{title:q,value:h.STYLE_LINE_TYPE_STEP}];function re(){const e=[{title:Q,value:"default"}];for(let i=0;i<ie.length;i++)e.push({title:`${ie[i].minMove}/${ie[i].priceScale}`,value:`${ie[i].priceScale},${ie[i].minMove},${ie[i].frac}`});return e}class oe{constructor(e,i,t,n,r,o){this._definitions=null,this._inputsSubscriptions=null,this._isDestroyed=!1,this._propertyPages=null,this._seriesMinTickWV=null,this._sessionIdOptionsWV=new(c())([]),this._series=e,this._undoModel=i,this._model=this._undoModel.model(),this._propertyPageId=t,this._propertyPageName=n,this._propertyPageIcon=r,this._timezonePropertyObj=o,this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSeriesMinTickWV),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSessionIdOptionsWV),this._updateSeriesMinTickWV(),this._updateSessionIdOptionsWV()}destroy(){null!==this._propertyPages&&this._propertyPages.forEach(e=>{(0,s.destroyDefinitions)(e.definitions.value())}),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then(e=>{var i;if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new(c())(e.definitions),visible:null!==(i=e.visible)&&void 0!==i?i:new(c())(!0).readonly()}]),this._propertyPages}):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo()
;return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){null===this._seriesMinTickWV?this._seriesMinTickWV=new(c())(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){}_updateDefinitions(){null!==this._definitions&&(0,s.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._unsubscribeInputsUpdate(),this._createSeriesDefinitions().then(e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,n.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)})}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach(e=>{e.unsubscribeAll(this)}),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){const t=[];e.forEach(e=>{if(void 0!==e.visible){const n=e.visible.split("==");if(2===n.length){const e=i[n[0]];-1===t.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),t.push(e))}}}),t.length>0?this._inputsSubscriptions=t:this._inputsSubscriptions=null}_createSeriesDefinitions(){const e=this._series.properties().childs(),i=this._series.getInputsProperties(),t=this._series.getInputsInfoProperties(),r=e.style.value(),o=this._series.getStyleShortName();return new Promise(e=>{const l=(0,d.chartStyleStudyId)(r);null!==l?this._model.studyMetaInfoRepository().findById({type:"java",studyId:l}).then(r=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return void e(null);const l=(0,n.ensureNotNull)(this._seriesMinTickWV),s=f(this._undoModel,r.id,r.inputs,i,t,l,o);this._subscribeInputsUpdate(r.inputs,i),e(s)}).catch(i=>{P.logWarn("Find meta info for create series definitions with error - "+(0,w.errorToString)(i)),e(null)}):e(null)}).then(i=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return this._definitions;const t=(0,p.getSeriesStylePropertiesDefinitions)(this._undoModel,e,r,{seriesPriceSources:te,lineStyleTypes:ne,isJapaneseChartsAvailable:!0,defaultSeriesFontSizes:ee},"mainSeries");null!==i&&t.push(...i);const n=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,e.minTick,v)},{id:o+"SymbolMinTick",title:x,options:new(c())(re())}),l=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,D)},{id:o+"SymbolTimezone",title:N,options:new(c())(this._timezonePropertyObj.values)});return this._definitions={definitions:[(0,s.createPropertyDefinitionsGeneralGroup)(t,"generalSymbolStylesGroup"),...this._seriesPriceLinesDefinitions(o),...this._seriesDataDefinitions(o),n,l]},this._definitions})}_seriesDataDefinitions(e){return[]}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs()
;return(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,_)},{id:e+"SymbolExtendedHoursColors",title:A})}_createPrePostMarketDefinition(e){const i=(0,T.combineWithFilteredUpdate)((e,i)=>!i&&(0,d.symbolHasPreOrPostMarket)(this._series.symbolInfo())&&!(0,d.isRegularSessionId)(this._series.sessionIdProxyProperty().value()),(e,i)=>i||!e,this._series.symbolResolvingActive(),(0,S.createWVFromProperty)(this._series.isDWMProperty())),t=this._model.sessions(),n=t.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),r=t.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,C),color2:(0,s.getColorDefinitionProperty)(this._undoModel,r.color,r.transparency,k),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(i)},{id:e+"SymbolExtendedHoursColors",title:A})}_seriesPriceLinesDefinitions(e){const i=[],t=this._series.properties().childs();if(this._series.hasClosePrice()){const n=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.showPriceLine,M),color:(0,s.getColorDefinitionProperty)(this._undoModel,t.priceLineColor,null,L),width:(0,s.convertToDefinitionProperty)(this._undoModel,t.priceLineWidth,I)},{id:e+"SymbolLastValuePriceLine",title:j});i.push(n)}this._series.hasClosePrice();const n=t.highLowAvgPrice.childs(),r=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesVisible,B),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.highLowPriceLinesColor,null,O),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesWidth,E)},{id:e+"SymbolHighLowPriceLines",title:X});if(i.push(r),m){const t=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.averageClosePriceLineVisible,W),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.averagePriceLineColor,null,V),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.averagePriceLineWidth,$)},{id:e+"SymbolAverageClosePriceLine",title:Z});i.push(t)}return i}}}}]);

View File

@@ -0,0 +1,10 @@
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7387],{16717:(e,i,t)=>{t.d(i,{getSeriesStylePropertiesDefinitions:()=>me});var n=t(88537),o=t(28353),r=t(24980),s=t(50366),l=t(37667),a=t(52714),c=t.n(a),d=t(67337),h=t(37787),p=t(80054);const g=new r.TranslatedString("change color bars based on previous close",(0,o.t)("change color bars based on previous close")),u=new r.TranslatedString("change HLC bars",(0,o.t)("change HLC bars")),y=new r.TranslatedString("change bar up color",(0,o.t)("change bar up color")),f=new r.TranslatedString("change bar down color",(0,o.t)("change bar down color")),b=new r.TranslatedString("change thin bars",(0,o.t)("change thin bars")),S=new r.TranslatedString("change line price source",(0,o.t)("change line price source")),w=new r.TranslatedString("change line type",(0,o.t)("change line type")),T=new r.TranslatedString("change line color",(0,o.t)("change line color")),P=new r.TranslatedString("change line width",(0,o.t)("change line width")),m=new r.TranslatedString("change area price source",(0,o.t)("change area price source")),v=new r.TranslatedString("change area line color",(0,o.t)("change area line color")),D=new r.TranslatedString("change area line width",(0,o.t)("change area line width")),_=new r.TranslatedString("change area fill color",(0,o.t)("change area fill color")),C=new r.TranslatedString("change baseline price source",(0,o.t)("change baseline price source")),k=new r.TranslatedString("change baseline top line color",(0,o.t)("change baseline top line color")),M=new r.TranslatedString("change baseline top line width",(0,o.t)("change baseline top line width")),L=new r.TranslatedString("change baseline bottom line color",(0,o.t)("change baseline bottom line color")),I=new r.TranslatedString("change baseline bottom line width",(0,o.t)("change baseline bottom line width")),E=new r.TranslatedString("change baseline fill top area color",(0,o.t)("change baseline fill top area color")),O=new r.TranslatedString("change baseline fill bottom area color",(0,o.t)("change baseline fill bottom area color")),x=new r.TranslatedString("change base level",(0,o.t)("change base level")),B=new r.TranslatedString("change high-low body visibility",(0,o.t)("change high-low body visibility")),W=new r.TranslatedString("change high-low body color",(0,o.t)("change high-low body color")),V=new r.TranslatedString("change high-low borders visibility",(0,o.t)("change high-low borders visibility")),H=new r.TranslatedString("change high-low border color",(0,o.t)("change high-low border color")),$=new r.TranslatedString("change high-low labels visibility",(0,o.t)("change high-low labels visibility")),A=new r.TranslatedString("change high-low labels color",(0,o.t)("change high-low labels color")),j=new r.TranslatedString("change high-low labels font size",(0,o.t)("change high-low labels font size")),N=(new r.TranslatedString("change renko wick visibility",(0,o.t)("change renko wick visibility")),new r.TranslatedString("change renko wick up color",(0,
o.t)("change renko wick up color")),new r.TranslatedString("change renko wick down color",(0,o.t)("change renko wick down color")),new r.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",(0,o.t)("change the display of real prices on price scale (instead of Heiken-Ashi price)")),new r.TranslatedString("change range thin bars",(0,o.t)("change range thin bars")),new r.TranslatedString("change {candleType} body visibility",(0,o.t)("change {candleType} body visibility"))),F=new r.TranslatedString("change {candleType} up color",(0,o.t)("change {candleType} up color")),z=new r.TranslatedString("change {candleType} down color",(0,o.t)("change {candleType} down color")),R=new r.TranslatedString("change {candleType} border visibility",(0,o.t)("change {candleType} border visibility")),U=new r.TranslatedString("change {candleType} up border color",(0,o.t)("change {candleType} up border color")),Y=new r.TranslatedString("change {candleType} down border color",(0,o.t)("change {candleType} down border color")),G=new r.TranslatedString("change {candleType} wick visibility",(0,o.t)("change {candleType} wick visibility")),J=new r.TranslatedString("change {candleType} wick up color",(0,o.t)("change {candleType} wick up color")),K=new r.TranslatedString("change {candleType} wick down color",(0,o.t)("change {candleType} wick down color")),q=(new r.TranslatedString("change {chartType} up color",(0,o.t)("change {chartType} up color")),new r.TranslatedString("change {chartType} down color",(0,o.t)("change {chartType} down color")),new r.TranslatedString("change {chartType} projection bar up color",(0,o.t)("change {chartType} projection bar up color")),new r.TranslatedString("change {chartType} projection bar down color",(0,o.t)("change {chartType} projection bar down color")),new r.TranslatedString("change {chartType} border bar up color",(0,o.t)("change {chartType} border bar up color")),new r.TranslatedString("change {chartType} border bar down color",(0,o.t)("change {chartType} border bar down color")),new r.TranslatedString("change {chartType} projection border bar up color",(0,o.t)("change {chartType} projection border bar up color")),new r.TranslatedString("change {chartType} projection border bar up color",(0,o.t)("change {chartType} projection border bar up color")),new r.TranslatedString("change column up color",(0,o.t)("change column up color"))),Q=new r.TranslatedString("change column down color",(0,o.t)("change column down color")),X=new r.TranslatedString("change column price source",(0,o.t)("change column price source")),Z=(0,o.t)("Color bars based on previous close"),ee=(0,o.t)("HLC bars"),ie=(0,o.t)("Up color"),te=(0,o.t)("Down color"),ne=(0,o.t)("Thin bars"),oe=(0,o.t)("Body"),re=(0,o.t)("Borders"),se=(0,o.t)("Wick"),le=(0,o.t)("Price source"),ae=(0,o.t)("Type"),ce=(0,o.t)("Line"),de=(0,o.t)("Top line"),he=(0,o.t)("Bottom line"),pe=(0,o.t)("Fill"),ge=(0,o.t)("Fill top area"),ue=(0,o.t)("Fill bottom area"),ye=((0,o.t)("Up bars"),(0,o.t)("Down bars"),(0,
o.t)("Projection up bars"),(0,o.t)("Projection down bars"),(0,o.t)("Real prices on price scale (instead of Heikin-Ashi price)"),(0,o.t)("Base level")),fe=(0,o.t)("Body"),be=(0,o.t)("Borders"),Se=(0,o.t)("Labels");function we(e,i,t,n){return(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.barColorsOnPrevClose,g)},{id:`${t}${n}`,title:Z})}function Te(e,i,t,n,o,r){return(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,i.priceSource,r)},{id:`${n}${o}`,title:le,options:new(c())(t)})}function Pe(e,i,t,n){const o=(0,p.removeSpaces)(t.originalText());return[(0,s.createTwoColorsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.drawBody,N.format({candleType:t})),color1:(0,s.getColorDefinitionProperty)(e,i.upColor,null,F.format({candleType:t})),color2:(0,s.getColorDefinitionProperty)(e,i.downColor,null,z.format({candleType:t}))},{id:`${n}Symbol${o}CandlesColor`,title:oe}),(0,s.createTwoColorsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.drawBorder,R.format({candleType:t})),color1:(0,s.getColorDefinitionProperty)(e,i.borderUpColor,null,U.format({candleType:t})),color2:(0,s.getColorDefinitionProperty)(e,i.borderDownColor,null,Y.format({candleType:t}))},{id:`${n}Symbol${o}BordersColor`,title:re}),(0,s.createTwoColorsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.drawWick,G.format({candleType:t})),color1:(0,s.getColorDefinitionProperty)(e,i.wickUpColor,null,J.format({candleType:t})),color2:(0,s.getColorDefinitionProperty)(e,i.wickDownColor,null,K.format({candleType:t}))},{id:`${n}Symbol${o}WickColors`,title:se})]}function me(e,i,t,a,p){switch(t){case 0:return function(e,i,t){return[we(e,i,t,"SymbolBarStyleBarColorsOnPrevClose"),(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.dontDrawOpen,u)},{id:t+"SymbolDontDrawOpen",title:ee}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.upColor,null,y)},{id:t+"SymbolUpColor",title:ie}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.downColor,null,f)},{id:t+"SymbolDownColor",title:te}),(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.thinBars,b)},{id:t+"SymbolBarThinBars",title:ne})]}(e,i.barStyle.childs(),p);case 1:return function(e,i,t){return[we(e,i,t,"SymbolCandleStyleBarColorsOnPrevClose"),...Pe(e,i,new r.TranslatedString("candle",(0,o.t)("candle")),t)]}(e,i.candleStyle.childs(),p);case 2:return function(e,i,t,n,o){return[Te(e,i,t,o,"SymbolLinePriceSource",S),(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,i.styleType,w)},{id:o+"SymbolStyleType",title:ae,options:new(c())(n)}),(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.color,null,T),width:(0,s.convertToDefinitionProperty)(e,i.linewidth,P)},{id:o+"SymbolLineStyle",title:ce})]}(e,i.lineStyle.childs(),a.seriesPriceSources,a.lineStyleTypes,p);case 3:return function(e,i,t,n){
return[Te(e,i,t,n,"SymbolAreaPriceSource",m),(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.linecolor,null,v),width:(0,s.convertToDefinitionProperty)(e,i.linewidth,D)},{id:n+"SymbolAreaLineStyle",title:ce}),(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(e,i.color1,i.transparency,_),color2:(0,s.getColorDefinitionProperty)(e,i.color2,i.transparency,_)},{id:n+"SymbolAreaFills",title:pe})]}(e,i.areaStyle.childs(),a.seriesPriceSources,p);case 9:return Pe(e,i.hollowCandleStyle.childs(),new r.TranslatedString("hollow candles",(0,o.t)("hollow candles")),p);case 10:return function(e,i,t,n){return[Te(e,i,t,n,"SymbolBaseLinePriceSource",C),(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.topLineColor,null,k),width:(0,s.convertToDefinitionProperty)(e,i.topLineWidth,M)},{id:n+"SymbolBaseLineTopLine",title:de}),(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.bottomLineColor,null,L),width:(0,s.convertToDefinitionProperty)(e,i.bottomLineWidth,I)},{id:n+"SymbolBaseLineBottomLine",title:he}),(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(e,i.topFillColor1,null,E),color2:(0,s.getColorDefinitionProperty)(e,i.topFillColor2,null,E)},{id:n+"SymbolBaseLineTopFills",title:ge}),(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(e,i.bottomFillColor1,null,O),color2:(0,s.getColorDefinitionProperty)(e,i.bottomFillColor2,null,O)},{id:n+"SymbolBaseLineBottomFills",title:ue}),(0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,i.baseLevelPercentage,x,[h.floor])},{id:n+"SymbolBaseLevelPercentage",title:ye,type:0,min:new(c())(0),max:new(c())(100),step:new(c())(1),unit:new(c())("%")})]}(e,i.baselineStyle.childs(),a.seriesPriceSources,p);case 13:return function(e,i,t,n){return[Te(e,i,t,n,"SymbolColumnPriceSource",X),we(e,i,n,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.upColor,null,q)},{id:n+"SymbolUpColor",title:ie}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,i.downColor,null,Q)},{id:n+"SymbolDownColor",title:te})]}(e,i.columnStyle.childs(),a.seriesPriceSources,p)}if(!i.hasOwnProperty("haStyle"))return[];if(a.isJapaneseChartsAvailable&&8===t){return function(e,i,t){const n=[];return n.push(we(e,i,t,"SymbolHAStyleBarColorsOnPrevClose"),...Pe(e,i,new r.TranslatedString("Heikin Ashi",(0,o.t)("Heikin Ashi")),t)),n}(e,i.haStyle.childs(),p)}a.isJapaneseChartsAvailable&&d.enabled("japanese_chart_styles");if(d.enabled("chart_style_hilo")&&12===t){const t=i.hiloStyle.childs(),o=(0,l.chartStyleStudyId)(12);return function(e,i,t,n){const o=(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.drawBody,B),color:(0,s.getColorDefinitionProperty)(e,i.color,null,W)},{id:n+"SymbolBodiesColor",title:fe}),r=(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.showBorders,V),color:(0,
s.getColorDefinitionProperty)(e,i.borderColor,null,H)},{id:n+"SymbolBorderColor",title:be}),l=t.map(e=>({title:String(e),value:e}));return[o,r,(0,s.createTextPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.showLabels,$),color:(0,s.getColorDefinitionProperty)(e,i.labelColor,null,A),size:(0,s.convertToDefinitionProperty)(e,i.fontSize,j)},{id:n+"SymbolLabels",title:Se,isEditable:!1,isMultiLine:!1,sizeItems:l})]}(e,t,(0,n.ensure)(a.defaultSeriesFontSizes)[o],p)}return[]}},87387:(e,i,t)=>{t.d(i,{SeriesPropertyDefinitionsViewModel:()=>ce,basePriceSources:()=>se,lineStyleTypes:()=>le,seriesPrecisionValues:()=>ae});var n=t(88537),o=t(28353),r=t(24980),s=t(67337),l=t(50366),a=(t(32449),t(52714)),c=t.n(a),d=t(37667),h=t(16654),p=t(16717),g=t(37787);const u=new r.TranslatedString("change {inputName} property",(0,o.t)("change {inputName} property"));function y(e){return e.map(e=>({value:e,title:(0,o.t)(e)}))}function f(e,i,t,s,a,h,p){const f=[];return t.forEach(t=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(t,s))return;const b=t.id;if(!s.hasOwnProperty(b))return;const S=s[b],w=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(t,a[b]),T=function(e){return(0,o.t)(e)}(w),P=new r.TranslatedString(w,T);if("options"in t){const i=(0,n.ensure)(t.options);f.push((0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(e,S,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,options:new(c())(y(i))}))}else if("integer"!==t.type){if("float"===t.type){let n;return n=function(e,i){return!((i===(0,d.chartStyleStudyId)(4)||i===(0,d.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,d.chartStyleStudyId)(5)&&"reversalAmount"===e)}(b,i)||null===h.value()?new(c())(t.min):h,void f.push((0,l.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(e,S,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,type:1,min:n,max:new(c())(t.max),defval:t.defval}))}"text"!==t.type?"bool"!==t.type||f.push((0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,S,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T})):f.push((0,l.createTextPropertyDefinition)({text:(0,l.convertToDefinitionProperty)(e,S,u.format({inputName:P}))},{id:`${p}${t.name}`,title:T,isEditable:!0,isMultiLine:!1}))}else f.push((0,l.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(e,S,u.format({inputName:P}),[g.floor])},{id:`${p}${t.name}`,title:T,type:0,min:new(c())(t.min),max:new(c())(t.max),defval:t.defval}))}),f}var b=t(98125),S=t(88461),w=t(81465),T=t(54089),P=t(56450);const m=(0,b.getLogger)("Chart.Definitions.Series"),v=s.enabled("show_average_close_price_line_and_label"),D=s.enabled("pre_post_market_sessions"),_=new r.TranslatedString("change decimal places",(0,o.t)("change decimal places")),C=new r.TranslatedString("change timezone",(0,
o.t)("change timezone")),k=(new r.TranslatedString("adjust data for dividends",(0,o.t)("adjust data for dividends")),new r.TranslatedString("use settlement as close on daily interval",(0,o.t)("use settlement as close on daily interval")),new r.TranslatedString("adjust for contract changes",(0,o.t)("adjust for contract changes")),new r.TranslatedString("change session",(0,o.t)("change session"))),M=new r.TranslatedString("change extended hours color",(0,o.t)("change extended hours color")),L=new r.TranslatedString("change pre market color",(0,o.t)("change pre market color")),I=new r.TranslatedString("change post market color",(0,o.t)("change post market color")),E=new r.TranslatedString("change price line visibility",(0,o.t)("change price line visibility")),O=new r.TranslatedString("change price line color",(0,o.t)("change price line color")),x=new r.TranslatedString("change price line width",(0,o.t)("change price line width")),B=(new r.TranslatedString("change previous close price line visibility",(0,o.t)("change previous close price line visibility")),new r.TranslatedString("change previous close price line color",(0,o.t)("change previous close price line color")),new r.TranslatedString("change previous close price line width",(0,o.t)("change previous close price line width")),new r.TranslatedString("change pre/post market price lines visibility",(0,o.t)("change pre/post market price lines visibility")),new r.TranslatedString("change pre market line color",(0,o.t)("change pre market line color")),new r.TranslatedString("change post market line color",(0,o.t)("change post market line color")),new r.TranslatedString("change bid and ask lines visibility",(0,o.t)("change bid and ask lines visibility")),new r.TranslatedString("change bid line color",(0,o.t)("change bid line color")),new r.TranslatedString("change ask line color",(0,o.t)("change ask line color")),new r.TranslatedString("change high and low price lines visibility",(0,o.t)("change high and low price lines visibility"))),W=new r.TranslatedString("change high and low price line color",(0,o.t)("change high and low price line color")),V=new r.TranslatedString("change high and low price line width",(0,o.t)("change high and low price line width")),H=new r.TranslatedString("change average close price line visibility",(0,o.t)("change average close price line visibility")),$=new r.TranslatedString("change average close price line color",(0,o.t)("change average close price line color")),A=new r.TranslatedString("change average close price line width",(0,o.t)("change average close price line width")),j=((0,o.t)("Adjust data for dividends"),(0,o.t)("Session")),N=((0,o.t)("Adjust for contract changes"),(0,o.t)("Use settlement as close on daily interval"),(0,o.t)("Pre/post market hours background")),F=(0,o.t)("Last price line"),z=((0,o.t)("Previous day close price line"),(0,o.t)("Bid and ask lines"),(0,o.t)("Pre/post market price line"),(0,o.t)("Precision")),R=(0,o.t)("Timezone"),U=(0,o.t)("Open"),Y=(0,o.t)("High"),G=(0,o.t)("Low"),J=(0,o.t)("Close"),K=(0,
o.t)("(H + L)/2"),q=(0,o.t)("(H + L + C)/3"),Q=(0,o.t)("(O + H + L + C)/4"),X=(0,o.t)("Simple"),Z=(0,o.t)("With markers"),ee=(0,o.t)("Step"),ie=(0,o.t)("Default"),te=(0,o.t)("High and low price lines"),ne=(0,o.t)("Average close price line"),oe={[(0,d.chartStyleStudyId)(12)]:[7,8,9,10,11,12,14,16,20,24,28,32,40]},re=[{priceScale:1,minMove:1,frac:!1},{priceScale:10,minMove:1,frac:!1},{priceScale:100,minMove:1,frac:!1},{priceScale:1e3,minMove:1,frac:!1},{priceScale:1e4,minMove:1,frac:!1},{priceScale:1e5,minMove:1,frac:!1},{priceScale:1e6,minMove:1,frac:!1},{priceScale:1e7,minMove:1,frac:!1},{priceScale:1e8,minMove:1,frac:!1},{priceScale:1e9,minMove:1,frac:!1},{priceScale:1e10,minMove:1,frac:!1},{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],se=[{title:U,value:"open",id:"price-source-open"},{title:Y,value:"high",id:"price-source-high"},{title:G,value:"low",id:"price-source-low"},{title:J,value:"close",id:"price-source-close"},{title:K,value:"hl2",id:"price-source-hl2"},{title:q,value:"hlc3",id:"price-source-hlc3"},{title:Q,value:"ohlc4",id:"price-source-ohlc4"}],le=[{title:X,value:h.STYLE_LINE_TYPE_SIMPLE},{title:Z,value:h.STYLE_LINE_TYPE_MARKERS},{title:ee,value:h.STYLE_LINE_TYPE_STEP}];function ae(){const e=[{title:ie,value:"default"}];for(let i=0;i<re.length;i++)e.push({title:`${re[i].minMove}/${re[i].priceScale}`,value:`${re[i].priceScale},${re[i].minMove},${re[i].frac}`});return e}class ce{constructor(e,i,t,n,o,r){this._definitions=null,this._inputsSubscriptions=null,this._isDestroyed=!1,this._propertyPages=null,this._seriesMinTickWV=null,this._sessionIdOptionsWV=new(c())([]),this._series=e,this._undoModel=i,this._model=this._undoModel.model(),this._propertyPageId=t,this._propertyPageName=n,this._propertyPageIcon=o,this._timezonePropertyObj=r,this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSeriesMinTickWV),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSessionIdOptionsWV),this._updateSeriesMinTickWV(),this._updateSessionIdOptionsWV()}destroy(){null!==this._propertyPages&&this._propertyPages.forEach(e=>{(0,l.destroyDefinitions)(e.definitions.value())}),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then(e=>{var i;if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new(c())(e.definitions),visible:null!==(i=e.visible)&&void 0!==i?i:new(c())(!0).readonly()}]),this._propertyPages
}):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo();return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){null===this._seriesMinTickWV?this._seriesMinTickWV=new(c())(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){if(!D)return;const e=this._series.symbolInfo();if(null===e)return;const i=(e.subsessions||[]).filter(e=>!e.private).map(e=>({title:(0,P.translateSessionDescription)(e.description),value:e.id}));this._sessionIdOptionsWV.setValue(i)}_updateDefinitions(){null!==this._definitions&&(0,l.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._unsubscribeInputsUpdate(),this._createSeriesDefinitions().then(e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,n.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)})}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach(e=>{e.unsubscribeAll(this)}),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){const t=[];e.forEach(e=>{if(void 0!==e.visible){const n=e.visible.split("==");if(2===n.length){const e=i[n[0]];-1===t.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),t.push(e))}}}),t.length>0?this._inputsSubscriptions=t:this._inputsSubscriptions=null}_createSeriesDefinitions(){const e=this._series.properties().childs(),i=this._series.getInputsProperties(),t=this._series.getInputsInfoProperties(),o=e.style.value(),r=this._series.getStyleShortName();return new Promise(e=>{const s=(0,d.chartStyleStudyId)(o);null!==s?this._model.studyMetaInfoRepository().findById({type:"java",studyId:s}).then(o=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return void e(null);const s=(0,n.ensureNotNull)(this._seriesMinTickWV),l=f(this._undoModel,o.id,o.inputs,i,t,s,r);this._subscribeInputsUpdate(o.inputs,i),e(l)}).catch(i=>{m.logWarn("Find meta info for create series definitions with error - "+(0,S.errorToString)(i)),e(null)}):e(null)}).then(i=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return this._definitions;const t=(0,p.getSeriesStylePropertiesDefinitions)(this._undoModel,e,o,{seriesPriceSources:se,lineStyleTypes:le,isJapaneseChartsAvailable:!0,defaultSeriesFontSizes:oe},"mainSeries");null!==i&&t.push(...i);const n=(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(this._undoModel,e.minTick,_)},{id:r+"SymbolMinTick",title:z,options:new(c())(ae())}),s=(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,C)},{id:r+"SymbolTimezone",title:R,options:new(c())(this._timezonePropertyObj.values)});return this._definitions={definitions:[(0,
l.createPropertyDefinitionsGeneralGroup)(t,"generalSymbolStylesGroup"),...this._seriesPriceLinesDefinitions(r),...this._seriesDataDefinitions(r),n,s]},this._definitions})}_seriesDataDefinitions(e){const i=[];if(D){const t=this._series.sessionIdProxyProperty(),n=(0,T.combineWithFilteredUpdate)((e,i)=>!i&&(0,d.symbolHasSeveralSessions)(this._series.symbolInfo()),(e,i)=>i||!e,this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),o=(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(this._undoModel,t,k),visible:(0,l.convertFromReadonlyWVToDefinitionProperty)(n)},{id:"sessionId",title:j,options:this._sessionIdOptionsWV});i.push(o);const r=this._model.sessions().graphicsInfo();let s=!1;r.backgrounds&&(s=void 0!==r.backgrounds.outOfSession);const a=s?this._createOutOfSessionDefinition(e):this._createPrePostMarketDefinition(e);i.push(a)}return i}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs();return(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,M)},{id:e+"SymbolExtendedHoursColors",title:N})}_createPrePostMarketDefinition(e){const i=(0,T.combineWithFilteredUpdate)((e,i)=>!i&&(0,d.symbolHasPreOrPostMarket)(this._series.symbolInfo())&&!(0,d.isRegularSessionId)(this._series.sessionIdProxyProperty().value()),(e,i)=>i||!e,this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),t=this._model.sessions(),n=t.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),o=t.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return(0,l.createTwoColorsPropertyDefinition)({color1:(0,l.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,L),color2:(0,l.getColorDefinitionProperty)(this._undoModel,o.color,o.transparency,I),visible:(0,l.convertFromReadonlyWVToDefinitionProperty)(i)},{id:e+"SymbolExtendedHoursColors",title:N})}_seriesPriceLinesDefinitions(e){const i=[],t=this._series.properties().childs();if(this._series.hasClosePrice()){const n=(0,l.createLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._undoModel,t.showPriceLine,E),color:(0,l.getColorDefinitionProperty)(this._undoModel,t.priceLineColor,null,O),width:(0,l.convertToDefinitionProperty)(this._undoModel,t.priceLineWidth,x)},{id:e+"SymbolLastValuePriceLine",title:F});i.push(n)}this._series.hasClosePrice();const n=t.highLowAvgPrice.childs(),o=(0,l.createLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesVisible,B),color:(0,l.getColorDefinitionProperty)(this._undoModel,n.highLowPriceLinesColor,null,W),width:(0,l.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesWidth,V)},{id:e+"SymbolHighLowPriceLines",title:te});if(i.push(o),v){const t=(0,l.createLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._undoModel,n.averageClosePriceLineVisible,H),
color:(0,l.getColorDefinitionProperty)(this._undoModel,n.averagePriceLineColor,null,$),width:(0,l.convertToDefinitionProperty)(this._undoModel,n.averagePriceLineWidth,A)},{id:e+"SymbolAverageClosePriceLine",title:ne});i.push(t)}return i}}},56450:(e,i,t)=>{t.d(i,{translateSessionDescription:()=>r,translateSessionShortDescription:()=>l});var n=t(28353);const o=new Map([["Premarket",(0,n.t)("Premarket",{context:"sessions"})],["Postmarket",(0,n.t)("Postmarket",{context:"sessions"})],["Regular Trading Hours",(0,n.t)("Regular trading hours",{context:"sessions"})],["Extended Trading Hours",(0,n.t)("Extended trading hours",{context:"sessions"})],["Electronic Trading Hours",(0,n.t)("Electronic trading hours",{context:"sessions"})]]);function r(e){var i;return null!==(i=o.get(e))&&void 0!==i?i:e}const s=new Map([["Premarket",(0,n.t)("PRE",{context:"sessions"})],["Postmarket",(0,n.t)("POST",{context:"sessions"})],["Regular Trading Hours",(0,n.t)("RTH",{context:"sessions"})],["Extended Trading Hours",(0,n.t)("ETH",{context:"sessions"})],["Electronic Trading Hours",(0,n.t)("ETH",{context:"sessions"})]]);function l(e){var i;return null!==(i=s.get(e))&&void 0!==i?i:e}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7260],{59142:function(e,t){var s,n,i;n=[t],void 0===(i="function"==typeof(s=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,s=Array(e.length);t<e.length;t++)s[t]=e[t];return s}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var s=!1;if("undefined"!=typeof window){var n={get passive(){s=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var i="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),a=[],o=!1,r=-1,l=void 0,c=void 0,d=function(e){return a.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},h=function(e){var t=e||window.event;return!!d(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},u=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==l&&(document.body.style.overflow=l,l=void 0)}))};e.disableBodyScroll=function(e,n){if(i){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!a.some((function(t){return t.targetElement===e}))){var u={targetElement:e,options:n||{}};a=[].concat(t(a),[u]),e.ontouchstart=function(e){1===e.targetTouches.length&&(r=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var s,n,i,a;1===t.targetTouches.length&&(n=e,a=(s=t).targetTouches[0].clientY-r,!d(s.target)&&(n&&0===n.scrollTop&&0<a||(i=n)&&i.scrollHeight-i.scrollTop<=i.clientHeight&&a<0?h(s):s.stopPropagation()))},o||(document.addEventListener("touchmove",h,s?{passive:!1}:void 0),o=!0)}}else{g=n,setTimeout((function(){if(void 0===c){var e=!!g&&!0===g.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===l&&(l=document.body.style.overflow,document.body.style.overflow="hidden")}));var m={targetElement:e,options:n||{}};a=[].concat(t(a),[m])}var g},e.clearAllBodyScrollLocks=function(){i?(a.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),o&&(document.removeEventListener("touchmove",h,s?{passive:!1}:void 0),o=!1),a=[],r=-1):(u(),a=[])},e.enableBodyScroll=function(e){if(i){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,a=a.filter((function(t){return t.targetElement!==e})),o&&0===a.length&&(document.removeEventListener("touchmove",h,s?{passive:!1}:void 0),o=!1)}else 1===a.length&&a[0].targetElement===e?(u(),a=[]):a=a.filter((function(t){return t.targetElement!==e}))}})?s.apply(t,n):s)||(e.exports=i)},62092:e=>{e.exports={loader:"loader-MuZZSHRY",static:"static-MuZZSHRY",item:"item-MuZZSHRY","tv-button-loader":"tv-button-loader-MuZZSHRY",medium:"medium-MuZZSHRY",small:"small-MuZZSHRY",black:"black-MuZZSHRY",
white:"white-MuZZSHRY",gray:"gray-MuZZSHRY",primary:"primary-MuZZSHRY","loader-initial":"loader-initial-MuZZSHRY","loader-appear":"loader-appear-MuZZSHRY"}},32925:e=>{e.exports={button:"button-WhrIKIq9",hover:"hover-WhrIKIq9",inner:"inner-WhrIKIq9"}},78966:e=>{e.exports={title:"title-mAu74Mtg"}},43527:e=>{e.exports={toolbar:"toolbar-sFd8og5Y",dateRangeWrapper:"dateRangeWrapper-sFd8og5Y",seriesControlWrapper:"seriesControlWrapper-sFd8og5Y",dateRangeExpanded:"dateRangeExpanded-sFd8og5Y",dateRangeCollapsed:"dateRangeCollapsed-sFd8og5Y",item:"item-sFd8og5Y",first:"first-sFd8og5Y",last:"last-sFd8og5Y",inline:"inline-sFd8og5Y",timezone:"timezone-sFd8og5Y",session:"session-sFd8og5Y",icon:"icon-sFd8og5Y",hidden:"hidden-sFd8og5Y",collapsed:"collapsed-sFd8og5Y"}},47393:e=>{e.exports={button:"button-YwWuPcCo",separator:"separator-YwWuPcCo"}},25033:e=>{e.exports={button:"button-wNyKS1Qc",hover:"hover-wNyKS1Qc",icon:"icon-wNyKS1Qc"}},71922:e=>{e.exports={separator:"separator-ArqK8T1e"}},70439:e=>{e.exports={headerMenuText:"headerMenuText-suXx3uas"}},17963:e=>{e.exports={button:"button-U8Px2hz6"}},22880:e=>{e.exports={item:"item-G1QqQDLk",hover:"hover-G1QqQDLk",isActive:"isActive-G1QqQDLk",isFirst:"isFirst-G1QqQDLk",isLast:"isLast-G1QqQDLk"}},72767:e=>{e.exports={slider:"slider-eR7xmZ00",inner:"inner-eR7xmZ00"}},38952:e=>{e.exports={sliderRow:"sliderRow-DtHrLXA3"}},19119:e=>{e.exports={item:"item-tPYeYcJa",interactive:"interactive-tPYeYcJa",hovered:"hovered-tPYeYcJa",disabled:"disabled-tPYeYcJa",active:"active-tPYeYcJa",shortcut:"shortcut-tPYeYcJa",normal:"normal-tPYeYcJa",big:"big-tPYeYcJa",iconCell:"iconCell-tPYeYcJa",icon:"icon-tPYeYcJa",checkmark:"checkmark-tPYeYcJa",content:"content-tPYeYcJa",label:"label-tPYeYcJa",checked:"checked-tPYeYcJa",toolbox:"toolbox-tPYeYcJa",showToolboxOnHover:"showToolboxOnHover-tPYeYcJa",arrowIcon:"arrowIcon-tPYeYcJa",subMenu:"subMenu-tPYeYcJa",invisibleHotkey:"invisibleHotkey-tPYeYcJa"}},61999:e=>{e.exports={item:"item-zoYF2FPa",emptyIcons:"emptyIcons-zoYF2FPa",loading:"loading-zoYF2FPa",disabled:"disabled-zoYF2FPa",interactive:"interactive-zoYF2FPa",hovered:"hovered-zoYF2FPa",normal:"normal-zoYF2FPa",big:"big-zoYF2FPa",icon:"icon-zoYF2FPa",label:"label-zoYF2FPa",title:"title-zoYF2FPa",nested:"nested-zoYF2FPa",shortcut:"shortcut-zoYF2FPa",remove:"remove-zoYF2FPa"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},524:e=>{e.exports={separator:"separator-GzmeVcFo",small:"small-GzmeVcFo",normal:"normal-GzmeVcFo",large:"large-GzmeVcFo"}},37740:e=>{e.exports={tabs:"tabs-rKFlMYkc",tab:"tab-rKFlMYkc",noBorder:"noBorder-rKFlMYkc",disabled:"disabled-rKFlMYkc",active:"active-rKFlMYkc",defaultCursor:"defaultCursor-rKFlMYkc",slider:"slider-rKFlMYkc",content:"content-rKFlMYkc"}},26996:(e,t,s)=>{"use strict";s.d(t,{Loader:()=>c});var n,i=s(59496),a=s(97754),o=s(74991),r=s(62092),l=s.n(r);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(n||(n={}));class c extends i.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:n.Initial}}render(){
const{className:e,color:t="black",size:s="medium",staticPosition:n}=this.props,o=a(l().item,l()[t],l()[s]);return i.createElement("span",{className:a(l().loader,n&&l().static,this._getStateClass(),e)},i.createElement("span",{className:o}),i.createElement("span",{className:o}),i.createElement("span",{className:o}))}componentDidMount(){this.setState({state:n.Appear}),this._stateChangeTimeout=setTimeout(()=>{this.setState({state:n.Active})},2*o.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case n.Initial:return l()["loader-initial"];case n.Appear:return l()["loader-appear"];default:return""}}}},49466:(e,t,s)=>{"use strict";s.d(t,{ToolWidgetMenuSummary:()=>o});var n=s(59496),i=s(97754),a=s(78966);function o(e){return n.createElement("div",{className:i(e.className,a.title)},e.children)}},50168:(e,t,s)=>{"use strict";s.r(t),s.d(t,{BottomToolbarRenderer:()=>nt});var n=s(59496),i=s(87995),a=s(28353),o=s(19036),r=s(97754),l=s(9837),c=s(67337),d=s(35390),h=s(40233),u=s(59064),m=s(90692),g=s(16396),p=s(51613),v=s(88537),b=s(51768),_=s(55402),C=s(2872),S=s.n(C),f=s(16654);class y{constructor(e){this._state={ranges:[]},this._change=new(S()),this._rangeChangedListenerBound=this._onRangeChanged.bind(this);const{chartWidget:t}=this._context=e;t.withModel(null,()=>{const e=t.model(),s=e.mainSeries();s.onStatusChanged().subscribe(this,this._updateAvailableRanges),c.enabled("update_timeframes_set_on_symbol_resolve")&&s.dataEvents().symbolResolved().subscribe(this,this._updateAvailableRanges),s.priceScale().properties().childs().lockScale.subscribe(this,this._updateAvailableRanges);const n=e.model().appliedTimeFrame();n.subscribe(this._rangeChangedListenerBound),this._rangeChangedListenerBound(n.value()),this._updateAvailableRanges()})}state(){return this._state}onChange(){return this._change}selectRange(e){this._setState({activeRange:e.value.value});const{chartWidgetCollection:t}=this._context,s={val:e.value,res:e.targetResolution};t.setTimeFrame(s)}destroy(){const{chartWidget:e}=this._context;e.withModel(null,()=>{const t=e.model(),s=t.mainSeries();s.onStatusChanged().unsubscribe(this,this._updateAvailableRanges),c.enabled("update_timeframes_set_on_symbol_resolve")&&s.dataEvents().symbolResolved().unsubscribe(this,this._updateAvailableRanges),s.priceScale().properties().childs().lockScale.unsubscribe(this,this._updateAvailableRanges),t.model().appliedTimeFrame().unsubscribe(this._rangeChangedListenerBound)}),this._change.destroy()}_setState(e){this._state=Object.assign({},this._state,e),this._change.fire(this._state)}_onRangeChanged(e){let t;null!==e&&"period-back"===e.val.type&&(t=e.val.value),this._setState({activeRange:t})}_updateAvailableRanges(){const{availableTimeFrames:e,chartWidget:t}=this._context;if(!t.hasModel())return;const s=t.model().mainSeries(),n=s.status();if(n===f.STATUS_LOADING||n===f.STATUS_RESOLVING)return;const i=e(s.symbolInfo(),s.status());0!==i.length&&this._setState({ranges:i})}}const x=(0,
_.registryContextType)();function E(e){var t;return(t=class extends n.PureComponent{constructor(e,t){super(e,t),this._handleUpdate=e=>{this.setState(e)},this._handleSelectRange=e=>{var t,s;(0,b.trackEvent)("GUI","Chart Bottom Toolbar","range "+e.value),null===(s=(t=this.props).onSelectRange)||void 0===s||s.call(t,e),this._binding.selectRange(e)},(0,_.validateRegistry)(t,{availableTimeFrames:o.any.isRequired,chartWidgetCollection:o.any.isRequired,chartWidget:o.any.isRequired}),M.has(t.chartWidget)||M.set(t.chartWidget,new y(t));const s=this._binding=(0,v.ensureDefined)(M.get(t.chartWidget));this.state=s.state()}componentDidMount(){this._binding.onChange().subscribe(this,this._handleUpdate)}componentWillUnmount(){this._binding.onChange().unsubscribe(this,this._handleUpdate)}render(){return n.createElement(e,{goToDateButton:this.props.goToDateButton,className:this.props.className,ranges:this.state.ranges,activeRange:this.state.activeRange,onSelectRange:this._handleSelectRange})}}).contextType=x,t}const M=new WeakMap;var R=s(94420),k=s(23829),w=s(1109),T=s(82724),A=s(52360),W=s(47393);function N(e){const{ranges:t,activeRange:s,onSelectRange:i}=e;return n.createElement(n.Fragment,null,t.map(e=>n.createElement(k.ContextMenuItem,{key:e.value.value,label:e.description||e.text,active:s===e.value.value,checked:s===e.value.value,checkable:!0,disabled:!1,onClick:a.bind(null,e),doNotCloseOnClick:!1,subItems:[]})));function a(e){e&&i&&i(e),(0,u.globalCloseMenu)()}}function B(e){const{onGoToDateClick:t}=e;return n.createElement(n.Fragment,null,n.createElement(w.Separator,{className:W.separator}),n.createElement(k.ContextMenuItem,{icon:A,label:(0,T.appendEllipsis)((0,a.t)("Go to")),onClick:t,active:!1,checked:!1,checkable:!1,disabled:!1,doNotCloseOnClick:!1,subItems:[]}))}const F={title:(0,a.t)("Date Range"),goToDate:(0,T.appendEllipsis)((0,a.t)("Go to"))},P=(0,_.registryContextType)();class z extends n.PureComponent{constructor(e,t){super(e,t),this._handleGoToDateClick=()=>{const{chartWidget:e}=this.context;(0,R.showGoToDateDialog)(e),(0,u.globalCloseMenu)()},this._handleRangeSelect=e=>{e&&this.props.onSelectRange&&this.props.onSelectRange(e),(0,u.globalCloseMenu)()},this._renderChildren=e=>{const{ranges:t,activeRange:s,goToDateButton:i}=this.props;return e?n.createElement(n.Fragment,null,n.createElement(N,{ranges:t,activeRange:s,onSelectRange:this._handleRangeSelect}),i&&n.createElement(B,{onGoToDateClick:this._handleGoToDateClick})):n.createElement(n.Fragment,null,t.map(e=>n.createElement(g.PopupMenuItem,{key:e.value.value,label:e.description||e.text,isActive:s===e.value.value,onClick:this._handleRangeSelect,onClickArg:e})),i&&n.createElement(p.PopupMenuSeparator,null),i&&n.createElement(g.PopupMenuItem,{label:F.goToDate,onClick:this._handleGoToDateClick}))},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired})}render(){return n.createElement(m.MatchMedia,{rule:"screen and (max-width: 428px)"},e=>n.createElement(d.ToolWidgetMenu,{className:W.button,content:F.title,arrow:!0,verticalAttachEdge:h.VerticalAttachEdge.Top,
verticalDropDirection:h.VerticalDropDirection.FromBottomToTop,horizontalMargin:4,"data-name":"date-ranges-menu",isDrawer:e,onClick:this._trackClick},this._renderChildren(e)))}_trackClick(){0}}z.contextType=P;const D=E(z);var Y=s(64205),L=s(22880);function I(e){const t=r(e.className,L.item,{[L.isActive]:e.isActive,[L.isFirst]:e.isFirst,[L.isLast]:e.isLast});return n.createElement("div",{className:t,onClick:e.onClick,ref:e.reference},e.children)}var H=s(40173),j=s(72767);const Z=(0,H.mergeThemes)(Y.DEFAULT_SLIDER_THEME,j);var G=s(38952);const q=(0,Y.factory)((function(e){return n.createElement("div",{className:r(e.className,Z.slider),ref:e.reference},n.createElement("div",{className:Z.inner}))}));const O=E((function(e){const{className:t,ranges:s,activeRange:i,onSelectRange:a}=e;return n.createElement(q,{className:r(G.sliderRow,t),"data-name":"date-ranges-tabs"},s.map((e,t)=>n.createElement(I,{key:e.value.value,value:e.value.value,isFirst:0===t,isLast:t===s.length-1,isActive:i===e.value.value,onClick:a&&a.bind(null,e)},n.createElement("div",{title:e.description||e.text,className:"apply-common-tooltip"},e.text))))}));var U=s(9745),V=s(61814),J=s(68335),K=s(68139),Q=s(25033);const X=(0,V.hotKeySerialize)({keys:[(0,J.humanReadableModifiers)(J.Modifiers.Alt,!1),"G"],text:"{0} + {1}"}),$=(0,_.registryContextType)();class ee extends n.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidget:e}=this.context;(0,b.trackEvent)("GUI","Chart Bottom Toolbar","go to"),(0,R.showGoToDateDialog)(e)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired})}render(){const{className:e,ranges:t}=this.props;return t.length>0&&n.createElement("div",{className:r("apply-common-tooltip",Q.button,e),"data-name":"go-to-date","data-tooltip-hotkey":X,onClick:this._handleClick,title:(0,a.t)("Go to")},n.createElement(U.Icon,{className:Q.icon,icon:K}))}}ee.contextType=$;const te=E(ee);var se=s(32925);function ne(e){const{reference:t,className:s,children:i,...a}=e;return n.createElement("button",{...a,className:r(s,se.button),ref:t},n.createElement("span",{className:se.inner},i))}var ie=s(23095),ae=s(64806),oe=s(28296),re=s(97056);class le extends n.PureComponent{constructor(e){super(e),this._element=null,this._menuShown=!1,this._preventShowingMenu=!1,this._handleRef=e=>{this._element=e},this._onMouseDown=()=>{this._preventShowingMenu=this._menuShown},this._showMenu=()=>{if(this._preventShowingMenu)return void re.ContextMenuManager.hideAll();const{getActions:e}=this.props,t=(0,v.ensureNotNull)(this._element),s=e();if(0===s.length)return;const n=t.getBoundingClientRect();re.ContextMenuManager.showMenu(s,{clientX:n.left,clientY:n.top,attachToYBy:"bottom"},void 0,{menuName:"TimezoneMenuContextMenu"},()=>{this._menuShown=!1}).then(()=>{this._menuShown=!0})}}render(){const{children:e}=this.props;return n.createElement("span",{onClick:this._showMenu,onMouseDown:this._onMouseDown,ref:this._handleRef},e)}}var ce=s(10480),de=s(17963);const he={hint:(0,a.t)("Timezone")};const ue=(0,_.registryContextType)()
;class me extends n.PureComponent{constructor(e,t){super(e,t),this._timeFormatter=new ae.TimeFormatter,this._tickInterval=void 0,this._tickClock=()=>{const{chartApiInstance:e}=this.context;if(void 0!==this._timezone){const t=(0,ce.utc_to_cal)(this._timezone,e.serverTime());this.setState({time:this._timeFormatter.format(t)})}},this._getActions=()=>{if(!this.props.withMenu)return[];const{chartWidget:e}=this.context;return function(e){e.updateActions();const t=e.actions();return t&&t.applyTimeZone instanceof oe.Action?t.applyTimeZone.getSubItems():[]}(e)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired,chartApiInstance:o.any.isRequired}),this.state={time:""}}componentDidMount(){const{chartWidget:e}=this.context;this._tickInterval=setInterval(this._tickClock,1e3),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().subscribe(this,this.updateTimezonesButton),t.model().properties().childs().timezone.subscribe(this,this.updateTimezonesButton)})}componentWillUnmount(){const{chartWidget:e}=this.context;clearInterval(this._tickInterval),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().unsubscribe(this,this.updateTimezonesButton),t.model().properties().childs().timezone.unsubscribe(this,this.updateTimezonesButton)})}render(){const{className:e,withMenu:t}=this.props,{time:s}=this.state,i=void 0!==this._timezone?(0,ie.parseTzOffset)(this._timezone.name()).string:null;return n.createElement(le,{getActions:this._getActions},n.createElement(ne,{className:r(e,de.button,"apply-common-tooltip"),title:t?he.hint:void 0,disabled:!t,"data-name":"time-zone-menu"},s&&i&&`${s} (${i})`))}updateTimezonesButton(){const{chartWidget:e}=this.context;if(!e.hasModel())return;if(null===e.model().mainSeries().symbolInfo())return;let t=e.model().model().timezone();if("exchange"===t){const s=(0,v.ensureNotNull)(e.model().mainSeries().symbolInfo()).timezone;s&&(t=s)}this._timezone=(0,ce.get_timezone)(t),this._tickClock()}}me.contextType=ue;var ge=s(71922);function pe(e){return n.createElement("span",{className:r(ge.separator,e.className)})}var ve=s(4825),be=s(24980),_e=s(49483);class Ce{constructor(e,t,s){this._highlighted=!1,this._chartWidget=e,this._priceScaleGetter=t,this._owner=s,this._setHighlight=this._setHighlight.bind(this),this._removeHighlight=this._removeHighlight.bind(this)}destroy(){this._highlighted&&this._removeHighlight()}handlers(){const e=_e.CheckMobile.any();return{onMouseEnter:e?void 0:this._setHighlight,onMouseLeave:e?void 0:this._removeHighlight}}_setHighlight(){if(!this._chartWidget.hasModel())return;const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries()),s=this._priceScaleGetter();if(null===t||null===s)return;const n=this._chartWidget.paneByState(t);if(null!==n){const t=n.rightPriceAxisesContainer().findAxisWidgetForScale(s);let i=null;null!==t&&(i=t.axisInfo());const a=n.leftPriceAxisesContainer().findAxisWidgetForScale(s);null!==a&&(i=a.axisInfo());const o=n.highlightedPriceAxis()
;null!==i&&o.value().axis!==i&&(o.setValue({owner:this._owner,axis:i}),e.lightUpdate(),this._highlighted=!0)}}_removeHighlight(){if(!this._chartWidget.hasModel())return;const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries());if(null===t)return;const s=this._chartWidget.paneByState(t);if(null!==s){const t=s.highlightedPriceAxis(),n=t.value();null!==n.axis&&n.owner===this._owner&&(t.setValue({owner:this._owner,axis:null}),e.lightUpdate(),this._highlighted=!1)}}}const Se=(0,_.registryContextType)(),fe=new be.TranslatedString("toggle log scale",(0,a.t)("toggle log scale"));const ye=(0,_.registryContextType)(),xe=new be.TranslatedString("toggle auto scale",(0,a.t)("toggle auto scale"));const Ee=(0,_.registryContextType)(),Me=new be.TranslatedString("toggle percentage scale",(0,a.t)("toggle percentage scale"));const Re=(0,_.registryContextType)();var ke=s(42142),we=s(54475),Te=s(49466),Ae=s(56450),We=s(70439);const Ne=new be.TranslatedString("change session",(0,a.t)("change session")),Be={hint:(0,a.t)("Session"),headerMenuText:(0,a.t)("Sessions")},Fe=(0,_.registryContextType)();class Pe extends n.PureComponent{constructor(e,t){super(e,t),(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired,chartApiInstance:o.any.isRequired}),this.state={availableSessions:[]}}componentDidMount(){const{chartWidget:e}=this.context;e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().subscribe(this,this.updateSessionButton),t.model().mainSeries().properties().childs().sessionId.subscribe(this,this.updateSessionButton),this.updateSessionButton()})}componentWillUnmount(){const{chartWidget:e}=this.context;e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().unsubscribe(this,this.updateSessionButton),t.model().mainSeries().properties().childs().sessionId.unsubscribe(this,this.updateSessionButton)})}render(){const{className:e,withMenu:t}=this.props,{sessionName:s}=this.state;return n.createElement(d.ToolWidgetMenu,{arrow:!1,isDisabled:!t,content:s,className:e,closeOnClickOutside:!0,title:t?Be.hint:void 0,"data-name":"session-menu",verticalDropDirection:h.VerticalDropDirection.FromBottomToTop,verticalAttachEdge:h.VerticalAttachEdge.Top,onClick:this._trackClick},this._menuItems())}updateSessionButton(){var e,t;const{chartWidget:s}=this.context;if(!s.model())return;const n=s.model().mainSeries().symbolInfo();if(null===n)return;const i=n.subsession_id,a=null!==(t=null===(e=n.subsessions)||void 0===e?void 0:e.filter(e=>!e.private))&&void 0!==t?t:[],o=a.find(e=>e.id===i);this.setState({sessionId:i,sessionName:(0,Ae.translateSessionShortDescription)((null==o?void 0:o.description)||""),availableSessions:a})}_menuItems(){if(!this.props.withMenu)return[];const{chartWidget:e}=this.context,{availableSessions:t}=this.state;if(!e.model())return[];const s=e.model().mainSeries(),i=[n.createElement(Te.ToolWidgetMenuSummary,{key:"header_menu_text",className:We.headerMenuText},Be.headerMenuText.toUpperCase())];for(const a of t){const t={category:"SetSession",
event:a.id},o=()=>{e.model().setProperty(s.properties().childs().sessionId,a.id,Ne)};i.push(n.createElement(g.PopupMenuItem,{key:a.id,label:(0,Ae.translateSessionDescription)(a.description),isActive:this.state.sessionId===a.id,trackEventObject:t,onClick:o}))}return i}_trackClick(){0}}Pe.contextType=Fe;var ze=s(99499),De=s(11178),Ye=s(43527);const Le={extLabel:(0,a.t)("ext"),extHint:(0,a.t)("Extended Hours is available only for intraday charts"),percentageHint:(0,a.t)("Toggle Percentage"),logLabel:(0,a.t)("log",{context:"scale"}),logHint:(0,a.t)("Toggle Log Scale"),autoLabel:(0,a.t)("auto",{context:"scale"}),autoHint:(0,a.t)("Toggle Auto Scale"),fullscreenHint:(0,a.t)("Toggle Maximize Chart"),adjLabel:(0,a.t)("adj",{context:"adjustments"}),adjHint:(0,a.t)("Adjust data for dividends"),adjForDividendsOnlyHint:(0,a.t)("Main symbol data is adjusted for dividends only"),adjForSplitsOnlyHint:(0,a.t)("Main symbol data is adjusted for splits only"),backAdjustLabel:(0,a.t)("b-adj",{context:"adjustments"}),backAdjustHint:(0,a.t)("Adjust for contract changes"),settlementAsCloseLabel:(0,a.t)("set",{context:"adjustments"}),settlementAsCloseHint:(0,a.t)("Use settlement as close on daily interval")},Ie=(He=e=>n.createElement(ve.ToolWidgetButton,{text:Le.logLabel,title:Le.logHint,className:e.className,isActive:e.isLogarithm,isGrouped:!0,onClick:Qe(e.onClick,"log",e.isLogarithm),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"logarithm"}),(je=class extends n.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series),s=t.priceScale(),n=s.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({log:!n.log},s,fe)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"logarithm")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),s=t.priceScale();this._handleMainSeriesPriceScaleChanged(s),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},s.mode()),this.setState({isActive:t.priceScale().isLog(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:e}=this.props,{isActive:t,series:s}=this.state;return n.createElement(He,{...this._priceAxisHighlighter.handlers(),className:e,isLogarithm:t,isDisabled:null===s,onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),
this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.log)!==this.state.isActive&&this.setState({isActive:Boolean(t.log)})}}).contextType=Se,je);var He,je;const Ze=function(e){var t;return(t=class extends n.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series).priceScale(),s=t.mode();e.setPriceScaleMode({autoScale:!s.autoScale},t,xe)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"auto")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),s=t.priceScale();this._handleMainSeriesPriceScaleChanged(s),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},s.mode()),this.setState({isActive:t.priceScale().isAutoScale(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:s,series:i}=this.state;return n.createElement(e,{...this._priceAxisHighlighter.handlers(),className:t,isAuto:s,isDisabled:null===i,onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.autoScale)!==this.state.isActive&&this.setState({isActive:Boolean(t.autoScale)})}}).contextType=ye,t}(e=>n.createElement(ve.ToolWidgetButton,{text:Le.autoLabel,title:Le.autoHint,className:e.className,isActive:e.isAuto,isGrouped:!0,onClick:Qe(e.onClick,"auto",e.isAuto),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"auto"})),Ge=function(e){var t;return(t=class extends n.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series),s=t.priceScale(),n=s.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({percentage:!n.percentage},s,Me)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"percentage")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),s=t.priceScale();this._handleMainSeriesPriceScaleChanged(s),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleScaleChange({},s.mode()),this.setState({isActive:t.priceScale().isPercentage(),series:t})})}componentWillUnmount(){
const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:s,series:i}=this.state;return n.createElement(e,{...this._priceAxisHighlighter.handlers(),className:t,isPercentage:s,isDisabled:null===i,onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleScaleChange),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleScaleChange),this._handleScaleChange({},e.mode())}_handleScaleChange(e,t){Boolean(t.percentage)!==this.state.isActive&&this.setState({isActive:Boolean(t.percentage)})}}).contextType=Ee,t}(e=>n.createElement(ve.ToolWidgetButton,{icon:ze,title:Le.percentageHint,className:e.className,isActive:e.isPercentage,isDisabled:e.isDisabled,isGrouped:!0,onClick:Qe(e.onClick,"percent",e.isPercentage),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"percentage"}));const qe=(0,V.hotKeySerialize)({keys:[(0,J.humanReadableModifiers)(J.Modifiers.Alt,!1),"Enter"],text:"{0} + {1}"}),Oe=function(e){var t;return(t=class extends n.PureComponent{constructor(e,t){super(e,t),this._handleClick=e=>{const{resizerDetacher:t,chartWidgetCollection:s}=this.context;e.shiftKey&&t.detachable.value()?t.detach():this.state.isFullscreen?t.exitFullscreen():t.requestFullscreen()},this._handleLayoutChange=e=>{this.setState({isFullscreen:e})},this._handlePhoneSize=()=>{0},(0,_.validateRegistry)(t,{chartWidgetCollection:o.any.isRequired,resizerDetacher:o.any.isRequired});const{resizerDetacher:s}=t;this.state={isFullscreen:s.fullscreen.value(),isChangeLayoutButton:this._isChangeLayoutButton()}}componentDidMount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:s}=this.props;e.fullscreen.subscribe(this._handleLayoutChange)}componentWillUnmount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:s}=this.props;e.fullscreen.unsubscribe(this._handleLayoutChange)}render(){const{className:t}=this.props,{isFullscreen:s,isChangeLayoutButton:i}=this.state;return n.createElement(e,{className:t,isFullscreen:s,onClick:this._handleClick})}_isChangeLayoutButton(){return!1}}).contextType=Re,t}(e=>n.createElement(ve.ToolWidgetButton,{icon:De,title:Le.fullscreenHint,className:e.className,isActive:e.isFullscreen,onClick:Qe(e.onClick,"maximize chart",e.isFullscreen),"data-tooltip-hotkey":qe,"data-name":"fullscreen"})),Ue={properties:!0,fullscreen:!0,preventPhoneLayout:!0},Ve={fullscreen:Number.MIN_SAFE_INTEGER,preventPhoneLayout:Number.MIN_SAFE_INTEGER,properties:Number.MIN_SAFE_INTEGER,separator:-2,timeZones:-1,auto:0,logarithm:1,percentage:2,session:3,adj:4,backAdj:5,settlementAsClose:6},Je=(()=>{const e=new Map;return e.set(Ie,"logarithm"),e.set(Ge,"percentage"),
e.set(Ze,"auto"),e.set(Pe,"session"),e.set(Oe,"fullscreen"),e})();function Ke(e){0}function Qe(e,t,s){return t=>{e(t)}}const Xe={dateRangeMode:"hidden",separator:!0,timeZones:!0,fullscreen:!0,preventPhoneLayout:!0,properties:!0,auto:!0,logarithm:!0,percentage:!0,session:!0,adj:!0,backAdj:!0,settlementAsClose:!0},$e=(0,_.registryContextType)();class et extends n.PureComponent{constructor(e,t){var s,a;super(e,t),this._timezoneButtonRef=null,this._layout=Object.assign({},Xe),this._raf=null,this._toolbar=null,this._rangeExpanded=null,this._rangeCollapsed=null,this._seriesComponents={},this._injector=(s=()=>this._layout,a=(e,t)=>this._seriesComponents[t]=e,(e,t,i)=>{if(n.isValidElement(e)&&"string"!=typeof e.type){const{props:o}=e;if("string"==typeof o.className){const l={className:r(o.className,0===t&&Ye.first,t===i.length-1&&Ye.last)},c=s(),d=(0,v.ensureDefined)(Je.get(e.type));return n.createElement("div",{key:null===e.key?void 0:e.key,className:r(Ye.inline,c[d]&&Ye.collapsed),ref:e=>a(e,d),onClick:()=>Ke()},n.cloneElement(e,l))}}return e}),this._updateButtonsVisibility=()=>{const{chartWidget:e}=this.context,t=e.model().model(),s=t.mainSeries(),n=s.symbolInfo(),i=!s.isDWMProperty().value();if(s.symbolResolvingActive().value())return void this._setStateWithResize({intervalAllowsSessionButton:i});const a=((null==n?void 0:n.subsessions)||[]).filter(e=>!e.private).length>1;this._setStateWithResize({intervalAllowsSessionButton:i,symbolAllowsSessionButton:a})},this._handleResize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{const e=this._layout,t=(0,v.ensureNotNull)(this._toolbar),s=(0,v.ensureNotNull)(this._rangeExpanded),n=(a=function(e){const t={};return Object.keys(e).forEach(s=>{const n=e[s];if(null!==n){const e=i.findDOMNode(n);null!==e&&(t[s]=e)}}),t}(this._seriesComponents),Object.keys(a).map(e=>({name:e,width:a[e].offsetWidth})).sort((e,t)=>Ve[e.name]-Ve[t.name]));var a;const o=t.offsetWidth,r=n.reduce((e,t)=>e+t.width,0),l=s.offsetWidth,c=!Boolean(s.textContent)||o-r-l<=0?"collapsed":"expanded";if(Object.assign(e,{dateRangeMode:c}),"expanded"!==c){const t=o-(0,v.ensureNotNull)(this._rangeCollapsed).offsetWidth-0;let s=0,i=0;for(const a of n)s+=a.width,a.name in Ue?(i+=a.width,Object.assign(e,{[a.name]:!1})):Object.assign(e,{[a.name]:t<=s});t<=i&&Object.assign(e,{dateRangeMode:"hidden"})}else Object.assign(e,{separator:!1,timeZones:!1,fullscreen:!1,preventPhoneLayout:!1,properties:!1,auto:!1,logarithm:!1,percentage:!1,session:!1,adj:!1,settlementAsClose:!1,backAdj:!1});this._applyResizing(),this._raf=null}))},this._handleTimezoneButtonRef=e=>{this._timezoneButtonRef=e},this._handleMeasure=()=>{null!==this._toolbar&&this.resizeUI()},this._handleFullscreenableChange=e=>{this._setStateWithResize({isFullscreenable:e})},this._handlePreventPhoneLayoutButtonVisibility=()=>{0},this._handleToolbarRef=e=>this._toolbar=e,this._handleRangeCollapsedRef=e=>this._rangeCollapsed=e,this._handleRangeExpandedRef=e=>this._rangeExpanded=e,this._handleTimeZonesRef=e=>{this._seriesComponents.timeZones=e},
this._handleSessionsRef=e=>{this._seriesComponents.session=e},this._handleSeparatorRef=e=>{this._seriesComponents.separator=e},(0,_.validateRegistry)(t,{onContentBoxChanged:o.any.isRequired,chartApiInstance:o.any.isRequired,chartWidget:o.any.isRequired,chartWidgetCollection:o.any.isRequired,resizerDetacher:o.any.isRequired});const{resizerDetacher:l}=this.context;this.state={isFullscreenable:l.fullscreenable.value(),isPreventPhoneLayoutButton:this._isPreventPhoneLayoutButton()}}componentDidMount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:s,chartWidget:n}=this.context;e.subscribe(this,this._handleResize),t.fullscreenable.subscribe(this._handleFullscreenableChange),n.withModel(null,()=>{const e=n.model(),t=e.model();e.mainSeries().isDWMProperty().subscribe(this,this._updateButtonsVisibility),t.symbolSourceResolvingActive().subscribe(this._updateButtonsVisibility),t.symbolSourceCollectionChanged().subscribe(this,this._updateButtonsVisibility),this._updateButtonsVisibility()}),this.updateTimezonesButton(),this.resizeUI()}componentWillUnmount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:s,chartWidget:n}=this.context;e.unsubscribe(this,this._handleResize),t.fullscreenable.unsubscribe(this._handleFullscreenableChange),n.withModel(null,()=>{const e=n.model(),t=e.model();e.mainSeries().isDWMProperty().unsubscribe(this,this._updateButtonsVisibility),e.mainSeries().isBackAdjustmentForbiddenProperty().unsubscribe(this,this._updateButtonsVisibility),e.mainSeries().isSettlementAsCloseForbiddenProperty().unsubscribe(this,this._updateButtonsVisibility),t.symbolSourceCollectionChanged().unsubscribe(this,this._updateButtonsVisibility),t.symbolSourceResolvingActive().unsubscribe(this._updateButtonsVisibility)}),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)}render(){const e=this._layout,{timeFramesWidgetEnabled:t,timeWidgetEnabled:s,percentageScaleButtonEnabled:i,logScaleButtonEnabled:a,autoScaleButtonEnabled:o,fullscreenButtonEnabled:d}=this.props;return n.createElement("div",{className:Ye.toolbar,ref:this._handleToolbarRef,onContextMenu:we.preventDefault},t&&n.createElement(ke.FragmentMap,null,n.createElement("div",{className:r(Ye.dateRangeWrapper,"collapsed"!==e.dateRangeMode&&Ye.collapsed),ref:this._handleRangeCollapsedRef},n.createElement("div",{className:r(Ye.dateRangeCollapsed)},n.createElement(D,{goToDateButton:this.props.goToDateEnabled}))),n.createElement(l,{onMeasure:this._handleMeasure},n.createElement("div",{className:r(Ye.dateRangeWrapper,"expanded"!==e.dateRangeMode&&Ye.collapsed),ref:this._handleRangeExpandedRef},n.createElement("div",{className:r(Ye.dateRangeExpanded)},n.createElement(O,{onSelectRange:this._trackRangeButtonClick}),this.props.goToDateEnabled&&n.createElement(pe,null),this.props.goToDateEnabled&&n.createElement(te,null))))),n.createElement("div",{className:Ye.seriesControlWrapper},s&&n.createElement(l,{onMeasure:this._handleMeasure},n.createElement("div",{className:r(Ye.inline,e.timeZones&&Ye.collapsed),ref:this._handleTimeZonesRef
},n.createElement("div",{className:Ye.inline,onClick:this._trackTimezonesButtonClick},n.createElement(me,{className:Ye.timezone,withMenu:this.props.timezoneMenuEnabled,ref:this._handleTimezoneButtonRef})))),this.props.sessionIdButtonEnabled&&this.state.symbolAllowsSessionButton&&this.state.intervalAllowsSessionButton&&n.createElement(l,{onMeasure:this._handleMeasure},n.createElement("div",{className:r(Ye.inline,e.session&&Ye.collapsed),ref:this._handleSessionsRef},n.createElement("div",{className:Ye.inline},n.createElement(Pe,{className:Ye.session,withMenu:this.props.sessionIdButtonEnabled})))),n.createElement("div",{ref:this._handleSeparatorRef,className:r(Ye.inline,e.separator&&Ye.collapsed)},n.createElement(pe,null)),n.createElement(ke.FragmentMap,{map:this._injector},!1,!1,!1,i&&!c.enabled("fundamental_widget")&&n.createElement(Ge,{className:Ye.icon}),a&&n.createElement(Ie,{className:Ye.item}),o&&n.createElement(Ze,{className:Ye.item}),d&&this.state.isFullscreenable&&n.createElement(Oe,{className:Ye.icon,mobileChangeLayoutEnabled:this.props.mobileChangeLayoutEnabled}),!1)))}updateTimezonesButton(){null!==this._timezoneButtonRef&&this._timezoneButtonRef.updateTimezonesButton()}resizeUI(){this._handleResize()}_trackRangeButtonClick(e){0}_trackTimezonesButtonClick(){Ke()}_setStateWithResize(e){Object.assign(this._layout,Xe),this._applyResizing(),this.setState(e,()=>this._handleResize())}_applyResizing(){const{dateRangeMode:e,...t}=this._layout;this._rangeExpanded&&this._rangeExpanded.classList.toggle(Ye.collapsed,"expanded"!==e),this._rangeCollapsed&&this._rangeCollapsed.classList.toggle(Ye.collapsed,"collapsed"!==e),Object.keys(t).forEach(e=>{const s=e,n=this._seriesComponents[s];n&&n.classList.toggle(Ye.collapsed,t[s])})}_isPreventPhoneLayoutButton(){return!1}}et.contextType=$e;const tt={onContentBoxChanged:o.any,computeContentBox:o.any,chartWidget:o.any,chartApiInstance:o.any,chartWidgetCollection:o.any,resizerDetacher:o.any,availableTimeFrames:o.any};class st extends n.PureComponent{constructor(e){super(e),this._setActiveChart=e=>{this._defineRegistry(e),this.setState({chartWidget:e})};const t=this.props.chartWidgetCollection.activeChartWidget.value();this.state={chartWidget:t},this._defineRegistry(t)}componentDidMount(){this.props.chartWidgetCollection.activeChartWidget.subscribe(this._setActiveChart)}componentWillUnmount(){this.props.chartWidgetCollection.activeChartWidget.unsubscribe(this._setActiveChart)}render(){const{chartWidget:e}=this.state;if(!e)return null;const{options:t}=this.props,s={timeFramesWidgetEnabled:t.timeFramesWidgetEnabled,goToDateEnabled:t.timeFramesWidget.goToDateEnabled,timeWidgetEnabled:t.timeWidgetEnabled,timezoneMenuEnabled:t.timeWidget&&t.timeWidget.timezoneMenuEnabled,sessionIdButtonEnabled:t.sessionIdButtonEnabled,backAdjustmentButtonEnabled:t.backAdjustmentButtonEnabled,settlementAsCloseButtonEnabled:t.settlementAsCloseButtonEnabled,adjustForDividendsButtonEnabled:t.adjustForDividendsButtonEnabled,logScaleButtonEnabled:t.logScaleButtonEnabled,
percentageScaleButtonEnabled:t.percentageScaleButtonEnabled,autoScaleButtonEnabled:t.autoScaleButtonEnabled,fullscreenButtonEnabled:t.fullscreenButtonEnabled,mobileChangeLayoutEnabled:t.mobileChangeLayoutEnabled};return n.createElement(_.RegistryProvider,{validation:tt,value:this._registry},n.createElement(et,{key:e.id(),...s}))}_defineRegistry(e){const{onContentBoxChanged:t,computeContentBox:s,chartApiInstance:n,chartWidgetCollection:i,options:{timeFramesWidgetEnabled:a,timeFramesWidget:o}}=this.props,r=a?o.availableTimeFrames:void 0;this._registry={onContentBoxChanged:t,computeContentBox:s,chartWidget:e,availableTimeFrames:r,chartApiInstance:n,chartWidgetCollection:i,resizerDetacher:e.getResizerDetacher()}}}class nt{constructor(e,t,s,a,o,r,l){this._container=e;const c=n.createElement(st,{onContentBoxChanged:t,computeContentBox:s,chartWidgetCollection:a,chartApiInstance:o,chartWidgetOptions:r,options:l});i.render(c,e),e.setAttribute("data-initialized","true")}destroy(){i.unmountComponentAtNode(this._container),this._container.removeAttribute("data-initialized")}}},55402:(e,t,s)=>{"use strict";s.d(t,{validateRegistry:()=>r,RegistryProvider:()=>l,registryContextType:()=>c});var n=s(59496),i=s(19036),a=s.n(i);const o=n.createContext({});function r(e,t){a().checkPropTypes(t,e,"context","RegistryContext")}function l(e){const{validation:t,value:s}=e;return r(s,t),n.createElement(o.Provider,{value:s},e.children)}function c(){return o}},56450:(e,t,s)=>{"use strict";s.d(t,{translateSessionDescription:()=>a,translateSessionShortDescription:()=>r});var n=s(28353);const i=new Map([["Premarket",(0,n.t)("Premarket",{context:"sessions"})],["Postmarket",(0,n.t)("Postmarket",{context:"sessions"})],["Regular Trading Hours",(0,n.t)("Regular trading hours",{context:"sessions"})],["Extended Trading Hours",(0,n.t)("Extended trading hours",{context:"sessions"})],["Electronic Trading Hours",(0,n.t)("Electronic trading hours",{context:"sessions"})]]);function a(e){var t;return null!==(t=i.get(e))&&void 0!==t?t:e}const o=new Map([["Premarket",(0,n.t)("PRE",{context:"sessions"})],["Postmarket",(0,n.t)("POST",{context:"sessions"})],["Regular Trading Hours",(0,n.t)("RTH",{context:"sessions"})],["Extended Trading Hours",(0,n.t)("ETH",{context:"sessions"})],["Electronic Trading Hours",(0,n.t)("ETH",{context:"sessions"})]]);function r(e){var t;return null!==(t=o.get(e))&&void 0!==t?t:e}},42142:(e,t,s)=>{"use strict";s.d(t,{FragmentMap:()=>i});var n=s(59496);function i(e){if(e.map){return n.Children.toArray(e.children).map(e.map)}return e.children}},99025:(e,t,s)=>{"use strict";s.d(t,{Hint:()=>r});var n=s(59496),i=s(97754),a=s.n(i),o=s(19119);function r(e){const{text:t="",className:s}=e;return n.createElement("span",{className:a()(o.shortcut,s)},t)}},23829:(e,t,s)=>{"use strict";s.d(t,{ContextMenuItem:()=>g});var n=s(59496),i=s(97754),a=s.n(i),o=s(9745),r=s(26996),l=s(54627),c=s(99025),d=s(86440),h=s(4585),u=s(74471),m=s(61999);function g(e){
const{isTitle:t,isLoading:s,isHovered:i,active:g,checkable:p,disabled:v,checked:b,icon:_,iconChecked:C,hint:S,subItems:f,label:y,onClick:x,children:E,toolbox:M,jsxLabel:R,size:k="normal"}=e,w=(0,n.useContext)(l.EmptyIconsContext),T=!!f.length;return s?n.createElement("li",{className:a()(m.item,m.loading,m[k])},n.createElement(r.Loader,null)):n.createElement("li",{className:a()(m.item,m.interactive,t&&m.title,v&&m.disabled,i&&m.hovered,g&&m.active,w&&m.emptyIcons,m[k]),onClick:x},n.createElement(o.Icon,{className:a()(m.icon),icon:function(){if(p&&b)return C||_||d;return _}()}),n.createElement("span",{className:a()(m.label)},null!=R?R:y),!!M&&n.createElement(o.Icon,{onClick:function(){M&&M.action()},className:m.remove,icon:u}),!T&&S&&n.createElement(c.Hint,{className:m.shortcut,text:S}),T&&n.createElement(o.Icon,{className:m.nested,icon:h}),E)}},54627:(e,t,s)=>{"use strict";s.d(t,{EmptyIconsContext:()=>n});const n=s(59496).createContext(!1)},1109:(e,t,s)=>{"use strict";s.d(t,{Separator:()=>o});var n=s(59496),i=s(97754),a=s(91626);function o(e){return n.createElement("div",{className:i(a.separator,e.className)})}},51613:(e,t,s)=>{"use strict";s.d(t,{PopupMenuSeparator:()=>r});var n=s(59496),i=s(97754),a=s.n(i),o=s(524);function r(e){const{size:t="normal",className:s}=e;return n.createElement("div",{className:a()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"===t&&o.large,s)})}},64205:(e,t,s)=>{"use strict";s.d(t,{DEFAULT_SLIDER_THEME:()=>r,SliderItem:()=>l,factory:()=>c});var n=s(59496),i=s(97754),a=s(88537),o=s(37740);const r=o;function l(e){const t=i(e.className,o.tab,{[o.active]:e.isActive,[o.disabled]:e.isDisabled,[o.defaultCursor]:!!e.shouldUseDefaultCursor,[o.noBorder]:!!e.noBorder});return n.createElement("div",{className:t,onClick:e.onClick,ref:e.reference,"data-type":"tab-item","data-value":e.value,"data-name":"tab-item-"+e.value.toString().toLowerCase()},e.children)}function c(e){return class extends n.PureComponent{constructor(){super(...arguments),this.activeTab={current:null}}componentDidUpdate(){(0,a.ensureNotNull)(this._slider).style.transition="transform 350ms",this._componentDidUpdate()}componentDidMount(){this._componentDidUpdate()}render(){const{className:t}=this.props,s=this._generateTabs();return n.createElement("div",{className:i(t,o.tabs),"data-name":this.props["data-name"]},s,n.createElement(e,{reference:e=>{this._slider=e}}))}_generateTabs(){return this.activeTab.current=null,n.Children.map(this.props.children,e=>{const t=e,s=Boolean(t.props.isActive),i={reference:e=>{s&&(this.activeTab.current=e),t.props.reference&&t.props.reference(e)}};return n.cloneElement(t,i)})}_componentDidUpdate(){const e=(0,a.ensureNotNull)(this._slider).style;if(this.activeTab.current){const t=this.activeTab.current.offsetWidth,s=this.activeTab.current.offsetLeft;e.transform=`translateX(${s}px)`,e.width=t+"px",e.opacity="1"}else e.opacity="0"}}}c((function(e){return n.createElement("div",{className:o.slider,ref:e.reference})}))},40173:(e,t,s)=>{"use strict";function n(e,t,s={}){
const n=Object.assign({},t);for(const i of Object.keys(t)){const a=s[i]||i;a in e&&(n[i]=[e[a],t[i]].join(" "))}return n}function i(e,t,s={}){return Object.assign({},e,n(e,t,s))}s.d(t,{weakComposeClasses:()=>n,mergeThemes:()=>i})},4585:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},11178:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path fill="none" stroke="currentColor" d="M11 1.5h3.5a2 2 0 0 1 2 2V7m0 5v2.5a2 2 0 0 1-2 2H11m-4 0H3.5a2 2 0 0 1-2-2V11m0-4V3.5a2 2 0 0 1 2-2H7"/></svg>'},99499:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><g fill="none" stroke="currentColor"><circle cx="3.5" cy="3.5" r="2"/><circle cx="10.5" cy="10.5" r="2"/><path stroke-linecap="square" d="M9.5 1.5l-5 11"/></g></svg>'},86440:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},74471:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.7 9l4.65-4.65-.7-.7L9 8.29 4.35 3.65l-.7.7L8.29 9l-4.64 4.65.7.7L9 9.71l4.65 4.64.7-.7L9.71 9z"/></svg>'},52360:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M5.5 13v-2.5m8.5 11h6.5a2 2 0 0 0 2-2v-9m-17 0v-2c0-1.1.9-2 2-2h13a2 2 0 0 1 2 2v2m-17 0h17"/><path fill="currentColor" d="M10 4h1v4h-1V4zM17 4h1v4h-1V4z"/><path stroke="currentColor" d="M4 18.5h7.5m0 0L8 22m3.5-3.5L8 15"/></svg>'},68139:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M1.5 8V6.5m7.5 9h5.5a2 2 0 0 0 2-2v-7m-15 0v-2c0-1.1.9-2 2-2h11a2 2 0 0 1 2 2v2m-15 0h15"/><path fill="currentColor" d="M5 1h1v3H5V1zM12 1h1v3h-1V1z"/><path stroke="currentColor" d="M0 12.5h7.5m0 0L4 16m3.5-3.5L4 9"/></svg>'}}]);

View File

@@ -1,14 +0,0 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7260],{59142:function(e,t){var n,s,a;s=[t],void 0===(a="function"==typeof(n=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var n=!1;if("undefined"!=typeof window){var s={get passive(){n=!0}};window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}var a="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),i=[],o=!1,r=-1,l=void 0,c=void 0,h=function(e){return i.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},d=function(e){var t=e||window.event;return!!h(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},u=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==l&&(document.body.style.overflow=l,l=void 0)}))};e.disableBodyScroll=function(e,s){if(a){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!i.some((function(t){return t.targetElement===e}))){var u={targetElement:e,options:s||{}};i=[].concat(t(i),[u]),e.ontouchstart=function(e){1===e.targetTouches.length&&(r=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var n,s,a,i;1===t.targetTouches.length&&(s=e,i=(n=t).targetTouches[0].clientY-r,!h(n.target)&&(s&&0===s.scrollTop&&0<i||(a=s)&&a.scrollHeight-a.scrollTop<=a.clientHeight&&i<0?d(n):n.stopPropagation()))},o||(document.addEventListener("touchmove",d,n?{passive:!1}:void 0),o=!0)}}else{g=s,setTimeout((function(){if(void 0===c){var e=!!g&&!0===g.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===l&&(l=document.body.style.overflow,document.body.style.overflow="hidden")}));var m={targetElement:e,options:s||{}};i=[].concat(t(i),[m])}var g},e.clearAllBodyScrollLocks=function(){a?(i.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),o&&(document.removeEventListener("touchmove",d,n?{passive:!1}:void 0),o=!1),i=[],r=-1):(u(),i=[])},e.enableBodyScroll=function(e){if(a){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,i=i.filter((function(t){return t.targetElement!==e})),o&&0===i.length&&(document.removeEventListener("touchmove",d,n?{passive:!1}:void 0),o=!1)}else 1===i.length&&i[0].targetElement===e?(u(),i=[]):i=i.filter((function(t){return t.targetElement!==e}))}})?n.apply(t,s):n)||(e.exports=a)},62092:e=>{e.exports={loader:"loader-MuZZSHRY",static:"static-MuZZSHRY",item:"item-MuZZSHRY","tv-button-loader":"tv-button-loader-MuZZSHRY",medium:"medium-MuZZSHRY",small:"small-MuZZSHRY",black:"black-MuZZSHRY",
white:"white-MuZZSHRY",gray:"gray-MuZZSHRY",primary:"primary-MuZZSHRY","loader-initial":"loader-initial-MuZZSHRY","loader-appear":"loader-appear-MuZZSHRY"}},32925:e=>{e.exports={button:"button-WhrIKIq9",hover:"hover-WhrIKIq9",inner:"inner-WhrIKIq9"}},43527:e=>{e.exports={toolbar:"toolbar-sFd8og5Y",dateRangeWrapper:"dateRangeWrapper-sFd8og5Y",seriesControlWrapper:"seriesControlWrapper-sFd8og5Y",dateRangeExpanded:"dateRangeExpanded-sFd8og5Y",dateRangeCollapsed:"dateRangeCollapsed-sFd8og5Y",item:"item-sFd8og5Y",first:"first-sFd8og5Y",last:"last-sFd8og5Y",inline:"inline-sFd8og5Y",timezone:"timezone-sFd8og5Y",session:"session-sFd8og5Y",icon:"icon-sFd8og5Y",hidden:"hidden-sFd8og5Y",collapsed:"collapsed-sFd8og5Y"}},47393:e=>{e.exports={button:"button-YwWuPcCo",separator:"separator-YwWuPcCo"}},25033:e=>{e.exports={button:"button-wNyKS1Qc",hover:"hover-wNyKS1Qc",icon:"icon-wNyKS1Qc"}},71922:e=>{e.exports={separator:"separator-ArqK8T1e"}},17963:e=>{e.exports={button:"button-U8Px2hz6"}},22880:e=>{e.exports={item:"item-G1QqQDLk",hover:"hover-G1QqQDLk",isActive:"isActive-G1QqQDLk",isFirst:"isFirst-G1QqQDLk",isLast:"isLast-G1QqQDLk"}},72767:e=>{e.exports={slider:"slider-eR7xmZ00",inner:"inner-eR7xmZ00"}},38952:e=>{e.exports={sliderRow:"sliderRow-DtHrLXA3"}},19119:e=>{e.exports={item:"item-tPYeYcJa",interactive:"interactive-tPYeYcJa",hovered:"hovered-tPYeYcJa",disabled:"disabled-tPYeYcJa",active:"active-tPYeYcJa",shortcut:"shortcut-tPYeYcJa",normal:"normal-tPYeYcJa",big:"big-tPYeYcJa",iconCell:"iconCell-tPYeYcJa",icon:"icon-tPYeYcJa",checkmark:"checkmark-tPYeYcJa",content:"content-tPYeYcJa",label:"label-tPYeYcJa",checked:"checked-tPYeYcJa",toolbox:"toolbox-tPYeYcJa",showToolboxOnHover:"showToolboxOnHover-tPYeYcJa",arrowIcon:"arrowIcon-tPYeYcJa",subMenu:"subMenu-tPYeYcJa",invisibleHotkey:"invisibleHotkey-tPYeYcJa"}},61999:e=>{e.exports={item:"item-zoYF2FPa",emptyIcons:"emptyIcons-zoYF2FPa",loading:"loading-zoYF2FPa",disabled:"disabled-zoYF2FPa",interactive:"interactive-zoYF2FPa",hovered:"hovered-zoYF2FPa",normal:"normal-zoYF2FPa",big:"big-zoYF2FPa",icon:"icon-zoYF2FPa",label:"label-zoYF2FPa",title:"title-zoYF2FPa",nested:"nested-zoYF2FPa",shortcut:"shortcut-zoYF2FPa",remove:"remove-zoYF2FPa"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},524:e=>{e.exports={separator:"separator-GzmeVcFo",small:"small-GzmeVcFo",normal:"normal-GzmeVcFo",large:"large-GzmeVcFo"}},37740:e=>{e.exports={tabs:"tabs-rKFlMYkc",tab:"tab-rKFlMYkc",noBorder:"noBorder-rKFlMYkc",disabled:"disabled-rKFlMYkc",active:"active-rKFlMYkc",defaultCursor:"defaultCursor-rKFlMYkc",slider:"slider-rKFlMYkc",content:"content-rKFlMYkc"}},26996:(e,t,n)=>{"use strict";n.d(t,{Loader:()=>c});var s,a=n(59496),i=n(97754),o=n(74991),r=n(62092),l=n.n(r);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(s||(s={}));class c extends a.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:s.Initial}}render(){const{className:e,color:t="black",size:n="medium",staticPosition:s}=this.props,o=i(l().item,l()[t],l()[n])
;return a.createElement("span",{className:i(l().loader,s&&l().static,this._getStateClass(),e)},a.createElement("span",{className:o}),a.createElement("span",{className:o}),a.createElement("span",{className:o}))}componentDidMount(){this.setState({state:s.Appear}),this._stateChangeTimeout=setTimeout(()=>{this.setState({state:s.Active})},2*o.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case s.Initial:return l()["loader-initial"];case s.Appear:return l()["loader-appear"];default:return""}}}},42766:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BottomToolbarRenderer:()=>Ke});var s=n(59496),a=n(87995),i=n(28353),o=n(19036),r=n(97754),l=n(9837),c=n(67337),h=n(35390),d=n(40233),u=n(59064),m=n(90692),g=n(16396),p=n(51613),v=n(88537),b=n(51768),_=n(55402),C=n(2872),f=n.n(C),S=n(16654);class y{constructor(e){this._state={ranges:[]},this._change=new(f()),this._rangeChangedListenerBound=this._onRangeChanged.bind(this);const{chartWidget:t}=this._context=e;t.withModel(null,()=>{const e=t.model(),n=e.mainSeries();n.onStatusChanged().subscribe(this,this._updateAvailableRanges),c.enabled("update_timeframes_set_on_symbol_resolve")&&n.dataEvents().symbolResolved().subscribe(this,this._updateAvailableRanges),n.priceScale().properties().childs().lockScale.subscribe(this,this._updateAvailableRanges);const s=e.model().appliedTimeFrame();s.subscribe(this._rangeChangedListenerBound),this._rangeChangedListenerBound(s.value()),this._updateAvailableRanges()})}state(){return this._state}onChange(){return this._change}selectRange(e){this._setState({activeRange:e.value.value});const{chartWidgetCollection:t}=this._context,n={val:e.value,res:e.targetResolution};t.setTimeFrame(n)}destroy(){const{chartWidget:e}=this._context;e.withModel(null,()=>{const t=e.model(),n=t.mainSeries();n.onStatusChanged().unsubscribe(this,this._updateAvailableRanges),c.enabled("update_timeframes_set_on_symbol_resolve")&&n.dataEvents().symbolResolved().unsubscribe(this,this._updateAvailableRanges),n.priceScale().properties().childs().lockScale.unsubscribe(this,this._updateAvailableRanges),t.model().appliedTimeFrame().unsubscribe(this._rangeChangedListenerBound)}),this._change.destroy()}_setState(e){this._state=Object.assign({},this._state,e),this._change.fire(this._state)}_onRangeChanged(e){let t;null!==e&&"period-back"===e.val.type&&(t=e.val.value),this._setState({activeRange:t})}_updateAvailableRanges(){const{availableTimeFrames:e,chartWidget:t}=this._context;if(!t.hasModel())return;const n=t.model().mainSeries(),s=n.status();if(s===S.STATUS_LOADING||s===S.STATUS_RESOLVING)return;const a=e(n.symbolInfo(),n.status());0!==a.length&&this._setState({ranges:a})}}const E=(0,_.registryContextType)();function x(e){var t;return(t=class extends s.PureComponent{constructor(e,t){super(e,t),this._handleUpdate=e=>{this.setState(e)},this._handleSelectRange=e=>{var t,n;(0,b.trackEvent)("GUI","Chart Bottom Toolbar","range "+e.value),
null===(n=(t=this.props).onSelectRange)||void 0===n||n.call(t,e),this._binding.selectRange(e)},(0,_.validateRegistry)(t,{availableTimeFrames:o.any.isRequired,chartWidgetCollection:o.any.isRequired,chartWidget:o.any.isRequired}),M.has(t.chartWidget)||M.set(t.chartWidget,new y(t));const n=this._binding=(0,v.ensureDefined)(M.get(t.chartWidget));this.state=n.state()}componentDidMount(){this._binding.onChange().subscribe(this,this._handleUpdate)}componentWillUnmount(){this._binding.onChange().unsubscribe(this,this._handleUpdate)}render(){return s.createElement(e,{goToDateButton:this.props.goToDateButton,className:this.props.className,ranges:this.state.ranges,activeRange:this.state.activeRange,onSelectRange:this._handleSelectRange})}}).contextType=E,t}const M=new WeakMap;var R=n(94420),k=n(23829),w=n(1109),T=n(82724),A=n(52360),N=n(47393);function W(e){const{ranges:t,activeRange:n,onSelectRange:a}=e;return s.createElement(s.Fragment,null,t.map(e=>s.createElement(k.ContextMenuItem,{key:e.value.value,label:e.description||e.text,active:n===e.value.value,checked:n===e.value.value,checkable:!0,disabled:!1,onClick:i.bind(null,e),doNotCloseOnClick:!1,subItems:[]})));function i(e){e&&a&&a(e),(0,u.globalCloseMenu)()}}function F(e){const{onGoToDateClick:t}=e;return s.createElement(s.Fragment,null,s.createElement(w.Separator,{className:N.separator}),s.createElement(k.ContextMenuItem,{icon:A,label:(0,T.appendEllipsis)((0,i.t)("Go to")),onClick:t,active:!1,checked:!1,checkable:!1,disabled:!1,doNotCloseOnClick:!1,subItems:[]}))}const B={title:(0,i.t)("Date Range"),goToDate:(0,T.appendEllipsis)((0,i.t)("Go to"))},P=(0,_.registryContextType)();class z extends s.PureComponent{constructor(e,t){super(e,t),this._handleGoToDateClick=()=>{const{chartWidget:e}=this.context;(0,R.showGoToDateDialog)(e),(0,u.globalCloseMenu)()},this._handleRangeSelect=e=>{e&&this.props.onSelectRange&&this.props.onSelectRange(e),(0,u.globalCloseMenu)()},this._renderChildren=e=>{const{ranges:t,activeRange:n,goToDateButton:a}=this.props;return e?s.createElement(s.Fragment,null,s.createElement(W,{ranges:t,activeRange:n,onSelectRange:this._handleRangeSelect}),a&&s.createElement(F,{onGoToDateClick:this._handleGoToDateClick})):s.createElement(s.Fragment,null,t.map(e=>s.createElement(g.PopupMenuItem,{key:e.value.value,label:e.description||e.text,isActive:n===e.value.value,onClick:this._handleRangeSelect,onClickArg:e})),a&&s.createElement(p.PopupMenuSeparator,null),a&&s.createElement(g.PopupMenuItem,{label:B.goToDate,onClick:this._handleGoToDateClick}))},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired})}render(){return s.createElement(m.MatchMedia,{rule:"screen and (max-width: 428px)"},e=>s.createElement(h.ToolWidgetMenu,{className:N.button,content:B.title,arrow:!0,verticalAttachEdge:d.VerticalAttachEdge.Top,verticalDropDirection:d.VerticalDropDirection.FromBottomToTop,horizontalMargin:4,"data-name":"date-ranges-menu",isDrawer:e,onClick:this._trackClick},this._renderChildren(e)))}_trackClick(){0}}z.contextType=P;const Y=x(z);var L=n(64205),D=n(22880);function I(e){
const t=r(e.className,D.item,{[D.isActive]:e.isActive,[D.isFirst]:e.isFirst,[D.isLast]:e.isLast});return s.createElement("div",{className:t,onClick:e.onClick,ref:e.reference},e.children)}var H=n(40173),j=n(72767);const Z=(0,H.mergeThemes)(L.DEFAULT_SLIDER_THEME,j);var G=n(38952);const q=(0,L.factory)((function(e){return s.createElement("div",{className:r(e.className,Z.slider),ref:e.reference},s.createElement("div",{className:Z.inner}))}));const U=x((function(e){const{className:t,ranges:n,activeRange:a,onSelectRange:i}=e;return s.createElement(q,{className:r(G.sliderRow,t),"data-name":"date-ranges-tabs"},n.map((e,t)=>s.createElement(I,{key:e.value.value,value:e.value.value,isFirst:0===t,isLast:t===n.length-1,isActive:a===e.value.value,onClick:i&&i.bind(null,e)},s.createElement("div",{title:e.description||e.text,className:"apply-common-tooltip"},e.text))))}));var O=n(9745),V=n(61814),J=n(68335),K=n(68139),Q=n(25033);const X=(0,V.hotKeySerialize)({keys:[(0,J.humanReadableModifiers)(J.Modifiers.Alt,!1),"G"],text:"{0} + {1}"}),$=(0,_.registryContextType)();class ee extends s.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidget:e}=this.context;(0,b.trackEvent)("GUI","Chart Bottom Toolbar","go to"),(0,R.showGoToDateDialog)(e)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired})}render(){const{className:e,ranges:t}=this.props;return t.length>0&&s.createElement("div",{className:r("apply-common-tooltip",Q.button,e),"data-name":"go-to-date","data-tooltip-hotkey":X,onClick:this._handleClick,title:(0,i.t)("Go to")},s.createElement(O.Icon,{className:Q.icon,icon:K}))}}ee.contextType=$;const te=x(ee);var ne=n(32925);function se(e){const{reference:t,className:n,children:a,...i}=e;return s.createElement("button",{...i,className:r(n,ne.button),ref:t},s.createElement("span",{className:ne.inner},a))}var ae=n(23095),ie=n(64806),oe=n(28296),re=n(97056);class le extends s.PureComponent{constructor(e){super(e),this._element=null,this._menuShown=!1,this._preventShowingMenu=!1,this._handleRef=e=>{this._element=e},this._onMouseDown=()=>{this._preventShowingMenu=this._menuShown},this._showMenu=()=>{if(this._preventShowingMenu)return void re.ContextMenuManager.hideAll();const{getActions:e}=this.props,t=(0,v.ensureNotNull)(this._element),n=e();if(0===n.length)return;const s=t.getBoundingClientRect();re.ContextMenuManager.showMenu(n,{clientX:s.left,clientY:s.top,attachToYBy:"bottom"},void 0,{menuName:"TimezoneMenuContextMenu"},()=>{this._menuShown=!1}).then(()=>{this._menuShown=!0})}}render(){const{children:e}=this.props;return s.createElement("span",{onClick:this._showMenu,onMouseDown:this._onMouseDown,ref:this._handleRef},e)}}var ce=n(10480),he=n(17963);const de={hint:(0,i.t)("Timezone")};const ue=(0,_.registryContextType)();class me extends s.PureComponent{constructor(e,t){super(e,t),this._timeFormatter=new ie.TimeFormatter,this._tickInterval=void 0,this._tickClock=()=>{const{chartApiInstance:e}=this.context;if(void 0!==this._timezone){const t=(0,ce.utc_to_cal)(this._timezone,e.serverTime());this.setState({
time:this._timeFormatter.format(t)})}},this._getActions=()=>{if(!this.props.withMenu)return[];const{chartWidget:e}=this.context;return function(e){e.updateActions();const t=e.actions();return t&&t.applyTimeZone instanceof oe.Action?t.applyTimeZone.getSubItems():[]}(e)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired,chartApiInstance:o.any.isRequired}),this.state={time:""}}componentDidMount(){const{chartWidget:e}=this.context;this._tickInterval=setInterval(this._tickClock,1e3),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().subscribe(this,this.updateTimezonesButton),t.model().properties().childs().timezone.subscribe(this,this.updateTimezonesButton)})}componentWillUnmount(){const{chartWidget:e}=this.context;clearInterval(this._tickInterval),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().unsubscribe(this,this.updateTimezonesButton),t.model().properties().childs().timezone.unsubscribe(this,this.updateTimezonesButton)})}render(){const{className:e,withMenu:t}=this.props,{time:n}=this.state,a=void 0!==this._timezone?(0,ae.parseTzOffset)(this._timezone.name()).string:null;return s.createElement(le,{getActions:this._getActions},s.createElement(se,{className:r(e,he.button,"apply-common-tooltip"),title:t?de.hint:void 0,disabled:!t,"data-name":"time-zone-menu"},n&&a&&`${n} (${a})`))}updateTimezonesButton(){const{chartWidget:e}=this.context;if(!e.hasModel())return;if(null===e.model().mainSeries().symbolInfo())return;let t=e.model().model().timezone();if("exchange"===t){const n=(0,v.ensureNotNull)(e.model().mainSeries().symbolInfo()).timezone;n&&(t=n)}this._timezone=(0,ce.get_timezone)(t),this._tickClock()}}me.contextType=ue;var ge=n(71922);function pe(e){return s.createElement("span",{className:r(ge.separator,e.className)})}var ve=n(4825),be=n(24980),_e=n(49483);class Ce{constructor(e,t,n){this._highlighted=!1,this._chartWidget=e,this._priceScaleGetter=t,this._owner=n,this._setHighlight=this._setHighlight.bind(this),this._removeHighlight=this._removeHighlight.bind(this)}destroy(){this._highlighted&&this._removeHighlight()}handlers(){const e=_e.CheckMobile.any();return{onMouseEnter:e?void 0:this._setHighlight,onMouseLeave:e?void 0:this._removeHighlight}}_setHighlight(){if(!this._chartWidget.hasModel())return;const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries()),n=this._priceScaleGetter();if(null===t||null===n)return;const s=this._chartWidget.paneByState(t);if(null!==s){const t=s.rightPriceAxisesContainer().findAxisWidgetForScale(n);let a=null;null!==t&&(a=t.axisInfo());const i=s.leftPriceAxisesContainer().findAxisWidgetForScale(n);null!==i&&(a=i.axisInfo());const o=s.highlightedPriceAxis();null!==a&&o.value().axis!==a&&(o.setValue({owner:this._owner,axis:a}),e.lightUpdate(),this._highlighted=!0)}}_removeHighlight(){if(!this._chartWidget.hasModel())return;const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries());if(null===t)return;const n=this._chartWidget.paneByState(t);if(null!==n){
const t=n.highlightedPriceAxis(),s=t.value();null!==s.axis&&s.owner===this._owner&&(t.setValue({owner:this._owner,axis:null}),e.lightUpdate(),this._highlighted=!1)}}}const fe=(0,_.registryContextType)(),Se=new be.TranslatedString("toggle log scale",(0,i.t)("toggle log scale"));const ye=(0,_.registryContextType)(),Ee=new be.TranslatedString("toggle auto scale",(0,i.t)("toggle auto scale"));const xe=(0,_.registryContextType)(),Me=new be.TranslatedString("toggle percentage scale",(0,i.t)("toggle percentage scale"));const Re=(0,_.registryContextType)();var ke=n(42142),we=n(54475),Te=n(99499),Ae=n(11178),Ne=n(43527);const We={extLabel:(0,i.t)("ext"),extHint:(0,i.t)("Extended Hours is available only for intraday charts"),percentageHint:(0,i.t)("Toggle Percentage"),logLabel:(0,i.t)("log",{context:"scale"}),logHint:(0,i.t)("Toggle Log Scale"),autoLabel:(0,i.t)("auto",{context:"scale"}),autoHint:(0,i.t)("Toggle Auto Scale"),fullscreenHint:(0,i.t)("Toggle Maximize Chart"),adjLabel:(0,i.t)("adj",{context:"adjustments"}),adjHint:(0,i.t)("Adjust data for dividends"),adjForDividendsOnlyHint:(0,i.t)("Main symbol data is adjusted for dividends only"),adjForSplitsOnlyHint:(0,i.t)("Main symbol data is adjusted for splits only"),backAdjustLabel:(0,i.t)("b-adj",{context:"adjustments"}),backAdjustHint:(0,i.t)("Adjust for contract changes"),settlementAsCloseLabel:(0,i.t)("set",{context:"adjustments"}),settlementAsCloseHint:(0,i.t)("Use settlement as close on daily interval")},Fe=(Be=e=>s.createElement(ve.ToolWidgetButton,{text:We.logLabel,title:We.logHint,className:e.className,isActive:e.isLogarithm,isGrouped:!0,onClick:Ge(e.onClick,"log",e.isLogarithm),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"logarithm"}),(Pe=class extends s.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series),n=t.priceScale(),s=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({log:!s.log},n,Se)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"logarithm")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isLog(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:e}=this.props,{isActive:t,series:n}=this.state;return s.createElement(Be,{...this._priceAxisHighlighter.handlers(),className:e,isLogarithm:t,isDisabled:null===n,
onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.log)!==this.state.isActive&&this.setState({isActive:Boolean(t.log)})}}).contextType=fe,Pe);var Be,Pe;const ze=function(e){var t;return(t=class extends s.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series).priceScale(),n=t.mode();e.setPriceScaleMode({autoScale:!n.autoScale},t,Ee)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"auto")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isAutoScale(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:n,series:a}=this.state;return s.createElement(e,{...this._priceAxisHighlighter.handlers(),className:t,isAuto:n,isDisabled:null===a,onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.autoScale)!==this.state.isActive&&this.setState({isActive:Boolean(t.autoScale)})}}).contextType=ye,t}(e=>s.createElement(ve.ToolWidgetButton,{text:We.autoLabel,title:We.autoHint,className:e.className,isActive:e.isAuto,isGrouped:!0,onClick:Ge(e.onClick,"auto",e.isAuto),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"auto"})),Ye=function(e){var t;return(t=class extends s.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=(0,v.ensureNotNull)(this.state.series),n=t.priceScale(),s=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({percentage:!s.percentage},n,Me)},(0,_.validateRegistry)(t,{chartWidget:o.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new Ce(this.context.chartWidget,()=>this._priceScale,"percentage")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale()
;this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleScaleChange({},n.mode()),this.setState({isActive:t.priceScale().isPercentage(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:n,series:a}=this.state;return s.createElement(e,{...this._priceAxisHighlighter.handlers(),className:t,isPercentage:n,isDisabled:null===a,onClick:this._handleSelect})}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleScaleChange),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleScaleChange),this._handleScaleChange({},e.mode())}_handleScaleChange(e,t){Boolean(t.percentage)!==this.state.isActive&&this.setState({isActive:Boolean(t.percentage)})}}).contextType=xe,t}(e=>s.createElement(ve.ToolWidgetButton,{icon:Te,title:We.percentageHint,className:e.className,isActive:e.isPercentage,isDisabled:e.isDisabled,isGrouped:!0,onClick:Ge(e.onClick,"percent",e.isPercentage),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"percentage"}));const Le=(0,V.hotKeySerialize)({keys:[(0,J.humanReadableModifiers)(J.Modifiers.Alt,!1),"Enter"],text:"{0} + {1}"}),De=function(e){var t;return(t=class extends s.PureComponent{constructor(e,t){super(e,t),this._handleClick=e=>{const{resizerDetacher:t,chartWidgetCollection:n}=this.context;e.shiftKey&&t.detachable.value()?t.detach():this.state.isFullscreen?t.exitFullscreen():t.requestFullscreen()},this._handleLayoutChange=e=>{this.setState({isFullscreen:e})},this._handlePhoneSize=()=>{0},(0,_.validateRegistry)(t,{chartWidgetCollection:o.any.isRequired,resizerDetacher:o.any.isRequired});const{resizerDetacher:n}=t;this.state={isFullscreen:n.fullscreen.value(),isChangeLayoutButton:this._isChangeLayoutButton()}}componentDidMount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.subscribe(this._handleLayoutChange)}componentWillUnmount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.unsubscribe(this._handleLayoutChange)}render(){const{className:t}=this.props,{isFullscreen:n,isChangeLayoutButton:a}=this.state;return s.createElement(e,{className:t,isFullscreen:n,onClick:this._handleClick})}_isChangeLayoutButton(){return!1}}).contextType=Re,t}(e=>s.createElement(ve.ToolWidgetButton,{icon:Ae,title:We.fullscreenHint,className:e.className,isActive:e.isFullscreen,onClick:Ge(e.onClick,"maximize chart",e.isFullscreen),"data-tooltip-hotkey":Le,"data-name":"fullscreen"})),Ie={properties:!0,fullscreen:!0,preventPhoneLayout:!0},He={fullscreen:Number.MIN_SAFE_INTEGER,
preventPhoneLayout:Number.MIN_SAFE_INTEGER,properties:Number.MIN_SAFE_INTEGER,separator:-2,timeZones:-1,auto:0,logarithm:1,percentage:2,session:3,adj:4,backAdj:5,settlementAsClose:6},je=(()=>{const e=new Map;return e.set(Fe,"logarithm"),e.set(Ye,"percentage"),e.set(ze,"auto"),e.set(De,"fullscreen"),e})();function Ze(e){0}function Ge(e,t,n){return t=>{e(t)}}const qe={dateRangeMode:"hidden",separator:!0,timeZones:!0,fullscreen:!0,preventPhoneLayout:!0,properties:!0,auto:!0,logarithm:!0,percentage:!0,session:!0,adj:!0,backAdj:!0,settlementAsClose:!0},Ue=(0,_.registryContextType)();class Oe extends s.PureComponent{constructor(e,t){var n,i;super(e,t),this._timezoneButtonRef=null,this._layout=Object.assign({},qe),this._raf=null,this._toolbar=null,this._rangeExpanded=null,this._rangeCollapsed=null,this._seriesComponents={},this._injector=(n=()=>this._layout,i=(e,t)=>this._seriesComponents[t]=e,(e,t,a)=>{if(s.isValidElement(e)&&"string"!=typeof e.type){const{props:o}=e;if("string"==typeof o.className){const l={className:r(o.className,0===t&&Ne.first,t===a.length-1&&Ne.last)},c=n(),h=(0,v.ensureDefined)(je.get(e.type));return s.createElement("div",{key:null===e.key?void 0:e.key,className:r(Ne.inline,c[h]&&Ne.collapsed),ref:e=>i(e,h),onClick:()=>Ze()},s.cloneElement(e,l))}}return e}),this._updateButtonsVisibility=()=>{0},this._handleResize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{const e=this._layout,t=(0,v.ensureNotNull)(this._toolbar),n=(0,v.ensureNotNull)(this._rangeExpanded),s=(i=function(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(null!==s){const e=a.findDOMNode(s);null!==e&&(t[n]=e)}}),t}(this._seriesComponents),Object.keys(i).map(e=>({name:e,width:i[e].offsetWidth})).sort((e,t)=>He[e.name]-He[t.name]));var i;const o=t.offsetWidth,r=s.reduce((e,t)=>e+t.width,0),l=n.offsetWidth,c=!Boolean(n.textContent)||o-r-l<=0?"collapsed":"expanded";if(Object.assign(e,{dateRangeMode:c}),"expanded"!==c){const t=o-(0,v.ensureNotNull)(this._rangeCollapsed).offsetWidth-0;let n=0,a=0;for(const i of s)n+=i.width,i.name in Ie?(a+=i.width,Object.assign(e,{[i.name]:!1})):Object.assign(e,{[i.name]:t<=n});t<=a&&Object.assign(e,{dateRangeMode:"hidden"})}else Object.assign(e,{separator:!1,timeZones:!1,fullscreen:!1,preventPhoneLayout:!1,properties:!1,auto:!1,logarithm:!1,percentage:!1,session:!1,adj:!1,settlementAsClose:!1,backAdj:!1});this._applyResizing(),this._raf=null}))},this._handleTimezoneButtonRef=e=>{this._timezoneButtonRef=e},this._handleMeasure=()=>{null!==this._toolbar&&this.resizeUI()},this._handleFullscreenableChange=e=>{this._setStateWithResize({isFullscreenable:e})},this._handlePreventPhoneLayoutButtonVisibility=()=>{0},this._handleToolbarRef=e=>this._toolbar=e,this._handleRangeCollapsedRef=e=>this._rangeCollapsed=e,this._handleRangeExpandedRef=e=>this._rangeExpanded=e,this._handleTimeZonesRef=e=>{this._seriesComponents.timeZones=e},this._handleSessionsRef=e=>{this._seriesComponents.session=e},this._handleSeparatorRef=e=>{this._seriesComponents.separator=e},(0,_.validateRegistry)(t,{
onContentBoxChanged:o.any.isRequired,chartApiInstance:o.any.isRequired,chartWidget:o.any.isRequired,chartWidgetCollection:o.any.isRequired,resizerDetacher:o.any.isRequired});const{resizerDetacher:l}=this.context;this.state={isFullscreenable:l.fullscreenable.value(),isPreventPhoneLayoutButton:this._isPreventPhoneLayoutButton()}}componentDidMount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:s}=this.context;e.subscribe(this,this._handleResize),t.fullscreenable.subscribe(this._handleFullscreenableChange),this.updateTimezonesButton(),this.resizeUI()}componentWillUnmount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:s}=this.context;e.unsubscribe(this,this._handleResize),t.fullscreenable.unsubscribe(this._handleFullscreenableChange),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)}render(){const e=this._layout,{timeFramesWidgetEnabled:t,timeWidgetEnabled:n,percentageScaleButtonEnabled:a,logScaleButtonEnabled:i,autoScaleButtonEnabled:o,fullscreenButtonEnabled:h}=this.props;return s.createElement("div",{className:Ne.toolbar,ref:this._handleToolbarRef,onContextMenu:we.preventDefault},t&&s.createElement(ke.FragmentMap,null,s.createElement("div",{className:r(Ne.dateRangeWrapper,"collapsed"!==e.dateRangeMode&&Ne.collapsed),ref:this._handleRangeCollapsedRef},s.createElement("div",{className:r(Ne.dateRangeCollapsed)},s.createElement(Y,{goToDateButton:this.props.goToDateEnabled}))),s.createElement(l,{onMeasure:this._handleMeasure},s.createElement("div",{className:r(Ne.dateRangeWrapper,"expanded"!==e.dateRangeMode&&Ne.collapsed),ref:this._handleRangeExpandedRef},s.createElement("div",{className:r(Ne.dateRangeExpanded)},s.createElement(U,{onSelectRange:this._trackRangeButtonClick}),this.props.goToDateEnabled&&s.createElement(pe,null),this.props.goToDateEnabled&&s.createElement(te,null))))),s.createElement("div",{className:Ne.seriesControlWrapper},n&&s.createElement(l,{onMeasure:this._handleMeasure},s.createElement("div",{className:r(Ne.inline,e.timeZones&&Ne.collapsed),ref:this._handleTimeZonesRef},s.createElement("div",{className:Ne.inline,onClick:this._trackTimezonesButtonClick},s.createElement(me,{className:Ne.timezone,withMenu:this.props.timezoneMenuEnabled,ref:this._handleTimezoneButtonRef})))),!1,s.createElement("div",{ref:this._handleSeparatorRef,className:r(Ne.inline,e.separator&&Ne.collapsed)},s.createElement(pe,null)),s.createElement(ke.FragmentMap,{map:this._injector},!1,!1,!1,a&&!c.enabled("fundamental_widget")&&s.createElement(Ye,{className:Ne.icon}),i&&s.createElement(Fe,{className:Ne.item}),o&&s.createElement(ze,{className:Ne.item}),h&&this.state.isFullscreenable&&s.createElement(De,{className:Ne.icon,mobileChangeLayoutEnabled:this.props.mobileChangeLayoutEnabled}),!1)))}updateTimezonesButton(){null!==this._timezoneButtonRef&&this._timezoneButtonRef.updateTimezonesButton()}resizeUI(){this._handleResize()}_trackRangeButtonClick(e){0}_trackTimezonesButtonClick(){Ze()}_setStateWithResize(e){Object.assign(this._layout,qe),
this._applyResizing(),this.setState(e,()=>this._handleResize())}_applyResizing(){const{dateRangeMode:e,...t}=this._layout;this._rangeExpanded&&this._rangeExpanded.classList.toggle(Ne.collapsed,"expanded"!==e),this._rangeCollapsed&&this._rangeCollapsed.classList.toggle(Ne.collapsed,"collapsed"!==e),Object.keys(t).forEach(e=>{const n=e,s=this._seriesComponents[n];s&&s.classList.toggle(Ne.collapsed,t[n])})}_isPreventPhoneLayoutButton(){return!1}}Oe.contextType=Ue;const Ve={onContentBoxChanged:o.any,computeContentBox:o.any,chartWidget:o.any,chartApiInstance:o.any,chartWidgetCollection:o.any,resizerDetacher:o.any,availableTimeFrames:o.any};class Je extends s.PureComponent{constructor(e){super(e),this._setActiveChart=e=>{this._defineRegistry(e),this.setState({chartWidget:e})};const t=this.props.chartWidgetCollection.activeChartWidget.value();this.state={chartWidget:t},this._defineRegistry(t)}componentDidMount(){this.props.chartWidgetCollection.activeChartWidget.subscribe(this._setActiveChart)}componentWillUnmount(){this.props.chartWidgetCollection.activeChartWidget.unsubscribe(this._setActiveChart)}render(){const{chartWidget:e}=this.state;if(!e)return null;const{options:t}=this.props,n={timeFramesWidgetEnabled:t.timeFramesWidgetEnabled,goToDateEnabled:t.timeFramesWidget.goToDateEnabled,timeWidgetEnabled:t.timeWidgetEnabled,timezoneMenuEnabled:t.timeWidget&&t.timeWidget.timezoneMenuEnabled,sessionIdButtonEnabled:t.sessionIdButtonEnabled,backAdjustmentButtonEnabled:t.backAdjustmentButtonEnabled,settlementAsCloseButtonEnabled:t.settlementAsCloseButtonEnabled,adjustForDividendsButtonEnabled:t.adjustForDividendsButtonEnabled,logScaleButtonEnabled:t.logScaleButtonEnabled,percentageScaleButtonEnabled:t.percentageScaleButtonEnabled,autoScaleButtonEnabled:t.autoScaleButtonEnabled,fullscreenButtonEnabled:t.fullscreenButtonEnabled,mobileChangeLayoutEnabled:t.mobileChangeLayoutEnabled};return s.createElement(_.RegistryProvider,{validation:Ve,value:this._registry},s.createElement(Oe,{key:e.id(),...n}))}_defineRegistry(e){const{onContentBoxChanged:t,computeContentBox:n,chartApiInstance:s,chartWidgetCollection:a,options:{timeFramesWidgetEnabled:i,timeFramesWidget:o}}=this.props,r=i?o.availableTimeFrames:void 0;this._registry={onContentBoxChanged:t,computeContentBox:n,chartWidget:e,availableTimeFrames:r,chartApiInstance:s,chartWidgetCollection:a,resizerDetacher:e.getResizerDetacher()}}}class Ke{constructor(e,t,n,i,o,r,l){this._container=e;const c=s.createElement(Je,{onContentBoxChanged:t,computeContentBox:n,chartWidgetCollection:i,chartApiInstance:o,chartWidgetOptions:r,options:l});a.render(c,e),e.setAttribute("data-initialized","true")}destroy(){a.unmountComponentAtNode(this._container),this._container.removeAttribute("data-initialized")}}},55402:(e,t,n)=>{"use strict";n.d(t,{validateRegistry:()=>r,RegistryProvider:()=>l,registryContextType:()=>c});var s=n(59496),a=n(19036),i=n.n(a);const o=s.createContext({});function r(e,t){i().checkPropTypes(t,e,"context","RegistryContext")}function l(e){const{validation:t,value:n}=e;return r(n,t),
s.createElement(o.Provider,{value:n},e.children)}function c(){return o}},42142:(e,t,n)=>{"use strict";n.d(t,{FragmentMap:()=>a});var s=n(59496);function a(e){if(e.map){return s.Children.toArray(e.children).map(e.map)}return e.children}},99025:(e,t,n)=>{"use strict";n.d(t,{Hint:()=>r});var s=n(59496),a=n(97754),i=n.n(a),o=n(19119);function r(e){const{text:t="",className:n}=e;return s.createElement("span",{className:i()(o.shortcut,n)},t)}},23829:(e,t,n)=>{"use strict";n.d(t,{ContextMenuItem:()=>g});var s=n(59496),a=n(97754),i=n.n(a),o=n(9745),r=n(26996),l=n(54627),c=n(99025),h=n(86440),d=n(4585),u=n(74471),m=n(61999);function g(e){const{isTitle:t,isLoading:n,isHovered:a,active:g,checkable:p,disabled:v,checked:b,icon:_,iconChecked:C,hint:f,subItems:S,label:y,onClick:E,children:x,toolbox:M,jsxLabel:R,size:k="normal"}=e,w=(0,s.useContext)(l.EmptyIconsContext),T=!!S.length;return n?s.createElement("li",{className:i()(m.item,m.loading,m[k])},s.createElement(r.Loader,null)):s.createElement("li",{className:i()(m.item,m.interactive,t&&m.title,v&&m.disabled,a&&m.hovered,g&&m.active,w&&m.emptyIcons,m[k]),onClick:E},s.createElement(o.Icon,{className:i()(m.icon),icon:function(){if(p&&b)return C||_||h;return _}()}),s.createElement("span",{className:i()(m.label)},null!=R?R:y),!!M&&s.createElement(o.Icon,{onClick:function(){M&&M.action()},className:m.remove,icon:u}),!T&&f&&s.createElement(c.Hint,{className:m.shortcut,text:f}),T&&s.createElement(o.Icon,{className:m.nested,icon:d}),x)}},54627:(e,t,n)=>{"use strict";n.d(t,{EmptyIconsContext:()=>s});const s=n(59496).createContext(!1)},1109:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>o});var s=n(59496),a=n(97754),i=n(91626);function o(e){return s.createElement("div",{className:a(i.separator,e.className)})}},51613:(e,t,n)=>{"use strict";n.d(t,{PopupMenuSeparator:()=>r});var s=n(59496),a=n(97754),i=n.n(a),o=n(524);function r(e){const{size:t="normal",className:n}=e;return s.createElement("div",{className:i()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"===t&&o.large,n)})}},64205:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_SLIDER_THEME:()=>r,SliderItem:()=>l,factory:()=>c});var s=n(59496),a=n(97754),i=n(88537),o=n(37740);const r=o;function l(e){const t=a(e.className,o.tab,{[o.active]:e.isActive,[o.disabled]:e.isDisabled,[o.defaultCursor]:!!e.shouldUseDefaultCursor,[o.noBorder]:!!e.noBorder});return s.createElement("div",{className:t,onClick:e.onClick,ref:e.reference,"data-type":"tab-item","data-value":e.value,"data-name":"tab-item-"+e.value.toString().toLowerCase()},e.children)}function c(e){return class extends s.PureComponent{constructor(){super(...arguments),this.activeTab={current:null}}componentDidUpdate(){(0,i.ensureNotNull)(this._slider).style.transition="transform 350ms",this._componentDidUpdate()}componentDidMount(){this._componentDidUpdate()}render(){const{className:t}=this.props,n=this._generateTabs();return s.createElement("div",{className:a(t,o.tabs),"data-name":this.props["data-name"]},n,s.createElement(e,{reference:e=>{this._slider=e}}))}_generateTabs(){
return this.activeTab.current=null,s.Children.map(this.props.children,e=>{const t=e,n=Boolean(t.props.isActive),a={reference:e=>{n&&(this.activeTab.current=e),t.props.reference&&t.props.reference(e)}};return s.cloneElement(t,a)})}_componentDidUpdate(){const e=(0,i.ensureNotNull)(this._slider).style;if(this.activeTab.current){const t=this.activeTab.current.offsetWidth,n=this.activeTab.current.offsetLeft;e.transform=`translateX(${n}px)`,e.width=t+"px",e.opacity="1"}else e.opacity="0"}}}c((function(e){return s.createElement("div",{className:o.slider,ref:e.reference})}))},40173:(e,t,n)=>{"use strict";function s(e,t,n={}){const s=Object.assign({},t);for(const a of Object.keys(t)){const i=n[a]||a;i in e&&(s[a]=[e[i],t[a]].join(" "))}return s}function a(e,t,n={}){return Object.assign({},e,s(e,t,n))}n.d(t,{weakComposeClasses:()=>s,mergeThemes:()=>a})},4585:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},11178:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path fill="none" stroke="currentColor" d="M11 1.5h3.5a2 2 0 0 1 2 2V7m0 5v2.5a2 2 0 0 1-2 2H11m-4 0H3.5a2 2 0 0 1-2-2V11m0-4V3.5a2 2 0 0 1 2-2H7"/></svg>'},99499:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><g fill="none" stroke="currentColor"><circle cx="3.5" cy="3.5" r="2"/><circle cx="10.5" cy="10.5" r="2"/><path stroke-linecap="square" d="M9.5 1.5l-5 11"/></g></svg>'},86440:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},74471:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.7 9l4.65-4.65-.7-.7L9 8.29 4.35 3.65l-.7.7L8.29 9l-4.64 4.65.7.7L9 9.71l4.65 4.64.7-.7L9.71 9z"/></svg>'},52360:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M5.5 13v-2.5m8.5 11h6.5a2 2 0 0 0 2-2v-9m-17 0v-2c0-1.1.9-2 2-2h13a2 2 0 0 1 2 2v2m-17 0h17"/><path fill="currentColor" d="M10 4h1v4h-1V4zM17 4h1v4h-1V4z"/><path stroke="currentColor" d="M4 18.5h7.5m0 0L8 22m3.5-3.5L8 15"/></svg>'},68139:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M1.5 8V6.5m7.5 9h5.5a2 2 0 0 0 2-2v-7m-15 0v-2c0-1.1.9-2 2-2h11a2 2 0 0 1 2 2v2m-15 0h15"/><path fill="currentColor" d="M5 1h1v3H5V1zM12 1h1v3h-1V1z"/><path stroke="currentColor" d="M0 12.5h7.5m0 0L4 16m3.5-3.5L4 9"/></svg>'}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5516,3718],{59142:function(e,t){var a,n,i;n=[t],void 0===(i="function"==typeof(a=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var a=!1;if("undefined"!=typeof window){var n={get passive(){a=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var i="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),s=[],o=!1,l=-1,r=void 0,c=void 0,h=function(e){return s.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},d=function(e){var t=e||window.event;return!!h(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},u=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==r&&(document.body.style.overflow=r,r=void 0)}))};e.disableBodyScroll=function(e,n){if(i){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!s.some((function(t){return t.targetElement===e}))){var u={targetElement:e,options:n||{}};s=[].concat(t(s),[u]),e.ontouchstart=function(e){1===e.targetTouches.length&&(l=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var a,n,i,s;1===t.targetTouches.length&&(n=e,s=(a=t).targetTouches[0].clientY-l,!h(a.target)&&(n&&0===n.scrollTop&&0<s||(i=n)&&i.scrollHeight-i.scrollTop<=i.clientHeight&&s<0?d(a):a.stopPropagation()))},o||(document.addEventListener("touchmove",d,a?{passive:!1}:void 0),o=!0)}}else{v=n,setTimeout((function(){if(void 0===c){var e=!!v&&!0===v.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===r&&(r=document.body.style.overflow,document.body.style.overflow="hidden")}));var m={targetElement:e,options:n||{}};s=[].concat(t(s),[m])}var v},e.clearAllBodyScrollLocks=function(){i?(s.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),o&&(document.removeEventListener("touchmove",d,a?{passive:!1}:void 0),o=!1),s=[],l=-1):(u(),s=[])},e.enableBodyScroll=function(e){if(i){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,s=s.filter((function(t){return t.targetElement!==e})),o&&0===s.length&&(document.removeEventListener("touchmove",d,a?{passive:!1}:void 0),o=!1)}else 1===s.length&&s[0].targetElement===e?(u(),s=[]):s=s.filter((function(t){return t.targetElement!==e}))}})?a.apply(t,n):a)||(e.exports=i)},62092:e=>{e.exports={loader:"loader-MuZZSHRY",static:"static-MuZZSHRY",item:"item-MuZZSHRY","tv-button-loader":"tv-button-loader-MuZZSHRY",medium:"medium-MuZZSHRY",small:"small-MuZZSHRY",
black:"black-MuZZSHRY",white:"white-MuZZSHRY",gray:"gray-MuZZSHRY",primary:"primary-MuZZSHRY","loader-initial":"loader-initial-MuZZSHRY","loader-appear":"loader-appear-MuZZSHRY"}},26390:e=>{e.exports={switcher:"switcher-GT7Z98Io","disable-cursor-pointer":"disable-cursor-pointer-GT7Z98Io",input:"input-GT7Z98Io","thumb-wrapper":"thumb-wrapper-GT7Z98Io","size-small":"size-small-GT7Z98Io","size-large":"size-large-GT7Z98Io","intent-default":"intent-default-GT7Z98Io","disable-active-state-styles":"disable-active-state-styles-GT7Z98Io","intent-select":"intent-select-GT7Z98Io",track:"track-GT7Z98Io",thumb:"thumb-GT7Z98Io"}},50789:e=>{e.exports={summary:"summary-hk3Mmxts",hovered:"hovered-hk3Mmxts",caret:"caret-hk3Mmxts"}},28857:e=>{e.exports={wrapper:"wrapper-OGmb0GMo",labelRow:"labelRow-OGmb0GMo",label:"label-OGmb0GMo",labelHint:"labelHint-OGmb0GMo",labelOn:"labelOn-OGmb0GMo"}},31405:e=>{e.exports={wrapper:"wrapper-IbP2mmCe",hovered:"hovered-IbP2mmCe",labelRow:"labelRow-IbP2mmCe",label:"label-IbP2mmCe",labelHint:"labelHint-IbP2mmCe",labelOn:"labelOn-IbP2mmCe"}},39592:e=>{e.exports={button:"button-Rsu8YfBx",withText:"withText-Rsu8YfBx",withoutText:"withoutText-Rsu8YfBx"}},64547:e=>{e.exports={button:"button-SS83RYhy"}},69698:e=>{e.exports={form:"form-obOlo718",interacting:"interacting-obOlo718",input:"input-obOlo718",menu:"menu-obOlo718",add:"add-obOlo718",hovered:"hovered-obOlo718",hover:"hover-obOlo718",wrap:"wrap-obOlo718"}},59174:e=>{e.exports={spinnerWrap:"spinnerWrap-OjdCXkZp"}},78966:e=>{e.exports={title:"title-mAu74Mtg"}},936:e=>{e.exports={button:"button-2Vex9IkU",first:"first-2Vex9IkU",last:"last-2Vex9IkU"}},82832:e=>{e.exports={wrap:"wrap-H6XRnLaC"}},91887:e=>{e.exports={hidden:"hidden-vHZuIWsw"}},75492:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-AFYo6gMo",withIcon:"withIcon-AFYo6gMo",shortcut:"shortcut-AFYo6gMo",loading:"loading-AFYo6gMo",icon:"icon-AFYo6gMo"}},19450:e=>{e.exports={button:"button-OSzyNVEZ",menu:"menu-OSzyNVEZ"}},33191:e=>{e.exports={customTradingViewStyleButton:"customTradingViewStyleButton-fjLcMxZj",withoutIcon:"withoutIcon-fjLcMxZj"}},64142:e=>{e.exports={dropdown:"dropdown-E3UQYoRD",label:"label-E3UQYoRD",smallWidthTitle:"smallWidthTitle-E3UQYoRD",smallWidthMenuItem:"smallWidthMenuItem-E3UQYoRD",smallWidthWrapper:"smallWidthWrapper-E3UQYoRD"}},87906:e=>{e.exports={value:"value-e0RYyFXU",selected:"selected-e0RYyFXU"}},32062:e=>{e.exports={smallWidthMenuItem:"smallWidthMenuItem-xvK6HzAF"}},6500:e=>{e.exports={button:"button-cXbh8Gcw",first:"first-cXbh8Gcw",last:"last-cXbh8Gcw",newStyles:"newStyles-cXbh8Gcw",menu:"menu-cXbh8Gcw",dropdown:"dropdown-cXbh8Gcw",menuContent:"menuContent-cXbh8Gcw",section:"section-cXbh8Gcw",smallTabletSectionTitle:"smallTabletSectionTitle-cXbh8Gcw",addCustomInterval:"addCustomInterval-cXbh8Gcw",hovered:"hovered-cXbh8Gcw"}},76521:e=>{e.exports={button:"button-CiwmljCL"}},4050:e=>{e.exports={button:"button-mEQw2hrh",isDisabled:"isDisabled-mEQw2hrh",text:"text-mEQw2hrh"}},96141:e=>{e.exports={opened:"opened-SUlSleuH",
hover:"hover-SUlSleuH",autoSaveWrapper:"autoSaveWrapper-SUlSleuH",sharingWrapper:"sharingWrapper-SUlSleuH",button:"button-SUlSleuH",buttonSmallPadding:"buttonSmallPadding-SUlSleuH",hintPlaceHolder:"hintPlaceHolder-SUlSleuH",smallHintPlaceHolder:"smallHintPlaceHolder-SUlSleuH",popupItemRowTabletSmall:"popupItemRowTabletSmall-SUlSleuH",shortcut:"shortcut-SUlSleuH"}},72597:e=>{e.exports={button:"button-TTaQ4aBF",text:"text-TTaQ4aBF",logo:"logo-TTaQ4aBF"}},67397:e=>{e.exports={button:"button-IQnsk0hp",largeLeftPadding:"largeLeftPadding-IQnsk0hp",text:"text-IQnsk0hp",uppercase:"uppercase-IQnsk0hp"}},75668:e=>{e.exports={description:"description-Q7biiIOG"}},52157:e=>{e.exports={item:"item-UfrwNtjY",round:"round-UfrwNtjY"}},41939:e=>{e.exports={wrap:"wrap-hoa11YwL",titleWrap:"titleWrap-hoa11YwL",indicators:"indicators-hoa11YwL",title:"title-hoa11YwL",icon:"icon-hoa11YwL",text:"text-hoa11YwL",titleTabletSmall:"titleTabletSmall-hoa11YwL",labelRow:"labelRow-hoa11YwL",label:"label-hoa11YwL"}},14621:e=>{e.exports={labelRow:"labelRow-qyt9pxdb",toolbox:"toolbox-qyt9pxdb",description:"description-qyt9pxdb",descriptionTabletSmall:"descriptionTabletSmall-qyt9pxdb",item:"item-qyt9pxdb",titleItem:"titleItem-qyt9pxdb",titleItemTabletSmall:"titleItemTabletSmall-qyt9pxdb",itemTabletSmall:"itemTabletSmall-qyt9pxdb",itemLabelTabletSmall:"itemLabelTabletSmall-qyt9pxdb",wrap:"wrap-qyt9pxdb",hovered:"hovered-qyt9pxdb"}},89227:e=>{e.exports={menu:"menu-Pi7orIC5",menuSmallTablet:"menuSmallTablet-Pi7orIC5",menuItemHeaderTabletSmall:"menuItemHeaderTabletSmall-Pi7orIC5",menuItemHeader:"menuItemHeader-Pi7orIC5"}},73887:e=>{e.exports={wrap:"wrap-mbKoosX4",full:"full-mbKoosX4",first:"first-mbKoosX4",last:"last-mbKoosX4",medium:"medium-mbKoosX4",buttonWithFavorites:"buttonWithFavorites-mbKoosX4"}},82559:e=>{e.exports={icon:"icon-0KfEd2LW"}},4039:e=>{e.exports={buttonUndo:"buttonUndo-6VeYguKu",buttonRedo:"buttonRedo-6VeYguKu"}},96746:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},72142:e=>{e.exports={footer:"footer-C0oTZgbU"}},49473:e=>{e.exports={dottedCloud:"dottedCloud-NezC5dyJ",check:"check-NezC5dyJ",spinningCloud:"spinningCloud-NezC5dyJ",arrow:"arrow-NezC5dyJ",arrowGap:"arrowGap-NezC5dyJ",container:"container-NezC5dyJ",unsaved:"unsaved-NezC5dyJ",hovered:"hovered-NezC5dyJ",saving:"saving-NezC5dyJ",saved:"saved-NezC5dyJ"}},16842:e=>{e.exports={favorite:"favorite-JVQQsDQk",disabled:"disabled-JVQQsDQk",active:"active-JVQQsDQk",checked:"checked-JVQQsDQk"}},63095:e=>{e.exports={item:"item-UZNJ2Dq5",label:"label-UZNJ2Dq5",labelRow:"labelRow-UZNJ2Dq5",toolbox:"toolbox-UZNJ2Dq5"}},524:e=>{e.exports={separator:"separator-GzmeVcFo",small:"small-GzmeVcFo",normal:"normal-GzmeVcFo",large:"large-GzmeVcFo"}},73432:e=>{e.exports={button:"button-SD4Dbbwd",disabled:"disabled-SD4Dbbwd",active:"active-SD4Dbbwd",hidden:"hidden-SD4Dbbwd"}},76974:(e,t,a)=>{"use strict";a.d(t,{useIsMounted:()=>i});var n=a(59496);const i=()=>{
const e=(0,n.useRef)(!1);return(0,n.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},26996:(e,t,a)=>{"use strict";a.d(t,{Loader:()=>c});var n,i=a(59496),s=a(97754),o=a(74991),l=a(62092),r=a.n(l);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(n||(n={}));class c extends i.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:n.Initial}}render(){const{className:e,color:t="black",size:a="medium",staticPosition:n}=this.props,o=s(r().item,r()[t],r()[a]);return i.createElement("span",{className:s(r().loader,n&&r().static,this._getStateClass(),e)},i.createElement("span",{className:o}),i.createElement("span",{className:o}),i.createElement("span",{className:o}))}componentDidMount(){this.setState({state:n.Appear}),this._stateChangeTimeout=setTimeout(()=>{this.setState({state:n.Active})},2*o.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case n.Initial:return r()["loader-initial"];case n.Appear:return r()["loader-appear"];default:return""}}}},26005:(e,t,a)=>{"use strict";a.d(t,{CollapsibleSection:()=>r});var n=a(59496),i=a(97754),s=a.n(i),o=a(10381),l=a(50789);function r(e){return n.createElement(n.Fragment,null,n.createElement("div",{className:s()(e.className,l.summary),onClick:function(){e.onStateChange&&e.onStateChange(!e.open)},"data-open":e.open},e.summary,n.createElement(o.ToolWidgetCaret,{className:l.caret,dropped:Boolean(e.open)})),e.open&&e.children)}},84096:(e,t,a)=>{"use strict";a.d(t,{DEFAULT_MENU_ITEM_SWITCHER_THEME:()=>m,MenuItemSwitcher:()=>v});var n=a(59496),i=a(97754),s=a.n(i);const o=(0,n.createContext)({enablePointerOnHover:!0,enableActiveStateStyles:!0});var l=a(26390),r=a.n(l);function c(e){const t=(0,n.useContext)(o),{className:a,intent:s="default",size:l="small",enablePointerOnHover:c=t.enablePointerOnHover,enableActiveStateStyles:h=t.enableActiveStateStyles}=e;return i(a,r().switcher,r()["size-"+l],r()["intent-"+s],!c&&r()["disable-cursor-pointer"],!h&&r()["disable-active-state-styles"])}function h(e){const{reference:t,size:a,intent:i,...s}=e;return n.createElement("div",{className:c(e)},n.createElement("input",{...s,type:"checkbox",className:r().input,ref:t}),n.createElement("div",{className:r()["thumb-wrapper"]},n.createElement("div",{className:r().track}),n.createElement("div",{className:r().thumb})))}var d=a(90186),u=a(31405);const m=u;function v(e){const{className:t,checked:a,id:i,label:o,labelDescription:l,value:r,preventLabelHighlight:c,reference:m,switchReference:v,theme:p=u,disabled:g}=e,b=s()(p.label,a&&!c&&p.labelOn),S=s()(t,p.wrapper,a&&p.wrapperWithOnLabel);return n.createElement("label",{className:S,htmlFor:i,ref:m},n.createElement("div",{className:p.labelRow},n.createElement("div",{className:b},o),l&&n.createElement("div",{className:p.labelHint},l)),n.createElement(h,{disabled:g,className:p.switch,reference:v,checked:a,onChange:function(t){const a=t.target.checked
;void 0!==e.onChange&&e.onChange(a)},value:r,tabIndex:-1,id:i,...(0,d.filterDataProps)(e)}))}},14593:(e,t,a)=>{"use strict";a.d(t,{ToolWidgetIconButton:()=>l});var n=a(59496),i=a(97754),s=a(4825),o=a(64547);const l=n.forwardRef((e,t)=>{const{className:a,id:l,...r}=e;return n.createElement(s.ToolWidgetButton,{"data-name":l,...r,ref:t,className:i(a,o.button)})})},53374:(e,t,a)=>{"use strict";a.d(t,{INTERVALS:()=>i});var n=a(28353);const i=[{name:"",label:(0,n.t)("minutes",{context:"interval"})},{name:"H",label:(0,n.t)("hours",{context:"interval"})},{name:"D",label:(0,n.t)("days",{context:"interval"})},{name:"W",label:(0,n.t)("weeks",{context:"interval"})},{name:"M",label:(0,n.t)("months",{context:"interval"})}]},49466:(e,t,a)=>{"use strict";a.d(t,{ToolWidgetMenuSummary:()=>o});var n=a(59496),i=a(97754),s=a(78966);function o(e){return n.createElement("div",{className:i(e.className,s.title)},e.children)}},79389:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getRestrictedToolSet:()=>sn});var n=a(67337),i=a(59496),s=a(19036),o=a(28353),l=a(82992),r=a(16654),c=a(37466),h=a(36189),d=a(9745),u=a(16396),m=a(35390),v=a(97754),p=a.n(v),g=a(82832);class b extends i.PureComponent{render(){const{children:e,className:t,...a}=this.props;return i.createElement("div",{className:v(t,g.wrap),...a},e)}}var S=a(4825),C=a(90186),_=a(936);class w extends i.PureComponent{constructor(){super(...arguments),this._handleClick=()=>{const{onClick:e,onClickArg:t}=this.props;e&&e(t)}}render(){const{isFirst:e,isLast:t,hint:a,text:n,icon:s,isActive:o,isDisabled:l,className:r}=this.props,c=(0,C.filterDataProps)(this.props);return i.createElement(S.ToolWidgetButton,{...c,icon:s,text:n,title:a,isDisabled:l,isActive:o,isGrouped:!0,onClick:this._handleClick,className:v(r,_.button,{[_.first]:e,[_.last]:t})})}}var y=a(51613),f=a(90692),k=a(24437),M=a(81332),E=a(55402),T=a(15943),x=a(19450);const I={0:(0,o.t)("Bars"),1:(0,o.t)("Candles"),9:(0,o.t)("Hollow candles"),13:(0,o.t)("Columns"),8:(0,o.t)("Heikin Ashi"),2:(0,o.t)("Line"),3:(0,o.t)("Area"),10:(0,o.t)("Baseline"),12:(0,o.t)("High-low")};const A={barsStyle:(0,o.t)("Bar's style"),labels:I},R=(0,E.registryContextType)();function N(e){var t;return!(null===(t=l.linking.supportedChartStyles.value())||void 0===t?void 0:t.includes(e))}class F extends i.PureComponent{constructor(e,t){super(e,t),this._handleChangeStyle=e=>{const{favorites:t,lastSelectedNotFavorite:a,activeStyle:n}=this.state;this.setState({activeStyle:e,lastSelectedNotFavorite:t.includes(n)?a:n})},this._handleSelectStyle=e=>{const{chartWidgetCollection:t}=this.context;e!==t.activeChartStyle.value()&&t.setChartStyleToWidget(e)},this._handleClickFavorite=e=>{this._isStyleFavorited(e)?this._handleRemoveFavorite(e):this._handleAddFavorite(e)},this._boundForceUpdate=()=>{this.forceUpdate()},this._handleQuickClick=e=>{this._handleSelectStyle(e),this._trackClick()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,favoriteChartStylesService:s.any.isRequired})
;const{chartWidgetCollection:a,favoriteChartStylesService:n}=t,i=a.activeChartStyle.value(),o=n.get(),l=(0,T.japaneseChartStyles)();this.state={activeStyle:i,favorites:o,styles:(0,T.commonChartStyles)(),japaneseStyles:l}}componentDidMount(){const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.subscribe(this._handleChangeStyle),t.getOnChange().subscribe(this,this._handleChangeSettings),l.linking.supportedChartStyles.subscribe(this._boundForceUpdate)}componentWillUnmount(){const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.unsubscribe(this._handleChangeStyle),t.getOnChange().unsubscribe(this,this._handleChangeSettings),l.linking.supportedChartStyles.unsubscribe(this._boundForceUpdate)}render(){const{isShownQuicks:e,displayMode:t="full",id:a}=this.props,{activeStyle:n,favorites:s,styles:o,japaneseStyles:l,lastSelectedNotFavorite:h}=this.state,u="small"!==t&&e&&0!==s.length,v=[...s];v.includes(n)?void 0!==h&&v.push(h):v.push(n);const p=u&&v.length>1;return i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>{const t=o.map(t=>this._renderPopupMenuItem(t,t===n,e)),s=l.map(t=>this._renderPopupMenuItem(t,t===n,e));return i.createElement(b,{id:a},p&&v.map((e,t)=>i.createElement(w,{className:x.button,icon:c.SERIES_ICONS[e],isActive:u&&n===e,isDisabled:N(e),key:t,hint:A.labels[e],isFirst:0===t,isLast:t===v.length-1,onClick:u?this._handleQuickClick:void 0,onClickArg:e,"data-value":r.STYLE_SHORT_NAMES[e]})),i.createElement(m.ToolWidgetMenu,{arrow:Boolean(p),content:p?void 0:i.createElement(b,null,i.createElement(d.Icon,{icon:c.SERIES_ICONS[n]})),title:p?A.barsStyle:A.labels[n],className:x.menu,isDrawer:e,onClick:this._trackClick},t,!!s.length&&i.createElement(y.PopupMenuSeparator,null),s))})}_renderPopupMenuItem(e,t,a){const{isFavoritingAllowed:n}=this.props,s=this._isStyleFavorited(e);return i.createElement(u.PopupMenuItem,{key:e,theme:a?M.multilineLabelWithIconAndToolboxTheme:void 0,icon:c.SERIES_ICONS[e],isActive:t,isDisabled:N(e),label:A.labels[e]||"",onClick:this._handleSelectStyle,onClickArg:e,showToolboxOnHover:!s,toolbox:n&&i.createElement(h.FavoriteButton,{isActive:t,isFilled:s,onClick:()=>this._handleClickFavorite(e)}),"data-value":r.STYLE_SHORT_NAMES[e]})}_handleChangeSettings(e){this.setState({lastSelectedNotFavorite:void 0,favorites:e})}_isStyleFavorited(e){return-1!==this.state.favorites.indexOf(e)}_handleAddFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set([...t,e])}_handleRemoveFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set(t.filter(t=>t!==e))}_trackClick(){0}}F.contextType=R;var H=a(39592);const z=["medium","small"];function P(e){const{text:t,className:a,displayMode:n,collapseWhen:s=z,...o}=e,l=!s.includes(n);return i.createElement(S.ToolWidgetButton,{...o,text:l?t:void 0,className:v(a,H.button,l?H.withText:H.withoutText)})}var D=a(51768),L=a(37669),W=a(2323);const O={compare:(0,o.t)("Compare"),compareOrAddSymbol:(0,
o.t)("Compare or Add Symbol")},U=(0,E.registryContextType)();class B extends i.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({isActive:e})},this._handleClick=()=>{var e;(0,D.trackEvent)("GUI","Chart Header Toolbar","compare"),null===(e=this._compareDialogRenderer)||void 0===e||e.show()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={isActive:!1},this._compareDialogRenderer=this.context.chartWidgetCollection.getCompareDialogRenderer()}componentDidMount(){var e;null===(e=this._compareDialogRenderer)||void 0===e||e.visible().subscribe(this._updateState)}componentWillUnmount(){var e;null===(e=this._compareDialogRenderer)||void 0===e||e.visible().unsubscribe(this._updateState)}render(){const{isActive:e}=this.state;return i.createElement(P,{...this.props,icon:W,isOpened:e,onClick:this._handleClick,text:L.hasNewHeaderToolbarStyles?void 0:O.compare,title:O.compareOrAddSymbol,collapseWhen:L.hasNewHeaderToolbarStyles?["full","medium","small"]:void 0})}}B.contextType=U;var V=a(14593),G=a(61814),Z=a(68335),Y=a(90711),Q=a(15392);const q={hint:(0,o.t)("Fullscreen mode")},K=(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Shift,!1),"F"],text:"{0} + {1}"}),j=(0,E.registryContextType)();class J extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e}=this.context;e.startFullscreen()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return i.createElement(V.ToolWidgetIconButton,{id:t,icon:L.hasNewHeaderToolbarStyles?Q:Y,onClick:this._handleClick,title:q.hint,className:v(e),"data-tooltip-hotkey":K})}}J.contextType=j;var X=a(88537);const $=(0,a(98125).getLogger)("FavoritesInfo");function ee(e,t){if(0===e.length)return Promise.resolve([]);$.logNormal("Requesting favorites info");const a=[],n=new Map,i=new Map,s=new Map;return e.forEach(e=>{switch(e.type){case"java":s.set(e.studyId,e);break;case"pine":isPublishedPineId(e.pineId)?n.set(e.pineId,e):i.set(e.pineId,e);break;default:(0,X.assert)(!1,"unknown favorite type "+JSON.stringify(e))}}),0!==s.size&&a.push(t.findAllJavaStudies().then(e=>{const t=new Map;for(const a of e)!a.is_hidden_study&&s.has(a.id)&&t.set(a.id,{name:a.description,localizedName:a.description_localized,studyMarketShittyObject:a});return t}).then(e=>{const t=function(e,t){const a={items:[],notFoundItems:[]};return e.forEach((e,n)=>{const i=t.get(n);void 0!==i?a.items.push({item:e,info:i}):a.notFoundItems.push(e)}),a}(s,e);if(0!==t.notFoundItems.length){const e=t.notFoundItems.map(e=>e.studyId);$.logWarn("Cannot find java scripts: "+JSON.stringify(e))}return t.items})),Promise.all(a).then(e=>($.logNormal("Requesting favorites info finished"),e.reduce((e,t)=>e.concat(t),[])))}var te=a(14291),ae=a(85733),ne=a(26996),ie=a(59174);function se(e){const{className:t}=e;return i.createElement("div",{className:p()(ie.spinnerWrap,t)},i.createElement(ne.Loader,null))}var oe=a(49466),le=a(76422),re=a(60373),ce=a(64142);const he={text:(0,
o.t)("Indicators"),hint:(0,o.t)("Indicators & Strategies"),favorites:(0,o.t)("Favorites")},de=(0,G.hotKeySerialize)({keys:["/"],text:"{0}"}),ue=(0,E.registryContextType)();class me extends i.PureComponent{constructor(e,t){super(e,t),this._promise=null,this._menu=i.createRef(),this._favoriteFundamentalsModel=null,this._setActiveState=e=>{this.setState({isActive:e})},this._handleClick=()=>{const{studyMarket:e}=this.props;this.setState({isActive:!0},()=>{e.visible().value()?e.hide():e.show()}),this._trackClick()},this._handleSelectIndicator=e=>{e=(0,X.ensureDefined)(e),this._trackFavoriteAction("Favorite indicator from toolbar");const{chartWidgetCollection:t}=this.context;if("java"===e.type){const t=(0,te.tryFindStudyLineToolNameByStudyId)(e.studyId);if(null!==t)return void ae.tool.setValue(t)}t.activeChartWidget.value().insertStudy(e)},this._handleFavoriteIndicatorsChange=()=>{const{favoriteScriptsModel:e}=this.context,t=[...(0,X.ensureDefined)(e).favorites()];this.setState({favorites:t}),this._clearCache()},this._handleFavoriteFundamentalsChange=()=>{var e;const t=new Set((null===(e=this._favoriteFundamentalsModel)||void 0===e?void 0:e.favorites())||[]);this.setState({favoriteFundamentals:t}),this._clearCache()},this._handleMouseEnter=()=>{this._prefetchFavorites()},this._handleWrapClick=()=>{this._prefetchFavorites()},this._handleChangeActiveWidget=()=>{this._clearCache()},this._clearCache=()=>{this._promise=null,this.setState({infos:[]})},this._handleScriptRenamed=e=>{const{favoriteScriptsModel:t}=this.context;void 0!==t&&t.isFav(e.scriptIdPart)&&this._clearCache()},this._handleFavoriteMenuClick=()=>{this._trackClick(),this._trackFavoriteAction("Select favorite indicators dropdown")},(0,E.validateRegistry)(t,{favoriteScriptsModel:s.any,chartWidgetCollection:s.any.isRequired});const{favoriteScriptsModel:a}=t,n=void 0!==a?a.favorites():[];this.state={isActive:!1,isLoading:!1,favorites:n,favoriteFundamentals:void 0,infos:[]}}componentDidMount(){const{studyMarket:e}=this.props,{favoriteScriptsModel:t,chartWidgetCollection:a}=this.context;e.visible().subscribe(this._setActiveState),void 0!==t&&(t.favoritesChanged().subscribe(this,this._handleFavoriteIndicatorsChange),a.activeChartWidget.subscribe(this._handleChangeActiveWidget)),le.on("TVScriptRenamed",this._handleScriptRenamed,null)}componentWillUnmount(){const{studyMarket:e}=this.props,{favoriteScriptsModel:t,chartWidgetCollection:a}=this.context;e.visible().unsubscribe(this._setActiveState),void 0!==t&&(t.favoritesChanged().unsubscribe(this,this._handleFavoriteIndicatorsChange),a.activeChartWidget.unsubscribe(this._handleChangeActiveWidget)),le.unsubscribe("TVScriptRenamed",this._handleScriptRenamed,null),this._promise=null}render(){const{isActive:e,favorites:t,favoriteFundamentals:a,isLoading:n}=this.state,{className:s,displayMode:l,id:r}=this.props,{chartWidgetCollection:c}=this.context;return i.createElement(i.Fragment,null,i.createElement(b,{id:r,onMouseEnter:this._handleMouseEnter,onClick:this._handleWrapClick},i.createElement(P,{displayMode:l,className:s,
icon:re,isOpened:e,onClick:this._handleClick,text:he.text,title:he.hint,"data-role":"button","data-name":"open-indicators-dialog","data-tooltip-hotkey":de}),Boolean(t.length>0||(null==a?void 0:a.size))&&i.createElement(f.MatchMedia,{rule:"screen and (max-width: 428px)"},e=>i.createElement(m.ToolWidgetMenu,{key:c.activeChartWidget.value().id(),arrow:!0,closeOnClickOutside:!0,isDrawer:e,drawerPosition:"Bottom",title:he.favorites,ref:this._menu,onClick:this._handleFavoriteMenuClick,"data-name":"show-favorite-indicators"},i.createElement("div",{className:p()(ce.dropdown,e&&ce.smallWidthWrapper)},i.createElement(oe.ToolWidgetMenuSummary,{className:e&&ce.smallWidthTitle},(0,o.t)("Favorite Indicators")),n&&i.createElement(se,null),!n&&i.createElement(i.Fragment,null,this.state.infos.length>0?this.state.infos.map(t=>i.createElement(u.PopupMenuItem,{className:p()(e&&ce.smallWidthMenuItem),theme:e?M.multilineLabelWithIconAndToolboxTheme:void 0,key:"java"===t.item.type?t.item.studyId:t.item.pineId,onClick:this._handleSelectIndicator,onClickArg:t.item,label:i.createElement("span",{className:p()(!e&&ce.label,e&&ce.smallWidthLabel,"apply-overflow-tooltip")},ve(t))})):null!==this._promise&&i.createElement(u.PopupMenuItem,{isDisabled:!0,label:(0,o.t)("You have no Favorites Indicators yet")})))))))}_prefetchFavorites(){const{chartWidgetCollection:e}=this.context;if(null!==this._promise||!window.is_authenticated)return;const t=e.activeChartWidget.value();if(!t.hasModel())return;const a=t.model().model().studyMetaInfoRepository();this.setState({isLoading:!0});const n=this._promise=Promise.all([ee(this.state.favorites,a),void 0]).then(e=>{if(n!==this._promise)return;const[t,a]=e;let i=[...t];if(a){const e=a.filter(e=>{var t;return null===(t=this.state.favoriteFundamentals)||void 0===t?void 0:t.has(e.scriptIdPart)}).map(this._mapFundamentalToFavoriteItemInfo);i.push(...e)}i=[...i].sort((e,t)=>ve(e).localeCompare(ve(t))),this.setState({infos:i,isLoading:!1},()=>{this._menu.current&&this._menu.current.update()})})}_trackClick(){0}_trackFavoriteAction(e){(0,D.trackEvent)("GUI","Chart Header Toolbar",e)}_mapFundamentalToFavoriteItemInfo(e){return{item:{type:"pine",pineId:e.scriptIdPart},info:{name:e.scriptName,localizedName:getLocalizedFundamentalsName(e),studyMarketShittyObject:void 0}}}}function ve(e){return e.info.localizedName||(0,o.t)(e.info.name,{context:"study"})}me.contextType=ue;var pe=a(9315),ge=a(29823),be=a(87906);function Se(e){return i.createElement("div",{className:v(be.value,{[be.selected]:e.isSelected})},e.value,e.metric)}var Ce=a(50628),_e=a(10381),we=a(53374),ye=a(69698);class fe extends i.PureComponent{constructor(e){super(e),this._timeMenu=null,this._setMenuRef=e=>{this._timeMenu=e},this._handleChangeInput=e=>{const{value:t}=e.currentTarget;/^[0-9]*$/.test(t)&&this.setState({inputValue:t})},this._handleSelectTime=e=>{this.setState({selectedIntervalSuffix:e}),this._closeMenu()},this._handleClickAdd=()=>{const{inputValue:e,selectedIntervalSuffix:t}=this.state;this.props.onAdd(e,t)},this._toggleMenu=()=>{
this.state.isOpenedMenu?this._closeMenu():this._openMenu()},this._closeMenu=()=>{this.props.onCloseMenu(),this.setState({isOpenedMenu:!1})},this._openMenu=()=>{this.props.onOpenMenu(),this.setState({isOpenedMenu:!0})},this._getMenuPosition=()=>{const e=(0,X.ensureNotNull)(this._timeMenu).getBoundingClientRect();return{overrideWidth:e.width,x:e.left,y:e.bottom+1}},this.state={inputValue:"1",isOpenedMenu:!1,selectedIntervalSuffix:we.INTERVALS[0].name}}render(){const{inputValue:e,isOpenedMenu:t,menuWidth:a,selectedIntervalSuffix:n}=this.state;return i.createElement("div",{className:v(ye.form,{[ye.interacting]:t})},i.createElement("input",{className:ye.input,maxLength:7,onChange:this._handleChangeInput,value:e}),i.createElement("div",{className:ye.menu,onClick:this._toggleMenu,ref:this._setMenuRef},we.INTERVALS.find(e=>e.name===n).label,i.createElement(_e.ToolWidgetCaret,{dropped:t})),i.createElement("div",{className:ye.add,onClick:this._handleClickAdd},(0,o.t)("Add")),i.createElement(Ce.PopupMenu,{doNotCloseOn:this,isOpened:t,minWidth:a,onClose:this._closeMenu,position:this._getMenuPosition},we.INTERVALS.map(e=>i.createElement(u.PopupMenuItem,{dontClosePopup:!0,key:e.name,label:e.label,onClick:this._handleSelectTime,onClickArg:e.name}))))}}var ke=a(96040),Me=a(70412),Ee=a(32563),Te=a(32062);function xe(e){const{interval:t,hint:a,isActive:n,isDisabled:s,isFavorite:o,isSignaling:l,onClick:r,onClickRemove:c,onClickFavorite:d,isSmallTablet:m}=e,v=(0,C.filterDataProps)(e),[g,b]=(0,Me.useHover)(),S=i.useCallback(()=>c(t),[c,t]),_=i.useCallback(()=>d(t),[d,t]),w=(0,i.useRef)(null);return(0,i.useEffect)(()=>{var e;l&&m&&(null===(e=w.current)||void 0===e||e.scrollIntoView())},[l,m]),i.createElement("div",{...b,ref:w},i.createElement(u.PopupMenuItem,{...v,className:p()(m&&Te.smallWidthMenuItem),theme:m?M.multilineLabelWithIconAndToolboxTheme:void 0,isActive:n,isDisabled:s,isHovered:l,onClick:r,onClickArg:t,toolbox:function(){const{isRemovable:t,isFavoritingAllowed:a}=e,l=i.createElement(ke.RemoveButton,{key:"remove",isActive:n,hidden:!Ee.touch&&!g,onClick:S}),r=i.createElement(h.FavoriteButton,{key:"favorite",isActive:n,isFilled:o,onClick:_});return[t&&l,!s&&a&&r]}(),showToolboxOnHover:!o,label:a}))}const Ie={[ge.ResolutionKind.Ticks]:(0,o.t)("Ticks",{context:"interval_group_name"}),[ge.ResolutionKind.Seconds]:(0,o.t)("Seconds",{context:"interval_group_name"}),[ge.ResolutionKind.Minutes]:(0,o.t)("Minutes",{context:"interval_group_name"}),[ge.SpecialResolutionKind.Hours]:(0,o.t)("Hours",{context:"interval_group_name"}),[ge.ResolutionKind.Days]:(0,o.t)("Days",{context:"interval_group_name"}),[ge.ResolutionKind.Weeks]:(0,o.t)("Weeks",{context:"interval_group_name"}),[ge.ResolutionKind.Months]:(0,o.t)("Months",{context:"interval_group_name"}),[ge.ResolutionKind.Range]:(0,o.t)("Ranges",{context:"interval_group_name"}),[ge.ResolutionKind.Invalid]:""};function Ae(e,t=!1){return{id:e,name:Ie[e],items:[],mayOmitSeparator:t}}var Re=a(26005),Ne=a(2872),Fe=a.n(Ne),He=a(29197),ze=a(59064),Pe=a(6500);const De={openDialog:(0,
o.t)("Open Interval Dialog"),timeInterval:(0,o.t)("Time Interval")},Le=(0,G.hotKeySerialize)({keys:[","],text:(0,o.t)("Number or {hotKey_0}")}),We=(0,E.registryContextType)(),Oe=new(Fe()),Ue=i.lazy(async()=>({default:(await Promise.all([a.e(4194),a.e(7962),a.e(8986),a.e(8463),a.e(9289),a.e(7345),a.e(2385),a.e(5643),a.e(3016),a.e(4013)]).then(a.bind(a,21317))).ToolWidgetIntervalsAddDialog}));function Be(e){{const t=ge.Interval.parse(e);if(!(0,pe.isSecondsEnabled)()&&t.isSeconds())return!1;if(!(0,pe.isTicksEnabled)()&&t.isTicks())return!1}return!0}class Ve extends i.PureComponent{constructor(e,t){super(e,t),this._menu=i.createRef(),this._renderChildren=(e,t)=>[...this._createMenuItems(e,t),...this._createIntervalForm(t)],this._handleChangeInterval=e=>{const{activeInterval:t,lastNotQuicked:a}=this.state,n=this._getQuicks();this.setState({activeInterval:(0,pe.normalizeIntervalString)(e),lastNotQuicked:void 0===t||n.includes(t)?a:t})},this._bindedForceUpdate=()=>{this.forceUpdate()},this._handleCloseMenu=()=>{this.setState({isOpenedFormMenu:!1})},this._handleOpenMenu=()=>{this.setState({isOpenedFormMenu:!0})},this._handleSelectInterval=e=>{void 0!==e&&e!==l.linking.interval.value()&&this.context.chartWidgetCollection.setResolution(e),e&&(0,D.trackEvent)("GUI","Time Interval",e)},this._handleClickFavorite=e=>{e=(0,X.ensureDefined)(e),this._isIntervalFavorite(e)?this._handleRemoveFavorite(e):this._handleAddFavorite(e)},this._handleAddFavorite=e=>{const{favorites:t}=this.state;this.context.favoriteIntervalsService.set([...t,e])},this._handleRemoveFavorite=e=>{const{favorites:t}=this.state;this.context.favoriteIntervalsService.set(t.filter(t=>t!==e))},this._handleAddInterval=(e,t)=>{const{intervalService:a}=this.context,n=a.add(e,t);n&&this.setState({lastAddedInterval:n})},this._handleRemoveInterval=e=>{const{intervalService:t}=this.context;e&&(t.remove(e),this._handleRemoveFavorite(e))},this._getHandleSectionStateChange=e=>t=>{const{menuViewState:a}=this.state,{intervalsMenuViewStateService:n}=this.context;n.set({...a,[e]:!t})},this._handleOpenAddIntervalDialog=()=>{this.setState({isAddIntervalDialogOpened:!0})},this._handleCloseAddIntervalDialog=()=>{this.setState({isAddIntervalDialogOpened:!1})},this._handleGlobalClose=()=>{const{isFake:e}=this.props,{isAddIntervalDialogOpened:t}=this.state;e||t||Oe.fire()},this._handeQuickClick=e=>{this._handleSelectInterval(e),this._trackClick()},(0,E.validateRegistry)(t,{chartApiInstance:s.any.isRequired,favoriteIntervalsService:s.any.isRequired,intervalService:s.any.isRequired,intervalsMenuViewStateService:s.any.isRequired});const{chartApiInstance:a,favoriteIntervalsService:o,intervalService:r,intervalsMenuViewStateService:c}=t;this._customIntervals=n.enabled("custom_resolutions");const h=l.linking.interval.value(),d=h&&(0,pe.normalizeIntervalString)(h),u=o.get(),m=r.getCustomIntervals(),v=c.get();this._defaultIntervals=a.defaultResolutions().filter(Be).map(pe.normalizeIntervalString),this.state={isOpenedFormMenu:!1,activeInterval:d,favorites:u,customs:m,menuViewState:v,
isAddIntervalDialogOpened:!1}}componentDidMount(){const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().subscribe(this,this._handleChangeFavorites),a.getOnChange().subscribe(this,this._handleChangeMenuViewState),t.getOnChange().subscribe(this,this._handleChangeCustoms),l.linking.interval.subscribe(this._handleChangeInterval),l.linking.intraday.subscribe(this._bindedForceUpdate),l.linking.seconds.subscribe(this._bindedForceUpdate),l.linking.ticks.subscribe(this._bindedForceUpdate),l.linking.range.subscribe(this._bindedForceUpdate),l.linking.supportedResolutions.subscribe(this._bindedForceUpdate),ze.globalCloseDelegate.subscribe(this,this._handleGlobalClose)}componentWillUnmount(){const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().unsubscribe(this,this._handleChangeFavorites),a.getOnChange().unsubscribe(this,this._handleChangeMenuViewState),t.getOnChange().unsubscribe(this,this._handleChangeCustoms),l.linking.interval.unsubscribe(this._handleChangeInterval),l.linking.intraday.unsubscribe(this._bindedForceUpdate),l.linking.seconds.unsubscribe(this._bindedForceUpdate),l.linking.ticks.unsubscribe(this._bindedForceUpdate),l.linking.range.unsubscribe(this._bindedForceUpdate),l.linking.supportedResolutions.unsubscribe(this._bindedForceUpdate),ze.globalCloseDelegate.unsubscribe(this,this._handleGlobalClose)}componentDidUpdate(e,t){this.state.lastAddedInterval&&setTimeout(()=>this.setState({lastAddedInterval:void 0}),400)}render(){const{isShownQuicks:e,id:t}=this.props,{activeInterval:a,customs:n,lastNotQuicked:s,isAddIntervalDialogOpened:o}=this.state,l=this._getQuicks(),r=(0,pe.sortResolutions)([...l]);void 0!==a&&r.includes(a)?void 0!==s&&r.push(s):void 0!==a&&r.push(a);const c=(!(!e||0===l.length)||void 0)&&r.length>1,h={},d=(0,pe.mergeResolutions)(this._defaultIntervals,n);(void 0!==a?d.concat(a):d).filter(pe.isAvailable).forEach(e=>h[e]=!0);const u=void 0!==a?(0,pe.getTranslatedResolutionModel)(a):null;return i.createElement(b,{id:t},c&&r.map((e,t)=>{const n=(0,pe.getTranslatedResolutionModel)(e);return i.createElement(w,{key:t,className:v(Pe.button,{[Pe.first]:0===t,[Pe.last]:t===r.length-1,[Pe.newStyles]:L.hasNewHeaderToolbarStyles}),text:i.createElement(Se,{value:n.mayOmitMultiplier?void 0:n.multiplier,metric:n.shortKind}),hint:n.hint,isActive:a===e,isDisabled:!h[e]&&e!==s,onClick:this._handeQuickClick,onClickArg:e,"data-value":e})}),i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>i.createElement(i.Fragment,null,i.createElement(He.CloseDelegateContext.Provider,{value:Oe},i.createElement(m.ToolWidgetMenu,{arrow:Boolean(c),closeOnClickOutside:!0,content:c||null===u?void 0:i.createElement(b,{className:Pe.menuContent},i.createElement(Se,{value:u.mayOmitMultiplier?void 0:u.multiplier,metric:u.shortKind})),title:c||null===u?De.timeInterval:u.hint,hotKey:c?Le:void 0,className:Pe.menu,ref:this._menu,isDrawer:e,onClick:this._trackClick},i.createElement("div",{className:Pe.dropdown
},this._renderChildren(d,e)))),e&&o&&i.createElement(i.Suspense,{fallback:null},i.createElement(Ue,{onAdd:this._handleAddInterval,onClose:this._handleCloseAddIntervalDialog,onUnmount:this._handleCloseAddIntervalDialog})))))}_createMenuItems(e,t){const a=function(e){const t=Ae(ge.ResolutionKind.Ticks),a=Ae(ge.ResolutionKind.Seconds),n=Ae(ge.ResolutionKind.Minutes),i=Ae(ge.SpecialResolutionKind.Hours),s=Ae(ge.ResolutionKind.Days),o=Ae(ge.ResolutionKind.Range);return e.forEach(e=>{const l=ge.Interval.parse(e);l.isMinuteHours()?i.items.push(e):l.isMinutes()?(0,ge.isHour)(Number(l.multiplier()))?i.items.push(e):n.items.push(e):l.isSeconds()?a.items.push(e):l.isDWM()?s.items.push(e):l.isRange()?o.items.push(e):l.isTicks()&&t.items.push(e)}),[t,a,n,i,s,o].filter(e=>0!==e.items.length)}(e).map((e,a,n)=>this._renderResolutionsGroup(e,1===n.length,t));return function(e){let t=!1;return e.filter((e,a,n)=>{let i=!0;return e.type===y.PopupMenuSeparator&&(0!==a&&a!==n.length-1||(i=!1),t&&(i=!1)),t=e.type===y.PopupMenuSeparator,i})}([].concat(...a))}_createIntervalForm(e){if(this._customIntervals){const t=e?i.createElement("div",{key:"add-dialog",className:Pe.addCustomInterval,onClick:this._handleOpenAddIntervalDialog},(0,o.t)("Add custom interval")+"…"):i.createElement(fe,{key:"add-form",onAdd:this._handleAddInterval,onCloseMenu:this._handleCloseMenu,onOpenMenu:this._handleOpenMenu});return[i.createElement(y.PopupMenuSeparator,{key:"custom-interval-separator"}),t]}return[]}_renderResolutionsGroup(e,t=!1,a){const n=[],s=e.items.map(e=>this._renderPopupMenuItem(e,a));if(t)n.push(...s);else if(a){const t=i.createElement("div",{key:e.id},i.createElement("div",{className:Pe.smallTabletSectionTitle},e.name),s);n.push(t)}else{const{intervalsMenuViewStateService:t}=this.context,{menuViewState:a}=this.state;if(!t.isAllowed(e.id))return[];const o=i.createElement(Re.CollapsibleSection,{key:e.id,className:Pe.section,summary:e.name,open:!a[e.id],onStateChange:this._getHandleSectionStateChange(e.id)},s);n.push(o)}return(!e.mayOmitSeparator||e.items.length>1)&&(n.unshift(i.createElement(y.PopupMenuSeparator,{key:"begin-"+e.name})),n.push(i.createElement(y.PopupMenuSeparator,{key:"end-"+e.name}))),n}_handleChangeFavorites(e){this.setState({lastNotQuicked:void 0,favorites:e})}_handleChangeCustoms(e){this.setState({customs:e})}_handleChangeMenuViewState(e){this.setState({menuViewState:e},()=>{this._menu.current&&this._menu.current.update()})}_renderPopupMenuItem(e,t){const{isFavoritingAllowed:a}=this.props,{activeInterval:n,lastAddedInterval:s}=this.state,o=e===n,l=(0,pe.isAvailable)(e),r=this._isIntervalFavorite(e),c=this._isIntervalDefault(e),h=(0,pe.getTranslatedResolutionModel)(e);return i.createElement(xe,{key:e,isSmallTablet:t,interval:e,hint:h.hint,isSignaling:s===e,isFavoritingAllowed:a,isDisabled:!l,isFavorite:r,isRemovable:!c,isActive:o,onClick:this._handleSelectInterval,onClickRemove:this._handleRemoveInterval,onClickFavorite:this._handleClickFavorite,"data-value":e})}_isIntervalDefault(e){return this._defaultIntervals.includes(e)}
_isIntervalFavorite(e){return this.state.favorites.includes(e)}_getQuicks(e){return this.props.isShownQuicks&&"small"!==this.props.displayMode?void 0===e?this.state.favorites:e:[]}_trackClick(){0}}Ve.contextType=We;var Ge=a(76521),Ze=a(74034);const Ye={hint:(0,o.t)("Open chart in popup")},Qe=(0,E.registryContextType)();class qe extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e,windowMessageService:t,isFundamental:a}=this.context,n=e.activeChartWidget.value();n.withModel(null,()=>{t.post(parent,"openChartInPopup",{symbol:n.model().mainSeries().actualSymbol(),interval:n.model().mainSeries().interval(),fundamental:a})})},(0,E.validateRegistry)(t,{isFundamental:s.any,chartWidgetCollection:s.any.isRequired,windowMessageService:s.any.isRequired})}render(){const{className:e}=this.props;return i.createElement(V.ToolWidgetIconButton,{className:v(e,Ge.button),icon:Ze,onClick:this._handleClick,title:Ye.hint})}}qe.contextType=Qe;var Ke=a(28289);const je={hint:(0,o.t)("Chart settings")},Je=(0,E.registryContextType)();class Xe extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e}=this.context,t=e.activeChartWidget.value();(0,D.trackEvent)("GUI","Chart Header Toolbar","chart properties"),t.showGeneralChartProperties()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){return i.createElement(V.ToolWidgetIconButton,{...this.props,icon:Ke,title:je.hint,onClick:this._handleClick})}}Xe.contextType=Je;var $e=a(25760),et=a(59199),tt=a(68587),at=a(49473);const nt="M21.5 21.5h-14a5 5 0 1 1 .42-9.983 7.5 7.5 0 0 1 14.57 2.106 4.002 4.002 0 0 1-.99 7.877z",it=13.08991081237793,st={strokeDashOffset:49.242997817993164,strokeDash:49.866326904296876,strokeGap:it,strokeDashCheck:0},ot={strokeDashOffset:62.956237716674806,strokeGap:0,strokeDash:62.956237716674806,strokeDashCheck:200};class lt extends i.PureComponent{constructor(e){super(e),this.state=st}componentDidMount(){"saved"===this.props.state?this.setState(ot):this._goToNextState(this.props.state)}componentWillUnmount(){this._currentAnimation=void 0}UNSAFE_componentWillReceiveProps(e){this.props.state!==e.state&&this._goToNextState(e.state)}render(){const{strokeDashOffset:e,strokeDash:t,strokeGap:a,strokeDashCheck:n}=this.state,{className:s,size:o,onClick:l,state:r,isHovered:c=!1}=this.props,h=v(at.container,s,c&&at.hovered,{[at.unsaved]:"unsaved"===r,[at.saving]:"saving"===r,[at.saved]:"saved"===r});return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:h,version:"1.1",width:o,height:o,viewBox:"0 0 28 28",onClick:l},i.createElement("g",{fill:"none"},i.createElement("path",{className:at.dottedCloud,stroke:"currentColor",strokeDasharray:"3.5,2.5",d:nt}),i.createElement("path",{className:at.spinningCloud,stroke:"currentColor",strokeDasharray:`${t} ${a}`,strokeDashoffset:e,d:nt}),i.createElement("path",{className:at.arrowGap,d:"M11 20h6v5h-6z"}),i.createElement("g",{className:at.arrow,stroke:"currentColor"},i.createElement("path",{
strokeLinecap:"square",d:"M14.5 14.5v10"}),i.createElement("path",{d:"M11 17l3.5-3.5L18 17"})),i.createElement("g",{className:at.check,stroke:"currentColor"},i.createElement("path",{strokeDasharray:`${n}% ${200-n}%`,d:"M10 15l2.5 2.5L18 12"}))))}_goToNextState(e){switch(e){case"unsaved":this.setState(st);break;case"saving":"unsaved"!==this.props.state&&this.setState(st),this._currentAnimation=Promise.resolve(this._currentAnimation).then(()=>this._createSpinAnimationWhile(()=>"saving"===this.props.state));break;case"saved":this._currentAnimation=Promise.resolve(this._currentAnimation).then(this._createFillGapAnimation.bind(this)).then(this._createCheckAnimation.bind(this))}}_createSpinAnimationWhile(e){return this._createSpinAnimation().then(()=>e()?this._createSpinAnimationWhile(e):Promise.resolve())}_createSpinAnimation(){return new Promise(e=>{(0,et.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashOffset:t})},onComplete:()=>e(),from:49.242997817993164,to:111.57590644836426,easing:tt.easingFunc.linear,duration:1e3})})}_createCheckAnimation(){return new Promise(e=>{(0,et.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashCheck:Math.round(t)})},onComplete:()=>e(),from:0,to:200,easing:tt.easingFunc.linear,duration:1e3})})}_createFillGapAnimation(){return new Promise(e=>{(0,et.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashOffset:62.956237716674806-t,strokeGap:t,strokeDash:62.956237716674806-t})},onComplete:()=>e(),from:it,to:0,easing:tt.easingFunc.linear,duration:200})})}}var rt=a(40173),ct=a(84096),ht=a(28857);(0,rt.mergeThemes)(ct.DEFAULT_MENU_ITEM_SWITCHER_THEME,ht);var dt=a(82724),ut=a(16788),mt=a(96141),vt=a(4050);a(31405);const pt=n.enabled("widget"),gt=(0,rt.mergeThemes)(S.DEFAULT_TOOL_WIDGET_BUTTON_THEME,vt),bt=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{shortcut:mt.shortcut}),St={copy:(0,o.t)("Copy"),makeCopy:(0,o.t)("Make a Copy"),newChartLayout:(0,o.t)("New Chart Layout"),loadChartLayout:(0,dt.appendEllipsis)((0,o.t)("Load Chart Layout")),rename:(0,dt.appendEllipsis)((0,o.t)("Rename")),renameChartLayout:(0,o.t)("Rename Chart Layout"),saveAs:(0,dt.appendEllipsis)((0,o.t)("Make a Copy")),saveChartLayout:(0,o.t)("Save"),saveChartLayoutLong:(0,o.t)("Save all charts for all symbols and intervals on your layout"),manageChartLayouts:(0,o.t)("Manage Chart Layouts")},Ct=[],_t=(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"S"],text:"{0} + {1}"});class wt extends i.PureComponent{constructor(e){super(e),this._handleSaveHoverBegin=()=>{this.setState({iconHovered:!0})},this._handleSaveHoverEnd=()=>{this.setState({iconHovered:!1})},this._handleCloneClick=()=>{var e,t;null===(t=(e=this.props).onCloneChart)||void 0===t||t.call(e),this._trackClick()},this._handleSaveClick=()=>{var e,t;null===(t=(e=this.props).onSaveChart)||void 0===t||t.call(e),this._trackClick()},this.state={iconHovered:!1}}render(){
const{id:e,isReadOnly:t,displayMode:a,isProcessing:n,title:s,chartId:o,wasChanges:l,hideMenu:r,isTabletSmall:c,dataNameSaveMenu:h}=this.props,{iconHovered:u}=this.state,p=!t&&!r;let g="saved";return!l&&s||(g="unsaved"),n&&(g="saving"),i.createElement(b,null,t?i.createElement(b,null,i.createElement(P,{id:e,displayMode:a,icon:i.createElement(d.Icon,{icon:ut}),isDisabled:n,onClick:this._handleCloneClick,text:St.copy,title:St.makeCopy,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,collapseWhen:Ct})):i.createElement(b,null,i.createElement(P,{id:e,className:v(mt.button,p&&mt.buttonSmallPadding),displayMode:a,icon:i.createElement(lt,{size:28,state:g,isHovered:u}),isDisabled:o&&!l||n,onClick:this._handleSaveClick,text:s||St.saveChartLayout,title:St.saveChartLayoutLong,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,theme:gt,collapseWhen:Ct,"data-tooltip-hotkey":pt?"":_t}),p&&i.createElement(m.ToolWidgetMenu,{"data-name":h,className:"js-save-load-menu-open-button",arrow:!0,isDrawer:c,drawerPosition:"Bottom",title:St.manageChartLayouts,onClick:this._trackClick},this._renderMenuItems(Boolean(c)))))}_renderMenuItems(e){const{wasChanges:t,isProcessing:a,chartId:n,onSaveChartFromMenu:s,onRenameChart:l,onSaveAsChart:r,onLoadChart:c,onNewChart:h,isAutoSaveEnabled:d,autoSaveId:m,sharingId:p,onAutoSaveChanged:g,isSharingEnabled:b,onSharingChanged:S}=this.props,C=e?M.multilineLabelWithIconAndToolboxTheme:bt,_=e?void 0:(0,Z.humanReadableHash)(Z.Modifiers.Mod+83),w=e?void 0:(0,o.t)("Dot",{context:"hotkey"}),f=[];return f.push(i.createElement(u.PopupMenuItem,{key:"save",isDisabled:Boolean(a||!t&&n),label:St.saveChartLayout,onClick:s,shortcut:_,labelRowClassName:v(e&&mt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-save"})),void 0!==n&&(e||f.push(i.createElement(y.PopupMenuSeparator,{key:"existing-chart-section-begin"})),f.push(i.createElement(u.PopupMenuItem,{key:"rename",label:St.rename,onClick:l,labelRowClassName:v(e&&mt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-rename"}),i.createElement(u.PopupMenuItem,{key:"save-as",label:St.saveAs,onClick:r,labelRowClassName:v(e&&mt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-clone"}))),f.push(i.createElement(y.PopupMenuSeparator,{key:"platform-section-begin"})),f.push(i.createElement(u.PopupMenuItem,{key:"load-chart",className:"js-save-load-menu-item-load-chart",label:St.loadChartLayout,onClick:c,labelRowClassName:v(e&&mt.popupItemRowTabletSmall),theme:C,shortcut:w,"data-name":"save-load-menu-item-load"})),f}_trackClick(){0}}const yt=(0,E.registryContextType)();class ft extends i.PureComponent{constructor(e,t){super(e,t),this._syncState=e=>{this.setState(e)},this._onChangeHasChanges=e=>{this.state.wasChanges!==e&&this.setState({wasChanges:e})},this._onChangeAutoSaveEnabled=e=>{0},this._onChangeSharingEnabled=e=>{this.setState({isSharingEnabled:e})},this._onChangeTitle=e=>{this.setState({title:e})},this._onChangeId=e=>{this.setState({id:e})},this._onChartAboutToBeSaved=()=>{
this.setState({isProcessing:!0})},this._onChartSaved=()=>{this.setState({isProcessing:!1})},this._handleAutoSaveEnabled=e=>{0},this._handleSharingEnabled=e=>{0},this._handleClickSave=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save click")},this._handleClickSaveFromMenu=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save From Menu")},this._handleClickClone=()=>{this.context.saveChartService.cloneChart()},this._handleClickSaveAs=()=>{this.context.saveChartService.saveChartAs(),this._trackEvent("Make a copy")},this._handleClickNew=()=>{this._trackEvent("New chart layout")},this._handleClickLoad=()=>{this.context.loadChartService.showLoadDialog(),this._trackEvent("Load chart layout")},this._handleHotkey=()=>{this.context.loadChartService.showLoadDialog()},this._handleClickRename=()=>{this.context.saveChartService.renameChart(),this._trackEvent("Rename")},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,chartChangesWatcher:s.any.isRequired,saveChartService:s.any.isRequired,sharingChartService:s.any,loadChartService:s.any.isRequired});const{chartWidgetCollection:a,chartChangesWatcher:n,saveChartService:i,sharingChartService:o}=t;this.state={isAuthenticated:window.is_authenticated,isProcessing:!1,id:a.metaInfo.id.value(),title:a.metaInfo.name.value(),wasChanges:n.hasChanges(),iconHovered:!1}}componentDidMount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:n,chartChangesWatcher:i,saveChartService:s,sharingChartService:l}=this.context;t?a.on("change",this._syncState):(i.getOnChange().subscribe(this,this._onChangeHasChanges),n.metaInfo.name.subscribe(this._onChangeTitle),n.metaInfo.id.subscribe(this._onChangeId),this._hotkeys=(0,$e.createGroup)({desc:"Save/Load"}),this._hotkeys.add({desc:(0,o.t)("Load Chart Layout"),handler:this._handleHotkey,hotkey:190}),e.chartSaved().subscribe(this,this._onChartSaved),e.chartAboutToBeSaved().subscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.subscribe(this,this._onLoginStateChange))}componentDidUpdate(e,t){this.props.isFake||t!==this.state&&this.props.stateSyncEmitter.emit("change",this.state)}componentWillUnmount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:n,chartChangesWatcher:i,saveChartService:s,sharingChartService:o}=this.context;t?a.off("change",this._syncState):(i.getOnChange().unsubscribe(this,this._onChangeHasChanges),n.metaInfo.name.unsubscribe(this._onChangeTitle),n.metaInfo.id.unsubscribe(this._onChangeId),(0,X.ensureDefined)(this._hotkeys).destroy(),e.chartSaved().unsubscribe(this,this._onChartSaved),e.chartAboutToBeSaved().unsubscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.unsubscribe(this,this._onLoginStateChange))}render(){const{isReadOnly:e,displayMode:t,id:a,isFake:n}=this.props,{isProcessing:s,isAuthenticated:o,title:l,id:r,wasChanges:c,isAutoSaveEnabled:h,isSharingEnabled:d}=this.state,u={displayMode:t,isReadOnly:e,isAuthenticated:o,isProcessing:s,wasChanges:c,title:l,
id:a,chartId:null!==r?r:void 0,dataNameSaveMenu:n?void 0:"save-load-menu",onCloneChart:this._handleClickClone,onSaveChart:this._handleClickSave,onSaveChartFromMenu:this._handleClickSaveFromMenu,onRenameChart:this._handleClickRename,onSaveAsChart:this._handleClickSaveAs,onLoadChart:this._handleClickLoad};return i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>i.createElement(wt,{...u,isTabletSmall:e}))}_onLoginStateChange(){this.setState({isAuthenticated:window.is_authenticated})}_trackEvent(e){0}}ft.contextType=yt;var kt=a(20301),Mt=a(95792),Et=a(82029);const Tt=new Mt.DateTimeFormatter({dateTimeSeparator:"_",timeFormat:"%h-%m-%s"}),xt={takeSnapshot:(0,o.t)("Take a snapshot")},It=(0,E.registryContextType)();const At=o.t("Loading...");function Rt(e,t,a){return async function(e,t,a){const n=URL.createObjectURL(new Blob([`<!doctype html><html style="background-color:${getComputedStyle(document.documentElement).backgroundColor}"><head><meta charset="utf-8"><title>${At}</title></head><body style="background-color:${getComputedStyle(document.body).backgroundColor}"></body></html>`],{type:"text/html"}));try{const i=open(n,t,a);if(!i)throw new Error("cound not open a new tab");const s=await e.catch(()=>{});void 0!==s?i.location.replace(s):i.close()}finally{URL.revokeObjectURL(n)}}(e,t,a)}var Nt=a(65446),Ft=a(58455),Ht=a(91887);function zt(e){const t=v(e.isLoading&&Ht.hidden),a=v(!e.isLoading&&Ht.hidden);return i.createElement("div",null,i.createElement("span",{className:t},e.children),i.createElement("span",{className:a},i.createElement(ne.Loader,null)))}var Pt=a(76974),Dt=a(60498),Lt=a(17191),Wt=a(37402),Ot=a(50377),Ut=a(86149),Bt=a(75492);const Vt=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,Bt);function Gt(e){const{serverSnapshot:t,clientSnapshot:n}=e,[s,l]=(0,i.useState)(!1),[r,c]=(0,i.useState)(!1),[h,d]=(0,i.useState)(!1),m=(0,Pt.useIsMounted)(),p=(0,i.useCallback)(async()=>{var e;const t=n(),a=t.then(e=>new Promise(t=>e.canvas.toBlob(e=>{null!==e&&t(e)})));try{await(0,Nt.writePromiseUsingApi)(a,"image/png"),le.emit("onClientScreenshotCopiedToClipboard")}catch(a){const{canvas:n}=await t;null===(e=window.open())||void 0===e||e.document.write(`<img width="100%" src="${n.toDataURL()}"/>`)}},[n]),g=(0,i.useCallback)(async()=>{const e=await n(),t=await function(e){return new Promise(t=>{try{e.canvas.toBlob(e=>{if(null===e)throw new Error("Unable to generate blob");t(URL.createObjectURL(e))})}catch(a){t(e.canvas.toDataURL())}})}(e);t&&(0,Ft.downloadFile)(e.name+".png",t)},[n]),b=e=>Rt(e.then(e=>e.imageUrl)),S=(0,i.useCallback)(async(e=!1)=>{const a=t();try{if(e)await b(a);else{const e=a.then(e=>new Blob([e.imageUrl],{type:"text/plain"}));await(0,Nt.writePromiseUsingApi)(e,"text/plain"),le.emit("onServerScreenshotCopiedToClipboard")}return!0}catch(e){return b(a),!0}finally{m.current&&(c(!1),l(!1),(0,ze.globalCloseMenu)())}},[t]),C=(0,i.useCallback)(async()=>{d(!0);const[e,n]=await Promise.all([a.e(4665).then(a.bind(a,2679)),t()]);e.Twitter.shareSnapshotInstantly(n.symbol,n.imageUrl),
m.current&&(d(!1),(0,ze.globalCloseMenu)())},[t]);return i.createElement(i.Fragment,null,i.createElement(u.PopupMenuItem,{"data-name":"save-chart-image",label:(0,o.t)("Save chart image"),icon:Wt,onClick:g,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Mod+Z.Modifiers.Alt+83),theme:Vt}),i.createElement(u.PopupMenuItem,{"data-name":"copy-chart-image",label:(0,o.t)("Copy chart image"),icon:Lt,onClick:p,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Mod+Z.Modifiers.Shift+83),theme:Vt}),i.createElement(u.PopupMenuItem,{"data-name":"copy-link-to-the-chart-image",label:i.createElement(zt,{isLoading:s},(0,o.t)("Copy link to the chart image")),icon:Ot,onClick:()=>{l(!0),S(!1)},dontClosePopup:!0,isDisabled:s,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Alt+83),className:v(s&&Bt.loading),theme:Vt}),i.createElement(u.PopupMenuItem,{"data-name":"open-image-in-new-tab",label:i.createElement(zt,{isLoading:r},(0,o.t)("Open image in new tab")),icon:Ut,onClick:()=>{c(!0),S(!0)},dontClosePopup:!0,isDisabled:r,className:v(r&&Bt.loading),theme:Vt}),i.createElement(u.PopupMenuItem,{"data-name":"tweet-chart-image",label:i.createElement(zt,{isLoading:h},(0,o.t)("Tweet chart image")),icon:Dt,onClick:C,dontClosePopup:!0,isDisabled:h,className:v(h&&Bt.loading),theme:Vt}))}var Zt=a(84015);function Yt(e){const[t,a]=(0,i.useState)(!1),n=(0,Pt.useIsMounted)(),s=(0,i.useCallback)(async()=>{a(!0),await e.serverSnapshot(),n.current&&a(!1)},[e.serverSnapshot]);return i.createElement(S.ToolWidgetButton,{id:e.id,className:e.className,isDisabled:t,onClick:s,title:e.tooltip,icon:e.icon})}var Qt=a(62346);const qt=(Kt=function(e){return(0,Zt.isOnMobileAppPage)("any")?i.createElement(Yt,{...e,icon:Qt}):i.createElement(m.ToolWidgetMenu,{content:i.createElement(S.ToolWidgetButton,{id:e.id,className:e.className,title:e.tooltip,icon:Qt}),drawerPosition:"Bottom",drawerBreakpoint:k.DialogBreakpoints.TabletSmall,arrow:!1,onClick:function(){}},i.createElement(Gt,{...e}))},(jt=class extends i.PureComponent{constructor(e,t){super(e,t),this._clientSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol();return{canvas:await this.context.chartWidgetCollection.clientSnapshot(),name:`${(0,Et.shortName)(e)}_${Tt.formatLocal(new Date)}`}},this._serverSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol(),t=await this.context.chartWidgetCollection.takeScreenshot(),a=n.enabled("charting_library_base")&&void 0!==this.context.snapshotUrl?t:(0,kt.convertImageNameToUrl)(t);return{symbol:(0,Et.shortName)(e),imageUrl:a}},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return i.createElement(Kt,{id:t,className:e,tooltip:xt.takeSnapshot,serverSnapshot:this._serverSnapshot,clientSnapshot:this._clientSnapshot})}}).contextType=It,jt);var Kt,jt,Jt=a(38318),Xt=a(39362),$t=a(11181);class ea{async show(e){if(null!==ea._provider){const e=await ea._provider.getSymbol()
;return l.linking.symbol.setValue(e.symbol),e}if(ea._currentShowingInstance)throw new DOMException("SymbolSearchUI is already shown","InvalidStateError");try{ea._currentShowingInstance=this,ea.preload();const t=await ea._implementation;return(0,X.assert)(null!==t),new Promise(a=>{t.showDefaultSearchDialog({...e,onSearchComplete:e=>{a({symbol:e})}})})}finally{ea._currentShowingInstance=null}}static setProvider(e){this._provider=e}static preload(){null===this._provider&&null===this._implementation&&(this._implementation=(0,$t.loadNewSymbolSearch)())}}ea._currentShowingInstance=null,ea._provider=null,ea._implementation=null;var ta=a(67397),aa=a(72597);const na=(0,rt.mergeThemes)(S.DEFAULT_TOOL_WIDGET_BUTTON_THEME,ta);(0,rt.mergeThemes)(na,aa);class ia extends i.PureComponent{constructor(e){super(e),this._openSymbolSearchDialog=async e=>{if((0,Z.modifiersFromEvent)(e)!==Z.Modifiers.Alt)try{(0,D.trackEvent)("GUI","SS","main search"),await(new ea).show({defaultValue:this._isSpread(this.state.symbol)?this.state.symbol:this.state.shortName,showSpreadActions:(0,Jt.canShowSpreadActions)()&&this.props.isActionsVisible,source:"searchBar",footer:Ee.mobiletouch?void 0:i.createElement(Xt.SymbolSearchDialogFooter,null,(0,o.t)("Simply start typing while on the chart to pull up this search box"))})}catch(e){}else navigator.clipboard.writeText(this.state.symbol)},this._isSpread=e=>!1,this._onSymbolChanged=()=>{const e=l.linking.symbol.value();this.setState({symbol:e,shortName:sa()})},this.state={symbol:l.linking.symbol.value(),shortName:sa()}}componentDidMount(){l.linking.symbol.subscribe(this._onSymbolChanged),l.linking.seriesShortSymbol.subscribe(this._onSymbolChanged),ea.preload()}componentWillUnmount(){l.linking.symbol.unsubscribe(this._onSymbolChanged),l.linking.seriesShortSymbol.unsubscribe(this._onSymbolChanged)}render(){const{id:e,className:t}=this.props;return i.createElement(S.ToolWidgetButton,{id:e,className:p()(t,n.enabled("uppercase_instrument_names")&&ta.uppercase,ta.largeLeftPadding),theme:na,icon:void 0,text:this.state.shortName,title:(0,o.t)("Symbol Search"),onClick:this._openSymbolSearchDialog})}async _updateQuotes(e){}}function sa(){return l.linking.seriesShortSymbol.value()||l.linking.symbol.value()||""}var oa=a(52157);class la extends i.PureComponent{constructor(){super(...arguments),this._handleClick=e=>{e.stopPropagation();const{onApply:t,item:a}=this.props;t(a)}}render(){const{className:e,item:t}=this.props;return i.createElement("div",{className:v(e,oa.item,"apply-common-tooltip"),onClick:this._handleClick,title:t.name},i.createElement("div",{className:oa.round},t.name.length>0?t.name[0].toUpperCase():" "))}}var ra=a(23177),ca=a(75668);function ha(e){return i.createElement("div",{className:v(ca.description,e.className)},e.children)}var da=a(14621);const ua=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:da.labelRow,toolbox:da.toolbox,item:da.titleItem}),ma=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:da.labelRow,toolbox:da.toolbox,item:da.titleItemTabletSmall}),va=(0,
rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{item:da.item}),pa=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{item:da.itemTabletSmall});function ga(e){const{item:t,onApply:a,onRemove:n,onFavor:s,favorite:o,isFavoritingAllowed:l,isTabletSmall:r}=e,[c,d]=(0,Me.useHover)(),m=t.meta_info,v=m?(0,ra.descriptionString)(m.indicators):void 0,g=r?ma:ua,b=r?pa:va,S=(0,i.useCallback)(()=>a(t),[a,t]),C=(0,i.useCallback)(()=>n(t),[n,t]),_=(0,i.useCallback)(()=>{s&&s(t)},[s,t]);return i.createElement("div",{...d,className:da.wrap,"data-name":t.name,"data-id":t.id,"data-is-default":Boolean(t.is_default)},i.createElement(u.PopupMenuItem,{theme:g,label:t.name,labelRowClassName:p()(r&&da.itemLabelTabletSmall),isHovered:c,showToolboxOnHover:!o&&!c,onClick:S,toolbox:i.createElement(i.Fragment,null,!t.is_default&&i.createElement(ke.RemoveButton,{key:"remove",hidden:!Ee.touch&&!c,onClick:C}),Boolean(s)&&l&&i.createElement(h.FavoriteButton,{key:"favorite",isFilled:Boolean(o),onClick:_}))}),v&&i.createElement(u.PopupMenuItem,{theme:b,label:i.createElement(ha,{className:p()(da.description,r&&da.descriptionTabletSmall)},v),onClick:S,isHovered:c}))}var ba=a(25382),Sa=a(41939);const Ca=(0,rt.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,Sa),_a={text:(0,dt.appendEllipsis)((0,o.t)("Save Indicator template"))};function wa(e){const{onClick:t,isTabletSmall:a}=e;return i.createElement(u.PopupMenuItem,{theme:Ca,className:Sa.wrap,label:i.createElement("div",{className:Sa.titleWrap},i.createElement("div",{className:p()(Sa.title,a&&Sa.titleTabletSmall)},i.createElement(d.Icon,{className:Sa.icon,icon:ba}),i.createElement("div",{className:Sa.text},_a.text))),onClick:t})}var ya=a(36947),fa=a(64706);const ka=i.createContext(null);var Ma=a(89227);function Ea(e){const{templates:t,favorites:a,onTemplateSave:n,onTemplateRemove:s,onTemplateSelect:o,onTemplateFavorite:l,isTabletSmall:r,isLoading:c}=e,h=(0,i.useMemo)(()=>t.filter(e=>e.is_default),[t]),d=(0,i.useMemo)(()=>t.filter(e=>!e.is_default),[t]),u=(0,i.useMemo)(()=>new Set(a.map(e=>e.name)),[a]),m=(0,i.useContext)(ka),v=(0,i.useContext)(fa.MenuContext),g=(0,ya.useForceUpdate)();(0,i.useEffect)(()=>{if(null!==m){const e={};return m.getOnChange().subscribe(e,()=>{g(),v&&v.update()}),()=>m.getOnChange().unsubscribeAll(e)}return()=>{}},[]);const b=e=>i.createElement(ga,{key:e.name,item:e,isFavoritingAllowed:Boolean(l),favorite:u.has(e.name),onApply:o,onFavor:l,onRemove:s,isTabletSmall:r});return i.createElement("div",{className:p()(Ma.menu,r&&Ma.menuSmallTablet)},i.createElement(wa,{onClick:n,isTabletSmall:r}),c&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(se,null)),!c&&(r?i.createElement(Ta,{defaults:h,customs:d,render:b}):i.createElement(xa,{defaults:h,customs:d,render:b,state:m})))}function Ta(e){const{defaults:t,customs:a,render:n}=e;return i.createElement(i.Fragment,null,a.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(oe.ToolWidgetMenuSummary,{className:Ma.menuItemHeaderTabletSmall},(0,
o.t)("My templates")),a.map(n)),t.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(oe.ToolWidgetMenuSummary,{className:Ma.menuItemHeaderTabletSmall},(0,o.t)("Default templates")),t.map(n)))}function xa(e){const{defaults:t,customs:a,render:n,state:s}=e;return i.createElement(i.Fragment,null,a.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(oe.ToolWidgetMenuSummary,{className:Ma.menuItemHeader},(0,o.t)("My templates")),a.map(n)),a.length>0&&t.length>0&&s&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(Re.CollapsibleSection,{summary:(0,o.t)("Default templates"),open:!s.get().defaultsCollapsed,onStateChange:e=>s.set({defaultsCollapsed:!e})},t.map(n))),0===a.length&&t.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(oe.ToolWidgetMenuSummary,{className:Ma.menuItemHeader},(0,o.t)("Default templates")),t.map(n)))}var Ia=a(52714),Aa=a.n(Ia);class Ra{constructor(e,t){var a,i;this._isFavoriteEnabled=n.enabled("items_favoriting"),this.handleFavorTemplate=e=>{if(!this._isFavoriteEnabled)return;const{name:t}=e;this._isTemplateFavorite(t)?this._removeFavoriteTemplate(t):this._addFavoriteTemplate(t)},this.handleDropdownOpen=()=>{this._setState({isLoading:!0}),this._studyTemplates.invalidate(),this._studyTemplates.refreshStudyTemplateList(()=>this._setState({isLoading:!1}))},this.handleApplyTemplate=e=>{this._studyTemplates.applyTemplate(e.name)},this.handleRemoveTemplate=e=>{this._studyTemplates.deleteStudyTemplate(e.name)},this.handleSaveTemplate=()=>{this._studyTemplates.showSaveAsDialog()},this._studyTemplates=e,this._favoriteStudyTemplatesService=t;const s=(null===(a=this._favoriteStudyTemplatesService)||void 0===a?void 0:a.get())||[],o=this._studyTemplates.list();this._state=new(Aa())({isLoading:!1,studyTemplatesList:o,favorites:s}),this._studyTemplates.getOnChange().subscribe(this,this._handleTemplatesChange),this._studyTemplates.refreshStudyTemplateList(),this._isFavoriteEnabled&&(null===(i=this._favoriteStudyTemplatesService)||void 0===i||i.getOnChange().subscribe(this,this._handleFavoritesChange))}destroy(){var e;this._studyTemplates.getOnChange().unsubscribe(this,this._handleTemplatesChange),this._isFavoriteEnabled&&(null===(e=this._favoriteStudyTemplatesService)||void 0===e||e.getOnChange().unsubscribe(this,this._handleFavoritesChange))}state(){return this._state.readonly()}_setState(e){this._state.setValue({...this._state.value(),...e})}_handleTemplatesChange(){this._setState({studyTemplatesList:this._studyTemplates.list()})}_handleFavoritesChange(e){this._isFavoriteEnabled&&this._setState({favorites:e})}_removeFavoriteTemplate(e){var t;const{favorites:a}=this._state.value();null===(t=this._favoriteStudyTemplatesService)||void 0===t||t.set(a.filter(t=>t!==e))}_addFavoriteTemplate(e){var t;const{favorites:a}=this._state.value();null===(t=this._favoriteStudyTemplatesService)||void 0===t||t.set([...a,e])}
_isTemplateFavorite(e){const{favorites:t}=this._state.value();return t.includes(e)}}var Na=a(36257),Fa=a(73887);const Ha={title:(0,o.t)("Templates"),tooltip:(0,o.t)("Indicator Templates")},za=(0,E.registryContextType)();class Pa extends i.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({...e,isActive:this.state.isActive})},this._handleApplyTemplate=e=>{this._handleClose(),this._model.handleApplyTemplate(e)},this._handleRemoveTemplate=e=>{this._handleClose(),this._model.handleRemoveTemplate(e)},this._handleClose=()=>{this._handleToggleDropdown(!1)},this._handleToggleDropdown=e=>{const{isActive:t}=this.state,a="boolean"==typeof e?e:!t;this.setState({isActive:a})},(0,E.validateRegistry)(t,{favoriteStudyTemplatesService:s.any,studyTemplates:s.any.isRequired,templatesMenuViewStateService:s.any});const{favoriteStudyTemplatesService:a,studyTemplates:n}=t;this._model=new Ra(n,a),this.state={...this._model.state().value(),isActive:!1}}componentDidMount(){this._model.state().subscribe(this._updateState)}componentWillUnmount(){this._model.state().unsubscribe(this._updateState),this._model.destroy()}render(){const{studyTemplatesList:e,favorites:t}=this.state,{isShownQuicks:a,className:n,displayMode:s,id:o}=this.props;return i.createElement(ka.Provider,{value:this.context.templatesMenuViewStateService||null},i.createElement(Da,{id:o,className:n,mode:s,templates:e,favorites:t,onMenuOpen:this._model.handleDropdownOpen,onTemplateFavorite:a?this._model.handleFavorTemplate:void 0,onTemplateSelect:this._handleApplyTemplate,onTemplateRemove:this._handleRemoveTemplate,onTemplateSave:this._model.handleSaveTemplate}))}}function Da(e){const{id:t,className:a,mode:n,favorites:s,templates:o,isMenuOpen:l,onTemplateSelect:r,onTemplateSave:c,onTemplateFavorite:h,onTemplateRemove:d}=e,u=p()(a,Fa.wrap,{[Fa.full]:"full"===n,[Fa.medium]:"medium"===n}),v=o.filter(e=>s.includes(e.name)),g="small"!==n&&h&&v.length>0;return i.createElement(b,{id:t,className:u},i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},t=>i.createElement(m.ToolWidgetMenu,{onOpen:e.onMenuOpen,isDrawer:t,drawerPosition:"Bottom",arrow:!1,content:i.createElement(P,{className:p()(g&&Fa.buttonWithFavorites),displayMode:n,isOpened:l,icon:Na,text:L.hasNewHeaderToolbarStyles?void 0:Ha.title,title:Ha.tooltip,forceInteractive:!0,collapseWhen:L.hasNewHeaderToolbarStyles?["full","medium","small"]:void 0}),onClick:S},i.createElement(Ea,{onTemplateSave:c,onTemplateSelect:r,onTemplateRemove:d,onTemplateFavorite:h,templates:o,favorites:v,isTabletSmall:t}))),g&&i.createElement(La,{favorites:v,onTemplateSelect:function(e){r(e),S()}}));function S(){0}}function La(e){return i.createElement(i.Fragment,null,e.favorites.map((t,a,n)=>i.createElement(la,{key:t.name,item:t,onApply:e.onTemplateSelect,className:p()({[Fa.first]:0===a,[Fa.last]:a===n.length-1})})))}Pa.contextType=za;a(94419);var Wa=a(4039),Oa=a(82559),Ua=a(55576),Ba=a(17717),Va=a(76294);const Ga={undoHint:(0,o.t)("Undo {hint}"),redoHint:(0,o.t)("Redo {hint}")},Za={undoHotKey:(0,
G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"Z"],text:"{0} + {1}"}),redoHotKey:(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"Y"],text:"{0} + {1}"})},Ya=(0,rt.weakComposeClasses)(Ua,Wa,{buttonUndo:"button",buttonRedo:"button"}),Qa=(0,rt.mergeThemes)(Ua,Oa),qa={...Ua,button:Ya.buttonUndo},Ka={...Ua,button:Ya.buttonRedo},ja=(0,E.registryContextType)();class Ja extends i.PureComponent{constructor(e,t){super(e,t),this._batched=null,this._handleClickUndo=()=>{(0,D.trackEvent)("GUI","Undo");const{chartWidgetCollection:e}=this.context;e.undoHistory.undo()},this._handleClickRedo=()=>{(0,D.trackEvent)("GUI","Redo");const{chartWidgetCollection:e}=this.context;e.undoHistory.redo()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state=this._getStateFromUndoHistory()}componentDidMount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().subscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().subscribe(this,this._onChangeStack)}componentWillUnmount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().unsubscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().unsubscribe(this,this._onChangeStack),this._batched=null}render(){const{id:e}=this.props,{isEnabledRedo:t,isEnabledUndo:a,redoStack:n,undoStack:s}=this.state;return i.createElement(b,{id:e},i.createElement(S.ToolWidgetButton,{icon:Ba,isDisabled:!a,onClick:this._handleClickUndo,title:a?Ga.undoHint.format({hint:s}):void 0,"data-tooltip-hotkey":a?Za.undoHotKey:void 0,theme:L.hasNewHeaderToolbarStyles?Qa:qa}),i.createElement(S.ToolWidgetButton,{icon:Va,isDisabled:!t,onClick:this._handleClickRedo,title:t?Ga.redoHint.format({hint:n}):void 0,"data-tooltip-hotkey":t?Za.redoHotKey:void 0,theme:L.hasNewHeaderToolbarStyles?Qa:Ka}))}_onChangeStack(){null===this._batched&&(this._batched=Promise.resolve().then(()=>{if(null===this._batched)return;this._batched=null;const e=this._getStateFromUndoHistory();this.setState(e)}))}_getStateFromUndoHistory(){const{chartWidgetCollection:e}=this.context,t=e.undoHistory.undoStack(),a=e.undoHistory.redoStack(),n=a.head(),i=t.head();return{isEnabledRedo:!a.isEmpty(),isEnabledUndo:!t.isEmpty(),redoStack:n?n.text().translatedText():"",undoStack:i?i.text().translatedText():""}}}Ja.contextType=ja;var Xa=a(87995),$a=a(9837);class en extends i.PureComponent{constructor(){super(...arguments),this._ref=null,this._update=()=>{this.forceUpdate()},this._setRef=e=>{this._ref=e},this._handleMeasure=({width:e})=>{this.props.width.setValue(e)}}componentDidMount(){const{element:e,isFake:t,width:a}=this.props;if(t)a.subscribe(this._update);else{const t=(0,X.ensureNotNull)(this._ref);Xa.findDOMNode(t).appendChild(e)}}componentWillUnmount(){const{width:e,isFake:t}=this.props;t&&e.unsubscribe(this._update)}render(){const{isFake:e=!1,width:t}=this.props;return i.createElement($a,{shouldMeasure:!e,whitelist:["width"],onMeasure:this._handleMeasure},i.createElement(b,{ref:this._setRef,style:e?{
width:t.value()}:void 0,"data-is-custom-header-element":!0}))}}function tn(e){const{displayMode:t,params:a}=e;return i.createElement(m.ToolWidgetMenu,{content:i.createElement(P,{collapseWhen:void 0!==a.icon?void 0:[],displayMode:t,icon:a.icon,text:a.title,title:a.tooltip,"data-name":"dropdown","data-is-custom-header-element":!0}),drawerPosition:"Bottom",drawerBreakpoint:k.DialogBreakpoints.TabletSmall,arrow:!1},a.items.map((e,t)=>i.createElement(u.PopupMenuItem,{key:t,label:e.title,onClick:()=>e.onSelect(),"data-name":"dropdown-item"})))}var an=a(33191);function nn(e){const{className:t,...a}=e;return i.createElement(P,{...a,className:v(t,an.customTradingViewStyleButton,an.withoutIcon),collapseWhen:[],"data-name":"custom-tradingview-styled-button"})}function sn(){return{Bars:n.enabled("header_chart_type")?F:void 0,Compare:n.enabled("header_compare")?B:void 0,Custom:en,CustomTradingViewStyledButton:nn,Fullscreen:n.enabled("header_fullscreen_button")?J:void 0,Indicators:n.enabled("header_indicators")?me:void 0,Intervals:n.enabled("header_resolutions")?Ve:void 0,OpenPopup:qe,Properties:n.enabled("header_settings")&&n.enabled("show_chart_property_page")?Xe:void 0,SaveLoad:n.enabled("header_saveload")?ft:void 0,Screenshot:n.enabled("header_screenshot")?qt:void 0,SymbolSearch:n.enabled("header_symbol_search")?ia:void 0,Templates:n.enabled("study_templates")?Pa:void 0,Dropdown:tn,UndoRedo:n.enabled("header_undo_redo")?Ja:void 0,Layout:void 0}}},23177:(e,t,a)=>{"use strict";a.d(t,{createStudyTemplateMetaInfo:()=>i,descriptionString:()=>s});var n=a(81851);function i(e,t){return{indicators:e.orderedDataSources(!0).filter(e=>(0,n.isStudy)(e)&&!0).map(e=>({id:e.metaInfo().id,description:e.title(!0,void 0,!0)})),interval:t}}function s(e){const t=new Map;return e.forEach(e=>{const[a,n]=t.get(e.id)||[e.description,0];t.set(e.id,[a,n+1])}),Array.from(t.values()).map(([e,t])=>`${e}${t>1?" x "+t:""}`).join(", ")}},55402:(e,t,a)=>{"use strict";a.d(t,{validateRegistry:()=>l,RegistryProvider:()=>r,registryContextType:()=>c});var n=a(59496),i=a(19036),s=a.n(i);const o=n.createContext({});function l(e,t){s().checkPropTypes(t,e,"context","RegistryContext")}function r(e){const{validation:t,value:a}=e;return l(a,t),n.createElement(o.Provider,{value:a},e.children)}function c(){return o}},37466:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SERIES_ICONS:()=>u});var n=a(8774),i=a(9322),s=a(14409),o=a(97567),l=a(84051),r=a(21610),c=a(65316),h=a(35361),d=a(92628);const u={3:n,0:i,1:s,8:o,9:l,2:r,10:c,12:h,13:d}},20301:(e,t,a)=>{"use strict";a.d(t,{convertImageNameToUrl:()=>s});var n=a(67337),i=a(76861);function s(e){return n.enabled("charting_library_base")||(0,i.isProd)()?"https://www.tradingview.com/x/"+e+"/":window.location.protocol+"//"+window.location.host+"/x/"+e+"/"}},58455:(e,t,a)=>{"use strict";function n(e,t){const a=document.createElement("a");a.style.display="none",a.href=t,a.download=e,a.click()}a.d(t,{downloadFile:()=>n})},24437:(e,t,a)=>{"use strict";a.d(t,{DialogBreakpoints:()=>i});var n=a(96746);const i={
SmallHeight:n["small-height-breakpoint"],TabletSmall:n["tablet-small-breakpoint"],TabletNormal:n["tablet-normal-breakpoint"]}},39362:(e,t,a)=>{"use strict";a.d(t,{SymbolSearchDialogFooter:()=>l});var n=a(59496),i=a(97754),s=a.n(i),o=a(72142);function l(e){const{className:t,children:a}=e;return n.createElement("div",{className:s()(o.footer,t)},a)}},36189:(e,t,a)=>{"use strict";a.d(t,{FavoriteButton:()=>d});var n=a(28353),i=a(59496),s=a(97754),o=a(9745),l=a(20614),r=a(55783),c=a(16842);const h={add:(0,n.t)("Add to favorites"),remove:(0,n.t)("Remove from favorites")};function d(e){const{className:t,isFilled:a,isActive:n,onClick:d,...u}=e;return i.createElement(o.Icon,{...u,className:s(c.favorite,"apply-common-tooltip",a&&c.checked,n&&c.active,t),icon:a?l:r,onClick:d,title:a?h.remove:h.add})}},36947:(e,t,a)=>{"use strict";a.d(t,{useForceUpdate:()=>i});var n=a(59496);const i=()=>{const[,e]=(0,n.useReducer)((e,t)=>e+1,0);return e}},70412:(e,t,a)=>{"use strict";a.d(t,{hoverMouseEventFilter:()=>s,useAccurateHover:()=>o,useHover:()=>i});var n=a(59496);function i(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseOver:function(e){s(e)&&t(!0)},onMouseOut:function(e){s(e)&&t(!1)}}]}function s(e){return!e.currentTarget.contains(e.relatedTarget)}function o(e){const[t,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const t=t=>{if(null===e.current)return;const n=e.current.contains(t.target);a(n)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)},[]),t}},81332:(e,t,a)=>{"use strict";a.d(t,{multilineLabelWithIconAndToolboxTheme:()=>o});var n=a(40173),i=a(23576),s=a(63095);const o=(0,n.mergeThemes)(i,s)},51613:(e,t,a)=>{"use strict";a.d(t,{PopupMenuSeparator:()=>l});var n=a(59496),i=a(97754),s=a.n(i),o=a(524);function l(e){const{size:t="normal",className:a}=e;return n.createElement("div",{className:s()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"===t&&o.large,a)})}},96040:(e,t,a)=>{"use strict";a.d(t,{RemoveButton:()=>h});var n=a(28353),i=a(59496),s=a(97754),o=a(9745),l=a(73366),r=a(73432);const c={remove:(0,n.t)("Remove")};function h(e){const{className:t,isActive:a,onClick:n,onMouseDown:h,title:d,hidden:u,"data-name":m="remove-button",...v}=e;return i.createElement(o.Icon,{...v,"data-name":m,className:s(r.button,"apply-common-tooltip",a&&r.active,u&&r.hidden,t),icon:l,onClick:n,onMouseDown:h,title:d||c.remove})}},40173:(e,t,a)=>{"use strict";function n(e,t,a={}){const n=Object.assign({},t);for(const i of Object.keys(t)){const s=a[i]||i;s in e&&(n[i]=[e[s],t[i]].join(" "))}return n}function i(e,t,a={}){return Object.assign({},e,n(e,t,a))}a.d(t,{weakComposeClasses:()=>n,mergeThemes:()=>i})},15392:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5V11h1V8.5C7 7.67 7.67 7 8.5 7H11V6H8.5zM6 17v2.5A2.5 2.5 0 0 0 8.5 22H11v-1H8.5A1.5 1.5 0 0 1 7 19.5V17H6zM19.5 7H17V6h2.5A2.5 2.5 0 0 1 22 8.5V11h-1V8.5c0-.83-.67-1.5-1.5-1.5zM22 19.5V17h-1v2.5c0 .83-.67 1.5-1.5 1.5H17v1h2.5a2.5 2.5 0 0 0 2.5-2.5z"/></svg>'},86149:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5v11A2.5 2.5 0 0 0 8.5 22h11a2.5 2.5 0 0 0 2.5-2.5v-3h-1v3c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 19.5v-11C7 7.67 7.67 7 8.5 7h3V6h-3zm7 1h4.8l-7.49 7.48.71.7L21 7.72v4.79h1V6h-6.5v1z"/></svg>'},8774:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M12.5 17.207L18.707 11h2l3.647-3.646-.708-.708L20.293 10h-2L12.5 15.793l-3-3-4.854 4.853.708.708L9.5 14.207z"/><path d="M9 16h1v1H9zm1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-3-3h1v1H8zm-1 1h1v1H7zm-1 1h1v1H6zm2 0h1v1H8zm-1 1h1v1H7zm-2 0h1v1H5zm17-9h1v1h-1zm1-1h1v1h-1zm0 2h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-5-7h1v1h-1zm2 0h1v1h-1zm1-1h1v1h-1zm-2 2h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-2-6h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-3-3h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1z"/></svg>'},9322:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor" stroke-linecap="square"><path d="M10.5 7.5v15M7.5 20.5H10M13.5 11.5H11M19.5 6.5v15M16.5 9.5H19M22.5 16.5H20"/></g></svg>'},65316:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor"><path stroke-dasharray="1,1" d="M4 14.5h22"/><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 12.5l2-4 1 2 2-4 3 6"/><path stroke-linecap="round" d="M5.5 16.5l-1 2"/><path stroke-linecap="round" stroke-linejoin="round" d="M17.5 16.5l2 4 2-4m2-4l1-2-1 2z"/></g></svg>'},14409:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v12h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v3.5h-1zm0 16.5h1V24h-1z"/></svg>'},25382:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none"><path stroke="currentColor" d="M11 20.5H7.5a5 5 0 1 1 .42-9.98 7.5 7.5 0 0 1 14.57 2.1 4 4 0 0 1-1 7.877H18"/><path stroke="currentColor" d="M14.5 24V12.5M11 16l3.5-3.5L18 16"/></g></svg>'},92628:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M12 7v14h5V7h-5Zm4 1h-3v12h3V8ZM19 15v6h5v-6h-5Zm4 1h-3v4h3v-4ZM5 12h5v9H5v-9Zm1 1h3v7H6v-7Z"/></svg>'},2323:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.5 6a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM4 14.5a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0z"/><path fill="currentColor" d="M9 14h4v-4h1v4h4v1h-4v4h-1v-4H9v-1z"/></svg>'},90711:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path d="M21 7v4h1V6h-5v1z"/><path d="M16.854 11.854l5-5-.708-.708-5 5zM7 7v4H6V6h5v1z"/><path d="M11.146 11.854l-5-5 .708-.708 5 5zM21 21v-4h1v5h-5v-1z"/><path d="M16.854 16.146l5 5-.708.708-5-5z"/><g><path d="M7 21v-4H6v5h5v-1z"/><path d="M11.146 16.146l-5 5 .708.708 5-5z"/></g></g></svg>'},97567:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M9 8v12h3V8H9zm-1-.502C8 7.223 8.215 7 8.498 7h4.004c.275 0 .498.22.498.498v13.004a.493.493 0 0 1-.498.498H8.498A.496.496 0 0 1 8 20.502V7.498z"/><path d="M10 4h1v3.5h-1z"/><path d="M17 6v6h3V6h-3zm-1-.5c0-.276.215-.5.498-.5h4.004c.275 0 .498.23.498.5v7c0 .276-.215.5-.498.5h-4.004a.503.503 0 0 1-.498-.5v-7z"/><path d="M18 2h1v3.5h-1z"/></svg>'},35361:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7.5 7H7v14h5V7H7.5zM8 20V8h3v12H8zm7.5-11H15v10h5V9h-4.5zm.5 9v-8h3v8h-3z"/></svg>'},84051:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v11h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-12a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v5h-1zm0 14h1v5h-1zM8.5 9H10v1H8.5zM11 9h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11z"/></svg>'},60373:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M20 17l-5 5M15 17l5 5M9 11.5h7M17.5 8a2.5 2.5 0 0 0-5 0v11a2.5 2.5 0 0 1-5 0"/></svg>'},21610:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M11.982 16.689L17.192 12h3.033l4.149-4.668-.748-.664L19.776 11h-2.968l-4.79 4.311L9 12.293l-4.354 4.353.708.708L9 13.707z"/></svg>'},74034:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" width="21" height="21"><g fill="none" stroke="currentColor"><path d="M18.5 11v5.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2H9"/><path stroke-linecap="square" d="M18 2l-8.5 8.5m4-9h5v5"/></g></svg>'},28289:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor" fill-rule="evenodd"><path fill-rule="nonzero" d="M14 17a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-1a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/><path d="M5.005 16A1.003 1.003 0 0 1 4 14.992v-1.984A.998.998 0 0 1 5 12h1.252a7.87 7.87 0 0 1 .853-2.06l-.919-.925c-.356-.397-.348-1 .03-1.379l1.42-1.42a1 1 0 0 1 1.416.007l.889.882A7.96 7.96 0 0 1 12 6.253V5c0-.514.46-1 1-1h2c.557 0 1 .44 1 1v1.253a7.96 7.96 0 0 1 2.06.852l.888-.882a1 1 0 0 1 1.416-.006l1.42 1.42a.999.999 0 0 1 .029 1.377s-.4.406-.918.926a7.87 7.87 0 0 1 .853 2.06H23c.557 0 1 .447 1 1.008v1.984A.998.998 0 0 1 23 16h-1.252a7.87 7.87 0 0 1-.853 2.06l.882.888a1 1 0 0 1 .006 1.416l-1.42 1.42a1 1 0 0 1-1.415-.007l-.889-.882a7.96 7.96 0 0 1-2.059.852v1.248c0 .56-.45 1.005-1.008 1.005h-1.984A1.004 1.004 0 0 1 12 22.995v-1.248a7.96 7.96 0 0 1-2.06-.852l-.888.882a1 1 0 0 1-1.416.006l-1.42-1.42a1 1 0 0 1 .007-1.415l.882-.888A7.87 7.87 0 0 1 6.252 16H5.005zm3.378-6.193l-.227.34A6.884 6.884 0 0 0 7.14 12.6l-.082.4H5.005C5.002 13 5 13.664 5 14.992c0 .005.686.008 2.058.008l.082.4c.18.883.52 1.71 1.016 2.453l.227.34-1.45 1.46c-.004.003.466.477 1.41 1.422l1.464-1.458.34.227a6.959 6.959 0 0 0 2.454 1.016l.399.083v2.052c0 .003.664.005 1.992.005.005 0 .008-.686.008-2.057l.399-.083a6.959 6.959 0 0 0 2.454-1.016l.34-.227 1.46 1.45c.003.004.477-.466 1.422-1.41l-1.458-1.464.227-.34A6.884 6.884 0 0 0 20.86 15.4l.082-.4h2.053c.003 0 .005-.664.005-1.992 0-.005-.686-.008-2.058-.008l-.082-.4a6.884 6.884 0 0 0-1.016-2.453l-.227-.34 1.376-1.384.081-.082-1.416-1.416-1.465 1.458-.34-.227a6.959 6.959 0 0 0-2.454-1.016L15 7.057V5c0-.003-.664-.003-1.992 0-.005 0-.008.686-.008 2.057l-.399.083a6.959 6.959 0 0 0-2.454 1.016l-.34.227-1.46-1.45c-.003-.004-.477.466-1.421 1.408l1.457 1.466z"/></g></svg>'},76294:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M18.293 13l-2.647 2.646.707.708 3.854-3.854-3.854-3.854-.707.708L18.293 12H12.5A5.5 5.5 0 0 0 7 17.5V19h1v-1.5a4.5 4.5 0 0 1 4.5-4.5h5.793z"/></svg>'},62346:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.118 6a.5.5 0 0 0-.447.276L9.809 8H5.5A1.5 1.5 0 0 0 4 9.5v10A1.5 1.5 0 0 0 5.5 21h16a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 21.5 8h-4.309l-.862-1.724A.5.5 0 0 0 15.882 6h-4.764zm-1.342-.17A1.5 1.5 0 0 1 11.118 5h4.764a1.5 1.5 0 0 1 1.342.83L17.809 7H21.5A2.5 2.5 0 0 1 24 9.5v10a2.5 2.5 0 0 1-2.5 2.5h-16A2.5 2.5 0 0 1 3 19.5v-10A2.5 2.5 0 0 1 5.5 7h3.691l.585-1.17z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 18a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zm0 1a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9z"/></svg>'},36257:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M8 7h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM6 8c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V8zm11-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2V8zm-4 8H8a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm-3-1a2 2 0 0 0-2 2v3c0 1.1.9 2 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H8zm9 1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-3z"/></svg>'},17717:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.707 13l2.647 2.646-.707.708L6.792 12.5l3.853-3.854.708.708L8.707 12H14.5a5.5 5.5 0 0 1 5.5 5.5V19h-1v-1.5a4.5 4.5 0 0 0-4.5-4.5H8.707z"/></svg>'},73366:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path fill="currentColor" d="M9.707 9l4.647-4.646-.707-.708L9 8.293 4.354 3.646l-.708.708L8.293 9l-4.647 4.646.708.708L9 9.707l4.646 4.647.708-.707L9.707 9z"/></svg>'},16788:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"/></svg>'},37402:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M6.5 16v4.5a1 1 0 001 1h14a1 1 0 001-1V16M14.5 5V17m-4-3.5l4 4l4-4"/></svg>'},20614:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" d="M9 1l2.35 4.76 5.26.77-3.8 3.7.9 5.24L9 13l-4.7 2.47.9-5.23-3.8-3.71 5.25-.77L9 1z"/></svg>'},55783:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M9 2.13l1.903 3.855.116.236.26.038 4.255.618-3.079 3.001-.188.184.044.259.727 4.237-3.805-2L9 12.434l-.233.122-3.805 2.001.727-4.237.044-.26-.188-.183-3.079-3.001 4.255-.618.26-.038.116-.236L9 2.13z"/></svg>'},50377:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M19 15l2.5-2.5c1-1 1.5-3.5-.5-5.5s-4.5-1.5-5.5-.5L13 9M10 12l-2.5 2.5c-1 1-1.5 3.5.5 5.5s4.5 1.5 5.5.5L16 18M17 11l-5 5"/></svg>'},60498:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="#1DA1F2" d="M10.28 22.26c7.55 0 11.68-6.26 11.68-11.67v-.53c.8-.58 1.49-1.3 2.04-2.13-.74.33-1.53.54-2.36.65.85-.5 1.5-1.32 1.8-2.28-.78.48-1.66.81-2.6 1a4.1 4.1 0 00-7 3.74c-3.4-.17-6.43-1.8-8.46-4.29a4.1 4.1 0 001.28 5.48c-.68-.02-1.3-.2-1.86-.5v.05a4.11 4.11 0 003.29 4.02 4 4 0 01-1.85.08 4.1 4.1 0 003.83 2.85A8.23 8.23 0 014 20.43a11.67 11.67 0 006.28 1.83z"/></svg>'}}]);

View File

@@ -1,31 +0,0 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5516,3718],{59142:function(e,t){var a,n,i;n=[t],void 0===(i="function"==typeof(a=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var a=!1;if("undefined"!=typeof window){var n={get passive(){a=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var i="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),s=[],o=!1,l=-1,r=void 0,c=void 0,h=function(e){return s.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},d=function(e){var t=e||window.event;return!!h(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},u=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==r&&(document.body.style.overflow=r,r=void 0)}))};e.disableBodyScroll=function(e,n){if(i){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!s.some((function(t){return t.targetElement===e}))){var u={targetElement:e,options:n||{}};s=[].concat(t(s),[u]),e.ontouchstart=function(e){1===e.targetTouches.length&&(l=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var a,n,i,s;1===t.targetTouches.length&&(n=e,s=(a=t).targetTouches[0].clientY-l,!h(a.target)&&(n&&0===n.scrollTop&&0<s||(i=n)&&i.scrollHeight-i.scrollTop<=i.clientHeight&&s<0?d(a):a.stopPropagation()))},o||(document.addEventListener("touchmove",d,a?{passive:!1}:void 0),o=!0)}}else{v=n,setTimeout((function(){if(void 0===c){var e=!!v&&!0===v.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===r&&(r=document.body.style.overflow,document.body.style.overflow="hidden")}));var m={targetElement:e,options:n||{}};s=[].concat(t(s),[m])}var v},e.clearAllBodyScrollLocks=function(){i?(s.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),o&&(document.removeEventListener("touchmove",d,a?{passive:!1}:void 0),o=!1),s=[],l=-1):(u(),s=[])},e.enableBodyScroll=function(e){if(i){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,s=s.filter((function(t){return t.targetElement!==e})),o&&0===s.length&&(document.removeEventListener("touchmove",d,a?{passive:!1}:void 0),o=!1)}else 1===s.length&&s[0].targetElement===e?(u(),s=[]):s=s.filter((function(t){return t.targetElement!==e}))}})?a.apply(t,n):a)||(e.exports=i)},62092:e=>{e.exports={loader:"loader-MuZZSHRY",static:"static-MuZZSHRY",item:"item-MuZZSHRY","tv-button-loader":"tv-button-loader-MuZZSHRY",medium:"medium-MuZZSHRY",small:"small-MuZZSHRY",
black:"black-MuZZSHRY",white:"white-MuZZSHRY",gray:"gray-MuZZSHRY",primary:"primary-MuZZSHRY","loader-initial":"loader-initial-MuZZSHRY","loader-appear":"loader-appear-MuZZSHRY"}},26390:e=>{e.exports={switcher:"switcher-GT7Z98Io","disable-cursor-pointer":"disable-cursor-pointer-GT7Z98Io",input:"input-GT7Z98Io","thumb-wrapper":"thumb-wrapper-GT7Z98Io","size-small":"size-small-GT7Z98Io","size-large":"size-large-GT7Z98Io","intent-default":"intent-default-GT7Z98Io","disable-active-state-styles":"disable-active-state-styles-GT7Z98Io","intent-select":"intent-select-GT7Z98Io",track:"track-GT7Z98Io",thumb:"thumb-GT7Z98Io"}},50789:e=>{e.exports={summary:"summary-hk3Mmxts",hovered:"hovered-hk3Mmxts",caret:"caret-hk3Mmxts"}},28857:e=>{e.exports={wrapper:"wrapper-OGmb0GMo",labelRow:"labelRow-OGmb0GMo",label:"label-OGmb0GMo",labelHint:"labelHint-OGmb0GMo",labelOn:"labelOn-OGmb0GMo"}},31405:e=>{e.exports={wrapper:"wrapper-IbP2mmCe",hovered:"hovered-IbP2mmCe",labelRow:"labelRow-IbP2mmCe",label:"label-IbP2mmCe",labelHint:"labelHint-IbP2mmCe",labelOn:"labelOn-IbP2mmCe"}},39592:e=>{e.exports={button:"button-Rsu8YfBx",withText:"withText-Rsu8YfBx",withoutText:"withoutText-Rsu8YfBx"}},64547:e=>{e.exports={button:"button-SS83RYhy"}},69698:e=>{e.exports={form:"form-obOlo718",interacting:"interacting-obOlo718",input:"input-obOlo718",menu:"menu-obOlo718",add:"add-obOlo718",hovered:"hovered-obOlo718",hover:"hover-obOlo718",wrap:"wrap-obOlo718"}},59174:e=>{e.exports={spinnerWrap:"spinnerWrap-OjdCXkZp"}},78966:e=>{e.exports={title:"title-mAu74Mtg"}},936:e=>{e.exports={button:"button-2Vex9IkU",first:"first-2Vex9IkU",last:"last-2Vex9IkU"}},82832:e=>{e.exports={wrap:"wrap-H6XRnLaC"}},91887:e=>{e.exports={hidden:"hidden-vHZuIWsw"}},75492:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-AFYo6gMo",withIcon:"withIcon-AFYo6gMo",shortcut:"shortcut-AFYo6gMo",loading:"loading-AFYo6gMo",icon:"icon-AFYo6gMo"}},19450:e=>{e.exports={button:"button-OSzyNVEZ",menu:"menu-OSzyNVEZ"}},33191:e=>{e.exports={customTradingViewStyleButton:"customTradingViewStyleButton-fjLcMxZj",withoutIcon:"withoutIcon-fjLcMxZj"}},64142:e=>{e.exports={dropdown:"dropdown-E3UQYoRD",label:"label-E3UQYoRD",smallWidthTitle:"smallWidthTitle-E3UQYoRD",smallWidthMenuItem:"smallWidthMenuItem-E3UQYoRD",smallWidthWrapper:"smallWidthWrapper-E3UQYoRD"}},87906:e=>{e.exports={value:"value-e0RYyFXU",selected:"selected-e0RYyFXU"}},32062:e=>{e.exports={smallWidthMenuItem:"smallWidthMenuItem-xvK6HzAF"}},6500:e=>{e.exports={button:"button-cXbh8Gcw",first:"first-cXbh8Gcw",last:"last-cXbh8Gcw",newStyles:"newStyles-cXbh8Gcw",menu:"menu-cXbh8Gcw",dropdown:"dropdown-cXbh8Gcw",menuContent:"menuContent-cXbh8Gcw",section:"section-cXbh8Gcw",smallTabletSectionTitle:"smallTabletSectionTitle-cXbh8Gcw",addCustomInterval:"addCustomInterval-cXbh8Gcw",hovered:"hovered-cXbh8Gcw"}},76521:e=>{e.exports={button:"button-CiwmljCL"}},4050:e=>{e.exports={button:"button-mEQw2hrh",isDisabled:"isDisabled-mEQw2hrh",text:"text-mEQw2hrh"}},96141:e=>{e.exports={opened:"opened-SUlSleuH",
hover:"hover-SUlSleuH",autoSaveWrapper:"autoSaveWrapper-SUlSleuH",sharingWrapper:"sharingWrapper-SUlSleuH",button:"button-SUlSleuH",buttonSmallPadding:"buttonSmallPadding-SUlSleuH",hintPlaceHolder:"hintPlaceHolder-SUlSleuH",smallHintPlaceHolder:"smallHintPlaceHolder-SUlSleuH",popupItemRowTabletSmall:"popupItemRowTabletSmall-SUlSleuH",shortcut:"shortcut-SUlSleuH"}},72597:e=>{e.exports={button:"button-TTaQ4aBF",text:"text-TTaQ4aBF",logo:"logo-TTaQ4aBF"}},67397:e=>{e.exports={button:"button-IQnsk0hp",largeLeftPadding:"largeLeftPadding-IQnsk0hp",text:"text-IQnsk0hp",uppercase:"uppercase-IQnsk0hp"}},75668:e=>{e.exports={description:"description-Q7biiIOG"}},52157:e=>{e.exports={item:"item-UfrwNtjY",round:"round-UfrwNtjY"}},41939:e=>{e.exports={wrap:"wrap-hoa11YwL",titleWrap:"titleWrap-hoa11YwL",indicators:"indicators-hoa11YwL",title:"title-hoa11YwL",icon:"icon-hoa11YwL",text:"text-hoa11YwL",titleTabletSmall:"titleTabletSmall-hoa11YwL",labelRow:"labelRow-hoa11YwL",label:"label-hoa11YwL"}},14621:e=>{e.exports={labelRow:"labelRow-qyt9pxdb",toolbox:"toolbox-qyt9pxdb",description:"description-qyt9pxdb",descriptionTabletSmall:"descriptionTabletSmall-qyt9pxdb",item:"item-qyt9pxdb",titleItem:"titleItem-qyt9pxdb",titleItemTabletSmall:"titleItemTabletSmall-qyt9pxdb",itemTabletSmall:"itemTabletSmall-qyt9pxdb",itemLabelTabletSmall:"itemLabelTabletSmall-qyt9pxdb",wrap:"wrap-qyt9pxdb",hovered:"hovered-qyt9pxdb"}},89227:e=>{e.exports={menu:"menu-Pi7orIC5",menuSmallTablet:"menuSmallTablet-Pi7orIC5",menuItemHeaderTabletSmall:"menuItemHeaderTabletSmall-Pi7orIC5",menuItemHeader:"menuItemHeader-Pi7orIC5"}},73887:e=>{e.exports={wrap:"wrap-mbKoosX4",full:"full-mbKoosX4",first:"first-mbKoosX4",last:"last-mbKoosX4",medium:"medium-mbKoosX4",buttonWithFavorites:"buttonWithFavorites-mbKoosX4"}},82559:e=>{e.exports={icon:"icon-0KfEd2LW"}},4039:e=>{e.exports={buttonUndo:"buttonUndo-6VeYguKu",buttonRedo:"buttonRedo-6VeYguKu"}},96746:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},72142:e=>{e.exports={footer:"footer-C0oTZgbU"}},49473:e=>{e.exports={dottedCloud:"dottedCloud-NezC5dyJ",check:"check-NezC5dyJ",spinningCloud:"spinningCloud-NezC5dyJ",arrow:"arrow-NezC5dyJ",arrowGap:"arrowGap-NezC5dyJ",container:"container-NezC5dyJ",unsaved:"unsaved-NezC5dyJ",hovered:"hovered-NezC5dyJ",saving:"saving-NezC5dyJ",saved:"saved-NezC5dyJ"}},16842:e=>{e.exports={favorite:"favorite-JVQQsDQk",disabled:"disabled-JVQQsDQk",active:"active-JVQQsDQk",checked:"checked-JVQQsDQk"}},63095:e=>{e.exports={item:"item-UZNJ2Dq5",label:"label-UZNJ2Dq5",labelRow:"labelRow-UZNJ2Dq5",toolbox:"toolbox-UZNJ2Dq5"}},524:e=>{e.exports={separator:"separator-GzmeVcFo",small:"small-GzmeVcFo",normal:"normal-GzmeVcFo",large:"large-GzmeVcFo"}},73432:e=>{e.exports={button:"button-SD4Dbbwd",disabled:"disabled-SD4Dbbwd",active:"active-SD4Dbbwd",hidden:"hidden-SD4Dbbwd"}},76974:(e,t,a)=>{"use strict";a.d(t,{useIsMounted:()=>i});var n=a(59496);const i=()=>{
const e=(0,n.useRef)(!1);return(0,n.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},26996:(e,t,a)=>{"use strict";a.d(t,{Loader:()=>c});var n,i=a(59496),s=a(97754),o=a(74991),l=a(62092),r=a.n(l);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(n||(n={}));class c extends i.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:n.Initial}}render(){const{className:e,color:t="black",size:a="medium",staticPosition:n}=this.props,o=s(r().item,r()[t],r()[a]);return i.createElement("span",{className:s(r().loader,n&&r().static,this._getStateClass(),e)},i.createElement("span",{className:o}),i.createElement("span",{className:o}),i.createElement("span",{className:o}))}componentDidMount(){this.setState({state:n.Appear}),this._stateChangeTimeout=setTimeout(()=>{this.setState({state:n.Active})},2*o.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case n.Initial:return r()["loader-initial"];case n.Appear:return r()["loader-appear"];default:return""}}}},26005:(e,t,a)=>{"use strict";a.d(t,{CollapsibleSection:()=>r});var n=a(59496),i=a(97754),s=a.n(i),o=a(10381),l=a(50789);function r(e){return n.createElement(n.Fragment,null,n.createElement("div",{className:s()(e.className,l.summary),onClick:function(){e.onStateChange&&e.onStateChange(!e.open)},"data-open":e.open},e.summary,n.createElement(o.ToolWidgetCaret,{className:l.caret,dropped:Boolean(e.open)})),e.open&&e.children)}},84096:(e,t,a)=>{"use strict";a.d(t,{DEFAULT_MENU_ITEM_SWITCHER_THEME:()=>m,MenuItemSwitcher:()=>v});var n=a(59496),i=a(97754),s=a.n(i);const o=(0,n.createContext)({enablePointerOnHover:!0,enableActiveStateStyles:!0});var l=a(26390),r=a.n(l);function c(e){const t=(0,n.useContext)(o),{className:a,intent:s="default",size:l="small",enablePointerOnHover:c=t.enablePointerOnHover,enableActiveStateStyles:h=t.enableActiveStateStyles}=e;return i(a,r().switcher,r()["size-"+l],r()["intent-"+s],!c&&r()["disable-cursor-pointer"],!h&&r()["disable-active-state-styles"])}function h(e){const{reference:t,size:a,intent:i,...s}=e;return n.createElement("div",{className:c(e)},n.createElement("input",{...s,type:"checkbox",className:r().input,ref:t}),n.createElement("div",{className:r()["thumb-wrapper"]},n.createElement("div",{className:r().track}),n.createElement("div",{className:r().thumb})))}var d=a(90186),u=a(31405);const m=u;function v(e){const{className:t,checked:a,id:i,label:o,labelDescription:l,value:r,preventLabelHighlight:c,reference:m,switchReference:v,theme:p=u,disabled:g}=e,b=s()(p.label,a&&!c&&p.labelOn),S=s()(t,p.wrapper,a&&p.wrapperWithOnLabel);return n.createElement("label",{className:S,htmlFor:i,ref:m},n.createElement("div",{className:p.labelRow},n.createElement("div",{className:b},o),l&&n.createElement("div",{className:p.labelHint},l)),n.createElement(h,{disabled:g,className:p.switch,reference:v,checked:a,onChange:function(t){const a=t.target.checked
;void 0!==e.onChange&&e.onChange(a)},value:r,tabIndex:-1,id:i,...(0,d.filterDataProps)(e)}))}},14593:(e,t,a)=>{"use strict";a.d(t,{ToolWidgetIconButton:()=>l});var n=a(59496),i=a(97754),s=a(4825),o=a(64547);const l=n.forwardRef((e,t)=>{const{className:a,id:l,...r}=e;return n.createElement(s.ToolWidgetButton,{"data-name":l,...r,ref:t,className:i(a,o.button)})})},53374:(e,t,a)=>{"use strict";a.d(t,{INTERVALS:()=>i});var n=a(28353);const i=[{name:"",label:(0,n.t)("minutes",{context:"interval"})},{name:"H",label:(0,n.t)("hours",{context:"interval"})},{name:"D",label:(0,n.t)("days",{context:"interval"})},{name:"W",label:(0,n.t)("weeks",{context:"interval"})},{name:"M",label:(0,n.t)("months",{context:"interval"})}]},60269:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getRestrictedToolSet:()=>on});var n=a(67337),i=a(59496),s=a(19036),o=a(28353),l=a(82992),r=a(16654),c=a(37466),h=a(36189),d=a(9745),u=a(16396),m=a(35390),v=a(97754),p=a.n(v),g=a(82832);class b extends i.PureComponent{render(){const{children:e,className:t,...a}=this.props;return i.createElement("div",{className:v(t,g.wrap),...a},e)}}var S=a(4825),C=a(90186),_=a(936);class w extends i.PureComponent{constructor(){super(...arguments),this._handleClick=()=>{const{onClick:e,onClickArg:t}=this.props;e&&e(t)}}render(){const{isFirst:e,isLast:t,hint:a,text:n,icon:s,isActive:o,isDisabled:l,className:r}=this.props,c=(0,C.filterDataProps)(this.props);return i.createElement(S.ToolWidgetButton,{...c,icon:s,text:n,title:a,isDisabled:l,isActive:o,isGrouped:!0,onClick:this._handleClick,className:v(r,_.button,{[_.first]:e,[_.last]:t})})}}var y=a(51613),f=a(90692),k=a(24437),M=a(81332),E=a(55402),T=a(15943),x=a(19450);const I={0:(0,o.t)("Bars"),1:(0,o.t)("Candles"),9:(0,o.t)("Hollow candles"),13:(0,o.t)("Columns"),8:(0,o.t)("Heikin Ashi"),2:(0,o.t)("Line"),3:(0,o.t)("Area"),10:(0,o.t)("Baseline"),12:(0,o.t)("High-low")};const A={barsStyle:(0,o.t)("Bar's style"),labels:I},R=(0,E.registryContextType)();function N(e){var t;return!(null===(t=l.linking.supportedChartStyles.value())||void 0===t?void 0:t.includes(e))}class F extends i.PureComponent{constructor(e,t){super(e,t),this._handleChangeStyle=e=>{const{favorites:t,lastSelectedNotFavorite:a,activeStyle:n}=this.state;this.setState({activeStyle:e,lastSelectedNotFavorite:t.includes(n)?a:n})},this._handleSelectStyle=e=>{const{chartWidgetCollection:t}=this.context;e!==t.activeChartStyle.value()&&t.setChartStyleToWidget(e)},this._handleClickFavorite=e=>{this._isStyleFavorited(e)?this._handleRemoveFavorite(e):this._handleAddFavorite(e)},this._boundForceUpdate=()=>{this.forceUpdate()},this._handleQuickClick=e=>{this._handleSelectStyle(e),this._trackClick()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,favoriteChartStylesService:s.any.isRequired});const{chartWidgetCollection:a,favoriteChartStylesService:n}=t,i=a.activeChartStyle.value(),o=n.get(),l=(0,T.japaneseChartStyles)();this.state={activeStyle:i,favorites:o,styles:(0,T.commonChartStyles)(),japaneseStyles:l}}componentDidMount(){
const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.subscribe(this._handleChangeStyle),t.getOnChange().subscribe(this,this._handleChangeSettings),l.linking.supportedChartStyles.subscribe(this._boundForceUpdate)}componentWillUnmount(){const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.unsubscribe(this._handleChangeStyle),t.getOnChange().unsubscribe(this,this._handleChangeSettings),l.linking.supportedChartStyles.unsubscribe(this._boundForceUpdate)}render(){const{isShownQuicks:e,displayMode:t="full",id:a}=this.props,{activeStyle:n,favorites:s,styles:o,japaneseStyles:l,lastSelectedNotFavorite:h}=this.state,u="small"!==t&&e&&0!==s.length,v=[...s];v.includes(n)?void 0!==h&&v.push(h):v.push(n);const p=u&&v.length>1;return i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>{const t=o.map(t=>this._renderPopupMenuItem(t,t===n,e)),s=l.map(t=>this._renderPopupMenuItem(t,t===n,e));return i.createElement(b,{id:a},p&&v.map((e,t)=>i.createElement(w,{className:x.button,icon:c.SERIES_ICONS[e],isActive:u&&n===e,isDisabled:N(e),key:t,hint:A.labels[e],isFirst:0===t,isLast:t===v.length-1,onClick:u?this._handleQuickClick:void 0,onClickArg:e,"data-value":r.STYLE_SHORT_NAMES[e]})),i.createElement(m.ToolWidgetMenu,{arrow:Boolean(p),content:p?void 0:i.createElement(b,null,i.createElement(d.Icon,{icon:c.SERIES_ICONS[n]})),title:p?A.barsStyle:A.labels[n],className:x.menu,isDrawer:e,onClick:this._trackClick},t,!!s.length&&i.createElement(y.PopupMenuSeparator,null),s))})}_renderPopupMenuItem(e,t,a){const{isFavoritingAllowed:n}=this.props,s=this._isStyleFavorited(e);return i.createElement(u.PopupMenuItem,{key:e,theme:a?M.multilineLabelWithIconAndToolboxTheme:void 0,icon:c.SERIES_ICONS[e],isActive:t,isDisabled:N(e),label:A.labels[e]||"",onClick:this._handleSelectStyle,onClickArg:e,showToolboxOnHover:!s,toolbox:n&&i.createElement(h.FavoriteButton,{isActive:t,isFilled:s,onClick:()=>this._handleClickFavorite(e)}),"data-value":r.STYLE_SHORT_NAMES[e]})}_handleChangeSettings(e){this.setState({lastSelectedNotFavorite:void 0,favorites:e})}_isStyleFavorited(e){return-1!==this.state.favorites.indexOf(e)}_handleAddFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set([...t,e])}_handleRemoveFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set(t.filter(t=>t!==e))}_trackClick(){0}}F.contextType=R;var H=a(39592);const z=["medium","small"];function P(e){const{text:t,className:a,displayMode:n,collapseWhen:s=z,...o}=e,l=!s.includes(n);return i.createElement(S.ToolWidgetButton,{...o,text:l?t:void 0,className:v(a,H.button,l?H.withText:H.withoutText)})}var D=a(51768),L=a(37669),W=a(2323);const O={compare:(0,o.t)("Compare"),compareOrAddSymbol:(0,o.t)("Compare or Add Symbol")},U=(0,E.registryContextType)();class B extends i.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({isActive:e})},this._handleClick=()=>{var e;(0,
D.trackEvent)("GUI","Chart Header Toolbar","compare"),null===(e=this._compareDialogRenderer)||void 0===e||e.show()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={isActive:!1},this._compareDialogRenderer=this.context.chartWidgetCollection.getCompareDialogRenderer()}componentDidMount(){var e;null===(e=this._compareDialogRenderer)||void 0===e||e.visible().subscribe(this._updateState)}componentWillUnmount(){var e;null===(e=this._compareDialogRenderer)||void 0===e||e.visible().unsubscribe(this._updateState)}render(){const{isActive:e}=this.state;return i.createElement(P,{...this.props,icon:W,isOpened:e,onClick:this._handleClick,text:L.hasNewHeaderToolbarStyles?void 0:O.compare,title:O.compareOrAddSymbol,collapseWhen:L.hasNewHeaderToolbarStyles?["full","medium","small"]:void 0})}}B.contextType=U;var V=a(14593),G=a(61814),Z=a(68335),Y=a(90711),Q=a(15392);const q={hint:(0,o.t)("Fullscreen mode")},K=(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Shift,!1),"F"],text:"{0} + {1}"}),j=(0,E.registryContextType)();class J extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e}=this.context;e.startFullscreen()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return i.createElement(V.ToolWidgetIconButton,{id:t,icon:L.hasNewHeaderToolbarStyles?Q:Y,onClick:this._handleClick,title:q.hint,className:v(e),"data-tooltip-hotkey":K})}}J.contextType=j;var X=a(88537);const $=(0,a(98125).getLogger)("FavoritesInfo");function ee(e,t){if(0===e.length)return Promise.resolve([]);$.logNormal("Requesting favorites info");const a=[],n=new Map,i=new Map,s=new Map;return e.forEach(e=>{switch(e.type){case"java":s.set(e.studyId,e);break;case"pine":isPublishedPineId(e.pineId)?n.set(e.pineId,e):i.set(e.pineId,e);break;default:(0,X.assert)(!1,"unknown favorite type "+JSON.stringify(e))}}),0!==s.size&&a.push(t.findAllJavaStudies().then(e=>{const t=new Map;for(const a of e)!a.is_hidden_study&&s.has(a.id)&&t.set(a.id,{name:a.description,localizedName:a.description_localized,studyMarketShittyObject:a});return t}).then(e=>{const t=function(e,t){const a={items:[],notFoundItems:[]};return e.forEach((e,n)=>{const i=t.get(n);void 0!==i?a.items.push({item:e,info:i}):a.notFoundItems.push(e)}),a}(s,e);if(0!==t.notFoundItems.length){const e=t.notFoundItems.map(e=>e.studyId);$.logWarn("Cannot find java scripts: "+JSON.stringify(e))}return t.items})),Promise.all(a).then(e=>($.logNormal("Requesting favorites info finished"),e.reduce((e,t)=>e.concat(t),[])))}var te=a(14291),ae=a(85733),ne=a(26996),ie=a(59174);function se(e){const{className:t}=e;return i.createElement("div",{className:p()(ie.spinnerWrap,t)},i.createElement(ne.Loader,null))}var oe=a(78966);function le(e){return i.createElement("div",{className:v(e.className,oe.title)},e.children)}var re=a(76422),ce=a(60373),he=a(64142);const de={text:(0,o.t)("Indicators"),hint:(0,o.t)("Indicators & Strategies"),favorites:(0,o.t)("Favorites")},ue=(0,
G.hotKeySerialize)({keys:["/"],text:"{0}"}),me=(0,E.registryContextType)();class ve extends i.PureComponent{constructor(e,t){super(e,t),this._promise=null,this._menu=i.createRef(),this._favoriteFundamentalsModel=null,this._setActiveState=e=>{this.setState({isActive:e})},this._handleClick=()=>{const{studyMarket:e}=this.props;this.setState({isActive:!0},()=>{e.visible().value()?e.hide():e.show()}),this._trackClick()},this._handleSelectIndicator=e=>{e=(0,X.ensureDefined)(e),this._trackFavoriteAction("Favorite indicator from toolbar");const{chartWidgetCollection:t}=this.context;if("java"===e.type){const t=(0,te.tryFindStudyLineToolNameByStudyId)(e.studyId);if(null!==t)return void ae.tool.setValue(t)}t.activeChartWidget.value().insertStudy(e)},this._handleFavoriteIndicatorsChange=()=>{const{favoriteScriptsModel:e}=this.context,t=[...(0,X.ensureDefined)(e).favorites()];this.setState({favorites:t}),this._clearCache()},this._handleFavoriteFundamentalsChange=()=>{var e;const t=new Set((null===(e=this._favoriteFundamentalsModel)||void 0===e?void 0:e.favorites())||[]);this.setState({favoriteFundamentals:t}),this._clearCache()},this._handleMouseEnter=()=>{this._prefetchFavorites()},this._handleWrapClick=()=>{this._prefetchFavorites()},this._handleChangeActiveWidget=()=>{this._clearCache()},this._clearCache=()=>{this._promise=null,this.setState({infos:[]})},this._handleScriptRenamed=e=>{const{favoriteScriptsModel:t}=this.context;void 0!==t&&t.isFav(e.scriptIdPart)&&this._clearCache()},this._handleFavoriteMenuClick=()=>{this._trackClick(),this._trackFavoriteAction("Select favorite indicators dropdown")},(0,E.validateRegistry)(t,{favoriteScriptsModel:s.any,chartWidgetCollection:s.any.isRequired});const{favoriteScriptsModel:a}=t,n=void 0!==a?a.favorites():[];this.state={isActive:!1,isLoading:!1,favorites:n,favoriteFundamentals:void 0,infos:[]}}componentDidMount(){const{studyMarket:e}=this.props,{favoriteScriptsModel:t,chartWidgetCollection:a}=this.context;e.visible().subscribe(this._setActiveState),void 0!==t&&(t.favoritesChanged().subscribe(this,this._handleFavoriteIndicatorsChange),a.activeChartWidget.subscribe(this._handleChangeActiveWidget)),re.on("TVScriptRenamed",this._handleScriptRenamed,null)}componentWillUnmount(){const{studyMarket:e}=this.props,{favoriteScriptsModel:t,chartWidgetCollection:a}=this.context;e.visible().unsubscribe(this._setActiveState),void 0!==t&&(t.favoritesChanged().unsubscribe(this,this._handleFavoriteIndicatorsChange),a.activeChartWidget.unsubscribe(this._handleChangeActiveWidget)),re.unsubscribe("TVScriptRenamed",this._handleScriptRenamed,null),this._promise=null}render(){const{isActive:e,favorites:t,favoriteFundamentals:a,isLoading:n}=this.state,{className:s,displayMode:l,id:r}=this.props,{chartWidgetCollection:c}=this.context;return i.createElement(i.Fragment,null,i.createElement(b,{id:r,onMouseEnter:this._handleMouseEnter,onClick:this._handleWrapClick},i.createElement(P,{displayMode:l,className:s,icon:ce,isOpened:e,onClick:this._handleClick,text:de.text,title:de.hint,"data-role":"button",
"data-name":"open-indicators-dialog","data-tooltip-hotkey":ue}),Boolean(t.length>0||(null==a?void 0:a.size))&&i.createElement(f.MatchMedia,{rule:"screen and (max-width: 428px)"},e=>i.createElement(m.ToolWidgetMenu,{key:c.activeChartWidget.value().id(),arrow:!0,closeOnClickOutside:!0,isDrawer:e,drawerPosition:"Bottom",title:de.favorites,ref:this._menu,onClick:this._handleFavoriteMenuClick,"data-name":"show-favorite-indicators"},i.createElement("div",{className:p()(he.dropdown,e&&he.smallWidthWrapper)},i.createElement(le,{className:e&&he.smallWidthTitle},(0,o.t)("Favorite Indicators")),n&&i.createElement(se,null),!n&&i.createElement(i.Fragment,null,this.state.infos.length>0?this.state.infos.map(t=>i.createElement(u.PopupMenuItem,{className:p()(e&&he.smallWidthMenuItem),theme:e?M.multilineLabelWithIconAndToolboxTheme:void 0,key:"java"===t.item.type?t.item.studyId:t.item.pineId,onClick:this._handleSelectIndicator,onClickArg:t.item,label:i.createElement("span",{className:p()(!e&&he.label,e&&he.smallWidthLabel,"apply-overflow-tooltip")},pe(t))})):null!==this._promise&&i.createElement(u.PopupMenuItem,{isDisabled:!0,label:(0,o.t)("You have no Favorites Indicators yet")})))))))}_prefetchFavorites(){const{chartWidgetCollection:e}=this.context;if(null!==this._promise||!window.is_authenticated)return;const t=e.activeChartWidget.value();if(!t.hasModel())return;const a=t.model().model().studyMetaInfoRepository();this.setState({isLoading:!0});const n=this._promise=Promise.all([ee(this.state.favorites,a),void 0]).then(e=>{if(n!==this._promise)return;const[t,a]=e;let i=[...t];if(a){const e=a.filter(e=>{var t;return null===(t=this.state.favoriteFundamentals)||void 0===t?void 0:t.has(e.scriptIdPart)}).map(this._mapFundamentalToFavoriteItemInfo);i.push(...e)}i=[...i].sort((e,t)=>pe(e).localeCompare(pe(t))),this.setState({infos:i,isLoading:!1},()=>{this._menu.current&&this._menu.current.update()})})}_trackClick(){0}_trackFavoriteAction(e){(0,D.trackEvent)("GUI","Chart Header Toolbar",e)}_mapFundamentalToFavoriteItemInfo(e){return{item:{type:"pine",pineId:e.scriptIdPart},info:{name:e.scriptName,localizedName:getLocalizedFundamentalsName(e),studyMarketShittyObject:void 0}}}}function pe(e){return e.info.localizedName||(0,o.t)(e.info.name,{context:"study"})}ve.contextType=me;var ge=a(9315),be=a(29823),Se=a(87906);function Ce(e){return i.createElement("div",{className:v(Se.value,{[Se.selected]:e.isSelected})},e.value,e.metric)}var _e=a(50628),we=a(10381),ye=a(53374),fe=a(69698);class ke extends i.PureComponent{constructor(e){super(e),this._timeMenu=null,this._setMenuRef=e=>{this._timeMenu=e},this._handleChangeInput=e=>{const{value:t}=e.currentTarget;/^[0-9]*$/.test(t)&&this.setState({inputValue:t})},this._handleSelectTime=e=>{this.setState({selectedIntervalSuffix:e}),this._closeMenu()},this._handleClickAdd=()=>{const{inputValue:e,selectedIntervalSuffix:t}=this.state;this.props.onAdd(e,t)},this._toggleMenu=()=>{this.state.isOpenedMenu?this._closeMenu():this._openMenu()},this._closeMenu=()=>{this.props.onCloseMenu(),this.setState({
isOpenedMenu:!1})},this._openMenu=()=>{this.props.onOpenMenu(),this.setState({isOpenedMenu:!0})},this._getMenuPosition=()=>{const e=(0,X.ensureNotNull)(this._timeMenu).getBoundingClientRect();return{overrideWidth:e.width,x:e.left,y:e.bottom+1}},this.state={inputValue:"1",isOpenedMenu:!1,selectedIntervalSuffix:ye.INTERVALS[0].name}}render(){const{inputValue:e,isOpenedMenu:t,menuWidth:a,selectedIntervalSuffix:n}=this.state;return i.createElement("div",{className:v(fe.form,{[fe.interacting]:t})},i.createElement("input",{className:fe.input,maxLength:7,onChange:this._handleChangeInput,value:e}),i.createElement("div",{className:fe.menu,onClick:this._toggleMenu,ref:this._setMenuRef},ye.INTERVALS.find(e=>e.name===n).label,i.createElement(we.ToolWidgetCaret,{dropped:t})),i.createElement("div",{className:fe.add,onClick:this._handleClickAdd},(0,o.t)("Add")),i.createElement(_e.PopupMenu,{doNotCloseOn:this,isOpened:t,minWidth:a,onClose:this._closeMenu,position:this._getMenuPosition},ye.INTERVALS.map(e=>i.createElement(u.PopupMenuItem,{dontClosePopup:!0,key:e.name,label:e.label,onClick:this._handleSelectTime,onClickArg:e.name}))))}}var Me=a(96040),Ee=a(70412),Te=a(32563),xe=a(32062);function Ie(e){const{interval:t,hint:a,isActive:n,isDisabled:s,isFavorite:o,isSignaling:l,onClick:r,onClickRemove:c,onClickFavorite:d,isSmallTablet:m}=e,v=(0,C.filterDataProps)(e),[g,b]=(0,Ee.useHover)(),S=i.useCallback(()=>c(t),[c,t]),_=i.useCallback(()=>d(t),[d,t]),w=(0,i.useRef)(null);return(0,i.useEffect)(()=>{var e;l&&m&&(null===(e=w.current)||void 0===e||e.scrollIntoView())},[l,m]),i.createElement("div",{...b,ref:w},i.createElement(u.PopupMenuItem,{...v,className:p()(m&&xe.smallWidthMenuItem),theme:m?M.multilineLabelWithIconAndToolboxTheme:void 0,isActive:n,isDisabled:s,isHovered:l,onClick:r,onClickArg:t,toolbox:function(){const{isRemovable:t,isFavoritingAllowed:a}=e,l=i.createElement(Me.RemoveButton,{key:"remove",isActive:n,hidden:!Te.touch&&!g,onClick:S}),r=i.createElement(h.FavoriteButton,{key:"favorite",isActive:n,isFilled:o,onClick:_});return[t&&l,!s&&a&&r]}(),showToolboxOnHover:!o,label:a}))}const Ae={[be.ResolutionKind.Ticks]:(0,o.t)("Ticks",{context:"interval_group_name"}),[be.ResolutionKind.Seconds]:(0,o.t)("Seconds",{context:"interval_group_name"}),[be.ResolutionKind.Minutes]:(0,o.t)("Minutes",{context:"interval_group_name"}),[be.SpecialResolutionKind.Hours]:(0,o.t)("Hours",{context:"interval_group_name"}),[be.ResolutionKind.Days]:(0,o.t)("Days",{context:"interval_group_name"}),[be.ResolutionKind.Weeks]:(0,o.t)("Weeks",{context:"interval_group_name"}),[be.ResolutionKind.Months]:(0,o.t)("Months",{context:"interval_group_name"}),[be.ResolutionKind.Range]:(0,o.t)("Ranges",{context:"interval_group_name"}),[be.ResolutionKind.Invalid]:""};function Re(e,t=!1){return{id:e,name:Ae[e],items:[],mayOmitSeparator:t}}var Ne=a(26005),Fe=a(2872),He=a.n(Fe),ze=a(29197),Pe=a(59064),De=a(6500);const Le={openDialog:(0,o.t)("Open Interval Dialog"),timeInterval:(0,o.t)("Time Interval")},We=(0,G.hotKeySerialize)({keys:[","],text:(0,
o.t)("Number or {hotKey_0}")}),Oe=(0,E.registryContextType)(),Ue=new(He()),Be=i.lazy(async()=>({default:(await Promise.all([a.e(4194),a.e(7962),a.e(8986),a.e(8463),a.e(9289),a.e(7345),a.e(2385),a.e(5643),a.e(3016),a.e(4013)]).then(a.bind(a,21317))).ToolWidgetIntervalsAddDialog}));function Ve(e){{const t=be.Interval.parse(e);if(!(0,ge.isSecondsEnabled)()&&t.isSeconds())return!1;if(!(0,ge.isTicksEnabled)()&&t.isTicks())return!1}return!0}class Ge extends i.PureComponent{constructor(e,t){super(e,t),this._menu=i.createRef(),this._renderChildren=(e,t)=>[...this._createMenuItems(e,t),...this._createIntervalForm(t)],this._handleChangeInterval=e=>{const{activeInterval:t,lastNotQuicked:a}=this.state,n=this._getQuicks();this.setState({activeInterval:(0,ge.normalizeIntervalString)(e),lastNotQuicked:void 0===t||n.includes(t)?a:t})},this._bindedForceUpdate=()=>{this.forceUpdate()},this._handleCloseMenu=()=>{this.setState({isOpenedFormMenu:!1})},this._handleOpenMenu=()=>{this.setState({isOpenedFormMenu:!0})},this._handleSelectInterval=e=>{void 0!==e&&e!==l.linking.interval.value()&&this.context.chartWidgetCollection.setResolution(e),e&&(0,D.trackEvent)("GUI","Time Interval",e)},this._handleClickFavorite=e=>{e=(0,X.ensureDefined)(e),this._isIntervalFavorite(e)?this._handleRemoveFavorite(e):this._handleAddFavorite(e)},this._handleAddFavorite=e=>{const{favorites:t}=this.state;this.context.favoriteIntervalsService.set([...t,e])},this._handleRemoveFavorite=e=>{const{favorites:t}=this.state;this.context.favoriteIntervalsService.set(t.filter(t=>t!==e))},this._handleAddInterval=(e,t)=>{const{intervalService:a}=this.context,n=a.add(e,t);n&&this.setState({lastAddedInterval:n})},this._handleRemoveInterval=e=>{const{intervalService:t}=this.context;e&&(t.remove(e),this._handleRemoveFavorite(e))},this._getHandleSectionStateChange=e=>t=>{const{menuViewState:a}=this.state,{intervalsMenuViewStateService:n}=this.context;n.set({...a,[e]:!t})},this._handleOpenAddIntervalDialog=()=>{this.setState({isAddIntervalDialogOpened:!0})},this._handleCloseAddIntervalDialog=()=>{this.setState({isAddIntervalDialogOpened:!1})},this._handleGlobalClose=()=>{const{isFake:e}=this.props,{isAddIntervalDialogOpened:t}=this.state;e||t||Ue.fire()},this._handeQuickClick=e=>{this._handleSelectInterval(e),this._trackClick()},(0,E.validateRegistry)(t,{chartApiInstance:s.any.isRequired,favoriteIntervalsService:s.any.isRequired,intervalService:s.any.isRequired,intervalsMenuViewStateService:s.any.isRequired});const{chartApiInstance:a,favoriteIntervalsService:o,intervalService:r,intervalsMenuViewStateService:c}=t;this._customIntervals=n.enabled("custom_resolutions");const h=l.linking.interval.value(),d=h&&(0,ge.normalizeIntervalString)(h),u=o.get(),m=r.getCustomIntervals(),v=c.get();this._defaultIntervals=a.defaultResolutions().filter(Ve).map(ge.normalizeIntervalString),this.state={isOpenedFormMenu:!1,activeInterval:d,favorites:u,customs:m,menuViewState:v,isAddIntervalDialogOpened:!1}}componentDidMount(){
const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().subscribe(this,this._handleChangeFavorites),a.getOnChange().subscribe(this,this._handleChangeMenuViewState),t.getOnChange().subscribe(this,this._handleChangeCustoms),l.linking.interval.subscribe(this._handleChangeInterval),l.linking.intraday.subscribe(this._bindedForceUpdate),l.linking.seconds.subscribe(this._bindedForceUpdate),l.linking.ticks.subscribe(this._bindedForceUpdate),l.linking.range.subscribe(this._bindedForceUpdate),l.linking.supportedResolutions.subscribe(this._bindedForceUpdate),Pe.globalCloseDelegate.subscribe(this,this._handleGlobalClose)}componentWillUnmount(){const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().unsubscribe(this,this._handleChangeFavorites),a.getOnChange().unsubscribe(this,this._handleChangeMenuViewState),t.getOnChange().unsubscribe(this,this._handleChangeCustoms),l.linking.interval.unsubscribe(this._handleChangeInterval),l.linking.intraday.unsubscribe(this._bindedForceUpdate),l.linking.seconds.unsubscribe(this._bindedForceUpdate),l.linking.ticks.unsubscribe(this._bindedForceUpdate),l.linking.range.unsubscribe(this._bindedForceUpdate),l.linking.supportedResolutions.unsubscribe(this._bindedForceUpdate),Pe.globalCloseDelegate.unsubscribe(this,this._handleGlobalClose)}componentDidUpdate(e,t){this.state.lastAddedInterval&&setTimeout(()=>this.setState({lastAddedInterval:void 0}),400)}render(){const{isShownQuicks:e,id:t}=this.props,{activeInterval:a,customs:n,lastNotQuicked:s,isAddIntervalDialogOpened:o}=this.state,l=this._getQuicks(),r=(0,ge.sortResolutions)([...l]);void 0!==a&&r.includes(a)?void 0!==s&&r.push(s):void 0!==a&&r.push(a);const c=(!(!e||0===l.length)||void 0)&&r.length>1,h={},d=(0,ge.mergeResolutions)(this._defaultIntervals,n);(void 0!==a?d.concat(a):d).filter(ge.isAvailable).forEach(e=>h[e]=!0);const u=void 0!==a?(0,ge.getTranslatedResolutionModel)(a):null;return i.createElement(b,{id:t},c&&r.map((e,t)=>{const n=(0,ge.getTranslatedResolutionModel)(e);return i.createElement(w,{key:t,className:v(De.button,{[De.first]:0===t,[De.last]:t===r.length-1,[De.newStyles]:L.hasNewHeaderToolbarStyles}),text:i.createElement(Ce,{value:n.mayOmitMultiplier?void 0:n.multiplier,metric:n.shortKind}),hint:n.hint,isActive:a===e,isDisabled:!h[e]&&e!==s,onClick:this._handeQuickClick,onClickArg:e,"data-value":e})}),i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>i.createElement(i.Fragment,null,i.createElement(ze.CloseDelegateContext.Provider,{value:Ue},i.createElement(m.ToolWidgetMenu,{arrow:Boolean(c),closeOnClickOutside:!0,content:c||null===u?void 0:i.createElement(b,{className:De.menuContent},i.createElement(Ce,{value:u.mayOmitMultiplier?void 0:u.multiplier,metric:u.shortKind})),title:c||null===u?Le.timeInterval:u.hint,hotKey:c?We:void 0,className:De.menu,ref:this._menu,isDrawer:e,onClick:this._trackClick},i.createElement("div",{className:De.dropdown
},this._renderChildren(d,e)))),e&&o&&i.createElement(i.Suspense,{fallback:null},i.createElement(Be,{onAdd:this._handleAddInterval,onClose:this._handleCloseAddIntervalDialog,onUnmount:this._handleCloseAddIntervalDialog})))))}_createMenuItems(e,t){const a=function(e){const t=Re(be.ResolutionKind.Ticks),a=Re(be.ResolutionKind.Seconds),n=Re(be.ResolutionKind.Minutes),i=Re(be.SpecialResolutionKind.Hours),s=Re(be.ResolutionKind.Days),o=Re(be.ResolutionKind.Range);return e.forEach(e=>{const l=be.Interval.parse(e);l.isMinuteHours()?i.items.push(e):l.isMinutes()?(0,be.isHour)(Number(l.multiplier()))?i.items.push(e):n.items.push(e):l.isSeconds()?a.items.push(e):l.isDWM()?s.items.push(e):l.isRange()?o.items.push(e):l.isTicks()&&t.items.push(e)}),[t,a,n,i,s,o].filter(e=>0!==e.items.length)}(e).map((e,a,n)=>this._renderResolutionsGroup(e,1===n.length,t));return function(e){let t=!1;return e.filter((e,a,n)=>{let i=!0;return e.type===y.PopupMenuSeparator&&(0!==a&&a!==n.length-1||(i=!1),t&&(i=!1)),t=e.type===y.PopupMenuSeparator,i})}([].concat(...a))}_createIntervalForm(e){if(this._customIntervals){const t=e?i.createElement("div",{key:"add-dialog",className:De.addCustomInterval,onClick:this._handleOpenAddIntervalDialog},(0,o.t)("Add custom interval")+"…"):i.createElement(ke,{key:"add-form",onAdd:this._handleAddInterval,onCloseMenu:this._handleCloseMenu,onOpenMenu:this._handleOpenMenu});return[i.createElement(y.PopupMenuSeparator,{key:"custom-interval-separator"}),t]}return[]}_renderResolutionsGroup(e,t=!1,a){const n=[],s=e.items.map(e=>this._renderPopupMenuItem(e,a));if(t)n.push(...s);else if(a){const t=i.createElement("div",{key:e.id},i.createElement("div",{className:De.smallTabletSectionTitle},e.name),s);n.push(t)}else{const{intervalsMenuViewStateService:t}=this.context,{menuViewState:a}=this.state;if(!t.isAllowed(e.id))return[];const o=i.createElement(Ne.CollapsibleSection,{key:e.id,className:De.section,summary:e.name,open:!a[e.id],onStateChange:this._getHandleSectionStateChange(e.id)},s);n.push(o)}return(!e.mayOmitSeparator||e.items.length>1)&&(n.unshift(i.createElement(y.PopupMenuSeparator,{key:"begin-"+e.name})),n.push(i.createElement(y.PopupMenuSeparator,{key:"end-"+e.name}))),n}_handleChangeFavorites(e){this.setState({lastNotQuicked:void 0,favorites:e})}_handleChangeCustoms(e){this.setState({customs:e})}_handleChangeMenuViewState(e){this.setState({menuViewState:e},()=>{this._menu.current&&this._menu.current.update()})}_renderPopupMenuItem(e,t){const{isFavoritingAllowed:a}=this.props,{activeInterval:n,lastAddedInterval:s}=this.state,o=e===n,l=(0,ge.isAvailable)(e),r=this._isIntervalFavorite(e),c=this._isIntervalDefault(e),h=(0,ge.getTranslatedResolutionModel)(e);return i.createElement(Ie,{key:e,isSmallTablet:t,interval:e,hint:h.hint,isSignaling:s===e,isFavoritingAllowed:a,isDisabled:!l,isFavorite:r,isRemovable:!c,isActive:o,onClick:this._handleSelectInterval,onClickRemove:this._handleRemoveInterval,onClickFavorite:this._handleClickFavorite,"data-value":e})}_isIntervalDefault(e){return this._defaultIntervals.includes(e)}
_isIntervalFavorite(e){return this.state.favorites.includes(e)}_getQuicks(e){return this.props.isShownQuicks&&"small"!==this.props.displayMode?void 0===e?this.state.favorites:e:[]}_trackClick(){0}}Ge.contextType=Oe;var Ze=a(76521),Ye=a(74034);const Qe={hint:(0,o.t)("Open chart in popup")},qe=(0,E.registryContextType)();class Ke extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e,windowMessageService:t,isFundamental:a}=this.context,n=e.activeChartWidget.value();n.withModel(null,()=>{t.post(parent,"openChartInPopup",{symbol:n.model().mainSeries().actualSymbol(),interval:n.model().mainSeries().interval(),fundamental:a})})},(0,E.validateRegistry)(t,{isFundamental:s.any,chartWidgetCollection:s.any.isRequired,windowMessageService:s.any.isRequired})}render(){const{className:e}=this.props;return i.createElement(V.ToolWidgetIconButton,{className:v(e,Ze.button),icon:Ye,onClick:this._handleClick,title:Qe.hint})}}Ke.contextType=qe;var je=a(28289);const Je={hint:(0,o.t)("Chart settings")},Xe=(0,E.registryContextType)();class $e extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e}=this.context,t=e.activeChartWidget.value();(0,D.trackEvent)("GUI","Chart Header Toolbar","chart properties"),t.showGeneralChartProperties()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){return i.createElement(V.ToolWidgetIconButton,{...this.props,icon:je,title:Je.hint,onClick:this._handleClick})}}$e.contextType=Xe;var et=a(25760),tt=a(59199),at=a(68587),nt=a(49473);const it="M21.5 21.5h-14a5 5 0 1 1 .42-9.983 7.5 7.5 0 0 1 14.57 2.106 4.002 4.002 0 0 1-.99 7.877z",st=13.08991081237793,ot={strokeDashOffset:49.242997817993164,strokeDash:49.866326904296876,strokeGap:st,strokeDashCheck:0},lt={strokeDashOffset:62.956237716674806,strokeGap:0,strokeDash:62.956237716674806,strokeDashCheck:200};class rt extends i.PureComponent{constructor(e){super(e),this.state=ot}componentDidMount(){"saved"===this.props.state?this.setState(lt):this._goToNextState(this.props.state)}componentWillUnmount(){this._currentAnimation=void 0}UNSAFE_componentWillReceiveProps(e){this.props.state!==e.state&&this._goToNextState(e.state)}render(){const{strokeDashOffset:e,strokeDash:t,strokeGap:a,strokeDashCheck:n}=this.state,{className:s,size:o,onClick:l,state:r,isHovered:c=!1}=this.props,h=v(nt.container,s,c&&nt.hovered,{[nt.unsaved]:"unsaved"===r,[nt.saving]:"saving"===r,[nt.saved]:"saved"===r});return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:h,version:"1.1",width:o,height:o,viewBox:"0 0 28 28",onClick:l},i.createElement("g",{fill:"none"},i.createElement("path",{className:nt.dottedCloud,stroke:"currentColor",strokeDasharray:"3.5,2.5",d:it}),i.createElement("path",{className:nt.spinningCloud,stroke:"currentColor",strokeDasharray:`${t} ${a}`,strokeDashoffset:e,d:it}),i.createElement("path",{className:nt.arrowGap,d:"M11 20h6v5h-6z"}),i.createElement("g",{className:nt.arrow,stroke:"currentColor"},i.createElement("path",{
strokeLinecap:"square",d:"M14.5 14.5v10"}),i.createElement("path",{d:"M11 17l3.5-3.5L18 17"})),i.createElement("g",{className:nt.check,stroke:"currentColor"},i.createElement("path",{strokeDasharray:`${n}% ${200-n}%`,d:"M10 15l2.5 2.5L18 12"}))))}_goToNextState(e){switch(e){case"unsaved":this.setState(ot);break;case"saving":"unsaved"!==this.props.state&&this.setState(ot),this._currentAnimation=Promise.resolve(this._currentAnimation).then(()=>this._createSpinAnimationWhile(()=>"saving"===this.props.state));break;case"saved":this._currentAnimation=Promise.resolve(this._currentAnimation).then(this._createFillGapAnimation.bind(this)).then(this._createCheckAnimation.bind(this))}}_createSpinAnimationWhile(e){return this._createSpinAnimation().then(()=>e()?this._createSpinAnimationWhile(e):Promise.resolve())}_createSpinAnimation(){return new Promise(e=>{(0,tt.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashOffset:t})},onComplete:()=>e(),from:49.242997817993164,to:111.57590644836426,easing:at.easingFunc.linear,duration:1e3})})}_createCheckAnimation(){return new Promise(e=>{(0,tt.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashCheck:Math.round(t)})},onComplete:()=>e(),from:0,to:200,easing:at.easingFunc.linear,duration:1e3})})}_createFillGapAnimation(){return new Promise(e=>{(0,tt.doAnimate)({onStep:(e,t)=>{void 0!==this._currentAnimation&&this.setState({strokeDashOffset:62.956237716674806-t,strokeGap:t,strokeDash:62.956237716674806-t})},onComplete:()=>e(),from:st,to:0,easing:at.easingFunc.linear,duration:200})})}}var ct=a(40173),ht=a(84096),dt=a(28857);(0,ct.mergeThemes)(ht.DEFAULT_MENU_ITEM_SWITCHER_THEME,dt);var ut=a(82724),mt=a(16788),vt=a(96141),pt=a(4050);a(31405);const gt=n.enabled("widget"),bt=(0,ct.mergeThemes)(S.DEFAULT_TOOL_WIDGET_BUTTON_THEME,pt),St=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{shortcut:vt.shortcut}),Ct={copy:(0,o.t)("Copy"),makeCopy:(0,o.t)("Make a Copy"),newChartLayout:(0,o.t)("New Chart Layout"),loadChartLayout:(0,ut.appendEllipsis)((0,o.t)("Load Chart Layout")),rename:(0,ut.appendEllipsis)((0,o.t)("Rename")),renameChartLayout:(0,o.t)("Rename Chart Layout"),saveAs:(0,ut.appendEllipsis)((0,o.t)("Make a Copy")),saveChartLayout:(0,o.t)("Save"),saveChartLayoutLong:(0,o.t)("Save all charts for all symbols and intervals on your layout"),manageChartLayouts:(0,o.t)("Manage Chart Layouts")},_t=[],wt=(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"S"],text:"{0} + {1}"});class yt extends i.PureComponent{constructor(e){super(e),this._handleSaveHoverBegin=()=>{this.setState({iconHovered:!0})},this._handleSaveHoverEnd=()=>{this.setState({iconHovered:!1})},this._handleCloneClick=()=>{var e,t;null===(t=(e=this.props).onCloneChart)||void 0===t||t.call(e),this._trackClick()},this._handleSaveClick=()=>{var e,t;null===(t=(e=this.props).onSaveChart)||void 0===t||t.call(e),this._trackClick()},this.state={iconHovered:!1}}render(){
const{id:e,isReadOnly:t,displayMode:a,isProcessing:n,title:s,chartId:o,wasChanges:l,hideMenu:r,isTabletSmall:c,dataNameSaveMenu:h}=this.props,{iconHovered:u}=this.state,p=!t&&!r;let g="saved";return!l&&s||(g="unsaved"),n&&(g="saving"),i.createElement(b,null,t?i.createElement(b,null,i.createElement(P,{id:e,displayMode:a,icon:i.createElement(d.Icon,{icon:mt}),isDisabled:n,onClick:this._handleCloneClick,text:Ct.copy,title:Ct.makeCopy,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,collapseWhen:_t})):i.createElement(b,null,i.createElement(P,{id:e,className:v(vt.button,p&&vt.buttonSmallPadding),displayMode:a,icon:i.createElement(rt,{size:28,state:g,isHovered:u}),isDisabled:o&&!l||n,onClick:this._handleSaveClick,text:s||Ct.saveChartLayout,title:Ct.saveChartLayoutLong,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,theme:bt,collapseWhen:_t,"data-tooltip-hotkey":gt?"":wt}),p&&i.createElement(m.ToolWidgetMenu,{"data-name":h,className:"js-save-load-menu-open-button",arrow:!0,isDrawer:c,drawerPosition:"Bottom",title:Ct.manageChartLayouts,onClick:this._trackClick},this._renderMenuItems(Boolean(c)))))}_renderMenuItems(e){const{wasChanges:t,isProcessing:a,chartId:n,onSaveChartFromMenu:s,onRenameChart:l,onSaveAsChart:r,onLoadChart:c,onNewChart:h,isAutoSaveEnabled:d,autoSaveId:m,sharingId:p,onAutoSaveChanged:g,isSharingEnabled:b,onSharingChanged:S}=this.props,C=e?M.multilineLabelWithIconAndToolboxTheme:St,_=e?void 0:(0,Z.humanReadableHash)(Z.Modifiers.Mod+83),w=e?void 0:(0,o.t)("Dot",{context:"hotkey"}),f=[];return f.push(i.createElement(u.PopupMenuItem,{key:"save",isDisabled:Boolean(a||!t&&n),label:Ct.saveChartLayout,onClick:s,shortcut:_,labelRowClassName:v(e&&vt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-save"})),void 0!==n&&(e||f.push(i.createElement(y.PopupMenuSeparator,{key:"existing-chart-section-begin"})),f.push(i.createElement(u.PopupMenuItem,{key:"rename",label:Ct.rename,onClick:l,labelRowClassName:v(e&&vt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-rename"}),i.createElement(u.PopupMenuItem,{key:"save-as",label:Ct.saveAs,onClick:r,labelRowClassName:v(e&&vt.popupItemRowTabletSmall),theme:C,"data-name":"save-load-menu-item-clone"}))),f.push(i.createElement(y.PopupMenuSeparator,{key:"platform-section-begin"})),f.push(i.createElement(u.PopupMenuItem,{key:"load-chart",className:"js-save-load-menu-item-load-chart",label:Ct.loadChartLayout,onClick:c,labelRowClassName:v(e&&vt.popupItemRowTabletSmall),theme:C,shortcut:w,"data-name":"save-load-menu-item-load"})),f}_trackClick(){0}}const ft=(0,E.registryContextType)();class kt extends i.PureComponent{constructor(e,t){super(e,t),this._syncState=e=>{this.setState(e)},this._onChangeHasChanges=e=>{this.state.wasChanges!==e&&this.setState({wasChanges:e})},this._onChangeAutoSaveEnabled=e=>{0},this._onChangeSharingEnabled=e=>{this.setState({isSharingEnabled:e})},this._onChangeTitle=e=>{this.setState({title:e})},this._onChangeId=e=>{this.setState({id:e})},this._onChartAboutToBeSaved=()=>{
this.setState({isProcessing:!0})},this._onChartSaved=()=>{this.setState({isProcessing:!1})},this._handleAutoSaveEnabled=e=>{0},this._handleSharingEnabled=e=>{0},this._handleClickSave=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save click")},this._handleClickSaveFromMenu=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save From Menu")},this._handleClickClone=()=>{this.context.saveChartService.cloneChart()},this._handleClickSaveAs=()=>{this.context.saveChartService.saveChartAs(),this._trackEvent("Make a copy")},this._handleClickNew=()=>{this._trackEvent("New chart layout")},this._handleClickLoad=()=>{this.context.loadChartService.showLoadDialog(),this._trackEvent("Load chart layout")},this._handleHotkey=()=>{this.context.loadChartService.showLoadDialog()},this._handleClickRename=()=>{this.context.saveChartService.renameChart(),this._trackEvent("Rename")},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,chartChangesWatcher:s.any.isRequired,saveChartService:s.any.isRequired,sharingChartService:s.any,loadChartService:s.any.isRequired});const{chartWidgetCollection:a,chartChangesWatcher:n,saveChartService:i,sharingChartService:o}=t;this.state={isAuthenticated:window.is_authenticated,isProcessing:!1,id:a.metaInfo.id.value(),title:a.metaInfo.name.value(),wasChanges:n.hasChanges(),iconHovered:!1}}componentDidMount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:n,chartChangesWatcher:i,saveChartService:s,sharingChartService:l}=this.context;t?a.on("change",this._syncState):(i.getOnChange().subscribe(this,this._onChangeHasChanges),n.metaInfo.name.subscribe(this._onChangeTitle),n.metaInfo.id.subscribe(this._onChangeId),this._hotkeys=(0,et.createGroup)({desc:"Save/Load"}),this._hotkeys.add({desc:(0,o.t)("Load Chart Layout"),handler:this._handleHotkey,hotkey:190}),e.chartSaved().subscribe(this,this._onChartSaved),e.chartAboutToBeSaved().subscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.subscribe(this,this._onLoginStateChange))}componentDidUpdate(e,t){this.props.isFake||t!==this.state&&this.props.stateSyncEmitter.emit("change",this.state)}componentWillUnmount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:n,chartChangesWatcher:i,saveChartService:s,sharingChartService:o}=this.context;t?a.off("change",this._syncState):(i.getOnChange().unsubscribe(this,this._onChangeHasChanges),n.metaInfo.name.unsubscribe(this._onChangeTitle),n.metaInfo.id.unsubscribe(this._onChangeId),(0,X.ensureDefined)(this._hotkeys).destroy(),e.chartSaved().unsubscribe(this,this._onChartSaved),e.chartAboutToBeSaved().unsubscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.unsubscribe(this,this._onLoginStateChange))}render(){const{isReadOnly:e,displayMode:t,id:a,isFake:n}=this.props,{isProcessing:s,isAuthenticated:o,title:l,id:r,wasChanges:c,isAutoSaveEnabled:h,isSharingEnabled:d}=this.state,u={displayMode:t,isReadOnly:e,isAuthenticated:o,isProcessing:s,wasChanges:c,title:l,
id:a,chartId:null!==r?r:void 0,dataNameSaveMenu:n?void 0:"save-load-menu",onCloneChart:this._handleClickClone,onSaveChart:this._handleClickSave,onSaveChartFromMenu:this._handleClickSaveFromMenu,onRenameChart:this._handleClickRename,onSaveAsChart:this._handleClickSaveAs,onLoadChart:this._handleClickLoad};return i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},e=>i.createElement(yt,{...u,isTabletSmall:e}))}_onLoginStateChange(){this.setState({isAuthenticated:window.is_authenticated})}_trackEvent(e){0}}kt.contextType=ft;var Mt=a(20301),Et=a(95792),Tt=a(82029);const xt=new Et.DateTimeFormatter({dateTimeSeparator:"_",timeFormat:"%h-%m-%s"}),It={takeSnapshot:(0,o.t)("Take a snapshot")},At=(0,E.registryContextType)();const Rt=o.t("Loading...");function Nt(e,t,a){return async function(e,t,a){const n=URL.createObjectURL(new Blob([`<!doctype html><html style="background-color:${getComputedStyle(document.documentElement).backgroundColor}"><head><meta charset="utf-8"><title>${Rt}</title></head><body style="background-color:${getComputedStyle(document.body).backgroundColor}"></body></html>`],{type:"text/html"}));try{const i=open(n,t,a);if(!i)throw new Error("cound not open a new tab");const s=await e.catch(()=>{});void 0!==s?i.location.replace(s):i.close()}finally{URL.revokeObjectURL(n)}}(e,t,a)}var Ft=a(65446),Ht=a(58455),zt=a(91887);function Pt(e){const t=v(e.isLoading&&zt.hidden),a=v(!e.isLoading&&zt.hidden);return i.createElement("div",null,i.createElement("span",{className:t},e.children),i.createElement("span",{className:a},i.createElement(ne.Loader,null)))}var Dt=a(76974),Lt=a(60498),Wt=a(17191),Ot=a(37402),Ut=a(50377),Bt=a(86149),Vt=a(75492);const Gt=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,Vt);function Zt(e){const{serverSnapshot:t,clientSnapshot:n}=e,[s,l]=(0,i.useState)(!1),[r,c]=(0,i.useState)(!1),[h,d]=(0,i.useState)(!1),m=(0,Dt.useIsMounted)(),p=(0,i.useCallback)(async()=>{var e;const t=n(),a=t.then(e=>new Promise(t=>e.canvas.toBlob(e=>{null!==e&&t(e)})));try{await(0,Ft.writePromiseUsingApi)(a,"image/png"),re.emit("onClientScreenshotCopiedToClipboard")}catch(a){const{canvas:n}=await t;null===(e=window.open())||void 0===e||e.document.write(`<img width="100%" src="${n.toDataURL()}"/>`)}},[n]),g=(0,i.useCallback)(async()=>{const e=await n(),t=await function(e){return new Promise(t=>{try{e.canvas.toBlob(e=>{if(null===e)throw new Error("Unable to generate blob");t(URL.createObjectURL(e))})}catch(a){t(e.canvas.toDataURL())}})}(e);t&&(0,Ht.downloadFile)(e.name+".png",t)},[n]),b=e=>Nt(e.then(e=>e.imageUrl)),S=(0,i.useCallback)(async(e=!1)=>{const a=t();try{if(e)await b(a);else{const e=a.then(e=>new Blob([e.imageUrl],{type:"text/plain"}));await(0,Ft.writePromiseUsingApi)(e,"text/plain"),re.emit("onServerScreenshotCopiedToClipboard")}return!0}catch(e){return b(a),!0}finally{m.current&&(c(!1),l(!1),(0,Pe.globalCloseMenu)())}},[t]),C=(0,i.useCallback)(async()=>{d(!0);const[e,n]=await Promise.all([a.e(4665).then(a.bind(a,2679)),t()]);e.Twitter.shareSnapshotInstantly(n.symbol,n.imageUrl),
m.current&&(d(!1),(0,Pe.globalCloseMenu)())},[t]);return i.createElement(i.Fragment,null,i.createElement(u.PopupMenuItem,{"data-name":"save-chart-image",label:(0,o.t)("Save chart image"),icon:Ot,onClick:g,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Mod+Z.Modifiers.Alt+83),theme:Gt}),i.createElement(u.PopupMenuItem,{"data-name":"copy-chart-image",label:(0,o.t)("Copy chart image"),icon:Wt,onClick:p,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Mod+Z.Modifiers.Shift+83),theme:Gt}),i.createElement(u.PopupMenuItem,{"data-name":"copy-link-to-the-chart-image",label:i.createElement(Pt,{isLoading:s},(0,o.t)("Copy link to the chart image")),icon:Ut,onClick:()=>{l(!0),S(!1)},dontClosePopup:!0,isDisabled:s,shortcut:(0,Z.humanReadableHash)(Z.Modifiers.Alt+83),className:v(s&&Vt.loading),theme:Gt}),i.createElement(u.PopupMenuItem,{"data-name":"open-image-in-new-tab",label:i.createElement(Pt,{isLoading:r},(0,o.t)("Open image in new tab")),icon:Bt,onClick:()=>{c(!0),S(!0)},dontClosePopup:!0,isDisabled:r,className:v(r&&Vt.loading),theme:Gt}),i.createElement(u.PopupMenuItem,{"data-name":"tweet-chart-image",label:i.createElement(Pt,{isLoading:h},(0,o.t)("Tweet chart image")),icon:Lt,onClick:C,dontClosePopup:!0,isDisabled:h,className:v(h&&Vt.loading),theme:Gt}))}var Yt=a(84015);function Qt(e){const[t,a]=(0,i.useState)(!1),n=(0,Dt.useIsMounted)(),s=(0,i.useCallback)(async()=>{a(!0),await e.serverSnapshot(),n.current&&a(!1)},[e.serverSnapshot]);return i.createElement(S.ToolWidgetButton,{id:e.id,className:e.className,isDisabled:t,onClick:s,title:e.tooltip,icon:e.icon})}var qt=a(62346);const Kt=(jt=function(e){return(0,Yt.isOnMobileAppPage)("any")?i.createElement(Qt,{...e,icon:qt}):i.createElement(m.ToolWidgetMenu,{content:i.createElement(S.ToolWidgetButton,{id:e.id,className:e.className,title:e.tooltip,icon:qt}),drawerPosition:"Bottom",drawerBreakpoint:k.DialogBreakpoints.TabletSmall,arrow:!1,onClick:function(){}},i.createElement(Zt,{...e}))},(Jt=class extends i.PureComponent{constructor(e,t){super(e,t),this._clientSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol();return{canvas:await this.context.chartWidgetCollection.clientSnapshot(),name:`${(0,Tt.shortName)(e)}_${xt.formatLocal(new Date)}`}},this._serverSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol(),t=await this.context.chartWidgetCollection.takeScreenshot(),a=n.enabled("charting_library_base")&&void 0!==this.context.snapshotUrl?t:(0,Mt.convertImageNameToUrl)(t);return{symbol:(0,Tt.shortName)(e),imageUrl:a}},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return i.createElement(jt,{id:t,className:e,tooltip:It.takeSnapshot,serverSnapshot:this._serverSnapshot,clientSnapshot:this._clientSnapshot})}}).contextType=At,Jt);var jt,Jt,Xt=a(38318),$t=a(39362),ea=a(11181);class ta{async show(e){if(null!==ta._provider){const e=await ta._provider.getSymbol()
;return l.linking.symbol.setValue(e.symbol),e}if(ta._currentShowingInstance)throw new DOMException("SymbolSearchUI is already shown","InvalidStateError");try{ta._currentShowingInstance=this,ta.preload();const t=await ta._implementation;return(0,X.assert)(null!==t),new Promise(a=>{t.showDefaultSearchDialog({...e,onSearchComplete:e=>{a({symbol:e})}})})}finally{ta._currentShowingInstance=null}}static setProvider(e){this._provider=e}static preload(){null===this._provider&&null===this._implementation&&(this._implementation=(0,ea.loadNewSymbolSearch)())}}ta._currentShowingInstance=null,ta._provider=null,ta._implementation=null;var aa=a(67397),na=a(72597);const ia=(0,ct.mergeThemes)(S.DEFAULT_TOOL_WIDGET_BUTTON_THEME,aa);(0,ct.mergeThemes)(ia,na);class sa extends i.PureComponent{constructor(e){super(e),this._openSymbolSearchDialog=async e=>{if((0,Z.modifiersFromEvent)(e)!==Z.Modifiers.Alt)try{(0,D.trackEvent)("GUI","SS","main search"),await(new ta).show({defaultValue:this._isSpread(this.state.symbol)?this.state.symbol:this.state.shortName,showSpreadActions:(0,Xt.canShowSpreadActions)()&&this.props.isActionsVisible,source:"searchBar",footer:Te.mobiletouch?void 0:i.createElement($t.SymbolSearchDialogFooter,null,(0,o.t)("Simply start typing while on the chart to pull up this search box"))})}catch(e){}else navigator.clipboard.writeText(this.state.symbol)},this._isSpread=e=>!1,this._onSymbolChanged=()=>{const e=l.linking.symbol.value();this.setState({symbol:e,shortName:oa()})},this.state={symbol:l.linking.symbol.value(),shortName:oa()}}componentDidMount(){l.linking.symbol.subscribe(this._onSymbolChanged),l.linking.seriesShortSymbol.subscribe(this._onSymbolChanged),ta.preload()}componentWillUnmount(){l.linking.symbol.unsubscribe(this._onSymbolChanged),l.linking.seriesShortSymbol.unsubscribe(this._onSymbolChanged)}render(){const{id:e,className:t}=this.props;return i.createElement(S.ToolWidgetButton,{id:e,className:p()(t,n.enabled("uppercase_instrument_names")&&aa.uppercase,aa.largeLeftPadding),theme:ia,icon:void 0,text:this.state.shortName,title:(0,o.t)("Symbol Search"),onClick:this._openSymbolSearchDialog})}async _updateQuotes(e){}}function oa(){return l.linking.seriesShortSymbol.value()||l.linking.symbol.value()||""}var la=a(52157);class ra extends i.PureComponent{constructor(){super(...arguments),this._handleClick=e=>{e.stopPropagation();const{onApply:t,item:a}=this.props;t(a)}}render(){const{className:e,item:t}=this.props;return i.createElement("div",{className:v(e,la.item,"apply-common-tooltip"),onClick:this._handleClick,title:t.name},i.createElement("div",{className:la.round},t.name.length>0?t.name[0].toUpperCase():" "))}}var ca=a(23177),ha=a(75668);function da(e){return i.createElement("div",{className:v(ha.description,e.className)},e.children)}var ua=a(14621);const ma=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:ua.labelRow,toolbox:ua.toolbox,item:ua.titleItem}),va=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:ua.labelRow,toolbox:ua.toolbox,item:ua.titleItemTabletSmall}),pa=(0,
ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{item:ua.item}),ga=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,{item:ua.itemTabletSmall});function ba(e){const{item:t,onApply:a,onRemove:n,onFavor:s,favorite:o,isFavoritingAllowed:l,isTabletSmall:r}=e,[c,d]=(0,Ee.useHover)(),m=t.meta_info,v=m?(0,ca.descriptionString)(m.indicators):void 0,g=r?va:ma,b=r?ga:pa,S=(0,i.useCallback)(()=>a(t),[a,t]),C=(0,i.useCallback)(()=>n(t),[n,t]),_=(0,i.useCallback)(()=>{s&&s(t)},[s,t]);return i.createElement("div",{...d,className:ua.wrap,"data-name":t.name,"data-id":t.id,"data-is-default":Boolean(t.is_default)},i.createElement(u.PopupMenuItem,{theme:g,label:t.name,labelRowClassName:p()(r&&ua.itemLabelTabletSmall),isHovered:c,showToolboxOnHover:!o&&!c,onClick:S,toolbox:i.createElement(i.Fragment,null,!t.is_default&&i.createElement(Me.RemoveButton,{key:"remove",hidden:!Te.touch&&!c,onClick:C}),Boolean(s)&&l&&i.createElement(h.FavoriteButton,{key:"favorite",isFilled:Boolean(o),onClick:_}))}),v&&i.createElement(u.PopupMenuItem,{theme:b,label:i.createElement(da,{className:p()(ua.description,r&&ua.descriptionTabletSmall)},v),onClick:S,isHovered:c}))}var Sa=a(25382),Ca=a(41939);const _a=(0,ct.mergeThemes)(u.DEFAULT_POPUP_MENU_ITEM_THEME,Ca),wa={text:(0,ut.appendEllipsis)((0,o.t)("Save Indicator template"))};function ya(e){const{onClick:t,isTabletSmall:a}=e;return i.createElement(u.PopupMenuItem,{theme:_a,className:Ca.wrap,label:i.createElement("div",{className:Ca.titleWrap},i.createElement("div",{className:p()(Ca.title,a&&Ca.titleTabletSmall)},i.createElement(d.Icon,{className:Ca.icon,icon:Sa}),i.createElement("div",{className:Ca.text},wa.text))),onClick:t})}var fa=a(36947),ka=a(64706);const Ma=i.createContext(null);var Ea=a(89227);function Ta(e){const{templates:t,favorites:a,onTemplateSave:n,onTemplateRemove:s,onTemplateSelect:o,onTemplateFavorite:l,isTabletSmall:r,isLoading:c}=e,h=(0,i.useMemo)(()=>t.filter(e=>e.is_default),[t]),d=(0,i.useMemo)(()=>t.filter(e=>!e.is_default),[t]),u=(0,i.useMemo)(()=>new Set(a.map(e=>e.name)),[a]),m=(0,i.useContext)(Ma),v=(0,i.useContext)(ka.MenuContext),g=(0,fa.useForceUpdate)();(0,i.useEffect)(()=>{if(null!==m){const e={};return m.getOnChange().subscribe(e,()=>{g(),v&&v.update()}),()=>m.getOnChange().unsubscribeAll(e)}return()=>{}},[]);const b=e=>i.createElement(ba,{key:e.name,item:e,isFavoritingAllowed:Boolean(l),favorite:u.has(e.name),onApply:o,onFavor:l,onRemove:s,isTabletSmall:r});return i.createElement("div",{className:p()(Ea.menu,r&&Ea.menuSmallTablet)},i.createElement(ya,{onClick:n,isTabletSmall:r}),c&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(se,null)),!c&&(r?i.createElement(xa,{defaults:h,customs:d,render:b}):i.createElement(Ia,{defaults:h,customs:d,render:b,state:m})))}function xa(e){const{defaults:t,customs:a,render:n}=e;return i.createElement(i.Fragment,null,a.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(le,{className:Ea.menuItemHeaderTabletSmall},(0,
o.t)("My templates")),a.map(n)),t.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(le,{className:Ea.menuItemHeaderTabletSmall},(0,o.t)("Default templates")),t.map(n)))}function Ia(e){const{defaults:t,customs:a,render:n,state:s}=e;return i.createElement(i.Fragment,null,a.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(le,{className:Ea.menuItemHeader},(0,o.t)("My templates")),a.map(n)),a.length>0&&t.length>0&&s&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(Ne.CollapsibleSection,{summary:(0,o.t)("Default templates"),open:!s.get().defaultsCollapsed,onStateChange:e=>s.set({defaultsCollapsed:!e})},t.map(n))),0===a.length&&t.length>0&&i.createElement(i.Fragment,null,i.createElement(y.PopupMenuSeparator,null),i.createElement(le,{className:Ea.menuItemHeader},(0,o.t)("Default templates")),t.map(n)))}var Aa=a(52714),Ra=a.n(Aa);class Na{constructor(e,t){var a,i;this._isFavoriteEnabled=n.enabled("items_favoriting"),this.handleFavorTemplate=e=>{if(!this._isFavoriteEnabled)return;const{name:t}=e;this._isTemplateFavorite(t)?this._removeFavoriteTemplate(t):this._addFavoriteTemplate(t)},this.handleDropdownOpen=()=>{this._setState({isLoading:!0}),this._studyTemplates.invalidate(),this._studyTemplates.refreshStudyTemplateList(()=>this._setState({isLoading:!1}))},this.handleApplyTemplate=e=>{this._studyTemplates.applyTemplate(e.name)},this.handleRemoveTemplate=e=>{this._studyTemplates.deleteStudyTemplate(e.name)},this.handleSaveTemplate=()=>{this._studyTemplates.showSaveAsDialog()},this._studyTemplates=e,this._favoriteStudyTemplatesService=t;const s=(null===(a=this._favoriteStudyTemplatesService)||void 0===a?void 0:a.get())||[],o=this._studyTemplates.list();this._state=new(Ra())({isLoading:!1,studyTemplatesList:o,favorites:s}),this._studyTemplates.getOnChange().subscribe(this,this._handleTemplatesChange),this._studyTemplates.refreshStudyTemplateList(),this._isFavoriteEnabled&&(null===(i=this._favoriteStudyTemplatesService)||void 0===i||i.getOnChange().subscribe(this,this._handleFavoritesChange))}destroy(){var e;this._studyTemplates.getOnChange().unsubscribe(this,this._handleTemplatesChange),this._isFavoriteEnabled&&(null===(e=this._favoriteStudyTemplatesService)||void 0===e||e.getOnChange().unsubscribe(this,this._handleFavoritesChange))}state(){return this._state.readonly()}_setState(e){this._state.setValue({...this._state.value(),...e})}_handleTemplatesChange(){this._setState({studyTemplatesList:this._studyTemplates.list()})}_handleFavoritesChange(e){this._isFavoriteEnabled&&this._setState({favorites:e})}_removeFavoriteTemplate(e){var t;const{favorites:a}=this._state.value();null===(t=this._favoriteStudyTemplatesService)||void 0===t||t.set(a.filter(t=>t!==e))}_addFavoriteTemplate(e){var t;const{favorites:a}=this._state.value();null===(t=this._favoriteStudyTemplatesService)||void 0===t||t.set([...a,e])}_isTemplateFavorite(e){const{favorites:t}=this._state.value();return t.includes(e)}}
var Fa=a(36257),Ha=a(73887);const za={title:(0,o.t)("Templates"),tooltip:(0,o.t)("Indicator Templates")},Pa=(0,E.registryContextType)();class Da extends i.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({...e,isActive:this.state.isActive})},this._handleApplyTemplate=e=>{this._handleClose(),this._model.handleApplyTemplate(e)},this._handleRemoveTemplate=e=>{this._handleClose(),this._model.handleRemoveTemplate(e)},this._handleClose=()=>{this._handleToggleDropdown(!1)},this._handleToggleDropdown=e=>{const{isActive:t}=this.state,a="boolean"==typeof e?e:!t;this.setState({isActive:a})},(0,E.validateRegistry)(t,{favoriteStudyTemplatesService:s.any,studyTemplates:s.any.isRequired,templatesMenuViewStateService:s.any});const{favoriteStudyTemplatesService:a,studyTemplates:n}=t;this._model=new Na(n,a),this.state={...this._model.state().value(),isActive:!1}}componentDidMount(){this._model.state().subscribe(this._updateState)}componentWillUnmount(){this._model.state().unsubscribe(this._updateState),this._model.destroy()}render(){const{studyTemplatesList:e,favorites:t}=this.state,{isShownQuicks:a,className:n,displayMode:s,id:o}=this.props;return i.createElement(Ma.Provider,{value:this.context.templatesMenuViewStateService||null},i.createElement(La,{id:o,className:n,mode:s,templates:e,favorites:t,onMenuOpen:this._model.handleDropdownOpen,onTemplateFavorite:a?this._model.handleFavorTemplate:void 0,onTemplateSelect:this._handleApplyTemplate,onTemplateRemove:this._handleRemoveTemplate,onTemplateSave:this._model.handleSaveTemplate}))}}function La(e){const{id:t,className:a,mode:n,favorites:s,templates:o,isMenuOpen:l,onTemplateSelect:r,onTemplateSave:c,onTemplateFavorite:h,onTemplateRemove:d}=e,u=p()(a,Ha.wrap,{[Ha.full]:"full"===n,[Ha.medium]:"medium"===n}),v=o.filter(e=>s.includes(e.name)),g="small"!==n&&h&&v.length>0;return i.createElement(b,{id:t,className:u},i.createElement(f.MatchMedia,{rule:k.DialogBreakpoints.TabletSmall},t=>i.createElement(m.ToolWidgetMenu,{onOpen:e.onMenuOpen,isDrawer:t,drawerPosition:"Bottom",arrow:!1,content:i.createElement(P,{className:p()(g&&Ha.buttonWithFavorites),displayMode:n,isOpened:l,icon:Fa,text:L.hasNewHeaderToolbarStyles?void 0:za.title,title:za.tooltip,forceInteractive:!0,collapseWhen:L.hasNewHeaderToolbarStyles?["full","medium","small"]:void 0}),onClick:S},i.createElement(Ta,{onTemplateSave:c,onTemplateSelect:r,onTemplateRemove:d,onTemplateFavorite:h,templates:o,favorites:v,isTabletSmall:t}))),g&&i.createElement(Wa,{favorites:v,onTemplateSelect:function(e){r(e),S()}}));function S(){0}}function Wa(e){return i.createElement(i.Fragment,null,e.favorites.map((t,a,n)=>i.createElement(ra,{key:t.name,item:t,onApply:e.onTemplateSelect,className:p()({[Ha.first]:0===a,[Ha.last]:a===n.length-1})})))}Da.contextType=Pa;a(94419);var Oa=a(4039),Ua=a(82559),Ba=a(55576),Va=a(17717),Ga=a(76294);const Za={undoHint:(0,o.t)("Undo {hint}"),redoHint:(0,o.t)("Redo {hint}")},Ya={undoHotKey:(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"Z"],text:"{0} + {1}"}),
redoHotKey:(0,G.hotKeySerialize)({keys:[(0,Z.humanReadableModifiers)(Z.Modifiers.Mod,!1),"Y"],text:"{0} + {1}"})},Qa=(0,ct.weakComposeClasses)(Ba,Oa,{buttonUndo:"button",buttonRedo:"button"}),qa=(0,ct.mergeThemes)(Ba,Ua),Ka={...Ba,button:Qa.buttonUndo},ja={...Ba,button:Qa.buttonRedo},Ja=(0,E.registryContextType)();class Xa extends i.PureComponent{constructor(e,t){super(e,t),this._batched=null,this._handleClickUndo=()=>{(0,D.trackEvent)("GUI","Undo");const{chartWidgetCollection:e}=this.context;e.undoHistory.undo()},this._handleClickRedo=()=>{(0,D.trackEvent)("GUI","Redo");const{chartWidgetCollection:e}=this.context;e.undoHistory.redo()},(0,E.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state=this._getStateFromUndoHistory()}componentDidMount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().subscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().subscribe(this,this._onChangeStack)}componentWillUnmount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().unsubscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().unsubscribe(this,this._onChangeStack),this._batched=null}render(){const{id:e}=this.props,{isEnabledRedo:t,isEnabledUndo:a,redoStack:n,undoStack:s}=this.state;return i.createElement(b,{id:e},i.createElement(S.ToolWidgetButton,{icon:Va,isDisabled:!a,onClick:this._handleClickUndo,title:a?Za.undoHint.format({hint:s}):void 0,"data-tooltip-hotkey":a?Ya.undoHotKey:void 0,theme:L.hasNewHeaderToolbarStyles?qa:Ka}),i.createElement(S.ToolWidgetButton,{icon:Ga,isDisabled:!t,onClick:this._handleClickRedo,title:t?Za.redoHint.format({hint:n}):void 0,"data-tooltip-hotkey":t?Ya.redoHotKey:void 0,theme:L.hasNewHeaderToolbarStyles?qa:ja}))}_onChangeStack(){null===this._batched&&(this._batched=Promise.resolve().then(()=>{if(null===this._batched)return;this._batched=null;const e=this._getStateFromUndoHistory();this.setState(e)}))}_getStateFromUndoHistory(){const{chartWidgetCollection:e}=this.context,t=e.undoHistory.undoStack(),a=e.undoHistory.redoStack(),n=a.head(),i=t.head();return{isEnabledRedo:!a.isEmpty(),isEnabledUndo:!t.isEmpty(),redoStack:n?n.text().translatedText():"",undoStack:i?i.text().translatedText():""}}}Xa.contextType=Ja;var $a=a(87995),en=a(9837);class tn extends i.PureComponent{constructor(){super(...arguments),this._ref=null,this._update=()=>{this.forceUpdate()},this._setRef=e=>{this._ref=e},this._handleMeasure=({width:e})=>{this.props.width.setValue(e)}}componentDidMount(){const{element:e,isFake:t,width:a}=this.props;if(t)a.subscribe(this._update);else{const t=(0,X.ensureNotNull)(this._ref);$a.findDOMNode(t).appendChild(e)}}componentWillUnmount(){const{width:e,isFake:t}=this.props;t&&e.unsubscribe(this._update)}render(){const{isFake:e=!1,width:t}=this.props;return i.createElement(en,{shouldMeasure:!e,whitelist:["width"],onMeasure:this._handleMeasure},i.createElement(b,{ref:this._setRef,style:e?{width:t.value()}:void 0,"data-is-custom-header-element":!0}))}}function an(e){
const{displayMode:t,params:a}=e;return i.createElement(m.ToolWidgetMenu,{content:i.createElement(P,{collapseWhen:void 0!==a.icon?void 0:[],displayMode:t,icon:a.icon,text:a.title,title:a.tooltip,"data-name":"dropdown","data-is-custom-header-element":!0}),drawerPosition:"Bottom",drawerBreakpoint:k.DialogBreakpoints.TabletSmall,arrow:!1},a.items.map((e,t)=>i.createElement(u.PopupMenuItem,{key:t,label:e.title,onClick:()=>e.onSelect(),"data-name":"dropdown-item"})))}var nn=a(33191);function sn(e){const{className:t,...a}=e;return i.createElement(P,{...a,className:v(t,nn.customTradingViewStyleButton,nn.withoutIcon),collapseWhen:[],"data-name":"custom-tradingview-styled-button"})}function on(){return{Bars:n.enabled("header_chart_type")?F:void 0,Compare:n.enabled("header_compare")?B:void 0,Custom:tn,CustomTradingViewStyledButton:sn,Fullscreen:n.enabled("header_fullscreen_button")?J:void 0,Indicators:n.enabled("header_indicators")?ve:void 0,Intervals:n.enabled("header_resolutions")?Ge:void 0,OpenPopup:Ke,Properties:n.enabled("header_settings")&&n.enabled("show_chart_property_page")?$e:void 0,SaveLoad:n.enabled("header_saveload")?kt:void 0,Screenshot:n.enabled("header_screenshot")?Kt:void 0,SymbolSearch:n.enabled("header_symbol_search")?sa:void 0,Templates:n.enabled("study_templates")?Da:void 0,Dropdown:an,UndoRedo:n.enabled("header_undo_redo")?Xa:void 0,Layout:void 0}}},23177:(e,t,a)=>{"use strict";a.d(t,{createStudyTemplateMetaInfo:()=>i,descriptionString:()=>s});var n=a(81851);function i(e,t){return{indicators:e.orderedDataSources(!0).filter(e=>(0,n.isStudy)(e)&&!0).map(e=>({id:e.metaInfo().id,description:e.title(!0,void 0,!0)})),interval:t}}function s(e){const t=new Map;return e.forEach(e=>{const[a,n]=t.get(e.id)||[e.description,0];t.set(e.id,[a,n+1])}),Array.from(t.values()).map(([e,t])=>`${e}${t>1?" x "+t:""}`).join(", ")}},55402:(e,t,a)=>{"use strict";a.d(t,{validateRegistry:()=>l,RegistryProvider:()=>r,registryContextType:()=>c});var n=a(59496),i=a(19036),s=a.n(i);const o=n.createContext({});function l(e,t){s().checkPropTypes(t,e,"context","RegistryContext")}function r(e){const{validation:t,value:a}=e;return l(a,t),n.createElement(o.Provider,{value:a},e.children)}function c(){return o}},37466:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SERIES_ICONS:()=>u});var n=a(8774),i=a(9322),s=a(14409),o=a(97567),l=a(84051),r=a(21610),c=a(65316),h=a(35361),d=a(92628);const u={3:n,0:i,1:s,8:o,9:l,2:r,10:c,12:h,13:d}},20301:(e,t,a)=>{"use strict";a.d(t,{convertImageNameToUrl:()=>s});var n=a(67337),i=a(76861);function s(e){return n.enabled("charting_library_base")||(0,i.isProd)()?"https://www.tradingview.com/x/"+e+"/":window.location.protocol+"//"+window.location.host+"/x/"+e+"/"}},58455:(e,t,a)=>{"use strict";function n(e,t){const a=document.createElement("a");a.style.display="none",a.href=t,a.download=e,a.click()}a.d(t,{downloadFile:()=>n})},24437:(e,t,a)=>{"use strict";a.d(t,{DialogBreakpoints:()=>i});var n=a(96746);const i={SmallHeight:n["small-height-breakpoint"],TabletSmall:n["tablet-small-breakpoint"],
TabletNormal:n["tablet-normal-breakpoint"]}},39362:(e,t,a)=>{"use strict";a.d(t,{SymbolSearchDialogFooter:()=>l});var n=a(59496),i=a(97754),s=a.n(i),o=a(72142);function l(e){const{className:t,children:a}=e;return n.createElement("div",{className:s()(o.footer,t)},a)}},36189:(e,t,a)=>{"use strict";a.d(t,{FavoriteButton:()=>d});var n=a(28353),i=a(59496),s=a(97754),o=a(9745),l=a(20614),r=a(55783),c=a(16842);const h={add:(0,n.t)("Add to favorites"),remove:(0,n.t)("Remove from favorites")};function d(e){const{className:t,isFilled:a,isActive:n,onClick:d,...u}=e;return i.createElement(o.Icon,{...u,className:s(c.favorite,"apply-common-tooltip",a&&c.checked,n&&c.active,t),icon:a?l:r,onClick:d,title:a?h.remove:h.add})}},36947:(e,t,a)=>{"use strict";a.d(t,{useForceUpdate:()=>i});var n=a(59496);const i=()=>{const[,e]=(0,n.useReducer)((e,t)=>e+1,0);return e}},70412:(e,t,a)=>{"use strict";a.d(t,{hoverMouseEventFilter:()=>s,useAccurateHover:()=>o,useHover:()=>i});var n=a(59496);function i(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseOver:function(e){s(e)&&t(!0)},onMouseOut:function(e){s(e)&&t(!1)}}]}function s(e){return!e.currentTarget.contains(e.relatedTarget)}function o(e){const[t,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const t=t=>{if(null===e.current)return;const n=e.current.contains(t.target);a(n)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)},[]),t}},81332:(e,t,a)=>{"use strict";a.d(t,{multilineLabelWithIconAndToolboxTheme:()=>o});var n=a(40173),i=a(23576),s=a(63095);const o=(0,n.mergeThemes)(i,s)},51613:(e,t,a)=>{"use strict";a.d(t,{PopupMenuSeparator:()=>l});var n=a(59496),i=a(97754),s=a.n(i),o=a(524);function l(e){const{size:t="normal",className:a}=e;return n.createElement("div",{className:s()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"===t&&o.large,a)})}},96040:(e,t,a)=>{"use strict";a.d(t,{RemoveButton:()=>h});var n=a(28353),i=a(59496),s=a(97754),o=a(9745),l=a(73366),r=a(73432);const c={remove:(0,n.t)("Remove")};function h(e){const{className:t,isActive:a,onClick:n,onMouseDown:h,title:d,hidden:u,"data-name":m="remove-button",...v}=e;return i.createElement(o.Icon,{...v,"data-name":m,className:s(r.button,"apply-common-tooltip",a&&r.active,u&&r.hidden,t),icon:l,onClick:n,onMouseDown:h,title:d||c.remove})}},40173:(e,t,a)=>{"use strict";function n(e,t,a={}){const n=Object.assign({},t);for(const i of Object.keys(t)){const s=a[i]||i;s in e&&(n[i]=[e[s],t[i]].join(" "))}return n}function i(e,t,a={}){return Object.assign({},e,n(e,t,a))}a.d(t,{weakComposeClasses:()=>n,mergeThemes:()=>i})},15392:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5V11h1V8.5C7 7.67 7.67 7 8.5 7H11V6H8.5zM6 17v2.5A2.5 2.5 0 0 0 8.5 22H11v-1H8.5A1.5 1.5 0 0 1 7 19.5V17H6zM19.5 7H17V6h2.5A2.5 2.5 0 0 1 22 8.5V11h-1V8.5c0-.83-.67-1.5-1.5-1.5zM22 19.5V17h-1v2.5c0 .83-.67 1.5-1.5 1.5H17v1h2.5a2.5 2.5 0 0 0 2.5-2.5z"/></svg>'},86149:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5v11A2.5 2.5 0 0 0 8.5 22h11a2.5 2.5 0 0 0 2.5-2.5v-3h-1v3c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 19.5v-11C7 7.67 7.67 7 8.5 7h3V6h-3zm7 1h4.8l-7.49 7.48.71.7L21 7.72v4.79h1V6h-6.5v1z"/></svg>'},8774:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M12.5 17.207L18.707 11h2l3.647-3.646-.708-.708L20.293 10h-2L12.5 15.793l-3-3-4.854 4.853.708.708L9.5 14.207z"/><path d="M9 16h1v1H9zm1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-3-3h1v1H8zm-1 1h1v1H7zm-1 1h1v1H6zm2 0h1v1H8zm-1 1h1v1H7zm-2 0h1v1H5zm17-9h1v1h-1zm1-1h1v1h-1zm0 2h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-5-7h1v1h-1zm2 0h1v1h-1zm1-1h1v1h-1zm-2 2h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-2-6h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-3-3h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1z"/></svg>'},9322:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor" stroke-linecap="square"><path d="M10.5 7.5v15M7.5 20.5H10M13.5 11.5H11M19.5 6.5v15M16.5 9.5H19M22.5 16.5H20"/></g></svg>'},65316:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor"><path stroke-dasharray="1,1" d="M4 14.5h22"/><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 12.5l2-4 1 2 2-4 3 6"/><path stroke-linecap="round" d="M5.5 16.5l-1 2"/><path stroke-linecap="round" stroke-linejoin="round" d="M17.5 16.5l2 4 2-4m2-4l1-2-1 2z"/></g></svg>'},14409:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v12h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v3.5h-1zm0 16.5h1V24h-1z"/></svg>'},25382:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none"><path stroke="currentColor" d="M11 20.5H7.5a5 5 0 1 1 .42-9.98 7.5 7.5 0 0 1 14.57 2.1 4 4 0 0 1-1 7.877H18"/><path stroke="currentColor" d="M14.5 24V12.5M11 16l3.5-3.5L18 16"/></g></svg>'},92628:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M12 7v14h5V7h-5Zm4 1h-3v12h3V8ZM19 15v6h5v-6h-5Zm4 1h-3v4h3v-4ZM5 12h5v9H5v-9Zm1 1h3v7H6v-7Z"/></svg>'},2323:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.5 6a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM4 14.5a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0z"/><path fill="currentColor" d="M9 14h4v-4h1v4h4v1h-4v4h-1v-4H9v-1z"/></svg>'},90711:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path d="M21 7v4h1V6h-5v1z"/><path d="M16.854 11.854l5-5-.708-.708-5 5zM7 7v4H6V6h5v1z"/><path d="M11.146 11.854l-5-5 .708-.708 5 5zM21 21v-4h1v5h-5v-1z"/><path d="M16.854 16.146l5 5-.708.708-5-5z"/><g><path d="M7 21v-4H6v5h5v-1z"/><path d="M11.146 16.146l-5 5 .708.708 5-5z"/></g></g></svg>'},97567:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M9 8v12h3V8H9zm-1-.502C8 7.223 8.215 7 8.498 7h4.004c.275 0 .498.22.498.498v13.004a.493.493 0 0 1-.498.498H8.498A.496.496 0 0 1 8 20.502V7.498z"/><path d="M10 4h1v3.5h-1z"/><path d="M17 6v6h3V6h-3zm-1-.5c0-.276.215-.5.498-.5h4.004c.275 0 .498.23.498.5v7c0 .276-.215.5-.498.5h-4.004a.503.503 0 0 1-.498-.5v-7z"/><path d="M18 2h1v3.5h-1z"/></svg>'},35361:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7.5 7H7v14h5V7H7.5zM8 20V8h3v12H8zm7.5-11H15v10h5V9h-4.5zm.5 9v-8h3v8h-3z"/></svg>'},84051:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v11h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-12a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v5h-1zm0 14h1v5h-1zM8.5 9H10v1H8.5zM11 9h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11z"/></svg>'},60373:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M20 17l-5 5M15 17l5 5M9 11.5h7M17.5 8a2.5 2.5 0 0 0-5 0v11a2.5 2.5 0 0 1-5 0"/></svg>'},21610:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M11.982 16.689L17.192 12h3.033l4.149-4.668-.748-.664L19.776 11h-2.968l-4.79 4.311L9 12.293l-4.354 4.353.708.708L9 13.707z"/></svg>'},74034:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" width="21" height="21"><g fill="none" stroke="currentColor"><path d="M18.5 11v5.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2H9"/><path stroke-linecap="square" d="M18 2l-8.5 8.5m4-9h5v5"/></g></svg>'},28289:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor" fill-rule="evenodd"><path fill-rule="nonzero" d="M14 17a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-1a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/><path d="M5.005 16A1.003 1.003 0 0 1 4 14.992v-1.984A.998.998 0 0 1 5 12h1.252a7.87 7.87 0 0 1 .853-2.06l-.919-.925c-.356-.397-.348-1 .03-1.379l1.42-1.42a1 1 0 0 1 1.416.007l.889.882A7.96 7.96 0 0 1 12 6.253V5c0-.514.46-1 1-1h2c.557 0 1 .44 1 1v1.253a7.96 7.96 0 0 1 2.06.852l.888-.882a1 1 0 0 1 1.416-.006l1.42 1.42a.999.999 0 0 1 .029 1.377s-.4.406-.918.926a7.87 7.87 0 0 1 .853 2.06H23c.557 0 1 .447 1 1.008v1.984A.998.998 0 0 1 23 16h-1.252a7.87 7.87 0 0 1-.853 2.06l.882.888a1 1 0 0 1 .006 1.416l-1.42 1.42a1 1 0 0 1-1.415-.007l-.889-.882a7.96 7.96 0 0 1-2.059.852v1.248c0 .56-.45 1.005-1.008 1.005h-1.984A1.004 1.004 0 0 1 12 22.995v-1.248a7.96 7.96 0 0 1-2.06-.852l-.888.882a1 1 0 0 1-1.416.006l-1.42-1.42a1 1 0 0 1 .007-1.415l.882-.888A7.87 7.87 0 0 1 6.252 16H5.005zm3.378-6.193l-.227.34A6.884 6.884 0 0 0 7.14 12.6l-.082.4H5.005C5.002 13 5 13.664 5 14.992c0 .005.686.008 2.058.008l.082.4c.18.883.52 1.71 1.016 2.453l.227.34-1.45 1.46c-.004.003.466.477 1.41 1.422l1.464-1.458.34.227a6.959 6.959 0 0 0 2.454 1.016l.399.083v2.052c0 .003.664.005 1.992.005.005 0 .008-.686.008-2.057l.399-.083a6.959 6.959 0 0 0 2.454-1.016l.34-.227 1.46 1.45c.003.004.477-.466 1.422-1.41l-1.458-1.464.227-.34A6.884 6.884 0 0 0 20.86 15.4l.082-.4h2.053c.003 0 .005-.664.005-1.992 0-.005-.686-.008-2.058-.008l-.082-.4a6.884 6.884 0 0 0-1.016-2.453l-.227-.34 1.376-1.384.081-.082-1.416-1.416-1.465 1.458-.34-.227a6.959 6.959 0 0 0-2.454-1.016L15 7.057V5c0-.003-.664-.003-1.992 0-.005 0-.008.686-.008 2.057l-.399.083a6.959 6.959 0 0 0-2.454 1.016l-.34.227-1.46-1.45c-.003-.004-.477.466-1.421 1.408l1.457 1.466z"/></g></svg>'},76294:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M18.293 13l-2.647 2.646.707.708 3.854-3.854-3.854-3.854-.707.708L18.293 12H12.5A5.5 5.5 0 0 0 7 17.5V19h1v-1.5a4.5 4.5 0 0 1 4.5-4.5h5.793z"/></svg>'},62346:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.118 6a.5.5 0 0 0-.447.276L9.809 8H5.5A1.5 1.5 0 0 0 4 9.5v10A1.5 1.5 0 0 0 5.5 21h16a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 21.5 8h-4.309l-.862-1.724A.5.5 0 0 0 15.882 6h-4.764zm-1.342-.17A1.5 1.5 0 0 1 11.118 5h4.764a1.5 1.5 0 0 1 1.342.83L17.809 7H21.5A2.5 2.5 0 0 1 24 9.5v10a2.5 2.5 0 0 1-2.5 2.5h-16A2.5 2.5 0 0 1 3 19.5v-10A2.5 2.5 0 0 1 5.5 7h3.691l.585-1.17z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 18a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zm0 1a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9z"/></svg>'},36257:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M8 7h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM6 8c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V8zm11-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2V8zm-4 8H8a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm-3-1a2 2 0 0 0-2 2v3c0 1.1.9 2 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H8zm9 1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-3z"/></svg>'},17717:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.707 13l2.647 2.646-.707.708L6.792 12.5l3.853-3.854.708.708L8.707 12H14.5a5.5 5.5 0 0 1 5.5 5.5V19h-1v-1.5a4.5 4.5 0 0 0-4.5-4.5H8.707z"/></svg>'},73366:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path fill="currentColor" d="M9.707 9l4.647-4.646-.707-.708L9 8.293 4.354 3.646l-.708.708L8.293 9l-4.647 4.646.708.708L9 9.707l4.646 4.647.708-.707L9.707 9z"/></svg>'},16788:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"/></svg>'},37402:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M6.5 16v4.5a1 1 0 001 1h14a1 1 0 001-1V16M14.5 5V17m-4-3.5l4 4l4-4"/></svg>'},20614:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" d="M9 1l2.35 4.76 5.26.77-3.8 3.7.9 5.24L9 13l-4.7 2.47.9-5.23-3.8-3.71 5.25-.77L9 1z"/></svg>'},55783:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M9 2.13l1.903 3.855.116.236.26.038 4.255.618-3.079 3.001-.188.184.044.259.727 4.237-3.805-2L9 12.434l-.233.122-3.805 2.001.727-4.237.044-.26-.188-.183-3.079-3.001 4.255-.618.26-.038.116-.236L9 2.13z"/></svg>'},50377:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M19 15l2.5-2.5c1-1 1.5-3.5-.5-5.5s-4.5-1.5-5.5-.5L13 9M10 12l-2.5 2.5c-1 1-1.5 3.5.5 5.5s4.5 1.5 5.5.5L16 18M17 11l-5 5"/></svg>'},60498:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="#1DA1F2" d="M10.28 22.26c7.55 0 11.68-6.26 11.68-11.67v-.53c.8-.58 1.49-1.3 2.04-2.13-.74.33-1.53.54-2.36.65.85-.5 1.5-1.32 1.8-2.28-.78.48-1.66.81-2.6 1a4.1 4.1 0 00-7 3.74c-3.4-.17-6.43-1.8-8.46-4.29a4.1 4.1 0 001.28 5.48c-.68-.02-1.3-.2-1.86-.5v.05a4.11 4.11 0 003.29 4.02 4 4 0 01-1.85.08 4.1 4.1 0 003.83 2.85A8.23 8.23 0 014 20.43a11.67 11.67 0 006.28 1.83z"/></svg>'}}]);

View File

@@ -0,0 +1,5 @@
(()=>{"use strict";var e,a,d,c,f={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var d=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(d.exports,d,d.exports,b),d.loaded=!0,d.exports}b.m=f,b.c=t,e=[],b.O=(a,d,c,f)=>{if(!d){var t=1/0;for(i=0;i<e.length;i++){for(var[d,c,f]=e[i],r=!0,o=0;o<d.length;o++)(!1&f||t>=f)&&Object.keys(b.O).every(e=>b.O[e](d[o]))?d.splice(o--,1):(r=!1,f<t&&(t=f));if(r){e.splice(i--,1);var n=c();void 0!==n&&(a=n)}}return a}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[d,c,f]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);b.r(f);var t={};a=a||[null,d({}),d([]),d(d)];for(var r=2&c&&e;"object"==typeof r&&!~a.indexOf(r);r=d(r))Object.getOwnPropertyNames(r).forEach(a=>t[a]=()=>e[a]);return t.default=()=>e,b.d(f,t),f},b.d=(e,a)=>{for(var d in a)b.o(a,d)&&!b.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,d)=>(b.f[d](e,a),a),[])),b.u=e=>(({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",3718:"series-icons-map",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5514:"react",5516:"restricted-toolset",5551:"favorite-drawings-api",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl",9498:"export-data",9685:"redux"}[e]||e)+"."+{92:"0cb36b737a8e2345986f",137:"70e616fa55bcc40d9349",139:"6704838b79e652cb9b7b",323:"ecccd7e1c64eec3b91d6",507:"0c3c1c23fc8d5c9a196d",607:"1a061f43c2bae5611b49",731:"afe8089e0ca57f411f21",775:"9af72d490eb67ba9c3d7",880:"ca3b809337dfc638a0f4",1075:"2745aa8533e240f5a5aa",1112:"f476c93be59b881d5771",1320:"677eb727863e2a6eb930",1369:"b9add96a0a387a540aeb",1390:"171f18d180605d45f8bd",1553:"6b87affb7e648083ffef",1583:"0d4b5b1bbff664aa4bbd",1584:"c51a5b07782e9509b684",1594:"bdc6e0cee01d43f92b56",1702:"207a6f8164fe2e308a43",1754:"6e76d0b3734157609c5c",
1784:"430d2965a945175c67b1",1859:"2bf2c3f997463af55494",1890:"2ed2617cd536591d9620",2e3:"b72cddb1e241cd53d957",2077:"d42e666ed16322d7bc67",2153:"e970c9d1c83724d33d9d",2183:"5d9d24afd1c80c178f66",2205:"60fcbd491c14c71efecd",2301:"327e64f11055caec2fc9",2306:"9319534e46a9e0511fbc",2316:"71b43056c57e7847daa4",2358:"4592ca9a4bf10a040d6c",2377:"6e30e0c48af40bf2f6c0",2385:"8bd1988e75b528b748b5",2704:"4cf6e944a1702031903f",2731:"0237b0a587f2af599d21",2849:"a11938dbc8cdee0e66c0",2878:"5b28dda6a3b56e3f7110",3005:"cfb40d569cc84fb5a999",3016:"47e1775fafc08b9df6b1",3030:"f334374efc8ad7fe9ea9",3199:"f9bb1cc19bce0ed4e13a",3402:"80214ea16dec09fffbd7",3466:"dccc24adfe6f1de5abb0",3520:"348408865478fac7ab74",3596:"1d681e46e32eeb7bd566",3645:"f1ad30da6dcb4038b28c",3682:"a8229944cef798066931",3718:"5132afb769e08e9e4691",3770:"81522a902e3f65675da1",3921:"9a1e01c5fdc6ee0f0ca6",3944:"8a40a36e9250534cf1fa",4013:"4f43b1b0de65b2b6006c",4017:"417920a2e5fad078d303",4079:"62f0243fcd47ee8bd0a6",4102:"b861355e1fab6acf6b67",4194:"76610f4689826e0a3055",4389:"5287e059e159029b1913",4474:"ea628e251dbcae44ecad",4521:"a87e64e7049d592bdfa3",4665:"6dc882da895288804e15",4707:"4ae5a4c649280232f879",4763:"093701f36a1f22397937",4862:"f7df9d670cdf61d960af",4891:"f1952d185e606d135bad",5009:"35a2a7b957a4a4ecde2f",5093:"3f2a59a4ea5dd17c785c",5175:"735bba58eb417df5f276",5325:"57bc584fcad20ff58020",5514:"0638a74f3ac515095b21",5516:"e7ec0040c08ca2374480",5551:"aa264037a63b28ce72cf",5643:"e60d5a2fcedc55bc4c05",5774:"6084e87dfa3b7403c64e",5802:"a0f79afb86f1c7c6aa3c",5804:"9635459a9bb27efae543",5827:"5b4a4f8dc1802379d22d",5998:"efb09f12cc4162f40b26",6085:"69a003daf8ea012f4dc7",6166:"2772e96b4497fbe5a15b",6265:"833907d615c0a923a83e",6324:"f523168025f5f9f8281b",6363:"9bc4c2079b600a3e9e5f",6416:"0fdddb203273d15400a4",6427:"dee12c08eddd33a30d9a",6456:"dce1b9689542de2ec2c4",6560:"c0e5964119c0286aaeb8",6631:"53a4d00015fbeb7f3529",6780:"cde5cf5388cda1852fe0",6909:"001e6b57323d8b33ee18",7037:"fdc8ef89ee0603668c58",7078:"f56362c75973e41ee012",7176:"49f88f7174a87b80e6a9",7210:"9206636bbf39a902a0a9",7237:"2769aa6f5ca9bfe3d134",7260:"398cd093b8aefc945d7a",7271:"c665421984ce49564c38",7345:"25fdcd5ab611a0cae1c5",7387:"83f8d426a2eccc99da8d",7419:"fd1b88773f6a4c3ba0a3",7427:"9095bbcd96c4c8afbded",7552:"c7af5f2f9d956a4895d7",7635:"94cca27a48b51d6d0730",7648:"68f7692722c11f00b867",7757:"84c3835c6476f72ab779",7836:"7b5a16c4162d195f4fa0",7945:"4c3c0d98ac578db6c7fb",7962:"c7449f8a140d0a2f65c6",8090:"8b952c7d16bf27f94c34",8268:"799053cee91b47677d8e",8303:"6f2e0bbed2ef9bb1568e",8463:"71bed1f64ec4d658c6d9",8537:"d00036916a48adf1092a",8623:"6203559dfd9dc01b02d5",8643:"d80e5db5b5d195e2517b",8879:"8d71f97b906d74e9480c",8883:"edd50cff73a3164330f4",8890:"14e9ec0c02af5afd0347",8986:"9466c2fa15e1e2a0cf9f",9039:"a408d5bf42843ff46541",9042:"d1420ea0738999e3d4cd",9055:"ba2902a9c5c3dca700c1",9129:"e901c0206f411793cfff",9255:"0018f47a90442dff7efa",9283:"480451f47ebcfaeaf111",9289:"762510b2c9450f4fe85c",9309:"fd81d3dccd4271a42203",9374:"39f3d6120103dd6f672c",9498:"9cbc7d11420cd533dc03",
9505:"033a769154fc53ff7eca",9637:"78bb8fe4f37f1cca4c25",9685:"68742a2f70099c28b1ab",9811:"b2796acbfd658ee82791",9837:"80435cf54dcab1a9fa8e"}[e]+".js"),b.miniCssF=e=>5386===e?"5386.eb112967859403067d3d.css":e+"."+{137:"22c8e006552b35610f6b",323:"9be8a16e68975397a842",775:"5c68daa0de7f24551ffd",880:"20be4b9bc2682d856330",1112:"7d160fc0f45e3cce101b",1320:"5842d36462bf91f9bdee",1390:"997773af9c033c657fec",1594:"34c11d6cc8a67dec7867",2e3:"c053338877532ef25f8e",2153:"e1ac3515fad66f2e8cd2",2205:"6db290791e83d7931fc0",2316:"b0ed604f1b75887fab7d",2358:"4aea6b2ceb2dd524ad2f",2385:"a7490fb24192a7cb071d",2731:"ee2fb0e70b811fc1b3df",2849:"6cff163a36f6f60d1983",3402:"82d9d45c3fb1eae5b64d",3466:"6b309c19d1017468da1b",3520:"ad35b3adb3b2a1ac9a36",3645:"9bd37e14840a5d104112",3682:"13811924767b33f096fe",3770:"27c0356c69260f042e33",3921:"d5182cf595ff23538303",3944:"23ad1935ea1ca536bbdb",4017:"0d88d48dec4b694d4517",4102:"915f81c69fc5e4623606",4194:"f5256f014a8f2810c953",4474:"73bf3a3dea54feb8ae44",4521:"fb1ce34b17639871bac0",4763:"574e022a146295a230c1",5175:"6da12b40a46c3dc1bec7",5325:"f73e6a1009e185976981",5643:"e3046972325597a71d4d",5774:"141a04a858b83c24fd16",5802:"92bc0e290d3769e49cfb",5804:"6d5505a6271d865543a7",5998:"f7e5ad8f8bcc58c55639",6324:"365b73847767a54140ab",6363:"455be323006da46e86ba",6416:"a5a589cf5a0320e1d8ef",6427:"0426a3a24088f56e85f6",6560:"f01881003ac6fef45147",6909:"8cf1749a0435c38f0042",7037:"6c0a17273325fb793ea5",7176:"90e52d563ea0d904aceb",7237:"c5b4b4a1c530e5649853",7345:"f2d6787a34679ca6bb6e",7419:"fe8ff7c7e5d60ec6a2aa",7427:"3632e181ea85cc112694",7552:"889d45f5aa64d5c7293b",7635:"68f0d52fbb176c87eb48",7757:"a33871177538e5af0eea",7836:"e76c27a228c01ba0f51a",7945:"2d37a0fa10623d3390a6",7962:"5dc755e884297017b802",8090:"9f6f63205b18b2006aae",8268:"22931d534c7e1ef01eb1",8303:"d7429ccb60ab73751723",8463:"eb12cff5d8de975762fb",8879:"79825d729c8f4d360834",8986:"a6ccf711a394e8924fa1",9042:"5e6d175178eb40bf9d3c",9055:"3b864f08d4f696c7bf5e",9129:"fbb750fd312778403036",9283:"361babf6593344d18b51",9289:"5f9496920ea48da5931b",9309:"aceadf5355c94350ec2c",9637:"e1a8d0ef8a2a124944fd"}[e]+".css",b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b.l=(e,a,d,f)=>{if(c[e])c[e].push(a);else{var t,r;if(void 0!==d)for(var o=document.getElementsByTagName("script"),n=0;n<o.length;n++){var i=o[n];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")=="tradingview:"+d){t=i;break}}t||(r=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,b.nc&&t.setAttribute("nonce",b.nc),t.setAttribute("data-webpack","tradingview:"+d),t.src=e,0!==t.src.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous")),c[e]=[a]
;var l=(a,d)=>{t.onerror=t.onload=null,clearTimeout(s);var f=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach(e=>e(d)),a)return a(d)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),r&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),b.p="bundles/",b.p=window.WEBPACK_PUBLIC_PATH||b.p;var r,o,n=b.e,i=Object.create(null);b.e=function(e){if(!i[e]){i[e]=function e(a,d){return n(a).catch((function(){return new Promise((function(c){var f=function(){window.removeEventListener("online",f,!1),!1===navigator.onLine?window.addEventListener("online",f,!1):c(d<2?e(a,d+1):n(a))};setTimeout(f,d*d*1e3)}))}))}(e,0);var a=function(){delete i[e]};i[e].then(a,a)}return i[e]},r=e=>new Promise((a,d)=>{var c=b.miniCssF(e),f=b.p+c;if(((e,a)=>{for(var d=document.getElementsByTagName("link"),c=0;c<d.length;c++){var f=(b=d[c]).getAttribute("data-href")||b.getAttribute("href");if("stylesheet"===b.rel&&(f===e||f===a))return b}var t=document.getElementsByTagName("style");for(c=0;c<t.length;c++){var b;if((f=(b=t[c]).getAttribute("data-href"))===e||f===a)return b}})(c,f))return a();((e,a,d,c)=>{var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onerror=f.onload=t=>{if(f.onerror=f.onload=null,"load"===t.type)d();else{var b=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.href||a,o=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.type=b,o.request=r,f.parentNode.removeChild(f),c(o)}},f.href=a,0!==f.href.indexOf(window.location.origin+"/")&&(f.crossOrigin="anonymous"),document.head.appendChild(f)})(e,f,a,d)}),o={3666:0},b.f.miniCss=(e,a)=>{o[e]?a.push(o[e]):0!==o[e]&&{137:1,323:1,775:1,880:1,1112:1,1320:1,1390:1,1594:1,2e3:1,2153:1,2205:1,2316:1,2358:1,2385:1,2731:1,2849:1,3402:1,3466:1,3520:1,3645:1,3682:1,3770:1,3921:1,3944:1,4017:1,4102:1,4194:1,4474:1,4521:1,4763:1,5175:1,5325:1,5643:1,5774:1,5802:1,5804:1,5998:1,6324:1,6363:1,6416:1,6427:1,6560:1,6909:1,7037:1,7176:1,7237:1,7345:1,7419:1,7427:1,7552:1,7635:1,7757:1,7836:1,7945:1,7962:1,8090:1,8268:1,8303:1,8463:1,8879:1,8986:1,9042:1,9055:1,9129:1,9283:1,9289:1,9309:1,9637:1}[e]&&a.push(o[e]=r(e).then(()=>{o[e]=0},a=>{throw delete o[e],a}))},(()=>{var e={3666:0,5386:0};b.f.j=(a,d)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(/^(1(5(53|83|84)|7(02|54|84)|8(57|59|90)|075|297|369|39)|2(3(01|06|77)|077|183|704|878)|3(0(05|16|30)|199|596|718)|4(013|079|389|665|707|862|891)|5(0(09|7|93)|5(14|16|51)|827)|6(07|085|166|265|456|631|780)|7(2(10|60|71)|078|31|387|648)|8((62|64|88)3|537|890)|9((25|50|68)5|039|2|374|498|811|837))$/.test(a)){var f=new Promise((d,f)=>c=e[a]=[d,f]);d.push(c[2]=f);var t=b.p+b.u(a),r=new Error;b.l(t,d=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){
var f=d&&("load"===d.type?"missing":d.type),t=d&&d.target&&d.target.src;r.message="Loading chunk "+a+" failed.\n("+f+": "+t+")",r.name="ChunkLoadError",r.type=f,r.request=t,c[1](r)}},"chunk-"+a,a)}else e[a]=0},b.O.j=a=>0===e[a];var a=(a,d)=>{var c,f,[t,r,o]=d,n=0;if(t.some(a=>0!==e[a])){for(c in r)b.o(r,c)&&(b.m[c]=r[c]);if(o)var i=o(b)}for(a&&a(d);n<t.length;n++)f=t[n],b.o(e,f)&&e[f]&&e[f][0](),e[t[n]]=0;return b.O(i)},d=self.webpackChunktradingview=self.webpackChunktradingview||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})(),(()=>{const{miniCssF:e}=b;b.miniCssF=a=>"rtl"===document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();

View File

@@ -1,5 +0,0 @@
(()=>{"use strict";var e,a,d,c,f={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var d=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(d.exports,d,d.exports,b),d.loaded=!0,d.exports}b.m=f,b.c=t,e=[],b.O=(a,d,c,f)=>{if(!d){var t=1/0;for(i=0;i<e.length;i++){for(var[d,c,f]=e[i],r=!0,o=0;o<d.length;o++)(!1&f||t>=f)&&Object.keys(b.O).every(e=>b.O[e](d[o]))?d.splice(o--,1):(r=!1,f<t&&(t=f));if(r){e.splice(i--,1);var n=c();void 0!==n&&(a=n)}}return a}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[d,c,f]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);b.r(f);var t={};a=a||[null,d({}),d([]),d(d)];for(var r=2&c&&e;"object"==typeof r&&!~a.indexOf(r);r=d(r))Object.getOwnPropertyNames(r).forEach(a=>t[a]=()=>e[a]);return t.default=()=>e,b.d(f,t),f},b.d=(e,a)=>{for(var d in a)b.o(a,d)&&!b.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,d)=>(b.f[d](e,a),a),[])),b.u=e=>(({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",3718:"series-icons-map",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5514:"react",5516:"restricted-toolset",5551:"favorite-drawings-api",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl",9498:"export-data",9685:"redux"}[e]||e)+"."+{92:"0cb36b737a8e2345986f",137:"70e616fa55bcc40d9349",139:"6704838b79e652cb9b7b",323:"ecccd7e1c64eec3b91d6",507:"a8ea7bd9cf3685e149a2",607:"1a061f43c2bae5611b49",731:"afe8089e0ca57f411f21",775:"9af72d490eb67ba9c3d7",880:"ca3b809337dfc638a0f4",1075:"2745aa8533e240f5a5aa",1112:"f476c93be59b881d5771",1320:"677eb727863e2a6eb930",1369:"b9add96a0a387a540aeb",1553:"6b87affb7e648083ffef",1583:"0d4b5b1bbff664aa4bbd",1584:"c51a5b07782e9509b684",1594:"bdc6e0cee01d43f92b56",1702:"207a6f8164fe2e308a43",1754:"6e76d0b3734157609c5c",1784:"430d2965a945175c67b1",
1859:"2bf2c3f997463af55494",1890:"2ed2617cd536591d9620",2e3:"b72cddb1e241cd53d957",2077:"d42e666ed16322d7bc67",2153:"e970c9d1c83724d33d9d",2183:"5d9d24afd1c80c178f66",2205:"60fcbd491c14c71efecd",2301:"327e64f11055caec2fc9",2306:"9319534e46a9e0511fbc",2316:"71b43056c57e7847daa4",2358:"4592ca9a4bf10a040d6c",2377:"6e30e0c48af40bf2f6c0",2385:"8bd1988e75b528b748b5",2704:"4cf6e944a1702031903f",2731:"0237b0a587f2af599d21",2849:"a11938dbc8cdee0e66c0",2878:"5b28dda6a3b56e3f7110",3005:"cfb40d569cc84fb5a999",3016:"47e1775fafc08b9df6b1",3030:"f334374efc8ad7fe9ea9",3199:"f9bb1cc19bce0ed4e13a",3402:"80214ea16dec09fffbd7",3466:"dccc24adfe6f1de5abb0",3520:"348408865478fac7ab74",3596:"1d681e46e32eeb7bd566",3682:"a8229944cef798066931",3718:"5132afb769e08e9e4691",3770:"81522a902e3f65675da1",3921:"9a1e01c5fdc6ee0f0ca6",4013:"4f43b1b0de65b2b6006c",4017:"417920a2e5fad078d303",4079:"62f0243fcd47ee8bd0a6",4102:"b861355e1fab6acf6b67",4194:"76610f4689826e0a3055",4389:"5287e059e159029b1913",4474:"ea628e251dbcae44ecad",4521:"a87e64e7049d592bdfa3",4665:"6dc882da895288804e15",4707:"4ae5a4c649280232f879",4763:"093701f36a1f22397937",4862:"f7df9d670cdf61d960af",4891:"f1952d185e606d135bad",5009:"35a2a7b957a4a4ecde2f",5093:"3f2a59a4ea5dd17c785c",5175:"735bba58eb417df5f276",5325:"57bc584fcad20ff58020",5514:"0638a74f3ac515095b21",5516:"eb04d69d356372332c2a",5551:"aa264037a63b28ce72cf",5630:"a7dd262ced8f558657a2",5643:"e60d5a2fcedc55bc4c05",5774:"6084e87dfa3b7403c64e",5802:"a0f79afb86f1c7c6aa3c",5804:"9635459a9bb27efae543",5827:"5b4a4f8dc1802379d22d",5998:"efb09f12cc4162f40b26",6085:"69a003daf8ea012f4dc7",6166:"2772e96b4497fbe5a15b",6265:"833907d615c0a923a83e",6324:"f523168025f5f9f8281b",6363:"9bc4c2079b600a3e9e5f",6416:"0fdddb203273d15400a4",6427:"dee12c08eddd33a30d9a",6456:"dce1b9689542de2ec2c4",6560:"c0e5964119c0286aaeb8",6631:"53a4d00015fbeb7f3529",6780:"cde5cf5388cda1852fe0",6909:"001e6b57323d8b33ee18",7037:"fdc8ef89ee0603668c58",7078:"f56362c75973e41ee012",7176:"49f88f7174a87b80e6a9",7210:"9206636bbf39a902a0a9",7237:"2769aa6f5ca9bfe3d134",7260:"a9349bbb63869cc62a3e",7271:"c665421984ce49564c38",7345:"25fdcd5ab611a0cae1c5",7387:"0138f54824ae5a93929a",7419:"fd1b88773f6a4c3ba0a3",7427:"9095bbcd96c4c8afbded",7552:"c7af5f2f9d956a4895d7",7635:"94cca27a48b51d6d0730",7648:"68f7692722c11f00b867",7757:"84c3835c6476f72ab779",7836:"7b5a16c4162d195f4fa0",7945:"4c3c0d98ac578db6c7fb",7962:"c7449f8a140d0a2f65c6",8090:"8b952c7d16bf27f94c34",8268:"799053cee91b47677d8e",8303:"6f2e0bbed2ef9bb1568e",8463:"71bed1f64ec4d658c6d9",8537:"d00036916a48adf1092a",8623:"6203559dfd9dc01b02d5",8643:"d80e5db5b5d195e2517b",8879:"8d71f97b906d74e9480c",8883:"edd50cff73a3164330f4",8890:"14e9ec0c02af5afd0347",8986:"9466c2fa15e1e2a0cf9f",9039:"a408d5bf42843ff46541",9042:"d1420ea0738999e3d4cd",9055:"ba2902a9c5c3dca700c1",9129:"e901c0206f411793cfff",9255:"0018f47a90442dff7efa",9283:"480451f47ebcfaeaf111",9289:"762510b2c9450f4fe85c",9309:"fd81d3dccd4271a42203",9374:"39f3d6120103dd6f672c",9402:"b8b8c303a4379c921d21",9498:"9cbc7d11420cd533dc03",9505:"033a769154fc53ff7eca",
9637:"78bb8fe4f37f1cca4c25",9685:"68742a2f70099c28b1ab",9811:"b2796acbfd658ee82791",9837:"80435cf54dcab1a9fa8e"}[e]+".js"),b.miniCssF=e=>5386===e?"5386.eb112967859403067d3d.css":e+"."+{137:"22c8e006552b35610f6b",323:"9be8a16e68975397a842",775:"5c68daa0de7f24551ffd",880:"20be4b9bc2682d856330",1112:"7d160fc0f45e3cce101b",1320:"5842d36462bf91f9bdee",1594:"34c11d6cc8a67dec7867",2e3:"c053338877532ef25f8e",2153:"e1ac3515fad66f2e8cd2",2205:"6db290791e83d7931fc0",2316:"b0ed604f1b75887fab7d",2358:"4aea6b2ceb2dd524ad2f",2385:"a7490fb24192a7cb071d",2731:"ee2fb0e70b811fc1b3df",2849:"6cff163a36f6f60d1983",3402:"82d9d45c3fb1eae5b64d",3466:"6b309c19d1017468da1b",3520:"ad35b3adb3b2a1ac9a36",3682:"13811924767b33f096fe",3770:"27c0356c69260f042e33",3921:"d5182cf595ff23538303",4017:"0d88d48dec4b694d4517",4102:"915f81c69fc5e4623606",4194:"f5256f014a8f2810c953",4474:"73bf3a3dea54feb8ae44",4521:"fb1ce34b17639871bac0",4763:"574e022a146295a230c1",5175:"6da12b40a46c3dc1bec7",5325:"f73e6a1009e185976981",5630:"f2ebb878311e09076af1",5643:"e3046972325597a71d4d",5774:"141a04a858b83c24fd16",5802:"92bc0e290d3769e49cfb",5804:"6d5505a6271d865543a7",5998:"f7e5ad8f8bcc58c55639",6324:"365b73847767a54140ab",6363:"455be323006da46e86ba",6416:"a5a589cf5a0320e1d8ef",6427:"0426a3a24088f56e85f6",6560:"f01881003ac6fef45147",6909:"8cf1749a0435c38f0042",7037:"6c0a17273325fb793ea5",7176:"90e52d563ea0d904aceb",7237:"c5b4b4a1c530e5649853",7345:"f2d6787a34679ca6bb6e",7419:"fe8ff7c7e5d60ec6a2aa",7427:"3632e181ea85cc112694",7552:"889d45f5aa64d5c7293b",7635:"68f0d52fbb176c87eb48",7757:"a33871177538e5af0eea",7836:"e76c27a228c01ba0f51a",7945:"2d37a0fa10623d3390a6",7962:"5dc755e884297017b802",8090:"9f6f63205b18b2006aae",8268:"22931d534c7e1ef01eb1",8303:"d7429ccb60ab73751723",8463:"eb12cff5d8de975762fb",8879:"79825d729c8f4d360834",8986:"a6ccf711a394e8924fa1",9042:"5e6d175178eb40bf9d3c",9055:"3b864f08d4f696c7bf5e",9129:"fbb750fd312778403036",9283:"361babf6593344d18b51",9289:"5f9496920ea48da5931b",9309:"aceadf5355c94350ec2c",9402:"21d6262413330880bf0e",9637:"e1a8d0ef8a2a124944fd"}[e]+".css",b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b.l=(e,a,d,f)=>{if(c[e])c[e].push(a);else{var t,r;if(void 0!==d)for(var o=document.getElementsByTagName("script"),n=0;n<o.length;n++){var i=o[n];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")=="tradingview:"+d){t=i;break}}t||(r=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,b.nc&&t.setAttribute("nonce",b.nc),t.setAttribute("data-webpack","tradingview:"+d),t.src=e,0!==t.src.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous")),c[e]=[a];var l=(a,d)=>{t.onerror=t.onload=null,clearTimeout(s)
;var f=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach(e=>e(d)),a)return a(d)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),r&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),b.p="bundles/",b.p=window.WEBPACK_PUBLIC_PATH||b.p;var r,o,n=b.e,i=Object.create(null);b.e=function(e){if(!i[e]){i[e]=function e(a,d){return n(a).catch((function(){return new Promise((function(c){var f=function(){window.removeEventListener("online",f,!1),!1===navigator.onLine?window.addEventListener("online",f,!1):c(d<2?e(a,d+1):n(a))};setTimeout(f,d*d*1e3)}))}))}(e,0);var a=function(){delete i[e]};i[e].then(a,a)}return i[e]},r=e=>new Promise((a,d)=>{var c=b.miniCssF(e),f=b.p+c;if(((e,a)=>{for(var d=document.getElementsByTagName("link"),c=0;c<d.length;c++){var f=(b=d[c]).getAttribute("data-href")||b.getAttribute("href");if("stylesheet"===b.rel&&(f===e||f===a))return b}var t=document.getElementsByTagName("style");for(c=0;c<t.length;c++){var b;if((f=(b=t[c]).getAttribute("data-href"))===e||f===a)return b}})(c,f))return a();((e,a,d,c)=>{var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onerror=f.onload=t=>{if(f.onerror=f.onload=null,"load"===t.type)d();else{var b=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.href||a,o=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.type=b,o.request=r,f.parentNode.removeChild(f),c(o)}},f.href=a,0!==f.href.indexOf(window.location.origin+"/")&&(f.crossOrigin="anonymous"),document.head.appendChild(f)})(e,f,a,d)}),o={3666:0},b.f.miniCss=(e,a)=>{o[e]?a.push(o[e]):0!==o[e]&&{137:1,323:1,775:1,880:1,1112:1,1320:1,1594:1,2e3:1,2153:1,2205:1,2316:1,2358:1,2385:1,2731:1,2849:1,3402:1,3466:1,3520:1,3682:1,3770:1,3921:1,4017:1,4102:1,4194:1,4474:1,4521:1,4763:1,5175:1,5325:1,5630:1,5643:1,5774:1,5802:1,5804:1,5998:1,6324:1,6363:1,6416:1,6427:1,6560:1,6909:1,7037:1,7176:1,7237:1,7345:1,7419:1,7427:1,7552:1,7635:1,7757:1,7836:1,7945:1,7962:1,8090:1,8268:1,8303:1,8463:1,8879:1,8986:1,9042:1,9055:1,9129:1,9283:1,9289:1,9309:1,9402:1,9637:1}[e]&&a.push(o[e]=r(e).then(()=>{o[e]=0},a=>{throw delete o[e],a}))},(()=>{var e={3666:0,5386:0};b.f.j=(a,d)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(/^(1(5(53|83|84)|7(02|54|84)|8(57|59|90)|075|297|369|39)|2(3(01|06|77)|077|183|704|878)|3(0(05|16|30)|199|596|718)|4(013|079|389|665|707|862|891)|5(0(09|7|93)|5(14|16|51)|827)|6(07|085|166|265|456|631|780)|7(2(10|60|71)|078|31|387|648)|8((62|64|88)3|537|890)|9((25|50|68)5|039|2|374|498|811|837))$/.test(a)){var f=new Promise((d,f)=>c=e[a]=[d,f]);d.push(c[2]=f);var t=b.p+b.u(a),r=new Error;b.l(t,d=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var f=d&&("load"===d.type?"missing":d.type),t=d&&d.target&&d.target.src
;r.message="Loading chunk "+a+" failed.\n("+f+": "+t+")",r.name="ChunkLoadError",r.type=f,r.request=t,c[1](r)}},"chunk-"+a,a)}else e[a]=0},b.O.j=a=>0===e[a];var a=(a,d)=>{var c,f,[t,r,o]=d,n=0;if(t.some(a=>0!==e[a])){for(c in r)b.o(r,c)&&(b.m[c]=r[c]);if(o)var i=o(b)}for(a&&a(d);n<t.length;n++)f=t[n],b.o(e,f)&&e[f]&&e[f][0](),e[t[n]]=0;return b.O(i)},d=self.webpackChunktradingview=self.webpackChunktradingview||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})(),(()=>{const{miniCssF:e}=b;b.miniCssF=a=>"rtl"===document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();

View File

@@ -0,0 +1,6 @@
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[507],{2375:(t,e,i)=>{i.d(e,{PolygonRenderer:()=>u});var s=i(34026),r=i(4652),a=i(29892),n=i(63300),o=i(49612),l=i(84346),d=i(68906),h=i(16282),c=i(49094);class u extends h.ScaledPaneRenderer{constructor(t){super(),this._data=null,this._backHittest=new l.HitTestResult(l.HitTestResult.MOVEPOINT_BACKGROUND),this._points=[],this._hittest=null!=t?t:new l.HitTestResult(l.HitTestResult.MOVEPOINT)}setData(t){this._data=t,this._points=t.points}hitTest(t){if(null===this._data||void 0!==this._data.mouseTouchable&&!this._data.mouseTouchable)return null;const e=Math.max((0,c.interactionTolerance)().line,Math.ceil(this._data.linewidth/2)),i=this._points.length;if(1===i){return(0,s.pointInCircle)(t,this._points[0],e)?this._hittest:null}for(let s=1;s<i;s++){const i=this._points[s-1],a=this._points[s];if((0,r.distanceToSegment)(i,a,t).distance<=e)return this._hittest}if(this._data.filled&&this._data.fillBackground&&i>0){const s=this._points[0],a=this._points[i-1];if((0,r.distanceToSegment)(s,a,t).distance<=e)return this._hittest}return this._data.filled&&this._data.fillBackground&&(0,s.pointInPolygon)(t,this._data.points)?this._backHittest:null}_drawImpl(t,e){var i,s;const r=this._points.length;if(null===this._data||0===r)return;if(1===r)return void this._drawPoint(t,this._points[0],this._data.linewidth/2,this._data.color);t.beginPath();const l=null!==(i=this._data.linecap)&&void 0!==i?i:"butt";t.lineCap=l,t.strokeStyle=this._data.color,t.lineWidth=this._data.linewidth,t.lineJoin=null!==(s=this._data.linejoin)&&void 0!==s?s:"miter",(0,a.setLineStyle)(t,this._data.linestyle);const h=this._points[0];t.moveTo(h.x,h.y);for(const e of this._points)t.lineTo(e.x,e.y);if(this._data.filled&&this._data.fillBackground&&(t.fillStyle=(0,d.generateColor)(this._data.backcolor,this._data.transparency),t.fill()),this._data.filled&&!this._data.skipClosePath&&t.closePath(),this._data.linewidth>0&&t.stroke(),r>1){if("butt"!==l&&(t.lineCap="butt"),this._data.leftend===o.LineEnd.Arrow){const i=this._correctArrowPoints(this._points[1],this._points[0],t.lineWidth,l);(0,n.drawArrow)(i[0],i[1],t,t.lineWidth,e.pixelRatio)}if(this._data.rightend===o.LineEnd.Arrow){const i=this._correctArrowPoints(this._points[r-2],this._points[r-1],t.lineWidth,l);(0,n.drawArrow)(i[0],i[1],t,t.lineWidth,e.pixelRatio)}}}_drawPoint(t,e,i,s){0!==i&&(t.beginPath(),t.fillStyle=s,t.arc(e.x,e.y,i,0,2*Math.PI,!0),t.fill(),t.closePath())}_correctArrowPoints(t,e,i,s){const r=e.subtract(t),a=r.length();if("butt"===s||a<1)return[t,e];const n=a+i/2;return[t,r.scaled(n/a).add(t)]}}},72984:(t,e,i)=>{i.r(e),i.d(e,{BackgroundPaneView:()=>l});var s=i(88537),r=i(94804),a=i(93435),n=i(68906);class o{constructor(t){this._data=t}hitTest(t){return null}draw(t,e){}drawBackground(t,e){const i=this._data,s=(0,n.generateColor)(this._data.color,this._data.transparency),r=e.pixelRatio,o=Math.round(i.x1*r),l=Math.round(i.x2*r);(0,a.fillRect)(t,o,0,l-o,e.physicalHeight,s)}}class l{constructor(t,e,i){this._data=[],
this._invalidated=!0,this._provider=t,this._model=e,this._data=[]}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new r.CompositeRenderer;for(const e of this._data)t.append(new o(e));return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphics().backgrounds();if(0===i.size)return;const r=this._model.timeScale().visibleBarsStrictRange();if(null===r)return;const a=r.firstBar(),n=r.lastBar();i.forEach((t,i)=>{const r=this._provider.properties().graphics.backgrounds[i];if(!r.visible.value())return;let o,l;t.forEach(t=>{const i=null!==t.start?t.start:(0,s.ensureNotNull)(e.points().firstIndex()),d=t.stop;if(d<a||n<i)return;let h=e.indexToCoordinate(i)-.5*e.barSpacing();const c=e.indexToCoordinate(d)+.5*e.barSpacing();l===i-1&&(h=o||h),o=c,l=d,h<0&&c<0||h>e.width()&&c>e.width()||this._data.push({x1:h,x2:c,color:r.color.value(),transparency:r.transparency.value()})})})}}},93742:(t,e,i)=>{i.r(e),i.d(e,{HHistPaneView:()=>x});var s=i(24377),r=i(88537),a=i(84346),n=i(95018),o=i(94804),l=i(98664),d=i(86441),h=i(93435),c=i(67802),u=i(22799);function p(t,e){return{min:Math.min(t,e),max:Math.max(t,e)}}function _(t){return t.max-t.min}class f{constructor(t){this._data=t}hitTest(t,e){const i=this._data;for(const s of i.histograms){if(s.yRange.min>=t.y||t.y>=s.yRange.max)continue;let r=null;const o=_(s.xRange);for(const l of s.bars){const d=i.styles[l.styleId];if(!d.visible)continue;if(d.location===n.HHistLocation.Absolute&&(s.xRange.min>=t.x||t.x>=s.xRange.max))continue;null===r&&(r=0,s.bars.forEach(t=>{const e=t.subBarValues.reduce((t,e)=>t+e);r=Math.max(r,e)}));const h=v(s.xRange,d,e.cssWidth),{xBasePoint:c,sign:u}=h,p=Math.max(d.percentWidth*o/100-l.subBarValues.length,0);let _=c;for(let e=0;e<l.subBarValues.length;e++){const i=l.y,s=l.y+l.height,n=_,o=n+u*(p*l.subBarValues[e]/r);if(_=o,(t.x>=n&&t.x<=o||t.x>=o&&t.x<=n)&&t.y>=i&&t.y<=s)return new a.HitTestResult(a.HitTestResult.REGULAR)}}}return null}draw(t,e){const i=this._data;t.save(),i.histograms.forEach(r=>{const a=[];let n=0,o=0;r.bars.forEach(t=>{const e=t.subBarValues.reduce((t,e)=>t+e);n=Math.max(n,e),o+=t.height});const l=o/r.bars.length,d=(h=l,c=e.pixelRatio,Math.floor(h*c)>=1*c?Math.floor(c):0);var h,c;const u=_(r.xRange),p=[];if(r.bars.forEach(s=>{const o=i.styles[s.styleId];if(!o.visible)return;if(o.showValues&&o.addToTotalValue)for(let t=0;t<s.subBarValues.length;t++)a[t]=(a[t]||0)+s.subBarValues[t];const l=v(r.xRange,o,e.cssWidth),{xBasePoint:h,sign:c}=l;if(s.y>e.cssHeight||s.y+s.height<0)return;const _=Math.max(o.percentWidth*u/100-s.subBarValues.length,0);let f=h;for(let i=0;i<s.subBarValues.length;i++){const r=s.y,a=s.y+s.height,l=f,h=l+c*(_*s.subBarValues[i]/n);if(f=h,Math.abs(h-l)<.5)continue;t.fillStyle=o.colors[i],t.beginPath();const u=Math.round(l*e.pixelRatio),p=Math.round(r*e.pixelRatio),v=Math.round(h*e.pixelRatio),g=Math.round(a*e.pixelRatio),m=v-u,R=Math.max(g-p-d,1)
;t.rect(u,p,m,R),t.fill()}if(!o.showValues)return;const R=g(s.displayedValues,o.direction),w=m(u,s.y,s.height,l,o,R);p.push(w)}),a.length>0){const t=i.styles[r.bars[0].styleId],n=v(r.xRange,t,e.cssWidth),o=g(a,t.direction),d=r.bars[r.bars.length-1],h=m(u,d.y+d.height,l,n,t,o);h.color=(0,s.shiftColor)(h.color,1.5),p.push(h)}const f=Math.min(...p.map(t=>t.fontSize));if(f>=7.5)for(const i of p)i.fontSize=f,R(t,e,i)}),t.restore()}}function v(t,e,i){const s=e.location===n.HHistLocation.Absolute,r=e.location===n.HHistLocation.Relative,a=e.direction===n.HHistDirection.LeftToRight,o=e.direction===n.HHistDirection.RightToLeft;let l,d;if(s&&a)l=t.min,d=1;else if(s&&o)l=t.max,d=-1;else if(r&&a)l=0,d=1;else{if(!r||!o)throw new Error(`Unknown location/direction values: ${e.location}/${e.direction}`);l=i,d=-1}return{xBasePoint:l,sign:d}}function g(t,e){e===n.HHistDirection.RightToLeft&&(t=t.slice()).reverse();const i=new c.VolumeFormatter;return t.map(t=>i.format(t)).join("x")}function m(t,e,i,s,r,a){const o=Math.min(Math.round(1.7*t/a.length),Math.round(.6*i)),l=r.direction===n.HHistDirection.LeftToRight?"left":"right",{xBasePoint:h,sign:c}=s,u=h+3*c,p=e+.7*i;return{text:a,color:r.valuesColor,fontSize:o,align:l,point:new d.Point(u,p)}}function R(t,e,i){const{text:s,color:r,fontSize:a,align:n,point:o}=i;t.font=`${a}px ${u.CHART_FONT_FAMILY}`,t.fillStyle=r,t.textAlign=n,(0,h.drawScaled)(t,e.pixelRatio,()=>t.fillText(s,o.x,o.y))}var w=i(68906);class x{constructor(t,e,i){this._invalidated=!0,this._provider=t,this._model=e,this._rendererData={histograms:[],styles:{}},this._textData=[],this._hhistRenderer=new f(this._rendererData)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new o.CompositeRenderer;t.append(this._hhistRenderer);for(const e of this._textData)t.append(new l.TextRenderer(e,new a.HitTestResult(a.HitTestResult.REGULAR)));return t}_resetRenderersData(){this._rendererData.histograms=[],this._rendererData.styles={},this._textData=[]}_prepareStyles(){const t=(0,r.ensureDefined)(this._provider.graphicsInfo().hhists),e=Object.keys(t),i=this._provider.properties().graphics.hhists,s=this._provider.properties().child("inputs").child("volume").value()===n.HHistVolumeMode.Delta;for(const a of e){const e=(0,r.ensureDefined)(i.child(a)),n=(0,r.ensureDefined)(t[a]);if(s)this._rendererData.styles[a+"UpDominate"]={colors:T(e.colors[0].value(),e.transparencies[0].value()),visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:n.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!1,valuesColor:e.valuesColor.value()},this._rendererData.styles[a+"DownDominate"]={colors:T(e.colors[1].value(),e.transparencies[1].value()),visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:n.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!1,valuesColor:e.valuesColor.value()};else{const t=(0,w.generateColor)(e.colors[0].value(),e.transparencies[0].value()),i=e.colors[1]?(0,
w.generateColor)(e.colors[1].value(),e.transparencies[1].value()):t;this._rendererData.styles[a]={colors:[t,i],visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:n.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!0,valuesColor:e.valuesColor.value()}}}}_updateViewInternal(){this._resetRenderersData();const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;if(null===this._provider.firstValue())return;const i=this._provider.graphics().hhistsByTimePointIndex();if(0===i.size)return;const s=e.visibleBarsStrictRange();if(null===s)return;const a=s.firstBar(),n=s.lastBar();this._prepareStyles(),(0,r.ensureDefined)(i).forEach((i,s)=>{let r=1/0,o=-1/0;i.forEach(t=>{r=Math.min(r,t.firstBarTime),o=Math.max(o,t.lastBarTime)}),o<a||r>n||this._updateDataForRenderers(i,t,e)})}_updateDataForRenderers(t,e,i){if(t.size<=0)return;let s=null;if(t.forEach(t=>{s=s||t}),null===s)return;let a=s;t.forEach(t=>{t.priceLow<a.priceLow&&(a=t)});const o=this._provider.properties().child("inputs").child("volume").value()===n.HHistVolumeMode.Delta,l=function(t,e){return p(e.indexToCoordinate(t.firstBarTime),e.indexToCoordinate(t.lastBarTime))}(s,i),d=(0,r.ensureNotNull)(this._provider.firstValue()),h=[];t.forEach(t=>{null==t.rate[t.rate.length-1]&&t.rate.splice(-1,1);let i=[],s=[],r=t.styleId;if(o){const[e,a,n]=t.rate[0]>t.rate[1]?[t.rate[1],t.rate[0],"UpDominate"]:[t.rate[0],t.rate[1],"DownDominate"];i=[a-e,e,e],s=[a-e],r+=n}else i=t.rate,s=t.rate;const a=function(t,e,i){return p(e.priceToCoordinate(t.priceHigh,i),e.priceToCoordinate(t.priceLow,i))}(t,e,d);h.push({height:a.max-a.min,y:a.min,subBarValues:i,displayedValues:s,styleId:r})}),h.sort((t,e)=>t.y-e.y),this._rendererData.histograms.push({xRange:l,yRange:p(h[0].y,h[h.length-1].y+h[h.length-1].height),bars:h})}}function T(t,e){let i;if((0,w.isHexColor)(t))i=100-e;else{const r=(0,s.tryParseRgba)(t);i=100-(null!==r?(0,w.alphaToTransparency)(r[3]):e)}return[(0,w.generateColor)(t,100-i,!0),(0,w.generateColor)(t,100-i/2,!0),(0,w.generateColor)(t,100-i/4,!0)]}},22107:(t,e,i)=>{i.r(e),i.d(e,{HorizLinePaneView:()=>o});var s=i(88537),r=i(84346),a=i(94804),n=i(40254);class o{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new r.HitTestResult(r.HitTestResult.CUSTOM,i):new r.HitTestResult(r.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new a.CompositeRenderer;for(const e of this._data){const i=new n.HorizontalLineRenderer;i.setData(e),i.setHitTest(this._hitTestResult),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphics().horizlines();if(0===i.size)return;const r=this._model.timeScale().visibleBarsStrictRange();if(null===r)return;const a=this._provider.firstValue();if(null===a)return
;const n=r.firstBar(),o=r.lastBar();i.forEach((i,r)=>{const l=this._provider.properties().graphics.horizlines[r];l.visible.value()&&i.forEach(i=>{const r=i.startIndex,d=i.endIndex;!i.extendRight&&Math.max(r,d)<n||!i.extendLeft&&Math.min(r,d)>o||this._data.push({y:t.priceToCoordinate((0,s.ensureDefined)(i.level),a),left:i.extendLeft?void 0:e.indexToCoordinate(r),right:i.extendRight?void 0:e.indexToCoordinate(d),color:l.color.value(),linewidth:l.width.value(),linestyle:l.style.value()})})})}}},54077:(t,e,i)=>{i.r(e),i.d(e,{PolygonPaneView:()=>d});var s=i(88537),r=i(86441),a=i(84346),n=i(94804),o=i(43891),l=i(2375);class d{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new a.HitTestResult(a.HitTestResult.CUSTOM,i):new a.HitTestResult(a.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new n.CompositeRenderer;for(const e of this._data){const i=new l.PolygonRenderer(this._hitTestResult);i.setData(e),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphics().polygons();if(0===i.size)return;const a=this._model.timeScale().visibleBarsStrictRange();if(null===a)return;const n=this._provider.firstValue();if(null===n)return;const l=a.firstBar(),d=a.lastBar(),h=this._provider.properties().graphics.polygons,c=(0,s.ensureDefined)(this._provider.metaInfo().graphics.polygons);i.forEach((i,a)=>{const u=h[a];100!==u.transparency.value()&&i.forEach(i=>{let h=1/0,p=-1/0;for(const t of i.points){const e=t.index+(t.offset||0);h=Math.min(h,e),p=Math.max(p,e)}if(p<l||d<h)return;const _=i.points.map(i=>{const a=e.indexToCoordinate(i.index+(i.offset||0)),o=t.priceToCoordinate((0,s.ensureDefined)(i.level),n);return new r.Point(a,o)});this._data.push({points:_,color:u.color.value(),backcolor:u.color.value(),linewidth:void 0!==u.showBorder&&u.showBorder.value()?1:0,linestyle:o.LINESTYLE_SOLID,filled:!0,fillBackground:!0,transparency:u.transparency.value(),mouseTouchable:(0,s.ensureDefined)(c[a]).mouseTouchable})})})}}},59778:(t,e,i)=>{i.r(e),i.d(e,{VertLinePaneView:()=>l});var s=i(88537),r=i(84346),a=i(95936),n=i(94804),o=i(44349);class l{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new r.HitTestResult(r.HitTestResult.CUSTOM,i):new r.HitTestResult(r.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new n.CompositeRenderer;for(const e of this._data){const i=new o.VerticalLineRenderer;i.setData(e),i.setHitTest(this._hitTestResult),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphicsInfo().vertlines,r=this._provider.graphics().vertlines()
;if(0===r.size||void 0===i)return;const n=this._model.timeScale().visibleBarsStrictRange();if(null===n)return;const o=this._provider.firstValue();if(null===o)return;const l=n.firstBar(),d=n.lastBar();r.forEach((r,n)=>{const h=this._provider.properties().graphics.vertlines[n];if(!h.visible.value())return;let c=0;switch((0,s.ensureDefined)(i[n]).halign){case a.HAlign.Left:c=-e.barSpacing()/2;break;case a.HAlign.Right:c=e.barSpacing()/2}r.forEach(i=>{const r=i.index;r<l||d<r||this._data.push({x:e.indexToCoordinate(r)+c,top:i.extendTop?void 0:t.priceToCoordinate((0,s.ensureDefined)(i.endPrice),o),bottom:i.extendBottom?void 0:t.priceToCoordinate((0,s.ensureDefined)(i.startPrice),o),color:h.color.value(),linewidth:h.width.value(),linestyle:h.style.value()})})})}}}}]);

View File

@@ -1,5 +0,0 @@
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[507],{2375:(t,e,i)=>{i.d(e,{PolygonRenderer:()=>u});var s=i(34026),r=i(4652),n=i(29892),a=i(63300),o=i(49612),l=i(84346),h=i(68906),d=i(16282),c=i(49094);class u extends d.ScaledPaneRenderer{constructor(t){super(),this._data=null,this._backHittest=new l.HitTestResult(l.HitTestResult.MOVEPOINT_BACKGROUND),this._points=[],this._hittest=null!=t?t:new l.HitTestResult(l.HitTestResult.MOVEPOINT)}setData(t){this._data=t,this._points=t.points}hitTest(t){if(null===this._data||void 0!==this._data.mouseTouchable&&!this._data.mouseTouchable)return null;const e=Math.max((0,c.interactionTolerance)().line,Math.ceil(this._data.linewidth/2)),i=this._points.length;if(1===i){return(0,s.pointInCircle)(t,this._points[0],e)?this._hittest:null}for(let s=1;s<i;s++){const i=this._points[s-1],n=this._points[s];if((0,r.distanceToSegment)(i,n,t).distance<=e)return this._hittest}if(this._data.filled&&this._data.fillBackground&&i>0){const s=this._points[0],n=this._points[i-1];if((0,r.distanceToSegment)(s,n,t).distance<=e)return this._hittest}return this._data.filled&&this._data.fillBackground&&(0,s.pointInPolygon)(t,this._data.points)?this._backHittest:null}_drawImpl(t,e){var i,s;const r=this._points.length;if(null===this._data||0===r)return;if(1===r)return void this._drawPoint(t,this._points[0],this._data.linewidth/2,this._data.color);t.beginPath();const l=null!==(i=this._data.linecap)&&void 0!==i?i:"butt";t.lineCap=l,t.strokeStyle=this._data.color,t.lineWidth=this._data.linewidth,t.lineJoin=null!==(s=this._data.linejoin)&&void 0!==s?s:"miter",(0,n.setLineStyle)(t,this._data.linestyle);const d=this._points[0];t.moveTo(d.x,d.y);for(const e of this._points)t.lineTo(e.x,e.y);if(this._data.filled&&this._data.fillBackground&&(t.fillStyle=(0,h.generateColor)(this._data.backcolor,this._data.transparency),t.fill()),this._data.filled&&!this._data.skipClosePath&&t.closePath(),this._data.linewidth>0&&t.stroke(),r>1){if("butt"!==l&&(t.lineCap="butt"),this._data.leftend===o.LineEnd.Arrow){const i=this._correctArrowPoints(this._points[1],this._points[0],t.lineWidth,l);(0,a.drawArrow)(i[0],i[1],t,t.lineWidth,e.pixelRatio)}if(this._data.rightend===o.LineEnd.Arrow){const i=this._correctArrowPoints(this._points[r-2],this._points[r-1],t.lineWidth,l);(0,a.drawArrow)(i[0],i[1],t,t.lineWidth,e.pixelRatio)}}}_drawPoint(t,e,i,s){0!==i&&(t.beginPath(),t.fillStyle=s,t.arc(e.x,e.y,i,0,2*Math.PI,!0),t.fill(),t.closePath())}_correctArrowPoints(t,e,i,s){const r=e.subtract(t),n=r.length();if("butt"===s||n<1)return[t,e];const a=n+i/2;return[t,r.scaled(a/n).add(t)]}}},93742:(t,e,i)=>{i.r(e),i.d(e,{HHistPaneView:()=>w});var s=i(24377),r=i(88537),n=i(84346),a=i(95018),o=i(94804),l=i(98664),h=i(86441),d=i(93435),c=i(67802),u=i(22799);function p(t,e){return{min:Math.min(t,e),max:Math.max(t,e)}}function f(t){return t.max-t.min}class _{constructor(t){this._data=t}hitTest(t,e){const i=this._data;for(const s of i.histograms){if(s.yRange.min>=t.y||t.y>=s.yRange.max)continue;let r=null;const o=f(s.xRange)
;for(const l of s.bars){const h=i.styles[l.styleId];if(!h.visible)continue;if(h.location===a.HHistLocation.Absolute&&(s.xRange.min>=t.x||t.x>=s.xRange.max))continue;null===r&&(r=0,s.bars.forEach(t=>{const e=t.subBarValues.reduce((t,e)=>t+e);r=Math.max(r,e)}));const d=v(s.xRange,h,e.cssWidth),{xBasePoint:c,sign:u}=d,p=Math.max(h.percentWidth*o/100-l.subBarValues.length,0);let f=c;for(let e=0;e<l.subBarValues.length;e++){const i=l.y,s=l.y+l.height,a=f,o=a+u*(p*l.subBarValues[e]/r);if(f=o,(t.x>=a&&t.x<=o||t.x>=o&&t.x<=a)&&t.y>=i&&t.y<=s)return new n.HitTestResult(n.HitTestResult.REGULAR)}}}return null}draw(t,e){const i=this._data;t.save(),i.histograms.forEach(r=>{const n=[];let a=0,o=0;r.bars.forEach(t=>{const e=t.subBarValues.reduce((t,e)=>t+e);a=Math.max(a,e),o+=t.height});const l=o/r.bars.length,h=(d=l,c=e.pixelRatio,Math.floor(d*c)>=1*c?Math.floor(c):0);var d,c;const u=f(r.xRange),p=[];if(r.bars.forEach(s=>{const o=i.styles[s.styleId];if(!o.visible)return;if(o.showValues&&o.addToTotalValue)for(let t=0;t<s.subBarValues.length;t++)n[t]=(n[t]||0)+s.subBarValues[t];const l=v(r.xRange,o,e.cssWidth),{xBasePoint:d,sign:c}=l;if(s.y>e.cssHeight||s.y+s.height<0)return;const f=Math.max(o.percentWidth*u/100-s.subBarValues.length,0);let _=d;for(let i=0;i<s.subBarValues.length;i++){const r=s.y,n=s.y+s.height,l=_,d=l+c*(f*s.subBarValues[i]/a);if(_=d,Math.abs(d-l)<.5)continue;t.fillStyle=o.colors[i],t.beginPath();const u=Math.round(l*e.pixelRatio),p=Math.round(r*e.pixelRatio),v=Math.round(d*e.pixelRatio),g=Math.round(n*e.pixelRatio),m=v-u,R=Math.max(g-p-h,1);t.rect(u,p,m,R),t.fill()}if(!o.showValues)return;const R=g(s.displayedValues,o.direction),T=m(u,s.y,s.height,l,o,R);p.push(T)}),n.length>0){const t=i.styles[r.bars[0].styleId],a=v(r.xRange,t,e.cssWidth),o=g(n,t.direction),h=r.bars[r.bars.length-1],d=m(u,h.y+h.height,l,a,t,o);d.color=(0,s.shiftColor)(d.color,1.5),p.push(d)}const _=Math.min(...p.map(t=>t.fontSize));if(_>=7.5)for(const i of p)i.fontSize=_,R(t,e,i)}),t.restore()}}function v(t,e,i){const s=e.location===a.HHistLocation.Absolute,r=e.location===a.HHistLocation.Relative,n=e.direction===a.HHistDirection.LeftToRight,o=e.direction===a.HHistDirection.RightToLeft;let l,h;if(s&&n)l=t.min,h=1;else if(s&&o)l=t.max,h=-1;else if(r&&n)l=0,h=1;else{if(!r||!o)throw new Error(`Unknown location/direction values: ${e.location}/${e.direction}`);l=i,h=-1}return{xBasePoint:l,sign:h}}function g(t,e){e===a.HHistDirection.RightToLeft&&(t=t.slice()).reverse();const i=new c.VolumeFormatter;return t.map(t=>i.format(t)).join("x")}function m(t,e,i,s,r,n){const o=Math.min(Math.round(1.7*t/n.length),Math.round(.6*i)),l=r.direction===a.HHistDirection.LeftToRight?"left":"right",{xBasePoint:d,sign:c}=s,u=d+3*c,p=e+.7*i;return{text:n,color:r.valuesColor,fontSize:o,align:l,point:new h.Point(u,p)}}function R(t,e,i){const{text:s,color:r,fontSize:n,align:a,point:o}=i;t.font=`${n}px ${u.CHART_FONT_FAMILY}`,t.fillStyle=r,t.textAlign=a,(0,d.drawScaled)(t,e.pixelRatio,()=>t.fillText(s,o.x,o.y))}var T=i(68906);class w{constructor(t,e,i){this._invalidated=!0,
this._provider=t,this._model=e,this._rendererData={histograms:[],styles:{}},this._textData=[],this._hhistRenderer=new _(this._rendererData)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new o.CompositeRenderer;t.append(this._hhistRenderer);for(const e of this._textData)t.append(new l.TextRenderer(e,new n.HitTestResult(n.HitTestResult.REGULAR)));return t}_resetRenderersData(){this._rendererData.histograms=[],this._rendererData.styles={},this._textData=[]}_prepareStyles(){const t=(0,r.ensureDefined)(this._provider.graphicsInfo().hhists),e=Object.keys(t),i=this._provider.properties().graphics.hhists,s=this._provider.properties().child("inputs").child("volume").value()===a.HHistVolumeMode.Delta;for(const n of e){const e=(0,r.ensureDefined)(i.child(n)),a=(0,r.ensureDefined)(t[n]);if(s)this._rendererData.styles[n+"UpDominate"]={colors:x(e.colors[0].value(),e.transparencies[0].value()),visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:a.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!1,valuesColor:e.valuesColor.value()},this._rendererData.styles[n+"DownDominate"]={colors:x(e.colors[1].value(),e.transparencies[1].value()),visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:a.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!1,valuesColor:e.valuesColor.value()};else{const t=(0,T.generateColor)(e.colors[0].value(),e.transparencies[0].value()),i=e.colors[1]?(0,T.generateColor)(e.colors[1].value(),e.transparencies[1].value()):t;this._rendererData.styles[n]={colors:[t,i],visible:e.visible.value(),percentWidth:e.percentWidth.value(),location:a.location,direction:e.direction.value(),showValues:e.showValues.value(),addToTotalValue:!0,valuesColor:e.valuesColor.value()}}}}_updateViewInternal(){this._resetRenderersData();const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;if(null===this._provider.firstValue())return;const i=this._provider.graphics().hhistsByTimePointIndex();if(0===i.size)return;const s=e.visibleBarsStrictRange();if(null===s)return;const n=s.firstBar(),a=s.lastBar();this._prepareStyles(),(0,r.ensureDefined)(i).forEach((i,s)=>{let r=1/0,o=-1/0;i.forEach(t=>{r=Math.min(r,t.firstBarTime),o=Math.max(o,t.lastBarTime)}),o<n||r>a||this._updateDataForRenderers(i,t,e)})}_updateDataForRenderers(t,e,i){if(t.size<=0)return;let s=null;if(t.forEach(t=>{s=s||t}),null===s)return;let n=s;t.forEach(t=>{t.priceLow<n.priceLow&&(n=t)});const o=this._provider.properties().child("inputs").child("volume").value()===a.HHistVolumeMode.Delta,l=function(t,e){return p(e.indexToCoordinate(t.firstBarTime),e.indexToCoordinate(t.lastBarTime))}(s,i),h=(0,r.ensureNotNull)(this._provider.firstValue()),d=[];t.forEach(t=>{null==t.rate[t.rate.length-1]&&t.rate.splice(-1,1);let i=[],s=[],r=t.styleId;if(o){const[e,n,a]=t.rate[0]>t.rate[1]?[t.rate[1],t.rate[0],"UpDominate"]:[t.rate[0],t.rate[1],"DownDominate"];i=[n-e,e,e],
s=[n-e],r+=a}else i=t.rate,s=t.rate;const n=function(t,e,i){return p(e.priceToCoordinate(t.priceHigh,i),e.priceToCoordinate(t.priceLow,i))}(t,e,h);d.push({height:n.max-n.min,y:n.min,subBarValues:i,displayedValues:s,styleId:r})}),d.sort((t,e)=>t.y-e.y),this._rendererData.histograms.push({xRange:l,yRange:p(d[0].y,d[d.length-1].y+d[d.length-1].height),bars:d})}}function x(t,e){let i;if((0,T.isHexColor)(t))i=100-e;else{const r=(0,s.tryParseRgba)(t);i=100-(null!==r?(0,T.alphaToTransparency)(r[3]):e)}return[(0,T.generateColor)(t,100-i,!0),(0,T.generateColor)(t,100-i/2,!0),(0,T.generateColor)(t,100-i/4,!0)]}},22107:(t,e,i)=>{i.r(e),i.d(e,{HorizLinePaneView:()=>o});var s=i(88537),r=i(84346),n=i(94804),a=i(40254);class o{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new r.HitTestResult(r.HitTestResult.CUSTOM,i):new r.HitTestResult(r.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new n.CompositeRenderer;for(const e of this._data){const i=new a.HorizontalLineRenderer;i.setData(e),i.setHitTest(this._hitTestResult),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphics().horizlines();if(0===i.size)return;const r=this._model.timeScale().visibleBarsStrictRange();if(null===r)return;const n=this._provider.firstValue();if(null===n)return;const a=r.firstBar(),o=r.lastBar();i.forEach((i,r)=>{const l=this._provider.properties().graphics.horizlines[r];l.visible.value()&&i.forEach(i=>{const r=i.startIndex,h=i.endIndex;!i.extendRight&&Math.max(r,h)<a||!i.extendLeft&&Math.min(r,h)>o||this._data.push({y:t.priceToCoordinate((0,s.ensureDefined)(i.level),n),left:i.extendLeft?void 0:e.indexToCoordinate(r),right:i.extendRight?void 0:e.indexToCoordinate(h),color:l.color.value(),linewidth:l.width.value(),linestyle:l.style.value()})})})}}},54077:(t,e,i)=>{i.r(e),i.d(e,{PolygonPaneView:()=>h});var s=i(88537),r=i(86441),n=i(84346),a=i(94804),o=i(43891),l=i(2375);class h{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new n.HitTestResult(n.HitTestResult.CUSTOM,i):new n.HitTestResult(n.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new a.CompositeRenderer;for(const e of this._data){const i=new l.PolygonRenderer(this._hitTestResult);i.setData(e),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphics().polygons();if(0===i.size)return;const n=this._model.timeScale().visibleBarsStrictRange();if(null===n)return;const a=this._provider.firstValue();if(null===a)return;const l=n.firstBar(),h=n.lastBar(),d=this._provider.properties().graphics.polygons,c=(0,
s.ensureDefined)(this._provider.metaInfo().graphics.polygons);i.forEach((i,n)=>{const u=d[n];100!==u.transparency.value()&&i.forEach(i=>{let d=1/0,p=-1/0;for(const t of i.points){const e=t.index+(t.offset||0);d=Math.min(d,e),p=Math.max(p,e)}if(p<l||h<d)return;const f=i.points.map(i=>{const n=e.indexToCoordinate(i.index+(i.offset||0)),o=t.priceToCoordinate((0,s.ensureDefined)(i.level),a);return new r.Point(n,o)});this._data.push({points:f,color:u.color.value(),backcolor:u.color.value(),linewidth:void 0!==u.showBorder&&u.showBorder.value()?1:0,linestyle:o.LINESTYLE_SOLID,filled:!0,fillBackground:!0,transparency:u.transparency.value(),mouseTouchable:(0,s.ensureDefined)(c[n]).mouseTouchable})})})}}},59778:(t,e,i)=>{i.r(e),i.d(e,{VertLinePaneView:()=>l});var s=i(88537),r=i(84346),n=i(95936),a=i(94804),o=i(44349);class l{constructor(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new r.HitTestResult(r.HitTestResult.CUSTOM,i):new r.HitTestResult(r.HitTestResult.REGULAR)}update(){this._invalidated=!0}renderer(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);const t=new a.CompositeRenderer;for(const e of this._data){const i=new o.VerticalLineRenderer;i.setData(e),i.setHitTest(this._hitTestResult),t.append(i)}return t}_updateViewInternal(){this._data=[];const t=this._provider.priceScale(),e=this._model.timeScale();if(!t||t.isEmpty()||e.isEmpty())return;const i=this._provider.graphicsInfo().vertlines,r=this._provider.graphics().vertlines();if(0===r.size||void 0===i)return;const a=this._model.timeScale().visibleBarsStrictRange();if(null===a)return;const o=this._provider.firstValue();if(null===o)return;const l=a.firstBar(),h=a.lastBar();r.forEach((r,a)=>{const d=this._provider.properties().graphics.vertlines[a];if(!d.visible.value())return;let c=0;switch((0,s.ensureDefined)(i[a]).halign){case n.HAlign.Left:c=-e.barSpacing()/2;break;case n.HAlign.Right:c=e.barSpacing()/2}r.forEach(i=>{const r=i.index;r<l||h<r||this._data.push({x:e.indexToCoordinate(r)+c,top:i.extendTop?void 0:t.priceToCoordinate((0,s.ensureDefined)(i.endPrice),o),bottom:i.extendBottom?void 0:t.priceToCoordinate((0,s.ensureDefined)(i.startPrice),o),color:d.color.value(),linewidth:d.width.value(),linestyle:d.style.value()})})})}}}}]);