Release v26.001 (from 04caa94e)

Fixes tradingview/charting_library#7880
This commit is contained in:
jenkins
2023-08-09 11:53:35 +00:00
parent b5a89b5773
commit 8fb3ee67e0
23 changed files with 1203 additions and 981 deletions

View File

@@ -1 +1 @@
.loading-BPaLXf0z{color:#0000}.container-CD9TBN7D{border-top:1px solid #e0e3eb;display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-width:400px;min-height:0;overflow:auto;padding:16px 20px 0}html.theme-dark .container-CD9TBN7D{border-top:1px solid #434651}.container-CD9TBN7D::-webkit-scrollbar{height:5px;width:5px}.container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#9598a1;border:1px solid #f0f3fa;border-radius:3px}html.theme-dark .container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-CD9TBN7D::-webkit-scrollbar-track{background-color:initial;border-radius:3px}.container-CD9TBN7D::-webkit-scrollbar-corner{display:none}.container-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:visible}.container-CD9TBN7D .title-CD9TBN7D{color:#6a6d78;cursor:default;display:flex;flex:0 0 auto;font-size:11px;letter-spacing:.4px;line-height:16px;text-transform:uppercase}html.theme-dark .container-CD9TBN7D .title-CD9TBN7D{color:#868993}.container-CD9TBN7D .autocomplete-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:2px}.container-CD9TBN7D .saveInterval-CD9TBN7D,.container-CD9TBN7D .saveSymbol-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:16px}.container-CD9TBN7D .saveInterval-CD9TBN7D{padding-bottom:24px}.container-CD9TBN7D .indicators-CD9TBN7D{word-wrap:break-word;color:#131722;cursor:default;display:flex;flex:1 1 auto;flex-direction:column;font-size:14px;line-height:21px;padding-top:8px}html.theme-dark .container-CD9TBN7D .indicators-CD9TBN7D{color:#d1d4dc}.container-CD9TBN7D .indicators-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:hidden}.container-CD9TBN7D .indicators-CD9TBN7D:after{content:"";display:block;padding-bottom:20px}.container-CD9TBN7D .hintLabel-CD9TBN7D{align-items:center;display:flex}.container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#6a6d78;height:18px;margin-left:8px;width:18px}html.theme-dark .container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#868993}
.loading-BPaLXf0z{color:#0000}.container-CD9TBN7D{border-top:1px solid #e0e3eb;display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-width:400px;min-height:0;overflow:auto;padding:16px 20px 0}html.theme-dark .container-CD9TBN7D{border-top:1px solid #434651}.container-CD9TBN7D::-webkit-scrollbar{height:5px;width:5px}.container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#9598a1;border:1px solid #f0f3fa;border-radius:3px}html.theme-dark .container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-CD9TBN7D::-webkit-scrollbar-track{background-color:initial;border-radius:3px}.container-CD9TBN7D::-webkit-scrollbar-corner{display:none}.container-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:visible}.container-CD9TBN7D .title-CD9TBN7D{color:#6a6d78;cursor:default;display:flex;flex:0 0 auto;font-size:11px;letter-spacing:.4px;line-height:16px;text-transform:uppercase}html.theme-dark .container-CD9TBN7D .title-CD9TBN7D{color:#868993}.container-CD9TBN7D .autocomplete-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:2px}.container-CD9TBN7D .saveInterval-CD9TBN7D,.container-CD9TBN7D .saveSymbol-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:16px}.container-CD9TBN7D .saveInterval-CD9TBN7D{padding-bottom:24px}.container-CD9TBN7D .indicators-CD9TBN7D{word-wrap:break-word;color:#131722;cursor:default;display:flex;flex:1 1 auto;flex-direction:column;font-size:14px;line-height:21px;padding-top:8px}html.theme-dark .container-CD9TBN7D .indicators-CD9TBN7D{color:#d1d4dc}.container-CD9TBN7D .indicators-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:hidden}.container-CD9TBN7D .indicators-CD9TBN7D:after{content:"";display:block;padding-bottom:20px}.container-CD9TBN7D .hintLabel-CD9TBN7D{align-items:center;display:flex}.container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#6a6d78;height:18px;margin-left:8px;width:18px}html.theme-dark .container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#868993}.container-CD9TBN7D .hidden-CD9TBN7D{display:none}

View File

@@ -1 +1 @@
.loading-BPaLXf0z{color:#0000}.container-CD9TBN7D{border-top:1px solid #e0e3eb;display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-width:400px;min-height:0;overflow:auto;padding:16px 20px 0}html.theme-dark .container-CD9TBN7D{border-top:1px solid #434651}.container-CD9TBN7D::-webkit-scrollbar{height:5px;width:5px}.container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#9598a1;border:1px solid #f0f3fa;border-radius:3px}html.theme-dark .container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-CD9TBN7D::-webkit-scrollbar-track{background-color:initial;border-radius:3px}.container-CD9TBN7D::-webkit-scrollbar-corner{display:none}.container-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:visible}.container-CD9TBN7D .title-CD9TBN7D{color:#6a6d78;cursor:default;display:flex;flex:0 0 auto;font-size:11px;letter-spacing:.4px;line-height:16px;text-transform:uppercase}html.theme-dark .container-CD9TBN7D .title-CD9TBN7D{color:#868993}.container-CD9TBN7D .autocomplete-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:2px}.container-CD9TBN7D .saveInterval-CD9TBN7D,.container-CD9TBN7D .saveSymbol-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:16px}.container-CD9TBN7D .saveInterval-CD9TBN7D{padding-bottom:24px}.container-CD9TBN7D .indicators-CD9TBN7D{word-wrap:break-word;color:#131722;cursor:default;display:flex;flex:1 1 auto;flex-direction:column;font-size:14px;line-height:21px;padding-top:8px}html.theme-dark .container-CD9TBN7D .indicators-CD9TBN7D{color:#d1d4dc}.container-CD9TBN7D .indicators-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:hidden}.container-CD9TBN7D .indicators-CD9TBN7D:after{content:"";display:block;padding-bottom:20px}.container-CD9TBN7D .hintLabel-CD9TBN7D{align-items:center;display:flex}.container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#6a6d78;height:18px;margin-right:8px;width:18px}html.theme-dark .container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#868993}
.loading-BPaLXf0z{color:#0000}.container-CD9TBN7D{border-top:1px solid #e0e3eb;display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-width:400px;min-height:0;overflow:auto;padding:16px 20px 0}html.theme-dark .container-CD9TBN7D{border-top:1px solid #434651}.container-CD9TBN7D::-webkit-scrollbar{height:5px;width:5px}.container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#9598a1;border:1px solid #f0f3fa;border-radius:3px}html.theme-dark .container-CD9TBN7D::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-CD9TBN7D::-webkit-scrollbar-track{background-color:initial;border-radius:3px}.container-CD9TBN7D::-webkit-scrollbar-corner{display:none}.container-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:visible}.container-CD9TBN7D .title-CD9TBN7D{color:#6a6d78;cursor:default;display:flex;flex:0 0 auto;font-size:11px;letter-spacing:.4px;line-height:16px;text-transform:uppercase}html.theme-dark .container-CD9TBN7D .title-CD9TBN7D{color:#868993}.container-CD9TBN7D .autocomplete-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:2px}.container-CD9TBN7D .saveInterval-CD9TBN7D,.container-CD9TBN7D .saveSymbol-CD9TBN7D{display:flex;flex:0 0 auto;padding-top:16px}.container-CD9TBN7D .saveInterval-CD9TBN7D{padding-bottom:24px}.container-CD9TBN7D .indicators-CD9TBN7D{word-wrap:break-word;color:#131722;cursor:default;display:flex;flex:1 1 auto;flex-direction:column;font-size:14px;line-height:21px;padding-top:8px}html.theme-dark .container-CD9TBN7D .indicators-CD9TBN7D{color:#d1d4dc}.container-CD9TBN7D .indicators-CD9TBN7D.withSuggestions-CD9TBN7D{overflow:hidden}.container-CD9TBN7D .indicators-CD9TBN7D:after{content:"";display:block;padding-bottom:20px}.container-CD9TBN7D .hintLabel-CD9TBN7D{align-items:center;display:flex}.container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#6a6d78;height:18px;margin-right:8px;width:18px}html.theme-dark .container-CD9TBN7D .hintLabel-CD9TBN7D .hintMark-CD9TBN7D{color:#868993}.container-CD9TBN7D .hidden-CD9TBN7D{display:none}

View File

@@ -2,6 +2,6 @@
i.r(t),i.d(t,{getIntervalsVisibilitiesPropertiesDefinitions:()=>ae,getSelectionIntervalsVisibilitiesPropertiesDefinition:()=>de});var n=i(44352),o=i(36298),r=i(14483),s=i(46141),l=i(97145),a=i(94025),d=i(68806),c=i(62513);const p=new o.TranslatedString("change {title} visibility on ticks",n.t(null,void 0,i(30810))),u=new o.TranslatedString("change {title} visibility on seconds",n.t(null,void 0,i(46948))),h=new o.TranslatedString("change {title} seconds from",n.t(null,void 0,i(2822))),y=new o.TranslatedString("change {title} seconds to",n.t(null,void 0,i(66161))),P=new o.TranslatedString("change {title} visibility on minutes",n.t(null,void 0,i(64370))),f=new o.TranslatedString("change {title} minutes from",n.t(null,void 0,i(15106))),g=new o.TranslatedString("change {title} minutes to",n.t(null,void 0,i(91633))),w=new o.TranslatedString("change {title} visibility on hours",n.t(null,void 0,i(68971))),m=new o.TranslatedString("change {title} hours from",n.t(null,void 0,i(35388))),_=new o.TranslatedString("change {title} hours to",n.t(null,void 0,i(78586))),b=new o.TranslatedString("change {title} visibility on days",n.t(null,void 0,i(29088))),v=new o.TranslatedString("change {title} days from",n.t(null,void 0,i(41377))),S=new o.TranslatedString("change {title} days to",n.t(null,void 0,i(13355))),T=new o.TranslatedString("change {title} visibility on weeks",n.t(null,void 0,i(24941))),C=new o.TranslatedString("change {title} weeks from",n.t(null,void 0,i(21339))),V=new o.TranslatedString("change {title} weeks to",n.t(null,void 0,i(68643))),D=new o.TranslatedString("change {title} visibility on months",n.t(null,void 0,i(6659))),W=new o.TranslatedString("change {title} months from",n.t(null,void 0,i(59635))),k=new o.TranslatedString("change {title} months to",n.t(null,void 0,i(74266))),x=(new o.TranslatedString("change {title} visibility on ranges",n.t(null,void 0,i(29091))),n.t(null,void 0,i(30973))),I=n.t(null,void 0,i(71129)),M=n.t(null,void 0,i(28134)),U=n.t(null,void 0,i(63099)),A=n.t(null,void 0,i(22192)),L=n.t(null,void 0,i(21594)),R=n.t(null,void 0,i(95543)),F=(n.t(null,void 0,i(86672)),
new o.TranslatedString("ticks",n.t(null,void 0,i(59523)))),N=new o.TranslatedString("seconds",n.t(null,void 0,i(32925))),Y=new o.TranslatedString("seconds from",n.t(null,void 0,i(6049))),E=new o.TranslatedString("seconds to",n.t(null,void 0,i(39017))),X=new o.TranslatedString("minutes",n.t(null,void 0,i(16465))),H=new o.TranslatedString("minutes from",n.t(null,void 0,i(25586))),$=new o.TranslatedString("minutes to",n.t(null,void 0,i(72317))),j=new o.TranslatedString("hours",n.t(null,void 0,i(3143))),K=new o.TranslatedString("hours from",n.t(null,void 0,i(84775))),O=new o.TranslatedString("hours to",n.t(null,void 0,i(11255))),z=new o.TranslatedString("days",n.t(null,void 0,i(82211))),B=new o.TranslatedString("days from",n.t(null,void 0,i(14077))),q=new o.TranslatedString("days to",n.t(null,void 0,i(33486))),G=new o.TranslatedString("weeks",n.t(null,void 0,i(93016))),J=new o.TranslatedString("weeks from",n.t(null,void 0,i(32002))),Q=new o.TranslatedString("weeks to",n.t(null,void 0,i(28091))),Z=new o.TranslatedString("months",n.t(null,void 0,i(58964))),ee=new o.TranslatedString("months from",n.t(null,void 0,i(71770))),te=new o.TranslatedString("months to",n.t(null,void 0,i(37179))),ie=(new o.TranslatedString("ranges",n.t(null,void 0,i(13604))),[1,59]),ne=[1,59],oe=[1,24],re=[1,366],se=[1,52],le=[1,12];function ae(e,t,i){const n=[];if(r.enabled("tick_resolution")){const o=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.ticks,p.format({title:i}))},{id:"IntervalsVisibilitiesTicks",title:x});n.push(o)}if((0,a.isSecondsEnabled)()){const o=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.seconds,u.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.secondsFrom,h.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.secondsTo,y.format({title:i}))},{id:"IntervalsVisibilitiesSecond",title:I,min:new l.WatchedValue(ie[0]),max:new l.WatchedValue(ie[1])});n.push(o)}const o=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.minutes,P.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.minutesFrom,f.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.minutesTo,g.format({title:i}))},{id:"IntervalsVisibilitiesMinutes",title:M,min:new l.WatchedValue(ne[0]),max:new l.WatchedValue(ne[1])}),d=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.hours,w.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.hoursFrom,m.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.hoursTo,_.format({title:i}))},{id:"IntervalsVisibilitiesHours",title:U,min:new l.WatchedValue(oe[0]),max:new l.WatchedValue(oe[1])}),c=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.days,b.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.daysFrom,v.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.daysTo,S.format({title:i}))},{id:"IntervalsVisibilitiesDays",title:A,min:new l.WatchedValue(re[0]),max:new l.WatchedValue(re[1])})
;n.push(o,d,c);const F=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.weeks,T.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.weeksFrom,C.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.weeksTo,V.format({title:i}))},{id:"IntervalsVisibilitiesWeeks",title:L,min:new l.WatchedValue(se[0]),max:new l.WatchedValue(se[1])}),N=(0,s.createRangePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.months,D.format({title:i})),from:(0,s.convertToDefinitionProperty)(e,t.monthsFrom,W.format({title:i})),to:(0,s.convertToDefinitionProperty)(e,t.monthsTo,k.format({title:i}))},{id:"IntervalsVisibilitiesMonths",title:R,min:new l.WatchedValue(le[0]),max:new l.WatchedValue(le[1])});return n.push(F,N),{definitions:n}}function de(e,t){const i=[];if(r.enabled("tick_resolution")){const n=(0,s.createCheckablePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.ticks),F,t)},{id:"IntervalsVisibilitiesTicks",title:x});i.push(n)}if((0,a.isSecondsEnabled)()){const n=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.seconds),N,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.secondsFrom),Y,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.secondsTo),E,t)},{id:"IntervalsVisibilitiesSecond",title:I,min:new l.WatchedValue(ie[0]),max:new l.WatchedValue(ie[1])});i.push(n)}const n=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.minutes),X,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.minutesFrom),H,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.minutesTo),$,t)},{id:"IntervalsVisibilitiesMinutes",title:M,min:new l.WatchedValue(ne[0]),max:new l.WatchedValue(ne[1])}),o=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.hours),j,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.hoursFrom),K,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.hoursTo),O,t)},{id:"IntervalsVisibilitiesHours",title:U,min:new l.WatchedValue(oe[0]),max:new l.WatchedValue(oe[1])}),p=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.days),z,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.daysFrom),B,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.daysTo),q,t)},{id:"IntervalsVisibilitiesDays",title:A,min:new l.WatchedValue(re[0]),max:new l.WatchedValue(re[1])});i.push(n,o,p);const u=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.weeks),G,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.weeksFrom),J,t),
to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.weeksTo),Q,t)},{id:"IntervalsVisibilitiesWeeks",title:L,min:new l.WatchedValue(se[0]),max:new l.WatchedValue(se[1])}),h=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.months),Z,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.monthsFrom),ee,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.monthsTo),te,t)},{id:"IntervalsVisibilitiesMonths",title:R,min:new l.WatchedValue(le[0]),max:new l.WatchedValue(le[1])});return i.push(u,h),{definitions:i}}},85766:(e,t,i)=>{i.r(t),i.d(t,{LineDataSourceDefinitionsViewModel:()=>m});var n=i(50151),o=i(44352),r=i(36298),s=(i(42053),i(46141)),l=i(73955),a=i(97145),d=i(97456),c=i(41339),p=i(87919),u=i(37591);const h=o.t(null,void 0,i(21852)),y=o.t(null,void 0,i(4639)),P=o.t(null,void 0,i(32733)),f=o.t(null,void 0,i(37229)),g=o.t(null,void 0,i(66304)),w=o.t(null,{context:"linetool point"},i(9671));class m{constructor(e,t){this._yCoordinateStepWV=null,this._propertyPages=[],this._source=t,this._undoModel=e,this._ownerSource=(0,n.ensureNotNull)(this._source.ownerSource()),this._propertyApplier=new p.PropertyApplierWithoutSavingChart((()=>e),new a.WatchedValue(!0)),this._createPropertyRages()}destroy(){null!==this._yCoordinateStepWV&&(this._source.ownerSourceChanged().unsubscribeAll(this),this._ownerSource.priceStepChanged().unsubscribeAll(this)),this._source.pointAdded().unsubscribeAll(this),this._propertyPages.forEach((e=>{(0,s.destroyDefinitions)(e.definitions.value())}))}propertyPages(){return Promise.resolve(this._propertyPages)}_createPropertyRages(){this._propertyPages=[];const e=this._createInputsPropertyPage();null!==e&&this._propertyPages.push(e);const t=this._createStylePropertyPage();null!==t&&this._propertyPages.push(t);const i=this._createTextPropertyPage();if(null!==i&&this._propertyPages.push(i),this._source.hasEditableCoordinates()){const e=this._createCoordinatesPropertyPage();null!==e&&this._propertyPages.push(e)}const n=this._createVisibilitiesPropertyPage();this._propertyPages.push(n)}_createVisibilitiesPropertyPage(){const e=this._source.properties().childs().intervalsVisibilities.childs();return(0,l.createPropertyPage)((0,d.getIntervalsVisibilitiesPropertiesDefinitions)(this._undoModel,e,new r.TranslatedString(this._source.name(),this._source.title(u.TitleDisplayTarget.StatusLine,!0))),"visibility",h)}_createCoordinatesPropertyPage(){const e=this._coordinatesPropertyDefinitions();return null!==e?(e.definitions.length<this._source.pointsCount()&&this._source.pointAdded().subscribe(this,this._updateCoordinatesPropertyDefinitons),(0,l.createPropertyPage)(e,"coordinates",y)):null}_getYCoordinateStepWV(){return null===this._yCoordinateStepWV&&(this._yCoordinateStepWV=new a.WatchedValue(function(e){if(null!==e){const t=e.priceStep();if(null!==t)return t}return 1}(this._source.ownerSource())),
to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.weeksTo),Q,t)},{id:"IntervalsVisibilitiesWeeks",title:L,min:new l.WatchedValue(se[0]),max:new l.WatchedValue(se[1])}),h=(0,s.createRangePropertyDefinition)({checked:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.months),Z,t),from:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.monthsFrom),ee,t),to:new c.CollectiblePropertyUndoWrapper(new d.LineToolCollectedProperty(e.monthsTo),te,t)},{id:"IntervalsVisibilitiesMonths",title:R,min:new l.WatchedValue(le[0]),max:new l.WatchedValue(le[1])});return i.push(u,h),{definitions:i}}},85766:(e,t,i)=>{i.r(t),i.d(t,{LineDataSourceDefinitionsViewModel:()=>m});var n=i(50151),o=i(44352),r=i(36298),s=(i(42053),i(46141)),l=i(73955),a=i(97145),d=i(97456),c=i(41339),p=i(87919),u=i(37591);const h=o.t(null,void 0,i(21852)),y=o.t(null,void 0,i(4639)),P=o.t(null,void 0,i(32733)),f=o.t(null,void 0,i(37229)),g=o.t(null,void 0,i(66304)),w=o.t(null,{context:"linetool point"},i(9671));class m{constructor(e,t){this._yCoordinateStepWV=null,this._propertyPages=[],this._source=t,this._undoModel=e,this._ownerSource=(0,n.ensureNotNull)(this._source.ownerSource()),this._propertyApplier=new p.PropertyApplierWithoutSavingChart((()=>e),new a.WatchedValue(false)),this._createPropertyRages()}destroy(){null!==this._yCoordinateStepWV&&(this._source.ownerSourceChanged().unsubscribeAll(this),this._ownerSource.priceStepChanged().unsubscribeAll(this)),this._source.pointAdded().unsubscribeAll(this),this._propertyPages.forEach((e=>{(0,s.destroyDefinitions)(e.definitions.value())}))}propertyPages(){return Promise.resolve(this._propertyPages)}_createPropertyRages(){this._propertyPages=[];const e=this._createInputsPropertyPage();null!==e&&this._propertyPages.push(e);const t=this._createStylePropertyPage();null!==t&&this._propertyPages.push(t);const i=this._createTextPropertyPage();if(null!==i&&this._propertyPages.push(i),this._source.hasEditableCoordinates()){const e=this._createCoordinatesPropertyPage();null!==e&&this._propertyPages.push(e)}const n=this._createVisibilitiesPropertyPage();this._propertyPages.push(n)}_createVisibilitiesPropertyPage(){const e=this._source.properties().childs().intervalsVisibilities.childs();return(0,l.createPropertyPage)((0,d.getIntervalsVisibilitiesPropertiesDefinitions)(this._undoModel,e,new r.TranslatedString(this._source.name(),this._source.title(u.TitleDisplayTarget.StatusLine,!0))),"visibility",h)}_createCoordinatesPropertyPage(){const e=this._coordinatesPropertyDefinitions();return null!==e?(e.definitions.length<this._source.pointsCount()&&this._source.pointAdded().subscribe(this,this._updateCoordinatesPropertyDefinitons),(0,l.createPropertyPage)(e,"coordinates",y)):null}_getYCoordinateStepWV(){return null===this._yCoordinateStepWV&&(this._yCoordinateStepWV=new a.WatchedValue(function(e){if(null!==e){const t=e.priceStep();if(null!==t)return t}return 1}(this._source.ownerSource())),
this._ownerSource.priceStepChanged().subscribe(this,(()=>this._updateYCoordinateStep())),this._source.ownerSourceChanged().subscribe(this,(()=>{this._ownerSource.priceStepChanged().unsubscribeAll(this),this._ownerSource=(0,n.ensureNotNull)(this._source.ownerSource()),this._ownerSource.priceStepChanged().subscribe(this,(()=>this._updateYCoordinateStep()))}))),this._yCoordinateStepWV}_coordinatesPropertyDefinitions(){const e=this._source.points(),t=this._source.pointsProperty().childs().points,i=[],n=this._getYCoordinateStepWV();return e.forEach(((e,o)=>{const r=t[o].childs();r&&i.push((0,c.getCoordinatesPropertiesDefinitions)(this._propertyApplier,r,e,n,w.format({count:(o+1).toString()}),this._source.name()))})),{definitions:i}}_createStylePropertyPage(){const e=this._stylePropertyDefinitions();return null!==e?(0,l.createPropertyPage)(e,"style",P):null}_stylePropertyDefinitions(){return null}_createTextPropertyPage(){const e=this._textPropertyDefinitions();return null!==e?(0,l.createPropertyPage)(e,"text",f):null}_textPropertyDefinitions(){return null}_createInputsPropertyPage(){const e=this._inputsPropertyDefinitions();return null!==e?(0,l.createPropertyPage)(e,"inputs",g):null}_inputsPropertyDefinitions(){return null}_updateYCoordinateStep(){const e=this._ownerSource.priceStep();this._getYCoordinateStepWV().setValue(e||1)}_updateCoordinatesPropertyDefinitons(){const e=this._coordinatesPropertyDefinitions();if(null!==e){(0,n.ensureDefined)(this._propertyPages.find((e=>"coordinates"===e.id))).definitions.setValue(e.definitions),this._source.points().length===this._source.pointsCount()&&this._source.pointAdded().unsubscribeAll(this)}}}},56059:(e,t,i)=>{i.r(t),i.d(t,{StudyLineDataSourceDefinitionsViewModel:()=>c});var n=i(44352),o=(i(42053),i(57898)),r=i(46141),s=i(85766),l=i(96362),a=i(41339),d=i(94474);class c extends s.LineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t)}_inputsPropertyDefinitions(){return{definitions:[(0,r.createStudyInputsPropertyDefinition)({},{id:"StudyInputs",inputs:new l.MetaInfoHelper(this._source.metaInfo()).getUserEditableInputs(),inputsTabProperty:this._source.properties(),model:this._undoModel,studyMetaInfo:this._source.metaInfo(),source:{isInputsStudy:!0,symbolsResolved:()=>new o.Delegate,resolvedSymbolInfoBySymbol:e=>null}})]}}_coordinatesPropertyDefinitions(){const e=this._source.points(),t=this._source.pointsProperty().childs().points,o=[];return e.forEach(((e,s)=>{const l=t[s].childs();if(!l)return;const c=(0,a.getCoordinateXMetaInfo)(this._propertyApplier,l);o.push((0,r.createCoordinatesPropertyDefinition)({x:c.property},{id:(0,d.removeSpaces)(`${this._source.name()}Point${s}`),title:n.t(null,{context:"linetool point"},i(63227)).format({count:(s+1).toString()}),...c.info}))})),{definitions:o}}}},62513:(e,t,i)=>{i.d(t,{CollectiblePropertyUndoWrapper:()=>d});var n=i(50151),o=i(44352),r=i(36298),s=i(59452),l=i.n(s);const a=new r.TranslatedString("change {propertyName} property",o.t(null,void 0,i(18567)));class d extends(l()){constructor(e,t,i){super(),this._isProcess=!1,
this._listenersMappers=[],this._valueApplier={applyValue:(e,t)=>{this._propertyApplier.setProperty(e,t,a)}},this._baseProperty=e,this._propertyApplier=i,this._propertyName=t}destroy(){this._baseProperty.destroy(),super.destroy()}value(){return this._baseProperty.value()}setValue(e,t){this._propertyApplier.beginUndoMacro(a.format({propertyName:this._propertyName})),this._isProcess=!0,this._baseProperty.setValue(e,void 0,this._valueApplier),this._isProcess=!1,this._propertyApplier.endUndoMacro(),this._listenersMappers.forEach((e=>{e.method.call(e.obj,this)}))}subscribe(e,t){const i=()=>{this._isProcess||t.call(e,this)};this._listenersMappers.push({obj:e,method:t,callback:i}),this._baseProperty.subscribe(e,i)}unsubscribe(e,t){var i;const o=(0,n.ensureDefined)(null===(i=this._listenersMappers.find((i=>i.obj===e&&i.method===t)))||void 0===i?void 0:i.callback);this._baseProperty.unsubscribe(e,o)}unsubscribeAll(e){this._baseProperty.unsubscribeAll(e)}}},87919:(e,t,i)=>{i.d(t,{PropertyApplierWithoutSavingChart:()=>n});class n{constructor(e,t){this._undoModelSupplier=e,this._featureToggle=t}setProperty(e,t,i){this._undoModelSupplier().setProperty(e,t,i,this._featureToggle.value())}beginUndoMacro(e){return this._undoModelSupplier().beginUndoMacro(e,this._shouldWeKeepChartValidated())}endUndoMacro(){this._undoModelSupplier().endUndoMacro()}setWatchedValue(e,t,i){this._undoModelSupplier().undoHistory().setWatchedValue(e,t,i,!0)}_shouldWeKeepChartValidated(){const e=this._undoModelSupplier().model().isAutoSaveEnabled().value();return this._featureToggle.value()&&e}}},99970:(e,t,i)=>{i.d(t,{StudyPlotVisibleProperty:()=>r});var n=i(19782),o=i(57898);class r{constructor(e){this._subscribers=new o.Delegate,this._displayProperty=e,this._displayProperty.subscribe(this,this._displayPropertyValueChanged)}destroy(){this._displayProperty.unsubscribe(this,this._displayPropertyValueChanged),this._subscribers.destroy()}value(){return 0!==this._displayProperty.value()}setValue(e,t){this._displayProperty.setValue(e?15:0)}subscribe(e,t){this._subscribers.subscribe(e,t,!1)}unsubscribe(e,t){this._subscribers.unsubscribe(e,t)}unsubscribeAll(e){this._subscribers.unsubscribeAll(e)}storeStateIfUndefined(){return!1}weakReference(){return(0,n.weakReference)(this)}ownership(){return(0,n.ownership)(this)}_displayPropertyValueChanged(){this._subscribers.fire(this)}}}}]);

View File

@@ -4,10 +4,10 @@ dot:"dot-GZajBGIm"}},57222:e=>{e.exports={button:"button-Rc93kXa8",bordersVisibl
t.classList.add("i-no-scroll")}else if(!e&&i>0&&0==--i&&(t.classList.remove("i-no-scroll"),l)){a(o,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=r()),t.style.paddingRight=(e<0?0:e)+"px",l=!1}}},45601:(e,t,o)=>{"use strict";o.d(t,{Measure:()=>a});var r=o(67842);function a(e){const{children:t,onResize:o}=e;return t((0,r.useResizeObserver)(o||(()=>{}),[null===o]))}},39362:(e,t,o)=>{"use strict";o.d(t,{SymbolSearchDialogFooter:()=>i});var r=o(50959),a=o(97754),n=o.n(a),s=o(17723);function i(e){const{className:t,children:o}=e;return r.createElement("div",{className:n()(s.footer,t)},o)}},89035:(e,t,o)=>{"use strict";o.r(t),o.d(t,{getCompareDialogRenderer:()=>se});var r=o(50959),a=o(44352),n=o(32563),s=o(14483),i=o(65106),l=o(97754),c=o.n(l),d=o(50151),u=o(9745),m=o(86656),h=o(77975),p=o(63932),v=o(26843),f=o(45345),b=o(45601),g=o(84524),y=o(40987);const S=r.createContext(null);var _=o(70412),k=o(78036);const x=r.createContext(null);var w=o(16396),I=o(41590),C=o(37558),E=o(57222);function N(e){const{theme:t=E,children:o,onClick:a,isSelected:n,areBordersVisible:s,isItemSelected:i,className:l,value:d,name:u}=e;return r.createElement("button",{type:"button",className:c()(l,t.button,n&&t.selected,s&&!n&&!i&&t.bordersVisible),name:u,value:d,onClick:a},o)}function z(e){const{value:t,onClick:o,...a}=e,n=(0,r.useCallback)((e=>o(t,e)),[t,o]);return r.createElement(N,{...a,value:String(t),onClick:n})}var M=o(46148),D=o(85286);const L={samePctScale:a.t(null,void 0,o(82642)),newPriceScale:a.t(null,void 0,o(34420)),newPane:a.t(null,void 0,o(67242)),sameScale:a.t(null,void 0,o(17547))};function T(e){const{fullSymbolName:t,isSelected:n,className:s,isYield:l}=e,{isMobile:d,searchRef:u,setMode:m}=(0,k.useEnsuredContext)(g.SymbolSearchItemsDialogContext),{compareModel:h,selectedCompareOption:p,setHoveredItemId:v,clearInput:f,allowExtendTimeScale:b}=(0,k.useEnsuredContext)(S),{callback:y}=(0,k.useEnsuredContext)(x),_=h.comparableOnSameScale({isYield:l}),E=_?M.CompareOption.SameScale:M.CompareOption.SamePctScale,N=_?L.sameScale:L.samePctScale;return d?r.createElement(C.DrawerManager,null,r.createElement(I.Drawer,{position:"Bottom",onClose:T.bind(null,!1)},r.createElement("div",{className:D.header},a.t(null,void 0,o(79589))),r.createElement(w.PopupMenuItem,{className:D.item,onClick:A,onClickArg:E,label:N}),r.createElement(w.PopupMenuItem,{className:D.item,onClick:A,onClickArg:M.CompareOption.NewPriceScale,label:L.newPriceScale}),r.createElement(w.PopupMenuItem,{className:D.item,onClick:A,onClickArg:M.CompareOption.NewPane,label:L.newPane}))):r.createElement("div",{className:c()(D.wrap,s),"data-name":"compare-buttons-group"},r.createElement(z,{onClick:A,value:E,isItemSelected:Boolean(n),isSelected:n&&p===E},N),r.createElement(z,{onClick:A,value:M.CompareOption.NewPriceScale,isItemSelected:Boolean(n),isSelected:n&&p===M.CompareOption.NewPriceScale},L.newPriceScale),r.createElement(z,{onClick:A,value:M.CompareOption.NewPane,isItemSelected:Boolean(n),isSelected:n&&p===M.CompareOption.NewPane},L.newPane));function T(e){d&&y&&y(),
f&&e&&f(u,m)}function A(e,o){if(o.preventDefault(),h&&t&&void 0!==e){(0,i.getSymbolSearchCompleteOverrideFunction)()(t).then((t=>{h.applyStudy(t.symbol,e,b),v(""),T(!0)}))}}}function A(e){const{isSelected:t,fullSymbolName:o,onExpandClick:a,actions:s,id:l,isOffset:c,isYield:d}=e,{isMobile:u,toggleExpand:m,searchSpreads:h,searchRef:p,setMode:v,mode:f}=(0,k.useEnsuredContext)(g.SymbolSearchItemsDialogContext),{compareModel:b,hoveredItemId:w,setHoveredItemId:I,clearInput:C,allowExtendTimeScale:E}=(0,k.useEnsuredContext)(S),[N,z]=(0,r.useState)(!1),D=(0,r.useRef)(null),L=(0,_.useAccurateHover)(D),A=(0,r.useMemo)((()=>({callback:P})),[P]),B=!Boolean(a)&&!Boolean(s),j=l===w;return r.createElement(x.Provider,{value:A},r.createElement(y.SymbolSearchDialogContentItem,{hideMarkedListFlag:"compare"===f,...e,reference:D,onClick:function(t){if(Boolean(a)&&l&&!c)return null==t||t.preventDefault(),void m(l);if(!N&&u)return void z(!0);if(h&&e.onClick)return void e.onClick(t);if((n.mobiletouch?j:!N)&&o){(0,i.getSymbolSearchCompleteOverrideFunction)()(o).then((e=>{const t=b.comparableOnSameScale({isYield:d})?M.CompareOption.SameScale:M.CompareOption.SamePctScale;b.applyStudy(e.symbol,t,E)})),I(""),C&&C(p,v)}n.mobiletouch&&!u&&!j&&l&&I(l)},hoverComponent:function(){if(!B)return!1;if(u)return N;if(n.mobiletouch)return j;return Boolean(L||t)}()?T:void 0}));function P(){z(!1)}}var B=o(15550),j=o(93986),P=o(39750),H=o(78724);function O(e){const{handleListWidth:t}=(0,d.ensureNotNull)((0,r.useContext)(g.SymbolSearchItemsDialogContext)),{compareModel:n,selectedCompareIndex:s,selectedItemRef:i}=(0,d.ensureNotNull)((0,r.useContext)(S)),l=(0,h.useWatchedValueReadonly)({watchedValue:n.isDataReady()}),_=(0,h.useWatchedValueReadonly)({watchedValue:n.studies()}),k=(0,h.useWatchedValueReadonly)({watchedValue:n.highlightedSymbol()}),x=(0,r.useMemo)((()=>_.filter((e=>e.checked))),[_]),w=(0,r.useMemo)((()=>_.filter((e=>!e.checked))),[_]);return(0,r.useEffect)((()=>(n.chartModel().dataSourceCollectionChanged().subscribe(n,n.handleSourcesChange),()=>n.chartModel().dataSourceCollectionChanged().unsubscribe(n,n.handleSourcesChange))),[n]),r.createElement(b.Measure,{onResize:function([e]){t(e.contentRect.width)}},(e=>r.createElement(m.TouchScrollContainer,{className:H.scrollable,ref:e},function(){if(!l)return r.createElement("div",{className:H.spinnerWrap},r.createElement(p.Spinner,null));if(!Boolean(x.length)&&!Boolean(w.length)){const e=f.watchedTheme.value()===v.StdTheme.Dark?j:B;return r.createElement("div",{className:H.emptyState},r.createElement(u.Icon,{className:H.image,icon:e}),r.createElement("div",{className:H.text},a.t(null,void 0,o(42078))))}return r.createElement(r.Fragment,null,Boolean(x.length)&&r.createElement(r.Fragment,null,r.createElement("div",{className:H.heading},a.t(null,void 0,o(46580))),x.map(((e,t)=>r.createElement(y.SymbolSearchDialogContentItem,{"data-role":"added-symbol-item",className:H.item,key:e.id,id:e.id,shortName:e.title,title:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,
dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,country:e.country,providerId:e.providerId,onClick:I.bind(null,e),isHighlighted:e.id===k,isSelected:C(e),itemRef:C(e)?i:void 0,isYield:e.isYield,actions:r.createElement("div",{className:H.checkboxWrap},r.createElement(N,{className:H.checkbox,onClick:I.bind(null,e),isSelected:C(e)},r.createElement(u.Icon,{icon:P})))})))),Boolean(w.length)&&r.createElement(r.Fragment,null,r.createElement("div",{className:H.heading},a.t(null,void 0,o(57570))),w.map((e=>r.createElement(A,{"data-role":"recent-symbol-item",className:c()(H.item,e.id===k&&H.highlighted),key:e.id,id:e.id,shortName:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,title:e.title,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,country:e.country,providerId:e.providerId,fullSymbolName:e.symbol,isSelected:C(e),itemRef:C(e)?i:void 0,isYield:e.isYield})))))}())));function I(e,t){null==t||t.preventDefault(),n.removeStudy(e)}function C(e){return _.indexOf(e)===s}}var R=o(56840);class W extends r.PureComponent{constructor(e){super(e),this._selectedItemRef=r.createRef(),this._getContextValue=()=>{const{compareModel:e}=this.props,{selectedCompareOption:t,selectedCompareIndex:o,hoveredItemId:r,allowExtendTimeScale:a}=this.state;return{compareModel:e,selectedCompareOption:t,setSelectedCompareOption:this._setSelectedCompareOption,hoveredItemId:r,setHoveredItemId:this._setHoveredItemId,selectedCompareIndex:o,setSelectedCompareIndex:this._setSelectedCompareIndex,selectedItemRef:this._selectedItemRef,clearInput:this._clearInput,allowExtendTimeScale:a,toggleAllowExtendTimeScale:this._toggleAllowExtendTimeScale}},this._clearInput=(e,t)=>{e&&e.current&&(e.current.value="",t("compare"))},this._setSelectedCompareOption=e=>{this.setState({selectedCompareOption:e})},this._setHoveredItemId=e=>{this.setState({hoveredItemId:e})},this._setSelectedCompareIndex=(e,t)=>{this.setState({selectedCompareIndex:e},t)},this._toggleAllowExtendTimeScale=()=>{const e=!this.state.allowExtendTimeScale;R.setValue("showAddSymbolDialog.extendCheckboxState",e),this.setState({allowExtendTimeScale:e})},this.state={selectedCompareOption:0,selectedCompareIndex:-1,hoveredItemId:void 0,allowExtendTimeScale:Boolean(R.getBool("showAddSymbolDialog.extendCheckboxState"))}}render(){const{children:e}=this.props;return r.createElement(S.Provider,{value:this._getContextValue()},e)}}var F=o(68335),U=o(35057),Y=o(10341);const q=Object.keys(M.CompareOption).length/2;function K(e){const{openedItems:t,searchRef:o,feedItems:a,selectedIndex:n,toggleExpand:s,onSearchComplete:i,mode:c,setMode:d,setSelectedIndex:u,isMobile:m,isTablet:p,onClose:v,upperCaseEnabled:f}=(0,k.useEnsuredContext)(g.SymbolSearchItemsDialogContext),{compareModel:b,hoveredItemId:y,setHoveredItemId:_,selectedCompareOption:x,setSelectedCompareOption:w,selectedCompareIndex:I,setSelectedCompareIndex:C,selectedItemRef:E,clearInput:N,allowExtendTimeScale:z}=(0,
k.useEnsuredContext)(S),M=(0,h.useWatchedValueReadonly)({watchedValue:b.studies()}),D=a[n],L="compare"===c,T="exchange"===c;return(0,r.useEffect)((()=>{y&&_(""),I&&C(-1)}),[c]),r.createElement(U.AdaptivePopupDialog,{...e,className:l(Y.dialog,!m&&p&&Y.tablet),onKeyDown:function(e){var r;const l=(0,F.hashFromEvent)(e),c=L?I:n,u=L?M:a;switch(l){case 38:if(e.preventDefault(),0===c)return;if(-1===c)return void A(0);A(c-1);break;case 40:if(e.preventDefault(),c===u.length-1)return;A(c+1);break;case 37:{const o=j();if(o&&t.has(o))return e.preventDefault(),void s(o);if(!x||o)return;e.preventDefault(),w(x-1);break}case 39:{const o=j();if(o&&!t.has(o))return e.preventDefault(),void s(o);if(x===q-1||o)return;e.preventDefault(),w(x+1);break}case 13:{if(L)return void function(){if(-1===I)return;const e=M[I];e.checked?b.removeStudy(e):b.applyStudy(e.symbol,x,z);C(-1)}();const t=j();if(t)return e.preventDefault(),void s(t);e.preventDefault();const a=null===(r=null==o?void 0:o.current)||void 0===r?void 0:r.value.trim();a&&N&&(i([{symbol:f?a.toUpperCase():a,resolved:!1,compareOption:x,allowExtendTimeScale:z}]),N(o,d));break}case 27:if(e.preventDefault(),T)return void d("symbolSearch");v()}},dataName:"compare-dialog",draggable:!0});function A(e){L?C(e,B):u(e)}function B(){var e;null===(e=E.current)||void 0===e||e.scrollIntoView({block:"nearest"})}function j(){if(!D)return;const{id:e,isOffset:t,onExpandClick:o}=D;return!t&&Boolean(o)&&e?e:void 0}}var V=o(962),Z=o(32456),G=o(85067);class J extends G.DialogRenderer{constructor(e){super(),this._props=e}show(e){if(this.visible().value())return;const t=r.createElement(Z.SymbolSearchItemsDialog,{...this._props,shouldReturnFocus:null==e?void 0:e.shouldReturnFocus,initialMode:this._props.initialMode||"symbolSearch",onClose:()=>this.hide()});V.render(t,this._container),this._setVisibility(!0)}hide(){var e,t;V.unmountComponentAtNode(this._container),this._visibility.setValue(!1),null===(t=(e=this._props).onClose)||void 0===t||t.call(e)}}var X=o(81319),Q=o(69654),$=o(70613);function ee(e){const{searchRef:t,setMode:o}=(0,k.useEnsuredContext)(g.SymbolSearchItemsDialogContext),{currentMode:a}=(0,k.useEnsuredContext)($.SymbolSearchDialogBodyContext);return(0,r.useEffect)((()=>{const e=t.current;if(e)return e.addEventListener("input",n),()=>{e&&e.removeEventListener("input",n)}}),[]),r.createElement(Q.DialogSearch,{...e});function n(){var e,r,n,s;t.current&&a&&("compare"!==a.current||""===(null===(r=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.value)||void 0===r?void 0:r.trim())?"symbolSearch"===a.current&&""===(null===(s=null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.value)||void 0===s?void 0:s.trim())&&o("compare"):o("symbolSearch"))}}var te=o(70673),oe=o(39362),re=o(44467);function ae(e){const{allowExtendTimeScale:t,toggleAllowExtendTimeScale:n}=(0,d.ensureNotNull)((0,r.useContext)(S));return r.createElement(oe.SymbolSearchDialogFooter,null,r.createElement("label",null,r.createElement(te.CheckboxInput,{checked:t,value:t?"on":"off",onChange:n}),r.createElement("span",{
className:re.label},a.t(null,void 0,o(71046)))))}const ne=s.enabled("secondary_series_extend_time_scale");function se(e){return new J({wrapper:(t=e,e=>r.createElement(W,{...e,compareModel:t})),dialog:K,contentItem:A,initialScreen:O,searchInput:ee,footer:ne?r.createElement(ae):void 0,initialMode:"compare",dialogTitle:a.t(null,void 0,o(22320)),autofocus:!n.mobiletouch,dialogWidth:"fixed",onSearchComplete:t=>{const{compareOption:o,allowExtendTimeScale:r}=t[0];if(void 0!==o){(0,i.getSymbolSearchCompleteOverrideFunction)()(t[0].symbol,t[0].result).then((t=>{e.applyStudy(t.symbol,o,r)}))}},symbolTypes:(0,X.getAvailableSymbolTypes)(),showSpreadActions:s.enabled("show_spread_operators")&&s.enabled("compare_symbol_search_spread_operators")});var t}},46148:(e,t,o)=>{"use strict";var r;o.d(t,{CompareOption:()=>r}),function(e){e[e.SamePctScale=0]="SamePctScale",e[e.NewPriceScale=1]="NewPriceScale",e[e.NewPane=2]="NewPane",e[e.SameScale=3]="SameScale"}(r||(r={}))},37558:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>s,DrawerManager:()=>n});var r=o(50959),a=o(99054);class n extends r.PureComponent{constructor(e){super(e),this._isBodyFixed=!1,this._addDrawer=e=>{this.setState((t=>({stack:[...t.stack,e]})))},this._removeDrawer=e=>{this.setState((t=>({stack:t.stack.filter((t=>t!==e))})))},this.state={stack:[]}}componentDidUpdate(e,t){!t.stack.length&&this.state.stack.length&&((0,a.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,a.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,a.setFixedBodyState)(!1)}render(){return r.createElement(s.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.stack.length?this.state.stack[this.state.stack.length-1]:null}},this.props.children)}}const s=r.createContext(null)},41590:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>m});var r=o(50959),a=o(50151),n=o(97754),s=o(36174),i=o(65718),l=o(37558),c=o(29197),d=o(86656),u=o(66076);function m(e){const{position:t="Bottom",onClose:o,children:d,className:m,theme:p=u}=e,v=(0,a.ensureNotNull)((0,r.useContext)(l.DrawerContext)),[f]=(0,r.useState)((()=>(0,s.randomHash)())),b=(0,r.useRef)(null),g=(0,r.useContext)(c.CloseDelegateContext);return(0,r.useLayoutEffect)((()=>((0,a.ensureNotNull)(b.current).focus({preventScroll:!0}),g.subscribe(v,o),v.addDrawer(f),()=>{v.removeDrawer(f),g.unsubscribe(v,o)})),[]),r.createElement(i.Portal,null,r.createElement("div",{className:n(u.wrap,u[`position${t}`])},f===v.currentDrawer&&r.createElement("div",{className:u.backdrop,onClick:o}),r.createElement(h,{className:n(p.drawer,u[`position${t}`],m),ref:b,"data-name":e["data-name"]},d)))}const h=(0,r.forwardRef)(((e,t)=>{const{className:o,...a}=e;return r.createElement(d.TouchScrollContainer,{className:n(u.drawer,o),tabIndex:-1,ref:t,...a})}))},70412:(e,t,o)=>{"use strict";o.d(t,{hoverMouseEventFilter:()=>n,useAccurateHover:()=>s,useHover:()=>a});var r=o(50959);function a(){const[e,t]=(0,r.useState)(!1);return[e,{
onMouseOver:function(e){n(e)&&t(!0)},onMouseOut:function(e){n(e)&&t(!1)}}]}function n(e){return!e.currentTarget.contains(e.relatedTarget)}function s(e){const[t,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const t=t=>{if(null===e.current)return;const r=e.current.contains(t.target);o(r)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},90692:(e,t,o)=>{"use strict";o.d(t,{MatchMedia:()=>a});var r=o(50959);class a extends r.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},16396:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>d,PopupMenuItem:()=>m});var r=o(50959),a=o(97754),n=o(59064),s=o(51768),i=o(90186),l=o(76068),c=o(71986);const d=c;function u(e){e.stopPropagation()}function m(e){const{id:t,role:o,"aria-label":d,"aria-selected":m,"aria-checked":h,className:p,title:v,labelRowClassName:f,labelClassName:b,shortcut:g,forceShowShortcuts:y,icon:S,isActive:_,isDisabled:k,isHovered:x,appearAsDisabled:w,label:I,link:C,showToolboxOnHover:E,showToolboxOnFocus:N,target:z,rel:M,toolbox:D,reference:L,onMouseOut:T,onMouseOver:A,onKeyDown:B,suppressToolboxClick:j=!0,theme:P=c,tabIndex:H,tagName:O,renderComponent:R,roundedIcon:W,iconAriaProps:F,circleLogo:U}=e,Y=(0,i.filterDataProps)(e),q=(0,r.useRef)(null),K=(0,r.useMemo)((()=>function(e){function t(t){const{reference:o,...a}=t,n=null!=e?e:a.href?"a":"div",s="a"===n?a:function(e){const{download:t,href:o,hrefLang:r,media:a,ping:n,rel:s,target:i,type:l,referrerPolicy:c,...d}=e;return d}(a);return r.createElement(n,{...s,ref:o})}return t.displayName=`DefaultComponent(${e})`,t}(O)),[O]),V=null!=R?R:K;return r.createElement(V,{...Y,id:t,role:o,"aria-label":d,"aria-selected":m,"aria-checked":h,className:a(p,P.item,S&&P.withIcon,{[P.isActive]:_,[P.isDisabled]:k||w,[P.hovered]:x}),title:v,href:C,target:z,rel:M,reference:function(e){q.current=e,"function"==typeof L&&L(e);"object"==typeof L&&(L.current=e)},onClick:function(t){const{dontClosePopup:o,onClick:r,onClickArg:a,trackEventObject:i}=e;if(k)return;i&&(0,s.trackEvent)(i.category,i.event,i.label);r&&r(a,t);o||(0,n.globalCloseMenu)()},onContextMenu:function(t){const{trackEventObject:o,trackRightClick:r}=e;o&&r&&(0,s.trackEvent)(o.category,o.event,`${o.label}_rightClick`)},onMouseUp:function(t){const{trackEventObject:o,trackMouseWheelClick:r}=e;if(1===t.button&&C&&o){let e=o.label;r&&(e+="_mouseWheelClick"),(0,s.trackEvent)(o.category,o.event,e)}},onMouseOver:A,onMouseOut:T,onKeyDown:B,
tabIndex:H},U&&r.createElement(l.CircleLogo,{...F,className:c["disclosure-item-circle-logo"],size:"xxxsmall",logoUrl:U.logoUrl,placeholderLetter:U.placeholderLetter}),S&&r.createElement("span",{"aria-label":F&&F["aria-label"],"aria-hidden":F&&Boolean(F["aria-hidden"]),className:a(P.icon,W&&c["round-icon"]),dangerouslySetInnerHTML:{__html:S}}),r.createElement("span",{className:a(P.labelRow,f)},r.createElement("span",{className:a(P.label,b)},I)),(void 0!==g||y)&&r.createElement("span",{className:P.shortcut},(Z=g)&&Z.split("+").join(" + ")),void 0!==D&&r.createElement("span",{onClick:j?u:void 0,className:a(P.toolbox,{[P.showOnHover]:E,[P.showOnFocus]:N})},D));var Z}},29197:(e,t,o)=>{"use strict";o.d(t,{CloseDelegateContext:()=>n});var r=o(50959),a=o(59064);const n=r.createContext(a.globalCloseDelegate)},65718:(e,t,o)=>{"use strict";o.d(t,{Portal:()=>l,PortalContext:()=>c});var r=o(50959),a=o(962),n=o(36174),s=o(67961),i=o(60508);class l extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,n.guid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",a.createPortal(r.createElement(c.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,s.getRootOverlapManager)():this.context}}l.contextType=i.SlotContext;const c=r.createContext(null)},60508:(e,t,o)=>{"use strict";o.d(t,{Slot:()=>a,SlotContext:()=>n});var r=o(50959);class a extends r.Component{shouldComponentUpdate(){return!1}render(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const n=r.createContext(null)},86656:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>i});var r=o(50959),a=o(59142),n=o(50151),s=o(49483);const i=(0,r.forwardRef)(((e,t)=>{const{children:o,...n}=e,i=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>i.current)),(0,r.useLayoutEffect)((()=>{if(s.CheckMobile.iOS())return null!==i.current&&(0,a.disableBodyScroll)(i.current,{allowTouchMove:l(i)}),()=>{null!==i.current&&(0,a.enableBodyScroll)(i.current)}}),[]),r.createElement("div",{ref:i,...n},o)}));function l(e){return t=>{const o=(0,n.ensureNotNull)(e.current),r=document.activeElement;return!o.contains(t)||null!==r&&o.contains(r)&&r.contains(t)}}},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},39750: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>'},93986:e=>{
k.useEnsuredContext)(S),M=(0,h.useWatchedValueReadonly)({watchedValue:b.studies()}),D=a[n],L="compare"===c,T="exchange"===c;return(0,r.useEffect)((()=>{y&&_(""),I&&C(-1)}),[c]),r.createElement(U.AdaptivePopupDialog,{...e,className:l(Y.dialog,!m&&p&&Y.tablet),onKeyDown:function(e){var r;const l=(0,F.hashFromEvent)(e),c=L?I:n,u=L?M:a;switch(l){case 38:if(e.preventDefault(),0===c)return;if(-1===c)return void A(0);A(c-1);break;case 40:if(e.preventDefault(),c===u.length-1)return;A(c+1);break;case 37:{const o=j();if(o&&t.has(o))return e.preventDefault(),void s(o);if(!x||o)return;e.preventDefault(),w(x-1);break}case 39:{const o=j();if(o&&!t.has(o))return e.preventDefault(),void s(o);if(x===q-1||o)return;e.preventDefault(),w(x+1);break}case 13:{if(L)return void function(){if(-1===I)return;const e=M[I];e.checked?b.removeStudy(e):b.applyStudy(e.symbol,x,z);C(-1)}();const t=j();if(t)return e.preventDefault(),void s(t);e.preventDefault();const a=null===(r=null==o?void 0:o.current)||void 0===r?void 0:r.value.trim();a&&N&&(i([{symbol:f?a.toUpperCase():a,resolved:!1,compareOption:x,allowExtendTimeScale:z}]),N(o,d));break}case 27:if(e.preventDefault(),T)return void d("symbolSearch");v()}},dataName:"compare-dialog",draggable:!0});function A(e){L?C(e,B):u(e)}function B(){var e;null===(e=E.current)||void 0===e||e.scrollIntoView({block:"nearest"})}function j(){if(!D)return;const{id:e,isOffset:t,onExpandClick:o}=D;return!t&&Boolean(o)&&e?e:void 0}}var V=o(962),Z=o(32456),G=o(85067);class J extends G.DialogRenderer{constructor(e){super(),this._props=e}show(e){if(this.visible().value())return;const t=r.createElement(Z.SymbolSearchItemsDialog,{...this._props,shouldReturnFocus:null==e?void 0:e.shouldReturnFocus,initialMode:this._props.initialMode||"symbolSearch",onClose:()=>this.hide()});V.render(t,this._container),this._setVisibility(!0)}hide(){var e,t;V.unmountComponentAtNode(this._container),this._visibility.setValue(!1),null===(t=(e=this._props).onClose)||void 0===t||t.call(e)}}var X=o(81319),Q=o(69654),$=o(70613);function ee(e){const{searchRef:t,setMode:o}=(0,k.useEnsuredContext)(g.SymbolSearchItemsDialogContext),{currentMode:a}=(0,k.useEnsuredContext)($.SymbolSearchDialogBodyContext);return(0,r.useEffect)((()=>{const e=t.current;if(e)return e.addEventListener("input",n),()=>{e&&e.removeEventListener("input",n)}}),[]),r.createElement(Q.DialogSearch,{...e});function n(){var e,r,n,s;t.current&&a&&("compare"!==a.current||""===(null===(r=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.value)||void 0===r?void 0:r.trim())?"symbolSearch"===a.current&&""===(null===(s=null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.value)||void 0===s?void 0:s.trim())&&o("compare"):o("symbolSearch"))}}var te=o(70673),oe=o(39362),re=o(44467);function ae(e){const{allowExtendTimeScale:t,toggleAllowExtendTimeScale:n}=(0,d.ensureNotNull)((0,r.useContext)(S));return r.createElement(oe.SymbolSearchDialogFooter,null,r.createElement("label",{"data-name":"allow-extend-time-scale-checkbox"},r.createElement(te.CheckboxInput,{checked:t,value:t?"on":"off",
onChange:n}),r.createElement("span",{className:re.label},a.t(null,void 0,o(71046)))))}const ne=s.enabled("secondary_series_extend_time_scale");function se(e){return new J({wrapper:(t=e,e=>r.createElement(W,{...e,compareModel:t})),dialog:K,contentItem:A,initialScreen:O,searchInput:ee,footer:ne?r.createElement(ae):void 0,initialMode:"compare",dialogTitle:a.t(null,void 0,o(22320)),autofocus:!n.mobiletouch,dialogWidth:"fixed",onSearchComplete:t=>{const{compareOption:o,allowExtendTimeScale:r}=t[0];if(void 0!==o){(0,i.getSymbolSearchCompleteOverrideFunction)()(t[0].symbol,t[0].result).then((t=>{e.applyStudy(t.symbol,o,r)}))}},symbolTypes:(0,X.getAvailableSymbolTypes)(),showSpreadActions:s.enabled("show_spread_operators")&&s.enabled("compare_symbol_search_spread_operators")});var t}},46148:(e,t,o)=>{"use strict";var r;o.d(t,{CompareOption:()=>r}),function(e){e[e.SamePctScale=0]="SamePctScale",e[e.NewPriceScale=1]="NewPriceScale",e[e.NewPane=2]="NewPane",e[e.SameScale=3]="SameScale"}(r||(r={}))},37558:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>s,DrawerManager:()=>n});var r=o(50959),a=o(99054);class n extends r.PureComponent{constructor(e){super(e),this._isBodyFixed=!1,this._addDrawer=e=>{this.setState((t=>({stack:[...t.stack,e]})))},this._removeDrawer=e=>{this.setState((t=>({stack:t.stack.filter((t=>t!==e))})))},this.state={stack:[]}}componentDidUpdate(e,t){!t.stack.length&&this.state.stack.length&&((0,a.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,a.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,a.setFixedBodyState)(!1)}render(){return r.createElement(s.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.stack.length?this.state.stack[this.state.stack.length-1]:null}},this.props.children)}}const s=r.createContext(null)},41590:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>m});var r=o(50959),a=o(50151),n=o(97754),s=o(36174),i=o(65718),l=o(37558),c=o(29197),d=o(86656),u=o(66076);function m(e){const{position:t="Bottom",onClose:o,children:d,className:m,theme:p=u}=e,v=(0,a.ensureNotNull)((0,r.useContext)(l.DrawerContext)),[f]=(0,r.useState)((()=>(0,s.randomHash)())),b=(0,r.useRef)(null),g=(0,r.useContext)(c.CloseDelegateContext);return(0,r.useLayoutEffect)((()=>((0,a.ensureNotNull)(b.current).focus({preventScroll:!0}),g.subscribe(v,o),v.addDrawer(f),()=>{v.removeDrawer(f),g.unsubscribe(v,o)})),[]),r.createElement(i.Portal,null,r.createElement("div",{className:n(u.wrap,u[`position${t}`])},f===v.currentDrawer&&r.createElement("div",{className:u.backdrop,onClick:o}),r.createElement(h,{className:n(p.drawer,u[`position${t}`],m),ref:b,"data-name":e["data-name"]},d)))}const h=(0,r.forwardRef)(((e,t)=>{const{className:o,...a}=e;return r.createElement(d.TouchScrollContainer,{className:n(u.drawer,o),tabIndex:-1,ref:t,...a})}))},70412:(e,t,o)=>{"use strict";o.d(t,{hoverMouseEventFilter:()=>n,useAccurateHover:()=>s,useHover:()=>a});var r=o(50959);function a(){
const[e,t]=(0,r.useState)(!1);return[e,{onMouseOver:function(e){n(e)&&t(!0)},onMouseOut:function(e){n(e)&&t(!1)}}]}function n(e){return!e.currentTarget.contains(e.relatedTarget)}function s(e){const[t,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const t=t=>{if(null===e.current)return;const r=e.current.contains(t.target);o(r)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},90692:(e,t,o)=>{"use strict";o.d(t,{MatchMedia:()=>a});var r=o(50959);class a extends r.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},16396:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>d,PopupMenuItem:()=>m});var r=o(50959),a=o(97754),n=o(59064),s=o(51768),i=o(90186),l=o(76068),c=o(71986);const d=c;function u(e){e.stopPropagation()}function m(e){const{id:t,role:o,"aria-label":d,"aria-selected":m,"aria-checked":h,className:p,title:v,labelRowClassName:f,labelClassName:b,shortcut:g,forceShowShortcuts:y,icon:S,isActive:_,isDisabled:k,isHovered:x,appearAsDisabled:w,label:I,link:C,showToolboxOnHover:E,showToolboxOnFocus:N,target:z,rel:M,toolbox:D,reference:L,onMouseOut:T,onMouseOver:A,onKeyDown:B,suppressToolboxClick:j=!0,theme:P=c,tabIndex:H,tagName:O,renderComponent:R,roundedIcon:W,iconAriaProps:F,circleLogo:U}=e,Y=(0,i.filterDataProps)(e),q=(0,r.useRef)(null),K=(0,r.useMemo)((()=>function(e){function t(t){const{reference:o,...a}=t,n=null!=e?e:a.href?"a":"div",s="a"===n?a:function(e){const{download:t,href:o,hrefLang:r,media:a,ping:n,rel:s,target:i,type:l,referrerPolicy:c,...d}=e;return d}(a);return r.createElement(n,{...s,ref:o})}return t.displayName=`DefaultComponent(${e})`,t}(O)),[O]),V=null!=R?R:K;return r.createElement(V,{...Y,id:t,role:o,"aria-label":d,"aria-selected":m,"aria-checked":h,className:a(p,P.item,S&&P.withIcon,{[P.isActive]:_,[P.isDisabled]:k||w,[P.hovered]:x}),title:v,href:C,target:z,rel:M,reference:function(e){q.current=e,"function"==typeof L&&L(e);"object"==typeof L&&(L.current=e)},onClick:function(t){const{dontClosePopup:o,onClick:r,onClickArg:a,trackEventObject:i}=e;if(k)return;i&&(0,s.trackEvent)(i.category,i.event,i.label);r&&r(a,t);o||(0,n.globalCloseMenu)()},onContextMenu:function(t){const{trackEventObject:o,trackRightClick:r}=e;o&&r&&(0,s.trackEvent)(o.category,o.event,`${o.label}_rightClick`)},onMouseUp:function(t){const{trackEventObject:o,trackMouseWheelClick:r}=e;if(1===t.button&&C&&o){let e=o.label;r&&(e+="_mouseWheelClick"),(0,s.trackEvent)(o.category,o.event,e)}
},onMouseOver:A,onMouseOut:T,onKeyDown:B,tabIndex:H},U&&r.createElement(l.CircleLogo,{...F,className:c["disclosure-item-circle-logo"],size:"xxxsmall",logoUrl:U.logoUrl,placeholderLetter:U.placeholderLetter}),S&&r.createElement("span",{"aria-label":F&&F["aria-label"],"aria-hidden":F&&Boolean(F["aria-hidden"]),className:a(P.icon,W&&c["round-icon"]),dangerouslySetInnerHTML:{__html:S}}),r.createElement("span",{className:a(P.labelRow,f)},r.createElement("span",{className:a(P.label,b)},I)),(void 0!==g||y)&&r.createElement("span",{className:P.shortcut},(Z=g)&&Z.split("+").join(" + ")),void 0!==D&&r.createElement("span",{onClick:j?u:void 0,className:a(P.toolbox,{[P.showOnHover]:E,[P.showOnFocus]:N})},D));var Z}},29197:(e,t,o)=>{"use strict";o.d(t,{CloseDelegateContext:()=>n});var r=o(50959),a=o(59064);const n=r.createContext(a.globalCloseDelegate)},65718:(e,t,o)=>{"use strict";o.d(t,{Portal:()=>l,PortalContext:()=>c});var r=o(50959),a=o(962),n=o(36174),s=o(67961),i=o(60508);class l extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,n.guid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",a.createPortal(r.createElement(c.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,s.getRootOverlapManager)():this.context}}l.contextType=i.SlotContext;const c=r.createContext(null)},60508:(e,t,o)=>{"use strict";o.d(t,{Slot:()=>a,SlotContext:()=>n});var r=o(50959);class a extends r.Component{shouldComponentUpdate(){return!1}render(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const n=r.createContext(null)},86656:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>i});var r=o(50959),a=o(59142),n=o(50151),s=o(49483);const i=(0,r.forwardRef)(((e,t)=>{const{children:o,...n}=e,i=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>i.current)),(0,r.useLayoutEffect)((()=>{if(s.CheckMobile.iOS())return null!==i.current&&(0,a.disableBodyScroll)(i.current,{allowTouchMove:l(i)}),()=>{null!==i.current&&(0,a.enableBodyScroll)(i.current)}}),[]),r.createElement("div",{ref:i,...n},o)}));function l(e){return t=>{const o=(0,n.ensureNotNull)(e.current),r=document.activeElement;return!o.contains(t)||null!==r&&o.contains(r)&&r.contains(t)}}},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},39750: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>'},93986:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#D1D4DC" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#D1D4DC" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#1976D2" cx="97.5" cy="39" r="13"/><path fill="#D1D4DC" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'},15550:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#1E222D" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#1E222D" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#2196F3" cx="97.5" cy="39" r="13"/><path fill="#fff" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'},16936:e=>{e.exports={ar:["عودة"],ca_ES:["Enrere"],cs:"Back",de:["Zurück"],el:"Back",en:"Back",es:["Atrás"],fa:"Back",fr:["Retour"],he_IL:["חזור"],hu_HU:"Back",id_ID:["Kembali"],it:["Indietro"],ja:["戻る"],ko:["뒤로"],ms_MY:["Kembali"],nl_NL:"Back",pl:["Cofnij"],pt:["Voltar"],ro:"Back",ru:["Назад"],sv:["Tillbaka"],th:["กลับไป"],tr:["Geri"],vi:["Quay lại"],zh:["返回"],zh_TW:["返回"]}},9898:e=>{e.exports={ar:["حق"],ca_ES:["Right (dret de subscripció)"],cs:"Right",de:["Rechter"],el:"Right",en:"Right",es:["Right (derecho de suscripción)"],fa:"Right",fr:["De droite"],he_IL:["זכות Right"],hu_HU:"Right",id_ID:["Kanan"],it:["Diritto"],ja:["ストックオプション"],ko:["라이트"],ms_MY:["Benar"],nl_NL:"Right",pl:["Prawo do udostępniania"],pt:["Direita"],ro:"Right",ru:["Право на акцию"],sv:["Höger"],th:["สิทธิ"],tr:["Sağ"],vi:["Phải"],zh:["认股权"],zh_TW:["認股權"]}},22320:e=>{e.exports={ar:["مقارنة الرمز"],ca_ES:["Compara el símbol"],cs:"Compare symbol",de:["Symbol vergleichen"],el:"Compare symbol",en:"Compare symbol",es:["Comparar el símbolo"],fa:"Compare symbol",fr:["Comparer le symbole"],he_IL:["השווה סימול"],hu_HU:"Compare symbol",id_ID:["Bandingkan simbol"],it:["Confronta simbolo"],ja:["シンボルを比較"],ko:["심볼 견주기"],ms_MY:["Bandingkan simbol"],nl_NL:"Compare symbol",pl:["Porównaj symbol"],
pt:["Comparar símbolos"],ro:"Compare symbol",ru:["Сравнить символ"],sv:["Jämför symbol"],th:["เปรียบเทียบสัญลักษณ์"],tr:["Sembolü karşılaştır"],vi:["So sánh mã"],zh:["比较商品"],zh_TW:["比較商品"]}},20036:e=>{e.exports={ar:["إلغاء"],ca_ES:["Cancel·la"],cs:["Zrušit"],de:["Abbrechen"],el:["Άκυρο"],en:"Cancel",es:["Cancelar"],fa:["لغو"],fr:["Annuler"],he_IL:["ביטול"],hu_HU:["Törlés"],id_ID:["Batal"],it:["Annulla"],ja:["キャンセル"],ko:["취소"],ms_MY:["Batal"],nl_NL:["Annuleren"],pl:["Anuluj"],pt:["Cancelar"],ro:"Cancel",ru:["Отмена"],sv:["Avbryt"],th:["ยกเลิก"],tr:["İptal"],vi:["Hủy bỏ"],zh:["取消"],zh_TW:["取消"]}},79589:e=>{e.exports={ar:["إضافة إلى"],ca_ES:["Afegeix a"],cs:"Add to",de:["hinzufügen zu"],el:"Add to",en:"Add to",es:["Añadir a"],fa:"Add to",fr:["Ajouter à"],he_IL:["הוסף ל"],hu_HU:"Add to",id_ID:["Tambahkan ke"],it:["Aggiungi a"],ja:["追加先"],ko:["~에 넣기:"],ms_MY:["Tambah kepada"],nl_NL:"Add to",pl:["Dodaj do"],pt:["Adicionar"],ro:"Add to",ru:["Добавить"],sv:["Lägg till"],th:["เพิ่มไปที่"],tr:["Buna ekle:"],vi:["Thêm vào"],zh:["添加到"],zh_TW:["增加到"]}},46580:e=>{e.exports={ar:["الرموز المضافة"],ca_ES:["Símbols afegits"],cs:"Added symbols",de:["Hinzugefügte Symbole"],el:"Added symbols",en:"Added symbols",es:["Símbolos añadidos"],fa:"Added symbols",fr:["Symboles ajoutés"],he_IL:["נוספו סימולים"],hu_HU:"Added symbols",id_ID:["Simbol yang ditambahkan"],it:["Simboli aggiunti"],ja:["追加されているシンボル"],ko:["더해진 심볼들"],ms_MY:["Tambah simbol-simbol"],nl_NL:"Added symbols",pl:["Dodane symbole"],pt:["Símbolos adicionados"],ro:"Added symbols",ru:["Добавленные инструменты"],sv:["Tillagda symboler"],th:["สัญลักษณ์ที่ถูกเพิ่มมา"],tr:["Semboller eklendi"],vi:["Các mã đã thêm"],zh:["添加商品"],zh_TW:["增加商品"]}},64498:e=>{e.exports={ar:["كل المصادر"],ca_ES:["Totes les fonts"],cs:"All sources",de:["Alle Quellen"],el:"All sources",en:"All sources",es:["Todas las fuentes"],fa:"All sources",fr:["Toutes les sources"],he_IL:["כל המקורות"],hu_HU:"All sources",id_ID:["Seluruh sumber"],it:["Tutte le fonti"],ja:["すべての提供元"],ko:["모든 자료"],ms_MY:["Kesemua sumber"],nl_NL:"All sources",pl:["Wszystkie źródła"],pt:["Todas as fontes"],ro:"All sources",ru:["Все источники"],sv:["Samtliga källor"],th:["แหล่งที่มาทั้งหมด"],tr:["Tüm kaynaklar"],vi:["Tất cả các nguồn"],zh:["全部来源"],zh_TW:["全部來源"]}},71046:e=>{e.exports={ar:["السماح بتمديد النطاق الزمني"],ca_ES:["Permet ampliar l'escala de temps"],cs:"Allow extend time scale",de:["Zeitskala verlängern lassen"],el:"Allow extend time scale",en:"Allow extend time scale",es:["Permitir ampliar la escala de tiempo"],fa:"Allow extend time scale",fr:["Permettre d'étendre l'échelle de temps"],he_IL:["אפשר להאריך את סולם הזמן"],hu_HU:"Allow extend time scale",id_ID:["Izinkan ekstensi skala waktu"],it:["Permetti estensione scala temporale"],ja:["時間軸の延長を許可"],ko:["타임 스케일 확장을 허용합니다"],ms_MY:["Benarkan pemanjangan skala masa"],nl_NL:"Allow extend time scale",pl:["Zezwól na rozszerzenie osi czasu"],pt:["Prolongar a escala de tempo"],ro:"Allow extend time scale",ru:["Разрешить продолжение временной шкалы"],sv:["Tillåt att förlängd tidsskala"],

View File

@@ -18,7 +18,7 @@ function K(t){if(F.touch&&!window.matchMedia("(pointer:fine)").matches){const e=
p.assert)(t.states.length>0&&-1!==at._getStateIndexById(t,t.currentStateId),`Argument is invalid (count: ${t.states.length}, state: ${t.currentStateId})`);const o=document.createElement("div");o.className="tv-grouped-floating-toolbar__widget-wrapper apply-common-tooltip",t.widgetAddClass&&o.classList.add(t.widgetAddClass),o.setAttribute("title",t.tooltip);const i={isEnabled:!0,statedWidget:t,toolbarWidget:o},n=this._onWidgetClicked.bind(this,i);i.clickListener=n,o.addEventListener("click",n),this._updateWidgetPreview(i),this.addWidget(o,e),this._statedWidgets.push(i)}findGroupedWidget(t){const e=this._statedWidgets.length;for(let o=0;o<e;++o){if(this._statedWidgets[o].statedWidget.id===t)return o}return-1}removeGroupedWidget(t){const e=this._statedWidgets.length;for(let o=0;o<e;++o){const e=this._statedWidgets[o];if(e.statedWidget.id===t)return this._isPopupCreatedForWidget(t)&&this._closePopup(),void 0!==e.clickListener&&e.toolbarWidget.removeEventListener("click",e.clickListener),this.removeWidget(e.toolbarWidget),this._statedWidgets.splice(o,1),void this._updatePopupPosition()}(0,p.assert)(!1,`Unknown groupId(${t})`)}updateGroupedWidget(t,e){this._closePopup();const o=this._ensuredGetWidgetDataForId(t);o.statedWidget.currentStateId=e.currentStateId,o.statedWidget.states=e.states,this._updateWidgetPreview(o)}setGroupedWidgetEnabled(t,e){const o=this._ensuredGetWidgetDataForId(t);o.isEnabled=e,o.toolbarWidget.classList.toggle("i-disabled",!e)}setGroupedWidgetState(t,e){const o=this._ensuredGetWidgetDataForId(t);(0,p.assert)(-1!==at._getStateIndexById(o.statedWidget,e),`Unknown stateId (${e})`),o.statedWidget.currentStateId=e,this._updateSubWidgetsState(o.statedWidget),this._updateWidgetPreview(o)}onWidgetStateChanged(){return this._onWidgetStateChangedDelegate}_onVerticalChanged(t,e){this._updatePopupPosition()}_ensuredGetWidgetDataForId(t){for(const e of this._statedWidgets)if(e.statedWidget.id===t)return e;throw new Error(`Unknown groupId(${t})`)}_onWidgetClicked(t,e){const o=this._currentPopup&&this._isPopupCreatedForWidget(t.statedWidget.id);this._closePopup(),!o&&t.isEnabled&&this._createPopup(t)}_createPopup(t){const e={createdFor:t.toolbarWidget,element:document.createElement("div"),stateWidgetId:t.statedWidget.id,widgets:[]};e.element.className+="tv-grouped-floating-toolbar__popup js-popup";const o=t.statedWidget.states.length;t.statedWidget.states.forEach(((i,n)=>{const r=this._createSubWidget(t,i),s=this._onSubWidgetClicked.bind(this,t,i.id);r.addEventListener("click",s),e.widgets.push({clickListener:s,stateWidget:i,widget:r}),r.classList.add(`tv-grouped-floating-toolbar__sub-widget--slide-right-${n}`),r.classList.add("tv-grouped-floating-toolbar__sub-widget--slide-left-"+(o-n+1)),i.readonly||e.element.appendChild(r)})),this._currentPopup=e,this._updateSubWidgetsState(t.statedWidget),t.toolbarWidget.classList.add("i-dropped"),this._getWidget().appendChild(this._currentPopup.element),Promise.resolve().then((()=>{this._currentPopup&&this._currentPopup.element.classList.add("i-opened")})),
this._updatePopupPosition()}_closePopup(){if(this._statedWidgets.forEach((t=>{t.toolbarWidget.classList.remove("i-dropped")})),!this._currentPopup)return;const t=this._currentPopup.widgets,e=this._currentPopup.element;this._currentPopup=null,t.forEach((t=>{t.widget.removeEventListener("click",t.clickListener)})),e.classList.remove("i-opened"),e.addEventListener("transitionend",(t=>{t.target===e&&this._getWidget().removeChild(e)}))}_updateWidgetPreview(t){const e=at._getStateIndexById(t.statedWidget,t.statedWidget.currentStateId);(0,p.assert)(-1!==e,`Unknown state id: ${t.statedWidget.currentStateId}`);const o=t.statedWidget.states[e].widget.cloneNode(!0);t.toolbarWidget.firstChild?t.toolbarWidget.replaceChild(o,t.toolbarWidget.firstChild):(t.toolbarWidget.appendChild(o),t.toolbarWidget.appendChild(at._createCaret()))}_updateSubWidgetsState(t){this._currentPopup&&this._isPopupCreatedForWidget(t.id)&&this._currentPopup.widgets.forEach((e=>{e.widget.classList.toggle(at._activeSubWidgetClass,e.stateWidget.id===t.currentStateId)}))}_updatePopupPosition(){if(!this._currentPopup)return;const t=this._currentPopup.createdFor,e=this._getWidget().getBoundingClientRect(),o=this._findWrapperForWidget(t);if(!o||!this._currentPopup)throw new Error("Toolbar has no wrapper for preview's widget or there is no popup");const i=o.getBoundingClientRect(),n=this._currentPopup.element.getBoundingClientRect(),r=this._currentPopup.element;if(this.isVertical())r.classList.remove("tv-grouped-floating-toolbar__popup--at-top"),r.style.top=i.top-e.top+1+"px",r.style.left="",e.left>window.innerWidth-e.right?r.classList.add("tv-grouped-floating-toolbar__popup--at-left"):r.classList.remove("tv-grouped-floating-toolbar__popup--at-left");else{r.classList.remove("tv-grouped-floating-toolbar__popup--at-left");let t=0;i.left+n.width>window.innerWidth?e.left+n.width>window.innerWidth&&(t=e.width-n.width):t=i.left-e.left+1,r.style.left=`${t}px`,e.bottom+n.height>window.innerHeight?r.classList.add("tv-grouped-floating-toolbar__popup--at-top"):(r.classList.remove("tv-grouped-floating-toolbar__popup--at-top"),r.style.top="")}}_isPopupCreatedForWidget(t){return Boolean(this._currentPopup&&this._currentPopup.stateWidgetId===t)}_createSubWidget(t,e){const o=document.createElement("div");return o.className+="tv-grouped-floating-toolbar__sub-widget",t.statedWidget.stateWidgetAddClass&&o.classList.add(t.statedWidget.stateWidgetAddClass),o.appendChild(e.widget),o}_onSubWidgetClicked(t,e){this._closePopup(),t.statedWidget.currentStateId!==e&&(this.setGroupedWidgetState(t.statedWidget.id,e),this._onWidgetStateChangedDelegate.fire(t.statedWidget.id,e))}_onWindowClicked(t){if(this.isVisible()&&this._currentPopup&&!at._isEventInElement(t,this._currentPopup.element)){for(let e=0;e<this._statedWidgets.length;++e)if(at._isEventInElement(t,this._statedWidgets[e].toolbarWidget))return;this._closePopup()}}static _getStateIndexById(t,e){for(let o=0;o<t.states.length;++o)if(t.states[o].id===e)return o;return-1}static _createCaret(){const t=document.createElement("div")
;return t.className="tv-caret tv-caret--small tv-caret--colored tv-grouped-floating-toolbar__caret",t}static _prepareOptions(t){const e=" tv-grouped-floating-toolbar";return t.addClass?t.addClass+=e:t.addClass=e,t}static _isEventInElement(t,e){return t.target===e||e.contains(t.target)}}at._activeSubWidgetClass="tv-grouped-floating-toolbar__sub-widget--current";var lt=o(69774),ct=o(92249),dt=o(15367),ht=o(3587),pt=o(87919);const ut=!1,gt=new s.TranslatedString("change line tool(s) font size",r.t(null,void 0,o(36819))),_t=new s.TranslatedString("change line tool(s) line style",r.t(null,void 0,o(54769))),mt=(new s.TranslatedString("apply drawing template",r.t(null,void 0,o(49037))),r.t(null,void 0,o(89517))),vt=r.t(null,void 0,o(34596)),yt=r.t(null,void 0,o(41610)),wt=r.t(null,void 0,o(32733)),bt=r.t(null,void 0,o(17006));class ft{constructor(t){this._isDrawingFinished=new l.WatchedValue(!0),this._currentTool=null,this._updateVisibilityTimeout=null,this._lineWidthsProperty=null,this._lineColorsProperty=null,this._currentProperties=null,this._floatingContainer=null,this._fixedContainer=null,this._fixedToolbarRendered=!1,this._floatingToolbarRendered=!1,this._toolbarVisible=!1,this._propertiesVisible=!1,this._templatesButton=null,this._propertyButtons=[],this._commonButtons=[],this._handleSourceEdit=t=>{d.isDirectionalMovementActive.value()||(t?(this._fixedContainer&&(this._fixedContainer.style.display="none"),this._floatingToolbar.hide(!0)):(this._fixedToolbarRendered&&this._fixedContainer&&(this._fixedContainer.style.display="block"),this._floatingToolbarRendered&&this._floatingToolbar.show()))},this._handleMediaChange=()=>{this._updateVisibility()},this._chartWidgetCollection=t,this._floatingToolbar=new at({defaultPosition:{top:lt.HEADER_TOOLBAR_HEIGHT_EXPANDED+15,left:window.innerWidth/2},positionSettingsKey:"properties_toolbar.position",positionStorageType:"device",layout:"horizontal","data-name":"drawing-toolbar"}),this._floatingContainer=this._floatingToolbar.getReactWidgetContainer(),this._isToolMovingNowSpawn=d.isToolMovingNow.spawn(),this._isToolEditingNowSpawn=d.isToolEditingNow.spawn(),this._toolSpawn=d.tool.spawn(),this._iconToolSpawn=d.iconTool.spawn(),this._emojiToolSpawn=d.emojiTool.spawn(),this._selectedSourcesSpawn=this._chartWidgetCollection.selectedSources.spawn(),this._isToolMovingNowSpawn.subscribe(this._handleSourceEdit),this._isToolEditingNowSpawn.subscribe(this._handleSourceEdit),this._toolSpawn.subscribe(this._onToolChanged.bind(this),{callWithLast:!0}),this._iconToolSpawn.subscribe((()=>this._onToolChanged(d.tool.value()))),this._emojiToolSpawn.subscribe((()=>this._onToolChanged(d.tool.value()))),this._selectedSourcesSpawn.subscribe((()=>this.onSourceChanged(this.selectedSources()))),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(this,this.destroy,!0)}destroy(){this._isToolMovingNowSpawn.destroy(),this._isToolEditingNowSpawn.destroy(),this._toolSpawn.destroy(),this._iconToolSpawn.destroy(),this._emojiToolSpawn.destroy(),this._selectedSourcesSpawn.destroy()}refresh(){
this.onSourceChanged(this.selectedSources())}onSourceChanged(t){if(!(null==t?void 0:t.length))return this._propertiesVisible=!1,this._toolbarVisible=!1,void this.hide();if(this._createCommonButtons(),t.every((e=>e.toolname===t[0].toolname))?this._showTemplatesOf({sources:t}):this._templatesButton&&this._clearTemplatesButton(),1===t.length){const e=t[0];e.isAvailableInFloatingWidget()&&this.activeChartWidget().model().model().dataSourceForId(e.id())?(!e.userEditEnabled()||!(0,dt.isLineDrawnWithPressedButton)(e.toolname)&&this.activeChartWidget().model().lineBeingCreated()||this._isDrawingFinished.setValue(!0),this.showPropertiesOf(e.toolname,e.properties(),!0),this._toolbarVisible=!0):this.hide()}else this._clearProperties(),this._createWidthsButton(void 0,!0),this._createColorsButton(void 0,!0),this._createBackgroundsButton(void 0,!0),this._createTextColorsButton(void 0,!0),this._propertiesVisible=!0;this._updateVisibility()}activeChartWidget(){return this._chartWidgetCollection.activeChartWidget.value()}selectedSources(){return this._chartWidgetCollection.selectedSources.value().filter(ct.isLineTool)}hide(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{(0,ct.unsetNewToolProperties)(),Ct()&&this._fixedContainer?this._fixedContainer.style.display="none":this._floatingToolbar.hide(!0),this._isToolbarRendered()&&this._unmountToolbar(),this._clearProperties(),this._clearCommonButtons()}),0),delete this._propertyApplier}templatesList(){return this._templatesList}_onToolChanged(t,e){this._currentTool=t;const o=this.selectedSources();this._isDrawingToolExcludingCustomUrlEventTool(t)?(this._isDrawingFinished.setValue(!1),this._updateVisibility()):o&&o.length?(o.length>1&&this._isDrawingFinished.setValue(!0),this.onSourceChanged(this.selectedSources())):this.hide()}_propertyApplierImpl(){return this._propertyApplier||(this._propertyApplier=new pt.PropertyApplierWithoutSavingChart((()=>this.activeChartWidget().model()),new l.WatchedValue(!0))),this._propertyApplier}_clearProperties(){this._clearPropertyButtons(),this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._currentProperties&&(this._currentProperties=null)}_show(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{this._renderToolbar(),Ct()&&this._fixedContainer?this._fixedContainer.style.display="block":(this._floatingToolbar.show(),this._floatingToolbar.checkPosition())}),0)}_addPropertyButton(t){this._propertyButtons.push(t),this._renderToolbar()}_addCommonButton(t){this._commonButtons.push(t),this._renderToolbar()}_addTemplatesButton(t){this._templatesButton=t}_renderFloatingToolbar(){null!==this._floatingContainer&&this.activeChartWidget()&&this.activeChartWidget().hasModel()&&(n.render(i.createElement(T,{templateButton:this._templatesButton,propertyButtons:this._propertyButtons,
this.onSourceChanged(this.selectedSources())}onSourceChanged(t){if(!(null==t?void 0:t.length))return this._propertiesVisible=!1,this._toolbarVisible=!1,void this.hide();if(this._createCommonButtons(),t.every((e=>e.toolname===t[0].toolname))?this._showTemplatesOf({sources:t}):this._templatesButton&&this._clearTemplatesButton(),1===t.length){const e=t[0];e.isAvailableInFloatingWidget()&&this.activeChartWidget().model().model().dataSourceForId(e.id())?(!e.userEditEnabled()||!(0,dt.isLineDrawnWithPressedButton)(e.toolname)&&this.activeChartWidget().model().lineBeingCreated()||this._isDrawingFinished.setValue(!0),this.showPropertiesOf(e.toolname,e.properties(),!0),this._toolbarVisible=!0):this.hide()}else this._clearProperties(),this._createWidthsButton(void 0,!0),this._createColorsButton(void 0,!0),this._createBackgroundsButton(void 0,!0),this._createTextColorsButton(void 0,!0),this._propertiesVisible=!0;this._updateVisibility()}activeChartWidget(){return this._chartWidgetCollection.activeChartWidget.value()}selectedSources(){return this._chartWidgetCollection.selectedSources.value().filter(ct.isLineTool)}hide(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{(0,ct.unsetNewToolProperties)(),Ct()&&this._fixedContainer?this._fixedContainer.style.display="none":this._floatingToolbar.hide(!0),this._isToolbarRendered()&&this._unmountToolbar(),this._clearProperties(),this._clearCommonButtons()}),0),delete this._propertyApplier}templatesList(){return this._templatesList}_onToolChanged(t,e){this._currentTool=t;const o=this.selectedSources();this._isDrawingToolExcludingCustomUrlEventTool(t)?(this._isDrawingFinished.setValue(!1),this._updateVisibility()):o&&o.length?(o.length>1&&this._isDrawingFinished.setValue(!0),this.onSourceChanged(this.selectedSources())):this.hide()}_propertyApplierImpl(){return this._propertyApplier||(this._propertyApplier=new pt.PropertyApplierWithoutSavingChart((()=>this.activeChartWidget().model()),new l.WatchedValue(false))),this._propertyApplier}_clearProperties(){this._clearPropertyButtons(),this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._currentProperties&&(this._currentProperties=null)}_show(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{this._renderToolbar(),Ct()&&this._fixedContainer?this._fixedContainer.style.display="block":(this._floatingToolbar.show(),this._floatingToolbar.checkPosition())}),0)}_addPropertyButton(t){this._propertyButtons.push(t),this._renderToolbar()}_addCommonButton(t){this._commonButtons.push(t),this._renderToolbar()}_addTemplatesButton(t){this._templatesButton=t}_renderFloatingToolbar(){null!==this._floatingContainer&&this.activeChartWidget()&&this.activeChartWidget().hasModel()&&(n.render(i.createElement(T,{templateButton:this._templatesButton,propertyButtons:this._propertyButtons,
commonButtons:this._commonButtons,isDrawingFinished:this._isDrawingFinished.value(),activeChartWidget:this.activeChartWidget()}),this._floatingContainer),this._floatingToolbarRendered=!0)}_unmountFloatingToolbar(){null!==this._floatingContainer&&(n.unmountComponentAtNode(this._floatingContainer),this._floatingToolbarRendered=!1)}_clearTemplatesButton(){this._templatesButton=null}_clearPropertyButtons(){this._propertyButtons=[]}_clearCommonButtons(){this._commonButtons=[]}_isToolbarRendered(){return this._floatingToolbarRendered||this._fixedToolbarRendered}_createSettingsButton(){const t={component:E,props:{title:mt,activeChartWidget:this.activeChartWidget()}};this._addCommonButton(t)}_createLockButton(){const t={component:I,props:{title:"Lock",activeChartWidget:this.activeChartWidget()}};this._addCommonButton(t)}_createRemoveButton(){const t={component:R,props:{title:vt,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0};this._addCommonButton(t)}_createDotsButton(){this._addCommonButton({component:Y,props:{title:yt,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0})}_createAlertButton(){}_createSourceActions(){this._createLockButton()}_createLineStyleButton(t){const e=this.selectedSources();if(0===e.length)return!1;const o=e[0];if(!(0,ht.isDataSource)(o))return!1;const i={component:ot,props:{property:o.properties().linestyle||t,title:wt,propertyApplier:this._propertyApplierImpl(),"data-name":"style",undoText:_t}};return this._addPropertyButton(i),!0}_createFontSizeButton(t){const e=this.selectedSources();if(0===e.length)return!1;const o=e[0];if(!(0,ht.isDataSource)(o))return!1;const i={component:rt,props:{property:o.properties().fontsize||t,title:bt,propertyApplier:this._propertyApplierImpl(),"data-name":"font-size",undoText:gt}};return this._addPropertyButton(i),!0}_createCommonButtons(){this._commonButtons.length&&this._clearCommonButtons(),a.enabled("property_pages")&&this._createSettingsButton(),this._createSourceActions(),this._createRemoveButton(),this._createDotsButton()}_prepareProperties(t){const e=this.selectedSources().filter((e=>e.properties()[t]));if(!(e.filter((e=>e.properties()[t].visible())).length<1))return e.map((e=>e.properties()[t])).filter(c.notNull)}_createProperty(t,e,o,i){if(e){const t=this._prepareProperties(o);if(!t)return;return this._isWidthProperty(t[0])?new _(new h.MultipleLineWidthsProperty(t),this._propertyApplierImpl(),i):new m.CollectibleColorPropertyUndoWrapper(new h.MultipleLineColorsProperty(t),this._propertyApplierImpl(),i)}if(t&&t.visible())return this._isWidthProperty(t)?new h.MultipleLineWidthsProperty([t]):new m.CollectibleColorPropertyDirectWrapper(new h.MultipleLineColorsProperty([t]))}_shouldShowBackgroundProperty(t,e){return!e||!e.fillBackground||!!e.fillBackground.value()}_isDrawingToolExcludingCustomUrlEventTool(t){return Boolean(null==t?void 0:t.toLowerCase().includes("linetool"))&&"LineToolTweet"!==t&&"LineToolIdea"!==t&&"LineToolImage"!==t}_updateVisibility(){
this._isDrawingFinished.value()&&(this._toolbarVisible||this._propertiesVisible)?this._show():this.hide()}_showTemplatesOf(t){}_isWidthProperty(t){return t instanceof h.LineToolWidthsProperty}_renderFixedToolbar(){null!==this._fixedContainer&&this.activeChartWidget()&&this.activeChartWidget().hasModel()&&(n.render(i.createElement(FixedDrawingToolbar,{templateButton:this._templatesButton,propertyButtons:this._propertyButtons,commonButtons:this._commonButtons,isDrawingFinished:this._isDrawingFinished.value(),activeChartWidget:this.activeChartWidget()}),this._fixedContainer),this._fixedToolbarRendered=!0)}_renderToolbar(){this._renderFloatingToolbar()}_unmountFixedToolbar(){null!==this._fixedContainer&&(n.unmountComponentAtNode(this._fixedContainer),this._fixedToolbarRendered=!1)}_unmountToolbar(){this._floatingToolbarRendered&&this._unmountFloatingToolbar(),this._fixedToolbarRendered&&this._unmountFixedToolbar()}}function Ct(){return ut}},26916:(t,e,o)=>{"use strict";var i=o(36298).TranslatedString,n=o(89824).LineToolPropertiesWidgetBase;const r=o(70114).ColorPickerButton,s=o(61259).LineWidthButton;var a=o(94071),l=o(21065),c=o(48984),d=new i("change line tool(s) color",o(44352).t(null,void 0,o(68519))),h=new i("change line tool(s) background color",o(44352).t(null,void 0,o(74350))),p=new i("change line tool(s) text color",o(44352).t(null,void 0,o(16631))),u=new i("change line tool(s) line width",o(44352).t(null,void 0,o(41648))),g=o(44352).t(null,void 0,o(40054)),_=o(44352).t(null,void 0,o(12928)),m=o(44352).t(null,void 0,o(19221)),v=o(44352).t(null,void 0,o(21327)),y=o(44352).t(null,void 0,o(38455)),w=o(44352).t(null,void 0,o(71845)),b=o(44352).t(null,void 0,o(32733)),f=o(44352).t(null,void 0,o(23886)),C=o(44352).t(null,void 0,o(86327)),T=o(44352).t(null,void 0,o(47059)),x=o(44352).t(null,void 0,o(36785)),P=o(44352).t(null,void 0,o(49593)),S=o(44352).t(null,void 0,o(67455)),E=o(44352).t(null,void 0,o(79964)),W=o(44352).t(null,void 0,o(45320));class L extends n{constructor(t){super(t),this._templatesButton=null}_createWidthsButton(t,e){if(this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineWidthsProperty=this._createProperty(t,e,"linesWidths",u),!this._lineWidthsProperty)return!0;var o=C;e&&(1!==this.selectedSources().filter((t=>t.properties().linesWidths)).length&&(o=T));return this._addPropertyButton({component:s,props:{title:o,multipleProperty:this._lineWidthsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-width",undoText:u}}),!0}_createColorsButton(t,e){return this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._lineColorsProperty=this._createProperty(t,e,"linesColors",d),!this._lineColorsProperty||(this._addPropertyButton({component:r,props:{icon:a,title:_,property:this._lineColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-color",undoText:d}}),!0)}_createBackgroundsButton(t,e){return this._backgroundsProperty&&(this._backgroundsProperty.destroy(),
this._backgroundsProperty=null),this._backgroundsProperty=this._createProperty(t,e,"backgroundsColors",h),!this._backgroundsProperty||(this._addPropertyButton({component:r,props:{icon:l,title:w,property:this._backgroundsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"background-color",undoText:h}}),!0)}_createTextColorsButton(t,e){return this._textColorsProperty&&(this._textColorsProperty.destroy(),this._textColorsProperty=null),this._textColorsProperty=this._createProperty(t,e,"textsColors",p),!this._textColorsProperty||(this._addPropertyButton({component:r,props:{icon:c,title:v,property:this._textColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"text-color",undoText:p}}),!0)}_getPossibleProperty(t){for(var e=[],o=this._defaultToolProperties(),i=0;i<o.length;i++){var n=o[i];n.name in t&&e.push(n)}return e}showPropertiesOf(t,e,o){this._toolExceptionCases||(this._toolExceptionCases=this._createToolExceptionCases());var i=this._toolExceptionCases[t]||this._getPossibleProperty(e);if(this._clearProperties(),this._propertiesVisible=!1,i.length){for(var n={},s=0;s<i.length;s++){for(var a=i[s],l=e,c=a.name.split("."),d=0;d<c.length;++d)l=l&&l[c[d]];var h=a.showIf;if("function"!=typeof h||h(l,e)){var p=a.factory;if(p&&p.call(this,l,o))continue;if(!l)continue;if(this._propertiesVisible=!0,"combobox"!==a.inputType){const t={component:r,props:{icon:a.iconSvgCode,title:a.title,"data-name":a.dataName,property:l,propertyApplier:this._propertyApplierImpl(),undoText:a.undoText}};this._addPropertyButton(t);continue}n[a.name]=l}}this._currentProperties=n}}_defaultToolProperties(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:a,title:g,factory:L.prototype._createColorsButton,dataName:"line-tool-color"},{name:"backgroundsColors",inputType:"colorPicker",iconSvgCode:l,title:y,factory:L.prototype._createBackgroundsButton,dataName:"background-color",showIf:this._shouldShowBackgroundProperty},{name:"textsColors",title:m,inputType:"colorPicker",iconSvgCode:c,factory:L.prototype._createTextColorsButton,dataName:"text-color"},{name:"linesWidths",inputType:"combobox",factory:L.prototype._createWidthsButton},{name:"linestyle",title:b,inputType:"combobox",factory:L.prototype._createLineStyleButton}]}_regressionToolExceptionCases(){return[{name:"linesWidths",inputType:"combobox",factory:L.prototype._createWidthsButton}]}_pathExceptionCases(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:a,title:g,factory:L.prototype._createColorsButton,dataName:"line-tool-color"},{name:"linesWidths",inputType:"combobox",factory:L.prototype._createWidthsButton},{name:"lineStyle",title:b,inputType:"combobox",factory:L.prototype._createLineStyleButton}]}_riskPropertiesExceptionCases(){return[{name:"textcolor",title:m,inputType:"colorPicker",iconSvgCode:c,dataName:"text-color",undoText:p},{name:"profitBackground",title:x,inputType:"colorPicker",iconSvgCode:l,dataName:"background-color",undoText:h},{name:"stopBackground",title:P,inputType:"colorPicker",iconSvgCode:l,dataName:"background-color",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -46,10 +46,10 @@ const r=s.vertLabelsAlign.value(),l=s.horzLabelsAlign.value();let c=0,p=0;"left"
return Boolean(this._source.isLocked&&this._source.isLocked())}addAnchors(e,t){let i=this._points;this._model.lineBeingCreated()===this._source&&(i=i.slice(0,-1));const n=i.map(((e,t)=>{const i=this._source.points()[t],n=e;return n.snappingPrice=null==i?void 0:i.price,n.snappingIndex=null==i?void 0:i.index,n}));e.append(this.createLineAnchor({...null!=t?t:{},points:n},0))}createLineAnchor(e,t){var i;if(this.isLocked()){const i=this._getSelectionRenderer(t);return i.setData({bgColors:this._lineAnchorColors(e.points),points:e.points,visible:this.areAnchorsVisible(),hittestResult:o.HitTarget.Regular,barSpacing:this._model.timeScale().barSpacing()}),i}const n=(0,s.lastMouseOrTouchEventInfo)().isTouch,r=this._getLineAnchorRenderer(t);return r.setData({...e,color:this.anchorColor(),backgroundColors:this._lineAnchorColors(e.points),currentPoint:this.currentPoint(),linePointBeingEdited:this.isBeingEdited()?this._model.linePointBeingEdited():null,hittestResult:null!==(i=e.hittestResult)&&void 0!==i?i:o.HitTarget.ChangePoint,radius:this._anchorRadius(),strokeWidth:n?c.TouchStrokeWidth:c.RegularStrokeWidth,selected:this.isSelectedSource(),selectedStrokeWidth:n?c.TouchSelectedStrokeWidth:c.RegularSelectedStrokeWidth,visible:this.areAnchorsVisible()}),r}_anchorRadius(){return(0,s.lastMouseOrTouchEventInfo)().isTouch?c.TouchAnchorRadius:c.RegularAnchorRadius}_lineAnchorColors(e){const t=(0,r.ensureNotNull)(this._model.paneForSource(this._source)).height();return e.map((e=>this._model.backgroundColorAtYPercentFromTop(e.y/t)))}_updateImpl(e,t){this._points=[];if(this._model.timeScale().isEmpty())return;if(!this._validatePriceScale())return;const i=this._source.points();for(let e=0;e<i.length;e++){const t=i[e],n=this._source.pointToScreenPoint(t);if(!n)return;const r=n;r.data=e,this._points.push(r)}2===this._points.length&&(this._middlePoint=this._source.calcMiddlePoint(this._points[0],this._points[1])),this._invalidated=!1}_validatePriceScale(){const e=this._source.priceScale();return null!==e&&!e.isEmpty()}_getSource(){return this._source}_getPoints(){return this._points}_getModel(){return this._model}_height(){const e=this._source.priceScale();return null!==e?e.height():0}_width(){return this._model.timeScale().width()}_needLabelExclusionPath(e,t){const i=this._source.properties().childs();if("middle"!==(null!=t?t:i.vertLabelsAlign.value()))return!1;const n=e.getLinesInfo().lines;if(n.length%2==0)return!1;if(""===n[Math.floor(n.length/2)].trim())return!1;return!0}_getSelectionRenderer(e){for(;this._selectionRenderers.length<=e;)this._selectionRenderers.push(new a.SelectionRenderer);return this._selectionRenderers[e]}_getLineAnchorRenderer(e){for(;this._lineAnchorRenderers.length<=e;)this._lineAnchorRenderers.push(new l.LineAnchorRenderer);return this._lineAnchorRenderers[e]}}},99058:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LineToolBeingCreatedPaneView:()=>c});var n=i(48891),r=i(79191),s=i(79849),o=i(73436),a=i(19266),l=i(71254),d=i(99031);const h=n.colorsPalette["color-cold-gray-500"];class c extends r.LineSourcePaneView{
constructor(){super(...arguments),this._lineRenderer1=new l.VerticalLineRenderer,this._lineRenderer2=new l.VerticalLineRenderer,this._medianRenderer=new d.TrendLineRenderer,this._renderer=null}renderer(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null;const e=this._getPoints();if(e.length<1)return;this._renderer=new a.CompositeRenderer;const[t,i]=e;this._lineRenderer1.setData({x:t.x,color:h,linewidth:1,linestyle:s.LINESTYLE_SOLID}),this._renderer.append(this._lineRenderer1),e.length>1&&(this._lineRenderer2.setData({x:i.x,color:h,linewidth:1,linestyle:s.LINESTYLE_SOLID}),this._medianRenderer.setData({points:[t,i],color:h,linewidth:1,linestyle:s.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:o.LineEnd.Normal,rightend:o.LineEnd.Normal}),this._renderer.append(this._lineRenderer2),this._renderer.append(this._medianRenderer))}}},134:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LineToolPaneViewFibWithLabels:()=>d});var n=i(86441),r=i(79191),s=i(80657),o=i(87663),a=i(93572),l=i(46501);class d extends r.LineSourcePaneView{constructor(e,t){super(e,t),this._labelsRenderers={};for(let t=0;t<e.levelsCount();t++)this._labelsRenderers[t]=new s.TextRenderer;this._numericFormatter=new o.NumericFormatter,this._percentageFormatter=new a.PercentageFormatter}_updateLabelForLevel({i:e,levelIndex:t,leftPoint:i,rightPoint:r,price:s,color:o,horzAlign:a,vertAlign:d,extendLeft:h=!1,extendRight:c=!1}){var u,p,_,g,f;const v=this._labelsRenderers[e];if(void 0===v)return null;const x=this._source.priceScale();if(!x)return null;const m=this._source.properties(),w=Boolean(null===(u=m.showCoeffs)||void 0===u?void 0:u.value()),R=Boolean(null===(p=m.showPrices)||void 0===p?void 0:p.value());if(!w&&!R)return null;const y=null===(_=this._source.ownerSource())||void 0===_?void 0:_.firstValue();if(null==y)return null;const T=!(i.x>this._model.timeScale().width()&&!h||r.x<0&&!c);let b,P,L=a;switch(L){case"left":P=i.y,h?b=T?0:r.x:(b=i.x,L="right");break;case"right":P=r.y,c?b=T?this._model.timeScale().width():i.x:(b=r.x,L="left");break;default:b=(i.x+r.x)/2,P=(i.y+r.y)/2}const S=m["level"+t].coeff.value();let C="";if(w){C+=null!==(f=null===(g=m.coeffsAsPercents)||void 0===g?void 0:g.value())&&void 0!==f&&f?this._percentageFormatter.format(100*S,!1,2):this._numericFormatter.format(S)}return R&&(C+="("+x.formatPrice(s,y)+")"),v.setData({points:[new n.Point(b,P)],text:C,color:o,vertAlign:d,horzAlign:L,offsetX:4,offsetY:0,font:l.CHART_FONT_FAMILY,fontSize:m.labelFontSize?m.labelFontSize.value():12}),v}}},34658:(e,t,i)=>{"use strict";i.r(t),i.d(t,{NotePaneView:()=>m});var n=i(50151),r=i(79191),s=i(19266),o=i(80101),a=i(18807),l=i(46501),d=i(80657),h=i(87095),c=i(38223),u=i(74359),p=i(57352),_=i(27714),g=i(86441),f=i(34026);class v{constructor(e){this._data=null,this._sourceCanvas=null,this._translate=new g.Point(0,0),this._renderParams=e}destroy(){var e;null===(e=this._sourceCanvas)||void 0===e||e.remove()}renderParams(){return this._renderParams}update(e){var t,i;t=this._data,
i=e,(null===t||t.markerColor!==i.markerColor||t.borderColor!==i.borderColor||t.width!==i.width||t.height!==i.height)&&this._createSource(e.width,e.height,e.markerColor),this._data=e}drawOn(e){const t=(0,n.ensureNotNull)(this._data),i=new g.Point(Math.round(t.point.x),Math.round(t.point.y)).add(this._translate);e.drawImage((0,n.ensureNotNull)(this._sourceCanvas),Math.round(i.x*this._renderParams.pixelRatio),Math.round(i.y*this._renderParams.pixelRatio),Math.round(t.width*this._renderParams.pixelRatio),Math.round(t.height*this._renderParams.pixelRatio))}hasPoint(e){const t=(0,n.ensureNotNull)(this._data),i=t.point.add(this._translate),r=new g.Point(t.point.x-this._translate.x,t.point.y);return(0,f.pointInBox)(e,(0,g.box)(i,r))}_createSource(e,t,i){this._sourceCanvas=(0,u.createDisconnectedCanvas)(document,(0,_.size)({width:e,height:t}),this._renderParams.pixelRatio),this._translate=new g.Point(-e/2,.5-t),this._translate.x%1==0&&(this._translate=new g.Point(this._translate.x+.5,this._translate.y));const r=(0,n.ensureNotNull)(this._sourceCanvas.getContext("2d")),{pixelRatio:s}=this._renderParams;(0,u.drawScaled)(r,s,s,(()=>{const n=.6*e;r.fillStyle=i,r.beginPath(),r.moveTo(e/2,t),r.quadraticCurveTo(e,e/1.15,e,e/2),r.arc(e/2,e/2,e/2,0,Math.PI,!0),r.quadraticCurveTo(0,e/1.15,e/2,t),r.fill(),r.globalCompositeOperation="destination-out",r.beginPath(),r.moveTo((e-n)/2,e/2),r.arc(e/2,e/2,n/2,0,2*Math.PI),r.fill()}))}}class x{constructor(){this._source=null,this._data=null}setData(e){this._data=e,this._source&&this._source.update(e)}draw(e,t){var i;if(null===this._data)return;null!==this._source&&(0,p.areEqualPaneRenderParams)(this._source.renderParams(),t)||(null===(i=this._source)||void 0===i||i.destroy(),this._source=new v(t),this._source.update(this._data));this._source.drawOn(e),this._data.tooltipVisible&&this._drawTooltipOn(e,t)}hitTest(e){return null!==this._data&&null!==this._source&&this._source.hasPoint(e)?new a.HitTestResult(a.HitTarget.MovePoint):null}_drawTooltipOn(e,t){e.save(),e.translate(.5,.5);const i=(0,n.ensureNotNull)(this._data),r=String(i.text).replace(/^\s+|\s+$/g,"");e.font=(i.bold?"bold ":"")+(i.italic?"italic ":"")+i.fontSize+"px "+i.font;const s=i.tooltipWidth-2*i.tooltipPadding,o=(0,d.wordWrap)(r,e.font,s),a=i.point,l=i.tooltipLineSpacing;let p=i.tooltipWidth,_=o.length*i.fontSize+2*i.tooltipPadding;o.length>1&&(_+=(o.length-1)*l);let g=Math.round(a.x-p/2),f=Math.round(a.y-i.height-_-8);const v=a.x<20||a.x+20>i.vpWidth;let x=v?null:"top",m=v?0:Math.round(a.x);f<10?f=a.y+13:x="bottom",g<10?g+=Math.abs(g-10):g+p+10>i.vpWidth&&(g-=g+p+10-i.vpWidth),e.fillStyle=(0,h.generateColor)(i.backgroundColor,i.backgroundTransparency),e.strokeStyle=i.borderColor,e.lineWidth=1,e.beginPath();const w=Math.round(g*t.pixelRatio),R=Math.round(f*t.pixelRatio);m=Math.round(m*t.pixelRatio),_=Math.round(_*t.pixelRatio),p=Math.round(p*t.pixelRatio);const y=Math.round(7*t.pixelRatio);e.moveTo(w,R),v||"top"!==x||(e.lineTo(m-y,R),e.lineTo(m,R-y),e.lineTo(m+y,R)),e.lineTo(w+p,R),e.lineTo(w+p,R+_),
v||"bottom"!==x||(e.lineTo(m+y,R+_),e.lineTo(m,R+_+y),e.lineTo(m-y,R+_)),e.lineTo(w,R+_),e.closePath(),e.fill(),e.stroke(),e.textBaseline="middle",e.fillStyle=i.textColor,e.textAlign=(0,c.isRtl)()?"right":"left";const T=(0,u.calcTextHorizontalShift)(e,s),b=g+i.tooltipPadding+T;let P=f+i.tooltipPadding+i.fontSize/2;(0,u.drawScaled)(e,t.pixelRatio,t.pixelRatio,(()=>{for(let t=0;t<o.length;t++)e.fillText(o[t].replace(/^\s+/,""),b,P),P+=i.fontSize+l})),e.restore()}}class m extends r.LineSourcePaneView{constructor(e,t){super(e,t),this._renderer=null,this._noteRenderer=new x}isLabelVisible(){return this.isHoveredSource()||this.isSelectedSource()}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null;const e=this._getSource(),t=this._source.isFixed()?[(0,n.ensureDefined)(e.fixedPoint())]:this._points;if(t.length<1)return;const i=new s.CompositeRenderer,r=this.isLabelVisible(),d=this._source.properties().childs(),h={text:d.text.value(),bold:d.bold.value(),italic:d.italic.value(),font:l.CHART_FONT_FAMILY,fontSize:d.fontSize.value(),backgroundColor:d.backgroundColor.value(),backgroundTransparency:d.backgroundTransparency.value(),borderColor:d.borderColor.value(),textColor:d.textColor.value(),markerColor:d.markerColor.value(),point:t[0],width:24,height:32,tooltipVisible:r,vpWidth:this._model.timeScale().width(),tooltipWidth:e.getTooltipWidth(),tooltipPadding:e.getTooltipPadding(),tooltipLineSpacing:e.getTooltipLineSpacing()};this._noteRenderer.setData(h),i.append(this._noteRenderer),i.append(new o.SelectionRenderer({points:t,bgColors:this._lineAnchorColors(t),visible:this.areAnchorsVisible(),barSpacing:this._model.timeScale().barSpacing(),hittestResult:a.HitTarget.MovePoint})),this._renderer=i}}},61144:(e,t,i)=>{"use strict";i.r(t),i.d(t,{OrderPaneView:()=>v});var n=i(86441),r=i(79191),s=i(19266),o=i(44352),a=i(82161),l=i(68441),d=i(15187),h=i(18807),c=i(53180),u=i(47043);const p=o.t(null,void 0,i(33241)),_=o.t(null,void 0,i(16075));class g extends d.MediaCoordinatesPaneRenderer{constructor(e){super(),this._data=null,this._cache={},this._data=null,this._adapter=e}setData(e){this._data=e}hitTest(e,t){if(null===this._data||0===this._data.points.length)return null;const i=this._cache;if(e.y<i.top||e.y>i.bottom)return null;if(this._adapter.getBlocked()&&e.x>=i.left&&e.x<i.right)return new h.HitTestResult(h.HitTarget.Custom,{});if(this._adapter.getEditable()&&e.x>=i.left&&e.x<i.bodyRight){const e=this._adapter.hasMoveCallback()?h.HitTarget.MovePoint:h.HitTarget.Regular;return 0===this._adapter.getTooltip().length?new h.HitTestResult(e):new h.HitTestResult(e,{tooltip:{text:this._adapter.getTooltip(),rect:{x:i.left,y:i.top,w:i.bodyRight-i.left,h:i.bottom-i.top}}})}return this._adapter.getEditable()&&e.x>=i.bodyRight&&e.x<i.quantityRight?this._adapter.hasModifyCallback()?new h.HitTestResult(h.HitTarget.Custom,{clickHandler:this._adapter.callOnModify.bind(this._adapter),tapHandler:this._adapter.callOnModify.bind(this._adapter),tooltip:{
text:this._adapter.getModifyTooltip()||(0,c.appendEllipsis)(p),rect:{x:i.bodyRight,y:i.top,w:i.quantityRight-i.bodyRight,h:i.bottom-i.top}}}):new h.HitTestResult(h.HitTarget.Regular):this._adapter.getCancellable()&&e.x>=i.quantityRight&&e.x<i.right?new h.HitTestResult(h.HitTarget.Custom,{clickHandler:this._adapter.callOnCancel.bind(this._adapter),tapHandler:this._adapter.callOnCancel.bind(this._adapter),tooltip:{text:this._adapter.getCancelTooltip()||_,rect:{x:i.quantityRight,y:i.top,w:i.right-i.quantityRight,h:i.bottom-i.top}}}):null}_drawImpl(e){if(null===this._data||!this._data.points||this._data.points.length<1)return;const t=e.context,i=e.mediaSize.width,n=this._bodyWidth(t),r=this._quantityWidth(t),s=n+r+this._cancelButtonWidth(),o=i-s,a=Math.max(this._adapter.getLineLength()/100*i,1),l=Math.round(i-Math.min(o,a)),d=l-s,h=Math.round(this._data.points[0].y),c=Math.round(h-(this._height()+1)/2);this._cache.bodyRight=d+n,this._cache.quantityRight=d+n+r,this._cache.top=c,this._cache.bottom=c+this._height(),this._cache.left=d,this._cache.right=l,this._drawLines(t,d,l,h,i);let u=!1;0!==n&&(this._drawBody(t,d,c),this._adapter.hasMoveCallback()&&this._drawMovePoints(t,d,c),this._drawBodyText(t,d,c),u=!0),0!==r&&(this._drawQuantity(t,d+n,c,u),this._drawQuantityText(t,d+n,c),u=!0),0!==this._cancelButtonWidth()&&this._drawCancelButton(t,d+n+r,c,u)}_height(){return Math.max(20,1+Math.max(u.fontHeight(this._adapter.getBodyFont()),u.fontHeight(this._adapter.getQuantityFont())))}_bodyWidth(e){if(0===this._adapter.getText().length)return 0;e.save(),e.font=this._adapter.getBodyFont();const t=e.measureText(this._adapter.getText()).width;return e.restore(),Math.round(20+t)}_getQuantity(){return(0,a.splitThousands)(this._adapter.getQuantity()," ")}_quantityWidth(e){if(0===this._getQuantity().length)return 0;e.save(),e.font=this._adapter.getQuantityFont();const t=e.measureText(this._getQuantity()).width;return e.restore(),Math.round(Math.max(this._height(),10+t))}_cancelButtonWidth(){return this._adapter.isOnCancelCallbackPresent()?this._height():0}_drawLines(e,t,i,n,r){e.save(),e.strokeStyle=this._adapter.getLineColor(),(0,l.setLineStyle)(e,this._adapter.getLineStyle()),e.lineWidth=this._adapter.getLineWidth(),(0,l.drawLine)(e,i,n,r,n),this._adapter.getExtendLeft()&&(0,l.drawLine)(e,0,n,t,n),e.restore()}_drawMovePoints(e,t,i){e.save(),e.strokeStyle=this._adapter.getBodyBorderColor(),e.fillStyle=this._adapter.getBodyBorderColor();const n=t+4,r=n+2,s=Math.floor((this._height()-10)/2)+1;for(let t=0;t<s;++t){const s=i+5+2*t;(0,l.drawLine)(e,n,s,r,s)}e.restore()}_drawBody(e,t,i){e.strokeStyle=this._adapter.getBodyBorderColor(),e.fillStyle=this._adapter.getBodyBackgroundColor();const n=this._bodyWidth(e),r=this._height();e.fillRect(t+.5,i+.5,n-1,r-1),e.strokeRect(t,i,n,r)}_drawBodyText(e,t,i){e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getBodyFont(),e.fillStyle=this._adapter.getBodyTextColor();const n=t+this._bodyWidth(e)/2,r=i+this._height()/2;e.fillText(this._adapter.getText(),5+n-2,r)}_drawQuantity(e,t,i,n){
e.save(),e.strokeStyle=this._adapter.getQuantityBorderColor(),e.fillStyle=this._adapter.getQuantityBackgroundColor();const r=this._quantityWidth(e),s=this._height();e.fillRect(t+.5,i+.5,r-1,s-1),n&&e.clip&&(e.beginPath(),e.rect(t+.5,i-.5,r+1,s+1),e.clip()),e.strokeRect(t,i,r,s),e.restore()}_drawQuantityText(e,t,i){e.save(),e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getQuantityFont(),e.fillStyle=this._adapter.getQuantityTextColor();const n=t+this._quantityWidth(e)/2,r=i+this._height()/2;e.fillText(this._getQuantity(),n,r),e.restore()}_drawCancelButton(e,t,i,r){e.strokeStyle=this._adapter.getCancelButtonBorderColor(),e.fillStyle=this._adapter.getCancelButtonBackgroundColor();const s=this._cancelButtonWidth(),o=this._height();e.fillRect(t+.5,i+.5,s-1,o-1),this._adapter.getBlocked()&&(e.fillStyle="rgba(140, 140, 140, 0.75)",e.fillRect(t+.5,i+.5,s-1,o-1)),e.save(),r&&e.clip&&(e.beginPath(),e.rect(t+.5,i-.5,s+1,o+1),e.clip()),e.strokeRect(t,i,s,o),e.restore();const a=t+s,d=i+o;e.strokeStyle=this._adapter.getCancelButtonIconColor();const h=(this._cancelButtonWidth()-8)/2,c=(this._height()-8)/2;(0,l.drawPoly)(e,[new n.Point(t+h,i+c),new n.Point(a-h,d-c)],!0),(0,l.drawPoly)(e,[new n.Point(a-h,i+c),new n.Point(t+h,d-c)],!0)}}var f=i(80101);class v extends r.LineSourcePaneView{constructor(e,t){super(e,t),this._renderer=new s.CompositeRenderer,this._selectionRenderer=new f.SelectionRenderer,this._selectionData=null,this._adapter=e.adapter(),this._orderRenderer=new g(e.adapter()),this._renderer.append(this._orderRenderer),this._renderer.append(this._selectionRenderer)}renderer(e,t){return this._invalidated&&this._updateImpl(t),this._renderer}_updateImpl(e){if(super._updateImpl(),this._selectionData=null,this.isSelectedSource()&&this._points.length>0){const t=this._points[0].y,i=e-3.5-1,r=this._adapter.hasMoveCallback()?h.HitTarget.MovePoint:h.HitTarget.Regular,s=[new n.Point(i,t)];this._selectionData={barSpacing:this._model.timeScale().barSpacing(),points:s,bgColors:this._lineAnchorColors(s),hittestResult:r,visible:!0}}this._orderRenderer.setData({points:this._points}),this._selectionRenderer.setData(this._selectionData)}}},26013:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ParallelChannelPaneView:()=>d});var n=i(86441),r=i(66103),s=i(19266),o=i(28621),a=i(33295);const l=[r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.VerticalResize,r.PaneCursorType.VerticalResize];class d extends a.AlertableLineSourcePaneView{constructor(){super(...arguments),this._channelRenderer=new o.ParallelChannelRenderer,this._renderer=null}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null;const e=this._source.priceScale();if(!e||e.isEmpty())return;if(0===this._source.points().length)return;let t=null,i=null;if(3===this._points.length){const e=this._points[0],r=this._points[1],s=this._points[2].y-this._points[0].y;t=e.add((0,n.point)(0,s)),i=r.add((0,n.point)(0,s))}
if(this._points.length<=1)return;const r=this._source.properties(),o={points:this._points.length>2&&null!==t&&null!==i?[this._points[0],this._points[1],t,i]:[this._points[0],this._points[1]],color:r.childs().linecolor.value(),linewidth:r.childs().linewidth.value(),linestyle:r.childs().linestyle.value(),extendleft:r.childs().extendLeft.value(),extendright:r.childs().extendRight.value(),fillBackground:r.childs().fillBackground.value(),backcolor:r.childs().backgroundColor.value(),transparency:r.childs().transparency.value(),showMidline:r.childs().showMidline.value(),midlinewidth:r.childs().midlinewidth.value(),midlinestyle:r.childs().midlinestyle.value(),midcolor:r.childs().midlinecolor.value(),hittestOnBackground:!0};this._channelRenderer.setData(o);const a=new s.CompositeRenderer;a.append(this._channelRenderer);const d=[];if(this._points[0]&&d.push(this._points[0]),this._points[1]&&d.push(this._points[1]),t&&i){const e=t;e.data=2,d.push(e);const n=i;n.data=3,d.push(n);const r=t.add(i).scaled(.5);r.data=4,r.square=!0,d.push(r);const s=d[0].add(d[1]).scaled(.5);s.data=5,s.square=!0,d.push(s)}const h=3===this._points.length&&!t;if(this._model.lineBeingCreated()!==this._source||h||(d.pop(),d.pop()),a.append(this.createLineAnchor({points:d,pointsCursorType:l},0)),this._points.length>=2){const e=this._points;this._addAlertRenderer(a,[e[0],e[1]])}this._renderer=a}}},62801:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PathPaneView:()=>o});var n=i(79797),r=i(19266),s=i(79191);class o extends s.LineSourcePaneView{constructor(e,t){super(e,t),this._polygonRenderer=new n.PolygonRenderer,this._renderer=new r.CompositeRenderer}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer.clear();const e=this._source.properties().childs(),t={points:this._points,color:e.lineColor.value(),linewidth:e.lineWidth.value(),linestyle:e.lineStyle.value(),leftend:e.leftEnd.value(),rightend:e.rightEnd.value(),filled:!1,backcolor:"",fillBackground:!1,transparency:0};this._polygonRenderer.setData(t),this._renderer.append(this._polygonRenderer),this.addAnchors(this._renderer)}}},87202:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PitchfanLinePaneView:()=>d});var n=i(18807),r=i(14146),s=i(19266),o=i(73436),a=i(99031),l=i(79191);class d extends l.LineSourcePaneView{constructor(){super(...arguments),this._medianRenderer=new a.TrendLineRenderer,this._sideRenderer=new a.TrendLineRenderer,this._renderer=null,this._medianPoint=null}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){if(super._updateImpl(),this._renderer=null,0===this._points.length)return;if(3===this._points.length?(this._medianPoint=this._points[1].add(this._points[2]).scaled(.5),this._medianPoint.data=3):2===this._points.length?(this._medianPoint=this._points[1].clone(),this._medianPoint.data=3):(this._medianPoint=this._points[0].clone(),this._medianPoint.data=3),this._points.length<2)return;if(!this._medianPoint)return
v||"bottom"!==x||(e.lineTo(m+y,R+_),e.lineTo(m,R+_+y),e.lineTo(m-y,R+_)),e.lineTo(w,R+_),e.closePath(),e.fill(),e.stroke(),e.textBaseline="middle",e.fillStyle=i.textColor,e.textAlign=(0,c.isRtl)()?"right":"left";const T=(0,u.calcTextHorizontalShift)(e,s),b=g+i.tooltipPadding+T;let P=f+i.tooltipPadding+i.fontSize/2;(0,u.drawScaled)(e,t.pixelRatio,t.pixelRatio,(()=>{for(let t=0;t<o.length;t++)e.fillText(o[t].replace(/^\s+/,""),b,P),P+=i.fontSize+l})),e.restore()}}class m extends r.LineSourcePaneView{constructor(e,t){super(e,t),this._renderer=null,this._noteRenderer=new x}isLabelVisible(){return this.isHoveredSource()||this.isSelectedSource()}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null;const e=this._getSource(),t=this._source.isFixed()?[(0,n.ensureDefined)(e.fixedPoint())]:this._points;if(t.length<1)return;const i=new s.CompositeRenderer,r=this.isLabelVisible(),d=this._source.properties().childs(),h={text:d.text.value(),bold:d.bold.value(),italic:d.italic.value(),font:l.CHART_FONT_FAMILY,fontSize:d.fontSize.value(),backgroundColor:d.backgroundColor.value(),backgroundTransparency:d.backgroundTransparency.value(),borderColor:d.borderColor.value(),textColor:d.textColor.value(),markerColor:d.markerColor.value(),point:t[0],width:24,height:32,tooltipVisible:r,vpWidth:this._model.timeScale().width(),tooltipWidth:e.getTooltipWidth(),tooltipPadding:e.getTooltipPadding(),tooltipLineSpacing:e.getTooltipLineSpacing()};this._noteRenderer.setData(h),i.append(this._noteRenderer),i.append(new o.SelectionRenderer({points:t,bgColors:this._lineAnchorColors(t),visible:this.areAnchorsVisible(),barSpacing:this._model.timeScale().barSpacing(),hittestResult:a.HitTarget.MovePoint})),this._renderer=i}}},61144:(e,t,i)=>{"use strict";i.r(t),i.d(t,{OrderPaneView:()=>v});var n=i(86441),r=i(79191),s=i(19266),o=i(44352),a=i(82161),l=i(68441),d=i(15187),h=i(18807),c=i(53180),u=i(47043);const p=o.t(null,void 0,i(33241)),_=o.t(null,void 0,i(16075));class g extends d.MediaCoordinatesPaneRenderer{constructor(e){super(),this._data=null,this._cache={},this._data=null,this._adapter=e}setData(e){this._data=e}hitTest(e,t){if(null===this._data||0===this._data.points.length)return null;const i=this._cache;if(e.y<i.top||e.y>i.bottom)return null;if(this._adapter.getBlocked()&&e.x>=i.left&&e.x<i.right)return new h.HitTestResult(h.HitTarget.Custom,{});if(this._adapter.getEditable()&&e.x>=i.left&&e.x<i.bodyRight){const e=this._adapter.hasMoveCallback()?h.HitTarget.MovePoint:h.HitTarget.Regular;return 0===this._adapter.getTooltip().length?new h.HitTestResult(e):new h.HitTestResult(e,{tooltip:{text:this._adapter.getTooltip(),forceHideOnMove:this._adapter.hasMoveCallback(),rect:{x:i.left,y:i.top,w:i.bodyRight-i.left,h:i.bottom-i.top}}})}return this._adapter.getEditable()&&e.x>=i.bodyRight&&e.x<i.quantityRight?this._adapter.hasModifyCallback()?new h.HitTestResult(h.HitTarget.Custom,{clickHandler:this._adapter.callOnModify.bind(this._adapter),
tapHandler:this._adapter.callOnModify.bind(this._adapter),tooltip:{text:this._adapter.getModifyTooltip()||(0,c.appendEllipsis)(p),rect:{x:i.bodyRight,y:i.top,w:i.quantityRight-i.bodyRight,h:i.bottom-i.top}}}):new h.HitTestResult(h.HitTarget.Regular):this._adapter.getCancellable()&&e.x>=i.quantityRight&&e.x<i.right?new h.HitTestResult(h.HitTarget.Custom,{clickHandler:this._adapter.callOnCancel.bind(this._adapter),tapHandler:this._adapter.callOnCancel.bind(this._adapter),tooltip:{text:this._adapter.getCancelTooltip()||_,rect:{x:i.quantityRight,y:i.top,w:i.right-i.quantityRight,h:i.bottom-i.top}}}):null}_drawImpl(e){if(null===this._data||!this._data.points||this._data.points.length<1)return;const t=e.context,i=e.mediaSize.width,n=this._bodyWidth(t),r=this._quantityWidth(t),s=n+r+this._cancelButtonWidth(),o=i-s,a=Math.max(this._adapter.getLineLength()/100*i,1),l=Math.round(i-Math.min(o,a)),d=l-s,h=Math.round(this._data.points[0].y),c=Math.round(h-(this._height()+1)/2);this._cache.bodyRight=d+n,this._cache.quantityRight=d+n+r,this._cache.top=c,this._cache.bottom=c+this._height(),this._cache.left=d,this._cache.right=l,this._drawLines(t,d,l,h,i);let u=!1;0!==n&&(this._drawBody(t,d,c),this._adapter.hasMoveCallback()&&this._drawMovePoints(t,d,c),this._drawBodyText(t,d,c),u=!0),0!==r&&(this._drawQuantity(t,d+n,c,u),this._drawQuantityText(t,d+n,c),u=!0),0!==this._cancelButtonWidth()&&this._drawCancelButton(t,d+n+r,c,u)}_height(){return Math.max(20,1+Math.max(u.fontHeight(this._adapter.getBodyFont()),u.fontHeight(this._adapter.getQuantityFont())))}_bodyWidth(e){if(0===this._adapter.getText().length)return 0;e.save(),e.font=this._adapter.getBodyFont();const t=e.measureText(this._adapter.getText()).width;return e.restore(),Math.round(20+t)}_getQuantity(){return(0,a.splitThousands)(this._adapter.getQuantity()," ")}_quantityWidth(e){if(0===this._getQuantity().length)return 0;e.save(),e.font=this._adapter.getQuantityFont();const t=e.measureText(this._getQuantity()).width;return e.restore(),Math.round(Math.max(this._height(),10+t))}_cancelButtonWidth(){return this._adapter.isOnCancelCallbackPresent()?this._height():0}_drawLines(e,t,i,n,r){e.save(),e.strokeStyle=this._adapter.getLineColor(),(0,l.setLineStyle)(e,this._adapter.getLineStyle()),e.lineWidth=this._adapter.getLineWidth(),(0,l.drawLine)(e,i,n,r,n),this._adapter.getExtendLeft()&&(0,l.drawLine)(e,0,n,t,n),e.restore()}_drawMovePoints(e,t,i){e.save(),e.strokeStyle=this._adapter.getBodyBorderColor(),e.fillStyle=this._adapter.getBodyBorderColor();const n=t+4,r=n+2,s=Math.floor((this._height()-10)/2)+1;for(let t=0;t<s;++t){const s=i+5+2*t;(0,l.drawLine)(e,n,s,r,s)}e.restore()}_drawBody(e,t,i){e.strokeStyle=this._adapter.getBodyBorderColor(),e.fillStyle=this._adapter.getBodyBackgroundColor();const n=this._bodyWidth(e),r=this._height();e.fillRect(t+.5,i+.5,n-1,r-1),e.strokeRect(t,i,n,r)}_drawBodyText(e,t,i){e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getBodyFont(),e.fillStyle=this._adapter.getBodyTextColor();const n=t+this._bodyWidth(e)/2,r=i+this._height()/2
;e.fillText(this._adapter.getText(),5+n-2,r)}_drawQuantity(e,t,i,n){e.save(),e.strokeStyle=this._adapter.getQuantityBorderColor(),e.fillStyle=this._adapter.getQuantityBackgroundColor();const r=this._quantityWidth(e),s=this._height();e.fillRect(t+.5,i+.5,r-1,s-1),n&&e.clip&&(e.beginPath(),e.rect(t+.5,i-.5,r+1,s+1),e.clip()),e.strokeRect(t,i,r,s),e.restore()}_drawQuantityText(e,t,i){e.save(),e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getQuantityFont(),e.fillStyle=this._adapter.getQuantityTextColor();const n=t+this._quantityWidth(e)/2,r=i+this._height()/2;e.fillText(this._getQuantity(),n,r),e.restore()}_drawCancelButton(e,t,i,r){e.strokeStyle=this._adapter.getCancelButtonBorderColor(),e.fillStyle=this._adapter.getCancelButtonBackgroundColor();const s=this._cancelButtonWidth(),o=this._height();e.fillRect(t+.5,i+.5,s-1,o-1),this._adapter.getBlocked()&&(e.fillStyle="rgba(140, 140, 140, 0.75)",e.fillRect(t+.5,i+.5,s-1,o-1)),e.save(),r&&e.clip&&(e.beginPath(),e.rect(t+.5,i-.5,s+1,o+1),e.clip()),e.strokeRect(t,i,s,o),e.restore();const a=t+s,d=i+o;e.strokeStyle=this._adapter.getCancelButtonIconColor();const h=(this._cancelButtonWidth()-8)/2,c=(this._height()-8)/2;(0,l.drawPoly)(e,[new n.Point(t+h,i+c),new n.Point(a-h,d-c)],!0),(0,l.drawPoly)(e,[new n.Point(a-h,i+c),new n.Point(t+h,d-c)],!0)}}var f=i(80101);class v extends r.LineSourcePaneView{constructor(e,t){super(e,t),this._renderer=new s.CompositeRenderer,this._selectionRenderer=new f.SelectionRenderer,this._selectionData=null,this._adapter=e.adapter(),this._orderRenderer=new g(e.adapter()),this._renderer.append(this._orderRenderer),this._renderer.append(this._selectionRenderer)}renderer(e,t){return this._invalidated&&this._updateImpl(t),this._renderer}_updateImpl(e){if(super._updateImpl(),this._selectionData=null,this.isSelectedSource()&&this._points.length>0){const t=this._points[0].y,i=e-3.5-1,r=this._adapter.hasMoveCallback()?h.HitTarget.MovePoint:h.HitTarget.Regular,s=[new n.Point(i,t)];this._selectionData={barSpacing:this._model.timeScale().barSpacing(),points:s,bgColors:this._lineAnchorColors(s),hittestResult:r,visible:!0}}this._orderRenderer.setData({points:this._points}),this._selectionRenderer.setData(this._selectionData)}}},26013:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ParallelChannelPaneView:()=>d});var n=i(86441),r=i(66103),s=i(19266),o=i(28621),a=i(33295);const l=[r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.Default,r.PaneCursorType.VerticalResize,r.PaneCursorType.VerticalResize];class d extends a.AlertableLineSourcePaneView{constructor(){super(...arguments),this._channelRenderer=new o.ParallelChannelRenderer,this._renderer=null}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null;const e=this._source.priceScale();if(!e||e.isEmpty())return;if(0===this._source.points().length)return;let t=null,i=null;if(3===this._points.length){const e=this._points[0],r=this._points[1],s=this._points[2].y-this._points[0].y;t=e.add((0,
n.point)(0,s)),i=r.add((0,n.point)(0,s))}if(this._points.length<=1)return;const r=this._source.properties(),o={points:this._points.length>2&&null!==t&&null!==i?[this._points[0],this._points[1],t,i]:[this._points[0],this._points[1]],color:r.childs().linecolor.value(),linewidth:r.childs().linewidth.value(),linestyle:r.childs().linestyle.value(),extendleft:r.childs().extendLeft.value(),extendright:r.childs().extendRight.value(),fillBackground:r.childs().fillBackground.value(),backcolor:r.childs().backgroundColor.value(),transparency:r.childs().transparency.value(),showMidline:r.childs().showMidline.value(),midlinewidth:r.childs().midlinewidth.value(),midlinestyle:r.childs().midlinestyle.value(),midcolor:r.childs().midlinecolor.value(),hittestOnBackground:!0};this._channelRenderer.setData(o);const a=new s.CompositeRenderer;a.append(this._channelRenderer);const d=[];if(this._points[0]&&d.push(this._points[0]),this._points[1]&&d.push(this._points[1]),t&&i){const e=t;e.data=2,d.push(e);const n=i;n.data=3,d.push(n);const r=t.add(i).scaled(.5);r.data=4,r.square=!0,d.push(r);const s=d[0].add(d[1]).scaled(.5);s.data=5,s.square=!0,d.push(s)}const h=3===this._points.length&&!t;if(this._model.lineBeingCreated()!==this._source||h||(d.pop(),d.pop()),a.append(this.createLineAnchor({points:d,pointsCursorType:l},0)),this._points.length>=2){const e=this._points;this._addAlertRenderer(a,[e[0],e[1]])}this._renderer=a}}},62801:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PathPaneView:()=>o});var n=i(79797),r=i(19266),s=i(79191);class o extends s.LineSourcePaneView{constructor(e,t){super(e,t),this._polygonRenderer=new n.PolygonRenderer,this._renderer=new r.CompositeRenderer}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer.clear();const e=this._source.properties().childs(),t={points:this._points,color:e.lineColor.value(),linewidth:e.lineWidth.value(),linestyle:e.lineStyle.value(),leftend:e.leftEnd.value(),rightend:e.rightEnd.value(),filled:!1,backcolor:"",fillBackground:!1,transparency:0};this._polygonRenderer.setData(t),this._renderer.append(this._polygonRenderer),this.addAnchors(this._renderer)}}},87202:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PitchfanLinePaneView:()=>d});var n=i(18807),r=i(14146),s=i(19266),o=i(73436),a=i(99031),l=i(79191);class d extends l.LineSourcePaneView{constructor(){super(...arguments),this._medianRenderer=new a.TrendLineRenderer,this._sideRenderer=new a.TrendLineRenderer,this._renderer=null,this._medianPoint=null}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){if(super._updateImpl(),this._renderer=null,0===this._points.length)return;if(3===this._points.length?(this._medianPoint=this._points[1].add(this._points[2]).scaled(.5),this._medianPoint.data=3):2===this._points.length?(this._medianPoint=this._points[1].clone(),this._medianPoint.data=3):(this._medianPoint=this._points[0].clone(),this._medianPoint.data=3),this._points.length<2)return;if(!this._medianPoint)return
;const e=new s.CompositeRenderer,t=this._source.properties().childs(),i=t.median.childs(),l={points:[this._points[0],this._medianPoint],color:i.color.value(),linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!0,leftend:o.LineEnd.Normal,rightend:o.LineEnd.Normal};if(this._medianRenderer.setData(l),e.append(this._medianRenderer),this._points.length<3)return this.addAnchors(e),void(this._renderer=e);const d={points:[this._points[1],this._points[2]],color:i.color.value(),linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!1,leftend:o.LineEnd.Normal,rightend:o.LineEnd.Normal};this._sideRenderer.setData(d),e.append(this._sideRenderer);let h=0;const c=this._points[2].subtract(this._points[1]).scaled(.5),u=t.fillBackground.value(),p=t.transparency.value();for(let t=0;t<=8;t++){const i="level"+t,s=this._source.properties().child(i);if(s.childs().visible.value()){const i=this._medianPoint.addScaled(c,s.childs().coeff.value()),l=this._medianPoint.addScaled(c,-s.childs().coeff.value());if(u){{const t={p1:this._points[0],p2:i,p3:this._points[0],p4:this._medianPoint.addScaled(c,h),color:s.childs().color.value(),transparency:p,hittestOnBackground:!0,extendLeft:!1},n=new r.ChannelRenderer;n.setData(t),e.append(n)}{const t={p1:this._points[0],p2:l,p3:this._points[0],p4:this._medianPoint.addScaled(c,-h),color:s.childs().color.value(),transparency:p,hittestOnBackground:!0,extendLeft:!1},i=new r.ChannelRenderer;i.setData(t),e.append(i)}}h=s.childs().coeff.value();{const r={points:[this._points[0],i],color:s.childs().color.value(),linewidth:s.childs().linewidth.value(),linestyle:s.childs().linestyle.value(),extendleft:!1,extendright:!0,leftend:o.LineEnd.Normal,rightend:o.LineEnd.Normal},l=new a.TrendLineRenderer;l.setData(r),l.setHitTest(new n.HitTestResult(n.HitTarget.MovePoint,void 0,t)),e.append(l)}{const i={points:[this._points[0],l],color:s.childs().color.value(),linewidth:s.childs().linewidth.value(),linestyle:s.childs().linestyle.value(),extendleft:!1,extendright:!0,leftend:o.LineEnd.Normal,rightend:o.LineEnd.Normal},r=new a.TrendLineRenderer;r.setData(i),r.setHitTest(new n.HitTestResult(n.HitTarget.MovePoint,void 0,t)),e.append(r)}}}this.addAnchors(e),this._renderer=e}}},95337:(e,t,i)=>{"use strict";i.r(t),i.d(t,{InsidePitchforkLinePaneView:()=>p,PitchforkLinePaneView:()=>h,SchiffPitchfork2LinePaneView:()=>u,SchiffPitchforkLinePaneView:()=>c});var n=i(86441),r=i(18807),s=i(14146),o=i(19266),a=i(73436),l=i(99031),d=i(79191);class h extends d.LineSourcePaneView{constructor(){super(...arguments),this._medianRenderer=new l.TrendLineRenderer,this._sideRenderer=new l.TrendLineRenderer,this._renderer=null,this._medianPoint=null}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateImpl(){super._updateImpl(),this._renderer=null,0!==this._points.length&&(3===this._points.length?(this._medianPoint=this._points[1].add(this._points[2]).scaled(.5),this._medianPoint.data=3):2===this._points.length?(this._medianPoint=this._points[1].clone(),
this._medianPoint.data=3):(this._medianPoint=this._points[0].clone(),this._medianPoint.data=3),this._updateRenderer())}_updateRenderer(){if(this._points.length<2)return;if(!this._medianPoint)return;const e=this._source.properties(),t=e.childs().median.childs(),i=new o.CompositeRenderer,n={points:[this._points[0],this._medianPoint],color:t.color.value(),linewidth:t.linewidth.value(),linestyle:t.linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal};if(this._medianRenderer.setData(n),i.append(this._medianRenderer),this._points.length<3)return this.addAnchors(i),void(this._renderer=i);const d={points:[this._points[1],this._points[2]],color:t.color.value(),linewidth:t.linewidth.value(),linestyle:t.linestyle.value(),extendleft:!1,extendright:!1,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal};this._sideRenderer.setData(d),i.append(this._sideRenderer);const h=this._points[2].subtract(this._points[1]).scaled(.5),c=this._medianPoint.subtract(this._points[0]);let u=0;const p=e.childs().fillBackground.value(),_=e.childs().transparency.value();for(let t=0;t<=8;t++){const n="level"+t,o=e.childs()[n];if(o.childs().visible.value()){const n=this._medianPoint.addScaled(h,o.childs().coeff.value()),d=n.add(c),g=this._medianPoint.addScaled(h,-o.childs().coeff.value()),f=g.add(c);if(p){{const t=this._medianPoint.addScaled(h,u),r={p1:n,p2:d,p3:t,p4:t.add(c),color:o.childs().color.value(),transparency:_,hittestOnBackground:!0,extendLeft:e.childs().extendLines.value()},a=new s.ChannelRenderer;a.setData(r),i.append(a)}{const t=this._medianPoint.addScaled(h,-u),n={p1:g,p2:f,p3:t,p4:t.add(c),color:o.childs().color.value(),transparency:_,hittestOnBackground:!0,extendLeft:e.childs().extendLines.value()},r=new s.ChannelRenderer;r.setData(n),i.append(r)}}u=o.childs().coeff.value();const v={points:[n,d],color:o.childs().color.value(),linewidth:o.childs().linewidth.value(),linestyle:o.childs().linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal},x=new l.TrendLineRenderer;x.setData(v),x.setHitTest(new r.HitTestResult(r.HitTarget.MovePoint,void 0,t)),i.append(x);const m={points:[g,f],color:o.childs().color.value(),linewidth:o.childs().linewidth.value(),linestyle:o.childs().linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal},w=new l.TrendLineRenderer;w.setData(m),w.setHitTest(new r.HitTestResult(r.HitTarget.MovePoint,void 0,t)),i.append(w)}}this.addAnchors(i),this._renderer=i}}class c extends h{constructor(){super(...arguments),this._modifiedBase=null,this._backSideRenderer=new l.TrendLineRenderer}renderer(e,t){return this._invalidated&&this._updateImpl(),this._renderer}_updateRenderer(){if(this._points.length<2)return;this._calcMofifiedBase();const e=this._source.properties(),t=new o.CompositeRenderer,i=e.childs().median.childs();{const e={points:[this._points[0],this._points[1]],color:i.color.value(),
linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!1,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal};if(this._backSideRenderer.setData(e),t.append(this._backSideRenderer),!this._medianPoint||!this._modifiedBase)return this.addAnchors(t),void(this._renderer=t)}{const n={points:[this._modifiedBase,this._medianPoint],color:i.color.value(),linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal};if(this._medianRenderer.setData(n),t.append(this._medianRenderer),this._points.length<3)return this.addAnchors(t),void(this._renderer=t)}{const e={points:[this._points[1],this._points[2]],color:i.color.value(),linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!1,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal};this._sideRenderer.setData(e),t.append(this._sideRenderer)}{const i=this._points[2].subtract(this._points[1]).scaled(.5),n=this._medianPoint.subtract(this._modifiedBase);let o=0;const d=e.childs().fillBackground.value(),h=e.childs().transparency.value();for(let c=0;c<=8;c++){const u="level"+c,p=e.child(u);if(p.childs().visible.value()){const u=this._medianPoint.addScaled(i,p.childs().coeff.value()),_=u.add(n),g=this._medianPoint.addScaled(i,-p.childs().coeff.value()),f=g.add(n);if(d){const r=this._medianPoint.addScaled(i,o);{const i={p1:u,p2:_,p3:r,p4:r.add(n),color:p.childs().color.value(),transparency:h,hittestOnBackground:!0,extendLeft:e.childs().extendLines.value()},o=new s.ChannelRenderer;o.setData(i),t.append(o)}{const r=this._medianPoint.addScaled(i,-o),a={p1:g,p2:f,p3:r,p4:r.add(n),color:p.childs().color.value(),transparency:h,hittestOnBackground:!0,extendLeft:e.childs().extendLines.value()},l=new s.ChannelRenderer;l.setData(a),t.append(l)}}o=p.childs().coeff.value();const v={points:[u,_],color:p.childs().color.value(),linewidth:p.childs().linewidth.value(),linestyle:p.childs().linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal},x=new l.TrendLineRenderer;x.setData(v),x.setHitTest(new r.HitTestResult(r.HitTarget.MovePoint,void 0,c)),t.append(x);const m={points:[g,f],color:p.childs().color.value(),linewidth:p.childs().linewidth.value(),linestyle:p.childs().linestyle.value(),extendleft:e.childs().extendLines.value(),extendright:!0,leftend:a.LineEnd.Normal,rightend:a.LineEnd.Normal},w=new l.TrendLineRenderer;w.setData(m),w.setHitTest(new r.HitTestResult(r.HitTarget.MovePoint,void 0,c)),t.append(w)}}}this.addAnchors(t),this._renderer=t}_calcMofifiedBase(){this._points.length>1&&(this._modifiedBase=this._points[0].add(this._points[1]).scaled(.5))}}class u extends c{_calcMofifiedBase(){if(this._points.length>2){const e=this._points[0].x,t=.5*(this._points[0].y+this._points[1].y),i=new n.Point(e,t);this._modifiedBase=i}}}class p extends h{constructor(){super(...arguments),this._backSideRenderer=new l.TrendLineRenderer,this._centerRenderer=new l.TrendLineRenderer,

View File

@@ -4,7 +4,7 @@
;var o=n(50959),r=n(97754),i=n(90186),s=n(47201),l=n(48907),a=n(38528),c=n(48027),u=n(29202),d=n(45812),h=n(67029),g=n(78274),p=n(30930),m=n.n(p);function f(e){return!(0,i.isAriaAttribute)(e)&&!(0,i.isDataAttribute)(e)}function v(e){const{id:t,title:n,role:s,tabIndex:l,placeholder:a,name:c,type:u,value:d,defaultValue:p,draggable:v,autoComplete:b,autoFocus:y,maxLength:_,min:S,max:w,step:C,pattern:T,inputMode:I,onSelect:E,onFocus:k,onBlur:M,onKeyDown:D,onKeyUp:N,onKeyPress:x,onChange:L,onDragStart:z,size:j="small",className:R,inputClassName:A,disabled:O,readonly:P,containerTabIndex:B,startSlot:F,endSlot:W,reference:H,containerReference:V,onContainerFocus:G,...U}=e,Z=(0,i.filterProps)(U,f),K={...(0,i.filterAriaProps)(U),...(0,i.filterDataProps)(U),id:t,title:n,role:s,tabIndex:l,placeholder:a,name:c,type:u,value:d,defaultValue:p,draggable:v,autoComplete:b,autoFocus:y,maxLength:_,min:S,max:w,step:C,pattern:T,inputMode:I,onSelect:E,onFocus:k,onBlur:M,onKeyDown:D,onKeyUp:N,onKeyPress:x,onChange:L,onDragStart:z};return o.createElement(h.ControlSkeleton,{...Z,disabled:O,readonly:P,tabIndex:B,className:r(m().container,R),size:j,ref:V,onFocus:G,startSlot:F,middleSlot:o.createElement(g.MiddleSlot,null,o.createElement("input",{...K,className:r(m().input,m()[`size-${j}`],A,F&&m()["with-start-slot"],W&&m()["with-end-slot"]),disabled:O,readOnly:P,ref:H})),endSlot:W})}function b(e){e=(0,c.useControl)(e);const{disabled:t,autoSelectOnFocus:n,tabIndex:r=0,onFocus:i,onBlur:h,reference:g,containerReference:p=null}=e,m=(0,o.useRef)(null),f=(0,o.useRef)(null),[b,y]=(0,u.useFocus)(),_=t?void 0:b?-1:r,S=t?void 0:b?r:-1,{isMouseDown:w,handleMouseDown:C,handleMouseUp:T}=(0,d.useIsMouseDown)(),I=(0,s.createSafeMulticastEventHandler)(y.onFocus,(function(e){n&&!w.current&&(0,l.selectAllContent)(e.currentTarget)}),i),E=(0,s.createSafeMulticastEventHandler)(y.onBlur,h),k=(0,o.useCallback)((e=>{m.current=e,g&&("function"==typeof g&&g(e),"object"==typeof g&&(g.current=e))}),[m,g]);return o.createElement(v,{...e,isFocused:b,containerTabIndex:_,tabIndex:S,onContainerFocus:function(e){f.current===e.target&&null!==m.current&&m.current.focus()},onFocus:I,onBlur:E,reference:k,containerReference:(0,a.useMergedRefs)([f,p]),onMouseDown:C,onMouseUp:T})}},38952:(e,t,n)=>{"use strict";function o(e){const{reference:t,...n}=e;return{...n,ref:t}}n.d(t,{renameRef:()=>o})},21593:(e,t,n)=>{"use strict";n.d(t,{CustomComponentDefaultLink:()=>i});var o=n(50959),r=n(38952);function i(e){return o.createElement("a",{...(0,r.renameRef)(e)})}o.PureComponent},48027:(e,t,n)=>{"use strict";n.d(t,{useControl:()=>i});var o=n(47201),r=n(29202);function i(e){const{onFocus:t,onBlur:n,intent:i,highlight:s,disabled:l}=e,[a,c]=(0,r.useFocus)(void 0,l),u=(0,o.createSafeMulticastEventHandler)(l?void 0:c.onFocus,t),d=(0,o.createSafeMulticastEventHandler)(l?void 0:c.onBlur,n);return{...e,intent:i||(a?"primary":"default"),highlight:null!=s?s:a,onFocus:u,onBlur:d}}},29202:(e,t,n)=>{"use strict";n.d(t,{useFocus:()=>r});var o=n(50959);function r(e,t){const[n,r]=(0,o.useState)(!1);(0,
o.useEffect)((()=>{t&&n&&r(!1)}),[t,n]);const i={onFocus:(0,o.useCallback)((function(t){void 0!==e&&e.current!==t.target||r(!0)}),[e]),onBlur:(0,o.useCallback)((function(t){void 0!==e&&e.current!==t.target||r(!1)}),[e])};return[n,i]}},45812:(e,t,n)=>{"use strict";n.d(t,{useIsMouseDown:()=>r});var o=n(50959);function r(){const e=(0,o.useRef)(!1),t=(0,o.useCallback)((()=>{e.current=!0}),[e]),n=(0,o.useCallback)((()=>{e.current=!1}),[e]);return{isMouseDown:e,handleMouseDown:t,handleMouseUp:n}}},38528:(e,t,n)=>{"use strict";n.d(t,{useMergedRefs:()=>i});var o=n(50959),r=n(53017);function i(e){return(0,o.useCallback)((0,r.mergeRefs)(e),e)}},48907:(e,t,n)=>{"use strict";function o(e){null!==e&&e.setSelectionRange(0,e.value.length)}n.d(t,{selectAllContent:()=>o})},47201:(e,t,n)=>{"use strict";function o(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>o})},23263:(e,t,n)=>{"use strict";n.d(t,{ManageDrawings:()=>O});var o=n(50959),r=n(43370),i=(n(50151),n(9745)),s=n(44352),l=n(36298),a=n(97145),c=n(59224),u=n(92249),d=n(64530),h=n(1722),g=n(63932),p=n(97754),m=n.n(p);var f=n(90186),v=n(27011),b=n(25398),y=n.n(b);function _(e){const{className:t,color:n,variant:o,size:r,stretch:i,animated:s,disableThemes:l,isInvertedColorTheme:a,...c}=e;return{...c,...(0,f.filterDataProps)(e),...(0,f.filterAriaProps)(e)}}function S(e){const{reference:t,children:n,iconOnly:r,startIcon:s,endIcon:l,...a}=e,c=function(e,t){const{className:n,color:o="brand",variant:r="primary",size:i="xlarge",stretch:s,animated:l=!1,disableThemes:a=!1,iconOnly:c=!1,isAnchor:u=!1,isActivated:d=!1,isInvertedColorTheme:h=!1,endIcon:g,startIcon:m}=t,f=function(e,t){return!!t&&"black"===e}(o,h);return p(n,e["round-button"],f?e[`color-inverted${o}`]:e[`color-${o}`],e[`variant-${r}`],e[`size-${i}`],l&&e.animated,s&&e.stretch,a&&e["disable-themes"],c&&e["icon-only"],u&&e.link,d&&e.activated,m&&e["with-start-icon"],g&&e["with-end-icon"])}(y(),e);return o.createElement("button",{..._(a),className:c,ref:t},s&&o.createElement(i.Icon,{className:m()(y().icon,y().startIcon),icon:s}),!(0,v.isIconOnly)(n,r)&&o.createElement("span",{className:y().content},n),l&&o.createElement(i.Icon,{className:m()(y().icon,y().endIcon),icon:l}))}n(21593);function w(e,t){const{align:n="start",size:o="xsmall"}=t;return p(e["round-tabs"],e[`align-${n}`],e[`size-${o}`])}function C(e,t){const{variant:n="primary",isChecked:o}=t;return p(e.tab,e[`tab-${n}`],o&&e.checked)}var T=n(48729),I=n.n(T);const E=o.forwardRef(((e,t)=>{const{tabs:n,size:r="xsmall",variant:i="primary",theme:s=I()}=e;return o.createElement("div",{className:w(s,e),ref:t},n.map((e=>{const{isChecked:t,...n}=e;return o.createElement(S,{...n,className:C(s,{...n,variant:i,isChecked:t}),size:r,variant:i})})))}));E.displayName="RoundTabsButtons";s.t(null,void 0,n(87871)),s.t(null,void 0,n(10538)),s.t(null,void 0,n(74860));var k=n(29540),M=n(28355);const D=(0,c.getLogger)("Chart.ManageDrawings"),N=new Map;function x(e){let t=N.get(e);return void 0===t&&(t=new a.WatchedValue([]),N.set(e,t)),t}
const L=new l.TranslatedString("remove all line tools for {symbol}",s.t(null,void 0,n(23481))),z=e=>s.t(null,{plural:"{drawingsCount} drawings",count:e},n(88143)).format({drawingsCount:e.toString()}),j=s.t(null,void 0,n(85128)),R=s.t(null,void 0,n(18570));function A(e){const[t,n]=o.useState(null),[i,s]=o.useState(null),[l,a]=o.useState(null),[c,d]=(o.useRef(null),o.useState([]));return o.useEffect((()=>(e.withModel(null,(()=>{const t=e.model();n(t),s(t.mainSeries().symbol())})),()=>n(null))),[e]),o.useEffect((()=>{if(null!==t){const e={},n=(0,r.default)(f,250,{leading:!1});return f(),t.model().dataSourceCollectionChanged().subscribe(e,n),()=>{t.model().dataSourceCollectionChanged().unsubscribe(e,n)}}}),[t]),o.useEffect((()=>{if(null!==t){const e=x(t.model().id()).spawn();return d([...e.value()]),e.subscribe((()=>d([...e.value()]))),()=>null==e?void 0:e.destroy()}}),[t]),o.useMemo((()=>({currentSymbol:i,symbolDrawingsMaps:l,removeSymbolDrawings:g,changeSymbol:p,hiddenSymbols:c})),[i,l,g,p,c]);async function g(e,n){if(t&&l){const o=l[n].get(e);if(o){const n=Array.from(o).map((e=>t.model().dataSourceForId(e))).filter(h.notNull);n.length>0&&t.removeSources(n,!1,L.format({symbol:e}));const r=x(t.model().id());r.setValue([...r.value(),e]);try{await f()}catch(e){D.logError(`Error removing line tools: ${e}`)}r.setValue(r.value().filter((t=>t!==e)))}}}function p(n){e.setSymbol(n),null!==t&&s(n)}async function m(e){const t=function(e){const t=[new Map,new Map,new Map];{const n=t[0];e.forEach((e=>{var t;if((0,u.isLineTool)(e)&&e.showInObjectTree()){const o=null!==(t=e.symbol())&&void 0!==t?t:"",r=n.get(o)||new Set;r.add(e.id()),n.set(o,r)}}))}return t}(e);return(await async function(){return[new Map,new Map,new Map]}()).forEach(((e,n)=>{const o=t[n];e.forEach(((e,t)=>{const n=o.get(t)||new Set;e.forEach((e=>n.add(e))),o.set(t,n)}))})),t}async function f(){null!==t&&a(await m(t.dataSources()))}}function O(e){const{isMobile:t,chartWidget:r,onClose:l,onInitialized:a}=e,{currentSymbol:c,symbolDrawingsMaps:u,removeSymbolDrawings:h,changeSymbol:p,hiddenSymbols:m}=A(r),[f,v]=o.useState(0),[b,y,_]=o.useMemo((()=>{var e;if(null!==c&&null!==u){const t=[];let n=0,o=f;if(null===o)for(o=2;o>0&&!(((null===(e=u[o].get(c))||void 0===e?void 0:e.size)||0)>0);)o--;return u[o].forEach(((e,o)=>{m.includes(o)||(t.push({symbol:o,drawingsCount:e.size,onRemove:()=>function(e){h(e,_)}(o),onClick:()=>function(e){""!==e&&(p(e),null==l||l())}(o)}),n+=e.size)})),t.sort(((e,t)=>e.drawingsCount===t.drawingsCount?e.symbol.localeCompare(t.symbol):e.drawingsCount>t.drawingsCount?-1:1)),[t,n,o]}return[[],0,0]}),[c,f,u,m]);return o.useEffect((()=>{null!==u&&(null==a||a())}),[u]),o.createElement(o.Fragment,null,b.length>0&&o.createElement("div",{className:M.title},`${S=u?u[_].size:0,s.t(null,{plural:"{symbolsCount} symbols",context:"symbols_and_drawings_count",count:S},n(52908)).format({symbolsCount:S.toString()})} ${(e=>s.t(null,{plural:"with {drawingsCount} drawings",context:"symbols_and_drawings_count",count:e},n(42743)).format({drawingsCount:e.toString()
}))(y)}`),0===b.length?null===u?o.createElement(g.Spinner,{className:M.spinner}):o.createElement("div",{className:M.empty},o.createElement(i.Icon,{className:M.image,icon:k}),o.createElement("span",null,R)):b.map((({symbol:e,drawingsCount:n,onRemove:r,onClick:i})=>o.createElement(d.DialogContentItem,{key:e,title:e,subtitle:z(n),removeBtnLabel:j,isActive:e===c,isMobile:t,onClick:i,onClickRemove:r,showFavorite:!1}))));var S}},67165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ObjectTreeDialogRenderer:()=>qo});var o=n(50959),r=n(962);async function i(e,t,n){let o;for(let r=0;r<t;++r)try{return await e(o)}catch(e){o=e,await n(r)}throw o}async function s(e,t){return i(e,t,(()=>Promise.resolve()))}var l=n(59224);const a=(0,l.getLogger)("DataSourcesIcons");let c=null;function u(){const e=n.c[57673];return e?Promise.resolve(e.exports.lineToolsIcons):n.e(1890).then(n.bind(n,57673)).then((e=>e.lineToolsIcons))}function d(){const e=n.c[45876];return e?Promise.resolve(e.exports.SERIES_ICONS):n.e(9685).then(n.bind(n,45876)).then((e=>e.SERIES_ICONS))}let h=null;function g(){return null===h&&(h=function(){const e=s(u,2).then((e=>e)).catch((e=>(a.logWarn(e),{}))),t=s(d,2).then((e=>e)).catch((e=>(a.logWarn(e),{})));return Promise.all([e,t])}()),h.then((e=>(c={linetool:e[0],series:e[1]},c)))}var p=n(41590),m=n(37558),f=n(90692),v=n(44352),b=n(35057),y=n(24437),_=n(23263);var S=n(36349),w=n(32563),C=n(68335),T=n(50151),I=n(97754),E=n.n(I),k=n(9745),M=n(16396),D=n(8087),N=n(37968);const x=o.createContext(null);var L=n(50813),z=n(36296),j=n(74059),R=n(80465),A=n(22813),O=n(51768);function P(e){const{hideTitle:t}=e,{viewModel:r}=(0,T.ensureNotNull)((0,o.useContext)(x)),i=(0,N.useForceUpdate)(),s=r.selection();(0,o.useEffect)((()=>{const e={};return r.onChange().subscribe(e,(()=>i())),()=>{r.onChange().unsubscribeAll(e)}}),[r]),(0,o.useEffect)((()=>{const e={};return s.onChange().subscribe(e,(()=>i())),()=>{s.onChange().unsubscribeAll(e)}}),[s]);const l=!r.canSelectionBeUnmerged(),a=r.isSelectionCopiable(),c=r.isSelectionCloneable(),u=!a&&!c,d=r.canSelectionBeGrouped(),h=!1;return o.createElement(o.Fragment,null,!t&&o.createElement("div",{className:I(A.title,A.withoutIcon)},v.t(null,void 0,n(31095)),h),o.createElement("div",{className:A.buttons},o.createElement(L.ToolWidgetIconButton,{className:I(A.button,!d&&A.disabled),icon:R,onClick:function(){r.createGroupFromSelection()},isDisabled:!d,title:v.t(null,void 0,n(91073)),"data-name":"group-button"}),o.createElement(D.ToolWidgetMenu,{className:I(A.button,u&&A.disabled),isDisabled:u,content:o.createElement(k.Icon,{icon:z}),title:v.t(null,void 0,n(98129)),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&o.createElement(M.PopupMenuItem,{"data-name":"copy",label:v.t(null,void 0,n(35216)),onClick:function(){r.copySelection()}}),c&&o.createElement(M.PopupMenuItem,{"data-name":"clone",label:v.t(null,void 0,n(52977)),onClick:function(){r.cloneSelection()}})),o.createElement(D.ToolWidgetMenu,{className:I(A.button,l&&A.disabled),isDisabled:l,content:o.createElement(k.Icon,{icon:j}),
}))(y)}`),0===b.length?null===u?o.createElement(g.Spinner,{className:M.spinner}):o.createElement("div",{className:M.empty},o.createElement(i.Icon,{className:M.image,icon:k}),o.createElement("span",null,R)):b.map((({symbol:e,drawingsCount:n,onRemove:r,onClick:i})=>o.createElement(d.DialogContentItem,{key:e,title:e,subtitle:z(n),removeBtnLabel:j,isActive:e===c,isMobile:t,onClick:i,onClickRemove:r,showFavorite:!1}))));var S}},67165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ObjectTreeDialogRenderer:()=>Jo});var o=n(50959),r=n(962);async function i(e,t,n){let o;for(let r=0;r<t;++r)try{return await e(o)}catch(e){o=e,await n(r)}throw o}async function s(e,t){return i(e,t,(()=>Promise.resolve()))}var l=n(59224);const a=(0,l.getLogger)("DataSourcesIcons");let c=null;function u(){const e=n.c[57673];return e?Promise.resolve(e.exports.lineToolsIcons):n.e(1890).then(n.bind(n,57673)).then((e=>e.lineToolsIcons))}function d(){const e=n.c[45876];return e?Promise.resolve(e.exports.SERIES_ICONS):n.e(9685).then(n.bind(n,45876)).then((e=>e.SERIES_ICONS))}let h=null;function g(){return null===h&&(h=function(){const e=s(u,2).then((e=>e)).catch((e=>(a.logWarn(e),{}))),t=s(d,2).then((e=>e)).catch((e=>(a.logWarn(e),{})));return Promise.all([e,t])}()),h.then((e=>(c={linetool:e[0],series:e[1]},c)))}var p=n(41590),m=n(37558),f=n(90692),v=n(44352),b=n(35057),y=n(24437),_=n(23263);var S=n(36349),w=n(32563),C=n(68335),T=n(50151),I=n(97754),E=n.n(I),k=n(9745),M=n(16396),D=n(8087),N=n(37968);const x=o.createContext(null);var L=n(50813),z=n(36296),j=n(74059),R=n(80465),A=n(22813),O=n(51768);function P(e){const{hideTitle:t}=e,{viewModel:r}=(0,T.ensureNotNull)((0,o.useContext)(x)),i=(0,N.useForceUpdate)(),s=r.selection();(0,o.useEffect)((()=>{const e={};return r.onChange().subscribe(e,(()=>i())),()=>{r.onChange().unsubscribeAll(e)}}),[r]),(0,o.useEffect)((()=>{const e={};return s.onChange().subscribe(e,(()=>i())),()=>{s.onChange().unsubscribeAll(e)}}),[s]);const l=!r.canSelectionBeUnmerged(),a=r.isSelectionCopiable(),c=r.isSelectionCloneable(),u=!a&&!c,d=r.canSelectionBeGrouped(),h=!1;return o.createElement(o.Fragment,null,!t&&o.createElement("div",{className:I(A.title,A.withoutIcon)},v.t(null,void 0,n(31095)),h),o.createElement("div",{className:A.buttons},o.createElement(L.ToolWidgetIconButton,{className:I(A.button,!d&&A.disabled),icon:R,onClick:function(){r.createGroupFromSelection()},isDisabled:!d,title:v.t(null,void 0,n(91073)),"data-name":"group-button"}),o.createElement(D.ToolWidgetMenu,{className:I(A.button,u&&A.disabled),isDisabled:u,content:o.createElement(k.Icon,{icon:z}),title:v.t(null,void 0,n(98129)),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&o.createElement(M.PopupMenuItem,{"data-name":"copy",label:v.t(null,void 0,n(35216)),onClick:function(){r.copySelection()}}),c&&o.createElement(M.PopupMenuItem,{"data-name":"clone",label:v.t(null,void 0,n(52977)),onClick:function(){r.cloneSelection()}})),o.createElement(D.ToolWidgetMenu,{className:I(A.button,l&&A.disabled),isDisabled:l,content:o.createElement(k.Icon,{icon:j}),
title:v.t(null,void 0,n(45828)),arrow:!1,isShowTooltip:!0,"data-name":"move-to-button"},o.createElement(M.PopupMenuItem,{"data-name":"new-pane-above",label:v.t(null,void 0,n(40887)),onClick:function(){r.unmergeSelectionUp()}}),o.createElement(M.PopupMenuItem,{"data-name":"new-pane-below",label:v.t(null,void 0,n(96712)),onClick:function(){r.unmergeSelectionDown()}})),t&&o.createElement(o.Fragment,null,o.createElement("div",{className:A.spacing}),o.createElement(L.ToolWidgetIconButton,{className:A.button,icon:manageDrawingsIcon,title:v.t(null,void 0,n(72357)),"data-name":"manage-drawings-button",onClick:g}))));function g(){h}}var B=n(54773),F=n(86942),W=n(10170),H=n(7809),V=n(23642);const G=(U="OBJECT_TREE",e=>U+"__"+e);var U;const Z=G("SET_NODES"),K=G("SYNC_NODES"),Y=G("UPDATE_NODE"),$=G("UPDATE_NODES"),q=G("RESET_TREE"),J=G("SET_SELECTED_IDS"),Q=G("DROP_SELECTION"),X=G("SELECT_PREVIOUS"),ee=G("SELECT_NEXT"),te=G("MULTI_SELECT_PREVIOUS"),ne=G("MULTI_SELECT_NEXT"),oe=G("PROCESS_DROP_TARGET"),re=G("UPDATE_DROP_TARGET"),ie=G("HIDE_DROP_TARGET"),se=G("START_MULTI_SELECT"),le=G("STOP_MULTI_SELECT"),ae=(G("REMOVE_NODE"),G("SET_FOCUSED_NODE")),ce=G("SCROLL_TO_ID"),ue=G("SET_IS_SELECTED"),de=G("SET_IS_EXPANDED"),he=G("SET_DISABLED_NODES"),ge=G("MOVE_NODES"),pe=(G("START_DRAG"),G("END_DRAG")),me=()=>({type:X}),fe=()=>({type:ee}),ve=()=>({type:te}),be=()=>({type:ne}),ye=(e,t,n,o,r)=>({type:oe,dropTarget:e,dropType:t,isHoveredLeft:n,boundBox:o,isLastChild:r}),_e=()=>({type:Q}),Se=e=>({type:J,ids:e}),we=(e,t,n)=>({type:ge,ids:e,targetId:t,dropType:n}),Ce=()=>({type:se}),Te=()=>({type:le}),Ie=e=>({type:ae,nodeId:e}),Ee=e=>({type:ce,nodeId:e}),ke=(e,t,n=0)=>({type:ue,nodeId:e,isSelected:t,mode:n}),Me=(e,t)=>({type:de,nodeId:e,isExpanded:t}),De=e=>({type:he,ids:e}),Ne=()=>({type:pe});var xe=n(77145);const Le=e=>e.nodes,ze=e=>e.selection,je=e=>e.dropTarget,Re=e=>e.expanded,Ae=e=>e.scrollToId,Oe=(e,t)=>t,Pe=(0,xe.createSelector)([Le,Oe],((e,t)=>e[t])),Be=(0,xe.createSelector)([ze,Oe],((e,t)=>e.ids.includes(t))),Fe=(0,xe.createSelector)([Re,Oe],((e,t)=>e.includes(t))),We=(0,xe.createSelector)([e=>e.disabled,ze,Oe],((e,t,n)=>!t.ids.includes(n)&&e.includes(n))),He=(0,xe.createSelector)(Le,(e=>Object.keys(e))),Ve=(0,xe.createSelector)(ze,(({ids:e})=>e)),Ge=(0,xe.createSelector)(ze,(({lastFocusedNodeId:e})=>e)),Ue=(0,xe.createSelector)(ze,(({isMultiSelecting:e})=>e)),Ze=(0,xe.createSelector)([Le,Ve],((e,t)=>t.map((t=>e[t])))),Ke=(0,xe.createSelector)(Le,(e=>Object.values(e).filter((e=>0===e.level)))),Ye=(0,xe.createSelector)([Le,Ke],((e,t)=>t.reduce(((t,n)=>[...t,...$e(e,(0,T.ensureDefined)(n))]),[])));function $e(e,t){const n=[];for(const o of t.children)n.push(e[o]),n.push(...$e(e,e[o]));return n}const qe=(0,xe.createSelector)([Le,Ke,Re],((e,t,n)=>{const o=new Set(n);return t.reduce(((t,n)=>[...t,...Qe(e,(0,T.ensureDefined)(n),o)]),[])})),Je=(0,xe.createSelector)([Le,Ve,Re],((e,t,n)=>{const o=new Set(n);return[{id:"drag-list",level:-1,children:t}].reduce(((t,n)=>[...t,...Qe(e,(0,T.ensureDefined)(n),o)]),[])}));function Qe(e,t,n){
const o=[];for(const r of t.children){const t=e[r];void 0!==t&&(o.push(t),n.has(r)&&o.push(...Qe(e,t,n)))}return o}function*Xe(e){const{selectedIds:t,nodes:n}=yield(0,S.call)(e),o={};for(let e=0;e<n.length;++e){const t=n[e];o[t.id]=t}yield(0,S.put)((e=>({type:Z,nodes:e}))(o)),yield(0,S.put)(Se(t));!Ge(yield(0,S.select)())&&t.length>0&&(yield(0,S.put)(Ie(t[0])),yield(0,S.put)(Ee(t[0])))}function*et(e){for(;;){if((yield(0,S.take)([se,le])).type===se){const t=He(yield(0,S.select)()).filter((t=>!e(t)));yield(0,S.put)(De(t))}else yield(0,S.put)(De([]))}}function*tt(){for(;;){const{type:e}=yield(0,S.take)([ne,te]),t=yield(0,S.select)(),n=Ye(t),o=n.length,r=Ge(t),i=[...Ve(t)],s=1===i.length&&i[0]!==r,l=n.findIndex((e=>e.id===(s?i[0]:r)));if(e===te&&0===l||e===ne&&l===o-1)continue;const a=at(t,e===ne?"next":"previous",n,l),{id:c}=a;i.includes(c)&&r?(yield(0,S.put)(ke(r,!1,1)),yield(0,S.put)(Ie(c))):yield(0,S.put)(ke(c,!0,1)),yield(0,S.put)(Ee(c))}}function*nt(e,t){for(;;){const{type:n}=yield(0,S.take)([ee,X]),o=yield(0,S.select)(),r=Ye(o),i=Ze(o),s=Ge(o);if(1===i.length&&i[0].id!==s&&!s){if(n===ee){yield(0,S.put)(Ie(i[0].id));continue}if(n===X){const e=r.findIndex((e=>e.id===i[0].id)),t=at(o,"previous",r,e);yield(0,S.put)(Ie(t.id));continue}}const l=r.findIndex((e=>e.id===s)),a=n===ee?"next":"previous",c=at(o,a,r,l),{id:u}=c;e?e([u],a):yield(0,S.put)(Se([u])),t&&t(u),yield(0,S.put)(Ie(u))}}function*ot(e,t=(()=>!0)){for(;;){const{mode:n,nodeId:o,isSelected:r}=yield(0,S.take)(ue);let i=[...Ve(yield(0,S.select)())];const s=Ye(yield(0,S.select)());if(1===n)r?i.push(o):i.splice(i.indexOf(o),1);else if(2===n&&i.length>0){const e=Ge(yield(0,S.select)());let n=s.findIndex((t=>t.id===e));-1===n&&(n=s.reduce(((e,t,n)=>i.includes(t.id)?n:e),-1));const r=s.findIndex((e=>e.id===o));if(n!==r)for(let e=Math.min(n,r);e<=Math.max(n,r);e++){const n=s[e].id;!i.includes(n)&&t(n)&&i.push(n)}}else i=o?[o]:[];const l=new Set(i);i=s.reduce(((e,t)=>(l.has(t.id)&&e.push(t.id),e)),[]),e?e(i):yield(0,S.put)(Se(i)),yield(0,S.put)(Ie(o))}}function*rt(e=(()=>!0),t){const{dropTarget:n,dropType:o,isHoveredLeft:r,boundBox:i,isLastChild:s}=t,l=je(yield(0,S.select)()),a=Pe(yield(0,S.select)(),(0,T.ensureDefined)(n.parentId)),c=s&&"after"===o,u=Ze(yield(0,S.select)()),d=!c||!r&&e(u,n,o)?n:a,h=l.node&&l.node.id!==d.id||l.dropType!==o;u.map((e=>e.id)).includes(d.id)?yield(0,S.put)({type:ie}):h&&e(u,d,o)&&(yield(0,S.put)(((e,t,n)=>({type:re,node:e,dropType:t,boundBox:n}))(d,o,i)))}function*it(e){yield(0,S.throttle)(0,oe,rt,e)}function*st(e){for(;;){yield(0,S.take)(Q);const t=Ze(yield(0,S.select)()),{node:n,dropType:o}=je(yield(0,S.select)());if(n&&o){const r=new CustomEvent("tree-node-drop",{detail:{nodes:t,target:n.id,type:o}});if(e&&e(r),!r.defaultPrevented){const e=Ve(yield(0,S.select)());yield(0,S.put)(we(e,n.id,o))}}}}function*lt(e){for(;;){yield(0,S.take)(ge);e(Le(yield(0,S.select)()))}}function at(e,t,n,o){const r=n.length;let i;-1===o&&"previous"===t&&(o=r);let s=0;for(;!i||Math.abs(s)<r&&((l=i).level>1&&!Fe(e,(0,
T.ensureDefined)(l.parentId)));)s+="next"===t?1:-1,i=n[(o+s+r)%r];var l;return i}function*ct(e={}){const{saga:t,onDrop:n,canMove:o,onMove:r,onSelect:i,onKeyboardSelect:s,initState:l,canBeAddedToSelection:a}=e,c=[(0,S.fork)(it,o),(0,S.fork)(st,n),(0,S.fork)(ot,i,a),(0,S.fork)(nt,i,s),(0,S.fork)(tt)];for(t&&c.push((0,S.fork)(t)),r&&c.push((0,S.fork)(lt,r)),a&&c.push((0,S.fork)(et,a));;){l&&(yield(0,S.call)(Xe,l));const e=yield(0,S.all)(c);yield(0,S.take)(q);for(const t of e)yield(0,S.cancel)(t)}}var ut=n(91622),dt=n(1722);const ht=(0,l.getLogger)("Platform.GUI.ObjectTree.CallApi");const gt={ids:[],lastFocusedNodeId:void 0,isMultiSelecting:!1};const pt={node:void 0,dropType:void 0,boundBox:void 0};const mt=(0,ut.combineReducers)({nodes:function(e={},t){switch(t.type){case Z:return t.nodes;case K:{const{nodes:n}=t,o=n.map((e=>e.id)),r={...e};for(const t of Object.keys(e))if(!o.includes(t)){const{parentId:e}=r[t];e&&(r[e]={...r[e],children:r[e].children.filter((e=>e!==t))}),delete r[t]}for(const e of n){const t=e.id;if(r.hasOwnProperty(t)){!(0,dt.deepEquals)(r[t].children,e.children)[0]&&(r[t]={...r[t],children:[...e.children]})}else{r[t]=e;const{parentId:n}=e;if(n&&!r[n].children.includes(t))throw new Error("Not implemented")}}return r}case Y:{const{type:n,nodeId:o,...r}=t;return{...e,[o]:{...e[o],...r}}}case $:{const{nodes:n}=t,o={...e};return Object.keys(n).forEach((e=>{o[e]={...o[e],...n[e]}})),{...e,...o}}case ge:{const{ids:n,targetId:o,dropType:r}=t,i=(0,T.ensureDefined)(e[o].parentId),s=e[i],l={};for(const t of n){const n=e[t];if(n.parentId){const o=l[n.parentId]||e[n.parentId];l[n.parentId]={...o,children:o.children.filter((e=>e!==t))}}l[t]={...n,parentId:i,level:s.level+1}}const a=s.children.filter((e=>!n.includes(e)));return a.splice(((e,t,n)=>{switch(n){case"before":return e.indexOf((0,T.ensureDefined)(t));case"inside":return e.length;case"after":return e.indexOf((0,T.ensureDefined)(t))+1;default:return 0}})(a,o,r),0,...n),l[i]={...e[i],children:a,isExpanded:!0},{...e,...l}}default:return e}},selection:function(e=gt,t){switch(t.type){case J:{const{ids:n}=t;return{...e,ids:n,lastFocusedNodeId:n.length>0?e.lastFocusedNodeId:void 0}}case se:return{...e,isMultiSelecting:!0};case le:return{...e,isMultiSelecting:!1};case ae:return{...e,lastFocusedNodeId:t.nodeId};case K:{const n=new Set(t.nodes.map((e=>e.id)));return e.lastFocusedNodeId&&!n.has(e.lastFocusedNodeId)&&delete e.lastFocusedNodeId,{...e,ids:e.ids.filter((e=>n.has(e)))}}default:return e}},dropTarget:function(e=pt,t){switch(t.type){case re:{const{node:n,dropType:o,boundBox:r}=t;return{...e,node:n,dropType:o,boundBox:r}}case ie:case pe:case q:return{...pt};default:return e}},expanded:function(e=[],t){if(t.type===de){const{nodeId:n,isExpanded:o}=t;if(o)return[...e,n];const r=[...e];return r.splice(e.indexOf(n),1),r}return e},disabled:function(e=[],t){return t.type===he?[...t.ids]:e},scrollToId:function(e=null,t){return t.type===ce?null===t.nodeId?null:{id:t.nodeId}:e}});var ft=n(40933),vt=n(20037),bt=n(49483)
@@ -17,16 +17,16 @@ document.removeEventListener("mousemove",t)}}),[l]),function(e){(0,o.useEffect)(
}),o.createElement("div",{className:wn.space,onClick:function(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element)||null===l.current)return;e.target===l.current&&t.selection().set([])},ref:c},null!==u&&o.createElement(cn,{key:a,height:u.height,width:u.width,canBeAddedToSelection:function(e){const n=t.entity(e);return t.selection().canBeAddedToSelection(n)},nodeRenderer:r,initState:function(){const{nodes:e,selection:n}=t.getState();return{selectedIds:n,nodes:e}},canMove:function(e,n,o){return t.isSelectionDropable(n.id,o)},drag:Cn,rowHeight:In,onSelect:function(e){const n=e.map((e=>t.entity(e))).filter((e=>null!==e));t.selection().set(n)},onDrop:function(e){e.preventDefault();const{detail:{target:n,type:o}}=e;t.insertSelection(n,o)},scrollToId:d,saga:function*(){yield(0,S.fork)(bn,t)},onKeyboardSelect:function(e){h({id:e})},outerRef:function(e){l.current=e},onKeyDown:function(e){if(13===(0,C.hashFromEvent)(e)){e.preventDefault();const n=t.selection().selected(),o=n.length>0?t.entity(n[0]):void 0;o&&t.openProperties(o)}},autofocus:i})))))}function In(e,t){switch(t.type){case"node":return 38;case"separator":return 13}}var En,kn=n(14483);!function(e){e.Svg="svg"}(En||(En={}));var Mn=n(31261),Dn=n(86928);function Nn(e){const{className:t,disabled:n,...r}=e;return o.createElement(k.Icon,{className:E()(Dn.button,n&&Dn.disabled,t),...r})}var xn=n(77975);const Ln=v.t(null,void 0,n(91073)),zn=v.t(null,void 0,n(35038)),jn=v.t(null,void 0,n(15101)),Rn=v.t(null,void 0,n(42284)),An=v.t(null,void 0,n(31971)),On=v.t(null,void 0,n(81428)),Pn=v.t(null,void 0,n(34596));var Bn=n(14787),Fn=n(33765),Wn=n(52870),Hn=n(49756),Vn=n(94007),Gn=n(62766),Un=n(87769);function Zn(e){const{id:t}=e,n=(0,o.useContext)(x),{viewModel:r}=(0,T.ensureNotNull)(n),i=r.entity(t);return null===i?null:o.createElement(Kn,{...e,entity:i})}function Kn(e){const{id:t,isOffset:r,isDisabled:i,isSelected:s,isChildOfSelected:l,isHovered:a,parentId:c,entity:u,isExpanded:d}=e,h=(0,o.useContext)(x),{viewModel:g}=(0,T.ensureNotNull)(h),p=(0,o.useContext)(yn),{size:m}=(0,o.useContext)(Ct),[f,b]=(0,o.useState)(!1),y=(0,o.useRef)(null),[_,S]=(0,o.useState)(u.title()),[w,E]=(0,o.useState)(u.getIcon()),[M,D]=(0,o.useState)(u.isLocked()),[N,L]=(0,o.useState)(u.isVisible()),[z,j]=(0,o.useState)(u.isActualInterval()),[R,A]=(0,o.useState)(u.getDrawingSyncState()),[O,P]=(0,o.useState)(!1),[B,F]=((0,xn.useWatchedValueReadonly)({watchedValue:g.getChartLayout()}),(0,o.useState)(!1)),W=(0,o.useRef)(null);(0,o.useEffect)((()=>{const e={};u.onLockChanged().subscribe(e,(()=>D(u.isLocked()))),u.onVisibilityChanged().subscribe(e,(()=>L(u.isVisible())));const t=u.onTitleChanged();t&&t.subscribe(e,(()=>S(u.title()))),u.onIsActualIntervalChange().subscribe(e,(()=>j(u.isActualInterval()))),u.onSyncStateChanged().subscribe(e,(()=>A(u.getDrawingSyncState())));const n=u.onIconChanged?u.onIconChanged():void 0;return n&&n.subscribe(e,(()=>E(u.getIcon()))),()=>{u.onIsActualIntervalChange().unsubscribeAll(e),u.onLockChanged().unsubscribeAll(e),u.onVisibilityChanged().unsubscribeAll(e),
u.onSyncStateChanged().unsubscribeAll(e),t&&t.unsubscribeAll(e),W.current&&clearTimeout(W.current),n&&n.unsubscribeAll(e)}}),[u]),(0,o.useEffect)((()=>{f&&y.current&&(y.current.focus(),y.current.setSelectionRange(0,_.length))}),[f]),(0,o.useEffect)((()=>{const e={};return g.hoveredObjectChanged().subscribe(e,X),()=>{g.hoveredObjectChanged().unsubscribeAll(e)}}),[d]),(0,o.useEffect)((()=>{g.setHoveredObject(a?t:null)}),[a]),(0,o.useEffect)((()=>{!s&&W.current&&(clearTimeout(W.current),W.current=null),b(!1)}),[s]);const H={};if(c){const e=g.entity(c);e&&(H["data-parent-name"]=e.title()),H["data-type"]=u.hasChildren()?"group":"data-source"}const V=kn.enabled("test_show_object_tree_debug")?`<${u.id()}> (${u.zOrder()}) ${u.title()}`:u.title(),G=a||O,U=f&&s,Z=!!p&&p.isTouch,K=!!p&&p.isDialog,Y=z&&N?Vn:Gn,$=u.hasChildren()?v.t(null,void 0,n(38207)):v.t(null,void 0,n(39781));let q=null;return w&&w.type===En.Svg&&(q=o.createElement(k.Icon,{icon:w.content||"",className:Un.icon})),o.createElement("span",{className:I(Un.wrap,i&&Un.disabled,s&&Un.selected,r&&Un.offset,l&&Un.childOfSelected,O&&!i&&!s&&!l&&Un.hover,K&&!i&&!s&&!l&&Un.dialog),onMouseDown:function(e){f&&!(0,T.ensureNotNull)(y.current).contains(e.target)&&F(!0)},onClick:1===m?J:function(e){if(e.defaultPrevented)return;if(0!==(0,C.modifiersFromEvent)(e))return;if(W.current)e.preventDefault(),clearTimeout(W.current),W.current=null,g.openProperties(u),F(!1);else{const e=g.selection().selected();W.current=setTimeout((()=>{W.current=null,s&&!B&&1===e.length&&g.rename(u,(()=>b(!0))),F(!1)}),500)}},onContextMenu:Z?void 0:J},!U&&o.createElement(o.Fragment,null,q,!1,o.createElement("span",{className:I(Un.title,g.isMain(u)&&Un.main,(!u.isVisible()||!z)&&Un.disabled),...H},V),o.createElement("span",{className:Un.rightButtons},u.canBeLocked()&&o.createElement(Nn,{title:M?jn:Rn,icon:M?Wn:Hn,className:I(Un.button,(G||M)&&Un.visible,"apply-common-tooltip"),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),g.setIsLocked(t,!u.isLocked())},"data-role":"button","data-name":"lock","data-active":M}),o.createElement(Nn,{icon:Y,className:I(Un.button,!z&&Un.warn,(G||!N||!z)&&Un.visible,"apply-common-tooltip"),onClick:z?function(e){if(e.defaultPrevented)return;e.preventDefault(),g.setIsVisible(t,!u.isVisible())}:function(e){if(e.defaultPrevented)return;e.preventDefault(),g.openProperties(u,Bn.TabNames.visibility)},title:function(){if(!z)return $;return N?An:On}(),"data-role":"button","data-name":"hide","data-active":!N}),u.canBeRemoved()&&o.createElement(Nn,{title:Pn,icon:Fn,className:I(Un.button,(Z||G)&&Un.visible,"apply-common-tooltip"),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),g.remove(t)},"data-role":"button","data-name":"remove"}))),U&&o.createElement(Mn.InputControl,{value:_,onChange:function(e){S(e.currentTarget.value)},onClick:_n.preventDefault,className:Un.renameInput,onKeyDown:function(e){27===(0,C.hashFromEvent)(e)?(e.preventDefault(),S(u.title()),b(!1)):13===(0,C.hashFromEvent)(e)&&(e.preventDefault(),Q())},
reference:function(e){y.current=e},onBlur:Q,onDragStart:function(e){e.preventDefault(),e.stopPropagation()},draggable:!0,stretch:!0}));function J(e){e.defaultPrevented||f||!u.fullyConstructed()||(e.preventDefault(),e.persist(),g.openContextMenu(u,(()=>b(!0)),e))}function Q(){""!==_&&u.setName(_),S(u.title()),b(!1)}function X(e){if(u.hasChildren()&&!d){const t=null!==e&&u.childrenIds().has(e);P(t)}else P(t===e)}}var Yn=n(17742);class $n extends o.PureComponent{constructor(e){super(e),this._isMounted=!1,this._dialogRef=o.createRef(),this._renderChildren=e=>o.createElement(qn,{isSmallTablet:e,viewModel:this.props.viewModel}),this._handleMediaChange=()=>{this.state.showDrawer&&!window.matchMedia(y.DialogBreakpoints.TabletSmall).matches&&this.setState({showDrawer:!1})},this._onManageDrawings=e=>{throw new Error("not supported")},this._closeDrawer=()=>{this.setState({showDrawer:!1})},this._handleContextMenuOpened=e=>{this.setState({isContextMenuOpened:e})},this._matchMedia=window.matchMedia(y.DialogBreakpoints.TabletSmall),this.state={showDrawer:!1,showDialog:!1,isContextMenuOpened:!1}}componentDidMount(){this._isMounted=!0,this._matchMedia.addListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().subscribe(this._handleContextMenuOpened)}componentWillUnmount(){this._isMounted=!1,this._matchMedia.removeListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().unsubscribe(this._handleContextMenuOpened)}render(){return o.createElement(o.Fragment,null,o.createElement(f.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(e=>o.createElement(b.AdaptivePopupDialog,{additionalElementPos:"after",additionalHeaderElement:!1,className:Yn.dialog,dataName:"object-tree-dialog",isOpened:!0,onClickOutside:this.state.showDialog||e||this.state.isContextMenuOpened?()=>{}:this.props.onClose,onClose:this.props.onClose,ref:this._dialogRef,render:()=>this._renderChildren(e),title:v.t(null,void 0,n(31095)),showSeparator:!0}))),o.createElement(m.DrawerManager,null,this.state.showDrawer&&o.createElement(p.Drawer,{onClose:this._closeDrawer,position:"Bottom"},o.createElement(_.ManageDrawings,{onClose:this._closeDrawer,chartWidget:this.props.activeChartWidget,isMobile:!0}))))}}function qn(e){const{isSmallTablet:t,viewModel:n}=e,r=(0,o.useMemo)((()=>({size:t?1:0,smallSizeTreeNodeAction:0})),[t]);return o.createElement(Ct.Provider,{value:r},o.createElement(Tn,{nodeRenderer:Zn,showHeader:!1,viewModel:n,isDialog:!0}))}var Jn=n(16216),Qn=n(98310),Xn=n(57898);var eo=n(32112);function to(e,t){return`${e}:${t}`}function no(e){const t=e.split(":");return{persistentId:t[0],instanceId:t[1]}}class oo{constructor(e){this._onChange=new Xn.Delegate,this._recalculate=()=>{const e=this._groupModel.groups().map((e=>to(e.id,e.instanceId()))),t=this._selectionApi.allSources();this._selected=this._selected.filter((n=>e.includes(n)||t.includes(n))),this._onChange.fire(this._selected)},this._model=e,this._selectionApi=new eo.SelectionApi(this._model),this._groupModel=this._model.lineToolsGroupModel(),
this._selected=this._getSelectedIds(),this._selectionApi.onChanged().subscribe(this,(()=>{this._selected=this._getSelectedIds(),this._onChange.fire(this._selected)})),this._groupModel.onChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map((e=>e.id()));for(const o of e)if(o.hasChildren()){const e=o.childrenIds();t.push(...Array.from(e.values())),n=n.filter((t=>!e.has(t)))}else t.push(o.id());this._selectionApi.set(t.map((e=>no(e).persistentId))),this._selected=n,this._onChange.fire(this._selected)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange}selected(){return this._selected}_getSelectedIds(){return this._selectionApi.allSources().map((e=>this._model.dataSourceForId(e))).filter(dt.notNull).filter((e=>e.showInObjectTree())).map((e=>to(e.id(),e.instanceId())))}}class ro{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().all().filter((e=>e.showInObjectTree()));e[t.id()]=io(t.id(),0);for(const n of this._groupModel.groups()){const o=to(n.id,n.instanceId()),r=(0,T.ensureNotNull)(this._facade.getObjectById(o));if(r.pane()===t){const o=[...n.lineTools()].sort(((e,t)=>e.zorder()>t.zorder()?-1:1)).map((e=>to(e.id(),e.instanceId())));e[r.id()]=io(r.id(),1,t.id(),o),e[t.id()].children.push(r.id());for(const t of o)e[t]=io(t,2,r.id())}}for(const o of n){const n=to(o.id(),o.instanceId());e[n]||(e[n]=io(n,1,t.id()),e[t.id()].children.push(n))}e[t.id()].children.sort(((e,t)=>{const n=(0,T.ensureNotNull)(this._facade.getObjectById(e)),o=(0,T.ensureNotNull)(this._facade.getObjectById(t));return(0,T.ensureNotNull)(o.zOrder())-(0,T.ensureNotNull)(n.zOrder())}))}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function io(e,t,n,o=[]){return{id:e,level:t,parentId:n,children:o}}var so=n(36298),lo=n(92249),ao=n(28853),co=n(14292),uo=n(76544),ho=n(73212),go=n(88348),po=n(37591),mo=n(7295),fo=n(28824),vo=n(57674);const bo=new so.TranslatedString("show {title}",v.t(null,void 0,n(87358))),yo=new so.TranslatedString("hide {title}",v.t(null,void 0,n(70301))),_o=new so.TranslatedString("lock {title}",v.t(null,void 0,n(50193))),So=new so.TranslatedString("unlock {title}",v.t(null,void 0,n(92421))),wo=new so.TranslatedString("change {sourceTitle} title to {newSourceTitle}",v.t(null,void 0,n(40001))),Co=new so.TranslatedString("insert source(s) after",v.t(null,void 0,n(8343)));function To(e,t){return t.every((t=>!(t.pane()!==e&&!t.allowsMovingbetweenPanes())))}function Io(e){return e instanceof co.DataSource&&e.showInObjectTree()?to(e.id(),e.instanceId()):null}function Eo(e){return new so.TranslatedString(e.name(),e.title(po.TitleDisplayTarget.DataWindow))}const ko=new Xn.Delegate;class Mo{constructor(e,t){this._syncStateChanged=new Xn.Delegate,this._updateSyncState=()=>{this._syncStateChanged.fire((0,
T.ensureNotNull)(this.getDrawingSyncState()))},this._undoModel=e,this._dataSource=t,(0,lo.isLineTool)(this._dataSource)&&(this._dataSource.linkKey().subscribe(this._updateSyncState),this._dataSource.sharingMode().subscribe(this._updateSyncState));const n=this._undoModel.lineBeingCreated();null!==n&&n===t&&n.isSynchronizable()&&go.isToolCreatingNow.subscribe(this._updateSyncState)}destroy(){(0,lo.isLineTool)(this._dataSource)&&(this._dataSource.linkKey().unsubscribe(this._updateSyncState),this._dataSource.sharingMode().unsubscribe(this._updateSyncState)),go.isToolCreatingNow.unsubscribe(this._updateSyncState)}id(){return to(this._dataSource.id(),this._dataSource.instanceId())}title(){const e=this._dataSource;return(0,lo.isLineTool)(e)?e.properties().title.value()||e.translatedType():(0,uo.isSeries)(e)&&this._undoModel.mainSeries()===e?e.symbolTitle(po.TitleDisplayTarget.DataWindow,void 0,void 0,(0,bt.onWidget)()?"exchange":"listed_exchange"):e.title(po.TitleDisplayTarget.DataWindow)}gaLabel(){return(0,ao.isStudy)(this._dataSource)?"Study":(0,lo.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return(0,lo.isLineTool)(this._dataSource)}fullyConstructed(){return this._undoModel.lineBeingCreated()!==this._dataSource}isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!(0,lo.isLineTool)(this._dataSource)&&!(0,ao.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){return(0,lo.isLineTool)(this._dataSource)||(0,ao.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():ko}isLocked(){return!!(0,lo.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return(0,lo.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():ko}getIcon(){const e=c,t=this._dataSource.getSourceIcon(),n=(0,ao.isStudyStrategy)(this._dataSource);let o={type:En.Svg,content:n?mo:fo};if(e&&t)if("loadSvg"===t.type){const[n,r]=t.svgId.split("."),i="linetool"===n?e.linetool[r]:e.series[Number(r)];o={type:En.Svg,content:i||fo}}else"svgContent"===t.type&&(o={type:En.Svg,content:t.content});return o}onIconChanged(){if(this._dataSource.onSourceIconChanged)return this._dataSource.onSourceIconChanged()}setVisible(e){const t=(e?bo:yo).format({title:Eo(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().visible,e,t)}setLocked(e){if((0,lo.isLineTool)(this._dataSource)){const t=(e?_o:So).format({title:Eo(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t)}}setName(e){if((0,lo.isLineTool)(this._dataSource)){const t=wo.format({sourceTitle:this._dataSource.properties().title.value()||Eo(this._dataSource),newSourceTitle:e})
;this._undoModel.setProperty(this._dataSource.properties().title,e,t,!0)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{e.addSourceToSelection(this._dataSource)}))}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,(e=>this._undoModel.insertBefore(e,this._dataSource)))}insertSourcesAfterThis(e){this._insertSources(e,(e=>this._undoModel.insertAfter(e,this._dataSource)))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return(0,T.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}allowsMovingbetweenPanes(){return!(0,lo.isLineTool)(this._dataSource)}canBeAddedToGroup(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.boundToSymbol()}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}detachFromParent(){if((0,lo.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}onTitleChanged(){const e=this._dataSource.properties().title;return e?e.listeners():void 0}canBeSyncedInLayout(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout()||!this.fullyConstructed())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.shareLineTools([t],1)}}getDrawingSyncState(){return this.canBeSyncedInLayout()?this.fullyConstructed()&&null!==this._dataSource.linkKey().value()?1:0:null}doNotAffectChartInvalidation(){return(0,lo.isLineTool)(this._dataSource)}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!To(this.pane(),e))return!1;if((0,lo.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some((e=>!e.canBeAddedToGroup())))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),o=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro(Co);const r=()=>{e.forEach((e=>e.detachFromParent()))},i=e.reduce(((e,t)=>t.addSourcesToArray(e)),[]);if((0,lo.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?((0,T.assert)(!e.some((e=>e.hasChildren()))),i.forEach((e=>{(0,lo.isLineTool)(e)&&(t.containsLineTool(e)||o.addLineToolToGroup(t,e))}))):r()}else r();t(i),this._undoModel.endUndoMacro()}}
class Do{constructor(e,t){this._onTitleChanged=new Xn.Delegate,this._onVisibilityChanged=new Xn.Delegate,this._onLockChanged=new Xn.Delegate,this._onIsActualIntervalChanged=new Xn.Delegate,this._syncStateChanged=new Xn.Delegate,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._paneId=(0,T.ensureNotNull)(e.model().paneForSource(this._lineTools[0])).id();const n=()=>{this._lineTools.forEach((e=>{e.properties().visible.listeners().subscribe(this,(()=>this._onVisibilityChanged.fire())),e.properties().frozen.listeners().subscribe(this,(()=>this._onLockChanged.fire())),e.onIsActualIntervalChange().subscribe(this,(()=>this._onIsActualIntervalChanged.fire())),e.linkKey().subscribe(this._linkKeyChangedBound),e.sharingMode().subscribe(this._linkKeyChangedBound)}))};this._group.onChanged().subscribe(this,(e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.titleChanged&&this._onTitleChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire();const t=this.getDrawingSyncState();null!==t&&this._syncStateChanged.fire(t)})),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return to(this._group.id,this._group.instanceId())}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:En.Svg,content:vo}}canBeRemoved(){return!0}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}fullyConstructed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some((e=>e.isActualInterval()))),this._lastIsActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onTitleChanged(){return this._onTitleChanged}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every((t=>e.selection().canBeAddedToSelection(t)))}
setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,(e=>this._undoModel.insertBefore(e,t)))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,(e=>this._undoModel.insertAfter(e,t)))}childrenIds(){const e=[...this._lineTools];return e.sort(((e,t)=>t.zorder()-e.zorder())),new Set(e.map((e=>to(e.id(),e.instanceId()))))}hasChildren(){return!0}pane(){return(0,T.ensureDefined)(this._undoModel.model().panes().find((e=>e.id()===this._paneId)))}allowsMovingbetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._lineTools.length>0&&this._lineTools[0].isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(this.canBeSyncedInLayout())switch(e){case 0:const e=this._lineTools.filter((e=>null!==e.linkKey().value()));e.length>0&&this._undoModel.unlinkLines(e);break;case 1:const t=this._lineTools.filter((e=>null===e.linkKey().value()));t.length>0&&this._undoModel.shareLineTools(t,1)}}getDrawingSyncState(){return this.canBeSyncedInLayout()?this._lineTools.every((e=>null!==e.linkKey().value()))?1:0:null}doNotAffectChartInvalidation(){return!0}_linkKeyChanged(){this._syncStateChanged.fire((0,T.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return To(this.pane(),e)}_insertSources(e,t){this._undoModel.beginUndoMacro(Co);const n=e.reduce(((e,t)=>t.addSourcesToArray(e)),[]);e.forEach((e=>e.detachFromParent())),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){return(0,T.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()<t.zorder()?e:t),null))}_insertAfterTarget(){return(0,T.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()>t.zorder()?e:t),null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach((e=>{e.properties().visible.listeners().unsubscribeAll(this),e.properties().frozen.listeners().unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this),e.linkKey().unsubscribe(this._linkKeyChangedBound),e.sharingMode().unsubscribe(this._linkKeyChangedBound)}))}}class No{constructor(e){this._hoveredObjectChanged=new Xn.Delegate,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())null==e||e.destroy();this._undoModel.model().hoveredSourceChanged().unsubscribe(this,this._onModelHoveredSourceChanged)}getObjectById(e){if(this._entitiesCache.has(e))return(0,T.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e)
;return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach((t=>{var n;e.has(t)||(null===(n=this._entitiesCache.get(t))||void 0===n||n.destroy(),this._entitiesCache.delete(t))}))}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach((e=>e.addSourcesToArray(t))),t.some((e=>!(0,lo.isLineTool)(e)||!e.boundToSymbol())))return!1;const n=this._undoModel.model(),o=t.map((e=>n.paneForSource(e)));return!(new Set(o).size>1)}contextMenuActions(e,t,n){const o=new ho.ActionsProvider(e,n),r=[];return t.forEach((e=>e.addSourcesToArray(r))),o.contextMenuActionsForSources(r)}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return Io(this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(Io(e))}_createObjectById(e){const t=no(e).persistentId,n=this._undoModel.model(),o=n.dataSourceForId(t);if(null!==o)return new Mo(this._undoModel,o);const r=n.lineToolsGroupModel().groupForId(t);return null!==r?new Do(this._undoModel,r):null}}Error;var xo=n(80842),Lo=n(10643),zo=n(39347),jo=n(97145),Ro=n(97874),Ao=n(2872),Oo=n(84959),Po=n(91730),Bo=n(33055),Fo=n(35149);const Wo=(0,l.getLogger)("Platform.GUI.ObjectTree");const Ho=new so.TranslatedString("move objects",v.t(null,void 0,n(40566))),Vo=new so.TranslatedString("lock objects",v.t(null,void 0,n(68163))),Go=new so.TranslatedString("unlock objects",v.t(null,void 0,n(66824))),Uo=new so.TranslatedString("show objects",v.t(null,void 0,n(63549))),Zo=new so.TranslatedString("hide objects",v.t(null,void 0,n(28506))),Ko=new so.TranslatedString("remove objects",v.t(null,void 0,n(57428)));class Yo{constructor(e){this._nodes={},this._onChange=new Xn.Delegate,this._onGroupCreated=new Xn.Delegate,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0},this._isContextMenuOpened=new jo.WatchedValue(!1),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find((t=>t===e))?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},this._init=()=>{const e=this._chart.value();e.hasModel()&&(this._controller=e.model(),
this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new No(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach((e=>{e.subscribe(this,this._update)})),this._chart.subscribe(this._onActiveChartChanged),this._selection=new oo(this._model),this._update())},this._update=()=>{null===this._timeout&&(this._timeout=setTimeout((()=>{this._recalculateTree(),this._onChange.fire(),this._timeout=null})))},this._ensuredEntity=e=>(0,T.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,o=this.selection().selected().map(this._ensuredEntity),[r,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(Ho,(()=>{switch(i){case"before":n.insertBefore(o,r);break;case"after":n.insertAfter(o,r)}})),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){return no(e.id()).persistentId===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),o=n.every((e=>e.doNotAffectChartInvalidation())),r=t?Vo:Go;this._controller.withMacro(r,(()=>{for(const e of n)e.setLocked(t)}),o),dn("Lock",hn(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),o=n.every((e=>e.doNotAffectChartInvalidation())),r=t?Uo:Zo;this._controller.withMacro(r,(()=>{for(const e of n)e.setVisible(t)}),o),dn("Hide",hn(n))}remove(e){const t=()=>{const e=n.every((e=>e.doNotAffectChartInvalidation()));this._controller.withMacro(Ko,(()=>{for(const e of n)e.remove()}),e),dn("Delete",hn(n)),this._update()},n=this._getObjectsToModify(e);t()}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){const e=this._groupController.createGroupFromSelection();dn("Create Group");const t=to(e.id,e.instanceId());this.selection().set([this._ensuredEntity(t)]),this._onGroupCreated.fire(t),this._update()}isSelectionDropable(e,t){const n=this.selection().selected().map(this._ensuredEntity),[o,r]=this._normalizeTargetAndDropType(e,t);switch(r){case"after":return o.canInsertAfterThis(n);case"before":return o.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isClonable()))}isSelectionCopiable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isCopiable()))}openProperties(e,t){const n=this._model.dataSourceForId(no(e.id()).persistentId)
;this.selection().selected().length>1&&this.selection().selected().includes(e.id())?this._chart.value().showSelectedSourcesProperties(t):(this.selection().set([e]),null!==n?this._controller.mainSeries()===n?this._chart.value().showGeneralChartProperties():((0,lo.isLineTool)(n)||(0,ao.isStudy)(n))&&this._chart.value().showChartPropertiesForSource(n,t):this._chart.value().showChartPropertiesForSources({sources:this._chart.value().model().selection().lineDataSources(),title:e.title(),tabName:t,renamable:!0}))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(no(e[0].id()).persistentId)}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&(0,xo.isPriceDataSource)(t)&&this._model.isUnmergeAvailableForSource(t)}unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,T.ensureNotNull)(this._model.dataSourceForId(no(e.id()).persistentId))));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),dn("Copy",hn(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,T.ensureNotNull)(this._model.dataSourceForId(no(e.id()).persistentId))));t.every(lo.isLineTool)&&(this._controller.cloneLineTools([...t],!1),dn("Clone",hn(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some((e=>e.canBeRenamed()))&&(t(),dn("Rename",hn(n)))}async openContextMenu(e,t,n){var o;this._objects=this._getObjectsToModify(e.id());const r=this._facade.canBeGroupped(this._objects);let i;if(this._objects.some((e=>e.hasChildren())))i=this._getActionsForGroupItem(e,t,r);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(i=Array.from(e).filter(((e,t,n)=>"separator"!==e.type||!n[t+1]||"separator"!==n[t+1].type)),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=i.findIndex((e=>"Copy"===e.id));i.splice(-1===e?i.length:e+1,0,this._getRenameAction(t))}if(r){const e=i.findIndex((e=>"Clone"===e.id));i.splice(-1===e?0:e,0,this._getGroupAction())}}if(i.length>0){this._chart.value().updateActions();const t=no(e.id()).persistentId,r=this._model.dataSourceForId(t),s=r instanceof uo.Series,l=0!==e.childrenIds().size;let a;a=s?{menuName:"ObjectTreeContextMenu",detail:{type:"series",id:r.instanceId()}}:(0,lo.isLineTool)(r)?{menuName:"ObjectTreeContextMenu",detail:{type:"shape",id:null!==(o=null==r?void 0:r.id())&&void 0!==o?o:null}}:l?{menuName:"ObjectTreeContextMenu",detail:{type:"groupOfShapes",id:t||null}}:{menuName:"ObjectTreeContextMenu",detail:{type:"study",id:(null==r?void 0:r.id())||null}},Lo.ContextMenuManager.showMenu(i,n,{takeFocus:!0,returnFocus:!0},a,(()=>{this._isContextMenuOpened.setValue(!1)})).then((()=>{this._isContextMenuOpened.setValue(!0)}))}}setHoveredObject(e){this._facade.setHoveredObject(e)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}getNextNodeIdAfterRemove(e){var t
;const{nodes:n}=this.getState(),o=no(e).persistentId,r=n.find((t=>t.id===e)),i=this.entity(e);if(!(r&&r.parentId&&i&&i.canBeRemoved()))return null;if((null===(t=i.pane().mainDataSource())||void 0===t?void 0:t.id())===o&&!this.canNodeWithIdBeUnmerged(o)){const e=n.filter((e=>0===e.level)).map((e=>e.id)),t=this._takeNextOrPrevElement(e,r.parentId);return(0,T.ensureDefined)(n.find((e=>e.id===t))).children[0]}const s=(0,T.ensureDefined)(n.find((e=>e.id===r.parentId))).children;return 1===s.length?this.getNextNodeIdAfterRemove(r.parentId):this._takeNextOrPrevElement(s,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}getChartLayout(){return this._chart.value().chartWidgetCollection().layout}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}_getGroupAction(){return new zo.Action({actionId:"ObjectsTree.CreateGroup",label:Ln,icon:R,onExecute:()=>{this.createGroupFromSelection()}})}_getRenameAction(e){return new zo.Action({actionId:"ObjectsTree.RenameItem",label:zn,icon:Bo,onExecute:()=>{e(),dn("Context menu rename",hn(this._objects))}})}_getActionsForGroupItem(e,t,n){const o=[];this._objects.forEach((e=>e.addSourcesToArray(o)));const r=[];1===this._objects.length&&r.unshift(this._getRenameAction(t),new zo.Separator),n&&r.unshift(this._getGroupAction(),new zo.Separator);const i=(0,ho.createSyncDrawingActions)(this._chart.value(),o.filter(lo.isLineTool));i.length&&(i.shift(),i.push(new zo.Separator),r.push(...i));const s=this._chart.value().actions().format.getState();return r.push(new zo.Action({actionId:"ObjectsTree.ToggleItemLocked",label:e.isLocked()?jn:Rn,icon:e.isLocked()?Ro:Ao,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}),new zo.Action({actionId:"ObjectsTree.ToggleItemVisibility",label:e.isVisible()?An:On,icon:e.isVisible()?Oo:Po,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}),new zo.Action({actionId:"ObjectsTree.RemoveItem",label:Pn,icon:Fo,onExecute:()=>this.remove(e.id()),hotkeyHash:C.isMacKeyboard?8:46}),new zo.Separator,new zo.Action({actionId:s.actionId,label:s.label,icon:s.icon,onExecute:()=>this.openProperties(e)})),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],o=(0,T.ensureNotNull)(this._model.dataSourceForId(no(n.id()).persistentId));if(!(0,xo.isPriceDataSource)(o))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,o);dn(0===e?"New pane above":"New pane below",hn([n]))}_recalculateTree(){const e=new ro(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=(0,T.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce(((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)}),{selected:[],removed:[]})
;return t.length&&Wo.logWarn(`Detected dangling sources in selection. They will be ignored: ${JSON.stringify(t)}`),e}_getEntityById(e){return this._facade.getObjectById(e)}}var $o=n(85067);class qo extends $o.DialogRenderer{constructor(){super(),this._handleClose=()=>{r.unmountComponentAtNode(this._container),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=(0,Jn.service)(Qn.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new Yo(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()}show(){g().then((()=>{null!==this._viewModel&&(r.render(o.createElement($n,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container),this._setVisibility(!0))}))}}},37968:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>r});var o=n(50959);const r=()=>{const[,e]=(0,o.useReducer)((e=>e+1),0);return e}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>r});var o=n(50959);const r=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,r="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[i,s]=(0,o.useState)(n?n.value():r);return(t?o.useLayoutEffect:o.useEffect)((()=>{if(n){s(n.value());const e=e=>s(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}}),[n]),i}},63932:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>s});var o=n(50959),r=n(97754),i=n(58096);n(83135);function s(e){const t=r(e.className,"tv-spinner","tv-spinner--shown",`tv-spinner--size_${i.spinnerSizeMap[e.size||i.DEFAULT_SIZE]}`);return o.createElement("div",{className:t,style:e.style,role:"progressbar"})}},29540:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72" width="72" height="72"><path fill="currentColor" d="M15 24a21 21 0 1 1 42 0v7.41l8.97 5.01 1.08.6-.82.94-7.77 8.82 2.34 2.53-1.47 1.36L57 48.15V69H46v-7h-6v5h-9V56h-6v13H15V48.15l-2.33 2.52-1.47-1.36 2.35-2.53-7.78-8.82-.82-.93 1.08-.6L15 31.4V24Zm0 9.7-6.9 3.87L15 45.4V33.7Zm42 11.7 6.91-7.83-6.9-3.87v11.7ZM36 5a19 19 0 0 0-19 19v43h6V54h10v11h5v-5h10v7h7V24A19 19 0 0 0 36 5Zm-5 19.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM42.5 26a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></svg>'},36296: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>'},33055:e=>{
this._selected=this._getSelectedIds(),this._selectionApi.onChanged().subscribe(this,(()=>{this._selected=this._getSelectedIds(),this._onChange.fire(this._selected)})),this._groupModel.onChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map((e=>e.id()));for(const o of e)if(o.hasChildren()){const e=o.childrenIds();t.push(...Array.from(e.values())),n=n.filter((t=>!e.has(t)))}else t.push(o.id());this._selectionApi.set(t.map((e=>no(e).persistentId))),this._selected=n,this._onChange.fire(this._selected)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange}selected(){return this._selected}_getSelectedIds(){return this._selectionApi.allSources().map((e=>this._model.dataSourceForId(e))).filter(dt.notNull).filter((e=>e.showInObjectTree())).map((e=>to(e.id(),e.instanceId())))}}class ro{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().all().filter((e=>e.showInObjectTree()));e[t.id()]=io(t.id(),0);for(const n of this._groupModel.groups()){const o=to(n.id,n.instanceId()),r=(0,T.ensureNotNull)(this._facade.getObjectById(o));if(r.pane()===t){const o=[...n.lineTools()].sort(((e,t)=>e.zorder()>t.zorder()?-1:1)).map((e=>to(e.id(),e.instanceId())));e[r.id()]=io(r.id(),1,t.id(),o),e[t.id()].children.push(r.id());for(const t of o)e[t]=io(t,2,r.id())}}for(const o of n){const n=to(o.id(),o.instanceId());e[n]||(e[n]=io(n,1,t.id()),e[t.id()].children.push(n))}e[t.id()].children.sort(((e,t)=>{const n=(0,T.ensureNotNull)(this._facade.getObjectById(e)),o=(0,T.ensureNotNull)(this._facade.getObjectById(t));return(0,T.ensureNotNull)(o.zOrder())-(0,T.ensureNotNull)(n.zOrder())}))}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function io(e,t,n,o=[]){return{id:e,level:t,parentId:n,children:o}}var so=n(36298),lo=n(92249),ao=n(28853),co=n(14292),uo=n(76544),ho=n(73212),go=n(88348),po=n(7295),mo=n(28824),fo=n(57674),vo=n(37591);const bo=new so.TranslatedString("show {title}",v.t(null,void 0,n(87358))),yo=new so.TranslatedString("hide {title}",v.t(null,void 0,n(70301))),_o=new so.TranslatedString("lock {title}",v.t(null,void 0,n(50193))),So=new so.TranslatedString("unlock {title}",v.t(null,void 0,n(92421))),wo=new so.TranslatedString("change {sourceTitle} title to {newSourceTitle}",v.t(null,void 0,n(40001))),Co=new so.TranslatedString("insert source(s) after",v.t(null,void 0,n(8343))),To=!1;function Io(e,t){return t.every((t=>!(t.pane()!==e&&!t.allowsMovingbetweenPanes())))}function Eo(e){return e instanceof co.DataSource&&e.showInObjectTree()?to(e.id(),e.instanceId()):null}function ko(e){return new so.TranslatedString(e.name(),e.title(vo.TitleDisplayTarget.DataWindow))}const Mo=new Xn.Delegate;class Do{constructor(e,t){this._syncStateChanged=new Xn.Delegate,this._updateSyncState=()=>{
this._syncStateChanged.fire((0,T.ensureNotNull)(this.getDrawingSyncState()))},this._undoModel=e,this._dataSource=t,(0,lo.isLineTool)(this._dataSource)&&(this._dataSource.linkKey().subscribe(this._updateSyncState),this._dataSource.sharingMode().subscribe(this._updateSyncState));const n=this._undoModel.lineBeingCreated();null!==n&&n===t&&n.isSynchronizable()&&go.isToolCreatingNow.subscribe(this._updateSyncState)}destroy(){(0,lo.isLineTool)(this._dataSource)&&(this._dataSource.linkKey().unsubscribe(this._updateSyncState),this._dataSource.sharingMode().unsubscribe(this._updateSyncState)),go.isToolCreatingNow.unsubscribe(this._updateSyncState)}id(){return to(this._dataSource.id(),this._dataSource.instanceId())}title(){const e=this._dataSource;return(0,lo.isLineTool)(e)?e.properties().title.value()||e.translatedType():(0,uo.isSeries)(e)&&this._undoModel.mainSeries()===e?e.symbolTitle(vo.TitleDisplayTarget.DataWindow,void 0,void 0,(0,bt.onWidget)()?"exchange":"listed_exchange"):e.title(vo.TitleDisplayTarget.DataWindow)}gaLabel(){return(0,ao.isStudy)(this._dataSource)?"Study":(0,lo.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return(0,lo.isLineTool)(this._dataSource)}fullyConstructed(){return this._undoModel.lineBeingCreated()!==this._dataSource}isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!(0,lo.isLineTool)(this._dataSource)&&!(0,ao.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){return(0,lo.isLineTool)(this._dataSource)||(0,ao.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():Mo}isLocked(){return!!(0,lo.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return(0,lo.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():Mo}getIcon(){const e=c,t=this._dataSource.getSourceIcon(),n=(0,ao.isStudyStrategy)(this._dataSource);let o={type:En.Svg,content:n?po:mo};if(e&&t)if("loadSvg"===t.type){const[n,r]=t.svgId.split("."),i="linetool"===n?e.linetool[r]:e.series[Number(r)];o={type:En.Svg,content:i||mo}}else"svgContent"===t.type&&(o={type:En.Svg,content:t.content});return o}onIconChanged(){if(this._dataSource.onSourceIconChanged)return this._dataSource.onSourceIconChanged()}setVisible(e){const t=(e?bo:yo).format({title:ko(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().visible,e,t)}setLocked(e){if((0,lo.isLineTool)(this._dataSource)){const t=(e?_o:So).format({title:ko(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t)}}setName(e){if((0,lo.isLineTool)(this._dataSource)){const t=wo.format({
sourceTitle:this._dataSource.properties().title.value()||ko(this._dataSource),newSourceTitle:e});this._undoModel.setProperty(this._dataSource.properties().title,e,t,To)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{e.addSourceToSelection(this._dataSource)}))}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,(e=>this._undoModel.insertBefore(e,this._dataSource)))}insertSourcesAfterThis(e){this._insertSources(e,(e=>this._undoModel.insertAfter(e,this._dataSource)))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return(0,T.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}allowsMovingbetweenPanes(){return!(0,lo.isLineTool)(this._dataSource)}canBeAddedToGroup(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.boundToSymbol()}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}detachFromParent(){if((0,lo.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}onTitleChanged(){const e=this._dataSource.properties().title;return e?e.listeners():void 0}canBeSyncedInLayout(){return(0,lo.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout()||!this.fullyConstructed())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.shareLineTools([t],1)}}getDrawingSyncState(){return this.canBeSyncedInLayout()?this.fullyConstructed()&&null!==this._dataSource.linkKey().value()?1:0:null}doNotAffectChartInvalidation(){return(0,lo.isLineTool)(this._dataSource)&&To}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!Io(this.pane(),e))return!1;if((0,lo.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some((e=>!e.canBeAddedToGroup())))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),o=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro(Co);const r=()=>{e.forEach((e=>e.detachFromParent()))},i=e.reduce(((e,t)=>t.addSourcesToArray(e)),[]);if((0,lo.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?((0,T.assert)(!e.some((e=>e.hasChildren()))),i.forEach((e=>{(0,
lo.isLineTool)(e)&&(t.containsLineTool(e)||o.addLineToolToGroup(t,e))}))):r()}else r();t(i),this._undoModel.endUndoMacro()}}class No{constructor(e,t){this._onTitleChanged=new Xn.Delegate,this._onVisibilityChanged=new Xn.Delegate,this._onLockChanged=new Xn.Delegate,this._onIsActualIntervalChanged=new Xn.Delegate,this._syncStateChanged=new Xn.Delegate,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._paneId=(0,T.ensureNotNull)(e.model().paneForSource(this._lineTools[0])).id();const n=()=>{this._lineTools.forEach((e=>{e.properties().visible.listeners().subscribe(this,(()=>this._onVisibilityChanged.fire())),e.properties().frozen.listeners().subscribe(this,(()=>this._onLockChanged.fire())),e.onIsActualIntervalChange().subscribe(this,(()=>this._onIsActualIntervalChanged.fire())),e.linkKey().subscribe(this._linkKeyChangedBound),e.sharingMode().subscribe(this._linkKeyChangedBound)}))};this._group.onChanged().subscribe(this,(e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.titleChanged&&this._onTitleChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire();const t=this.getDrawingSyncState();null!==t&&this._syncStateChanged.fire(t)})),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return to(this._group.id,this._group.instanceId())}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:En.Svg,content:fo}}canBeRemoved(){return!0}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}fullyConstructed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some((e=>e.isActualInterval()))),this._lastIsActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onTitleChanged(){return this._onTitleChanged}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}
canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every((t=>e.selection().canBeAddedToSelection(t)))}setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,(e=>this._undoModel.insertBefore(e,t)))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,(e=>this._undoModel.insertAfter(e,t)))}childrenIds(){const e=[...this._lineTools];return e.sort(((e,t)=>t.zorder()-e.zorder())),new Set(e.map((e=>to(e.id(),e.instanceId()))))}hasChildren(){return!0}pane(){return(0,T.ensureDefined)(this._undoModel.model().panes().find((e=>e.id()===this._paneId)))}allowsMovingbetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._lineTools.length>0&&this._lineTools[0].isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(this.canBeSyncedInLayout())switch(e){case 0:const e=this._lineTools.filter((e=>null!==e.linkKey().value()));e.length>0&&this._undoModel.unlinkLines(e);break;case 1:const t=this._lineTools.filter((e=>null===e.linkKey().value()));t.length>0&&this._undoModel.shareLineTools(t,1)}}getDrawingSyncState(){return this.canBeSyncedInLayout()?this._lineTools.every((e=>null!==e.linkKey().value()))?1:0:null}doNotAffectChartInvalidation(){return To}_linkKeyChanged(){this._syncStateChanged.fire((0,T.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return Io(this.pane(),e)}_insertSources(e,t){this._undoModel.beginUndoMacro(Co);const n=e.reduce(((e,t)=>t.addSourcesToArray(e)),[]);e.forEach((e=>e.detachFromParent())),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){return(0,T.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()<t.zorder()?e:t),null))}_insertAfterTarget(){return(0,T.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()>t.zorder()?e:t),null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach((e=>{e.properties().visible.listeners().unsubscribeAll(this),e.properties().frozen.listeners().unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this),e.linkKey().unsubscribe(this._linkKeyChangedBound),e.sharingMode().unsubscribe(this._linkKeyChangedBound)}))}}class xo{constructor(e){this._hoveredObjectChanged=new Xn.Delegate,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())null==e||e.destroy();this._undoModel.model().hoveredSourceChanged().unsubscribe(this,this._onModelHoveredSourceChanged)}getObjectById(e){
if(this._entitiesCache.has(e))return(0,T.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e);return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach((t=>{var n;e.has(t)||(null===(n=this._entitiesCache.get(t))||void 0===n||n.destroy(),this._entitiesCache.delete(t))}))}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach((e=>e.addSourcesToArray(t))),t.some((e=>!(0,lo.isLineTool)(e)||!e.boundToSymbol())))return!1;const n=this._undoModel.model(),o=t.map((e=>n.paneForSource(e)));return!(new Set(o).size>1)}contextMenuActions(e,t,n){const o=new ho.ActionsProvider(e,n),r=[];return t.forEach((e=>e.addSourcesToArray(r))),o.contextMenuActionsForSources(r)}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return Eo(this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(Eo(e))}_createObjectById(e){const t=no(e).persistentId,n=this._undoModel.model(),o=n.dataSourceForId(t);if(null!==o)return new Do(this._undoModel,o);const r=n.lineToolsGroupModel().groupForId(t);return null!==r?new No(this._undoModel,r):null}}Error;var Lo=n(80842),zo=n(10643),jo=n(39347),Ro=n(97145),Ao=n(97874),Oo=n(2872),Po=n(84959),Bo=n(91730),Fo=n(33055),Wo=n(35149);const Ho=(0,l.getLogger)("Platform.GUI.ObjectTree");const Vo=new so.TranslatedString("move objects",v.t(null,void 0,n(40566))),Go=new so.TranslatedString("lock objects",v.t(null,void 0,n(68163))),Uo=new so.TranslatedString("unlock objects",v.t(null,void 0,n(66824))),Zo=new so.TranslatedString("show objects",v.t(null,void 0,n(63549))),Ko=new so.TranslatedString("hide objects",v.t(null,void 0,n(28506))),Yo=new so.TranslatedString("remove objects",v.t(null,void 0,n(57428)));class $o{constructor(e){this._nodes={},this._onChange=new Xn.Delegate,this._onGroupCreated=new Xn.Delegate,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0},this._isContextMenuOpened=new Ro.WatchedValue(!1),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find((t=>t===e))?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},
this._init=()=>{const e=this._chart.value();e.hasModel()&&(this._controller=e.model(),this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new xo(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach((e=>{e.subscribe(this,this._update)})),this._chart.subscribe(this._onActiveChartChanged),this._selection=new oo(this._model),this._update())},this._update=()=>{null===this._timeout&&(this._timeout=setTimeout((()=>{this._recalculateTree(),this._onChange.fire(),this._timeout=null})))},this._ensuredEntity=e=>(0,T.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,o=this.selection().selected().map(this._ensuredEntity),[r,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(Vo,(()=>{switch(i){case"before":n.insertBefore(o,r);break;case"after":n.insertAfter(o,r)}})),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){return no(e.id()).persistentId===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),o=n.every((e=>e.doNotAffectChartInvalidation())),r=t?Go:Uo;this._controller.withMacro(r,(()=>{for(const e of n)e.setLocked(t)}),o),dn("Lock",hn(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),o=n.every((e=>e.doNotAffectChartInvalidation())),r=t?Zo:Ko;this._controller.withMacro(r,(()=>{for(const e of n)e.setVisible(t)}),o),dn("Hide",hn(n))}remove(e){const t=()=>{const e=n.every((e=>e.doNotAffectChartInvalidation()));this._controller.withMacro(Yo,(()=>{for(const e of n)e.remove()}),e),dn("Delete",hn(n)),this._update()},n=this._getObjectsToModify(e);t()}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){const e=this._groupController.createGroupFromSelection();dn("Create Group");const t=to(e.id,e.instanceId());this.selection().set([this._ensuredEntity(t)]),this._onGroupCreated.fire(t),this._update()}isSelectionDropable(e,t){const n=this.selection().selected().map(this._ensuredEntity),[o,r]=this._normalizeTargetAndDropType(e,t);switch(r){case"after":return o.canInsertAfterThis(n);case"before":return o.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isClonable()))}isSelectionCopiable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isCopiable()))}openProperties(e,t){
const n=this._model.dataSourceForId(no(e.id()).persistentId);this.selection().selected().length>1&&this.selection().selected().includes(e.id())?this._chart.value().showSelectedSourcesProperties(t):(this.selection().set([e]),null!==n?this._controller.mainSeries()===n?this._chart.value().showGeneralChartProperties():((0,lo.isLineTool)(n)||(0,ao.isStudy)(n))&&this._chart.value().showChartPropertiesForSource(n,t):this._chart.value().showChartPropertiesForSources({sources:this._chart.value().model().selection().lineDataSources(),title:e.title(),tabName:t,renamable:!0}))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(no(e[0].id()).persistentId)}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&(0,Lo.isPriceDataSource)(t)&&this._model.isUnmergeAvailableForSource(t)}unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,T.ensureNotNull)(this._model.dataSourceForId(no(e.id()).persistentId))));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),dn("Copy",hn(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,T.ensureNotNull)(this._model.dataSourceForId(no(e.id()).persistentId))));t.every(lo.isLineTool)&&(this._controller.cloneLineTools([...t],!1),dn("Clone",hn(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some((e=>e.canBeRenamed()))&&(t(),dn("Rename",hn(n)))}async openContextMenu(e,t,n){var o;this._objects=this._getObjectsToModify(e.id());const r=this._facade.canBeGroupped(this._objects);let i;if(this._objects.some((e=>e.hasChildren())))i=this._getActionsForGroupItem(e,t,r);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(i=Array.from(e).filter(((e,t,n)=>"separator"!==e.type||!n[t+1]||"separator"!==n[t+1].type)),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=i.findIndex((e=>"Copy"===e.id));i.splice(-1===e?i.length:e+1,0,this._getRenameAction(t))}if(r){const e=i.findIndex((e=>"Clone"===e.id));i.splice(-1===e?0:e,0,this._getGroupAction())}}if(i.length>0){this._chart.value().updateActions();const t=no(e.id()).persistentId,r=this._model.dataSourceForId(t),s=r instanceof uo.Series,l=0!==e.childrenIds().size;let a;a=s?{menuName:"ObjectTreeContextMenu",detail:{type:"series",id:r.instanceId()}}:(0,lo.isLineTool)(r)?{menuName:"ObjectTreeContextMenu",detail:{type:"shape",id:null!==(o=null==r?void 0:r.id())&&void 0!==o?o:null}}:l?{menuName:"ObjectTreeContextMenu",detail:{type:"groupOfShapes",id:t||null}}:{menuName:"ObjectTreeContextMenu",detail:{type:"study",id:(null==r?void 0:r.id())||null}},zo.ContextMenuManager.showMenu(i,n,{takeFocus:!0,returnFocus:!0},a,(()=>{this._isContextMenuOpened.setValue(!1)})).then((()=>{this._isContextMenuOpened.setValue(!0)}))}}setHoveredObject(e){this._facade.setHoveredObject(e)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}
getNextNodeIdAfterRemove(e){var t;const{nodes:n}=this.getState(),o=no(e).persistentId,r=n.find((t=>t.id===e)),i=this.entity(e);if(!(r&&r.parentId&&i&&i.canBeRemoved()))return null;if((null===(t=i.pane().mainDataSource())||void 0===t?void 0:t.id())===o&&!this.canNodeWithIdBeUnmerged(o)){const e=n.filter((e=>0===e.level)).map((e=>e.id)),t=this._takeNextOrPrevElement(e,r.parentId);return(0,T.ensureDefined)(n.find((e=>e.id===t))).children[0]}const s=(0,T.ensureDefined)(n.find((e=>e.id===r.parentId))).children;return 1===s.length?this.getNextNodeIdAfterRemove(r.parentId):this._takeNextOrPrevElement(s,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}getChartLayout(){return this._chart.value().chartWidgetCollection().layout}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}_getGroupAction(){return new jo.Action({actionId:"ObjectsTree.CreateGroup",label:Ln,icon:R,onExecute:()=>{this.createGroupFromSelection()}})}_getRenameAction(e){return new jo.Action({actionId:"ObjectsTree.RenameItem",label:zn,icon:Fo,onExecute:()=>{e(),dn("Context menu rename",hn(this._objects))}})}_getActionsForGroupItem(e,t,n){const o=[];this._objects.forEach((e=>e.addSourcesToArray(o)));const r=[];1===this._objects.length&&r.unshift(this._getRenameAction(t),new jo.Separator),n&&r.unshift(this._getGroupAction(),new jo.Separator);const i=(0,ho.createSyncDrawingActions)(this._chart.value(),o.filter(lo.isLineTool));i.length&&(i.shift(),i.push(new jo.Separator),r.push(...i));const s=this._chart.value().actions().format.getState();return r.push(new jo.Action({actionId:"ObjectsTree.ToggleItemLocked",label:e.isLocked()?jn:Rn,icon:e.isLocked()?Ao:Oo,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}),new jo.Action({actionId:"ObjectsTree.ToggleItemVisibility",label:e.isVisible()?An:On,icon:e.isVisible()?Po:Bo,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}),new jo.Action({actionId:"ObjectsTree.RemoveItem",label:Pn,icon:Wo,onExecute:()=>this.remove(e.id()),hotkeyHash:C.isMacKeyboard?8:46}),new jo.Separator,new jo.Action({actionId:s.actionId,label:s.label,icon:s.icon,onExecute:()=>this.openProperties(e)})),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],o=(0,T.ensureNotNull)(this._model.dataSourceForId(no(n.id()).persistentId));if(!(0,Lo.isPriceDataSource)(o))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,o);dn(0===e?"New pane above":"New pane below",hn([n]))}_recalculateTree(){const e=new ro(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=(0,T.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce(((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)}),{selected:[],
removed:[]});return t.length&&Ho.logWarn(`Detected dangling sources in selection. They will be ignored: ${JSON.stringify(t)}`),e}_getEntityById(e){return this._facade.getObjectById(e)}}var qo=n(85067);class Jo extends qo.DialogRenderer{constructor(){super(),this._handleClose=()=>{r.unmountComponentAtNode(this._container),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=(0,Jn.service)(Qn.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new $o(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()}show(){g().then((()=>{null!==this._viewModel&&(r.render(o.createElement($n,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container),this._setVisibility(!0))}))}}},37968:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>r});var o=n(50959);const r=()=>{const[,e]=(0,o.useReducer)((e=>e+1),0);return e}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>r});var o=n(50959);const r=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,r="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[i,s]=(0,o.useState)(n?n.value():r);return(t?o.useLayoutEffect:o.useEffect)((()=>{if(n){s(n.value());const e=e=>s(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}}),[n]),i}},63932:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>s});var o=n(50959),r=n(97754),i=n(58096);n(83135);function s(e){const t=r(e.className,"tv-spinner","tv-spinner--shown",`tv-spinner--size_${i.spinnerSizeMap[e.size||i.DEFAULT_SIZE]}`);return o.createElement("div",{className:t,style:e.style,role:"progressbar"})}},29540:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72" width="72" height="72"><path fill="currentColor" d="M15 24a21 21 0 1 1 42 0v7.41l8.97 5.01 1.08.6-.82.94-7.77 8.82 2.34 2.53-1.47 1.36L57 48.15V69H46v-7h-6v5h-9V56h-6v13H15V48.15l-2.33 2.52-1.47-1.36 2.35-2.53-7.78-8.82-.82-.93 1.08-.6L15 31.4V24Zm0 9.7-6.9 3.87L15 45.4V33.7Zm42 11.7 6.91-7.83-6.9-3.87v11.7ZM36 5a19 19 0 0 0-19 19v43h6V54h10v11h5v-5h10v7h7V24A19 19 0 0 0 36 5Zm-5 19.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM42.5 26a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></svg>'},36296: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>'},33055:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M17.086 6.207a2 2 0 0 1 2.828 0l1.879 1.879a2 2 0 0 1 0 2.828l-.94.94-9 9-1 1-.146.146H6v-4.707l.146-.146 1-1 9-9 .94-.94zm2.121.707a1 1 0 0 0-1.414 0l-.586.586 1.647 1.646 1.646 1.647.586-.586a1 1 0 0 0 0-1.414l-1.879-1.879zm.586 4.586L18.5 10.207 10.207 18.5l1.293 1.293 8.293-8.293zm-9 9l-1.647-1.646L7.5 17.207l-.5.5V21h3.293l.5-.5zm-2.586-4L9.5 17.793 17.793 9.5 16.5 8.207 8.207 16.5z"/></svg>'},69533:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},57674:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M5.5 11.5v8a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-8m-17 0v-4a1 1 0 0 1 1-1h4l2 2h9a1 1 0 0 1 1 1v2m-17 0h17"/></svg>'},80465:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M5.5 6C4.67 6 4 6.67 4 7.5V20.5c0 .83.67 1.5 1.5 1.5H16v-1H5.5a.5.5 0 0 1-.5-.5V12h16v1h1V9.5c0-.83-.67-1.5-1.5-1.5h-8.8L9.86 6.15 9.71 6H5.5zM21 11H5V7.5c0-.28.22-.5.5-.5h3.8l1.85 1.85.14.15h9.21c.28 0 .5.22.5.5V11zm1 11v-3h3v-1h-3v-3h-1v3h-3v1h3v3h1z"/></svg>'},94007:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M2.448 10.124a10.82 10.82 0 0 1-.336-.609L2.105 9.5l.007-.015a12.159 12.159 0 0 1 1.686-2.466C5.002 5.665 6.752 4.373 9.05 4.373c2.297 0 4.047 1.292 5.25 2.646a12.166 12.166 0 0 1 1.687 2.466l.007.015-.007.015a12.163 12.163 0 0 1-1.686 2.466c-1.204 1.354-2.954 2.646-5.251 2.646-2.298 0-4.048-1.292-5.252-2.646a12.16 12.16 0 0 1-1.35-1.857zm14.558-.827l-.456.203.456.203v.002l-.003.005-.006.015-.025.052a11.813 11.813 0 0 1-.461.857 13.163 13.163 0 0 1-1.463 2.011c-1.296 1.46-3.296 2.982-5.998 2.982-2.703 0-4.703-1.522-6-2.982a13.162 13.162 0 0 1-1.83-2.677 7.883 7.883 0 0 1-.118-.243l-.007-.015-.002-.005v-.001l.456-.204-.456-.203v-.002l.002-.005.007-.015a4.66 4.66 0 0 1 .119-.243 13.158 13.158 0 0 1 1.83-2.677c1.296-1.46 3.296-2.982 5.999-2.982 2.702 0 4.702 1.522 5.998 2.981a13.158 13.158 0 0 1 1.83 2.678 8.097 8.097 0 0 1 .119.243l.006.015.003.005v.001zm-.456.203l.456-.203.09.203-.09.203-.456-.203zM1.092 9.297l.457.203-.457.203-.09-.203.09-.203zm9.958.203c0 1.164-.917 2.07-2 2.07-1.084 0-2-.906-2-2.07 0-1.164.916-2.07 2-2.07 1.083 0 2 .906 2 2.07zm1 0c0 1.695-1.344 3.07-3 3.07-1.657 0-3-1.375-3-3.07 0-1.695 1.343-3.07 3-3.07 1.656 0 3 1.375 3 3.07z"/></svg>'},52870:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7 5.5a2.5 2.5 0 0 1 5 0V7H7V5.5zM6 7V5.5a3.5 3.5 0 1 1 7 0V7a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm8 2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9zm-3 2.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>'},74059:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M21.106 12.5H6.894a.5.5 0 0 1-.318-.886L14 5.5l7.424 6.114a.5.5 0 0 1-.318.886zM21.106 16.5H6.894a.5.5 0 0 0-.318.886L14 23.5l7.424-6.114a.5.5 0 0 0-.318-.886z"/></svg>'},91730:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M4.605 14.089A10.052 10.052 0 0 1 4.56 14l.046-.089a17.18 17.18 0 0 1 2.329-3.327C8.58 8.758 10.954 7 14 7c3.046 0 5.421 1.757 7.066 3.585A17.18 17.18 0 0 1 23.44 14l-.046.089a17.18 17.18 0 0 1-2.329 3.327C19.42 19.242 17.046 21 14 21c-3.046 0-5.421-1.757-7.066-3.584a17.18 17.18 0 0 1-2.329-3.327zm19.848-.3L24 14l.453.212-.001.002-.003.005-.009.02a16.32 16.32 0 0 1-.662 1.195c-.44.72-1.1 1.684-1.969 2.65C20.08 20.008 17.454 22 14 22c-3.454 0-6.079-1.993-7.81-3.916a18.185 18.185 0 0 1-2.469-3.528 10.636 10.636 0 0 1-.161-.318l-.01-.019-.002-.005v-.002L4 14a55.06 55.06 0 0 1-.453-.212l.001-.002.003-.005.009-.02.033-.067a16.293 16.293 0 0 1 .629-1.126c.44-.723 1.1-1.686 1.969-2.652C7.92 7.993 10.546 6 14 6c3.454 0 6.079 1.993 7.81 3.916a18.183 18.183 0 0 1 2.469 3.528 10.588 10.588 0 0 1 .161.318l.01.019.002.005v.002zM24 14l.453-.211.099.211-.099.211L24 14zm-20.453-.211L4 14l-.453.211L3.448 14l.099-.211zM11 14a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm3-4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0 5a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>'},7295:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M4.5 12.5l4.59-4.59a2 2 0 0 1 2.83 0l3.17 3.17a2 2 0 0 0 2.83 0L22.5 6.5m-8 9.5v5.5M12 19l2.5 2.5L17 19m4.5 3v-5.5M19 19l2.5-2.5L24 19"/></svg>'},28824: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 16.5l4.586-4.586a2 2 0 0 1 2.828 0l3.172 3.172a2 2 0 0 0 2.828 0L23.5 10.5"/></svg>'},49756:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M11.5 4A2.5 2.5 0 0 0 7 5.5V7h6a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2V5.5a3.5 3.5 0 0 1 6.231-2.19c-.231.19-.73.69-.73.69zM13 8H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zm-2 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>'},62766:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M14.692 3.012l-12 12.277.715.699 12-12.277-.715-.699zM9.05 15.627a7.042 7.042 0 0 1-3.144-.741l.742-.76c.72.311 1.52.5 2.402.5 2.297 0 4.047-1.29 5.25-2.645a12.168 12.168 0 0 0 1.687-2.466l.007-.015-.007-.015A12.166 12.166 0 0 0 14.3 7.019c-.11-.124-.225-.247-.344-.37l.699-.715c.137.14.268.28.392.42a13.16 13.16 0 0 1 1.83 2.678 8.117 8.117 0 0 1 .119.243l.006.015.003.005v.001l-.456.204.456.203v.002l-.003.005-.006.015-.025.052a11.762 11.762 0 0 1-.461.857 13.158 13.158 0 0 1-1.463 2.011c-1.296 1.46-3.296 2.982-5.998 2.982zm7.5-6.127l.456-.203.09.203-.09.203-.456-.203zm-7.5 3.07c-.27 0-.53-.037-.778-.105l.879-.899c.999-.052 1.833-.872 1.895-1.938l.902-.923c.066.253.102.52.102.795 0 1.695-1.344 3.07-3 3.07zM6.15 10.294l.902-.923c.063-1.066.896-1.886 1.895-1.938l.879-.9a2.94 2.94 0 0 0-.777-.103c-1.657 0-3 1.374-3 3.069 0 .275.035.541.101.795zM9.05 4.373c.88 0 1.68.19 2.4.5l.743-.759a7.043 7.043 0 0 0-3.143-.74c-2.703 0-4.703 1.521-6 2.98a13.159 13.159 0 0 0-1.83 2.678 7.886 7.886 0 0 0-.118.243l-.007.015-.002.005v.001l.456.204-.457-.203-.09.203.09.203.457-.203-.456.203v.002l.002.005.007.015a4.5 4.5 0 0 0 .119.243 13.152 13.152 0 0 0 1.83 2.677c.124.14.255.28.392.42l.7-.715c-.12-.122-.235-.245-.345-.369a12.156 12.156 0 0 1-1.686-2.466L2.105 9.5l.007-.015a12.158 12.158 0 0 1 1.686-2.466C5.002 5.665 6.752 4.373 9.05 4.373z"/></svg>'},98129:e=>{e.exports={ar:["استنساخ ، نسخ"],ca_ES:["Clona, Copia"],cs:"Clone, Copy",de:["Klonen, Kopieren"],el:"Clone, Copy",en:"Clone, Copy",es:["Clonar, Copiar"],fa:"Clone, Copy",fr:["Cloner, Copier"],he_IL:["שכפל, העתק"],hu_HU:"Clone, Copy",id_ID:["Duplikat, Salin"],it:["Clona, copia"],ja:["複製、コピー"],ko:["클론, 카피"],ms_MY:["Klon, Salin"],nl_NL:"Clone, Copy",pl:["Klonuj, Kopiuj"],pt:["Clonar, Copiar"],ro:"Clone, Copy",ru:["Клонировать, копировать"],sv:["Klon, kopiera"],th:["โคลน, ก๊อปปี้"],tr:["Klonla, Kopyala"],vi:["Nhân bản, Sao chép"],zh:["克隆,复制"],zh_TW:["克隆,複製"]}},91073:e=>{e.exports={ar:["أنشئ مجموعة من الرسومات"],ca_ES:["Creeu un grup de gràfics"],cs:"Create a group of drawings",de:["Erstellen Sie eine Gruppe von Zeichnungen"],el:"Create a group of drawings",en:"Create a group of drawings",es:["Cree un grupo de graficos"],fa:"Create a group of drawings",fr:["Créer un groupe de dessins"],he_IL:["צור קבוצת שרטוטים"],hu_HU:"Create a group of drawings",id_ID:["Buat kelompok untuk gambar"],it:["Crea un gruppo di disegni"],ja:["描画のグループを作成"],ko:["드로잉 그룹 만들기"],ms_MY:["Cipta kumpulan untuk lukisan"],nl_NL:"Create a group of drawings",pl:["Utwórz grupę obiektów rysowania"],pt:["Criar um grupo de desenhos"],ro:"Create a group of drawings",ru:["Создать группу объектов рисования"],sv:["Skapa en grup ritningar"],th:["สร้างกรุ๊ปของการวาด"],tr:["Bir grup çizim oluşturun"],vi:["Tạo nhóm các hình vẽ"],zh:["建立一组绘图"],zh_TW:["建立一組繪圖"]}},38207:e=>{e.exports={ar:["المجموعة مخفية في الفاصل الزمني الحالي"],ca_ES:["El grup està ocult a l'interval actual"],

View File

@@ -1,5 +1,5 @@
(()=>{"use strict";var e,a,c,d,f,t={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var c=b[e]={id:e,loaded:!1,exports:{}};return t[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=t,r.c=b,e=[],r.O=(a,c,d,f)=>{if(!c){var t=1/0;for(i=0;i<e.length;i++){for(var[c,d,f]=e[i],b=!0,o=0;o<c.length;o++)(!1&f||t>=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(b=!1,f<t&&(t=f));if(b){e.splice(i--,1);var n=d();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]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var t={};a=a||[null,c({}),c([]),c(c)];for(var b=2&d&&e;"object"==typeof b&&!~a.indexOf(b);b=c(b))Object.getOwnPropertyNames(b).forEach((a=>t[a]=()=>e[a]));return t.default=()=>e,r.d(f,t),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>5652===e?"__LANG__.5652.afa01acb54a69426de69.js":2427===e?"__LANG__.2427.9e75295442d2edc53485.js":77===e?"__LANG__.77.99662205014782bfbe4a.js":6196===e?"__LANG__.6196.1cb6c0cf4b3c1139a67d.js":9871===e?"__LANG__.9871.80491970c40a96588ffd.js":7201===e?"__LANG__.7201.d9e269cc77c4bebf986c.js":3753===e?"__LANG__.3753.453e4c91d1197ef94e09.js":2521===e?"__LANG__.2521.8eba2dc07079697338fc.js":8884===e?"__LANG__.8884.377844211bfc698fda75.js":2684===e?"__LANG__.2684.89c78924594078c4eeb0.js":({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",2616:"svg-renderer",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",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",5516:"restricted-toolset",5551:"favorite-drawings-api",5598:"lt-stickers-atlas",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",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",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:"series-icons-map"}[e]||e)+"."+{6:"a03a8ff024d47ed075c6",92:"bfb76cc7578ab709169b",139:"02c0064b96893d572f7c",306:"6c2d5d0bc3a42274d1e6",507:"ed33f2a0cf4f0d37ca70",607:"8ba8754a2a9412395338",731:"87a740703b63be996c0a",769:"9e4ee987380cde8a482f",855:"61db310932f8af2c5989",898:"b63568700f1380e37b1a",962:"e2eb6a85de39a3d76e5d",1013:"ccba7f12442264960551",1033:"bb804c64fe58de0bace7",1044:"c0b266912178dd5523e1",1054:"c09e1aa220385adef79a",1109:"845f0f111ff830ab93c8",1365:"e1fe1d66c5bb17da7c3a",1553:"c076714f5e24887f0b94",1583:"0cc864047470aabb1e6e",1584:"429d5a2ad09b6791326c",1702:"3f5b604134bebba28c6c",1754:"33210ecad56124f25ac1",1762:"9511e5b410d7d629bc49",1859:"a3a8e03aafa01f2649cb",1890:"8b313f77ea6c1f51530a",2020:"4a7196a939413830080e",2077:"53c155e0d72b7d0f0e3d",2109:"291fa715b6ded706c3dd",2183:"a80a3e282aa441e156d1",2191:"2197cc1b66a1db8969cc",2260:"95dc0a20b147b6b2eeed",2306:"59ef0f72407ababdac9c",2377:"6e30e0c48af40bf2f6c0",2587:"615babc52637decdb6e2",2616:"f065beaf6b5b37da27d9",2639:"a55d77a7912be54f7b9d",2666:"d28c0fa0a323b8118f22",2676:"a9a5ede4d514162164fa",2704:"b2d329d398bc58f1b425",2731:"55eed17fefac5e82c077",2878:"1077ac737eee4d6fdb30",2984:"dc61504f5c150afee786",3005:"d2aa6e1dc6d61ae08053",3016:"37427b1dab6d44713245",3030:"dbb4bdcbf10acf6b5280",3066:"8b1d2ceb22d9fedde67b",3127:"dbb10377920ca14e55a2",3179:"b87763465b433e5b66fd",3291:"1b7cd1c0d6b4fdf5f9e9",3502:"1985af3fa836c4248178",3596:"ca806447f87d03e5b322",3610:"c79c6bddd919cb78428a",3717:"6f65e91a870250a6e450",3842:"8758110ab553b5368121",3889:"c5a6834243c3ccfc1fcb",3896:"14d9e7509c300245c219",3980:"9d7eeb2bacce45c508b3",3986:"aee89bf9b2348c0d0d7f",4013:"38f48de95854d191751c",4015:"9b6607a6f543f077c5a5",4062:"9229fac3ef3db26fd5bc",4079:"97a8e6dbe1a94532eb49",4081:"c86fb8f04554726af6c0",4215:"8934b190aaed2663c300",4378:"a2a37780b99d50d784f7",4387:"b928c72ea82decd4ae7b",4389:"c0ec40f417c36a1c6179",4403:"fc4cac3ecee3925b9ec2",4665:"d7331dbca4a2aa0909e7",4713:"365b703a3ce33b603ace",4717:"ff71583495773a86dd1b",4862:"b2b784d27212324330d6",4894:"035fecc664874bb752b0",4987:"a23484dfcca6d5fae195",5009:"4b08ba7264d2d6e73f2e",5050:"cc5e2d631f109ee4d535",5093:"e192c9080b7e430f8bfc",5145:"da831552b3b54ca47682",5163:"953e65e04ed31b0ea0b3",5403:"a8ce3bbae4ddbe632714",5516:"6b6f00fca2682a673f64",5551:"340e60e2342b0d93ebe7",5598:"52ad6e6d7d7b134ab0ba",5649:"5c1e55c9dad604880876",5711:"592f6b06b20ea7958f2e",5866:"039e25226b82968cca61",5871:"1571b33c7b086a73eadd",5899:"610e274e70fffca8c232",5901:"bf6858d021c8e6c577d5",5993:"0e5f49179c6a516963de",6025:"d669a0315da9d6fda6b3",6036:"5b373caaaa6e1ba4495f",6106:"1d31df88e63bf542ea7b",6166:"8b7dc7926d170fc11eac",6214:"5a578175aab923a979dc",6221:"56c4d15c823c019ddb39",6265:"4788a10b2e7019e41282",6456:"44f6b4ef758efe0fb876",6494:"7f264af8142cb9910c06",6625:"364cf21fe24d7e675de8",6631:"5bbad2bd90247fb9194f",6639:"a1bd5bf1d51c681561a1",6752:"912872ffa56a7243d664",6780:"a5047e195f842203b902",6831:"912351c7cf5f8ac16dfe",6884:"07642217627127113fb0",6925:"665969c4af4481df0691",6949:"f50051a55eaa8dd5e780",
6959:"61ce9bf171293ea37c54",7078:"aef234c059b0b7c64ae8",7111:"4716f3208dc337521c10",7149:"d450e8145ad7e6fbd67f",7194:"098c1a8da1ddbbda98f6",7232:"abf9ba18c92e46a44f3b",7260:"4c9c01959c7ebe94b74f",7271:"1c3f95ada81fc7c425a4",7350:"aa555ff9e17c4029aedd",7391:"c63bd39c42093cc4130c",7413:"3a52b91975b98e6fe8e4",7555:"ea682716c26bc13db765",7648:"d599965fb89ec8e183eb",7871:"df6a9177c293c0c53e80",7987:"2267a50d874703af7f28",8020:"520f315000510aab3003",8056:"c06a1c8fb4a1f18cf217",8115:"aef220eae07f8df278f7",8149:"9fb525d10e5c8ba95701",8167:"fe5ee6bf29f571059a4c",8385:"32e961c4a8591abe04cd",8399:"ebb97a8311b57f015b11",8537:"168b8df16f57900a29da",8643:"71b6b063699eb3e1407e",8890:"9d651e36d783aafef499",8904:"87e94e93ade13962a48f",9039:"0a3f1b99d355b6297d18",9138:"f516266ddcf6ca8c7064",9322:"fcbf1e7bff530c95a44f",9327:"0c38440ca52f144413ac",9374:"4660d2cad62644ff2ea9",9498:"3892fbd90646aa80aef1",9685:"6b7b2f52a18274053c99",9727:"f86b3426312923af0159",9789:"458feb5c8c0263b0618b",9795:"d66be24693cf931f6914",9842:"581808dd4a8651b16779",9916:"0c2cb2d12479a20efce1"}[e]+".js",r.miniCssF=e=>e+"."+{6:"362fa6a7ab1f3e3b06c4",855:"26e8cce3ad082b02cc26",898:"f909d7c1efc95f635922",1013:"01583b91f7384f25e038",1033:"5197f9f8b8500206d06c",1054:"d5b8033c360af91ed458",1109:"ec16a629917db2baf412",1365:"0116666d16b5bc64c47a",1762:"7ff6b353c441db2276da",2109:"39627406fe95483ff7db",2191:"6563d97efc3339a1e518",2260:"b98824e4829a1aa9b444",2587:"1f1100dc01693edfe269",2639:"c87f745c32020e3a8cff",2666:"fbb750fd312778403036",2676:"2d3cabbd39a3b0d6e9ea",2731:"df45c9c18811872fec07",2984:"57f5ad22257d1a4e1ef9",3066:"2acb4b086c32c9448837",3127:"fd89143aebe89e23faed",3502:"c49903f7222870ff8aca",3610:"62c553543d76c38edfbc",3717:"da244b56f00e05470918",3842:"6a8a7842ee841f6d2cff",3889:"a2646d6c3b33d166eee2",3896:"019229d7d874e1da11be",3980:"b2ff45a2d8bb6a131d7c",4015:"1d0e3a62a59d173c81f3",4081:"1a314e4dade74df359f0",4215:"d24836a292b1969ab4bb",4387:"bf2665aacf1dc00074fa",4894:"cc39b3740f4022cbd5cf",4987:"861f49973c19dc84365b",5145:"a2b224fd27ab2941c565",5163:"8dc3fd2d8bb68b7d880e",5403:"d6bd43a35209059f1060",5649:"b60ed09c5ea8c55827d4",5866:"c89b7fc29afe92efc1f3",5993:"d3e96a56dd65b0b2db55",6025:"263b457b1a7f9ca139b2",6036:"3b493a9f0ab052e6447c",6106:"cf6f129517250c80b39f",6214:"65b7dbf8be6cca5ac143",6221:"25d30f095d6a54fbf276",6494:"e9af15c073886bef781b",6625:"cd54dd2a77c47eb6003d",6639:"cea47dbe77ae73ace44b",6752:"207eb3cc75b3ed2c6754",6831:"ac1745947bd2665f6c9a",6884:"bb7d30a7bbbe5af36556",6925:"43e91cba4f1aefba5311",6949:"19355e81a60b640ea097",6959:"0cd4b06da6b4fd1fcc56",7111:"b16b4eb739a7e8577559",7149:"276df0cedb3c54d6826d",7194:"e04f69c8933166966874",7232:"dfa17050a6458c8bf3da",7350:"abf568a3d6ce7b47cc59",7391:"9c809fa91ed0c8f75bc0",7413:"f830ad1ad6ee6f9b1cb3",7555:"8c1e3939e7666b0f8c69",7871:"cb99fc4ec9bbe0895a26",8056:"a83d512c1dc2173349a1",8149:"21f2b01074a4d082e268",8399:"525ea48565b11d84e370",8904:"a302177fe7e3ccd50cb0",9138:"03b8fbcfabcae851949a",9322:"beec29aa1b9aa9601ccf",9327:"e6fe2b8bd7bfc4b93efe",9789:"cb5ad20bc727d3820b6c",
9685:"series-icons-map"}[e]||e)+"."+{6:"a03a8ff024d47ed075c6",92:"bfb76cc7578ab709169b",139:"02c0064b96893d572f7c",306:"6c2d5d0bc3a42274d1e6",507:"ed33f2a0cf4f0d37ca70",607:"8ba8754a2a9412395338",731:"f9dfb2d8c088196803c5",769:"9e4ee987380cde8a482f",855:"61db310932f8af2c5989",898:"b63568700f1380e37b1a",962:"e2eb6a85de39a3d76e5d",1013:"ccba7f12442264960551",1033:"bb804c64fe58de0bace7",1044:"c0b266912178dd5523e1",1054:"c09e1aa220385adef79a",1109:"845f0f111ff830ab93c8",1365:"e1fe1d66c5bb17da7c3a",1553:"c076714f5e24887f0b94",1583:"f9c2f48c51585106118a",1584:"429d5a2ad09b6791326c",1702:"3f5b604134bebba28c6c",1754:"33210ecad56124f25ac1",1762:"9511e5b410d7d629bc49",1859:"a3a8e03aafa01f2649cb",1890:"8b313f77ea6c1f51530a",2020:"4a7196a939413830080e",2077:"53c155e0d72b7d0f0e3d",2109:"291fa715b6ded706c3dd",2183:"a80a3e282aa441e156d1",2191:"2197cc1b66a1db8969cc",2260:"95dc0a20b147b6b2eeed",2306:"e8314762db1d7d9aac81",2377:"6e30e0c48af40bf2f6c0",2587:"615babc52637decdb6e2",2616:"f065beaf6b5b37da27d9",2639:"a55d77a7912be54f7b9d",2666:"d28c0fa0a323b8118f22",2676:"a9a5ede4d514162164fa",2704:"b2d329d398bc58f1b425",2731:"55eed17fefac5e82c077",2878:"1077ac737eee4d6fdb30",2984:"dc61504f5c150afee786",3005:"d2aa6e1dc6d61ae08053",3016:"37427b1dab6d44713245",3030:"dbb4bdcbf10acf6b5280",3066:"8b1d2ceb22d9fedde67b",3127:"dbb10377920ca14e55a2",3179:"b87763465b433e5b66fd",3291:"1b7cd1c0d6b4fdf5f9e9",3502:"1985af3fa836c4248178",3596:"ca806447f87d03e5b322",3610:"c79c6bddd919cb78428a",3717:"6f65e91a870250a6e450",3842:"8758110ab553b5368121",3889:"c5a6834243c3ccfc1fcb",3896:"14d9e7509c300245c219",3980:"9d7eeb2bacce45c508b3",3986:"aee89bf9b2348c0d0d7f",4013:"38f48de95854d191751c",4015:"9b6607a6f543f077c5a5",4062:"9229fac3ef3db26fd5bc",4079:"97a8e6dbe1a94532eb49",4081:"c86fb8f04554726af6c0",4215:"8934b190aaed2663c300",4378:"a2a37780b99d50d784f7",4387:"b928c72ea82decd4ae7b",4389:"c0ec40f417c36a1c6179",4403:"fc4cac3ecee3925b9ec2",4665:"d7331dbca4a2aa0909e7",4713:"365b703a3ce33b603ace",4717:"ff71583495773a86dd1b",4862:"f3c95c3754723530ee6d",4894:"035fecc664874bb752b0",4987:"a23484dfcca6d5fae195",5009:"4b08ba7264d2d6e73f2e",5050:"cc5e2d631f109ee4d535",5093:"e192c9080b7e430f8bfc",5145:"da831552b3b54ca47682",5163:"953e65e04ed31b0ea0b3",5403:"a8ce3bbae4ddbe632714",5516:"6b6f00fca2682a673f64",5551:"340e60e2342b0d93ebe7",5598:"52ad6e6d7d7b134ab0ba",5649:"5c1e55c9dad604880876",5711:"592f6b06b20ea7958f2e",5866:"039e25226b82968cca61",5871:"1571b33c7b086a73eadd",5899:"610e274e70fffca8c232",5901:"bf6858d021c8e6c577d5",5993:"0e5f49179c6a516963de",6025:"d669a0315da9d6fda6b3",6036:"5b373caaaa6e1ba4495f",6106:"1d31df88e63bf542ea7b",6166:"8b7dc7926d170fc11eac",6214:"5a578175aab923a979dc",6221:"56c4d15c823c019ddb39",6265:"4788a10b2e7019e41282",6456:"44f6b4ef758efe0fb876",6494:"7f264af8142cb9910c06",6625:"364cf21fe24d7e675de8",6631:"f4fa646ba9150ed60d55",6639:"a1bd5bf1d51c681561a1",6752:"912872ffa56a7243d664",6780:"36857414f568c0fc82b2",6831:"912351c7cf5f8ac16dfe",6884:"07642217627127113fb0",6925:"665969c4af4481df0691",6949:"f50051a55eaa8dd5e780",
6959:"61ce9bf171293ea37c54",7078:"aef234c059b0b7c64ae8",7111:"4716f3208dc337521c10",7149:"d450e8145ad7e6fbd67f",7194:"098c1a8da1ddbbda98f6",7232:"abf9ba18c92e46a44f3b",7260:"4c9c01959c7ebe94b74f",7271:"1c3f95ada81fc7c425a4",7350:"aa555ff9e17c4029aedd",7391:"c63bd39c42093cc4130c",7413:"3a52b91975b98e6fe8e4",7555:"ea682716c26bc13db765",7648:"d599965fb89ec8e183eb",7871:"df6a9177c293c0c53e80",7987:"2267a50d874703af7f28",8020:"520f315000510aab3003",8056:"c06a1c8fb4a1f18cf217",8115:"aef220eae07f8df278f7",8149:"9fb525d10e5c8ba95701",8167:"fd915cf05676c668486e",8385:"32e961c4a8591abe04cd",8399:"ebb97a8311b57f015b11",8537:"168b8df16f57900a29da",8643:"71b6b063699eb3e1407e",8890:"9d651e36d783aafef499",8904:"87e94e93ade13962a48f",9039:"0a3f1b99d355b6297d18",9138:"f516266ddcf6ca8c7064",9322:"fcbf1e7bff530c95a44f",9327:"0c38440ca52f144413ac",9374:"4660d2cad62644ff2ea9",9498:"3892fbd90646aa80aef1",9685:"6b7b2f52a18274053c99",9727:"f86b3426312923af0159",9789:"458feb5c8c0263b0618b",9795:"d66be24693cf931f6914",9842:"581808dd4a8651b16779",9916:"0c2cb2d12479a20efce1"}[e]+".js",r.miniCssF=e=>e+"."+{6:"362fa6a7ab1f3e3b06c4",855:"26e8cce3ad082b02cc26",898:"f909d7c1efc95f635922",1013:"01583b91f7384f25e038",1033:"5197f9f8b8500206d06c",1054:"d5b8033c360af91ed458",1109:"ec16a629917db2baf412",1365:"0116666d16b5bc64c47a",1762:"7ff6b353c441db2276da",2109:"39627406fe95483ff7db",2191:"6563d97efc3339a1e518",2260:"b98824e4829a1aa9b444",2587:"1f1100dc01693edfe269",2639:"c87f745c32020e3a8cff",2666:"fbb750fd312778403036",2676:"2d3cabbd39a3b0d6e9ea",2731:"df45c9c18811872fec07",2984:"57f5ad22257d1a4e1ef9",3066:"2acb4b086c32c9448837",3127:"fd89143aebe89e23faed",3502:"c49903f7222870ff8aca",3610:"62c553543d76c38edfbc",3717:"da244b56f00e05470918",3842:"6a8a7842ee841f6d2cff",3889:"a2646d6c3b33d166eee2",3896:"019229d7d874e1da11be",3980:"b2ff45a2d8bb6a131d7c",4015:"1d0e3a62a59d173c81f3",4081:"1a314e4dade74df359f0",4215:"d24836a292b1969ab4bb",4387:"bf2665aacf1dc00074fa",4894:"cc39b3740f4022cbd5cf",4987:"861f49973c19dc84365b",5145:"a2b224fd27ab2941c565",5163:"8dc3fd2d8bb68b7d880e",5403:"d6bd43a35209059f1060",5649:"b60ed09c5ea8c55827d4",5866:"c89b7fc29afe92efc1f3",5993:"d3e96a56dd65b0b2db55",6025:"263b457b1a7f9ca139b2",6036:"3b493a9f0ab052e6447c",6106:"cf6f129517250c80b39f",6214:"65b7dbf8be6cca5ac143",6221:"25d30f095d6a54fbf276",6494:"e9af15c073886bef781b",6625:"cd54dd2a77c47eb6003d",6639:"cea47dbe77ae73ace44b",6752:"207eb3cc75b3ed2c6754",6831:"ac1745947bd2665f6c9a",6884:"bb7d30a7bbbe5af36556",6925:"43e91cba4f1aefba5311",6949:"19355e81a60b640ea097",6959:"0cd4b06da6b4fd1fcc56",7111:"b16b4eb739a7e8577559",7149:"12adbb19fdefe9b66b18",7194:"e04f69c8933166966874",7232:"dfa17050a6458c8bf3da",7350:"abf568a3d6ce7b47cc59",7391:"9c809fa91ed0c8f75bc0",7413:"f830ad1ad6ee6f9b1cb3",7555:"8c1e3939e7666b0f8c69",7871:"cb99fc4ec9bbe0895a26",8056:"a83d512c1dc2173349a1",8149:"21f2b01074a4d082e268",8399:"525ea48565b11d84e370",8904:"a302177fe7e3ccd50cb0",9138:"03b8fbcfabcae851949a",9322:"beec29aa1b9aa9601ccf",9327:"e6fe2b8bd7bfc4b93efe",9789:"cb5ad20bc727d3820b6c",
9842:"2f8e5864b0d72a886373",9916:"60c48148a54dba9504a0"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.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),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="tradingview:",r.l=(e,a,c,t)=>{if(d[e])d[e].push(a);else{var b,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var s=n[i];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==f+c){b=s;break}}b||(o=!0,(b=document.createElement("script")).charset="utf-8",b.timeout=120,r.nc&&b.setAttribute("nonce",r.nc),b.setAttribute("data-webpack",f+c),b.src=e,0!==b.src.indexOf(window.location.origin+"/")&&(b.crossOrigin="anonymous")),d[e]=[a];var l=(a,c)=>{b.onerror=b.onload=null,clearTimeout(u);var f=d[e];if(delete d[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(c))),a)return a(c)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=l.bind(null,b.onerror),b.onload=l.bind(null,b.onload),o&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var a=r.g.document;if(!e&&a&&(a.currentScript&&(e=a.currentScript.src),!e)){var c=a.getElementsByTagName("script");c.length&&(e=c[c.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.g.location&&r.p.startsWith(r.g.location.origin)&&(r.p=r.p.slice(r.g.location.origin.length)),(()=>{const e=r.u;r.u=a=>e(a).replace("__LANG__",r.g.language)})(),r.p=r.g.WEBPACK_PUBLIC_PATH||r.p;var o=r.e,n=Object.create(null);function i(e,a){return o(e).catch((function(){return new Promise((function(c){var d=function(){self.removeEventListener("online",d,!1),!1===navigator.onLine?self.addEventListener("online",d,!1):c(a<2?i(e,a+1):o(e))};setTimeout(d,a*a*1e3)}))}))}r.e=function(e){if(!n[e]){n[e]=i(e,0);var a=function(){delete n[e]};n[e].then(a,a)}return n[e]},(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((a,c)=>{var d=r.miniCssF(e),f=r.p+d;if(((e,a)=>{for(var c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var f=(b=c[d]).getAttribute("data-href")||b.getAttribute("href");if("stylesheet"===b.rel&&(f===e||f===a))return b}var t=document.getElementsByTagName("style");for(d=0;d<t.length;d++){var b;if((f=(b=t[d]).getAttribute("data-href"))===e||f===a)return b}})(d,f))return a();((e,a,c,d,f)=>{var t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.onerror=t.onload=c=>{if(t.onerror=t.onload=null,
"load"===c.type)d();else{var b=c&&("load"===c.type?"missing":c.type),r=c&&c.target&&c.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,t.parentNode&&t.parentNode.removeChild(t),f(o)}},t.href=a,0!==t.href.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous"),c?c.parentNode.insertBefore(t,c.nextSibling):document.head.appendChild(t)})(e,f,null,a,c)})),a={3666:0};r.f.miniCss=(c,d)=>{a[c]?d.push(a[c]):0!==a[c]&&{6:1,855:1,898:1,1013:1,1033:1,1054:1,1109:1,1365:1,1762:1,2109:1,2191:1,2260:1,2587:1,2639:1,2666:1,2676:1,2731:1,2984:1,3066:1,3127:1,3502:1,3610:1,3717:1,3842:1,3889:1,3896:1,3980:1,4015:1,4081:1,4215:1,4387:1,4894:1,4987:1,5145:1,5163:1,5403:1,5649:1,5866:1,5993:1,6025:1,6036:1,6106:1,6214:1,6221:1,6494:1,6625:1,6639:1,6752:1,6831:1,6884:1,6925:1,6949:1,6959:1,7111:1,7149:1,7194:1,7232:1,7350:1,7391:1,7413:1,7555:1,7871:1,8056:1,8149:1,8399:1,8904:1,9138:1,9322:1,9327:1,9789:1,9842:1,9916:1}[c]&&d.push(a[c]=e(c).then((()=>{a[c]=0}),(e=>{throw delete a[c],e})))}}})(),(()=>{var e={3666:0,3515:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1(0(13|33|54)|109|365|762)|2(6(39|66|76)|109|191|260|587|731|984)|3(8(42|89|96)|[06]66|127|502|515|610|717|980)|4([02]15|[39]87|081|894)|5((16|40|99)3|145|649|866)|6(9(25|49|59)|[06]25|(21|49|88)4||036|106|221|639|752|831)|7(1(11|49|94)|232|350|391|413|555|871)|8(056|149|399|55|904|98)|9(32[27]|138|789|842|916))$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var t=r.p+r.u(a),b=new Error;r.l(t,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),t=c&&c.target&&c.target.src;b.message="Loading chunk "+a+" failed.\n("+f+": "+t+")",b.name="ChunkLoadError",b.type=f,b.request=t,d[1](b)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[t,b,o]=c,n=0;if(t.some((a=>0!==e[a]))){for(d in b)r.o(b,d)&&(r.m[d]=b[d]);if(o)var i=o(r)}for(a&&a(c);n<t.length;n++)f=t[n],r.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return r.O(i)},c=self.webpackChunktradingview=self.webpackChunktradingview||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})(),(()=>{const{miniCssF:e}=r;r.miniCssF=a=>self.document&&"rtl"===self.document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();

View File

@@ -1,5 +1,5 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6780],{92229:e=>{e.exports={defaultsButtonText:"defaultsButtonText-zcLkuEMM",defaultsButtonItem:"defaultsButtonItem-zcLkuEMM",defaultsButtonIcon:"defaultsButtonIcon-zcLkuEMM"}},47334:e=>{e.exports={themesButtonText:"themesButtonText-AeBgp7zz",themesButtonIcon:"themesButtonIcon-AeBgp7zz",defaultsButtonText:"defaultsButtonText-AeBgp7zz",defaultsButtonItem:"defaultsButtonItem-AeBgp7zz"}},55309:e=>{e.exports={scrollable:"scrollable-Ycj0dUGE",tabs:"tabs-Ycj0dUGE"}},53018:e=>{e.exports={titleWrap:"titleWrap-e3jFxbHm",ellipsis:"ellipsis-e3jFxbHm",hideInput:"hideInput-e3jFxbHm",hideText:"hideText-e3jFxbHm",empty:"empty-e3jFxbHm",hideEmpty:"hideEmpty-e3jFxbHm",editIcon:"editIcon-e3jFxbHm"}},31202:e=>{e.exports={tabs:"tabs-xNPrJ8dY"}},38546:(e,t,i)=>{"use strict";i.d(t,{DialogTabs:()=>n});var a=i(50959),s=i(64378);const n=a.forwardRef((function(e,t){const{id:i,tabs:n,activeTab:r,onChange:o,className:l}=e;return a.createElement("div",{className:l,ref:t},a.createElement(s.UnderlineButtonTabs,{id:i,items:n,isActive:function(e){return e.id===r},onActivate:function(e){o(e.id)}}))}))},50945:(e,t,i)=>{"use strict";i.d(t,{StudyDefaultsManager:()=>p});var a=i(50959),s=i(97754),n=i.n(s),r=i(9745),o=i(44352),l=i(95276),c=i(16396),d=i(44996),u=i(92229);const h={reset:o.t(null,void 0,i(79782)),saveAsDefault:o.t(null,void 0,i(18229)),defaults:o.t(null,void 0,i(98938))};class p extends a.PureComponent{constructor(){super(...arguments),this._handleResetToDefaults=()=>{this.props.model.restorePropertiesForSource(this.props.source)},this._handleSaveAsDefaults=()=>{this.props.source.properties().saveDefaults()}}render(){const{mode:e}=this.props;return a.createElement(l.ControlDisclosure,{id:"study-defaults-manager",className:n()("normal"===e&&u.defaultsButtonText),hideArrowButton:"compact"===e,buttonChildren:this._getPlaceHolderItem("compact"===e)},a.createElement(c.PopupMenuItem,{className:u.defaultsButtonItem,isActive:!1,label:h.reset,onClick:this._handleResetToDefaults}),a.createElement(c.PopupMenuItem,{className:u.defaultsButtonItem,isActive:!1,label:h.saveAsDefault,onClick:this._handleSaveAsDefaults}))}_getPlaceHolderItem(e){return e?a.createElement(r.Icon,{className:u.defaultsButtonIcon,icon:d}):h.defaults}}},48531:(e,t,i)=>{"use strict";i.d(t,{FooterMenu:()=>b});var a=i(50959),s=i(44352),n=i(9745),r=i(95276),o=i(90692),l=i(47334),c=i(44996);function d(e){return e.isTabletWidth?a.createElement(n.Icon,{className:l.themesButtonIcon,icon:c}):a.createElement(a.Fragment,null,s.t(null,void 0,i(19611)))}function u(e){return a.createElement(o.MatchMedia,{rule:"screen and (max-width: 768px)"},(t=>a.createElement(r.ControlDisclosure,{className:!t&&l.themesButtonText,hideArrowButton:t,buttonChildren:a.createElement(d,{isTabletWidth:t})},e.children)))}var h=i(16396),p=i(96040),m=i(70412),_=i(32563);function g(e){const{name:t,onRemove:i,onClick:s}=e,[n,r]=(0,m.useHover)(),o=a.useCallback((()=>s(t)),[s,t]),c=a.useCallback((()=>{i&&i(t)}),[i,t]);return a.createElement("div",{...r
},a.createElement(h.PopupMenuItem,{className:l.defaultsButtonItem,isActive:!1,label:t,onClick:o,toolbox:i&&a.createElement(p.RemoveButton,{hidden:!_.mobiletouch&&!n,onClick:c})}))}function f(e){return a.createElement(u,null,a.createElement(g,{onClick:function(){const{sources:t,chartUndoModel:i}=e;i.restoreLineToolsFactoryDefaults(t)},name:s.t(null,void 0,i(67049))}))}function b(e){return a.createElement(f,{...e})}},37289:(e,t,i)=>{"use strict";i.d(t,{PropertiesEditorTab:()=>c});var a=i(50959),s=i(66849);const n={"Elliott Impulse Wave (12345)Degree":"normal","Elliott Triangle Wave (ABCDE)Degree":"normal","Elliott Triple Combo Wave (WXYXZ)Degree":"normal","Elliott Correction Wave (ABC)Degree":"normal","Elliott Double Combo Wave (WXY)Degree":"normal",BarsPatternMode:"normal",StudyInputSource:"normal"},r={TextText:"big",AnchoredTextText:"big",NoteText:"big",AnchoredNoteText:"big",CalloutText:"big",BalloonText:"big"};var o=i(11062),l=i(15650);function c(e){const{page:t,pageRef:i,tableKey:c}=e;return a.createElement(s.ControlCustomHeightContext.Provider,{value:r},a.createElement(s.ControlCustomWidthContext.Provider,{value:n},t&&a.createElement(o.PropertyTable,{reference:i,key:c},t.definitions.value().map((e=>a.createElement(l.Section,{key:e.id,definition:e}))))))}},75892:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SourcePropertiesEditorRenderer:()=>M});var a=i(50959),s=i(962),n=i(76422),r=i(50151),o=i(49483),l=i(56840),c=i.n(l),d=i(44352),u=i(50182),h=i(59064),p=i(48531),m=i(37289),_=i(86656),g=i(37591),f=i(92249),b=i(50945),v=i(28853),T=i(76544),S=i(13087),k=i(8708),y=i(90692),z=i(36298),D=i(38546),I=i(68495),x=i(14483),C=i(55309);const L=new z.TranslatedString("change {sourceTitle} title to {newSourceTitle}",d.t(null,void 0,i(40001)));class E extends a.PureComponent{constructor(e){super(e),this._activePageRef=a.createRef(),this._handleChangeMode=e=>{this.setState({isRenaming:e})},this._getTranslatedStringForSource=e=>new z.TranslatedString(e.name(),e.title(g.TitleDisplayTarget.StatusLine)),this._setTitle=e=>{const{source:t,model:i}=this.props,a=L.format({sourceTitle:t.properties().title.value()||this._getTranslatedStringForSource(t),newSourceTitle:e});i.setProperty(t.properties().title,e,a,!0)},this._getActionPageById=e=>{if(!e)return;const{pages:t}=this.props;return t.find((t=>t.id.toLowerCase()===e.toLowerCase()))},this._onChangeActivePageDefinitions=()=>{this.setState({tableKey:Date.now()},(()=>{this._requestResize&&this._requestResize()}))},this._renderFooterLeft=()=>{const{source:e,model:t}=this.props;return(0,f.isLineTool)(e)?a.createElement(p.FooterMenu,{sources:[e],chartUndoModel:t}):a.createElement(y.MatchMedia,{rule:"screen and (max-width: 430px)"},(i=>(0,v.isStudy)(e)&&a.createElement(b.StudyDefaultsManager,{model:t,source:e,mode:i?"compact":"normal"})))},this._subscribe=e=>{e&&e.definitions.subscribe(this._onChangeActivePageDefinitions)},this._unsubscribe=e=>{e&&e.definitions.unsubscribe(this._onChangeActivePageDefinitions)},this._getActiveTabSettingsName=()=>{const{source:e}=this.props
},a.createElement(h.PopupMenuItem,{className:l.defaultsButtonItem,isActive:!1,label:t,onClick:o,toolbox:i&&a.createElement(p.RemoveButton,{hidden:!_.mobiletouch&&!n,onClick:c})}))}function f(e){return a.createElement(u,null,a.createElement(g,{onClick:function(){const{sources:t,chartUndoModel:i}=e;i.restoreLineToolsFactoryDefaults(t)},name:s.t(null,void 0,i(67049))}))}function b(e){return a.createElement(f,{...e})}},37289:(e,t,i)=>{"use strict";i.d(t,{PropertiesEditorTab:()=>c});var a=i(50959),s=i(66849);const n={"Elliott Impulse Wave (12345)Degree":"normal","Elliott Triangle Wave (ABCDE)Degree":"normal","Elliott Triple Combo Wave (WXYXZ)Degree":"normal","Elliott Correction Wave (ABC)Degree":"normal","Elliott Double Combo Wave (WXY)Degree":"normal",BarsPatternMode:"normal",StudyInputSource:"normal"},r={TextText:"big",AnchoredTextText:"big",NoteText:"big",AnchoredNoteText:"big",CalloutText:"big",BalloonText:"big"};var o=i(11062),l=i(15650);function c(e){const{page:t,pageRef:i,tableKey:c}=e;return a.createElement(s.ControlCustomHeightContext.Provider,{value:r},a.createElement(s.ControlCustomWidthContext.Provider,{value:n},t&&a.createElement(o.PropertyTable,{reference:i,key:c},t.definitions.value().map((e=>a.createElement(l.Section,{key:e.id,definition:e}))))))}},75892:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SourcePropertiesEditorRenderer:()=>M});var a=i(50959),s=i(962),n=i(76422),r=i(50151),o=i(49483),l=i(56840),c=i.n(l),d=i(44352),u=i(50182),h=i(59064),p=i(48531),m=i(37289),_=i(86656),g=i(37591),f=i(92249),b=i(50945),v=i(28853),T=i(76544),S=i(13087),k=i(8708),y=i(90692),z=i(36298),D=i(38546),I=i(68495),x=i(14483),C=i(55309);const L=new z.TranslatedString("change {sourceTitle} title to {newSourceTitle}",d.t(null,void 0,i(40001)));class E extends a.PureComponent{constructor(e){super(e),this._activePageRef=a.createRef(),this._handleChangeMode=e=>{this.setState({isRenaming:e})},this._getTranslatedStringForSource=e=>new z.TranslatedString(e.name(),e.title(g.TitleDisplayTarget.StatusLine)),this._setTitle=e=>{const{source:t,model:i}=this.props,a=L.format({sourceTitle:t.properties().title.value()||this._getTranslatedStringForSource(t),newSourceTitle:e});i.setProperty(t.properties().title,e,a,false)},this._getActionPageById=e=>{if(!e)return;const{pages:t}=this.props;return t.find((t=>t.id.toLowerCase()===e.toLowerCase()))},this._onChangeActivePageDefinitions=()=>{this.setState({tableKey:Date.now()},(()=>{this._requestResize&&this._requestResize()}))},this._renderFooterLeft=()=>{const{source:e,model:t}=this.props;return(0,f.isLineTool)(e)?a.createElement(p.FooterMenu,{sources:[e],chartUndoModel:t}):a.createElement(y.MatchMedia,{rule:"screen and (max-width: 430px)"},(i=>(0,v.isStudy)(e)&&a.createElement(b.StudyDefaultsManager,{model:t,source:e,mode:i?"compact":"normal"})))},this._subscribe=e=>{e&&e.definitions.subscribe(this._onChangeActivePageDefinitions)},this._unsubscribe=e=>{e&&e.definitions.unsubscribe(this._onChangeActivePageDefinitions)},this._getActiveTabSettingsName=()=>{const{source:e}=this.props
;return e instanceof T.Series?"properties_dialog.active_tab.chart":e instanceof S.LineDataSource?"properties_dialog.active_tab.drawing":e instanceof k.Study?"properties_dialog.active_tab.study":""},this._handleSelectPage=e=>{const{activePageId:t}=this.state,i=this._getActionPageById(t),a=this._getActionPageById(e),s=this._getActiveTabSettingsName();t!==e&&(this._unsubscribe(i),s&&c().setValue(s,e),this._subscribe(a),this.setState({activePageId:e,tableKey:Date.now()},(()=>{this._requestResize&&this._requestResize(),this._focusActivePageFirstTextInput()})))},this._handleScroll=()=>{h.globalCloseDelegate.fire()},this._handleSubmit=()=>{this.props.onSubmit(),this._closePopupDialog()},this._closePopupDialog=()=>{window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh(),this.props.onClose()};const{pages:t}=this.props;let i;if(this._getActionPageById(this.props.activePageId))i=(0,r.ensureDefined)(this.props.activePageId);else{const e=c().getValue(this._getActiveTabSettingsName(),""),a=this._getActionPageById(e);i=a?a.id:t[0].id}this.state={activePageId:i,tableKey:Date.now(),isRenaming:!1},window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide()}componentDidMount(){const{activePageId:e}=this.state,t=this._getActionPageById(e);this._focusActivePageFirstTextInput(),this._subscribe(t)}componentWillUnmount(){const{activePageId:e}=this.props,t=this._getActionPageById(e);clearTimeout(this._timeout),this._unsubscribe(t)}render(){var e;const{onCancel:t,source:i}=this.props,{activePageId:s,isRenaming:n}=this.state,r=(null===(e=i.properties().title)||void 0===e?void 0:e.value())||i.title(g.TitleDisplayTarget.StatusLine),o=a.createElement(I.Title,{isRenaming:n,onChangeMode:this._handleChangeMode,setTitle:this._setTitle,defaultTitle:r,canBeRenamed:(0,f.isLineTool)(i)&&!x.enabled("widget")});return a.createElement(u.AdaptiveConfirmDialog,{dataName:(0,v.isStudy)(i)?"indicator-properties-dialog":"source-properties-editor",dataDialogName:r,title:o,isOpened:!0,onSubmit:this._handleSubmit,onCancel:t,onClickOutside:this._handleSubmit,onClose:this._closePopupDialog,footerLeftRenderer:this._renderFooterLeft,render:this._renderChildren(s),submitOnEnterKey:!1,showCloseIcon:!n})}_renderChildren(e){return({requestResize:t})=>{this._requestResize=t;const{pages:i,source:s}=this.props,n=i.find((t=>t.id===e)),r=(0,v.isStudy)(s)?"indicator-properties-dialog-tabs":"source-properties-editor-tabs",o=i.map((({title:e,id:t})=>({label:e,id:t,dataId:`${r}-${t}`})));return a.createElement(a.Fragment,null,a.createElement(D.DialogTabs,{className:C.tabs,id:r,activeTab:e,onChange:this._handleSelectPage,tabs:o}),a.createElement(_.TouchScrollContainer,{className:C.scrollable,onScroll:this._handleScroll},a.createElement(m.PropertiesEditorTab,{page:n,pageRef:this._activePageRef,tableKey:this.state.tableKey})))}}_focusActivePageFirstTextInput(){if(!o.CheckMobile.any()&&this._activePageRef.current){const e=this._activePageRef.current.querySelector("input[type=text],textarea");e&&(this._timeout=setTimeout((()=>{e.focus()}),0))}}}
var w=i(85067);class M extends w.DialogRenderer{constructor(e){super(),this._timeout=null,this._handleClose=()=>{s.unmountComponentAtNode(this._container),this._setVisibility(!1),this._onClose&&this._onClose(),this._subscription.unsubscribe(this,this._handleCollectionChanged)},this._handleSubmit=()=>{const e=this._source;(0,f.isLineTool)(e)&&e.hasAlert.value()&&setTimeout((()=>{e.areLocalAndServerAlertsMismatch()&&e.synchronizeAlert(!0)}))},this._handleCancel=()=>{this._model.undoToCheckpoint(this._checkpoint)},this._propertyPages=e.propertyPages,this._model=e.model,this._activePageId=e.activePageId,this._onClose=e.onClose,this._source=e.source,this._checkpoint=this._ensureCheckpoint(e.undoCheckPoint),this._subscription=this._model.model().dataSourceCollectionChanged(),this._subscription.subscribe(this,this._handleCollectionChanged)}hide(e){e?this._handleCancel():this._handleSubmit(),this._handleClose()}isVisible(){return this.visible().value()}show(e){s.render(a.createElement(E,{source:this._source,onSubmit:this._handleSubmit,onClose:this._handleClose,onCancel:this._handleCancel,pages:this._propertyPages,model:this._model,activePageId:this._activePageId,shouldReturnFocus:null==e?void 0:e.shouldReturnFocus}),this._container),this._setVisibility(!0),n.emit("drawings_settings_dialog",{objectType:"drawing",scriptTitle:this._source.title(g.TitleDisplayTarget.StatusLine)})}_handleCollectionChanged(){null===this._timeout&&(this._timeout=setTimeout((()=>{this._closeDialogIfSourceIsDeleted(),this._timeout=null})))}_closeDialogIfSourceIsDeleted(){null===this._model.model().dataSourceForId(this._source.id())&&this._handleClose()}_ensureCheckpoint(e){return void 0===e&&(e=this._model.createUndoCheckpoint()),e}}},68495:(e,t,i)=>{"use strict";i.d(t,{Title:()=>h});var a=i(50959),s=i(97754),n=i(31261),r=i(9745),o=i(21861),l=i(68335),c=i(51768),d=i(33055),u=i(53018);function h(e){const{isRenaming:t,onChangeMode:i,setTitle:h,defaultTitle:p,canBeRenamed:m}=e,_=(0,a.useRef)(null),[g,f]=(0,a.useState)(p),[b,v]=(0,a.useState)(p);return(0,a.useEffect)((()=>{t&&_.current&&(_.current.focus(),_.current.setSelectionRange(0,g.length))}),[t]),a.createElement(a.Fragment,null,a.createElement("div",{className:s(u.titleWrap,t&&u.hideText)},a.createElement("span",{className:u.ellipsis}," ",b),m&&a.createElement(a.Fragment,null,a.createElement(r.Icon,{className:s(u.editIcon),icon:d,onClick:function(){(0,c.trackEvent)("GUI","Rename","Drawing settings"),f(b),i(!0)},"data-name":"edit","data-role":"button"}),a.createElement("div",{className:s(u.empty,!t&&u.hideEmpty)}))),m&&a.createElement("div",{className:s(!t&&u.hideInput),"data-disable-drag":!0},a.createElement(n.InputControl,{value:g,onChange:function(e){f(e.currentTarget.value)},onBlur:T,reference:_,onClick:o.preventDefault,onKeyDown:function(e){27===(0,l.hashFromEvent)(e)&&(e.preventDefault(),f(p),i(!1));13===(0,l.hashFromEvent)(e)&&(e.preventDefault(),T())},"data-disable-drag":!0,stretch:!0})));function T(){""!==g&&(h(g),v(g)),i(!1)}}},66512:(e,t,i)=>{"use strict";i.r(t),i.d(t,{
SourcesPropertiesEditorRenderer:()=>f});var a=i(50959),s=i(962),n=i(85067),r=i(44352),o=i(86656),l=i(50182),c=i(48531),d=i(37289),u=i(68495),h=i(14483),p=i(38546),m=i(31202);const _=r.t(null,void 0,i(37214));function g(e){const{propertyPages:t,onSubmit:i,onCancel:s,onClose:n,title:r,activeTabId:g,sources:f,undoModel:b,renamable:v}=e,T=g&&t.filter((e=>e.id===g)).length>0?g:t[0].id,S=b.model().lineToolsGroupModel().groupForLineTool(f[0]),k=!!(v&&S&&r&&f.every((e=>{var t;return(null==S?void 0:S.id)===(null===(t=b.model().lineToolsGroupModel().groupForLineTool(e))||void 0===t?void 0:t.id)}))),[y,z]=(0,a.useState)(T),[D,I]=(0,a.useState)(!1),[x,C]=(0,a.useState)(r||_),L=(0,a.useMemo)((()=>t.map((({title:e,id:t})=>({label:e,id:t,dataId:`sources-properties-editor-tabs-${t}`})))),[t]);const E=a.createElement(u.Title,{isRenaming:D,onChangeMode:function(e){I(e)},setTitle:function(e){S&&(S.setName(e),C(e))},defaultTitle:x,canBeRenamed:k&&!h.enabled("widget")});return a.createElement(l.AdaptiveConfirmDialog,{dataName:"sources-properties-editor",dataDialogName:x,title:E,isOpened:!0,onSubmit:i,onCancel:s,onClickOutside:n,onClose:n,footerLeftRenderer:function(){return a.createElement(c.FooterMenu,{sources:f,chartUndoModel:b})},render:function(){const e=t.find((e=>e.id===y));return a.createElement(a.Fragment,null,a.createElement(p.DialogTabs,{className:m.tabs,id:"sources-properties-editor-tabs",activeTab:y,onChange:z,tabs:L}),a.createElement(o.TouchScrollContainer,null,a.createElement(d.PropertiesEditorTab,{page:e,tableKey:y})))},submitOnEnterKey:!1,showCloseIcon:!D})}class f extends n.DialogRenderer{constructor(e){super(),this._dataSourceChangedPromise=null,this._submitHandler=()=>{Promise.resolve().then((()=>{this._sources.map((e=>{e.areLocalAndServerAlertsMismatch()&&e.synchronizeAlert(!0)}))})),this._close()},this._cancelHandler=()=>{this._undoModel.undoToCheckpoint(this._undoCheckpoint)},this._closeHandler=()=>{this._close()},this._dataSourceCollectionChangedHandler=()=>{null===this._dataSourceChangedPromise&&(this._dataSourceChangedPromise=Promise.resolve().then((()=>{const e=this._undoModel.model();this._sources.find((t=>null===e.dataSourceForId(t.id())))&&this._close(),this._dataSourceChangedPromise=null})))},this._sources=e.sources,this._propertyPages=e.propertyPages,this._undoModel=e.undoModel,this._title=e.title,this._activeTabId=e.activeTabId,this._renamable=e.renamable,this._undoCheckpoint=this._undoModel.createUndoCheckpoint(),this._undoModel.model().dataSourceCollectionChanged().subscribe(this,this._dataSourceCollectionChangedHandler)}destroy(){this._close()}show(){this._isVisible()||(this._mount(),this._setVisibility(!0))}hide(){this._isVisible()&&(this._unmount(),this._setVisibility(!1))}_mount(){s.render(a.createElement(g,{propertyPages:this._propertyPages,sources:this._sources,undoModel:this._undoModel,onSubmit:this._submitHandler,onCancel:this._cancelHandler,onClose:this._closeHandler,title:this._title,activeTabId:this._activeTabId,renamable:this._renamable}),this._container)}_unmount(){

View File

@@ -1,11 +0,0 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6631],{70048:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",box:"box-GZajBGIm",icon:"icon-GZajBGIm",noOutline:"noOutline-GZajBGIm","intent-danger":"intent-danger-GZajBGIm",check:"check-GZajBGIm",dot:"dot-GZajBGIm"}},69789:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},83073:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},55596:e=>{e.exports={dialog:"dialog-b8SxMnzX",wrapper:"wrapper-b8SxMnzX",separator:"separator-b8SxMnzX",bounded:"bounded-b8SxMnzX"}},69827:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-BZKENkhT",unsetAlign:"unsetAlign-BZKENkhT",title:"title-BZKENkhT",subtitle:"subtitle-BZKENkhT",textWrap:"textWrap-BZKENkhT",ellipsis:"ellipsis-BZKENkhT",close:"close-BZKENkhT",icon:"icon-BZKENkhT"}},45719:e=>{e.exports={separator:"separator-Pf4rIzEt"}},70673:(e,t,a)=>{"use strict";a.d(t,{CheckboxInput:()=>d});var n=a(50959),i=a(97754),s=a(90186),o=a(9745),l=a(65890),r=a(70048),c=a.n(r);function d(e){const t=i(c().box,c()[`intent-${e.intent}`],{[c().check]:!Boolean(e.indeterminate),[c().dot]:Boolean(e.indeterminate),[c().noOutline]:-1===e.tabIndex}),a=i(c().wrapper,e.className);return n.createElement("span",{className:a,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:c().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,s.filterDataProps)(e)}),n.createElement("span",{className:t},n.createElement(o.Icon,{icon:l,className:c().icon})))}},15294:(e,t,a)=>{"use strict";a.d(t,{Checkbox:()=>c});var n=a(50959),i=a(97754),s=a(57733),o=a(70673),l=a(69789),r=a.n(l);class c extends n.PureComponent{render(){const{inputClassName:e,labelClassName:t,...a}=this.props,s=i(this.props.className,r().checkbox,{[r().reverse]:Boolean(this.props.labelPositionReverse),[r().baseline]:Boolean(this.props.labelAlignBaseline)}),l=i(r().label,t,{[r().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=n.createElement("span",{className:l,title:this.props.title},this.props.label)),n.createElement("label",{className:s},n.createElement(o.CheckboxInput,{...a,className:e}),c)}}c.defaultProps={value:"on"};(0,s.makeSwitchGroupItem)(c)},57733:(e,t,a)=>{"use strict";a.d(t,{SwitchGroup:()=>o,makeSwitchGroupItem:()=>l});var n=a(50959);const i=function(){},s=(0,n.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>i,subscribe:i,unsubscribe:i});class o extends n.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,
this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return n.createElement(s.Provider,{value:this.state.switchGroupContext},this.props.children)}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((a=>t.includes(a)?!e.includes(a):e.includes(a)))}}function l(e){var t;return t=class extends n.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return n.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=s,t}},50182:(e,t,a)=>{"use strict";a.d(t,{AdaptiveConfirmDialog:()=>u});var n=a(50959),i=a(97754),s=a.n(i),o=a(94720),l=a(50151),r=a(44352),c=a(68335),d=a(35057),m=a(83073);class u extends n.PureComponent{constructor(){super(...arguments),this._dialogRef=n.createRef(),this._handleClose=()=>{const{defaultActionOnClose:e,onSubmit:t,onCancel:a,onClose:n}=this.props;switch(e){case"submit":t();break;case"cancel":a()}n()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=e=>{const{onSubmit:t,submitButtonDisabled:a,submitOnEnterKey:n}=this.props;13===(0,c.hashFromEvent)(e)&&n&&(e.preventDefault(),a||t())}}render(){const{render:e,onClose:t,onSubmit:a,onCancel:i,footerLeftRenderer:s,submitButtonText:o,submitButtonDisabled:l,defaultActionOnClose:r,submitOnEnterKey:c,...m}=this.props;return n.createElement(d.AdaptivePopupDialog,{...m,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,l.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return e=>{const{render:t,footerLeftRenderer:i,additionalButtons:l,submitButtonText:c,submitButtonDisabled:d,onSubmit:u,cancelButtonText:h,showCancelButton:p=!0,submitButtonClassName:b,cancelButtonClassName:v,buttonsWrapperClassName:g}=this.props;return n.createElement(n.Fragment,null,t(e),n.createElement("div",{className:m.footer},i&&i(e.isSmallWidth),n.createElement("div",{className:s()(m.buttons,g)},l,p&&n.createElement(o.Button,{className:v,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=h?h:r.t(null,void 0,a(20036))),n.createElement("span",{className:m.submitButton},n.createElement(o.Button,{className:b,disabled:d,name:"submit",onClick:u,"data-name":"submit-button"},null!=c?c:r.t(null,void 0,a(68988)))))))}}}u.defaultProps={defaultActionOnClose:"submit",
submitOnEnterKey:!0}},35057:(e,t,a)=>{"use strict";a.d(t,{AdaptivePopupDialog:()=>T});var n=a(50959),i=a(50151);var s=a(97754),o=a.n(s),l=a(68335),r=a(38223),c=a(35749),d=a(63016),m=a(1109),u=a(24437),h=a(90692),p=a(95711);var b=a(52092),v=a(76422),g=a(9745);const _=n.createContext({setHideClose:()=>{}});var f=a(7720),S=a(69827);function y(e){const{title:t,titleTextWrap:a=!1,subtitle:i,showCloseIcon:s=!0,onClose:l,onCloseButtonKeyDown:r,renderBefore:c,renderAfter:d,draggable:m,className:u,unsetAlign:h,closeAriaLabel:p,closeButtonReference:b}=e,[v,y]=(0,n.useState)(!1);return n.createElement(_.Provider,{value:{setHideClose:y}},n.createElement("div",{className:o()(S.container,u,(i||h)&&S.unsetAlign)},c,n.createElement("div",{"data-dragg-area":m,className:S.title},n.createElement("div",{className:o()(a?S.textWrap:S.ellipsis)},t),i&&n.createElement("div",{className:o()(S.ellipsis,S.subtitle)},i)),d,s&&!v&&n.createElement("button",{className:S.close,onClick:l,onKeyDown:r,"data-name":"close","aria-label":p,type:"button",ref:b},n.createElement(g.Icon,{className:S.icon,icon:f,"data-name":"close","data-role":"button"}))))}var w=a(53017),C=a(90186),N=a(55596);const x={vertical:20},k={vertical:0};class T extends n.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleCloseBtnClick=()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleClose()},this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(u.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{if(!e.defaultPrevented){if(this.props.onKeyDown&&this.props.onKeyDown(e),27===(0,l.hashFromEvent)(e)){if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose();const{activeElement:a}=document,n=(0,i.ensureNotNull)(this._reference);if(null!==a){if(e.preventDefault(),"true"===(t=a).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if((0,c.isTextEditingField)(a))return void n.focus();if(n.contains(a))return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose()}}var t,a;(function(e){if("function"==typeof e)return e();return Boolean(e)})(this.props.disableTabNavigationContainment)||(a=e,[9,l.Modifiers.Shift+9].includes((0,l.hashFromEvent)(a))&&a.stopPropagation())}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()},this._calculatePositionWithOffsets=(e,t)=>{const a=(0,i.ensureDefined)(this.props.fullScreenViewOffsets).value();return{top:a.top,left:(0,
r.isRtl)()?-a.right:a.left,width:t.clientWidth-a.left-a.right,height:t.clientHeight-a.top-a.bottom}}}componentDidMount(){var e,t;this.props.ignoreClosePopupsAndDialog||v.subscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.subscribe(this._requestResize)}componentWillUnmount(){var e,t;this.props.ignoreClosePopupsAndDialog||v.unsubscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.unsubscribe(this._requestResize)}focus(){(0,i.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,a;return null!==(a=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==a&&a}render(){const{className:e,wrapperClassName:t,headerClassName:a,isOpened:i,title:s,titleTextWrap:l,dataName:r,onClickOutside:c,additionalElementPos:b,additionalHeaderElement:v,backdrop:g,shouldForceFocus:_=!0,shouldReturnFocus:f,showSeparator:S,subtitle:T,draggable:E=!0,fullScreen:D=!1,showCloseIcon:I=!0,rounded:B=!0,isAnimationEnabled:L,growPoint:O,dialogTooltip:M,unsetHeaderAlign:A,onDragStart:z,dataDialogName:P,closeAriaLabel:R,containerAriaLabel:j,reference:K,containerTabIndex:H,closeButtonReference:G,onCloseButtonKeyDown:W,shadowed:U,fullScreenViewOffsets:q}=this.props,F="after"!==b?v:void 0,Z="after"===b?v:void 0,V="string"==typeof s?s:P||"",Q=(0,C.filterDataProps)(this.props),Y=(0,w.mergeRefs)([this._handleReference,K]);return n.createElement(h.MatchMedia,{rule:u.DialogBreakpoints.SmallHeight},(b=>n.createElement(h.MatchMedia,{rule:u.DialogBreakpoints.TabletSmall},(u=>n.createElement(d.PopupDialog,{rounded:!(u||D)&&B,className:o()(N.dialog,D&&q&&N.bounded,e),isOpened:i,reference:Y,onKeyDown:this._handleKeyDown,onClickOutside:c,onClickBackdrop:c,fullscreen:u||D,guard:b?k:x,boundByScreen:u||D,shouldForceFocus:_,shouldReturnFocus:f,backdrop:g,draggable:E,isAnimationEnabled:L,growPoint:O,name:this.props.dataName,dialogTooltip:M,onDragStart:z,containerAriaLabel:j,containerTabIndex:H,calculateDialogPosition:D&&q?this._calculatePositionWithOffsets:void 0,shadowed:U,...Q},n.createElement("div",{className:o()(N.wrapper,t),"data-name":r,"data-dialog-name":V},void 0!==s&&n.createElement(y,{draggable:E&&!(u||D),onClose:this._handleCloseBtnClick,renderAfter:Z,renderBefore:F,subtitle:T,title:s,titleTextWrap:l,showCloseIcon:I,className:a,unsetAlign:A,closeAriaLabel:R,closeButtonReference:G,onCloseButtonKeyDown:W}),S&&n.createElement(m.Separator,{className:N.separator
}),n.createElement(p.PopupContext.Consumer,null,(e=>this._renderChildren(e,u||D)))))))))}}},1109:(e,t,a)=>{"use strict";a.d(t,{Separator:()=>o});var n=a(50959),i=a(97754),s=a(45719);function o(e){return n.createElement("div",{className:i(s.separator,e.className)})}},92297:e=>{e.exports={loading:"loading-BPaLXf0z"}},15747:e=>{e.exports={container:"container-CD9TBN7D",withSuggestions:"withSuggestions-CD9TBN7D",title:"title-CD9TBN7D",autocomplete:"autocomplete-CD9TBN7D",saveSymbol:"saveSymbol-CD9TBN7D",saveInterval:"saveInterval-CD9TBN7D",indicators:"indicators-CD9TBN7D",hintLabel:"hintLabel-CD9TBN7D",hintMark:"hintMark-CD9TBN7D"}},13932:(e,t,a)=>{"use strict";a.r(t),a.d(t,{StudyTemplateSaver:()=>P});var n=a(50151),i=a(44352),s=a(50959),o=a(962),l=(a(42053),a(97754)),r=a(15294),c=a(21788),d=a(9745),m=a(50182),u=a(60508),h=a(26996),p=a(92297);function b(e){const{isLoading:t}=e;return s.createElement("span",{className:t?p.loading:void 0},i.t(null,void 0,a(85520)),t&&s.createElement(h.Loader,{color:"white"}))}class v extends s.PureComponent{constructor(e){super(e),this._dialogRef=s.createRef(),this._manager=null,this._handleSubmit=()=>{this.setState({isLoading:!0}),this.props.onSubmit(this)},this.state={isLoading:!1}}render(){const{isOpened:e,saveDisabled:t,title:a,onClose:n}=this.props;return s.createElement(m.AdaptiveConfirmDialog,{ref:this._dialogRef,onClose:n,onSubmit:this._handleSubmit,onCancel:n,onClickOutside:n,isOpened:e,title:a,dataName:"save-rename-dialog",render:this._renderDialogBody(),defaultActionOnClose:"none",submitButtonText:s.createElement(b,{isLoading:this.state.isLoading}),submitButtonDisabled:t})}focus(){(0,n.ensureNotNull)(this._dialogRef.current).focus()}manager(){return this._manager}submit(){this.props.onSubmit(this)}close(){this.props.onClose()}dropLoading(){this.setState({isLoading:!1})}_renderDialogBody(){return()=>s.createElement(u.SlotContext.Consumer,null,(e=>(this._manager=e,this.props.children)))}}var g=a(33547),_=a(85508),f=a(15747);const S=i.t(null,void 0,a(50912)),y=i.t(null,void 0,a(40898)),w=i.t(null,void 0,a(33455)),C=i.t(null,void 0,a(63135));function N(e){const{title:t,saveSymbolHintText:a,saveIntervalHintText:i,indicatorsText:o,source:m,onClose:u,onSubmit:h}=e,[p,b]=(0,s.useState)(""),[N,x]=(0,s.useState)(!1),[k,T]=(0,s.useState)(!1),[E,D]=(0,s.useState)(!1),I=(0,s.useRef)(null),B=(0,s.useRef)(null);return(0,s.useEffect)((()=>{(0,n.ensureNotNull)(B.current).focus()}),[]),s.createElement(v,{ref:I,isOpened:!0,saveDisabled:!p,title:t,onClose:u,onSubmit:function(e){h({title:p,saveSymbol:N,saveInterval:k},e)}},s.createElement("div",{className:l(f.container,E&&f.withSuggestions)},s.createElement("div",{className:f.title},S),s.createElement("div",{className:f.autocomplete},s.createElement(c.Autocomplete,{maxLength:64,value:p,onChange:b,onBlur:function(){(0,n.ensureNotNull)(I.current).focus()},source:m,allowUserDefinedValues:!0,preventOnFocusOpen:!0,noEmptyText:!0,preventSearchOnEmptyQuery:!0,filter:g.autocompleteFilter,setupHTMLInput:function(e){B.current=e},onSuggestionsOpen:function(){
D(!0)},onSuggestionsClose:function(){D(!1)}})),s.createElement("div",{className:f.saveSymbol},s.createElement(r.Checkbox,{label:s.createElement("span",{className:f.hintLabel},w,s.createElement(d.Icon,{icon:_,className:l(f.hintMark,"apply-common-tooltip"),title:a})),onChange:function(){x(!N),(0,n.ensureNotNull)(I.current).focus()},checked:N})),s.createElement("div",{className:f.saveInterval},s.createElement(r.Checkbox,{label:s.createElement("span",{className:f.hintLabel},C,s.createElement(d.Icon,{icon:_,className:l(f.hintMark,"apply-common-tooltip"),title:i})),onChange:function(){T(!k),(0,n.ensureNotNull)(I.current).focus()},checked:k})),s.createElement("div",{className:f.title},y),s.createElement("div",{className:l(f.indicators,E&&f.withSuggestions)},o)))}var x=a(76422),k=a(52092);class T{constructor(e){this._container=document.createElement("div"),this.close=()=>{this.unmount(),this._onClose&&this._onClose()},this.unmount=()=>{x.unsubscribe(k.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null),o.unmountComponentAtNode(this._container)},this._title=e.title,this._saveSymbolHintText=e.saveSymbolHintText,this._saveIntervalHintText=e.saveIntervalHintText,this._indicatorsText=e.indicatorsText,this._source=e.source,this._onSubmit=e.onSubmit,this._onClose=e.onClose,x.subscribe(k.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null)}mount(){o.render(s.createElement(N,{title:this._title,saveSymbolHintText:this._saveSymbolHintText,saveIntervalHintText:this._saveIntervalHintText,indicatorsText:this._indicatorsText,source:this._source,onClose:this.close,onSubmit:this._onSubmit}),this._container)}destroy(){this.unmount()}show(){this.mount()}}var E=a(61595),D=a(3615),I=a(11321),B=a(39344);const L=i.t(null,void 0,a(21939)),O=i.t(null,void 0,a(61422)),M=i.t(null,void 0,a(30858)),A=i.t(null,void 0,a(83081));function z(e,t,a){const n=()=>{E.backend.invalidateStudyTemplatesList(),E.backend.getStudyTemplatesList().then(t)};E.backend.saveStudyTemplate(e).then(n)}class P{constructor(e){this._dialog=null,this._onSave=e=>{this._options.onSave(e),this._close()},this._showSaveDialog=async()=>{const e=this._controller.model().mainSeries().symbol(),t=this._controller.model().mainSeries().interval(),a=await this._getActualTemplateList();await this._showTemplateSaveRenameDialog(a,e,t)},this._close=()=>{this._dialog&&(this._dialog.destroy(),this._dialog=null)},this._options=e,this._controller=e.controller}show(){window.runOrSignIn(this._showSaveDialog,{source:"Study templates save as",sourceMeta:"Chart"})}_prepareData(e,t,a){const n=this._controller.model().studyTemplate(t,a);return{name:e,content:JSON.stringify(n),meta_info:(0,B.createStudyTemplateMetaInfo)(this._controller,n.interval)}}_doSave(e,t,a){const{title:n,saveSymbol:i,saveInterval:s}=t;if(!n)return;const o=a.manager()||void 0,l=this._prepareData(n,i,s);if(e.find((e=>e.name===n))){const e=e=>{e?z(l,this._onSave):(a.focus(),a.dropLoading())};(function(e,t){return new Promise((a=>(0,D.showConfirm)({text:A.format({templateName:e}),onConfirm:({dialogClose:e})=>{a(!0),e()},onClose:()=>a(!1)
},t)))})(n,o).then(e)}else{z(l,this._onSave)}}_getActualTemplateList(){return E.backend.invalidateStudyTemplatesList(),E.backend.getStudyTemplatesList()}_showTemplateSaveRenameDialog(e,t,a){const n=(0,B.createStudyTemplateMetaInfo)(this._controller);(this._dialog=new T({source:e.map((e=>e.name)),title:L,saveSymbolHintText:O.format({symbol:t}),saveIntervalHintText:M.format({interval:(0,I.translatedIntervalString)(a)}),indicatorsText:(0,B.descriptionString)(n.indicators),onSubmit:(t,a)=>this._doSave(e,t,a),onClose:this._close})).show()}}},39344:(e,t,a)=>{"use strict";a.d(t,{createStudyTemplateMetaInfo:()=>s,descriptionString:()=>o});var n=a(28853),i=a(37591);function s(e,t){return{indicators:e.orderedDataSources(!0).filter((e=>(0,n.isStudy)(e)&&!0)).map((e=>({id:e.metaInfo().id,description:e.title(i.TitleDisplayTarget.StatusLine,!0,void 0,!0)}))),interval:t}}function o(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(", ")}},33547:(e,t,a)=>{"use strict";function n(e,t){return Boolean(""===e||e&&-1!==t.toLowerCase().indexOf(e.toLowerCase()))}a.d(t,{autocompleteFilter:()=>n})},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},85508: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 8.5h1.5V14"/><circle fill="currentColor" cx="9" cy="5" r="1"/><path stroke="currentColor" d="M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z"/></svg>'},21939:e=>{e.exports={ar:["حفظ قالب المؤشر"],ca_ES:"Save Indicator Template",cs:"Save Indicator Template",de:["Indikatorvorlage speichern"],el:"Save Indicator Template",en:"Save Indicator Template",es:["Guardar plantilla de indicadores"],fa:"Save Indicator Template",fr:["Sauver le modèle d'indicateur"],he_IL:["שמור תבנית אינדיקטור"],hu_HU:"Save Indicator Template",id_ID:["Simpan Template Indikator"],it:["Salva modello indicatore"],ja:["インジケーターテンプレートを保存"],ko:["인디케이터 템플릿 세이브"],ms_MY:["Simpan Templat Penunjuk"],nl_NL:"Save Indicator Template",pl:["Zapisz szablon wskaźnika"],pt:["Salvar Conjunto de Indicadores"],ro:"Save Indicator Template",ru:["Сохранить шаблон индикаторов"],sv:["Spara indikatormall"],th:["บันทึกรูปแบบอินดิเคเตอร์"],tr:["Gösterge Şablonu Kaydet"],vi:["Lưu mẫu chỉ báo"],zh:["保存指标模板"],zh_TW:["儲存指標範本為"]}},40898:e=>{e.exports={ar:["المؤشرات المحفوظة"],ca_ES:"Saved indicators",cs:"Saved indicators",de:["Gespeicherte Indikatoren"],el:"Saved indicators",en:"Saved indicators",es:["Indicadores guardados"],fa:"Saved indicators",fr:["Indicateurs sauvegardés"],he_IL:["אינדיקטורים שמורים"],hu_HU:"Saved indicators",id_ID:["Indikator tersimpan"],it:["Indicatori salvati"],ja:["保存されたインジケーター"],ko:["세이브된 인디케이터"],ms_MY:["Petunjuk yang disimpan"],nl_NL:"Saved indicators",pl:["Zapisane wskaźniki"],pt:["Indicadores salvos"],ro:"Saved indicators",
ru:["Сохранённые индикаторы"],sv:["Sparade indikatorer"],th:["อินดิเคเตอร์ที่เซฟไว้"],tr:["Kaydedilmiş göstergeler"],vi:["Chỉ báo đã được lưu"],zh:["已存指标"],zh_TW:["已存指標"]}},30858:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الفاصل الزمني‎{interval} على الرسم البياني عند تطبيق هذا القالب"],ca_ES:"Selecting this option will set the {interval} interval on the chart when this template is applied",cs:"Selecting this option will set the {interval} interval on the chart when this template is applied",de:["Durch Auswahl dieser Option wird das {interval}-Intervall im Chart festgelegt, wenn diese Vorlage angewendet wird"],el:"Selecting this option will set the {interval} interval on the chart when this template is applied",en:"Selecting this option will set the {interval} interval on the chart when this template is applied",es:["Al seleccionar esta opción se establecerá el intervalo {interval} en el gráfico cuando se aplique esta plantilla"],fa:"Selecting this option will set the {interval} interval on the chart when this template is applied",fr:["En sélectionnant cette option, l'intervalle {interval} sera placé sur le graphique lorsque ce modèle est appliqué"],he_IL:["בחירת אפשרות זו תגדיר את האינטרוול {interval} בגרף כאשר מיושמת תבנית זו"],hu_HU:"Selecting this option will set the {interval} interval on the chart when this template is applied",id_ID:["Memilih opsi ini akan mengatur interval {interval} pada chart saat template ini diterapkan"],it:["Selezionando questa opzione, il modello viene applicato cambiando il timeframe in {interval}"],ja:["この項目を選択すると、テンプレートが適用された時にチャートの時間足が{interval}に設定されます"],ko:["이 옵션을 고르면 이 템플릿이 적용될 때 차트에 {interval} 을 세팅하게 됩니다."],ms_MY:["Memilih pilihan ini akan menetapkan selang masa {interval} pada carta apabila templat ini digunakan"],nl_NL:"Selecting this option will set the {interval} interval on the chart when this template is applied",pl:["Wybór tej opcji spowoduje ustawienie na wykresie interwału {interval} po zastosowaniu tego szablonu"],pt:["Selecionar esta opção definirá o intervalo {interval} no gráfico quando este modelo for aplicado"],ro:"Selecting this option will set the {interval} interval on the chart when this template is applied",ru:["Включите, чтобы установить на графике интервал {interval}, когда этот шаблон применён"],sv:["Om du väljer detta alternativ ställer du in intervallet {interval} i diagrammet när den här mallen används"],th:["การเลือกตัวเลือกนี้จะเป็นการกำหนดช่วงเวลา {interval} บนชาร์ต เมื่อเทมเพลตนี้ถูกใช้งาน"],tr:["Bu seçeneğin belirlenmesi ile, bu taslak uygulandığında grafikte {interval} aralığı ayarlanır"],vi:["Chọn tùy chọn này sẽ đặt khoảng thời gian {interval} trên biểu đồ khi mẫu này được áp dụng"],zh:["套用此模板时,选择此选项将在图表上设置{interval}周期"],zh_TW:["套用此模板時,選擇此選項將在圖表上設置{interval}周期"]}},61422:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الرمز {symbol} على الرسم البياني عند تطبيق هذا القالب"],ca_ES:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",
cs:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",de:["Wenn Sie diese Option wählen, wird das {symbol}-Symbol auf dem Chart gesetzt, wenn diese Vorlage angewendet wird."],el:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",en:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",es:["Al seleccionar esta opción se establecerá el símbolo {symbol} en el gráfico cuando se utilice esta plantilla"],fa:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",fr:["En sélectionnant cette option, le symbole {symbol} sera placé sur le graphique lorsque ce modèle est appliqué"],he_IL:["בחירת אפשרות זו תגדיר את הסימול {symbol} בגרף כאשר מיושמת תבנית זו"],hu_HU:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",id_ID:["Memilih opsi ini akan mengatur simbol {symbol} pada chart saat template ini diterapkan"],it:["Selezionando questa opzione, quando il modello viene applicato, viene inserito anche il simbolo {symbol}"],ja:["この項目を選択すると、テンプレートが適用された時にチャートのシンボルが{symbol}に設定されます"],ko:["이 옵션을 고르면 이 템플릿이 적용될 때 차트에 {symbol} 을 세팅하게 됩니다."],ms_MY:["Memilih pilihan ini akan menetapkan simbol {symbol} pada carta apabila templat ini digunakan"],nl_NL:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",pl:["Wybór tej opcji spowoduje ustawienie na wykresie symbolu {symbol} po zastosowaniu tego szablonu"],pt:["Selecionar esta opção definirá o símbolo {symbol} no gráfico quando este modelo for aplicado"],ro:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",ru:["Включите, чтобы установить на графике символ {symbol}, когда этот шаблон применён"],sv:["Om du väljer detta alternativ ställer du in symbolen {symbol} i diagrammet när den här mallen används"],th:["การเลือกตัวเลือกนี้จะเป็นการกำหนดตัวย่อ {symbol} บนชาร์ต เมื่อเทมเพลตนี้ถูกใช้งาน"],tr:["Bu seçeneğin belirlenmesi ile, bu taslak uygulandığında grafikte {symbol} sembolü ayarlanacaktır."],vi:["Chọn lựa chọn này sẽ đặt mã giao dịch {symbol} trên biểu đồ khi mẫu hình được áp dụng"],zh:["套用此模板时,选择此选项将在图表上设置{symbol}商品"],zh_TW:["套用此模板時,選擇此選項將在圖表上設置{symbol}商品"]}},83081:e=>{e.exports={ar:['نموذج الدراسة "{templateName}" موجود بالفعل، هل تريد حقًا استبداله؟'],ca_ES:"Study Template '{templateName}' already exists. Do you really want to replace it?",cs:"Study Template '{templateName}' already exists. Do you really want to replace it?",de:["Studienvorlage '{templateName}' existiert bereits. Möchten Sie diese wirklich ersetzen?"],el:"Study Template '{templateName}' already exists. Do you really want to replace it?",en:"Study Template '{templateName}' already exists. Do you really want to replace it?",es:["La plantilla de estudio '{templateName}' ya existe. ¿Está seguro de que quiere reemplazarla?"],fa:"Study Template '{templateName}' already exists. Do you really want to replace it?",
fr:["Le Modèle d'Etude '{templateName}' existe déjà. Voulez-vous vraiment le remplacer ?"],he_IL:["תבנית המחקר {templateName} קיימת כבר. האם אתה באמת רוצה להחליף אותה?"],hu_HU:["{templateName} névvel már létezik tanulmánysablon. Biztos, hogy cserélni akarod?"],id_ID:["Template Studi '{templateName}' sudah ada. Apakah anda ingin menggantinya?"],it:["Il Modello di studio '{templateName}' esiste già. Sostituirlo?"],ja:["テンプレート {templateName} は既に存在します。本当に上書きしますか?"],ko:["같은 이름의 스터디 템플릿 '{templateName}' 가 이미 있습니다. 정말로 바꾸시겠습니까?"],ms_MY:["Templat Kajian '{templateName}' sudah ada. Adakah anda benar-benar mahu menggantikannya?"],nl_NL:"Study Template '{templateName}' already exists. Do you really want to replace it?",pl:["Szablon analizy '{templateName}' już istnieje. Naprawdę chcesz go zastąpić?"],pt:["O modelo de estudo '{templateName}' já existe. Deseja substituí-lo?"],ro:"Study Template '{templateName}' already exists. Do you really want to replace it?",ru:["Шаблон индикаторов '{templateName}' уже существует. Вы действительно хотите заменить его?"],sv:["Studiemall '{templateName}' finns redan. Vill du verkligen ersätta den?"],th:["เทมเพลตการศึกษา '{templateName}' มีอยู่แล้ว คุณต้องการที่จะแทนที่มันใช่หรือไม่?"],tr:["'{templateName}' Çalışma Şablonu zaten var.Yenisiyle değiştirmek mi istiyorsunuz?"],vi:["Mẫu Nghiên cứu '{templateName}' đã tồn tại. Bạn có thực sự muốn thay thế nó?"],zh:["指标模板{templateName}已经存在。确定替换?"],zh_TW:["研究模板'{templateName}'已經存在,確定替換?"]}},63135:e=>{e.exports={ar:["تذكر الفاصل الزمني"],ca_ES:"Remember Interval",cs:"Remember Interval",de:["Interval merken"],el:"Remember Interval",en:"Remember Interval",es:["Recordar intervalo"],fa:"Remember Interval",fr:["Se souvenir de l'intervalle"],he_IL:["זכור אינטרוול"],hu_HU:"Remember Interval",id_ID:["Ingat Interval"],it:["Ricorda timeframe"],ja:["時間足を記憶"],ko:["인터벌 기억하기"],ms_MY:["Ingat Selang Masa"],nl_NL:"Remember Interval",pl:["Zapamiętaj interwał"],pt:["Lembrar do Intervalo"],ro:"Remember Interval",ru:["Запомнить интервал"],sv:["Kom ihåg intervall"],th:["จำช่วงเวลา"],tr:["Aralığı Hatırla"],vi:["Nhớ Khoảng thời gian"],zh:["记住周期"],zh_TW:["記住周期"]}},33455:e=>{e.exports={ar:["تذكر الرمز"],ca_ES:"Remember Symbol",cs:"Remember Symbol",de:["Symbol merken"],el:"Remember Symbol",en:"Remember Symbol",es:["Recordar símbolo"],fa:"Remember Symbol",fr:["Se souvenir du symbole"],he_IL:["זכור את הסימול"],hu_HU:"Remember Symbol",id_ID:["Ingat Simbol"],it:["Ricorda simbolo"],ja:["シンボルを記憶"],ko:["심볼 기억하기"],ms_MY:["Ingat Simbol"],nl_NL:"Remember Symbol",pl:["Zapamiętaj symbol"],pt:["Lembrar do Símbolo"],ro:"Remember Symbol",ru:["Запомнить инструмент"],sv:["Kom ihåg symbol"],th:["จำตัวย่อ"],tr:["Sembolü Hatırla"],vi:["Nhớ Mã giao dịch"],zh:["记住商品"],zh_TW:["記住商品"]}},50912:e=>{e.exports={ar:["أسم القالب"],ca_ES:["Nom de la plantilla"],cs:"Template name",de:["Name der Vorlage"],el:"Template name",en:"Template name",es:["Nombre de la plantilla"],fa:"Template name",fr:["Nom du modèle"],he_IL:["שם תבנית"],hu_HU:["Sablon neve"],id_ID:["Nama template"],it:["Nome modello"],ja:["テンプレート名"],
ko:["템플릿이름"],ms_MY:["Nama templat"],nl_NL:"Template name",pl:["Nazwa Szablonu"],pt:["Nome do modelo"],ro:"Template name",ru:["Имя шаблона"],sv:["Mallnamn"],th:["ชื่อเทมเพลต"],tr:["Şablon adı"],vi:["Tên Mẫu"],zh:["模板名称"],zh_TW:["範本名稱"]}}}]);

View File

@@ -0,0 +1,11 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6631],{70048:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",box:"box-GZajBGIm",icon:"icon-GZajBGIm",noOutline:"noOutline-GZajBGIm","intent-danger":"intent-danger-GZajBGIm",check:"check-GZajBGIm",dot:"dot-GZajBGIm"}},69789:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},83073:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},55596:e=>{e.exports={dialog:"dialog-b8SxMnzX",wrapper:"wrapper-b8SxMnzX",separator:"separator-b8SxMnzX",bounded:"bounded-b8SxMnzX"}},69827:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-BZKENkhT",unsetAlign:"unsetAlign-BZKENkhT",title:"title-BZKENkhT",subtitle:"subtitle-BZKENkhT",textWrap:"textWrap-BZKENkhT",ellipsis:"ellipsis-BZKENkhT",close:"close-BZKENkhT",icon:"icon-BZKENkhT"}},45719:e=>{e.exports={separator:"separator-Pf4rIzEt"}},70673:(e,t,a)=>{"use strict";a.d(t,{CheckboxInput:()=>d});var n=a(50959),i=a(97754),s=a(90186),o=a(9745),l=a(65890),r=a(70048),c=a.n(r);function d(e){const t=i(c().box,c()[`intent-${e.intent}`],{[c().check]:!Boolean(e.indeterminate),[c().dot]:Boolean(e.indeterminate),[c().noOutline]:-1===e.tabIndex}),a=i(c().wrapper,e.className);return n.createElement("span",{className:a,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:c().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,s.filterDataProps)(e)}),n.createElement("span",{className:t},n.createElement(o.Icon,{icon:l,className:c().icon})))}},15294:(e,t,a)=>{"use strict";a.d(t,{Checkbox:()=>c});var n=a(50959),i=a(97754),s=a(57733),o=a(70673),l=a(69789),r=a.n(l);class c extends n.PureComponent{render(){const{inputClassName:e,labelClassName:t,...a}=this.props,s=i(this.props.className,r().checkbox,{[r().reverse]:Boolean(this.props.labelPositionReverse),[r().baseline]:Boolean(this.props.labelAlignBaseline)}),l=i(r().label,t,{[r().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=n.createElement("span",{className:l,title:this.props.title},this.props.label)),n.createElement("label",{className:s},n.createElement(o.CheckboxInput,{...a,className:e}),c)}}c.defaultProps={value:"on"};(0,s.makeSwitchGroupItem)(c)},57733:(e,t,a)=>{"use strict";a.d(t,{SwitchGroup:()=>o,makeSwitchGroupItem:()=>l});var n=a(50959);const i=function(){},s=(0,n.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>i,subscribe:i,unsubscribe:i});class o extends n.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,
this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return n.createElement(s.Provider,{value:this.state.switchGroupContext},this.props.children)}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((a=>t.includes(a)?!e.includes(a):e.includes(a)))}}function l(e){var t;return t=class extends n.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return n.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=s,t}},50182:(e,t,a)=>{"use strict";a.d(t,{AdaptiveConfirmDialog:()=>m});var n=a(50959),i=a(97754),s=a.n(i),o=a(94720),l=a(50151),r=a(44352),c=a(68335),d=a(35057),u=a(83073);class m extends n.PureComponent{constructor(){super(...arguments),this._dialogRef=n.createRef(),this._handleClose=()=>{const{defaultActionOnClose:e,onSubmit:t,onCancel:a,onClose:n}=this.props;switch(e){case"submit":t();break;case"cancel":a()}n()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=e=>{const{onSubmit:t,submitButtonDisabled:a,submitOnEnterKey:n}=this.props;13===(0,c.hashFromEvent)(e)&&n&&(e.preventDefault(),a||t())}}render(){const{render:e,onClose:t,onSubmit:a,onCancel:i,footerLeftRenderer:s,submitButtonText:o,submitButtonDisabled:l,defaultActionOnClose:r,submitOnEnterKey:c,...u}=this.props;return n.createElement(d.AdaptivePopupDialog,{...u,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,l.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return e=>{const{render:t,footerLeftRenderer:i,additionalButtons:l,submitButtonText:c,submitButtonDisabled:d,onSubmit:m,cancelButtonText:h,showCancelButton:p=!0,submitButtonClassName:b,cancelButtonClassName:v,buttonsWrapperClassName:g}=this.props;return n.createElement(n.Fragment,null,t(e),n.createElement("div",{className:u.footer},i&&i(e.isSmallWidth),n.createElement("div",{className:s()(u.buttons,g)},l,p&&n.createElement(o.Button,{className:v,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=h?h:r.t(null,void 0,a(20036))),n.createElement("span",{className:u.submitButton},n.createElement(o.Button,{className:b,disabled:d,name:"submit",onClick:m,"data-name":"submit-button"},null!=c?c:r.t(null,void 0,a(68988)))))))}}}m.defaultProps={defaultActionOnClose:"submit",
submitOnEnterKey:!0}},35057:(e,t,a)=>{"use strict";a.d(t,{AdaptivePopupDialog:()=>T});var n=a(50959),i=a(50151);var s=a(97754),o=a.n(s),l=a(68335),r=a(38223),c=a(35749),d=a(63016),u=a(1109),m=a(24437),h=a(90692),p=a(95711);var b=a(52092),v=a(76422),g=a(9745);const _=n.createContext({setHideClose:()=>{}});var f=a(7720),S=a(69827);function y(e){const{title:t,titleTextWrap:a=!1,subtitle:i,showCloseIcon:s=!0,onClose:l,onCloseButtonKeyDown:r,renderBefore:c,renderAfter:d,draggable:u,className:m,unsetAlign:h,closeAriaLabel:p,closeButtonReference:b}=e,[v,y]=(0,n.useState)(!1);return n.createElement(_.Provider,{value:{setHideClose:y}},n.createElement("div",{className:o()(S.container,m,(i||h)&&S.unsetAlign)},c,n.createElement("div",{"data-dragg-area":u,className:S.title},n.createElement("div",{className:o()(a?S.textWrap:S.ellipsis)},t),i&&n.createElement("div",{className:o()(S.ellipsis,S.subtitle)},i)),d,s&&!v&&n.createElement("button",{className:S.close,onClick:l,onKeyDown:r,"data-name":"close","aria-label":p,type:"button",ref:b},n.createElement(g.Icon,{className:S.icon,icon:f,"data-name":"close","data-role":"button"}))))}var C=a(53017),w=a(90186),N=a(55596);const x={vertical:20},k={vertical:0};class T extends n.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleCloseBtnClick=()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleClose()},this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(m.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{if(!e.defaultPrevented){if(this.props.onKeyDown&&this.props.onKeyDown(e),27===(0,l.hashFromEvent)(e)){if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose();const{activeElement:a}=document,n=(0,i.ensureNotNull)(this._reference);if(null!==a){if(e.preventDefault(),"true"===(t=a).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if((0,c.isTextEditingField)(a))return void n.focus();if(n.contains(a))return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose()}}var t,a;(function(e){if("function"==typeof e)return e();return Boolean(e)})(this.props.disableTabNavigationContainment)||(a=e,[9,l.Modifiers.Shift+9].includes((0,l.hashFromEvent)(a))&&a.stopPropagation())}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()},this._calculatePositionWithOffsets=(e,t)=>{const a=(0,i.ensureDefined)(this.props.fullScreenViewOffsets).value();return{top:a.top,left:(0,
r.isRtl)()?-a.right:a.left,width:t.clientWidth-a.left-a.right,height:t.clientHeight-a.top-a.bottom}}}componentDidMount(){var e,t;this.props.ignoreClosePopupsAndDialog||v.subscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.subscribe(this._requestResize)}componentWillUnmount(){var e,t;this.props.ignoreClosePopupsAndDialog||v.unsubscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.unsubscribe(this._requestResize)}focus(){(0,i.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,a;return null!==(a=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==a&&a}render(){const{className:e,wrapperClassName:t,headerClassName:a,isOpened:i,title:s,titleTextWrap:l,dataName:r,onClickOutside:c,additionalElementPos:b,additionalHeaderElement:v,backdrop:g,shouldForceFocus:_=!0,shouldReturnFocus:f,showSeparator:S,subtitle:T,draggable:E=!0,fullScreen:D=!1,showCloseIcon:I=!0,rounded:B=!0,isAnimationEnabled:L,growPoint:O,dialogTooltip:M,unsetHeaderAlign:A,onDragStart:z,dataDialogName:P,closeAriaLabel:R,containerAriaLabel:j,reference:K,containerTabIndex:H,closeButtonReference:G,onCloseButtonKeyDown:W,shadowed:U,fullScreenViewOffsets:q}=this.props,F="after"!==b?v:void 0,Z="after"===b?v:void 0,V="string"==typeof s?s:P||"",Q=(0,w.filterDataProps)(this.props),Y=(0,C.mergeRefs)([this._handleReference,K]);return n.createElement(h.MatchMedia,{rule:m.DialogBreakpoints.SmallHeight},(b=>n.createElement(h.MatchMedia,{rule:m.DialogBreakpoints.TabletSmall},(m=>n.createElement(d.PopupDialog,{rounded:!(m||D)&&B,className:o()(N.dialog,D&&q&&N.bounded,e),isOpened:i,reference:Y,onKeyDown:this._handleKeyDown,onClickOutside:c,onClickBackdrop:c,fullscreen:m||D,guard:b?k:x,boundByScreen:m||D,shouldForceFocus:_,shouldReturnFocus:f,backdrop:g,draggable:E,isAnimationEnabled:L,growPoint:O,name:this.props.dataName,dialogTooltip:M,onDragStart:z,containerAriaLabel:j,containerTabIndex:H,calculateDialogPosition:D&&q?this._calculatePositionWithOffsets:void 0,shadowed:U,...Q},n.createElement("div",{className:o()(N.wrapper,t),"data-name":r,"data-dialog-name":V},void 0!==s&&n.createElement(y,{draggable:E&&!(m||D),onClose:this._handleCloseBtnClick,renderAfter:Z,renderBefore:F,subtitle:T,title:s,titleTextWrap:l,showCloseIcon:I,className:a,unsetAlign:A,closeAriaLabel:R,closeButtonReference:G,onCloseButtonKeyDown:W}),S&&n.createElement(u.Separator,{className:N.separator
}),n.createElement(p.PopupContext.Consumer,null,(e=>this._renderChildren(e,m||D)))))))))}}},1109:(e,t,a)=>{"use strict";a.d(t,{Separator:()=>o});var n=a(50959),i=a(97754),s=a(45719);function o(e){return n.createElement("div",{className:i(s.separator,e.className)})}},92297:e=>{e.exports={loading:"loading-BPaLXf0z"}},15747:e=>{e.exports={container:"container-CD9TBN7D",withSuggestions:"withSuggestions-CD9TBN7D",title:"title-CD9TBN7D",autocomplete:"autocomplete-CD9TBN7D",saveSymbol:"saveSymbol-CD9TBN7D",saveInterval:"saveInterval-CD9TBN7D",indicators:"indicators-CD9TBN7D",hintLabel:"hintLabel-CD9TBN7D",hintMark:"hintMark-CD9TBN7D",hidden:"hidden-CD9TBN7D"}},13932:(e,t,a)=>{"use strict";a.r(t),a.d(t,{StudyTemplateSaver:()=>j});var n=a(50151),i=a(44352),s=a(50959),o=a(962),l=(a(42053),a(97754)),r=a(15294),c=a(21788),d=a(9745),u=a(50182),m=a(60508),h=a(26996),p=a(92297);function b(e){const{isLoading:t}=e;return s.createElement("span",{className:t?p.loading:void 0},i.t(null,void 0,a(85520)),t&&s.createElement(h.Loader,{color:"white"}))}class v extends s.PureComponent{constructor(e){super(e),this._dialogRef=s.createRef(),this._manager=null,this._handleSubmit=()=>{this.setState({isLoading:!0}),this.props.onSubmit(this)},this.state={isLoading:!1}}render(){const{isOpened:e,saveDisabled:t,title:a,onClose:n}=this.props;return s.createElement(u.AdaptiveConfirmDialog,{ref:this._dialogRef,onClose:n,onSubmit:this._handleSubmit,onCancel:n,onClickOutside:n,isOpened:e,title:a,dataName:"save-rename-dialog",render:this._renderDialogBody(),defaultActionOnClose:"none",submitButtonText:s.createElement(b,{isLoading:this.state.isLoading}),submitButtonDisabled:t})}focus(){(0,n.ensureNotNull)(this._dialogRef.current).focus()}manager(){return this._manager}submit(){this.props.onSubmit(this)}close(){this.props.onClose()}dropLoading(){this.setState({isLoading:!1})}_renderDialogBody(){return()=>s.createElement(m.SlotContext.Consumer,null,(e=>(this._manager=e,this.props.children)))}}var g=a(33547),_=a(85508),f=a(15747),S=a(49483);const y=i.t(null,void 0,a(50912)),C=i.t(null,void 0,a(40898)),w=i.t(null,void 0,a(33455)),N=i.t(null,void 0,a(63135)),x=[f.hintMark,"apply-common-tooltip"];function k(e){const{title:t,saveSymbolHintText:a,saveIntervalHintText:i,indicatorsText:o,source:u,onClose:m,onSubmit:h}=e,[p,b]=(0,s.useState)(""),[S,k]=(0,s.useState)(!1),[T,E]=(0,s.useState)(!1),[D,I]=(0,s.useState)(!1),B=(0,s.useRef)(null),L=(0,s.useRef)(null);return(0,s.useEffect)((()=>{(0,n.ensureNotNull)(L.current).focus()}),[]),s.createElement(v,{ref:B,isOpened:!0,saveDisabled:!p,title:t,onClose:m,onSubmit:function(e){h({title:p,saveSymbol:S,saveInterval:T},e)}},s.createElement("div",{className:l(f.container,D&&f.withSuggestions)},s.createElement("div",{className:f.title},y),s.createElement("div",{className:f.autocomplete},s.createElement(c.Autocomplete,{maxLength:64,value:p,onChange:b,onBlur:function(){(0,n.ensureNotNull)(B.current).focus()},source:u,allowUserDefinedValues:!0,preventOnFocusOpen:!0,noEmptyText:!0,preventSearchOnEmptyQuery:!0,
filter:g.autocompleteFilter,setupHTMLInput:function(e){L.current=e},onSuggestionsOpen:function(){I(!0)},onSuggestionsClose:function(){I(!1)}})),s.createElement("div",{className:f.saveSymbol},s.createElement(r.Checkbox,{label:s.createElement("span",{className:f.hintLabel},w,s.createElement(d.Icon,{icon:_,className:l(x),title:a})),onChange:function(){k(!S),(0,n.ensureNotNull)(B.current).focus()},checked:S})),s.createElement("div",{className:f.saveInterval},s.createElement(r.Checkbox,{label:s.createElement("span",{className:f.hintLabel},N,s.createElement(d.Icon,{icon:_,className:l(x),title:i})),onChange:function(){E(!T),(0,n.ensureNotNull)(B.current).focus()},checked:T})),s.createElement("div",{className:f.title},C),s.createElement("div",{className:l(f.indicators,D&&f.withSuggestions)},o)))}S.CheckMobile.any()&&x.push(f.hidden);var T=a(76422),E=a(52092);class D{constructor(e){this._container=document.createElement("div"),this.close=()=>{this.unmount(),this._onClose&&this._onClose()},this.unmount=()=>{T.unsubscribe(E.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null),o.unmountComponentAtNode(this._container)},this._title=e.title,this._saveSymbolHintText=e.saveSymbolHintText,this._saveIntervalHintText=e.saveIntervalHintText,this._indicatorsText=e.indicatorsText,this._source=e.source,this._onSubmit=e.onSubmit,this._onClose=e.onClose,T.subscribe(E.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null)}mount(){o.render(s.createElement(k,{title:this._title,saveSymbolHintText:this._saveSymbolHintText,saveIntervalHintText:this._saveIntervalHintText,indicatorsText:this._indicatorsText,source:this._source,onClose:this.close,onSubmit:this._onSubmit}),this._container)}destroy(){this.unmount()}show(){this.mount()}}var I=a(61595),B=a(3615),L=a(11321),O=a(39344);const M=i.t(null,void 0,a(21939)),A=i.t(null,void 0,a(61422)),z=i.t(null,void 0,a(30858)),P=i.t(null,void 0,a(83081));function R(e,t,a){const n=()=>{I.backend.invalidateStudyTemplatesList(),I.backend.getStudyTemplatesList().then(t)};I.backend.saveStudyTemplate(e).then(n)}class j{constructor(e){this._dialog=null,this._onSave=e=>{this._options.onSave(e),this._close()},this._showSaveDialog=async()=>{const e=this._controller.model().mainSeries().symbol(),t=this._controller.model().mainSeries().interval(),a=await this._getActualTemplateList();await this._showTemplateSaveRenameDialog(a,e,t)},this._close=()=>{this._dialog&&(this._dialog.destroy(),this._dialog=null)},this._options=e,this._controller=e.controller}show(){window.runOrSignIn(this._showSaveDialog,{source:"Study templates save as",sourceMeta:"Chart"})}_prepareData(e,t,a){const n=this._controller.model().studyTemplate(t,a);return{name:e,content:JSON.stringify(n),meta_info:(0,O.createStudyTemplateMetaInfo)(this._controller,n.interval)}}_doSave(e,t,a){const{title:n,saveSymbol:i,saveInterval:s}=t;if(!n)return;const o=a.manager()||void 0,l=this._prepareData(n,i,s);if(e.find((e=>e.name===n))){const e=e=>{e?R(l,this._onSave):(a.focus(),a.dropLoading())};(function(e,t){return new Promise((a=>(0,B.showConfirm)({text:P.format({
templateName:e}),onConfirm:({dialogClose:e})=>{a(!0),e()},onClose:()=>a(!1)},t)))})(n,o).then(e)}else{R(l,this._onSave)}}_getActualTemplateList(){return I.backend.invalidateStudyTemplatesList(),I.backend.getStudyTemplatesList()}_showTemplateSaveRenameDialog(e,t,a){const n=(0,O.createStudyTemplateMetaInfo)(this._controller);(this._dialog=new D({source:e.map((e=>e.name)),title:M,saveSymbolHintText:A.format({symbol:t}),saveIntervalHintText:z.format({interval:(0,L.translatedIntervalString)(a)}),indicatorsText:(0,O.descriptionString)(n.indicators),onSubmit:(t,a)=>this._doSave(e,t,a),onClose:this._close})).show()}}},39344:(e,t,a)=>{"use strict";a.d(t,{createStudyTemplateMetaInfo:()=>s,descriptionString:()=>o});var n=a(28853),i=a(37591);function s(e,t){return{indicators:e.orderedDataSources(!0).filter((e=>(0,n.isStudy)(e)&&!0)).map((e=>({id:e.metaInfo().id,description:e.title(i.TitleDisplayTarget.StatusLine,!0,void 0,!0)}))),interval:t}}function o(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(", ")}},33547:(e,t,a)=>{"use strict";function n(e,t){return Boolean(""===e||e&&-1!==t.toLowerCase().indexOf(e.toLowerCase()))}a.d(t,{autocompleteFilter:()=>n})},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},85508: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 8.5h1.5V14"/><circle fill="currentColor" cx="9" cy="5" r="1"/><path stroke="currentColor" d="M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z"/></svg>'},21939:e=>{e.exports={ar:["حفظ قالب المؤشر"],ca_ES:"Save Indicator Template",cs:"Save Indicator Template",de:["Indikatorvorlage speichern"],el:"Save Indicator Template",en:"Save Indicator Template",es:["Guardar plantilla de indicadores"],fa:"Save Indicator Template",fr:["Sauver le modèle d'indicateur"],he_IL:["שמור תבנית אינדיקטור"],hu_HU:"Save Indicator Template",id_ID:["Simpan Template Indikator"],it:["Salva modello indicatore"],ja:["インジケーターテンプレートを保存"],ko:["인디케이터 템플릿 세이브"],ms_MY:["Simpan Templat Penunjuk"],nl_NL:"Save Indicator Template",pl:["Zapisz szablon wskaźnika"],pt:["Salvar Conjunto de Indicadores"],ro:"Save Indicator Template",ru:["Сохранить шаблон индикаторов"],sv:["Spara indikatormall"],th:["บันทึกรูปแบบอินดิเคเตอร์"],tr:["Gösterge Şablonu Kaydet"],vi:["Lưu mẫu chỉ báo"],zh:["保存指标模板"],zh_TW:["儲存指標範本為"]}},40898:e=>{e.exports={ar:["المؤشرات المحفوظة"],ca_ES:"Saved indicators",cs:"Saved indicators",de:["Gespeicherte Indikatoren"],el:"Saved indicators",en:"Saved indicators",es:["Indicadores guardados"],fa:"Saved indicators",fr:["Indicateurs sauvegardés"],he_IL:["אינדיקטורים שמורים"],hu_HU:"Saved indicators",id_ID:["Indikator tersimpan"],it:["Indicatori salvati"],ja:["保存されたインジケーター"],ko:["세이브된 인디케이터"],ms_MY:["Petunjuk yang disimpan"],nl_NL:"Saved indicators",
pl:["Zapisane wskaźniki"],pt:["Indicadores salvos"],ro:"Saved indicators",ru:["Сохранённые индикаторы"],sv:["Sparade indikatorer"],th:["อินดิเคเตอร์ที่เซฟไว้"],tr:["Kaydedilmiş göstergeler"],vi:["Chỉ báo đã được lưu"],zh:["已存指标"],zh_TW:["已存指標"]}},30858:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الفاصل الزمني‎{interval} على الرسم البياني عند تطبيق هذا القالب"],ca_ES:"Selecting this option will set the {interval} interval on the chart when this template is applied",cs:"Selecting this option will set the {interval} interval on the chart when this template is applied",de:["Durch Auswahl dieser Option wird das {interval}-Intervall im Chart festgelegt, wenn diese Vorlage angewendet wird"],el:"Selecting this option will set the {interval} interval on the chart when this template is applied",en:"Selecting this option will set the {interval} interval on the chart when this template is applied",es:["Al seleccionar esta opción se establecerá el intervalo {interval} en el gráfico cuando se aplique esta plantilla"],fa:"Selecting this option will set the {interval} interval on the chart when this template is applied",fr:["En sélectionnant cette option, l'intervalle {interval} sera placé sur le graphique lorsque ce modèle est appliqué"],he_IL:["בחירת אפשרות זו תגדיר את האינטרוול {interval} בגרף כאשר מיושמת תבנית זו"],hu_HU:"Selecting this option will set the {interval} interval on the chart when this template is applied",id_ID:["Memilih opsi ini akan mengatur interval {interval} pada chart saat template ini diterapkan"],it:["Selezionando questa opzione, il modello viene applicato cambiando il timeframe in {interval}"],ja:["この項目を選択すると、テンプレートが適用された時にチャートの時間足が{interval}に設定されます"],ko:["이 옵션을 고르면 이 템플릿이 적용될 때 차트에 {interval} 을 세팅하게 됩니다."],ms_MY:["Memilih pilihan ini akan menetapkan selang masa {interval} pada carta apabila templat ini digunakan"],nl_NL:"Selecting this option will set the {interval} interval on the chart when this template is applied",pl:["Wybór tej opcji spowoduje ustawienie na wykresie interwału {interval} po zastosowaniu tego szablonu"],pt:["Selecionar esta opção definirá o intervalo {interval} no gráfico quando este modelo for aplicado"],ro:"Selecting this option will set the {interval} interval on the chart when this template is applied",ru:["Включите, чтобы установить на графике интервал {interval}, когда этот шаблон применён"],sv:["Om du väljer detta alternativ ställer du in intervallet {interval} i diagrammet när den här mallen används"],th:["การเลือกตัวเลือกนี้จะเป็นการกำหนดช่วงเวลา {interval} บนชาร์ต เมื่อเทมเพลตนี้ถูกใช้งาน"],tr:["Bu seçeneğin belirlenmesi ile, bu taslak uygulandığında grafikte {interval} aralığı ayarlanır"],vi:["Chọn tùy chọn này sẽ đặt khoảng thời gian {interval} trên biểu đồ khi mẫu này được áp dụng"],zh:["套用此模板时,选择此选项将在图表上设置{interval}周期"],zh_TW:["套用此模板時,選擇此選項將在圖表上設置{interval}周期"]}},61422:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الرمز {symbol} على الرسم البياني عند تطبيق هذا القالب"],
ca_ES:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",cs:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",de:["Wenn Sie diese Option wählen, wird das {symbol}-Symbol auf dem Chart gesetzt, wenn diese Vorlage angewendet wird."],el:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",en:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",es:["Al seleccionar esta opción se establecerá el símbolo {symbol} en el gráfico cuando se utilice esta plantilla"],fa:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",fr:["En sélectionnant cette option, le symbole {symbol} sera placé sur le graphique lorsque ce modèle est appliqué"],he_IL:["בחירת אפשרות זו תגדיר את הסימול {symbol} בגרף כאשר מיושמת תבנית זו"],hu_HU:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",id_ID:["Memilih opsi ini akan mengatur simbol {symbol} pada chart saat template ini diterapkan"],it:["Selezionando questa opzione, quando il modello viene applicato, viene inserito anche il simbolo {symbol}"],ja:["この項目を選択すると、テンプレートが適用された時にチャートのシンボルが{symbol}に設定されます"],ko:["이 옵션을 고르면 이 템플릿이 적용될 때 차트에 {symbol} 을 세팅하게 됩니다."],ms_MY:["Memilih pilihan ini akan menetapkan simbol {symbol} pada carta apabila templat ini digunakan"],nl_NL:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",pl:["Wybór tej opcji spowoduje ustawienie na wykresie symbolu {symbol} po zastosowaniu tego szablonu"],pt:["Selecionar esta opção definirá o símbolo {symbol} no gráfico quando este modelo for aplicado"],ro:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",ru:["Включите, чтобы установить на графике символ {symbol}, когда этот шаблон применён"],sv:["Om du väljer detta alternativ ställer du in symbolen {symbol} i diagrammet när den här mallen används"],th:["การเลือกตัวเลือกนี้จะเป็นการกำหนดตัวย่อ {symbol} บนชาร์ต เมื่อเทมเพลตนี้ถูกใช้งาน"],tr:["Bu seçeneğin belirlenmesi ile, bu taslak uygulandığında grafikte {symbol} sembolü ayarlanacaktır."],vi:["Chọn lựa chọn này sẽ đặt mã giao dịch {symbol} trên biểu đồ khi mẫu hình được áp dụng"],zh:["套用此模板时,选择此选项将在图表上设置{symbol}商品"],zh_TW:["套用此模板時,選擇此選項將在圖表上設置{symbol}商品"]}},83081:e=>{e.exports={ar:['نموذج الدراسة "{templateName}" موجود بالفعل، هل تريد حقًا استبداله؟'],ca_ES:"Study Template '{templateName}' already exists. Do you really want to replace it?",cs:"Study Template '{templateName}' already exists. Do you really want to replace it?",de:["Studienvorlage '{templateName}' existiert bereits. Möchten Sie diese wirklich ersetzen?"],el:"Study Template '{templateName}' already exists. Do you really want to replace it?",en:"Study Template '{templateName}' already exists. Do you really want to replace it?",es:["La plantilla de estudio '{templateName}' ya existe. ¿Está seguro de que quiere reemplazarla?"],
fa:"Study Template '{templateName}' already exists. Do you really want to replace it?",fr:["Le Modèle d'Etude '{templateName}' existe déjà. Voulez-vous vraiment le remplacer ?"],he_IL:["תבנית המחקר {templateName} קיימת כבר. האם אתה באמת רוצה להחליף אותה?"],hu_HU:["{templateName} névvel már létezik tanulmánysablon. Biztos, hogy cserélni akarod?"],id_ID:["Template Studi '{templateName}' sudah ada. Apakah anda ingin menggantinya?"],it:["Il Modello di studio '{templateName}' esiste già. Sostituirlo?"],ja:["テンプレート {templateName} は既に存在します。本当に上書きしますか?"],ko:["같은 이름의 스터디 템플릿 '{templateName}' 가 이미 있습니다. 정말로 바꾸시겠습니까?"],ms_MY:["Templat Kajian '{templateName}' sudah ada. Adakah anda benar-benar mahu menggantikannya?"],nl_NL:"Study Template '{templateName}' already exists. Do you really want to replace it?",pl:["Szablon analizy '{templateName}' już istnieje. Naprawdę chcesz go zastąpić?"],pt:["O modelo de estudo '{templateName}' já existe. Deseja substituí-lo?"],ro:"Study Template '{templateName}' already exists. Do you really want to replace it?",ru:["Шаблон индикаторов '{templateName}' уже существует. Вы действительно хотите заменить его?"],sv:["Studiemall '{templateName}' finns redan. Vill du verkligen ersätta den?"],th:["เทมเพลตการศึกษา '{templateName}' มีอยู่แล้ว คุณต้องการที่จะแทนที่มันใช่หรือไม่?"],tr:["'{templateName}' Çalışma Şablonu zaten var.Yenisiyle değiştirmek mi istiyorsunuz?"],vi:["Mẫu Nghiên cứu '{templateName}' đã tồn tại. Bạn có thực sự muốn thay thế nó?"],zh:["指标模板{templateName}已经存在。确定替换?"],zh_TW:["研究模板'{templateName}'已經存在,確定替換?"]}},63135:e=>{e.exports={ar:["تذكر الفاصل الزمني"],ca_ES:"Remember Interval",cs:"Remember Interval",de:["Interval merken"],el:"Remember Interval",en:"Remember Interval",es:["Recordar intervalo"],fa:"Remember Interval",fr:["Se souvenir de l'intervalle"],he_IL:["זכור אינטרוול"],hu_HU:"Remember Interval",id_ID:["Ingat Interval"],it:["Ricorda timeframe"],ja:["時間足を記憶"],ko:["인터벌 기억하기"],ms_MY:["Ingat Selang Masa"],nl_NL:"Remember Interval",pl:["Zapamiętaj interwał"],pt:["Lembrar do Intervalo"],ro:"Remember Interval",ru:["Запомнить интервал"],sv:["Kom ihåg intervall"],th:["จำช่วงเวลา"],tr:["Aralığı Hatırla"],vi:["Nhớ Khoảng thời gian"],zh:["记住周期"],zh_TW:["記住周期"]}},33455:e=>{e.exports={ar:["تذكر الرمز"],ca_ES:"Remember Symbol",cs:"Remember Symbol",de:["Symbol merken"],el:"Remember Symbol",en:"Remember Symbol",es:["Recordar símbolo"],fa:"Remember Symbol",fr:["Se souvenir du symbole"],he_IL:["זכור את הסימול"],hu_HU:"Remember Symbol",id_ID:["Ingat Simbol"],it:["Ricorda simbolo"],ja:["シンボルを記憶"],ko:["심볼 기억하기"],ms_MY:["Ingat Simbol"],nl_NL:"Remember Symbol",pl:["Zapamiętaj symbol"],pt:["Lembrar do Símbolo"],ro:"Remember Symbol",ru:["Запомнить инструмент"],sv:["Kom ihåg symbol"],th:["จำตัวย่อ"],tr:["Sembolü Hatırla"],vi:["Nhớ Mã giao dịch"],zh:["记住商品"],zh_TW:["記住商品"]}},50912:e=>{e.exports={ar:["أسم القالب"],ca_ES:["Nom de la plantilla"],cs:"Template name",de:["Name der Vorlage"],el:"Template name",en:"Template name",es:["Nombre de la plantilla"],fa:"Template name",fr:["Nom du modèle"],
he_IL:["שם תבנית"],hu_HU:["Sablon neve"],id_ID:["Nama template"],it:["Nome modello"],ja:["テンプレート名"],ko:["템플릿이름"],ms_MY:["Nama templat"],nl_NL:"Template name",pl:["Nazwa Szablonu"],pt:["Nome do modelo"],ro:"Template name",ru:["Имя шаблона"],sv:["Mallnamn"],th:["ชื่อเทมเพลต"],tr:["Şablon adı"],vi:["Tên Mẫu"],zh:["模板名称"],zh_TW:["範本名稱"]}}}]);