Release v29.6.0 (from 7388a2a6e02df803a33011b40077c533f89a55f0)
This commit is contained in:
10
changelog.md
10
changelog.md
@@ -5,6 +5,16 @@
|
||||
<!-- markdownlint-disable no-inline-html -->
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
|
||||
## Version 29.6.0
|
||||
|
||||
*Date: Wed Aug 13 2025*
|
||||
|
||||
**Improvements**
|
||||
|
||||
- **Added a `label` property to StudyOrDrawingAddedToChartEventParams.** The [`label`](https:/www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.StudyOrDrawingAddedToChartEventParams#label) property contains the indicator's name as defined in the [`description`](https:/www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.RawStudyMetaInfo#description) field of its [metainfo](https:/www.tradingview.com/charting-library-docs/latest/custom_studies/metainfo).
|
||||
|
||||
---
|
||||
|
||||
## Version 29.5.0
|
||||
|
||||
*Date: Tue Aug 05 2025*
|
||||
|
||||
@@ -317,7 +317,7 @@ const e=this._model.mainSeries().interval();if(null===this._alignerCache||this._
|
||||
i.addChild("bar",new A.LineDataSourcePointIndexProperty(this,e))}_createPointsProperties(){this._pointsProperty=new b.Property,this._pointsProperty.addChild("points",new b.Property);for(let e=0;e<this.pointsCount();e++)this._createPointProperty(e)}_alignPointToRangeOfActualData(e){const t=(0,n.ensureNotNull)(this._model.mainSeries().bars().firstIndex()),i=(0,n.ensureNotNull)(this._model.mainSeries().bars().lastIndex());let s=Math.max(e.index,t);return s=Math.min(s,i),{...e,index:s}}_migrateSymbolProperty(e){const t=this._properties.childs();if(t.symbolStateVersion.value()<2){const i=(0,n.ensureNotNull)(this.ownerSource()),s=(0,n.ensureNotNull)(i.symbolSource()),o=this._model.mainSeries();if(s===o)return void t.symbolStateVersion.setValueSilently(2);if(null===o.symbolInfo())return;if(null===s.symbolInfo())return;o.symbolSameAsCurrent(t.symbol.value())&&t.symbol.setValueSilently((0,y.extractLineToolSymbolFromSymbolInfo)(e,s.symbol())),t.symbolStateVersion.setValueSilently(2)}}_migrateZOrder(){const e=this._properties.childs();e.zOrderVersion.value()<2&&(this.ownerSource()===this.model().mainSeries()&&this.setZorder(this.zorder()-this.model().mainSeries().obsoleteZOrder()),e.zOrderVersion.setValueSilently(2))}_preparePoint(e,t){const i=e;return this._snapTo45DegreesApplicable(t)&&this.points().length>=2&&this.snapPoint45Degree(i,this.points()[this.points().length-2]),i}_addPointIntenal(e,t,i){this._points.push({...e,interval:this._model.mainSeries().interval()});const s=this._points.length===this.pointsCount();return s?(this._lastPoint=null,i||(this._normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),s}_onSourceHiddenMayChange(){this.isSourceHidden()&&this._model.selectionMacro((e=>{e.removeSourceFromSelection(this)})),this._model.invalidate(p.InvalidationMask.validateAction((()=>{this!==this._model.lineBeingCreated()&&(this._isDestroyed||this.processHibernate())})))}_saveAlertIdInState(){return!0}_onPointsetUpdated(e){if(0===e.length)return;const t=this.properties().childs().interval.value();for(let i=0;i<e.length;i++){const s=e[i],o=this._timePoint[s.index],n={index:s.value[0],time:s.value[1],price:o.price,interval:o.interval??t};this._points.length<=s.index?(this._points.push(n),this._pointAdded.fire(this._points.length-1)):(this._points[s.index]=n,this._pointChanged.fire(s.index))}this._onPointsetUpdatedDelegate.fire(),this.updateAllViewsAndRedraw((0,x.sourceChangeEvent)(this.id()))}_onMainSeriesSymbolResolved(){const e=this.ownerSource();null===e||this._model.mainSeries()===e.symbolSource()||this.isSourceHidden()||this.createServerPoints()}_readyToCreatePointset(){return this._timePoint.length>0}_propertiesStateExclusions(){return[]}_syncLineStyleIfNeeded(e){const t=this.linkKey().value();t&&!this._syncLineStyleMuted&&this._syncLineStyleChanges(t,this.syncLineStyleState(e))}_muteSyncLineStyle(){this._syncLineStyleMuted=!0}_unmuteSyncLineStyleWithoutApplyingChanges(){this.propertiesChanged(),this._syncLineStyleMuted=!1}_applyTemplateImpl(e){
|
||||
e.intervalsVisibilities=(0,g.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities);const t=this.properties();t.applyTemplate(e,(0,V.factoryDefaults)(this.toolname.toLowerCase())),t.saveDefaults(),this.propertiesChanged()}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_getAlertPlots(){return[]}_getUndoHistory(){return this._model.undoModel().undoHistory()}_synchronizeAlert(e){}_linePointsToAlertPlot(e,t,i,s){return null}_getAlertCreationAvailable(){return!1}_onAnchoredChange(){if(this.isFixed()){const e=(0,n.ensureNotNull)(this.pointToScreenPoint(this.points()[0]));this.addFixedPoint(e)}else{if(!this._fixedPoint)return;const e=(0,n.ensureNotNull)(this.screenPointToPoint(this._fixedPoint));this._points[0]={...e,interval:this._model.mainSeries().interval()},this.startChanging(),this.setPoint(0,e),this.endChanging(!1,!1),this._timePoint[0]=this._normalizePoint(this._points[0],0),this.clearFixedPoint()}const e=this.linkKey().value();null!==e&&this.isSynchronizable()&&(0,w.restoreLineToolState)({model:this._model,linkKey:e,state:this.state()})}_syncLineStyleChanges(e,t,i){this.anchorable()&&this.isFixed()!==Boolean(this._positionPercents)&&this._onAnchoredChange(),(0,w.changeLineStyle)({linkKey:e,state:t,alertId:i,model:this._model})}static _configureProperties(e){if(this._addCollectedProperties(e),e.hasChild("symbolStateVersion")||e.addChild("symbolStateVersion",new b.Property(1)),e.hasChild("zOrderVersion")||e.addChild("zOrderVersion",new b.Property(1)),e.hasChild("visible")||e.addChild("visible",new b.Property(!0)),e.hasChild("frozen")||e.addChild("frozen",new b.Property(!1)),e.hasChild("symbol")||e.addChild("symbol",new b.Property("")),e.hasChild("currencyId")||e.addChild("currencyId",new b.Property(null)),e.hasChild("unitId")||e.addChild("unitId",new b.Property(null)),e.hasChild("intervalsVisibilities")){const t=(0,T.merge)((0,T.clone)(f.intervalsVisibilitiesDefaults),e.childs().intervalsVisibilities.state());e.removeProperty("intervalsVisibilities"),e.addChild("intervalsVisibilities",new P.IntervalsVisibilitiesProperty(t))}else e.addChild("intervalsVisibilities",new P.IntervalsVisibilitiesProperty(f.intervalsVisibilitiesDefaults));e.hasChild("title")||e.addChild("title",new b.Property("")),["symbolStateVersion","zOrderVersion","visible","frozen","symbol","currencyId","unitId","symbolInfo","points","interval","title"].forEach((t=>e.addExcludedKey(t,5))),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly"),e.hasChild("font")&&e.removeProperty("font")}static _addCollectedProperties(e){e.hasChild("linewidth")&&e.addChild("linesWidths",new E.LineToolWidthsProperty([(0,n.ensureDefined)(e.child("linewidth"))])),e.hasChild("linecolor")&&e.addChild("linesColors",new E.LineToolColorsProperty([(0,n.ensureDefined)(e.child("linecolor"))])),e.hasChild("backgroundColor")&&e.addChild("backgroundsColors",new E.LineToolColorsProperty([(0,n.ensureDefined)(e.child("backgroundColor"))])),e.hasChild("textColor")&&e.addChild("textsColors",new E.LineToolColorsProperty([(0,
|
||||
n.ensureDefined)(e.child("textColor"))])),e.hasChild("linestyle")&&e.addChild("linesStyles",new E.LineToolCollectedProperty([(0,n.ensureDefined)(e.child("linestyle"))])),["linesWidths","linesColors","backgroundsColors","textsColors","linesStyles"].forEach((t=>{e.addExcludedKey(t,7)}))}_areAlertsOnLineToolProhibited(){return null!==this._ownerSource&&!this._ownerSource.canHasAlertOnLineTools()}_removeAlertSubscriptions(){this._unsubscribeAlertCallbacks?.(),this._unsubscribeAlertCallbacks=void 0}_addAlertSubscriptions(e,t={}){}_destroyPanePaneViews(e){const t=this._paneViews.get(e);if(void 0!==t)for(const e of t)e.destroy&&e.destroy();void 0!==e&&e.onDestroyed().unsubscribeAll(this),this._paneViews.delete(e)}_copyPricesWithoutNormalization(){const e=Math.min(this._points.length,this._timePoint.length);for(let t=0;t<e;t++)this._timePoint[t].price=this._points[t].price}async _getChartAlert(){throw new Error("not implemented")}async _syncAlertWithAlertFacade(e={}){try{const t=await this.getAlert();if(!t)return;if(this._addAlertSubscriptions(t,e),e.syncAlertFocus){const e=this._model.selection().isSelected(this);t.setSelected(e)}}catch(e){if(e instanceof Error&&"not_exists"===e.message&&this.hasAlert().value()){this._alertStatus.setValue(0);return void(await getChartAlertsFacade()).removeAlertFromAllChartsSilently(this.id(),(0,n.ensureDefined)(this._alertId))}N.logError("Failed to set alert, alert will not be saved with drawing in chart")}}}},73305:(e,t,i)=>{"use strict";i.d(t,{LineToolCollectedProperty:()=>c,LineToolColorsProperty:()=>d,LineToolWidthsProperty:()=>h,MultipleLineColorsProperty:()=>p,MultipleLineWidthsProperty:()=>_});var s=i(9343),o=i(34776),n=i(23073);const r=(0,s.getLogger)("Chart.LineToolCollectedProperty");class a{applyValue(e,t){e.setValue(t)}}class l extends n.PropertyBase{constructor(e,t){super(),this._properties=e,e.forEach(((e,t)=>e.subscribe(this,((e,i)=>{this._listeners.fire(this,`${t}.${i}`)})))),this._showIfProperty=t}visible(){return!this._showIfProperty||this._showIfProperty?.value()}value(){if(0===this._properties.length)return r.logError("Incorrect call, should not request value of 0 properties"),"mixed";const e=this._properties[0].value();return 1===this._properties.length||this._properties.every((t=>t.value()===e))?e:"mixed"}setValueSilently(e){"mixed"!==e&&this._properties.forEach((t=>t.setValueSilently(e)))}hasChild(e){const t=parseInt(e,10);return!isNaN(t)&&t>=0&&t<this._properties.length}childCount(){return this._properties.length}childNames(){return this._properties.map(((e,t)=>t.toString()))}child(e){const t=parseInt(e,10);return!isNaN(t)&&t>=0&&t<this._properties.length?this._properties[t]:void 0}destroy(){this._properties.forEach((e=>e.unsubscribeAll(this))),this._listeners.destroy()}storeStateIfUndefined(){return!0}weakReference(){return(0,o.weakReference)(this)}ownership(){return(0,o.ownership)(this)}}class c extends l{setValue(e,t,i){if("mixed"===e)return;const s=i??new a;this._properties.forEach((t=>s.applyValue(t,e)))}}class h extends c{}class d extends c{firstColor(){
|
||||
return this._properties[0].value()}}class u extends l{setValue(e,t,i){if("mixed"===e)return;const s=i??new a;this._properties.forEach((t=>t.setValue(e,void 0,s)))}}class _ extends u{}class p extends u{}},77336:(e,t,i)=>{"use strict";i.d(t,{ensureLineToolLoaded:()=>u,getLoadedLineTool:()=>_,isAsyncGenericLineToolName:()=>l,isAsyncStudyLineToolName:()=>c,isLineToolLoaded:()=>h,loadLineTool:()=>d});var s=i(50151);const o=new Map;const n=new Map([["LineToolPriceNote",async()=>(await Promise.all([i.e(8940),i.e(3889),i.e(8009),i.e(380)]).then(i.bind(i,36875))).LineToolPriceNote],["LineToolTextNote",async()=>(await Promise.all([i.e(6645),i.e(3889),i.e(8009),i.e(9116),i.e(9123)]).then(i.bind(i,46902))).LineToolTextNote],["LineToolNote",async()=>(await Promise.all([i.e(3355),i.e(3889),i.e(8009),i.e(9116),i.e(3248)]).then(i.bind(i,40258))).LineToolNote],["LineToolFibSpiral",async()=>(await Promise.all([i.e(3181),i.e(3889),i.e(8009),i.e(8090)]).then(i.bind(i,22717))).LineToolFibSpiral],["LineToolCircleLines",async()=>(await Promise.all([i.e(2787),i.e(3889),i.e(8009),i.e(9445)]).then(i.bind(i,9093))).LineToolCyclicLines],["LineToolNoteAbsolute",async()=>(await Promise.all([i.e(3355),i.e(3889),i.e(8009),i.e(9116),i.e(3248)]).then(i.bind(i,40258))).LineToolNoteAbsolute],["LineToolTable",async()=>(await Promise.all([i.e(9494),i.e(3889),i.e(8009),i.e(9116),i.e(319)]).then(i.bind(i,56176))).LineToolTable],["LineToolFibSpeedResistanceArcs",async()=>(await Promise.all([i.e(1427),i.e(3889),i.e(8009),i.e(9116),i.e(3710)]).then(i.bind(i,49145))).LineToolFibSpeedResistanceArcs],["LineToolPitchfan",async()=>(await Promise.all([i.e(7952),i.e(3889),i.e(8009),i.e(8056),i.e(1313)]).then(i.bind(i,43176))).LineToolPitchfan],["LineToolFibSpeedResistanceFan",async()=>(await Promise.all([i.e(1308),i.e(3889),i.e(8009),i.e(906)]).then(i.bind(i,2662))).LineToolFibSpeedResistanceFan],["LineToolFibWedge",async()=>(await Promise.all([i.e(6760),i.e(3889),i.e(8009),i.e(9116),i.e(3314)]).then(i.bind(i,30051))).LineToolFibWedge],["LineToolEmoji",async()=>(await Promise.all([i.e(6155),i.e(3889),i.e(8009),i.e(1200),i.e(5529)]).then(i.bind(i,39374))).LineToolEmoji],["LineToolBalloon",async()=>(await Promise.all([i.e(3367),i.e(3889),i.e(8009),i.e(3960),i.e(1277)]).then(i.bind(i,69113))).LineToolBalloon],["LineToolComment",async()=>(await Promise.all([i.e(2303),i.e(3889),i.e(8009),i.e(9116),i.e(3960),i.e(3966)]).then(i.bind(i,84738))).LineToolComment],["LineToolBezierCubic",async()=>(await Promise.all([i.e(1432),i.e(3889),i.e(8009),i.e(9014)]).then(i.bind(i,54696))).LineToolBezierCubic],["LineToolInsidePitchfork",async()=>(await Promise.all([i.e(8763),i.e(8468)]).then(i.bind(i,20690))).LineToolInsidePitchfork]]);n.set("LineToolFibRetracement",(async()=>(await Promise.all([i.e(7850),i.e(3723)]).then(i.bind(i,33168))).LineToolFibRetracement)),n.set("LineToolFibChannel",(async()=>(await Promise.all([i.e(7850),i.e(2283)]).then(i.bind(i,42851))).LineToolFibChannel)),
|
||||
return this._properties[0].value()}}class u extends l{setValue(e,t,i){if("mixed"===e)return;const s=i??new a;this._properties.forEach((t=>t.setValue(e,void 0,s)))}}class _ extends u{}class p extends u{}},77336:(e,t,i)=>{"use strict";i.d(t,{ensureLineToolLoaded:()=>u,getLoadedLineTool:()=>_,isAsyncGenericLineToolName:()=>l,isAsyncStudyLineToolName:()=>c,isLineToolLoaded:()=>h,loadLineTool:()=>d});var s=i(50151);const o=new Map;const n=new Map([["LineToolPriceNote",async()=>(await Promise.all([i.e(8940),i.e(3889),i.e(8009),i.e(380)]).then(i.bind(i,36875))).LineToolPriceNote],["LineToolTextNote",async()=>(await Promise.all([i.e(6645),i.e(3889),i.e(8009),i.e(9116),i.e(9123)]).then(i.bind(i,95240))).LineToolTextNote],["LineToolNote",async()=>(await Promise.all([i.e(3355),i.e(3889),i.e(8009),i.e(9116),i.e(3248)]).then(i.bind(i,40258))).LineToolNote],["LineToolFibSpiral",async()=>(await Promise.all([i.e(3181),i.e(3889),i.e(8009),i.e(8090)]).then(i.bind(i,22717))).LineToolFibSpiral],["LineToolCircleLines",async()=>(await Promise.all([i.e(2787),i.e(3889),i.e(8009),i.e(9445)]).then(i.bind(i,9093))).LineToolCyclicLines],["LineToolNoteAbsolute",async()=>(await Promise.all([i.e(3355),i.e(3889),i.e(8009),i.e(9116),i.e(3248)]).then(i.bind(i,40258))).LineToolNoteAbsolute],["LineToolTable",async()=>(await Promise.all([i.e(9494),i.e(3889),i.e(8009),i.e(9116),i.e(319)]).then(i.bind(i,56176))).LineToolTable],["LineToolFibSpeedResistanceArcs",async()=>(await Promise.all([i.e(1427),i.e(3889),i.e(8009),i.e(9116),i.e(3710)]).then(i.bind(i,49145))).LineToolFibSpeedResistanceArcs],["LineToolPitchfan",async()=>(await Promise.all([i.e(7952),i.e(3889),i.e(8009),i.e(8056),i.e(1313)]).then(i.bind(i,43176))).LineToolPitchfan],["LineToolFibSpeedResistanceFan",async()=>(await Promise.all([i.e(1308),i.e(3889),i.e(8009),i.e(906)]).then(i.bind(i,2662))).LineToolFibSpeedResistanceFan],["LineToolFibWedge",async()=>(await Promise.all([i.e(6760),i.e(3889),i.e(8009),i.e(9116),i.e(3314)]).then(i.bind(i,30051))).LineToolFibWedge],["LineToolEmoji",async()=>(await Promise.all([i.e(6155),i.e(3889),i.e(8009),i.e(1200),i.e(5529)]).then(i.bind(i,39374))).LineToolEmoji],["LineToolBalloon",async()=>(await Promise.all([i.e(3367),i.e(3889),i.e(8009),i.e(3960),i.e(1277)]).then(i.bind(i,69113))).LineToolBalloon],["LineToolComment",async()=>(await Promise.all([i.e(2303),i.e(3889),i.e(8009),i.e(9116),i.e(3960),i.e(3966)]).then(i.bind(i,84738))).LineToolComment],["LineToolBezierCubic",async()=>(await Promise.all([i.e(1432),i.e(3889),i.e(8009),i.e(9014)]).then(i.bind(i,54696))).LineToolBezierCubic],["LineToolInsidePitchfork",async()=>(await Promise.all([i.e(8763),i.e(8468)]).then(i.bind(i,20690))).LineToolInsidePitchfork]]);n.set("LineToolFibRetracement",(async()=>(await Promise.all([i.e(7850),i.e(3723)]).then(i.bind(i,33168))).LineToolFibRetracement)),n.set("LineToolFibChannel",(async()=>(await Promise.all([i.e(7850),i.e(2283)]).then(i.bind(i,42851))).LineToolFibChannel)),
|
||||
n.set("LineToolProjection",(async()=>(await Promise.all([i.e(7122),i.e(3945)]).then(i.bind(i,12120))).LineToolProjection)),n.set("LineToolTrendBasedFibExtension",(async()=>(await Promise.all([i.e(7850),i.e(4731)]).then(i.bind(i,68554))).LineToolTrendBasedFibExtension)),n.set("LineToolElliott",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliott)),n.set("LineToolFibCircles",(async()=>(await Promise.all([i.e(7850),i.e(2816)]).then(i.bind(i,57994))).LineToolFibCircles)),n.set("LineToolVertLine",(async()=>(await Promise.all([i.e(7122),i.e(1282)]).then(i.bind(i,56096))).LineToolVertLine)),n.set("LineToolCrossLine",(async()=>(await i.e(7203).then(i.bind(i,92007))).LineToolCrossLine)),n.set("LineToolBarsPattern",(async()=>(await Promise.all([i.e(4543),i.e(5206)]).then(i.bind(i,81756))).LineToolBarsPattern)),n.set("LineToolTrendBasedFibTime",(async()=>(await Promise.all([i.e(5111),i.e(7127)]).then(i.bind(i,27172))).LineToolTrendBasedFibTime)),n.set("LineToolFibTimeZone",(async()=>(await Promise.all([i.e(5111),i.e(1506)]).then(i.bind(i,8532))).LineToolFibTimeZone)),n.set("LineToolDateRange",(async()=>(await i.e(4273).then(i.bind(i,42214))).LineToolDateRange)),n.set("LineToolPriceRange",(async()=>(await i.e(6477).then(i.bind(i,23234))).LineToolPriceRange)),n.set("LineToolDateAndPriceRange",(async()=>(await i.e(1455).then(i.bind(i,70791))).LineToolDateAndPriceRange)),n.set("LineToolParallelChannel",(async()=>(await i.e(2050).then(i.bind(i,56621))).LineToolParallelChannel)),n.set("LineToolTrendAngle",(async()=>(await Promise.all([i.e(7122),i.e(8372)]).then(i.bind(i,83776))).LineToolTrendAngle)),n.set("LineToolTrendLine",(async()=>(await Promise.all([i.e(7122),i.e(8673)]).then(i.bind(i,99294))).LineToolTrendLine)),n.set("LineToolInfoLine",(async()=>(await Promise.all([i.e(7122),i.e(7488)]).then(i.bind(i,51065))).LineToolInfoLine)),n.set("LineToolArrowMark",(async()=>(await i.e(569).then(i.bind(i,27621))).LineToolArrowMark)),n.set("LineToolGannSquare",(async()=>(await i.e(9478).then(i.bind(i,9770))).LineToolGannSquare)),n.set("LineToolGannComplex",(async()=>(await i.e(1963).then(i.bind(i,99083))).LineToolGannComplex)),n.set("LineToolGannFixed",(async()=>(await i.e(6336).then(i.bind(i,8308))).LineToolGannFixed)),n.set("LineToolGannFan",(async()=>(await Promise.all([i.e(5111),i.e(4981)]).then(i.bind(i,85259))).LineToolGannFan)),n.set("LineToolPitchfork",(async()=>(await Promise.all([i.e(8763),i.e(5055)]).then(i.bind(i,64002))).LineToolPitchfork)),n.set("LineToolDisjointAngle",(async()=>(await i.e(9581).then(i.bind(i,57897))).LineToolDisjointChannel)),n.set("LineToolFlatBottom",(async()=>(await i.e(9310).then(i.bind(i,90921))).LineToolFlatBottom)),n.set("LineToolIcon",(async()=>(await i.e(7806).then(i.bind(i,15510))).LineToolIcon)),n.set("LineToolSticker",(async()=>(await i.e(8949).then(i.bind(i,86915))).LineToolSticker)),n.set("LineToolRotatedRectangle",(async()=>(await i.e(4015).then(i.bind(i,23550))).LineToolRotatedRectangle)),
|
||||
n.set("LineToolHeadAndShoulders",(async()=>(await i.e(3378).then(i.bind(i,47267))).LineToolHeadAndShoulders)),n.set("LineToolTriangle",(async()=>(await i.e(6432).then(i.bind(i,39737))).LineToolTriangle)),n.set("LineToolTrianglePattern",(async()=>(await i.e(3383).then(i.bind(i,33865))).LineToolTrianglePattern)),n.set("LineTool5PointsPattern",(async()=>(await i.e(1155).then(i.bind(i,17658))).LineTool5PointsPattern)),n.set("LineToolThreeDrivers",(async()=>(await i.e(4602).then(i.bind(i,46660))).LineToolThreeDrivers)),n.set("LineToolABCD",(async()=>(await i.e(5283).then(i.bind(i,30906))).LineToolABCD)),n.set("LineToolPolyline",(async()=>(await i.e(3866).then(i.bind(i,51691))).LineToolPolyline)),n.set("LineToolPath",(async()=>(await i.e(961).then(i.bind(i,14150))).LineToolPath)),n.set("LineToolPrediction",(async()=>(await i.e(9534).then(i.bind(i,29356))).LineToolPrediction)),n.set("LineToolPriceLabel",(async()=>(await i.e(6484).then(i.bind(i,83710))).LineToolPriceLabel)),n.set("LineToolArrowMarker",(async()=>(await i.e(1470).then(i.bind(i,66403))).LineToolArrowMarker)),n.set("LineToolSignpost",(async()=>(await Promise.all([i.e(7122),i.e(4674)]).then(i.bind(i,28820))).LineToolSignpost)),n.set("LineToolBrush",(async()=>(await i.e(5122).then(i.bind(i,28462))).LineToolBrush)),n.set("LineToolArc",(async()=>(await i.e(5967).then(i.bind(i,87654))).LineToolArc)),n.set("LineToolCallout",(async()=>(await Promise.all([i.e(7122),i.e(688)]).then(i.bind(i,62828))).LineToolCallout)),n.set("LineToolText",(async()=>(await Promise.all([i.e(7122),i.e(2312)]).then(i.bind(i,424))).LineToolText)),n.set("LineToolHorzLine",(async()=>(await Promise.all([i.e(7122),i.e(4201)]).then(i.bind(i,43636))).LineToolHorzLine)),n.set("LineToolHorzRay",(async()=>(await i.e(574).then(i.bind(i,47845))).LineToolHorzRay)),n.set("LineToolRectangle",(async()=>(await Promise.all([i.e(7122),i.e(8422)]).then(i.bind(i,63397))).LineToolRectangle)),n.set("LineToolCircle",(async()=>(await Promise.all([i.e(7122),i.e(6748)]).then(i.bind(i,17333))).LineToolCircle)),n.set("LineToolEllipse",(async()=>(await Promise.all([i.e(7122),i.e(7660)]).then(i.bind(i,59002))).LineToolEllipse)),n.set("LineToolTimeCycles",(async()=>(await i.e(8334).then(i.bind(i,4741))).LineToolTimeCycles)),n.set("LineToolSineLine",(async()=>(await i.e(1713).then(i.bind(i,8066))).LineToolSineLine)),n.set("LineToolGhostFeed",(async()=>(await i.e(7563).then(i.bind(i,37968))).LineToolGhostFeed)),n.set("LineToolBezierQuadro",(async()=>(await i.e(8061).then(i.bind(i,28904))).LineToolBezierQuadro)),n.set("LineToolArrow",(async()=>(await Promise.all([i.e(7122),i.e(8607)]).then(i.bind(i,96068))).LineToolArrow)),n.set("LineToolRay",(async()=>(await Promise.all([i.e(7122),i.e(4934)]).then(i.bind(i,36224))).LineToolRay)),n.set("LineToolExtended",(async()=>(await Promise.all([i.e(7122),i.e(925)]).then(i.bind(i,6921))).LineToolExtended)),n.set("LineToolSchiffPitchfork",(async()=>(await Promise.all([i.e(8763),i.e(7175)]).then(i.bind(i,63533))).LineToolSchiffPitchfork)),
|
||||
n.set("LineToolSchiffPitchfork2",(async()=>(await Promise.all([i.e(8763),i.e(341)]).then(i.bind(i,68802))).LineToolSchiffPitchfork2)),n.set("LineToolTextAbsolute",(async()=>(await Promise.all([i.e(7122),i.e(2312)]).then(i.bind(i,424))).LineToolTextAbsolute)),n.set("LineToolArrowMarkLeft",(async()=>(await i.e(569).then(i.bind(i,27621))).LineToolArrowMarkLeft)),n.set("LineToolArrowMarkRight",(async()=>(await i.e(569).then(i.bind(i,27621))).LineToolArrowMarkRight)),n.set("LineToolArrowMarkUp",(async()=>(await i.e(569).then(i.bind(i,27621))).LineToolArrowMarkUp)),n.set("LineToolArrowMarkDown",(async()=>(await i.e(569).then(i.bind(i,27621))).LineToolArrowMarkDown)),n.set("LineToolFlagMark",(async()=>(await i.e(8820).then(i.bind(i,41124))).LineToolFlagMark)),n.set("LineToolCypherPattern",(async()=>(await i.e(6740).then(i.bind(i,16628))).LineToolCypherPattern)),n.set("LineToolElliottImpulse",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliottImpulse)),n.set("LineToolElliottTriangle",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliottTriangle)),n.set("LineToolElliottTripleCombo",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliottTripleCombo)),n.set("LineToolElliottCorrection",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliottCorrection)),n.set("LineToolElliottDoubleCombo",(async()=>(await Promise.resolve().then(i.bind(i,65365))).LineToolElliottDoubleCombo)),n.set("LineToolRiskRewardLong",(async()=>(await Promise.all([i.e(2342),i.e(1667),i.e(2277)]).then(i.bind(i,21986))).LineToolRiskRewardLong)),n.set("LineToolRiskRewardShort",(async()=>(await Promise.all([i.e(2342),i.e(1667),i.e(6768)]).then(i.bind(i,65137))).LineToolRiskRewardShort)),n.set("LineToolPosition",(async()=>(await i.e(1314).then(i.t.bind(i,40265,19))).LineToolPosition)),n.set("LineToolOrder",(async()=>(await i.e(2232).then(i.t.bind(i,64732,19))).LineToolOrder)),n.set("LineToolHighlighter",(async()=>(await i.e(2087).then(i.bind(i,65539))).LineToolHighlighter)),n.set("LineToolImage",(async()=>(await Promise.all([i.e(5402),i.e(5231)]).then(i.bind(i,18181))).LineToolImage)),n.set("LineToolExecution",(async()=>(await Promise.resolve().then(i.bind(i,56991))).LineToolExecution));const r=new Map,a=new Map([["LineToolAnchoredVWAP",async()=>(await i.e(5500).then(i.bind(i,13099))).LineToolAnchoredVWAP],["LineToolRegressionTrend",async()=>(await i.e(9748).then(i.bind(i,10986))).LineToolRegressionTrend],["LineToolVbPFixed",async()=>(await i.e(5695).then(i.bind(i,71131))).LineToolVbPFixed],["LineToolFixedRangeVolumeProfile",async()=>(await i.e(5695).then(i.bind(i,25937))).LineToolFixedRangeVolumeProfile]]);function l(e){return n.has(e)||a.has(e)||o.has(e)}function c(e){return a.has(e)}function h(e){return!l(e)||o.has(e)||r.has(e)}async function d(e){if(h(e))return _(e);const t=c(e),i=(0,s.ensureDefined)((t?a:n).get(e)),l=await i();return t?(r.set(e,(0,s.ensureDefined)(l)),_(e)):(o.set(e,(0,s.ensureDefined)(l)),_(e))}async function u(e){l(e)&&!h(e)&&await d(e)}function _(e){return c(e)?(0,
|
||||
@@ -709,9 +709,9 @@ Vt.viewportChangeEvent)()),this.recalcVisibleRangeStudies(Do.RecalcVisibleRangeS
|
||||
;i.setStretchFactor(t*a);let c=t-l,h=this._panes.length-1;for(const e of this._panes)if(e!==i){const t=Math.min(r,Math.max(30,e.height()-c/h));c-=e.height()-t,h-=1;const i=t*a;e.setStretchFactor(i)}this.fullUpdate()}clearCurrentPosition(){const e=this.crosshairSource();e.clearPosition(),(0,n.ensureNotNull)(e.dataWindowView()).update((0,Vt.sourceChangeEvent)(e.id())),c_(this._panes),this.invalidate(fo.InvalidationMask.cursor()),this._undoModel.syncCrosshair(null),this._phantomSourceContainer.onCursorPositionUpdated()}setAndSaveCurrentPosition(e,t,i,s){this.crosshairSource().saveOriginCoords(e,t),this.setCurrentPosition(e,t,i,s)}setCurrentPosition(e,t,i,s){let o=NaN;const r=this._timeScale.coordinateToVisibleIndex(e),a=(this._lineBeingEdited??this.lineBeingCreated())?.priceScale()??i.defaultPriceScale();let l=null;!a.isEmpty()&&Number.isFinite(t)&&(l=(0,n.ensureNotNull)(i.mainDataSource()).firstValue(),null!==l&&(o=a.coordinateToPrice(t,l)));const c=this._crossHairSelectPointMode.value()!==lt.SelectPointMode.None,h=lt.tool.value(),d=this.mainSeries(),u=this.crosshairSource(),_=u.index,p=u.price,m=c||lt.isStudyEditingNow.value();let g=!1;if(a===this._mainSeries.priceScale())if((0,Ct.isLineDrawnWithPressedButton)(h))g=null===this._lineBeingCreated||(0,Qs.isBrushBasedLineTool)(this._lineBeingCreated.lineDataSource)&&this._lineBeingCreated.lineDataSource.hasOnlyOnePoint();else{g=Boolean(this._lineBeingCreated||this._lineBeingEdited||(0,Ct.isLineToolName)(h)||(0,lt.toolIsMeasure)(h))||m}!this._isSettingsExternalPosition&&g?(o=this._magnet.align(o,r,i),null!==l&&this._setCorrectedPositionToCrosshair(r,o,i)):this._magnet.resetLastValue();let f=null;if(isNaN(o)||(f=i),this._isTimeScrolling){if(!this._isSettingsExternalPosition&&c){const e=d.bars().firstIndex(),t=d.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(r,e),t);s!==r&&this._setCorrectedPositionToCrosshair(s,o,i)}}else u.setPosition(u.index,o,f);return}u.setOnHoveredChartWidget(!0),u.setPosition(r,o,f),(0,n.ensureNotNull)(u.dataWindowView()).update((0,Vt.sourceChangeEvent)(u.id())),c_(this._panes);const y=d.syncModel();this.crosshairSource().startMeasurePoint()||this._lineBeingCreated?this.lightUpdate():this.invalidate(fo.InvalidationMask.cursor());const v=this.lineBeingCreated();if(v){const e=v.linkKey().value();if(!this._isSettingsExternalPosition){const t=v.setLastPoint({index:r,price:o},s);if(v.updateAllViews((0,Vt.sourceChangeEvent)(v.id())),t.price===o&&t.index===r||this._setCorrectedPositionToCrosshair(t.index,t.price,i),y&&e){const i=this._timeScale.points().roughTime(t.index,y.projectTime.bind(y));(0,lt.setLineToolLastPoint)({model:this,linkKey:e,point:{timeStamp:(0,n.ensureNotNull)(i),price:t.price}})}}}if(!this._isSettingsExternalPosition&&null!==this._lineBeingEdited&&null!==this._linePointBeingEdited){const e={index:r,price:o};if(this._linePointBeingChanged?.nonDiscreteIndex){const t=this.crosshairSource().originX();Number.isFinite(t)&&(e.index=this._timeScale.coordinateToFloatIndex(t))}this.changeLinePoint(e,s)
|
||||
;const t=this._lineBeingEdited.alignCrossHairToAnchor(this._linePointBeingEdited)?this._lineBeingEdited.getPoint(this._linePointBeingEdited):e;null!==t&&this._setCorrectedPositionToCrosshair(t.index,t.price,i)}if(!this._isSettingsExternalPosition&&1===this._sourcesBeingMoved.length){const e=this._sourcesBeingMoved[0];if(e.alignCrossHairToMovePoint?.()){const t=e.currentMovingPoint?.();t&&t.logical&&this._setCorrectedPositionToCrosshair(t.logical.index,t.logical.price,i)}}if(!this._isSettingsExternalPosition&&m){const e=d.bars().firstIndex(),t=d.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(r,e),t);s!==r&&this._setCorrectedPositionToCrosshair(s,o,i)}}(_!==r||p!==o)&&this._syncCrosshair(s)}setExternalPosition(e,t){let i;const s=this.crosshairSource();if(s.setOnHoveredChartWidget(!1),null!==e&&(0,ut.isNumber)(e.timeStamp)){const t=this.mainSeries().syncModel();if(t){const s=this.createSyncPoint(e.syncSourceTarget,t.syncSourceTarget()).sourceTimeToTargetTime(e.timeStamp);i=this._timeScale.points().roughIndex(s,t.distance.bind(t),1)}}if(null!==e&&null!=i&&Number.isFinite(i)){this._isSettingsExternalPosition=!0;const o=(0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),r=this._timeScale.indexToCoordinate(i),a=(0,n.ensureNotNull)(o.mainDataSource()).firstValue();if(null!==a){let i=NaN;void 0!==e.price&&Number.isFinite(e.price)&&(i=this.mainSeries().priceScale().priceToCoordinate(e.price,a)),s.clearOriginCoords(),this.setCurrentPosition(r,i,o,t)}return s.setOnHoveredChartWidget(!1),void(this._isSettingsExternalPosition=!1)}s.clearPosition(),(0,n.ensureNotNull)(s.dataWindowView()).update((0,Vt.sourceChangeEvent)(s.id())),c_(this._panes),this.invalidate(fo.InvalidationMask.cursor())}startScaleTime(e){this._timeScale.startScale(e)}scaleTimeTo(e){this._timeScale.scaleTo(e),this.recalculateAllPanes((0,Vt.viewportChangeEvent)()),this.lightUpdate()}endScaleTime(){this._timeScale.endScale(),this.lightUpdate(),this.recalcVisibleRangeStudies(Do.RecalcVisibleRangeStudiesReason.ViewportChangeUserAction)}resetTimeScale(){this._timeScale.restoreDefault(),this.recalculateAllPanes((0,Vt.viewportChangeEvent)()),this.recalcVisibleRangeStudies(Do.RecalcVisibleRangeStudiesReason.ViewportChangeUserAction),this.lightUpdate(),this._resetScales.fire()}startScalePrice(e,t,i){e.startScalePrice(t,i)}scalePriceTo(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}endScalePrice(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}startTwoPointsScalePrice(e,t,i,s){t.startTwoPointsScale(i,s)}twoPointsScalePriceTo(e,t,i,s){t.twoPointsScale(i,s),t.updateAllViews((0,Vt.viewportChangeEvent)()),this.invalidate(this._paneInvalidationMask(e))}endTwoPointsScalePrice(e,t){t.endTwoPointsScale(),this.invalidate(this._paneInvalidationMask(e))}resetPriceScale(e,t){e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}
|
||||
restorePriceScaleState(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}detachSource(e){const t=this.paneForSource(e);return!!t&&(t.removeDataSource(e),t.isEmpty()?(this._lineBeingCreated&&t===this._paneBeingCreatedLineOn&&this.cancelCreatingLine(),this.removePane(t),!0):(this.fullUpdate(),!1))}restoreSource(e,t,i,s,o){const n=e?this.createPane(t):this.panes()[t],r=(0,mt.isStudyState)(s),a=r?n.restoreStudy(s):(0,mt.isLineToolState)(s)?n.restoreLineTool(s):s.id===tpoSummaryDataSourceId&&18===this.mainSeries().style()?n.restoreTpoSummaryDataSource(s):null;if(!a)return null;let l=null;if(o?(l=n.getPriceScaleById(o.id),l||(l=n.createPriceScaleAtPosition(o.position,o.priceScaleIndex),l.setId(o.id))):l=a.ownerSource()?.priceScale()??l,l&&(a.setPriceScale(l),l.addDataSource(a)),!e&&i&&i.overlayPriceScales){const e=this.dataSources().filter((e=>void 0!==i.overlayPriceScales[e.id()]));e.forEach((e=>n.removeSourceFromPriceScale(e)));const t=new Map;e.forEach((e=>{const s=i.overlayPriceScales[e.id()];if(!s)return;let o;t.has(s.id)?o=t.get(s.id):(o=n.createPriceScaleAtPosition("overlay"),o.restoreState(s),t.set(s.id,o)),e.setPriceScale(o),o.addDataSource(e)}))}return e&&i&&n.restoreState({state:i,withData:!1,version:this.version()}),r&&(this.recalculateAllPanes((0,Vt.sourceChangeEvent)(a.id())),this.mainSeries().invalidateBarColorerCache(),this.fullUpdate()),a}children(e,t){return this.dataSources().filter((i=>(0,Xs.isStudy)(i)?!t&&i.parentSources().includes(e):i.ownerSource()===e))}onRearrangePanes(){return this._onRearrangePanes}studyInserted(){return this._studyInserted}finishLineTool(e){const t=e.linkKey().value();(0,lt.drawOnAllCharts)().value()&&null!==t&&e.isSynchronizable()&&(0,lt.finishLineTool)({linkKey:t,model:this})}startChangingLinetool(e,t,i,s,o){this._lineBeingEdited=e,this._linePointBeingChanged=t||null,this._linePointBeingEdited=void 0===i?null:i,this._lineBeingEdited.startChanging(i,t,o),lt.isToolEditingNow.setValue(!0);const r=(0,n.ensureNotNull)(this.paneForSource(e));this._lineBeingEdited.startDragPoint&&void 0!==i&&void 0!==t&&this._lineBeingEdited.startDragPoint(i,t),o||void 0===i||void 0===t||this._lineBeingEdited.setPoint(i,t,s,o),this._lineBeingEdited.updateAllViews((0,Vt.sourceChangeEvent)(this._lineBeingEdited.id()));const a=this._paneInvalidationMask(r,fo.InvalidationLevel.Light);this.invalidate(a);const l=e.linkKey().value();if(l&&e.isSynchronizable()&&void 0!==i&&void 0!==t){const o=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,lt.startChangingLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:o},positionPercents:e.positionPercents(),pointIndex:i,envState:s||null})}}createLineTool(e){const{pane:t,point:i,linetool:s,linkKey:o=null,sharingMode:r=0,id:a,fromExternalModel:l}=e;let{properties:c,ownerSource:h}=e;if((0,n.assert)((0,Ct.isLineToolName)(s),`Cannot create unknown line tool: ${s}`),c){const e={...Ku.intervalsVisibilitiesDefaults},t=c.childs().intervalsVisibilities.state();(0,
|
||||
ut.merge)(e,t??{});const i=c.state();i.intervalsVisibilities=e,c=(0,Qs.createLineToolProperties)(this.backgroundTheme().spawnOwnership(),s,!this.readOnly(),i)}const d=(0,Qs.createLineTool)(s,this,c,null,void 0,a);if("LineToolExecution"!==s){let e;switch(s){case"LineToolIcon":e=d.properties().childs().icon.value().toString(16).toUpperCase();break;case"LineToolEmoji":e=d.properties().childs().emoji.value();break;case"LineToolSticker":e=d.properties().childs().sticker.value()}(0,ne.trackEvent)("drawings","Study_Drawing_"+s,e)}(0,Qs.isStudyLineTool)(d)&&(0,ne.trackEvent)("studies",`Study_${d.metaInfo().id}`);const u=!d.linkKey().value()&&!o;h=(0,n.ensureDefined)(h||(0,n.ensureNotNull)(t.mainDataSource())),c||(0,Qs.prepareLineToolPropertiesByOwnerSource)(d.properties(),h),d.setOwnerSource(h);const _=h.priceScale();if(d.setPriceScale(_),r_&&h===this.mainSeries()&&d.share(r),t.addDataSource(d,_,!1),null!==d.preferredZOrder()&&t.insertAfter([d],this.mainSeries()),(0,lt.drawOnAllCharts)().value()){const e=d.isSynchronizable()?o||(0,fe.randomHash)():null;d.linkKey().setValue(e)}else d.linkKey().setValue(o);let p;if(u&&d.enableCurrentIntervalVisibility(),d.isFixed()){const e=(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).firstValue()),s=this._timeScale.indexToCoordinate(i.index),o=(0,n.ensureNotNull)(_).priceToCoordinate(i.price,e);p=d.addFixedPoint(new Lt.Point(s,o))}else p=d.addPoint(i);return p||(this._lineBeingCreated={lineDataSource:d,fromExternal:!!l},this._paneBeingCreatedLineOn=t,lt.isToolCreatingNow.setValue(!0)),this.fullUpdate(),d}endChangingLinetool(e,t){const i=(0,n.ensureNotNull)(this._lineBeingEdited),s=i.endChanging(!1,e,t);this._lineBeingEdited=null,lt.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this._linePointBeingChanged=null,this.lightUpdate();const o={points:i.normalizedPoints(),interval:this.mainSeries().interval()},r=i.linkKey().value();null!==r&&i.isSynchronizable()&&!t&&(0,lt.finishChangingLineTool)({model:this,linkKey:r,symbol:this.mainSeries().symbol(),finalState:o,changes:s})}continueCreatingLine(e,t,i,s,o){const r=(0,n.ensureNotNull)(this.lineBeingCreated()),a=r.addPoint(e,t,i,o);r.updateAllViews((0,Vt.sourceChangeEvent)(r.id()));const l=new fo.InvalidationMask(fo.InvalidationLevel.Light);return a&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null,lt.isToolCreatingNow.setValue(!1)),this.invalidate(l),a}cancelCreatingLine(){const e=this.lineBeingCreated();e&&(this.removeSource(e),this._lineBeingCreated=null,this._lineCancelled.fire(),lt.isToolCreatingNow.setValue(!1),(0,lt.drawOnAllCharts)().value()&&e.isSynchronizable()&&(0,lt.cancelLineTool)({model:this}))}lineBeingCreated(){return this._lineBeingCreated?.lineDataSource||null}lineBeingCreateFromExternal(){return this._lineBeingCreated?.fromExternal||!1}paneBeingCreatedLineOn(){return this._paneBeingCreatedLineOn}lineCancelled(){return this._lineCancelled}isPhantomLine(e){return this._phantomSourceContainer.source()===e}alignTo45Degrees(e,t){const[i,s]=t,o={...s};e.snapPoint45Degree(i,o),
|
||||
this.startChangingLinetool(e,s,s.pointIndex),this.changeLinePoint(o,Eo.EnvironmentState.create(!0)),this.endChangingLinetool(!1)}changeLinePoint(e,t,i){const s=(0,n.ensureNotNull)(this._lineBeingEdited),o=(0,n.ensureNotNull)(this._linePointBeingEdited);let r=e.price,a=e.index;if(s.setPoint(o,e,t,i),!i){const t=s.alignCrossHairToAnchor(o)?s.getPoint(o):e;null!==t&&(a=t.index,r=t.price)}s.updateAllViews((0,Vt.sourceChangeEvent)(s.id())),this.lightUpdate();const l=s.linkKey().value();if(!i&&null!==l&&s.isSynchronizable()){const e=(0,n.ensureNotNull)(this._linePointBeingChanged),i={indexesChanged:a!==e.index,pricesChanged:r!==e.price},c=s.getChangePointForSync(o);if(null!==c){const e=this.externalTimeStamp(a);null!==e&&(r=c.price,(0,lt.changeLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:r,timeStamp:e},positionPercents:s.positionPercents(),envState:t,changes:i}))}}}changeLinePoints(e,t,i){const s=e.points(),o=e.linkKey().value();!i&&o&&e.isSynchronizable()&&t.forEach(((t,i)=>{const r=s[i],a=r.price!==t.price,l=r.index!==t.index;if(e.getChangePointForSync(i)){const i=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,lt.changeLineTool)({linkKey:o,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:i},positionPercents:e.positionPercents(),changes:{pricesChanged:a,indexesChanged:l}})}})),e.setPoints(t),e.updateAllViews((0,Vt.sourceChangeEvent)(e.id())),this.lightUpdate()}startScrollTime(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0,this.mainSeries().clearGotoDateResult()}scrollTimeTo(e){this._timeScale.scrollTo(e),this.recalculateAllPanes((0,Vt.viewportChangeEvent)()),this.lightUpdate()}endScrollTime(){this._timeScale.endScroll(),this.lightUpdate(),this.recalcVisibleRangeStudies(Do.RecalcVisibleRangeStudiesReason.ViewportChangeUserAction),this._isTimeScrolling=!1}startScrollPrice(e,t,i){e.startScrollPrice(t,i)}scrollPriceTo(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}endScrollPrice(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}addCustomSource(e,t,i=Do.CustomSourceLayer.Foreground){this._customSourcesMap.has(e)&&a_.logWarn(`Attempt to add the same custom source multiple time "${e}"`),a_.logNormal(`Adding custom source "${e}"`);const s=t(e,this);switch(i){case Do.CustomSourceLayer.Background:this._bgCustomSources.push(s);break;case Do.CustomSourceLayer.Foreground:this._fgCustomSources.push(s);break;case Do.CustomSourceLayer.Topmost:this._topmostCustomSources.push(s);break;default:throw new Error(`Unknown custom sources layer ${i}`)}this._allCustomSources.push(s),this._customSourcesMap.set(e,s),this.lightUpdate()}removeCustomSource(e){this._removeCustomSource(e),this.lightUpdate()}hasCustomSource(e){return this._customSourcesMap.has(e)}customSourceForName(e){return this._customSourcesMap.get(e)||null}customSourceName(e){let t=null;return this._customSourcesMap.forEach(((i,s)=>{i===e&&(t=s)})),t}customSources(e){switch(e){
|
||||
case Do.CustomSourceLayer.Background:return this._bgCustomSources;case Do.CustomSourceLayer.Foreground:return this._fgCustomSources;case Do.CustomSourceLayer.Topmost:return this._topmostCustomSources;default:return this._allCustomSources}}addMultiPaneSource(e){this._multiPaneSources.push(e),this._onMultipaneSourcesCollectionChanged.fire(),this.lightUpdate()}removeMultiPaneSource(e){const t=this._multiPaneSources.indexOf(e);-1===t?a_.logWarn("Attempt to remove multi-pane source which does not exist in the model"):(this._onMultipaneSourcesCollectionChanged.fire(),this._multiPaneSources.splice(t,1)),this.lightUpdate()}multiPaneSources(e){return this._multiPaneSources.filter((t=>!e.hasDataSource(t)))}onMultipaneSourcesCollectionChanged(){return this._onMultipaneSourcesCollectionChanged}rendererOptionsProvider(){return this._rendererOptionsProvider}magnet(){return this._magnet}priceAxisRendererOptions(){return this._rendererOptionsProvider.options()}priceScaleSlotsCount(){let e=0,t=0;this._panes.forEach((i=>{e=Math.max(i.leftPriceScales().length,e),t=Math.max(i.rightPriceScales().length,t)}));const i=e+t;if(ze.CheckMobile.any()){const e=(0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),t=e.priceScalePosition(this.mainSeries().priceScale());return("overlay"===t?e.rightPriceScales().length>0:"right"===t)?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:i}}dateTimeFormatter(){return this._dateTimeFormatter}dateFormatter(){return this._dateFormatter}timeFormatter(){return this._timeFormatter}isUnmergeAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return(0,n.ensureNotNull)(this.paneForSource(e)).dataSources().filter(this._unmergeAvailable,this).length>1}isMergeDownAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;const t=this.paneForSource(e),i=this.panes().filter((e=>e.mode()===Bi.PaneMode.Regular));return t!==i[i.length-1]}isMergeUpAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return this.paneForSource(e)!==this.panes().filter((e=>e.mode()===Bi.PaneMode.Regular))[0]}isPriceScaleVisible(e){const t=e.mainSource();if(!t)return!1;const i=(0,n.ensureNotNull)(this.paneForSource(t)),s=i.priceScalePosition(e);if("overlay"===s)return!0;const o=i.priceScaleIndex(e,s),r=this.priceScaleSlotsCount()[s];return void 0!==o&&o<r}getStudyShiftColorStartOffset(){return this._studyShiftColorStartOffset}setStudyShiftColorStartOffset(e){this._studyShiftColorStartOffset=e}sessions(){return(0,n.ensureNotNull)(this._sessions)}createSessions(e){if(null===this._sessions){const t=function(e){const t=new Ic(e);return(0,h.applyDefaultsOverrides)(t.childs().sessionHighlight,void 0,!1,"sessions"),t.removeDuplicateProperties(),t}((0,e_.createWVFromGetterAndSubscription)((()=>this.mainSeries().symbolInfo()),this.mainSeries().dataEvents().symbolResolved()).ownership());this._sessions=new Mc((async()=>{const s=await Promise.all([i.e(4821),i.e(7539)]).then(i.bind(i,83943));return this.addCustomSource("sessions",((i,o)=>{const n=new s.Sessions(i,o,t,e)
|
||||
ut.merge)(e,t??{});const i=c.state();i.intervalsVisibilities=e,c=(0,Qs.createLineToolProperties)(this.backgroundTheme().spawnOwnership(),s,!this.readOnly(),i)}const d=(0,Qs.createLineTool)(s,this,c,null,void 0,a);if("LineToolExecution"!==s){let e;switch(s){case"LineToolIcon":e=d.properties().childs().icon.value().toString(16).toUpperCase();break;case"LineToolEmoji":e=d.properties().childs().emoji.value();break;case"LineToolSticker":e=d.properties().childs().sticker.value()}(0,ne.trackEvent)("drawings","Study_Drawing_"+s,e)}(0,Qs.isStudyLineTool)(d)&&(0,ne.trackEvent)("studies",`Study_${d.metaInfo().id}`,d.metaInfo().description);const u=!d.linkKey().value()&&!o;h=(0,n.ensureDefined)(h||(0,n.ensureNotNull)(t.mainDataSource())),c||(0,Qs.prepareLineToolPropertiesByOwnerSource)(d.properties(),h),d.setOwnerSource(h);const _=h.priceScale();if(d.setPriceScale(_),r_&&h===this.mainSeries()&&d.share(r),t.addDataSource(d,_,!1),null!==d.preferredZOrder()&&t.insertAfter([d],this.mainSeries()),(0,lt.drawOnAllCharts)().value()){const e=d.isSynchronizable()?o||(0,fe.randomHash)():null;d.linkKey().setValue(e)}else d.linkKey().setValue(o);let p;if(u&&d.enableCurrentIntervalVisibility(),d.isFixed()){const e=(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).firstValue()),s=this._timeScale.indexToCoordinate(i.index),o=(0,n.ensureNotNull)(_).priceToCoordinate(i.price,e);p=d.addFixedPoint(new Lt.Point(s,o))}else p=d.addPoint(i);return p||(this._lineBeingCreated={lineDataSource:d,fromExternal:!!l},this._paneBeingCreatedLineOn=t,lt.isToolCreatingNow.setValue(!0)),this.fullUpdate(),d}endChangingLinetool(e,t){const i=(0,n.ensureNotNull)(this._lineBeingEdited),s=i.endChanging(!1,e,t);this._lineBeingEdited=null,lt.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this._linePointBeingChanged=null,this.lightUpdate();const o={points:i.normalizedPoints(),interval:this.mainSeries().interval()},r=i.linkKey().value();null!==r&&i.isSynchronizable()&&!t&&(0,lt.finishChangingLineTool)({model:this,linkKey:r,symbol:this.mainSeries().symbol(),finalState:o,changes:s})}continueCreatingLine(e,t,i,s,o){const r=(0,n.ensureNotNull)(this.lineBeingCreated()),a=r.addPoint(e,t,i,o);r.updateAllViews((0,Vt.sourceChangeEvent)(r.id()));const l=new fo.InvalidationMask(fo.InvalidationLevel.Light);return a&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null,lt.isToolCreatingNow.setValue(!1)),this.invalidate(l),a}cancelCreatingLine(){const e=this.lineBeingCreated();e&&(this.removeSource(e),this._lineBeingCreated=null,this._lineCancelled.fire(),lt.isToolCreatingNow.setValue(!1),(0,lt.drawOnAllCharts)().value()&&e.isSynchronizable()&&(0,lt.cancelLineTool)({model:this}))}lineBeingCreated(){return this._lineBeingCreated?.lineDataSource||null}lineBeingCreateFromExternal(){return this._lineBeingCreated?.fromExternal||!1}paneBeingCreatedLineOn(){return this._paneBeingCreatedLineOn}lineCancelled(){return this._lineCancelled}isPhantomLine(e){return this._phantomSourceContainer.source()===e}alignTo45Degrees(e,t){const[i,s]=t,o={...s}
|
||||
;e.snapPoint45Degree(i,o),this.startChangingLinetool(e,s,s.pointIndex),this.changeLinePoint(o,Eo.EnvironmentState.create(!0)),this.endChangingLinetool(!1)}changeLinePoint(e,t,i){const s=(0,n.ensureNotNull)(this._lineBeingEdited),o=(0,n.ensureNotNull)(this._linePointBeingEdited);let r=e.price,a=e.index;if(s.setPoint(o,e,t,i),!i){const t=s.alignCrossHairToAnchor(o)?s.getPoint(o):e;null!==t&&(a=t.index,r=t.price)}s.updateAllViews((0,Vt.sourceChangeEvent)(s.id())),this.lightUpdate();const l=s.linkKey().value();if(!i&&null!==l&&s.isSynchronizable()){const e=(0,n.ensureNotNull)(this._linePointBeingChanged),i={indexesChanged:a!==e.index,pricesChanged:r!==e.price},c=s.getChangePointForSync(o);if(null!==c){const e=this.externalTimeStamp(a);null!==e&&(r=c.price,(0,lt.changeLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:r,timeStamp:e},positionPercents:s.positionPercents(),envState:t,changes:i}))}}}changeLinePoints(e,t,i){const s=e.points(),o=e.linkKey().value();!i&&o&&e.isSynchronizable()&&t.forEach(((t,i)=>{const r=s[i],a=r.price!==t.price,l=r.index!==t.index;if(e.getChangePointForSync(i)){const i=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,lt.changeLineTool)({linkKey:o,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:i},positionPercents:e.positionPercents(),changes:{pricesChanged:a,indexesChanged:l}})}})),e.setPoints(t),e.updateAllViews((0,Vt.sourceChangeEvent)(e.id())),this.lightUpdate()}startScrollTime(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0,this.mainSeries().clearGotoDateResult()}scrollTimeTo(e){this._timeScale.scrollTo(e),this.recalculateAllPanes((0,Vt.viewportChangeEvent)()),this.lightUpdate()}endScrollTime(){this._timeScale.endScroll(),this.lightUpdate(),this.recalcVisibleRangeStudies(Do.RecalcVisibleRangeStudiesReason.ViewportChangeUserAction),this._isTimeScrolling=!1}startScrollPrice(e,t,i){e.startScrollPrice(t,i)}scrollPriceTo(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}endScrollPrice(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,fo.InvalidationLevel.Light))}addCustomSource(e,t,i=Do.CustomSourceLayer.Foreground){this._customSourcesMap.has(e)&&a_.logWarn(`Attempt to add the same custom source multiple time "${e}"`),a_.logNormal(`Adding custom source "${e}"`);const s=t(e,this);switch(i){case Do.CustomSourceLayer.Background:this._bgCustomSources.push(s);break;case Do.CustomSourceLayer.Foreground:this._fgCustomSources.push(s);break;case Do.CustomSourceLayer.Topmost:this._topmostCustomSources.push(s);break;default:throw new Error(`Unknown custom sources layer ${i}`)}this._allCustomSources.push(s),this._customSourcesMap.set(e,s),this.lightUpdate()}removeCustomSource(e){this._removeCustomSource(e),this.lightUpdate()}hasCustomSource(e){return this._customSourcesMap.has(e)}customSourceForName(e){return this._customSourcesMap.get(e)||null}customSourceName(e){let t=null;return this._customSourcesMap.forEach(((i,s)=>{i===e&&(t=s)})),t}customSources(e){
|
||||
switch(e){case Do.CustomSourceLayer.Background:return this._bgCustomSources;case Do.CustomSourceLayer.Foreground:return this._fgCustomSources;case Do.CustomSourceLayer.Topmost:return this._topmostCustomSources;default:return this._allCustomSources}}addMultiPaneSource(e){this._multiPaneSources.push(e),this._onMultipaneSourcesCollectionChanged.fire(),this.lightUpdate()}removeMultiPaneSource(e){const t=this._multiPaneSources.indexOf(e);-1===t?a_.logWarn("Attempt to remove multi-pane source which does not exist in the model"):(this._onMultipaneSourcesCollectionChanged.fire(),this._multiPaneSources.splice(t,1)),this.lightUpdate()}multiPaneSources(e){return this._multiPaneSources.filter((t=>!e.hasDataSource(t)))}onMultipaneSourcesCollectionChanged(){return this._onMultipaneSourcesCollectionChanged}rendererOptionsProvider(){return this._rendererOptionsProvider}magnet(){return this._magnet}priceAxisRendererOptions(){return this._rendererOptionsProvider.options()}priceScaleSlotsCount(){let e=0,t=0;this._panes.forEach((i=>{e=Math.max(i.leftPriceScales().length,e),t=Math.max(i.rightPriceScales().length,t)}));const i=e+t;if(ze.CheckMobile.any()){const e=(0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),t=e.priceScalePosition(this.mainSeries().priceScale());return("overlay"===t?e.rightPriceScales().length>0:"right"===t)?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:i}}dateTimeFormatter(){return this._dateTimeFormatter}dateFormatter(){return this._dateFormatter}timeFormatter(){return this._timeFormatter}isUnmergeAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return(0,n.ensureNotNull)(this.paneForSource(e)).dataSources().filter(this._unmergeAvailable,this).length>1}isMergeDownAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;const t=this.paneForSource(e),i=this.panes().filter((e=>e.mode()===Bi.PaneMode.Regular));return t!==i[i.length-1]}isMergeUpAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return this.paneForSource(e)!==this.panes().filter((e=>e.mode()===Bi.PaneMode.Regular))[0]}isPriceScaleVisible(e){const t=e.mainSource();if(!t)return!1;const i=(0,n.ensureNotNull)(this.paneForSource(t)),s=i.priceScalePosition(e);if("overlay"===s)return!0;const o=i.priceScaleIndex(e,s),r=this.priceScaleSlotsCount()[s];return void 0!==o&&o<r}getStudyShiftColorStartOffset(){return this._studyShiftColorStartOffset}setStudyShiftColorStartOffset(e){this._studyShiftColorStartOffset=e}sessions(){return(0,n.ensureNotNull)(this._sessions)}createSessions(e){if(null===this._sessions){const t=function(e){const t=new Ic(e);return(0,h.applyDefaultsOverrides)(t.childs().sessionHighlight,void 0,!1,"sessions"),t.removeDuplicateProperties(),t}((0,e_.createWVFromGetterAndSubscription)((()=>this.mainSeries().symbolInfo()),this.mainSeries().dataEvents().symbolResolved()).ownership());this._sessions=new Mc((async()=>{const s=await Promise.all([i.e(4821),i.e(7539)]).then(i.bind(i,83943));return this.addCustomSource("sessions",((i,o)=>{const n=new s.Sessions(i,o,t,e)
|
||||
;return n.start(),n}),Do.CustomSourceLayer.Background),this.customSourceForName("sessions")})(),this,t)}}createPrePostMarket(e){this.addCustomSource("prePostMarket",((t,i)=>new gd(t,i,e)))}createIntradayInactivityGaps(){this.addCustomSource("intradayInactivityGaps",((e,t)=>new s_(e,t)))}intradayInactivityGaps(){if(!l.enabled("intraday_inactivity_gaps"))throw new Error("intraday_inactivity_gaps featureset is not enabled");return(0,n.ensureNotNull)(this._intradayInactivityGapsWatchedValue)}setIntradayInactivityGapsSession(e){(0,n.ensureNotNull)(this.customSourceForName("intradayInactivityGaps")).setSession(e||"session")}watermarkSource(){return this._watermarkSource}watermarkContentProvider(){return t_.getInstance().provider()}studiesColorRotatorFactory(){return this._studyColorRotatorFactory}replayStatus(){return this._replayStatus}setReplayStatus(e){this._replayStatus.setValue(e)}isInReplay(){return this._mainSeries.isInReplay()}getSymbolString(){return this._mainSeries.getSymbolString()}interval(){return this._mainSeries.interval()}onInReplayStateChanged(){return new re.Delegate}switchToReplay(e,t){0}switchToRealtime(){0}canChangeResolution(e){return this._mainSeries.canChangeResolution(e)}canChangeSymbol(e){return this._mainSeries.canChangeSymbol(e)}onReplayModified(){return(0,n.assert)(!1,"Replay not implemented"),this._mainSeries.onReplayModified()}mainSeriesScaleRatioProperty(){return this._mainSeriesScaleRatioProperty}mainSeriesScaleRatioPropertyOnChanged(){this._mainSeriesScaleRatioProperty.fireChanged()}getThemeNameIfStdTheme(){const e=this.sessions().properties(),t=this.properties(),i=this.mainSeries().properties();return e.allThemePropertiesAreDefault(so.StdTheme.Light)&&t.allThemePropertiesAreDefault(so.StdTheme.Light)&&i.allThemePropertiesAreDefault(so.StdTheme.Light)?so.StdTheme.Light:e.allThemePropertiesAreDefault(so.StdTheme.Dark)&&t.allThemePropertiesAreDefault(so.StdTheme.Dark)&&i.allThemePropertiesAreDefault(so.StdTheme.Dark)?so.StdTheme.Dark:null}theme(){return{chartProperties:this.properties().themeState(),sessions:this.sessions().properties().themeState(),mainSourceProperties:this.mainSeries().properties().themeState(),version:this.version()}}template(){return{chartProperties:this.properties().template(),sessions:this.sessions().properties().template(),mainSourceProperties:this.mainSeries().properties().template(),version:this.version()}}onChartThemeLoaded(){return this._chartThemeLoaded}chartThemeLoaded(){this._chartThemeLoaded.fire()}async colorStudiesPropertiesReady(){this._recalcColorStudiesImpl(this._recalcVRStudiesParams);const e=this.allStudies(!0).filter((e=>e.metaInfo().inputs.filter(Bs.isStudyInputDependsOnChartColors).length>0));await Promise.all(e.map((e=>e.propertiesPatched())))}state(e,t,i,s){const o=this.publishedChartsTimelineSource(),n=this.properties().childs(),r=n.tradingProperties.state(),a={panes:this._panes.map((o=>o.state(!0,e,!1,t,i,s))),timeScale:this._timeScale.state(e),chartProperties:{
|
||||
paneProperties:n.paneProperties.state(["horzGridProperties.style","vertGridProperties.style"]),scalesProperties:n.scalesProperties.state(),publishedChartsTimelineProperties:o?o.state(e):void 0,chartEventsSourceProperties:n.chartEventsSourceProperties?.state(),tradingProperties:r,priceScaleSelectionStrategyName:n.priceScaleSelectionStrategyName.value(),inactivityGaps:n.inactivityGaps.value()},sessions:this.sessions().state(e),version:this.version(),timezone:this.timezone(),shouldBeSavedEvenIfHidden:this._shouldBeSavedEvenIfHidden,linkingGroup:this._linkingGroupIndex.value()};return s||(a.lineToolsGroups=this.lineToolsGroupModel().state(t)),a}isInRestoreState(){return this._restoringState}restoreState(e,t,i){Sh.instance(this).reset();const s={};if(!e.panes)return void a_.logDebug("ChartModel.restoreState: invalid state");if(!Array.isArray(e.panes))return void a_.logDebug("ChartModel.restoreState: invalid state");if(e.panes.length<1)return void a_.logDebug("ChartModel.restoreState: invalid state");this._restoringState=!0;for(const e of this._barsMarksSources)this.detachSource(e);if(this._shouldBeSavedEvenIfHidden=e.shouldBeSavedEvenIfHidden??!0,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){const i=(0,h.factoryDefaults)("chartproperties").scalesProperties;(0,ut.merge)(i,e.chartProperties.scalesProperties),!("showLastValue"in i)||"showSeriesLastValue"in i||"showStudyLastValue"in i||(i.showSeriesLastValueProperty=i.showLastValue,i.showStudyLastValueProperty=i.showLastValue),"showSeriesLastValue"in i&&(s.showSeriesLastValueProperty=!0),"showStudyLastValue"in i&&(s.showStudyLastValueProperty=!0),(!this.isSnapshot()&&!this.readOnly()&&"showCurrency"in i||"showUnit"in i)&&((0,Be.migrateShowCurrencyAndShowUnitProperties)(i.showCurrency,i.showUnit),delete i.showCurrency,delete i.showUnit);{const{paneProperties:t}=e.chartProperties;t.vertGridProperties=t.vertGridProperties||(0,ut.clone)(t.gridProperties),t.horzGridProperties=t.horzGridProperties||(0,ut.clone)(t.gridProperties),"backgroundType"in t||(t.backgroundType=vo.ColorType.Solid),"separatorColor"in t||(t.separatorColor=(0,k.getThemedColor)("color-chart-page-bg")),this._properties.childs().paneProperties.mergeAndFire(t)}this._properties.childs().scalesProperties.mergeAndFire(i),e.chartProperties.timezone&&this._properties.childs().timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.hasChild("chartEventsSourceProperties")&&this._properties.childs().chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),e.chartProperties.tradingProperties&&this._properties.hasChild("tradingProperties")&&(void 0===e.chartProperties.tradingProperties.horizontalAlignment&&(e.chartProperties.tradingProperties.horizontalAlignment=(o=e.chartProperties.tradingProperties.lineLength)<=40?Do.TradedGroupHorizontalAlignment.Right:o>=60?Do.TradedGroupHorizontalAlignment.Left:Do.TradedGroupHorizontalAlignment.Center),
|
||||
this._properties.childs().tradingProperties.mergeAndFire(e.chartProperties.tradingProperties)),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}var o;if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){const t=this._getExceedingChildStudies(e.panes);if(t.length){for(let i=e.panes.length-1;i>=0;--i){const s=e.panes[i];for(let e=s.sources.length-1;e>=0;--e){const i=s.sources[e];~t.indexOf(i)&&s.sources.splice(e,1)}s.sources.length||e.panes.splice(i,1)}0}}const r=e.version||0,a=e.panes;let l="_seriesId",c=1;for(const e of a){const t=e.sources.find((e=>"MainSeries"===e.type));if(t){l=t.id,t.state&&(c=t.state.style);break}}const d=!0,u=a[0];this.panes()[0].restoreState({state:u,withData:t,version:r,seriesId:l,settingsMigration:s,contentOverrides:i,restoreSilently:d,reason:2,targetSeriesStyle:c}),this.panes()[0].mainDataSource()||this.removePane(this.panes()[0]);let _=1;for(let o=1;o<e.panes.length;o++){const n=e.panes[o];if(0===n.sources.length&&(n.mode??Bi.PaneMode.Regular)===Bi.PaneMode.Regular){a_.logWarn("Empty pane detected - restoring is skipped. idx="+o+", state="+JSON.stringify(n));continue}const a=this.panes()[_]||this.createPane();a.restoreState({state:n,withData:t,version:r,seriesId:l,settingsMigration:s,contentOverrides:i,restoreSilently:d,reason:2,targetSeriesStyle:c}),a.mainDataSource()?_+=1:this.removePane(a)}u.isCollapsed&&this._panes[0].collapsed().setValue(!0),this._invalidateBarColorerCaches();const p=this.dataSources();let m=0;for(let e=0;e<p.length;e++){const t=p[e];(0,Qs.isLineTool)(t)&&(m++,t.calcIsActualSymbol())}this.updateTimeScaleBaseIndex(),this.recalculateAllPanes((0,Vt.globalChangeEvent)()),this.fullUpdate(),this.syncLollipopSources();const g=(0,n.ensureNotNull)(this.mainPane());for(const e of this._barsMarksSources)this.detachSource(e),g.addDataSource(e,this._mainSeries.priceScale(),!0);let f=hc.TVLocalStorage.getItem("linetools_limit")||1e3;return window.is_authenticated&&window.user&&window.user.settings&&(f=window.user.settings.linetools_limit||f),e.sessions&&this.sessions().restoreState(e.sessions,t),e.lineToolsGroups&&(this._lineToolsGroupModel=od.fromState(this,e.lineToolsGroups)),m>f&&m%100==0?{lines_limit_exceeded:!0,line_tools_count:m}:(this.panes().forEach((e=>this._dataSourceCollectionChanged.fire(e))),this._lineToolsGroupModel.fireChangedAll(),this._linkingGroupIndex.setValue(e.linkingGroup??null),this._restoringState=!1,{})}shouldBeSavedEvenIfHidden(){return this._shouldBeSavedEvenIfHidden}setShouldBeSavedEvenIfHidden(e){this._shouldBeSavedEvenIfHidden=e}externalTimeStamp(e){const t=this.mainSeries().syncModel();return this.timeScale().points().roughTime(e,t&&t.projectTime.bind(t))}syncLollipopSources(){this._lollipopSourcesWatcherLoader?.callFunction((()=>{null!==this._lollipopSourcesWatcher&&this._lollipopSourcesWatcher.syncSources()}))}restoreChartEvents(e){this._lollipopSourcesWatcherLoader?.callFunction((()=>{
|
||||
@@ -731,7 +731,7 @@ const q_=new dt.TranslatedString("send {title} backward",a.t(null,void 0,i(40962
|
||||
;const _=this._createLineCommand.startCreatingLine(t,s,o||null,l,a===Ar.CreateLineToolSyncMode.ForceOff),p=(0,n.ensureNotNull)(this._createLineCommand.line());let m=null;if(_&&(u&&this.finishLineTool(p),this._pushUndoCommand(this._createLineCommand),this._createLineCommand=null,m={points:p.normalizedPoints(),interval:this.mainSeries().interval()}),(void 0===o&&a===Ar.CreateLineToolSyncMode.Default&&(0,lt.drawOnAllCharts)().value()||a===Ar.CreateLineToolSyncMode.ForceOn)&&p.isSynchronizable()){const e=(0,n.ensureNotNull)(this.model().externalTimeStamp(t.index)),s={point:{price:t.price,timeStamp:e},linetool:i,properties:p.properties(),symbol:this.mainSeries().symbol(),model:this.model(),linkKey:(0,n.ensureNotNull)(p.linkKey().value()),finalState:m,id:p.id(),sharingMode:p.sharingMode().value()};p.isFixed()&&(s.pointPositionPercents=p.calcPositionPercents()),(0,lt.createLineTool)(s)}return this.endUndoMacro(),p}continueCreatingLine(e,t,i,s){const o=(0,n.ensureNotNull)(this._createLineCommand);this.beginUndoMacro(o.text());const r=(0,n.ensureNotNull)(this._model().lineBeingCreated()),a=o.continueCreatingLine(e,t,i,s);let l=null;if(a&&(this.finishLineTool(r),this._pushUndoCommand(o),this._createLineCommand=null,l={points:r.normalizedPoints(),interval:this.mainSeries().interval()}),o.drawOnAllCharts()&&r.isSynchronizable()){const i=(0,n.ensureNotNull)(this._model().externalTimeStamp(e.index));(0,lt.continueLineTool)({point:{price:e.price,timeStamp:i},envState:t,finalState:l,model:this._model()})}return this.endUndoMacro(),a}continueExternalLine(e,t,i){const s=(0,n.ensureNotNull)(this._createLineCommand),o=s.continueCreatingLine(e,t,i);return o&&(this._pushUndoCommand(s),this._createLineCommand=null),o}finishLineTool(e){this._model().finishLineTool(e)}cancelCreatingLine(){this.m_model.cancelCreatingLine()}lineBeingCreated(){return this.m_model.lineBeingCreated()}pasteImageAsLineTool(e,t,i,s){const o=this._model().timeScale(),r=o.width(),a=i.height(),l=i.defaultPriceScale(),c=(0,n.ensureNotNull)((0,n.ensureNotNull)(l.mainSource()).firstValue()),h={price:l.coordinateToPrice(a/2,c),index:o.coordinateToIndex(r/2)},d=(0,Qs.createLineToolProperties)(i.model().backgroundTheme().spawnOwnership(),"LineToolImage",!i.model().readOnly());void 0!==s&&d.childs().transparency.setValue(s);const u=(0,n.ensureNotNull)(l.mainSource());(0,Qs.prepareLineToolPropertiesByOwnerSource)(d,u);const _=this.createLineTool({pane:i,point:h,linetool:"LineToolImage",properties:d});return _&&(_.setBlobImageUrl(t),this.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(_,null)})),e.then((e=>{_.properties().childs().url.setValue(e)})).catch((e=>{const t=_.linkKey().value(),i=this.model();null!==t&&(0,lt.removeLineTool)({withUndo:!1,model:i,linkKey:t,symbol:_.symbol(),sourceTitle:new dt.TranslatedString(_.name(),_.translatedType()),lineToolState:_.state(!1)}),i.removeSource(_)}))),_}loadRange(e){const t=this._model(),i=t.appliedTimeFrame().value();return(null===i||!kr(i,e))&&(this._pushUndoCommand(new ja(t,e)),(0,W.emit)("timeframe_interval",e),!0)}
|
||||
mainSeries(){return this.m_model.mainSeries()}model(){return this.m_model}publishedChartsTimelineSource(){return this.m_model.publishedChartsTimelineSource()}unlinkLines(e){const t=this.model();this.beginUndoMacro(tp);for(const i of e)null!==i.linkKey().value()&&(0,lt.removeLineTool)({withUndo:!0,model:this.model(),symbol:i.symbol(),linkKey:(0,n.ensureNotNull)(i.linkKey().value()),sourceTitle:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,i),lineToolState:i.state(!1),unlink:!0}),this._pushUndoCommand(new P_(t,i));this.endUndoMacro()}zoomFromViewport(){const e=new w_((0,n.ensureDefined)(this._zoomStack.head()),this._zoomStack,!1);this._pushUndoCommand(e)}zoomToViewport(e,t,i,s,o){const n=new v_(this.m_model,e,t,i,s,o),r=new w_(n,this._zoomStack,!0);this._pushUndoCommand(r)}zoomStack(){return this._zoomStack}timeScale(){return this.m_model.timeScale()}selection(){return this.m_model.selection()}selectionMacro(e,t){return this.m_model.selectionMacro(e,t)}onSelectedSourceChanged(){return this.m_model.onSelectedSourceChanged()}onTagsChanged(){return this.m_model.onTagsChanged()}lineCancelled(){return this.m_model.lineCancelled()}hoveredSource(){return this.m_model.hoveredSource()}crosshairSource(){return this.m_model.crosshairSource()}activeStrategySource(){return this.m_model.activeStrategySource()}setProperty(e,t,i,s){if(e&&e.value()!==t){this.beginUndoMacro(i);const o=new za(e,t,i,this.m_model,!s);this._pushUndoCommand(o),this.endUndoMacro(),this.emitEvent("setProperty")}}setProperties(e,t,i,s=!0){this.beginUndoMacro(i),this.m_model.selectionMacro((()=>{for(let o=0;o<e.length;o++)this.setProperty(e[o],t[o],i,!s)})),this.endUndoMacro()}beginUndoMacro(e){return this._undoHistory.beginUndoMacro(e)}endUndoMacro(){this._undoHistory.endUndoMacro()}invertPriceScale(e){const t=e.properties().childs().isInverted;this.setProperty(t,!t.value(),Ip)}togglePriceScaleAutoScaleMode(e){const t={autoScale:!e.isAutoScale()};this.setPriceScaleMode(t,e,Mp)}togglePriceScaleLockScaleMode(e){const t={lockScale:!e.isLockScale()};this.setPriceScaleMode(t,e,Ap)}togglePriceScalePercentageScaleMode(e){const t={percentage:!e.isPercentage()};this.setPriceScaleMode(t,e,Dp)}togglePriceScaleIndexedTo100ScaleMode(e){const t={indexedTo100:!e.isIndexedTo100()};this.setPriceScaleMode(t,e,kp)}togglePriceScaleLogScaleMode(e){const t={log:!e.isLog()};this.setPriceScaleMode(t,e,Ep)}setPriceScaleRegularScaleMode(e){this.setPriceScaleMode({log:!1,percentage:!1,indexedTo100:!1},e,Lp)}withMacro(e,t){const i=this.beginUndoMacro(e);try{t()}finally{this.endUndoMacro()}return i}dataSources(){return this.m_model.dataSources()}orderedDataSources(e){return this.m_model.orderedDataSources(e)}barsMarksSources(){return this.m_model.barsMarksSources()}removeAllDrawingTools(e){this.beginUndoMacro(Fp),this._removeAllDrawingToolsImpl(e),this.endUndoMacro()}removeAllStudiesAndDrawingTools(e){this.beginUndoMacro(Wp),this._removeAllDrawingToolsImpl(e),this._removeAllStudiesImpl(),this.endUndoMacro()}removeAllStudies(){this.beginUndoMacro(Op),
|
||||
this._removeAllStudiesImpl(),this.endUndoMacro()}scrollChartByBar(e){if(!this.m_model.scrollEnabled())return;const t=e*this.m_model.timeScale().barSpacing();this.startScrollTime(0),this.scrollTimeTo(t),this.endScrollTime()}canZoomIn(){return this.model().canZoomIn()}canZoomOut(){return this.model().canZoomOut()}zoomOut(){const e=this.timeScale().width();this.canZoomOut()&&(this.changeTimeScale(ip),(0,Dr.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(0),this.scaleTimeTo(e),this.endScaleTime()}}))}zoomIn(){const e=this.timeScale().width();this.canZoomIn()&&(this.changeTimeScale(sp),(0,Dr.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(e),this.scaleTimeTo(0),this.endScaleTime()}}))}scrollChart(e){this.m_model.scrollEnabled()&&(this.startScrollTime(0),this.scrollTimeTo(e),this.endScrollTime())}startMovingSources(e,t,i,s){e.filter((e=>e.doesMovingAffectsUndo())).length&&(this._currentSourceMoveCommand=new Xr(this.model(),e,op,!1)),this.model().startMovingSources(e,t,i,new Map,s)}moveSources(e,t){this.model().moveSources(e,new Map,t)}endMovingSource(e,t){this.model().endMovingSources(e,void 0,t),null!==this._currentSourceMoveCommand&&(this._currentSourceMoveCommand.saveNewState(),this._pushUndoCommand(this._currentSourceMoveCommand)),this._currentSourceMoveCommand=null}startChangingLinetool(e,t,i,s,o){this._currentLineChangeCommand=new Xr(this.model(),[e],e.changePointUndoText(i),!1),this.model().startChangingLinetool(e,t,i,s,o)}changeLinePoint(e,t){this.model().changeLinePoint(e,t)}alignToolTo45Degrees(e){const t=e.alignTo45DegreesPoints();t&&(this._pushUndoCommand(new Xr(this.model(),[e],Rp,!1)),this.model().alignTo45Degrees(e,t))}endChangingLinetool(e){this.model().endChangingLinetool(e),null!==this._currentLineChangeCommand&&(this._currentLineChangeCommand.saveNewState(),this._pushUndoCommand(this._currentLineChangeCommand)),this._currentLineChangeCommand=null}setChartStyleProperty(e,t,i){if(e.value()!==t){const s=void 0,o=()=>{this.beginUndoMacro(i);const s=new Ua(e,t,this.mainSeries(),i,this.model(),this._chartWidget);this._pushUndoCommand(s),this.emitEvent("setChartStyleProperty"),e.value(),this.endUndoMacro()};s?runOrGoPro(o,s.feature,{feature:s.featureName}):o()}}setPriceAutoScale(e,t,i){this._pushUndoCommand(new Rn(this.m_model,e,t,t.state())),this.m_model.setPriceAutoScale(e,t,i)}setPriceScaleMode(e,t,i){if(!(0,ko.default)(t.mode(),e)){const s=new ac(e,t,i,this.m_model);this._pushUndoCommand(s)}}setPriceScaleSelectionStrategy(e){const t=this.m_model.properties().childs();if(t.priceScaleSelectionStrategyName.value()===e)return;(0,ne.trackEvent)("Chart","Change PriceScale Selection Strategy");const i=Np.format({title:e});this.beginUndoMacro(i),this.setProperty(t.priceScaleSelectionStrategyName,e,i);const s=new j_(this.m_model,e,i);this._pushUndoCommand(s),this.endUndoMacro()}setScaleRatioProperty(e,t,i){if(e.value()!==t){const s=new U_(e,t,i,this.m_model);this._pushUndoCommand(s)}}createUndoCheckpoint(){return this._undoHistory.createUndoCheckpoint()}undoToCheckpoint(e){this._undoHistory.undoToCheckpoint(e)}
|
||||
restorePropertiesForSource(e){(0,Qs.isLineTool)(e)?this._restoreLineToolFactoryDefaults(e):this._restoreStudyFactoryDefaults(e)}restoreLineToolsFactoryDefaults(e){1===e.length?this._restoreLineToolFactoryDefaults(e[0]):(this.beginUndoMacro(rp),e.forEach((e=>this._restoreLineToolFactoryDefaults(e))),this.endUndoMacro())}restorePreferences(){const e=new z_(this.model());this._pushUndoCommand(e)}restoreState(e,t,i){return this.m_model.restoreState(e,t,i)}async clipboardCopy(e,t=this.selection().dataSources()){if(!(0,l.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;for(const e of i)if((0,Xs.isStudy)(e)&&e.isChildStudy())throw new Error("Can not copy child study");const s=(0,Vr.clipboardDataForSources)(this._model().id(),i);return null!==s?e.write({app:JSON.stringify(s),text:s.title}):void 0}async clipboardCut(e,t=this.selection().dataSources()){if(!(0,l.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;await this.clipboardCopy(e,i);const s=i.filter((e=>e.isUserDeletable()));if(0===s.length)return;const o=(1===s.length?Z_:X_).format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,s[0])});this.beginUndoMacro(o),this.m_model.selectionMacro((()=>this.removeSources(s,!1,o)),!0),this.endUndoMacro()}async clipboardPaste(e,t){let i=null;if((0,l.enabled)("datasource_copypaste")&&(i=i||await e.read(),i.app)){const e=JSON.parse(i.app);if(null!==await this.pasteSourceFromClip(t,e))return}await this._processSpecialLineToolsContents(e,i,t)}applyStudyTemplate(e,t){const i=new Hl(this._model(),e,t);this.beginUndoMacro(i.text());const s=this.m_model.panes().reduce(((e,t)=>e.concat(t.sourcesByGroup().allWithoutMultipaneWithHidden().filter((e=>(0,Qs.isLineTool)(e)&&e.ownerSource()!==this.m_model.mainSeries())))),[]);this.removeSources(s,!1,null),this._pushUndoCommand(i),this.endUndoMacro(),(0,W.emit)("load_study_template")}createStudyInserter(e,t,i={}){const{stubTitle:s,isOverlay:o}=i,n={createStudy:(e,t,i,s,o,n,r,a,l,c,h,d)=>{if(!this.checkIfFeatureAvailable(e,r))return jp.logNormal("Cannot insert study "+e.id),null;(0,ne.trackEvent)("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&(0,ne.trackEvent)("compare","symbol:"+t.symbol),s&&this.m_model.removeSource(s);const u=this._insertStudy(e,t,o,n,r,a,l,c,h,null,d);return u.study.then((e=>(0,W.emit)("study_event",e.id(),"create"))),u},storeFailedStub:e=>{this._storeFailedStub(e)}};void 0!==s&&(n.createStub=()=>this.m_model.insertStudyStub(s,o).id(),n.removeStub=e=>this.m_model.removeStudyStub(e));const r=new Ju(e,n);return r.setParentSources(t),r}applyLineToolTemplate(e,t,i){this.beginUndoMacro(i),this.saveLineToolState(e,i);const s=new O_(e,t,i);this._pushUndoCommand(s),this.saveLineToolState(e,i),this.endUndoMacro(),this.model().updateSource(e)}applyLineToolsTemplate(e){throw new Error("Not implemented")}replayStatus(){return this.m_model.replayStatus()}setReplayStatus(e){return this.m_model.setReplayStatus(e)}isInReplay(){
|
||||
restorePropertiesForSource(e){(0,Qs.isLineTool)(e)?this._restoreLineToolFactoryDefaults(e):this._restoreStudyFactoryDefaults(e)}restoreLineToolsFactoryDefaults(e){1===e.length?this._restoreLineToolFactoryDefaults(e[0]):(this.beginUndoMacro(rp),e.forEach((e=>this._restoreLineToolFactoryDefaults(e))),this.endUndoMacro())}restorePreferences(){const e=new z_(this.model());this._pushUndoCommand(e)}restoreState(e,t,i){return this.m_model.restoreState(e,t,i)}async clipboardCopy(e,t=this.selection().dataSources()){if(!(0,l.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;for(const e of i)if((0,Xs.isStudy)(e)&&e.isChildStudy())throw new Error("Can not copy child study");const s=(0,Vr.clipboardDataForSources)(this._model().id(),i);return null!==s?e.write({app:JSON.stringify(s),text:s.title}):void 0}async clipboardCut(e,t=this.selection().dataSources()){if(!(0,l.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;await this.clipboardCopy(e,i);const s=i.filter((e=>e.isUserDeletable()));if(0===s.length)return;const o=(1===s.length?Z_:X_).format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,s[0])});this.beginUndoMacro(o),this.m_model.selectionMacro((()=>this.removeSources(s,!1,o)),!0),this.endUndoMacro()}async clipboardPaste(e,t){let i=null;if((0,l.enabled)("datasource_copypaste")&&(i=i||await e.read(),i.app)){const e=JSON.parse(i.app);if(null!==await this.pasteSourceFromClip(t,e))return}await this._processSpecialLineToolsContents(e,i,t)}applyStudyTemplate(e,t){const i=new Hl(this._model(),e,t);this.beginUndoMacro(i.text());const s=this.m_model.panes().reduce(((e,t)=>e.concat(t.sourcesByGroup().allWithoutMultipaneWithHidden().filter((e=>(0,Qs.isLineTool)(e)&&e.ownerSource()!==this.m_model.mainSeries())))),[]);this.removeSources(s,!1,null),this._pushUndoCommand(i),this.endUndoMacro(),(0,W.emit)("load_study_template")}createStudyInserter(e,t,i={}){const{stubTitle:s,isOverlay:o}=i,n={createStudy:(e,t,i,s,o,n,r,a,l,c,h,d)=>{if(!this.checkIfFeatureAvailable(e,r))return jp.logNormal("Cannot insert study "+e.id),null;(0,ne.trackEvent)("studies","Study_"+e.id,e.description),"Compare@tv-basicstudies"===e.id&&(0,ne.trackEvent)("compare","symbol:"+t.symbol),s&&this.m_model.removeSource(s);const u=this._insertStudy(e,t,o,n,r,a,l,c,h,null,d);return u.study.then((e=>(0,W.emit)("study_event",e.id(),"create"))),u},storeFailedStub:e=>{this._storeFailedStub(e)}};void 0!==s&&(n.createStub=()=>this.m_model.insertStudyStub(s,o).id(),n.removeStub=e=>this.m_model.removeStudyStub(e));const r=new Ju(e,n);return r.setParentSources(t),r}applyLineToolTemplate(e,t,i){this.beginUndoMacro(i),this.saveLineToolState(e,i);const s=new O_(e,t,i);this._pushUndoCommand(s),this.saveLineToolState(e,i),this.endUndoMacro(),this.model().updateSource(e)}applyLineToolsTemplate(e){throw new Error("Not implemented")}replayStatus(){return this.m_model.replayStatus()}setReplayStatus(e){return this.m_model.setReplayStatus(e)}isInReplay(){
|
||||
return this.m_model.isInReplay()}getSymbolString(){return this.m_model.getSymbolString()}interval(){return this.m_model.interval()}onInReplayStateChanged(){return this.m_model.onInReplayStateChanged()}switchToReplay(e,t){0}switchToRealtime(){0}canChangeResolution(e){return this.model().canChangeResolution(e)}canChangeSymbol(e){return this.model().canChangeSymbol(e)}onReplayModified(){return this.model().onReplayModified()}startCustomMoving(e,t,i){this._currentCustomMoveCommand=new nc(this.model(),e,t,i)}customMoveBeingProcessed(){return null!==this._currentCustomMoveCommand}processCustomMove(e){(0,n.ensureNotNull)(this._currentCustomMoveCommand).move(e)}endCustomMoving(){null!==this._currentCustomMoveCommand&&this._currentCustomMoveCommand.hasChanges()&&(this._pushUndoCommand(this._currentCustomMoveCommand),this._currentCustomMoveCommand=null)}state(e,t,i,s){return this.m_model.state(e,t,i,s)}panes(){return this.m_model.panes()}cloneLineTools(e,t){for(let t=0;t<Math.min(5,e.length);++t)e[t],Fn();this.beginUndoMacro(cp);const i=new $r(this._model(),e,t,cp);this._pushUndoCommand(i);const s=i.newIds().map((e=>(0,n.ensureNotNull)(this.model().dataSourceForId(e)))).filter((e=>0!==e.sharingMode().value()));return s.length&&this._model().copyToOtherCharts(s,!0),this.endUndoMacro(),this.emitEvent("cloneLineTools"),i.newIds()}removeSource(e,t,i){this.lineBeingCreated()!==e?this.removeSources([e],t,J_.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e)}),i):this.cancelCreatingLine()}removeSelectedSources(){const e=this._model().selection().dataSources();if(!e.length)return;const t=(e.length>1?Q_:J_).format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e[0])});this.removeSources(e,!1,t)}removeSources(e,t,i,s){s||(e=e.filter((e=>e.isUserDeletable())));const o=this._model(),r=o.lineToolsGroupModel();this.beginUndoMacro(i),o.selectionMacro((s=>{const a=new Map;e.forEach((e=>{if((0,Qs.isLineTool)(e)){const t=r.groupForLineTool(e);if(null!==t){const i=a.get(t)||[];i.push(e),a.set(t,i)}null!==e.linkKey().value()&&(0,lt.removeLineTool)({withUndo:!0,model:this.model(),linkKey:(0,n.ensureNotNull)(e.linkKey().value()),symbol:this.model().mainSeries().symbol(),lineToolState:e.state(!1),sourceTitle:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e)})}}));const l=new Kr.RemoveSourcesUndoCommand(o,e,i),c=l.removedIds();this._pushUndoCommand(l),!t&&c.length>0&&(1===c.length?this.emitEvent("removeSource",[c[0]]):this.emitEvent("removeSources",[c]))}),!0),this.endUndoMacro()}async scrollToLineTool(e){const t=this.timeScale().logicalRange();if(null===t)return;const i=e.points().map((e=>e.index)),s=this.timeScale().points().range().value();if(null===s)return;let o=s.firstIndex;const r=s.lastIndex,a=t.length()/2;if(0===i.length||i.some((e=>t.contains(e))))return;const l=()=>{const t=e.points().map((e=>e.index)),i=t.filter((e=>e<=r)).reduce(((e,t)=>null===e?t:Math.max(e,t)),null);return null!==i?i:t.reduce(((e,t)=>Math.min(e,t)))};let c=l();if(o-a>c){
|
||||
const t=e.points().map((e=>e.time)).filter(ut.notUndefined).map((e=>1e3*e));if(0===t.length)return;const i=t.reduce(((e,t)=>Math.min(e,t)),t[0]);await this.model().gotoTime(i),c=l();if((0,n.ensureNotNull)(this.timeScale().logicalRange()).contains(c))return;o=(0,n.ensureNotNull)(this.timeScale().points().range().value()).firstIndex}o-a>c&&this.mainSeries().setGotoDateResult({timestamp:(0,n.ensureNotNull)(this.timeScale().points().valueAt(o)),eod:!0});const h=this.timeScale().width()/2,d=this.timeScale().indexToCoordinate(c);this.model().stopTimeScaleAnimation(),this.model().setTimeScaleAnimation(new Br({from:0,to:h-d,duration:Ir.dur,easing:Ir.easingFunc.easeInOutCubic}))}mergeSourceUp(e){const t=new oa(this._model(),e,hp);this._mergeUnmergeSource(e,t)}mergeSourceDown(e){const t=new na(this._model(),e,dp);this._mergeUnmergeSource(e,t)}mergeToPane(e,t,i){const s=this._model().panes().indexOf(t),o=new ra(this._model(),e,s,up,i);this._mergeUnmergeSource(e,o)}unmergeSourceUp(e){const t=new ta(this._model(),e,_p);this._mergeUnmergeSource(e,t)}unmergeSourceDown(e){const t=new ea(this._model(),e,pp);this._mergeUnmergeSource(e,t)}unmergeToNewBottomPane(e){const t=new ia(this._model(),e,mp);this._mergeUnmergeSource(e,t)}moveLeft(){this.beginUndoMacro(Bp),(0,Dr.doAnimate)({to:this.m_model.timeScale().width()/5,onStep:e=>{this.startScrollTime(e),this.scrollTimeTo(0),this.endScrollTime()},onComplete:()=>{this.endUndoMacro()}})}moveRight(){this.beginUndoMacro(Vp),(0,Dr.doAnimate)({to:this.m_model.timeScale().width()/5,onStep:e=>{this.startScrollTime(0),this.scrollTimeTo(e),this.endScrollTime()},onComplete:()=>{this.endUndoMacro()}})}availableZOrderOperations(e){const t=this._model().lineToolsGroupModel(),i=e.filter(Qs.isLineTool),s=i.map((e=>t.groupForLineTool(e)));(0,n.assert)(new Set(s).size<=1,"Cannot move line tools from different group");const o=0===s.length?null:s[0];let r={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1};const a=new Set(i);for(const t of(0,hi.sortSources)(e)){if((0,Qs.isLineTool)(t)&&null!==o){const e=(0,hi.sortSources)(o.lineTools().filter((e=>!a.has(e)||e===t)));r=$p(r,{bringForwardEnabled:t!==e[e.length-1],bringToFrontEnabled:t!==e[e.length-1],sendBackwardEnabled:t!==e[0],sendToBackEnabled:t!==e[0]});continue}const e=(0,n.ensureNotNull)(this._model().paneForSource(t)).sourcesByGroup().allExceptSpecialSources();if(0===e.length)continue;const i=t.zorder(),s=e[0].zorder(),l=e[e.length-1].zorder();r=$p(r,{bringForwardEnabled:i!==l,bringToFrontEnabled:i!==l,sendBackwardEnabled:i!==s,sendToBackEnabled:i!==s})}return r}sendToBack(e){if(!this.availableZOrderOperations(e).sendToBackEnabled)throw new Error("Send to back operation is unavailable");let t=null;const i=e[0];if((0,Qs.isLineTool)(i)){const s=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==s){const i=s.lineTools();t=new Ia(this.model(),(0,hi.sortSources)(e),i[0])}}null===t&&(t=new Ca(this.model(),(0,hi.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])}bringToFront(e){
|
||||
if(!this.availableZOrderOperations(e).bringToFrontEnabled)throw new Error("Bring to front operation is unavailable");let t=null;const i=e[0];if((0,Qs.isLineTool)(i)){const s=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==s){const i=s.lineTools();t=new Ta(this.model(),(0,hi.sortSources)(e),i[i.length-1])}}null===t&&(t=new wa(this.model(),(0,hi.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])}sendBackward(e){if(!this.availableZOrderOperations(e).sendBackwardEnabled)throw new Error("Send backward operation is unavailable");const t=q_.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e[0])});this._sendBackOrBringForward(t,(0,hi.sortSources)(e),((e,t)=>new Aa(this.model(),e,t)))}bringForward(e){if(!this.availableZOrderOperations(e).bringForwardEnabled)throw new Error("Bring forward operation is unavailable");const t=$_.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e[0])});this._sendBackOrBringForward(t,(0,hi.sortSources)(e),((e,t)=>new ka(this.model(),e,t)))}insertAfter(e,t){e=(0,hi.sortSources)(e);const i=K_.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e[0]),target:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,t)});this._insertAfterOrBefore(i,e,t,(()=>new Ta(this.model(),e,t)))}insertBefore(e,t){e=(0,hi.sortSources)(e);const i=Y_.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e[0]),target:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,t)});this._insertAfterOrBefore(i,e,t,(()=>new Ia(this.model(),e,t)))}detachToRight(e,t){(0,ne.trackEvent)("Chart","Move to new right scale");const i=gp.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e)}),s=new Yl(this.model(),e,t,"right",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}detachToLeft(e,t){(0,ne.trackEvent)("Chart","Move to new left scale");const i=fp.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e)}),s=new Yl(this.model(),e,t,"left",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}detachNoScale(e,t){(0,ne.trackEvent)("Chart","Make source no scale");const i=yp.format({title:(0,ui.getTranslatedStringForSource)(da.TitleDisplayTarget.StatusLine,e)}),s=new Yl(this.model(),e,t,"overlay",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}moveToScale(e,t,i,s,o){(0,ne.trackEvent)("Chart","Move source to target scale"),this.beginUndoMacro(s);const n=new Zl(this.model(),e,t,i,s),r=o?null:Nr(e,i,this._model()),a=o?null:sh(e,i,this._model());this._pushUndoCommand(n),null!==r&&this.setPriceScaleCurrency(i,r),null!==a&&this.setPriceScaleUnit(i,a),this.endUndoMacro(),this.emitEvent("moveSource",[e])}setLinkingGroupIndex(e){const t=this.model().linkingGroupIndex();this._undoHistory.beginUndoMacro(Gp),this._pushUndoCommand(new V_(t,t.value(),e,Gp)),this._model().setShouldBeSavedEvenIfHidden(!0),this._undoHistory.endUndoMacro()}startScrollPrice(e,t,i){
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9123],{73174:(e,t,i)=>{i.r(t),i.d(t,{getCoordinateXMetaInfo:()=>b,getCoordinateYMetaInfo:()=>v,getCoordinatesPropertiesDefinitions:()=>T,getSelectionCoordinatesPropertyDefinition:()=>_});var o=i(50151),r=i(11542),n=i(45126),l=i(44672),a=i(60265);class s extends a.UndoCommand{constructor({lineToolId:e,chartModel:t,newPositionPoints:i}){super(null),this._pointState=null,this._lineToolId=e,this._model=t,this._newPositionPoints=i}redo(){const e=(0,o.ensureNotNull)(this._model.dataSourceForId(this._lineToolId));this._pointState=[e.normalizedPoints(),e.points()],e.startChanging(),e.moveLineTool(this._newPositionPoints),this._model.updateSource(e),e.updateAllViews((0,l.sourceChangeEvent)(e.id())),e.syncMultichartState(e.endChanging(!0,!1))}undo(){if(this._pointState){const e=(0,o.ensureNotNull)(this._model.dataSourceForId(this._lineToolId));e.startChanging(),e.restorePoints(...this._pointState),this._model.updateSource(e),e.updateAllViews((0,l.sourceChangeEvent)(e.id())),e.syncMultichartState(e.endChanging(!0,!1))}}}var d=i(32097),c=i(64147),h=i(12988),u=i(91682);const g=-5e4,p=15e3,f=new n.TranslatedString("change price Y coordinate",r.t(null,void 0,i(11737))),m=new n.TranslatedString("change bar X coordinate",r.t(null,void 0,i(2066))),x=new n.TranslatedString("move drawings",r.t(null,void 0,i(76261)));function v(e,t,i){return{property:(0,d.convertToDefinitionProperty)(e,t.price,f),info:{typeY:1,stepY:i}}}function b(e,t){return{property:(0,d.convertToDefinitionProperty)(e,t.bar,m),info:{typeX:0,minX:new c.WatchedValue(g),maxX:new c.WatchedValue(p),stepX:new c.WatchedValue(1)}}}function T(e,t,i,o,r,n){const l=b(e,t),a=v(e,t,o);return(0,d.createCoordinatesPropertyDefinition)({x:l.property,y:a.property},{id:(0,u.removeSpaces)(`${n}Coordinates${r}`),title:r,...l.info,...a.info})}const C=/^([+*\-\/]?)((?:\d*)|(?:\d+\.\d*))$/;function y(e,t,i){const r=new h.Property(""),n=(0,d.makeProxyDefinitionProperty)(r.weakReference());return n.setValue=n=>{try{const r=n.match(C);if(!r)return;const[,l,a]=r;if(!a.length)return;const d=i(parseFloat(a));if("/"===l&&(0===d.price||0===d.index))return;t.withMacro(x,(()=>{e.filter((e=>!e.isSourceHidden())).forEach((e=>{const i=e.points();let r;switch(l){case"":{const e=(0,o.ensureDefined)(i[0]);let{index:t=e.index,price:n=e.price}=d;n-=e.price,t-=e.index,r=i.map((e=>({...e,index:e.index+t,price:e.price+n})));break}case"-":case"+":{let{index:e=0,price:t=0}=d;"-"===l&&(e*=-1,t*=-1),r=i.map((i=>({...i,index:i.index+e,price:i.price+t})));break}case"*":{const{index:e=1,price:t=1}=d;r=i.map((i=>({...i,index:i.index*e,price:i.price*t})));break}case"/":{const{index:e=1,price:t=1}=d;r=i.map((i=>({...i,index:i.index/e,price:i.price/t})));break}}t.undoHistory().pushUndoCommand(new s({lineToolId:e.id(),chartModel:t.model(),newPositionPoints:r}))}))}))}finally{r.setValue("",!0)}},n}function _(e,t){const o=y(e,t,(e=>({index:e}))),n=y(e,t,(e=>({price:e})));return(0,d.createSelectionCoordinatesPropertyDefinition)({x:o,y:n},{
|
||||
id:"SourcesCoordinates",title:r.t(null,void 0,i(44272)),mathOperationsX:"+",mathOperationsY:"+/*",modeX:"integer",modeY:"float"})}},91335:(e,t,i)=>{i.d(t,{createTextStyleDefinition:()=>S});var o=i(11542),r=i(45126),n=i(32097),l=i(91682);const a=new r.TranslatedString("change {toolName} text visibility",o.t(null,void 0,i(56634))),s=new r.TranslatedString("change {toolName} text color",o.t(null,void 0,i(64500))),d=new r.TranslatedString("change {toolName} text font size",o.t(null,void 0,i(21781))),c=new r.TranslatedString("change {toolName} text font bold",o.t(null,void 0,i(24701))),h=new r.TranslatedString("change {toolName} text font italic",o.t(null,void 0,i(42694))),u=new r.TranslatedString("change {toolName} text",o.t(null,void 0,i(66668))),g=new r.TranslatedString("change {toolName} labels alignment vertical",o.t(null,void 0,i(31689))),p=new r.TranslatedString("change {toolName} labels alignment horizontal",o.t(null,void 0,i(88277))),f=new r.TranslatedString("change {toolName} labels direction",o.t(null,void 0,i(61160))),m=new r.TranslatedString("change {toolName} text background visibility",o.t(null,void 0,i(31133))),x=new r.TranslatedString("change {toolName} text background color",o.t(null,void 0,i(22231))),v=new r.TranslatedString("change {toolName} text border visibility",o.t(null,void 0,i(58704))),b=new r.TranslatedString("change {toolName} text border width",o.t(null,void 0,i(35423))),T=new r.TranslatedString("change {toolName} text border color",o.t(null,void 0,i(36666))),C=new r.TranslatedString("change {toolName} text wrap",o.t(null,void 0,i(39587))),y=o.t(null,void 0,i(79468)),_=o.t(null,void 0,i(38408)),w=o.t(null,void 0,i(7560));function S(e,t,i,o){const r={},S={id:`${(0,l.removeSpaces)(i.originalText())}Text`,title:o.customTitles&&o.customTitles.text||""};if(void 0!==t.showText&&(r.checked=(0,n.convertToDefinitionProperty)(e,t.showText,a.format({toolName:i}))),void 0!==t.textColor&&(r.color=(0,n.getColorDefinitionProperty)(e,t.textColor,t.transparency||null,s.format({toolName:i}))),void 0!==t.fontSize&&(r.size=(0,n.convertToDefinitionProperty)(e,t.fontSize,d.format({toolName:i}))),void 0!==t.bold&&(r.bold=(0,n.convertToDefinitionProperty)(e,t.bold,c.format({toolName:i}))),void 0!==t.italic&&(r.italic=(0,n.convertToDefinitionProperty)(e,t.italic,h.format({toolName:i}))),void 0!==t.text&&(r.text=(0,n.convertToDefinitionProperty)(e,t.text,u.format({toolName:i})),S.isEditable=Boolean(o.isEditable),S.isMultiLine=Boolean(o.isMultiLine)),void 0!==t.vertLabelsAlign&&(r.alignmentVertical=(0,n.convertToDefinitionProperty)(e,t.vertLabelsAlign,g.format({toolName:i})),S.alignmentVerticalItems=o.alignmentVerticalItems),void 0!==t.horzLabelsAlign&&(r.alignmentHorizontal=(0,n.convertToDefinitionProperty)(e,t.horzLabelsAlign,p.format({toolName:i})),S.alignmentHorizontalItems=o.alignmentHorizontalItems),void 0!==t.textOrientation&&(r.orientation=(0,n.convertToDefinitionProperty)(e,t.textOrientation,f.format({toolName:i}))),void 0!==t.backgroundVisible&&(r.backgroundVisible=(0,
|
||||
n.convertToDefinitionProperty)(e,t.backgroundVisible,m.format({toolName:i}))),void 0!==t.backgroundColor){let o=null;void 0!==t.backgroundTransparency&&(o=t.backgroundTransparency),r.backgroundColor=(0,n.getColorDefinitionProperty)(e,t.backgroundColor,o,x.format({toolName:i}))}return void 0===t.backgroundVisible&&void 0===t.backgroundColor||(S.backgroundTitle=o.customTitles&&o.customTitles.backgroundTitle||y),void 0!==t.borderVisible&&(r.borderVisible=(0,n.convertToDefinitionProperty)(e,t.borderVisible,v.format({toolName:i}))),void 0!==t.borderWidth&&(r.borderWidth=(0,n.convertToDefinitionProperty)(e,t.borderWidth,b.format({toolName:i}))),void 0!==t.borderColor&&(r.borderColor=(0,n.getColorDefinitionProperty)(e,t.borderColor,null,T.format({toolName:i}))),void 0===t.borderVisible&&void 0===t.borderColor&&void 0===t.borderWidth||(S.borderTitle=o.customTitles&&o.customTitles.borderTitle||_),void 0!==t.wrap&&(r.wrap=(0,n.convertToDefinitionProperty)(e,t.wrap,C.format({toolName:i})),S.wrapTitle=o.customTitles&&o.customTitles.wrapTitle||w),(0,n.createTextPropertyDefinition)(r,S)}},6590:(e,t,i)=>{i.d(t,{commonLineToolPropertiesStateKeys:()=>o});const o=["symbolStateVersion","zOrderVersion","frozen","title","interval","symbol","currencyId","unitId","visible","intervalsVisibilities.ticks","intervalsVisibilities.seconds","intervalsVisibilities.secondsFrom","intervalsVisibilities.secondsTo","intervalsVisibilities.minutes","intervalsVisibilities.minutesFrom","intervalsVisibilities.minutesTo","intervalsVisibilities.hours","intervalsVisibilities.hoursFrom","intervalsVisibilities.hoursTo","intervalsVisibilities.days","intervalsVisibilities.daysFrom","intervalsVisibilities.daysTo","intervalsVisibilities.weeks","intervalsVisibilities.weeksFrom","intervalsVisibilities.weeksTo","intervalsVisibilities.months","intervalsVisibilities.monthsFrom","intervalsVisibilities.monthsTo","intervalsVisibilities.ranges"];var r,n,l;!function(e){e[e.NotShared=0]="NotShared",e[e.SharedInLayout=1]="SharedInLayout",e[e.GloballyShared=2]="GloballyShared"}(r||(r={})),function(e){e.BeforeAllAction="BeforeAll",e.CustomAction="CustomAction"}(n||(n={})),function(e){e.FloatingToolbarButton="FloatingToolbarButton",e.Default="Default"}(l||(l={}))},38039:(e,t,i)=>{i.d(t,{LineDataSourceProperty:()=>a});var o=i(90054),r=i(16738),n=i(50151),l=i(32679);class a extends l.DefaultProperty{constructor({templateKeys:e,...t}){super({ignoreAllowSavingDefaults:!0,saveNonDefaultUserPreferencesOnly:!0,...t}),this._templateKeys=(0,n.ensureDefined)(e||this._allDefaultsKeys)}template(){return(0,l.extractState)(this.state(),this._templateKeys,[])}applyTemplate(e){this.mergeAndFire((0,l.extractState)((0,r.default)((0,o.default)(this._factoryDefaultsSupplier()),e),this._templateKeys))}}},31761:(e,t,i)=>{i.d(t,{alignByAngle:()=>r});var o=i(30699);function r(e){let t,i;return e>=-135&&e<=-45?(t=o.HorizontalAlign.Center,i=o.VerticalAlign.Bottom):e>-45&&e<45?(t=o.HorizontalAlign.Left,i=o.VerticalAlign.Middle):e>=45&&e<=135?(t=o.HorizontalAlign.Center,
|
||||
i=o.VerticalAlign.Top):(t=o.HorizontalAlign.Right,i=o.VerticalAlign.Middle),{horzAlign:t,vertAlign:i}}},95240:(e,t,i)=>{i.r(t),i.d(t,{LineToolTextNote:()=>ue});var o=i(42752),r=i(50151),n=i(24633),l=i(49156),a=i(31229),s=i(6590),d=i(32679),c=i(11402),h=i(38039),u=i(73305);const g={intervalsVisibilities:{...a.intervalsVisibilitiesDefaults},drawBackground:!0,drawBorder:!1,fontSize:14,bold:!1,italic:!1},p=new Map([[n.StdTheme.Light,{lineColor:l.colors.colorColdGray900,backgroundColor:l.colors.colorWhite,borderColor:l.colors.colorColdGray150,textColor:l.colors.colorColdGray900}],[n.StdTheme.Dark,{lineColor:l.colors.colorColdGray200,backgroundColor:l.colors.colorColdGray800,borderColor:l.colors.colorColdGray700,textColor:l.colors.colorColdGray200}]]),f=(0,d.extractThemedColors)((0,r.ensureDefined)(p.get(n.StdTheme.Light)),(0,r.ensureDefined)(p.get(n.StdTheme.Dark))),m=(0,d.extractAllPropertiesKeys)((0,r.ensureDefined)(p.get(n.StdTheme.Light))),x=(0,d.extractAllPropertiesKeys)(g),v=[...new Set([...m,...x,...s.commonLineToolPropertiesStateKeys,"text"])],b=[...new Set([...m,...x,"text"])];class T extends h.LineDataSourceProperty{constructor(e){super(e),this.hasChild("text")||this.addProperty("text",""),this.addChild("linesColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("lineColor"))])),this.addChild("backgroundsColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("backgroundColor"))])),this.addChild("textsColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("textColor"))]))}static create(e,t){return new this({defaultName:"linetooltextnote",factoryDefaultsSupplier:()=>(0,c.factoryDefaultsForCurrentTheme)(g,p),nonThemedDefaultsKeys:x,themedDefaultsKeys:m,allStateKeys:v,themedColors:f,templateKeys:b,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}var C=i(24362),y=i(19625),_=i(95201),w=i(36036),S=i(32211),D=i(86441),P=i(34026),A=i(4652),k=i(63273),V=i(30125),L=i(56468),R=i(37743),M=i(61993),N=i(17330),z=i(30699),H=i(15938),I=i(70262);var B,F,W=i(56570),O=i(31761);function E(e){return W.enabled("text-note-align-anchor-to-corner")?function(e){let t,i;return e>=-180&&e<-90?(t=z.HorizontalAlign.Right,i=z.VerticalAlign.Bottom):e>=-90&&e<=0?(t=z.HorizontalAlign.Left,i=z.VerticalAlign.Bottom):e>0&&e<=90?(t=z.HorizontalAlign.Left,i=z.VerticalAlign.Top):(t=z.HorizontalAlign.Right,i=z.VerticalAlign.Top),{horzAlign:t,vertAlign:i}}(e):(0,O.alignByAngle)(e)}!function(e){e[e.Label=1]="Label"}(B||(B={})),function(e){e[e.CircleRadius=2]="CircleRadius",e[e.RoundRectRadius=4]="RoundRectRadius",e[e.LabelVertPadding=6]="LabelVertPadding",e[e.LabelHorzPadding=8]="LabelHorzPadding",e[e.TextMargins=2]="TextMargins",e[e.Blur=4]="Blur",e[e.ShadowOffsetY=2]="ShadowOffsetY"}(F||(F={}));class Y extends V.BitmapCoordinatesPaneRenderer{constructor(e){super(),this._data=null,this._textLabelRenderer=new N.TextRenderer,this._textInfoCache=null,this._lineHitTest=new L.HitTestResult(L.HitTarget.MovePoint),this._textHitTest=e||new L.HitTestResult(L.HitTarget.MovePoint,{areaName:L.AreaName.Text}),
|
||||
this._textHitTest.mergeData({activeItem:B.Label})}setData(e){null===this._data||this._data.textData.text===e.textData.text&&this._data.textData.fontSize===e.textData.fontSize||(this._textInfoCache=null),this._data=e;const t=e.points[1];this._textLabelRenderer.setData({horzAlign:z.HorizontalAlign.Left,vertAlign:z.VerticalAlign.Middle,points:[t],text:e.textData.text||" ",color:e.textData.color,font:H.CHART_FONT_FAMILY,fontSize:e.textData.fontSize,bold:e.textData.bold,italic:e.textData.italic,offsetX:0,offsetY:0,borderColor:e.drawBorder?e.borderColor:void 0,borderWidth:1,backgroundColor:e.drawBackground?e.backgroundColor:void 0,backgroundRoundRect:F.RoundRectRadius,boxPaddingVert:F.LabelVertPadding,boxPaddingHorz:F.LabelHorzPadding,boxShadow:e.drawBorder||e.drawBackground?{shadowColor:e.shadowColor,shadowBlur:F.Blur,shadowOffsetY:F.ShadowOffsetY}:void 0,selectionHighlight:e.textData.selectionHighlight});const i=this._textLabelRenderer.rect(),o=e.points[0],r=e.points[1],n=E(Math.round(180*Math.atan2(r.y-o.y,r.x-o.x)/Math.PI));let l=e.points[1];switch(n.horzAlign){case z.HorizontalAlign.Center:l=l.add((0,D.point)(.5*-i.width,0));break;case z.HorizontalAlign.Right:l=l.add((0,D.point)(-i.width,0))}switch(n.vertAlign){case z.VerticalAlign.Top:l=l.add((0,D.point)(0,.5*i.height));break;case z.VerticalAlign.Bottom:l=l.add((0,D.point)(0,.5*-i.height))}this._textLabelRenderer.setPoint(l)}setCursorType(e){this._textHitTest.mergeData({cursorType:e})}hitTest(e){const t=this._data;if(null===t||t.points.length<2)return null;const i=(0,M.interactionTolerance)().line+.5,o=t.points[0],r=t.points[1];if((0,A.distanceToSegment)(o,r,e).distance<=i)return this._lineHitTest;const n=this._textLabelRenderer.rect(),l=(0,D.box)((0,D.point)(n.x,n.y),(0,D.point)(n.x+n.width,n.y+n.height));return(0,P.pointInBox)(e,l)?this._textHitTest:null}getTextInfo(){const e=(0,r.ensureNotNull)(this._data),t=(0,k.isRtl)()?"right":"left",i=F.RoundRectRadius,o=F.TextMargins,n=(0,r.ensureNotNull)(this._calcTextSize()),l=this._textLabelRenderer.rect(),a=(0,r.ensureDefined)(this._textLabelRenderer.data()?.points?.[0]).add((0,D.point)(0,.5*-l.height)),{totalWidth:s,totalHeight:d}=n,c=i+o;return{font:H.CHART_FONT_FAMILY,fontSize:e.textData.fontSize,lineHeight:Math.ceil(e.textData.fontSize),lineSpacing:0,textTop:a.y+c,textBottom:a.y+d-c,textLeft:a.x+c,textRight:a.x+s-c,textAlign:t}}positionToCoordinate(e,t){const i=(0,r.ensureNotNull)(this._data),o=this.getTextInfo(),n=this._textLabelRenderer.getLinesInfo(),{x:l,y:a,lineNumber:s}=(0,I.getSymbolCoordinatesInfo)({symbolPosition:t,textWidth:o.textRight-o.textLeft,textByLines:n.linesIncludingHidden,lineHeight:i.textData.fontSize,font:H.CHART_FONT_FAMILY,textAlign:o.textAlign});return{x:l+o.textLeft,y:a+o.textTop,lineNumber:s}}_drawImpl(e){const t=this._data;if(null===t||t.points.length<2)return;const{context:i}=e,o=t.points[0];let r=t.points[1];if(W.enabled("text-note-align-anchor-to-corner")){const e=Math.atan2(r.y-o.y,r.x-o.x);r=r.add(new D.Point(2*Math.cos(e),2*Math.sin(e)))}i.strokeStyle=t.lineColor,
|
||||
i.lineWidth=Math.max(1,Math.floor(e.horizontalPixelRatio)),i.beginPath();const[n,l]=(0,R.addPixelPerfectLineToPath)(i,o.x,o.y,r.x,r.y,e);i.stroke();const a=Math.round(F.CircleRadius*e.horizontalPixelRatio);i.fillStyle=t.lineColor,i.beginPath(),i.arc(n,l,a,0,2*Math.PI,!1),i.fill(),i.beginPath(),i.strokeStyle=t.circleBorderColor,i.lineWidth=1;const s=Math.round(F.CircleRadius*e.horizontalPixelRatio+.5*e.horizontalPixelRatio);i.arc(n,l,s,0,2*Math.PI,!1),i.stroke(),this._textLabelRenderer.draw(i,e)}_calcTextSize(){if(null===this._data||this._data.points.length<2)return null;if(null===this._textInfoCache){const e=this._textLabelRenderer.getLinesInfo(),t=this._data.textData.fontSize*e.lines.length,i=e.linesMaxWidth,o=F.RoundRectRadius,r=2*F.TextMargins+2*o;this._textInfoCache={textWidth:i,textHeight:t,totalWidth:i+r,totalHeight:t+r}}return this._textInfoCache}}var K=i(19063);const G=(0,K.generateColor)((0,y.getHexColorByName)("color-black"),80),X=(0,K.generateColor)((0,y.getHexColorByName)("color-black"),60);class $ extends S.InplaceTextLineSourcePaneView{constructor(e,t,i,o,r){super(e,t,i,o,r),this._renderer=new _.CompositeRenderer,this._noteRenderer=new Y(new L.HitTestResult(L.HitTarget.MovePoint,(0,S.inplaceEditHandlers)(this._tryActivateEditMode.bind(this,null)))),this._source.setAdditionalCursorData((()=>({color:this._source.editableTextStyle().cursorColor,...this._noteRenderer.getTextInfo()})),this._noteRenderer.positionToCoordinate.bind(this._noteRenderer,!0))}renderer(e){return this._invalidated&&this._updateImpl(e),this._renderer}_updateImpl(e){super._updateImpl(e),this._renderer.clear();const t=this._source.priceScale();if(!t||t.isEmpty())return;const i=this._points;if(i.length<2)return;if(null===(0,r.ensureNotNull)(this._source.ownerSource()).firstValue())return;const o=this._source.properties().childs(),n=this._model.dark().value()?l.colors.colorColdGray850:l.colors.colorWhite,a=this._model.dark().value()?X:G,s={textData:{fontSize:o.fontSize.value(),text:this._textData(),color:this._textColor(),bold:o.bold.value(),italic:o.italic.value(),selectionHighlight:this._inplaceTextHighlight().selectionHighlight},shadowColor:a,points:i,lineColor:o.lineColor.value(),drawBackground:o.drawBackground.value(),drawBorder:o.drawBorder.value(),backgroundColor:o.backgroundColor.value(),borderColor:o.borderColor.value(),circleBorderColor:n};this._renderer.append(this._noteRenderer),this._noteRenderer.setData(s),this._noteRenderer.setCursorType(this._textCursorType()),this._renderer.append(this.createLineAnchor({points:i.map(w.mapLineSourcePaneViewPointToLineAnchorPoint)},0)),this._updateInplaceText(this._noteRenderer.getTextInfo())}}var U=i(11542),j=i(45126),q=i(91335),J=i(18009),Q=i(32097),Z=i(91682)
|
||||
;const ee=new j.TranslatedString("change {title} line color",U.t(null,void 0,i(7455))),te=new j.TranslatedString("change {title} background visibility",U.t(null,void 0,i(30839))),ie=new j.TranslatedString("change {title} background color",U.t(null,void 0,i(49765))),oe=new j.TranslatedString("change {title} border visibility",U.t(null,void 0,i(19298))),re=new j.TranslatedString("change {title} border color",U.t(null,void 0,i(69437))),ne=U.t(null,void 0,i(70320)),le=U.t(null,void 0,i(97575)),ae=U.t(null,void 0,i(34974)),se=U.t(null,void 0,i(73863));class de extends J.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,Z.removeSpaces)(t),o=new j.TranslatedString(t,this._source.translatedType());return{definitions:[(0,Q.createColorPropertyDefinition)({checked:(0,Q.convertToDefinitionProperty)(this._propertyApplier,e.drawBackground,te.format({title:o})),color:(0,Q.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,null,ie.format({title:o}))},{id:(0,Z.removeSpaces)(`${t}BackgroundColor`),title:se}),(0,Q.createColorPropertyDefinition)({checked:(0,Q.convertToDefinitionProperty)(this._propertyApplier,e.drawBorder,oe.format({title:o})),color:(0,Q.getColorDefinitionProperty)(this._propertyApplier,e.borderColor,null,re.format({title:o}))},{id:(0,Z.removeSpaces)(`${t}BorderColor`),title:ae}),(0,Q.createColorPropertyDefinition)({color:(0,Q.getColorDefinitionProperty)(this._propertyApplier,e.lineColor,null,ee.format({title:o}))},{id:`${i}LineColor`,title:le})]}}_textPropertyDefinitions(){const{backgroundColor:e,borderColor:t,...i}=this._source.properties().childs();return{definitions:[(0,q.createTextStyleDefinition)(this._propertyApplier,{...i,textColor:i.textColor,fontSize:i.fontSize},new j.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,customTitles:{text:ne}})]}}}var ce=i(44672);class he{constructor(e,t){this._labelMovingDelta=null,this._line=e,this._itemIndex=t}startMoving(e,t,i){if(t===this._itemIndex){if(this._line.isSourceHidden())return!0;const i=(0,r.ensureDefined)(e.logical),o=this._line.points()[1];return this._labelMovingDelta={index:o.index-i.index,price:o.price-i.price},this._line.startChanging(t,i),!0}return this._labelMovingDelta=null,!1}move(e,t,i){if(null!==this._labelMovingDelta){const t=(0,r.ensureDefined)(e.logical),o={index:t.index+this._labelMovingDelta.index,price:t.price+this._labelMovingDelta.price};return this._line.setPoint(1,o,i),this._line.updateAllViews((0,ce.sourceChangeEvent)(this._line.id())),!0}return!1}endMoving(e,t,i){return null!==this._labelMovingDelta?(this._labelMovingDelta=null,this._line.endChanging(!1,e)):null}}class ue extends C.InplaceTextLineDataSource{constructor(e,t,i,o){super(e,t??ue.createProperties(e.backgroundTheme().spawnOwnership()),i,o),this._moveAsChangeBehavior=new he(this,B.Label),this._setPaneViews([new $(this,e,this._openTextEditor.bind(this),this._closeTextEditor.bind(this),this.onSelectionChange.bind(this))])}pointsCount(){
|
||||
return 2}name(){return"Note"}removeIfEditableTextIsEmpty(){return!0}activateEditingOnCreation(){return!0}shouldBeRemovedOnDeselect(){const e=this._properties.childs().text.value().trim();return this._points.length===this.pointsCount()&&""===e}editableTextProperties(){const e=this.properties().childs();return{text:e.text,textColor:e.textColor}}template(){return this._properties.template()}startMoving(e,t,i){this._moveAsChangeBehavior.startMoving(e,t,i)||super.startMoving(e,t,i)}move(e,t,i){this._moveAsChangeBehavior.move(e,t,i)||super.move(e,t,i)}endMoving(e,t,i){return this._moveAsChangeBehavior.endMoving(e,t,i)??super.endMoving(e,t,i)}snapTo45DegreesAvailable(){return!0}static createProperties(e,t){const i=T.create(e,t);return this._configureProperties(i),i}async _getPropertyDefinitionsViewModelClass(){return de}_createDataSourceBackgroundColorWV(){return(0,o.convertPropertyToWatchedValue)(this.properties().childs().backgroundColor).ownership()}}},11402:(e,t,i)=>{i.d(t,{factoryDefaultsForCurrentTheme:()=>s});var o=i(16738),r=i(90054),n=i(50151),l=i(45345),a=i(24633);function s(e,t){const i=l.watchedTheme.value()??a.StdTheme.Light,s=(0,r.default)(e);return(0,o.default)(s,(0,n.ensureDefined)(t.get(i))),s}}}]);
|
||||
@@ -1,8 +0,0 @@
|
||||
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9123],{73174:(e,t,i)=>{i.r(t),i.d(t,{getCoordinateXMetaInfo:()=>b,getCoordinateYMetaInfo:()=>v,getCoordinatesPropertiesDefinitions:()=>T,getSelectionCoordinatesPropertyDefinition:()=>_});var o=i(50151),r=i(11542),n=i(45126),l=i(44672),a=i(60265);class s extends a.UndoCommand{constructor({lineToolId:e,chartModel:t,newPositionPoints:i}){super(null),this._pointState=null,this._lineToolId=e,this._model=t,this._newPositionPoints=i}redo(){const e=(0,o.ensureNotNull)(this._model.dataSourceForId(this._lineToolId));this._pointState=[e.normalizedPoints(),e.points()],e.startChanging(),e.moveLineTool(this._newPositionPoints),this._model.updateSource(e),e.updateAllViews((0,l.sourceChangeEvent)(e.id())),e.syncMultichartState(e.endChanging(!0,!1))}undo(){if(this._pointState){const e=(0,o.ensureNotNull)(this._model.dataSourceForId(this._lineToolId));e.startChanging(),e.restorePoints(...this._pointState),this._model.updateSource(e),e.updateAllViews((0,l.sourceChangeEvent)(e.id())),e.syncMultichartState(e.endChanging(!0,!1))}}}var d=i(32097),c=i(64147),h=i(12988),u=i(91682);const g=-5e4,p=15e3,f=new n.TranslatedString("change price Y coordinate",r.t(null,void 0,i(11737))),m=new n.TranslatedString("change bar X coordinate",r.t(null,void 0,i(2066))),x=new n.TranslatedString("move drawings",r.t(null,void 0,i(76261)));function v(e,t,i){return{property:(0,d.convertToDefinitionProperty)(e,t.price,f),info:{typeY:1,stepY:i}}}function b(e,t){return{property:(0,d.convertToDefinitionProperty)(e,t.bar,m),info:{typeX:0,minX:new c.WatchedValue(g),maxX:new c.WatchedValue(p),stepX:new c.WatchedValue(1)}}}function T(e,t,i,o,r,n){const l=b(e,t),a=v(e,t,o);return(0,d.createCoordinatesPropertyDefinition)({x:l.property,y:a.property},{id:(0,u.removeSpaces)(`${n}Coordinates${r}`),title:r,...l.info,...a.info})}const C=/^([+*\-\/]?)((?:\d*)|(?:\d+\.\d*))$/;function y(e,t,i){const r=new h.Property(""),n=(0,d.makeProxyDefinitionProperty)(r.weakReference());return n.setValue=n=>{try{const r=n.match(C);if(!r)return;const[,l,a]=r;if(!a.length)return;const d=i(parseFloat(a));if("/"===l&&(0===d.price||0===d.index))return;t.withMacro(x,(()=>{e.filter((e=>!e.isSourceHidden())).forEach((e=>{const i=e.points();let r;switch(l){case"":{const e=(0,o.ensureDefined)(i[0]);let{index:t=e.index,price:n=e.price}=d;n-=e.price,t-=e.index,r=i.map((e=>({...e,index:e.index+t,price:e.price+n})));break}case"-":case"+":{let{index:e=0,price:t=0}=d;"-"===l&&(e*=-1,t*=-1),r=i.map((i=>({...i,index:i.index+e,price:i.price+t})));break}case"*":{const{index:e=1,price:t=1}=d;r=i.map((i=>({...i,index:i.index*e,price:i.price*t})));break}case"/":{const{index:e=1,price:t=1}=d;r=i.map((i=>({...i,index:i.index/e,price:i.price/t})));break}}t.undoHistory().pushUndoCommand(new s({lineToolId:e.id(),chartModel:t.model(),newPositionPoints:r}))}))}))}finally{r.setValue("",!0)}},n}function _(e,t){const o=y(e,t,(e=>({index:e}))),n=y(e,t,(e=>({price:e})));return(0,d.createSelectionCoordinatesPropertyDefinition)({x:o,y:n},{
|
||||
id:"SourcesCoordinates",title:r.t(null,void 0,i(44272)),mathOperationsX:"+",mathOperationsY:"+/*",modeX:"integer",modeY:"float"})}},91335:(e,t,i)=>{i.d(t,{createTextStyleDefinition:()=>S});var o=i(11542),r=i(45126),n=i(32097),l=i(91682);const a=new r.TranslatedString("change {toolName} text visibility",o.t(null,void 0,i(56634))),s=new r.TranslatedString("change {toolName} text color",o.t(null,void 0,i(64500))),d=new r.TranslatedString("change {toolName} text font size",o.t(null,void 0,i(21781))),c=new r.TranslatedString("change {toolName} text font bold",o.t(null,void 0,i(24701))),h=new r.TranslatedString("change {toolName} text font italic",o.t(null,void 0,i(42694))),u=new r.TranslatedString("change {toolName} text",o.t(null,void 0,i(66668))),g=new r.TranslatedString("change {toolName} labels alignment vertical",o.t(null,void 0,i(31689))),p=new r.TranslatedString("change {toolName} labels alignment horizontal",o.t(null,void 0,i(88277))),f=new r.TranslatedString("change {toolName} labels direction",o.t(null,void 0,i(61160))),m=new r.TranslatedString("change {toolName} text background visibility",o.t(null,void 0,i(31133))),x=new r.TranslatedString("change {toolName} text background color",o.t(null,void 0,i(22231))),v=new r.TranslatedString("change {toolName} text border visibility",o.t(null,void 0,i(58704))),b=new r.TranslatedString("change {toolName} text border width",o.t(null,void 0,i(35423))),T=new r.TranslatedString("change {toolName} text border color",o.t(null,void 0,i(36666))),C=new r.TranslatedString("change {toolName} text wrap",o.t(null,void 0,i(39587))),y=o.t(null,void 0,i(79468)),_=o.t(null,void 0,i(38408)),w=o.t(null,void 0,i(7560));function S(e,t,i,o){const r={},S={id:`${(0,l.removeSpaces)(i.originalText())}Text`,title:o.customTitles&&o.customTitles.text||""};if(void 0!==t.showText&&(r.checked=(0,n.convertToDefinitionProperty)(e,t.showText,a.format({toolName:i}))),void 0!==t.textColor&&(r.color=(0,n.getColorDefinitionProperty)(e,t.textColor,t.transparency||null,s.format({toolName:i}))),void 0!==t.fontSize&&(r.size=(0,n.convertToDefinitionProperty)(e,t.fontSize,d.format({toolName:i}))),void 0!==t.bold&&(r.bold=(0,n.convertToDefinitionProperty)(e,t.bold,c.format({toolName:i}))),void 0!==t.italic&&(r.italic=(0,n.convertToDefinitionProperty)(e,t.italic,h.format({toolName:i}))),void 0!==t.text&&(r.text=(0,n.convertToDefinitionProperty)(e,t.text,u.format({toolName:i})),S.isEditable=Boolean(o.isEditable),S.isMultiLine=Boolean(o.isMultiLine)),void 0!==t.vertLabelsAlign&&(r.alignmentVertical=(0,n.convertToDefinitionProperty)(e,t.vertLabelsAlign,g.format({toolName:i})),S.alignmentVerticalItems=o.alignmentVerticalItems),void 0!==t.horzLabelsAlign&&(r.alignmentHorizontal=(0,n.convertToDefinitionProperty)(e,t.horzLabelsAlign,p.format({toolName:i})),S.alignmentHorizontalItems=o.alignmentHorizontalItems),void 0!==t.textOrientation&&(r.orientation=(0,n.convertToDefinitionProperty)(e,t.textOrientation,f.format({toolName:i}))),void 0!==t.backgroundVisible&&(r.backgroundVisible=(0,
|
||||
n.convertToDefinitionProperty)(e,t.backgroundVisible,m.format({toolName:i}))),void 0!==t.backgroundColor){let o=null;void 0!==t.backgroundTransparency&&(o=t.backgroundTransparency),r.backgroundColor=(0,n.getColorDefinitionProperty)(e,t.backgroundColor,o,x.format({toolName:i}))}return void 0===t.backgroundVisible&&void 0===t.backgroundColor||(S.backgroundTitle=o.customTitles&&o.customTitles.backgroundTitle||y),void 0!==t.borderVisible&&(r.borderVisible=(0,n.convertToDefinitionProperty)(e,t.borderVisible,v.format({toolName:i}))),void 0!==t.borderWidth&&(r.borderWidth=(0,n.convertToDefinitionProperty)(e,t.borderWidth,b.format({toolName:i}))),void 0!==t.borderColor&&(r.borderColor=(0,n.getColorDefinitionProperty)(e,t.borderColor,null,T.format({toolName:i}))),void 0===t.borderVisible&&void 0===t.borderColor&&void 0===t.borderWidth||(S.borderTitle=o.customTitles&&o.customTitles.borderTitle||_),void 0!==t.wrap&&(r.wrap=(0,n.convertToDefinitionProperty)(e,t.wrap,C.format({toolName:i})),S.wrapTitle=o.customTitles&&o.customTitles.wrapTitle||w),(0,n.createTextPropertyDefinition)(r,S)}},6590:(e,t,i)=>{i.d(t,{commonLineToolPropertiesStateKeys:()=>o});const o=["symbolStateVersion","zOrderVersion","frozen","title","interval","symbol","currencyId","unitId","visible","intervalsVisibilities.ticks","intervalsVisibilities.seconds","intervalsVisibilities.secondsFrom","intervalsVisibilities.secondsTo","intervalsVisibilities.minutes","intervalsVisibilities.minutesFrom","intervalsVisibilities.minutesTo","intervalsVisibilities.hours","intervalsVisibilities.hoursFrom","intervalsVisibilities.hoursTo","intervalsVisibilities.days","intervalsVisibilities.daysFrom","intervalsVisibilities.daysTo","intervalsVisibilities.weeks","intervalsVisibilities.weeksFrom","intervalsVisibilities.weeksTo","intervalsVisibilities.months","intervalsVisibilities.monthsFrom","intervalsVisibilities.monthsTo","intervalsVisibilities.ranges"];var r,n,l;!function(e){e[e.NotShared=0]="NotShared",e[e.SharedInLayout=1]="SharedInLayout",e[e.GloballyShared=2]="GloballyShared"}(r||(r={})),function(e){e.BeforeAllAction="BeforeAll",e.CustomAction="CustomAction"}(n||(n={})),function(e){e.FloatingToolbarButton="FloatingToolbarButton",e.Default="Default"}(l||(l={}))},38039:(e,t,i)=>{i.d(t,{LineDataSourceProperty:()=>a});var o=i(90054),r=i(16738),n=i(50151),l=i(32679);class a extends l.DefaultProperty{constructor({templateKeys:e,...t}){super({ignoreAllowSavingDefaults:!0,saveNonDefaultUserPreferencesOnly:!0,...t}),this._templateKeys=(0,n.ensureDefined)(e||this._allDefaultsKeys)}template(){return(0,l.extractState)(this.state(),this._templateKeys,[])}applyTemplate(e){this.mergeAndFire((0,l.extractState)((0,r.default)((0,o.default)(this._factoryDefaultsSupplier()),e),this._templateKeys))}}},31761:(e,t,i)=>{i.d(t,{alignByAngle:()=>r});var o=i(30699);function r(e){let t,i;return e>=-135&&e<=-45?(t=o.HorizontalAlign.Center,i=o.VerticalAlign.Bottom):e>-45&&e<45?(t=o.HorizontalAlign.Left,i=o.VerticalAlign.Middle):e>=45&&e<=135?(t=o.HorizontalAlign.Center,
|
||||
i=o.VerticalAlign.Top):(t=o.HorizontalAlign.Right,i=o.VerticalAlign.Middle),{horzAlign:t,vertAlign:i}}},46902:(e,t,i)=>{i.r(t),i.d(t,{LineToolTextNote:()=>ce});var o=i(42752),r=i(50151),n=i(24633),l=i(49156),a=i(31229),s=i(6590),d=i(32679),c=i(11402),h=i(38039),u=i(73305);const g={intervalsVisibilities:{...a.intervalsVisibilitiesDefaults},drawBackground:!0,drawBorder:!1,fontSize:14,bold:!1,italic:!1},p=new Map([[n.StdTheme.Light,{lineColor:l.colors.colorColdGray900,backgroundColor:l.colors.colorWhite,borderColor:l.colors.colorColdGray150,textColor:l.colors.colorColdGray900}],[n.StdTheme.Dark,{lineColor:l.colors.colorColdGray200,backgroundColor:l.colors.colorColdGray800,borderColor:l.colors.colorColdGray700,textColor:l.colors.colorColdGray200}]]),f=(0,d.extractThemedColors)((0,r.ensureDefined)(p.get(n.StdTheme.Light)),(0,r.ensureDefined)(p.get(n.StdTheme.Dark))),m=(0,d.extractAllPropertiesKeys)((0,r.ensureDefined)(p.get(n.StdTheme.Light))),x=(0,d.extractAllPropertiesKeys)(g),v=[...new Set([...m,...x,...s.commonLineToolPropertiesStateKeys,"text"])],b=[...new Set([...m,...x,"text"])];class T extends h.LineDataSourceProperty{constructor(e){super(e),this.hasChild("text")||this.addProperty("text",""),this.addChild("linesColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("lineColor"))])),this.addChild("backgroundsColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("backgroundColor"))])),this.addChild("textsColors",new u.LineToolColorsProperty([(0,r.ensureDefined)(this.child("textColor"))]))}static create(e,t){return new this({defaultName:"linetooltextnote",factoryDefaultsSupplier:()=>(0,c.factoryDefaultsForCurrentTheme)(g,p),nonThemedDefaultsKeys:x,themedDefaultsKeys:m,allStateKeys:v,themedColors:f,templateKeys:b,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}var C,y,_=i(24362),w=i(19625),S=i(95201),D=i(36036),P=i(32211),k=i(86441),A=i(34026),V=i(4652),L=i(63273),R=i(30125),N=i(56468),M=i(37743),I=i(61993),z=i(17330),H=i(30699),B=i(15938),F=i(70262),W=i(31761);!function(e){e[e.Label=1]="Label"}(C||(C={})),function(e){e[e.CircleRadius=2]="CircleRadius",e[e.RoundRectRadius=4]="RoundRectRadius",e[e.LabelVertPadding=6]="LabelVertPadding",e[e.LabelHorzPadding=8]="LabelHorzPadding",e[e.TextMargins=2]="TextMargins",e[e.Blur=4]="Blur",e[e.ShadowOffsetY=2]="ShadowOffsetY"}(y||(y={}));class O extends R.BitmapCoordinatesPaneRenderer{constructor(e){super(),this._data=null,this._textLabelRenderer=new z.TextRenderer,this._textInfoCache=null,this._lineHitTest=new N.HitTestResult(N.HitTarget.MovePoint),this._textHitTest=e||new N.HitTestResult(N.HitTarget.MovePoint,{areaName:N.AreaName.Text}),this._textHitTest.mergeData({activeItem:C.Label})}setData(e){null===this._data||this._data.textData.text===e.textData.text&&this._data.textData.fontSize===e.textData.fontSize||(this._textInfoCache=null),this._data=e;const t=e.points[1];this._textLabelRenderer.setData({horzAlign:H.HorizontalAlign.Left,vertAlign:H.VerticalAlign.Middle,points:[t],text:e.textData.text||" ",color:e.textData.color,
|
||||
font:B.CHART_FONT_FAMILY,fontSize:e.textData.fontSize,bold:e.textData.bold,italic:e.textData.italic,offsetX:0,offsetY:0,borderColor:e.drawBorder?e.borderColor:void 0,borderWidth:1,backgroundColor:e.drawBackground?e.backgroundColor:void 0,backgroundRoundRect:y.RoundRectRadius,boxPaddingVert:y.LabelVertPadding,boxPaddingHorz:y.LabelHorzPadding,boxShadow:e.drawBorder||e.drawBackground?{shadowColor:e.shadowColor,shadowBlur:y.Blur,shadowOffsetY:y.ShadowOffsetY}:void 0,selectionHighlight:e.textData.selectionHighlight});const i=this._textLabelRenderer.rect(),o=e.points[0],r=e.points[1],n=Math.round(180*Math.atan2(r.y-o.y,r.x-o.x)/Math.PI),l=(0,W.alignByAngle)(n);let a=e.points[1];switch(l.horzAlign){case H.HorizontalAlign.Center:a=a.add((0,k.point)(.5*-i.width,0));break;case H.HorizontalAlign.Right:a=a.add((0,k.point)(-i.width,0))}switch(l.vertAlign){case H.VerticalAlign.Top:a=a.add((0,k.point)(0,.5*i.height));break;case H.VerticalAlign.Bottom:a=a.add((0,k.point)(0,.5*-i.height))}this._textLabelRenderer.setPoint(a)}setCursorType(e){this._textHitTest.mergeData({cursorType:e})}hitTest(e){const t=this._data;if(null===t||t.points.length<2)return null;const i=(0,I.interactionTolerance)().line+.5,o=t.points[0],r=t.points[1];if((0,V.distanceToSegment)(o,r,e).distance<=i)return this._lineHitTest;const n=this._textLabelRenderer.rect(),l=(0,k.box)((0,k.point)(n.x,n.y),(0,k.point)(n.x+n.width,n.y+n.height));return(0,A.pointInBox)(e,l)?this._textHitTest:null}getTextInfo(){const e=(0,r.ensureNotNull)(this._data),t=(0,L.isRtl)()?"right":"left",i=y.RoundRectRadius,o=y.TextMargins,n=(0,r.ensureNotNull)(this._calcTextSize()),l=this._textLabelRenderer.rect(),a=(0,r.ensureDefined)(this._textLabelRenderer.data()?.points?.[0]).add((0,k.point)(0,.5*-l.height)),{totalWidth:s,totalHeight:d}=n,c=i+o;return{font:B.CHART_FONT_FAMILY,fontSize:e.textData.fontSize,lineHeight:Math.ceil(e.textData.fontSize),lineSpacing:0,textTop:a.y+c,textBottom:a.y+d-c,textLeft:a.x+c,textRight:a.x+s-c,textAlign:t}}positionToCoordinate(e,t){const i=(0,r.ensureNotNull)(this._data),o=this.getTextInfo(),n=this._textLabelRenderer.getLinesInfo(),{x:l,y:a,lineNumber:s}=(0,F.getSymbolCoordinatesInfo)({symbolPosition:t,textWidth:o.textRight-o.textLeft,textByLines:n.linesIncludingHidden,lineHeight:i.textData.fontSize,font:B.CHART_FONT_FAMILY,textAlign:o.textAlign});return{x:l+o.textLeft,y:a+o.textTop,lineNumber:s}}_drawImpl(e){const t=this._data;if(null===t||t.points.length<2)return;const{context:i}=e,o=t.points[0],r=t.points[1];i.strokeStyle=t.lineColor,i.lineWidth=Math.max(1,Math.floor(e.horizontalPixelRatio)),i.beginPath();const[n,l]=(0,M.addPixelPerfectLineToPath)(i,o.x,o.y,r.x,r.y,e);i.stroke();const a=Math.round(y.CircleRadius*e.horizontalPixelRatio);i.fillStyle=t.lineColor,i.beginPath(),i.arc(n,l,a,0,2*Math.PI,!1),i.fill(),i.beginPath(),i.strokeStyle=t.circleBorderColor,i.lineWidth=1;const s=Math.round(y.CircleRadius*e.horizontalPixelRatio+.5*e.horizontalPixelRatio);i.arc(n,l,s,0,2*Math.PI,!1),i.stroke(),this._textLabelRenderer.draw(i,e)}_calcTextSize(){
|
||||
if(null===this._data||this._data.points.length<2)return null;if(null===this._textInfoCache){const e=this._textLabelRenderer.getLinesInfo(),t=this._data.textData.fontSize*e.lines.length,i=e.linesMaxWidth,o=y.RoundRectRadius,r=2*y.TextMargins+2*o;this._textInfoCache={textWidth:i,textHeight:t,totalWidth:i+r,totalHeight:t+r}}return this._textInfoCache}}var E=i(19063);const Y=(0,E.generateColor)((0,w.getHexColorByName)("color-black"),80),K=(0,E.generateColor)((0,w.getHexColorByName)("color-black"),60);class G extends P.InplaceTextLineSourcePaneView{constructor(e,t,i,o,r){super(e,t,i,o,r),this._renderer=new S.CompositeRenderer,this._noteRenderer=new O(new N.HitTestResult(N.HitTarget.MovePoint,(0,P.inplaceEditHandlers)(this._tryActivateEditMode.bind(this,null)))),this._source.setAdditionalCursorData((()=>({color:this._source.editableTextStyle().cursorColor,...this._noteRenderer.getTextInfo()})),this._noteRenderer.positionToCoordinate.bind(this._noteRenderer,!0))}renderer(e){return this._invalidated&&this._updateImpl(e),this._renderer}_updateImpl(e){super._updateImpl(e),this._renderer.clear();const t=this._source.priceScale();if(!t||t.isEmpty())return;const i=this._points;if(i.length<2)return;if(null===(0,r.ensureNotNull)(this._source.ownerSource()).firstValue())return;const o=this._source.properties().childs(),n=this._model.dark().value()?l.colors.colorColdGray850:l.colors.colorWhite,a=this._model.dark().value()?K:Y,s={textData:{fontSize:o.fontSize.value(),text:this._textData(),color:this._textColor(),bold:o.bold.value(),italic:o.italic.value(),selectionHighlight:this._inplaceTextHighlight().selectionHighlight},shadowColor:a,points:i,lineColor:o.lineColor.value(),drawBackground:o.drawBackground.value(),drawBorder:o.drawBorder.value(),backgroundColor:o.backgroundColor.value(),borderColor:o.borderColor.value(),circleBorderColor:n};this._renderer.append(this._noteRenderer),this._noteRenderer.setData(s),this._noteRenderer.setCursorType(this._textCursorType()),this._renderer.append(this.createLineAnchor({points:i.map(D.mapLineSourcePaneViewPointToLineAnchorPoint)},0)),this._updateInplaceText(this._noteRenderer.getTextInfo())}}var X=i(11542),$=i(45126),U=i(91335),j=i(18009),q=i(32097),J=i(91682);const Q=new $.TranslatedString("change {title} line color",X.t(null,void 0,i(7455))),Z=new $.TranslatedString("change {title} background visibility",X.t(null,void 0,i(30839))),ee=new $.TranslatedString("change {title} background color",X.t(null,void 0,i(49765))),te=new $.TranslatedString("change {title} border visibility",X.t(null,void 0,i(19298))),ie=new $.TranslatedString("change {title} border color",X.t(null,void 0,i(69437))),oe=X.t(null,void 0,i(70320)),re=X.t(null,void 0,i(97575)),ne=X.t(null,void 0,i(34974)),le=X.t(null,void 0,i(73863));class ae extends j.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,J.removeSpaces)(t),o=new $.TranslatedString(t,this._source.translatedType());return{definitions:[(0,q.createColorPropertyDefinition)({checked:(0,
|
||||
q.convertToDefinitionProperty)(this._propertyApplier,e.drawBackground,Z.format({title:o})),color:(0,q.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,null,ee.format({title:o}))},{id:(0,J.removeSpaces)(`${t}BackgroundColor`),title:le}),(0,q.createColorPropertyDefinition)({checked:(0,q.convertToDefinitionProperty)(this._propertyApplier,e.drawBorder,te.format({title:o})),color:(0,q.getColorDefinitionProperty)(this._propertyApplier,e.borderColor,null,ie.format({title:o}))},{id:(0,J.removeSpaces)(`${t}BorderColor`),title:ne}),(0,q.createColorPropertyDefinition)({color:(0,q.getColorDefinitionProperty)(this._propertyApplier,e.lineColor,null,Q.format({title:o}))},{id:`${i}LineColor`,title:re})]}}_textPropertyDefinitions(){const{backgroundColor:e,borderColor:t,...i}=this._source.properties().childs();return{definitions:[(0,U.createTextStyleDefinition)(this._propertyApplier,{...i,textColor:i.textColor,fontSize:i.fontSize},new $.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,customTitles:{text:oe}})]}}}var se=i(44672);class de{constructor(e,t){this._labelMovingDelta=null,this._line=e,this._itemIndex=t}startMoving(e,t,i){if(t===this._itemIndex){if(this._line.isSourceHidden())return!0;const i=(0,r.ensureDefined)(e.logical),o=this._line.points()[1];return this._labelMovingDelta={index:o.index-i.index,price:o.price-i.price},this._line.startChanging(t,i),!0}return this._labelMovingDelta=null,!1}move(e,t,i){if(null!==this._labelMovingDelta){const t=(0,r.ensureDefined)(e.logical),o={index:t.index+this._labelMovingDelta.index,price:t.price+this._labelMovingDelta.price};return this._line.setPoint(1,o,i),this._line.updateAllViews((0,se.sourceChangeEvent)(this._line.id())),!0}return!1}endMoving(e,t,i){return null!==this._labelMovingDelta?(this._labelMovingDelta=null,this._line.endChanging(!1,e)):null}}class ce extends _.InplaceTextLineDataSource{constructor(e,t,i,o){super(e,t??ce.createProperties(e.backgroundTheme().spawnOwnership()),i,o),this._moveAsChangeBehavior=new de(this,C.Label),this._setPaneViews([new G(this,e,this._openTextEditor.bind(this),this._closeTextEditor.bind(this),this.onSelectionChange.bind(this))])}pointsCount(){return 2}name(){return"Note"}removeIfEditableTextIsEmpty(){return!0}activateEditingOnCreation(){return!0}shouldBeRemovedOnDeselect(){const e=this._properties.childs().text.value().trim();return this._points.length===this.pointsCount()&&""===e}editableTextProperties(){const e=this.properties().childs();return{text:e.text,textColor:e.textColor}}template(){return this._properties.template()}startMoving(e,t,i){this._moveAsChangeBehavior.startMoving(e,t,i)||super.startMoving(e,t,i)}move(e,t,i){this._moveAsChangeBehavior.move(e,t,i)||super.move(e,t,i)}endMoving(e,t,i){return this._moveAsChangeBehavior.endMoving(e,t,i)??super.endMoving(e,t,i)}snapTo45DegreesAvailable(){return!0}static createProperties(e,t){const i=T.create(e,t);return this._configureProperties(i),i}async _getPropertyDefinitionsViewModelClass(){return ae}
|
||||
_createDataSourceBackgroundColorWV(){return(0,o.convertPropertyToWatchedValue)(this.properties().childs().backgroundColor).ownership()}}},11402:(e,t,i)=>{i.d(t,{factoryDefaultsForCurrentTheme:()=>s});var o=i(16738),r=i(90054),n=i(50151),l=i(45345),a=i(24633);function s(e,t){const i=l.watchedTheme.value()??a.StdTheme.Light,s=(0,r.default)(e);return(0,o.default)(s,(0,n.ensureDefined)(t.get(i))),s}}}]);
|
||||
@@ -3,7 +3,7 @@ o.u=e=>7827===e?"__LANG__.7827.ea2deb999b0c771280eb.js":8370===e?"__LANG__.8370.
|
||||
507:"study-pane-views",569:"line-tool-arrow-mark",574:"line-tool-horizontal-ray",607:"study-property-pages-with-definitions",620:"tablecontext-menu",688:"line-tool-callout",731:"add-compare-dialog",906:"line-tool-fib-speed-resistance-fan",925:"line-tool-extended",961:"line-tool-path",1155:"line-tool-5points-pattern",1277:"line-tool-balloon",1282:"line-tool-vertical-line",1313:"line-tool-pitch-fan",1314:"line-tool-position",1455:"line-tool-date-and-price-range",1470:"line-tool-arrow-marker",1506:"line-tool-fib-timezone",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1713:"line-tool-sine-line",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",1963:"line-tool-gann-complex",2050:"line-tool-parallel-channel",2077:"change-interval-dialog",2087:"line-tool-highlighter",2183:"study-inputs-pane-views",2232:"line-tool-order",2277:"line-tool-risk-reward-long",2283:"line-tool-fib-channel",2306:"floating-toolbars",2312:"line-tool-text",2377:"hammerjs",2413:"custom-themes-api",2704:"currency-label-menu",2816:"line-tool-fib-circles",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3248:"line-tool-note",3314:"line-tool-fib-wedge",3378:"line-tool-head-and-shoulders",3383:"line-tool-triangle-pattern",3555:"price-scale-mode-buttons-renderer",3596:"general-property-page",3710:"line-tool-fib-speed-resistance-arcs",3723:"line-tool-fib-retracement",3866:"line-tool-poly-line",3945:"line-tool-projection",3966:"line-tool-comment",4013:"custom-intervals-add-dialog",4015:"line-tool-rotated-rectangle",4079:"series-pane-views",4201:"line-tool-horizontal-line",4273:"line-tool-date-range",4389:"take-chart-image-impl",4598:"delete-locked-line-confirm-dialog-content",4602:"line-tool-three-drivers",4665:"share-chart-to-social-utils",4674:"line-tool-signpost",4731:"line-tool-trend-based-fib-extension",4862:"object-tree-dialog",4934:"line-tool-ray",4981:"line-tool-gann-fan",5009:"load-chart-dialog",5055:"line-tool-pitchfork",5093:"chart-widget-gui",5122:"line-tool-brush",5206:"line-tool-bars-pattern",5231:"line-tool-image",5248:"library-studies",5283:"line-tool-abcd",5500:"line-tool-anchored-vwap",5516:"restricted-toolset",5529:"line-tool-emoji",5551:"favorite-drawings-api",5565:"ichart-storage",5592:"chart-text-editor-renderer",5598:"lt-stickers-atlas",5639:"currency-label-menu-events",5695:"line-tool-volume-profile",5967:"line-tool-arc",6124:"chart-storage-library-http",6166:"chart-event-hint",6265:"new-edit-object-dialog",6336:"line-tool-gann-fixed",6432:"line-tool-triangle",6456:"study-market",6477:"line-tool-price-range",6484:"line-tool-price-label",6631:"study-template-dialog",6740:"line-tool-cypher-pattern",6748:"line-tool-circle",6768:"line-tool-risk-reward-short",6780:"source-properties-editor",7038:"insert-image-dialog",7078:"general-chart-properties-dialog",7127:"line-tool-trend-based-fib-time",7129:"line-tools-synchronizer",7175:"line-tool-schiff-pitchfork",7203:"line-tool-cross-line",7260:"chart-bottom-toolbar",7271:"compare-model",
|
||||
7488:"line-tool-info-line",7539:"studies",7563:"line-tool-ghost-feed",7648:"show-theme-save-dialog",7660:"line-tool-ellipse",7806:"line-tool-icon",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8061:"line-tool-bezier-quadro",8090:"line-tool-fib-spiral",8313:"chart-storage-external-adapter",8334:"line-tool-time-cycles",8372:"line-tool-trend-angle",8422:"line-tool-rectangle",8468:"line-tool-inside-pitchfork",8537:"lt-property-pages-with-definitions",8607:"line-tool-arrow",8643:"full-tooltips-popup",8673:"line-tool-trend-line",8820:"line-tool-flag-mark",8890:"simple-dialog",8949:"line-tool-sticker",9014:"line-tool-bezier-cubic",9039:"lollipop-tooltip-renderer",9123:"line-tool-text-note",9310:"line-tool-flat-bottom",9374:"symbol-info-dialog-impl",9445:"line-tool-cyclic-lines",9478:"line-tool-gann-square",9498:"export-data",9534:"line-tool-prediction",9581:"line-tool-disjoint-channel",9685:"series-icons-map",9748:"line-tool-regression-trend",9754:"global-search-dialog",9790:"favorite-indicators"}[e]||e)+"."+{92:"9c2d9ee1d1ca65a8aa27",116:"7a938e628dae74ba527c",139:"04b8d60c4104ce77bfae",319:"1eb09cfdedf2e78f577d",341:"4aa71e356859926db3a2",360:"f67ae87ec1068bb8268d",380:"d8636434a285be606160",422:"9335b7df4365e97cbb6a",507:"b80513f731e4b3a193eb",569:"19e8b788cdb0919595a2",574:"5ef049b044be26e418f0",601:"bc292726a701d789f4a8",607:"49669f6cdb5f430c10b2",620:"73067184a7f2d03f3339",625:"c3f879df6a8d4a1c054d",643:"b5b634495eec3f1b3c14",653:"e6c7e6c622f6a200dcdc",688:"f2e464e61dff92f48aff",731:"d11bf3eec91bbb45e2e8",769:"7eb483a16682eb9ba9b6",779:"4eec9138a97bf5ff8a8a",906:"dca6ff066c5fdc6feeef",925:"3cbf51ef60d63e3983cf",961:"d999333ab31c578011b9",1072:"be3a8a7d09f34e875a1e",1155:"6263308902575ad8a026",1200:"04b28fea9e7b7b64a167",1252:"c5de90e9c298e410878e",1277:"260ed2e96fa2f096e16c",1282:"001de2bf4e8afd5eecfe",1313:"6bb3c812b7e898c9bab3",1314:"b2935b11001a6b3d8dba",1390:"ffdc2b9032c730265212",1455:"fe461cde786ddb040db9",1470:"ef1d87c6fcc9f4200c3c",1506:"1be7aea3345f62c946c0",1531:"2f8518f3d19f709e4655",1553:"ee2f0024a59277fd480e",1583:"cf9d7448e928a6e8c713",1584:"7fff087c0bda17935d02",1667:"756eb4aeaff140cf152d",1702:"d398b4b164bfe467f5d9",1713:"672ae4cff5daaebdbb5c",1737:"a88f1ff138fca90aaa14",1754:"76e488d2d451bf03f11f",1833:"a12ca3d3e3276fb1b461",1859:"2964d9695fbef38df17c",1890:"6270f97faffd65a49d40",1906:"434b4be8cda98af43453",1933:"510498d67c9b20798afa",1963:"8f27bb6c7b49cba52180",2050:"cedec45efced95505b7d",2077:"43c303b12db18a924490",2087:"2d3e8ad7c47abff0b80b",2157:"61a636dade5d0e13d9e8",2183:"40514e36e1d2d7e2e969",2197:"9e441b34254e9ebf8757",2227:"c1c4b4d4d12f9774793f",2232:"6295ec35522b8432a85e",2277:"72b60477bb30e1a62478",2283:"dafadf3d8f76c629d725",2306:"9b713cdcc2aaf0749bbb",2312:"8f89ff578dd468af9027",2371:"d7c78ac916c18b933246",2377:"6e30e0c48af40bf2f6c0",2413:"03c3a946dbdd9acb5770",2440:"e433d90edf053f8432de",2444:"140908ac04f81fa39b26",2544:"883cdc36b20a2dd3223f",2564:"d2a3fd8f9cddcf5264c3",2704:"574a3b52565fb7ee430a",2709:"6489d5a6a0a85376efba",2736:"066be336f75b34bccc10",
|
||||
2751:"f5e7294780401a4b0339",2816:"3d32e2f0d522ff55bc47",2864:"3c2bc645c073a6505d89",2878:"e22124b593441fe5404a",3005:"b988704f5babf67fa9a6",3030:"afc7a08821bc5df64ef9",3202:"3dd097b08ddcf065e475",3248:"6b0c21a5d86658ee9809",3314:"2000cb0299da9d5c270a",3362:"cc61c557540cab7abba0",3378:"39551a52d95c24cfddb3",3383:"47f266dbf2efbe2162c4",3489:"630ed945efafcecf2e20",3555:"7e813f280229de3d710b",3596:"8e71fcfef583b7d9ce35",3693:"eba6a9041db303dd8bdd",3703:"34314901d1086db0e25e",3710:"fa637d08945b1678e88d",3723:"21cd5f9d377b168cd32e",3745:"ca0dc4793963821e17cf",3746:"f97f0fb65128649c7cd8",3799:"57b13fc53ae3cdf9b02f",3828:"dd3b3ab9b1e9037c5d53",3866:"492a52ede167918754e7",3889:"1f275e258565cbaf0d8e",3945:"6d5f43c6a02878585d61",3953:"074939cda643555b9fa0",3960:"2cda395cf5c2cfa1f887",3966:"2b6661ea10d34449f371",3999:"ad1f87e790552238f74a",4013:"77db9d4f9796ed64c643",4015:"9b7648d4802398a8cb51",4052:"9999fdd036dbbf203b10",4057:"debdf4bb4205c8a4ca75",4066:"f51f4a04f2ec9db826e7",4079:"2960218970c17f66f4d5",4106:"39a4b0e746d3a222c47b",4137:"0f18ca5eea411d63b805",4170:"7b0f546ce3800398472d",4178:"1d0b7074e5333864ae92",4201:"18e53e9628623c53f76e",4256:"264ea6b0e6a4742d480c",4273:"c2c265a1a3a29e00e706",4353:"7cc84e240b93d6e7e35f",4389:"06b7f0e04f7a2a290f26",4411:"c49ed08264e4ecdc3778",4482:"047c81d44aa4df09a0eb",4524:"3aeb32cd32e5da655aa5",4556:"681e1cb78cccc175cab8",4598:"53a9c5f5df1264b687e2",4600:"09e4c4cc50200b9e6850",4602:"ae561b848687458ec130",4665:"e6a25f4006607ca48421",4674:"44337a8394827d0d1310",4731:"9fe656a23f88c989ec9e",4862:"260a976938e387b0726b",4876:"7897d3efdf28cba97d62",4931:"6008b4d2694ba4532170",4934:"dd3c08a366baf0d6dba6",4981:"22c773e811ba8b2d7caa",5009:"3a80aaa8a3780555d7bf",5055:"5418a2d34d6b78f716dc",5058:"99cc5cca8222cb165435",5083:"46b0c5fd2a360051603e",5093:"75309572eff8d8b7b023",5099:"3cfd2de22e6258d2a292",5122:"ee0f230877d5db0665c5",5168:"e337b19e191fd77bb91b",5206:"fd9c8e049ac79fbcc2fb",5231:"f18d8a63cf1dd81f0d88",5248:"538702d65096d9a3d6b4",5283:"c98d47bf3b71d452d58b",5323:"f0f2e4cd72aef7561792",5375:"40c7f0a13dfd0b073241",5378:"271e40afdba3994a941e",5387:"1fb6a179200ed9f9d598",5446:"34d25f33d4a5377fc9b5",5480:"872f4f12e150c051ec76",5500:"294e75f950a6600b59c2",5516:"8ce53ffa965b5163ec2b",5529:"4877448f5bb1b9f3de05",5551:"ec1abe78f54ce91e86da",5565:"1144e5a1b4f8503ee572",5579:"06f240fa157f3f88c0d9",5592:"96aa1d6a274550df5c5e",5598:"28f311a546f5aa99113a",5639:"e269bd9e406f041eb8d5",5695:"4b3b47133acbace3e4e1",5699:"491feb1ed1bf2b4f9aaf",5826:"ebf365249c45db1ffdaf",5967:"d2e2962fd7645f47f876",5975:"b7cae9993c5dd48e5a93",6124:"4fb8f2a7e2c0b2ac7071",6164:"d777d634896ff9f161e6",6166:"beb5ba75e0d99ca0d3ec",6190:"ba40b4eca0e5787a7131",6262:"50bf96239e95bd5526f8",6265:"085c77106105c12777fe",6316:"f4ad5200fc2f7cfac880",6336:"3db1ca2ccff68d9c5618",6432:"55b8d2807089ae6869ee",6445:"35b87669babb3c0df14e",6456:"e9c97c4731663ba0ad49",6477:"ec0e1080c347b97c9812",6484:"9928d8c78aa8e2e8686c",6489:"bc05b17c8a898e58bbac",6631:"1e4a3250df7209707900",6710:"04d48637cfbf4dd81f30",6740:"b08efdd378a6e81ef8d2",
|
||||
6748:"cc334eab092e1765d566",6768:"ac91a7312c853449a9b5",6780:"ee8cc2b562199f399ca1",6842:"d8d23575b4bae4029458",6847:"a20c2744b4ec26c282c2",7001:"2e9740e3dd29f52fbc39",7038:"2cd66863e222e6701e1b",7078:"b8d24061f85e7c41e09e",7127:"22fc6bd0bf04f52638ee",7129:"db411c09fa8a1f3938dd",7159:"9cf6001375236b4ae5ae",7175:"43fa465654886a69616a",7203:"eebadbe6029f6639649b",7204:"4ce39b0fb7cfe7b4e3a4",7223:"5dc4702239e8f86405c5",7260:"f5400bf815bf18a71f91",7271:"b36834782b1510f27b4e",7384:"0cdb4857f1460f4d9a53",7435:"320e6ee2a20ef22f4c89",7444:"70c9dc9f1fe0190cdb4a",7488:"d7bb260e91a35dfd5503",7519:"01180f215ff7af433df6",7539:"7e1387f8ed2a2eb9ec3a",7563:"d4c0d87d92f45e88a356",7572:"55da2195e08bfa006905",7648:"13fd53598db85ddaf6d5",7660:"805f4a25f140c639eb87",7746:"80c929346a2e4da2da17",7806:"da5d50b03d4be9b941d7",7843:"769f50c52542d4fdb657",7935:"4b1b34f77a2daa9c9b93",7939:"a4955d64b3419221b6f8",7973:"a6c550f7a1a82ee0eee1",7987:"b322584213cf8db18142",8009:"d0c79ff5d18ffda9091d",8020:"f1bc9e9a5112927f9e52",8054:"ed303ebb191a688f566a",8056:"35e7c7e55a0c335968c5",8061:"34e4a41c4df11cc2722c",8090:"321bcf488423993d1325",8222:"87a78213ec9f0d1770b0",8257:"e182f402a058e5d88be8",8313:"9c1267d07e48b8d8f53f",8334:"df64378236249eb84118",8372:"a826bc4c58d73a1fba44",8402:"b320045d1f82cd213e57",8422:"92ee36c3cca1d9408530",8468:"45316fac341acce1d8f8",8537:"7750bdfe8b8d39e6ee0a",8544:"fb27137673cba35e671e",8607:"5337f39176d282681107",8643:"2757efda17f6a0eec04f",8666:"36efe49307baf278bd9f",8673:"a5e4cd0c9c158e793b55",8692:"eed8394a9b1af7348f9a",8820:"ecfbb92c1fe43bbb6eb8",8859:"ae2af6f78341c0095774",8890:"d0bb94e2f7cbbcb4b593",8949:"ce6f4bb24e50170dbbbb",8985:"d4599a0cccc3494e753e",9014:"3dfdff2b64d0a5ca56f0",9039:"7c400941d19103307b25",9116:"94162a8aac4312a06d87",9123:"cdad539f93d06424338a",9255:"218770777b8f819418ad",9258:"d5d85e4484e2c6e1716a",9276:"56e7b7666415deb7b327",9296:"5dae32e37069d21f713e",9310:"ef1dc89d7d7faf6420cc",9325:"3eb0347ac3afd65e4e78",9374:"bfa616edcb923b7a6e94",9418:"c6ce3fbbf9fd54162f86",9443:"ff39ce6ae6512d53851b",9445:"d262ab58e6a1e37a318c",9478:"bdee506d401471928f7f",9481:"ef84307c90c7f4780c09",9498:"aae444f8273ee2d54f9b",9534:"deabe2b851af076f2193",9581:"1989d22edae7a5c7ef34",9608:"d4f33f9e72384b833e5c",9654:"d38201d2782cc90eb9f5",9685:"0233460790ed227b7d97",9748:"9ec2dca5dd039a0d0625",9753:"1c410653234b85ae211e",9754:"f8ee5f76976f7be1234f",9766:"14ec8ca9f791a864f57a",9790:"1855183210ba69fff9e4",9928:"54ec0f3b289ae632aa3e",9967:"7ea4b09ac3ec84715844",9977:"33cfa81f34341c7e5e31"}[e]+".js",o.miniCssF=e=>e+"."+{116:"668ae3395c34e5ab58d7",422:"bc23975c348a4f41dea4",601:"b6bc31b7ce369908d97d",625:"d44699b46966b893bfca",643:"5e08138e265dd49437ea",779:"b84315f4350430cdb348",1072:"67a2846c0506e2e592be",1252:"788a58021829bdae27fc",1390:"626f0a194297d6d23002",1531:"9f5911fcffe385103254",1737:"51511f925000b99093e3",1833:"1e1cad103085069c69fc",1906:"40ce159ad2a7f4f15d5c",1933:"a40665ade21837a1b5e2",2197:"3c275591170ccafa3bbe",2371:"3fc94a1aa7a1e03d91e4",2440:"8620e9f557ec49b4b3d7",2444:"3360c6e677bffb470a53",
|
||||
6748:"cc334eab092e1765d566",6768:"ac91a7312c853449a9b5",6780:"ee8cc2b562199f399ca1",6842:"d8d23575b4bae4029458",6847:"a20c2744b4ec26c282c2",7001:"2e9740e3dd29f52fbc39",7038:"2cd66863e222e6701e1b",7078:"b8d24061f85e7c41e09e",7127:"22fc6bd0bf04f52638ee",7129:"db411c09fa8a1f3938dd",7159:"9cf6001375236b4ae5ae",7175:"43fa465654886a69616a",7203:"eebadbe6029f6639649b",7204:"4ce39b0fb7cfe7b4e3a4",7223:"5dc4702239e8f86405c5",7260:"f5400bf815bf18a71f91",7271:"b36834782b1510f27b4e",7384:"0cdb4857f1460f4d9a53",7435:"320e6ee2a20ef22f4c89",7444:"70c9dc9f1fe0190cdb4a",7488:"d7bb260e91a35dfd5503",7519:"01180f215ff7af433df6",7539:"7e1387f8ed2a2eb9ec3a",7563:"d4c0d87d92f45e88a356",7572:"55da2195e08bfa006905",7648:"13fd53598db85ddaf6d5",7660:"805f4a25f140c639eb87",7746:"80c929346a2e4da2da17",7806:"da5d50b03d4be9b941d7",7843:"769f50c52542d4fdb657",7935:"4b1b34f77a2daa9c9b93",7939:"a4955d64b3419221b6f8",7973:"a6c550f7a1a82ee0eee1",7987:"b322584213cf8db18142",8009:"d0c79ff5d18ffda9091d",8020:"f1bc9e9a5112927f9e52",8054:"ed303ebb191a688f566a",8056:"35e7c7e55a0c335968c5",8061:"34e4a41c4df11cc2722c",8090:"321bcf488423993d1325",8222:"87a78213ec9f0d1770b0",8257:"e182f402a058e5d88be8",8313:"9c1267d07e48b8d8f53f",8334:"df64378236249eb84118",8372:"a826bc4c58d73a1fba44",8402:"b320045d1f82cd213e57",8422:"92ee36c3cca1d9408530",8468:"45316fac341acce1d8f8",8537:"7750bdfe8b8d39e6ee0a",8544:"fb27137673cba35e671e",8607:"5337f39176d282681107",8643:"2757efda17f6a0eec04f",8666:"36efe49307baf278bd9f",8673:"a5e4cd0c9c158e793b55",8692:"eed8394a9b1af7348f9a",8820:"ecfbb92c1fe43bbb6eb8",8859:"ae2af6f78341c0095774",8890:"d0bb94e2f7cbbcb4b593",8949:"ce6f4bb24e50170dbbbb",8985:"d4599a0cccc3494e753e",9014:"3dfdff2b64d0a5ca56f0",9039:"7c400941d19103307b25",9116:"94162a8aac4312a06d87",9123:"900b73ca1a1ea2ff14ad",9255:"218770777b8f819418ad",9258:"d5d85e4484e2c6e1716a",9276:"56e7b7666415deb7b327",9296:"5dae32e37069d21f713e",9310:"ef1dc89d7d7faf6420cc",9325:"3eb0347ac3afd65e4e78",9374:"bfa616edcb923b7a6e94",9418:"c6ce3fbbf9fd54162f86",9443:"ff39ce6ae6512d53851b",9445:"d262ab58e6a1e37a318c",9478:"bdee506d401471928f7f",9481:"ef84307c90c7f4780c09",9498:"aae444f8273ee2d54f9b",9534:"deabe2b851af076f2193",9581:"1989d22edae7a5c7ef34",9608:"d4f33f9e72384b833e5c",9654:"d38201d2782cc90eb9f5",9685:"0233460790ed227b7d97",9748:"9ec2dca5dd039a0d0625",9753:"1c410653234b85ae211e",9754:"f8ee5f76976f7be1234f",9766:"14ec8ca9f791a864f57a",9790:"1855183210ba69fff9e4",9928:"54ec0f3b289ae632aa3e",9967:"7ea4b09ac3ec84715844",9977:"33cfa81f34341c7e5e31"}[e]+".js",o.miniCssF=e=>e+"."+{116:"668ae3395c34e5ab58d7",422:"bc23975c348a4f41dea4",601:"b6bc31b7ce369908d97d",625:"d44699b46966b893bfca",643:"5e08138e265dd49437ea",779:"b84315f4350430cdb348",1072:"67a2846c0506e2e592be",1252:"788a58021829bdae27fc",1390:"626f0a194297d6d23002",1531:"9f5911fcffe385103254",1737:"51511f925000b99093e3",1833:"1e1cad103085069c69fc",1906:"40ce159ad2a7f4f15d5c",1933:"a40665ade21837a1b5e2",2197:"3c275591170ccafa3bbe",2371:"3fc94a1aa7a1e03d91e4",2440:"8620e9f557ec49b4b3d7",2444:"3360c6e677bffb470a53",
|
||||
2564:"cac75529a7aa17227aa7",2709:"a1e050d9d395d7ca0793",2736:"c88f0ff04a966a2fb2df",2864:"f4dde91fd09337ffbc3c",3362:"2476428ae07d34323af5",3693:"44308eb6167ec63939d4",3703:"fbb750fd312778403036",3745:"cf2f96070c64ff0ae693",3799:"e61340cf19beaf4f90d5",3828:"b87cd06c9d4e7baa6eda",3953:"7146f14703227db023af",4052:"093089193f18ca4eeff8",4057:"400f57042c58b6946a7c",4066:"eba4ddabfe5309662e8a",4106:"8577632fdab29ee53ddf",4137:"6299deceb84b57b5f957",4170:"b8247e6f2ef930e9c9a6",4178:"3183c4285a7a7661d53e",4256:"1d39c3c8dc435b82e4c6",4353:"9eade1db5c4beb02071a",4524:"d6f97e44b70e5e01f7d4",4556:"cff39ef77f0827e16b81",4600:"362fa6a7ab1f3e3b06c4",4876:"9ce134321e5f7ed1c4ad",5058:"2776c62444167c12b233",5083:"a9187278de5ab079b6d2",5099:"8d938014c9c676877539",5168:"c631f421748404652de3",5323:"05b152d9c203bbe1e861",5375:"132067dc73c5743d825f",5387:"6dc6a5ec31f9d97dc855",5446:"1f5883a75f4d7d613e20",5480:"62c8085685951c0bc278",5579:"0353e321d943562b4486",5699:"32d0511e014f0b07d6c6",5826:"c70dad3fc1bd0fd0f22d",5975:"a3e49a7b95404261d4eb",6164:"3d692610247dc24d7b64",6190:"bd22fdbcb9baef45b965",6262:"cce9c2d0878310b9ee03",6316:"4c1aab38ac483c2022bb",6445:"d2b2f28850f8c828a4d7",6489:"9070beae9e8cef21670a",6710:"9171de773f9f829118f4",6842:"f6f5a9b5ab991d9de920",6847:"f6b63c197359a8b78abb",7001:"d167a8793031fa802176",7159:"27d77fe8d8dff58ceb0a",7204:"b3dcbd58906265276dd8",7384:"aefeb9db8e938fbfb1dc",7435:"45bbca649d592877886a",7444:"8be34346a1a2c104404c",7519:"6dcec65216aeb5263fdb",7572:"eeafd67dac93bb21fca3",7935:"1def029dc5949b8f8e0e",7939:"b1bead470bdb2684eb12",8054:"f7c1326458b0418d3775",8222:"a31543d092246fd03dd2",8257:"0e03bab72eb086ffb4ee",8544:"16c0fd7539d08ad5ffd3",8666:"d1d8147337bae3fa6372",8692:"1372368151d36104b74b",8859:"4e8179db16fddc59e8fa",8985:"10034c1258391b9f008c",9255:"574882a5338ad0774967",9258:"127a4c4030a8c2724b98",9276:"99ce945e2a3fe8127079",9296:"dff3cd88e89f770d4753",9325:"f2e1edd6097be38e73da",9481:"63a2692b383c39f8a3d1",9608:"d8e66f4c4d6c2e5e9e51",9654:"e02f2476bd5db34eaf55",9753:"b7b1c5568e3084458241",9766:"631d966499ce5a6b82a9",9967:"ea707572e7ac5e0fd485",9977:"d6dee9346a53b63a68b0"}[e]+".css",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="tradingview:",o.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,l;if(void 0!==c)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r++){var i=n[r];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")==f+c){t=i;break}}t||(l=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,o.nc&&t.setAttribute("nonce",o.nc),t.setAttribute("data-webpack",f+c),t.src=e,0!==t.src.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous")),d[e]=[a];var s=(a,c)=>{t.onerror=t.onload=null,clearTimeout(_);var f=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(c))),a)return a(c)},_=setTimeout(s.bind(null,void 0,{type:"timeout",target:t}),12e4)
|
||||
;t.onerror=s.bind(null,t.onerror),t.onload=s.bind(null,t.onload),l&&document.head.appendChild(t)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.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(/\/[^\/]+$/,"/"),o.p=e})(),o.g.location&&o.p.startsWith(o.g.location.origin)&&(o.p=o.p.slice(o.g.location.origin.length)),(()=>{const e=o.u;o.u=a=>e(a).replace("__LANG__",o.g.language)})(),o.p=o.g.WEBPACK_PUBLIC_PATH||o.p;var l=o.e,n=Object.create(null);function r(e,a){return l(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?r(e,a+1):l(e))};setTimeout(d,a*a*1e3)}))}))}o.e=function(e){if(!n[e]){n[e]=r(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=o.miniCssF(e),f=o.p+d;if(((e,a)=>{for(var c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var f=(t=c[d]).getAttribute("data-href")||t.getAttribute("href");if("stylesheet"===t.rel&&(f===e||f===a))return t}var b=document.getElementsByTagName("style");for(d=0;d<b.length;d++){var t;if((f=(t=b[d]).getAttribute("data-href"))===e||f===a)return t}})(d,f))return a();((e,a,c,d,f)=>{var b=document.createElement("link");b.rel="stylesheet",b.type="text/css",b.onerror=b.onload=c=>{if(b.onerror=b.onload=null,"load"===c.type)d();else{var t=c&&("load"===c.type?"missing":c.type),o=c&&c.target&&c.target.href||a,l=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=t,l.request=o,b.parentNode&&b.parentNode.removeChild(b),f(l)}},b.href=a,0!==b.href.indexOf(window.location.origin+"/")&&(b.crossOrigin="anonymous"),c?c.parentNode.insertBefore(b,c.nextSibling):document.head.appendChild(b)})(e,f,null,a,c)})),a={3666:0};o.f.miniCss=(c,d)=>{a[c]?d.push(a[c]):0!==a[c]&&{116:1,422:1,601:1,625:1,643:1,779:1,1072:1,1252:1,1390:1,1531:1,1737:1,1833:1,1906:1,1933:1,2197:1,2371:1,2440:1,2444:1,2564:1,2709:1,2736:1,2864:1,3362:1,3693:1,3703:1,3745:1,3799:1,3828:1,3953:1,4052:1,4057:1,4066:1,4106:1,4137:1,4170:1,4178:1,4256:1,4353:1,4524:1,4556:1,4600:1,4876:1,5058:1,5083:1,5099:1,5168:1,5323:1,5375:1,5387:1,5446:1,5480:1,5579:1,5699:1,5826:1,5975:1,6164:1,6190:1,6262:1,6316:1,6445:1,6489:1,6710:1,6842:1,6847:1,7001:1,7159:1,7204:1,7384:1,7435:1,7444:1,7519:1,7572:1,7935:1,7939:1,8054:1,8222:1,8257:1,8544:1,8666:1,8692:1,8859:1,8985:1,9255:1,9258:1,9276:1,9296:1,9325:1,9481:1,9608:1,9654:1,9753:1,9766:1,9967:1,9977:1}[c]&&d.push(a[c]=e(c).then((()=>{a[c]=0}),(e=>{throw delete a[c],e})))}}})(),
|
||||
o.i18next=(e,a={},c,d=o.g.language)=>{if(null===e){if(Array.isArray(c))return c[void 0===a.count?0:o._plural[d](a.count)].replace(/{(\w+)}/g,((e,c)=>void 0!==(a.replace||a)[c]?(a.replace||a)[c]:e));if("object"==typeof c){if(o.g.customTranslateFunction){const e=o.g.customTranslateFunction(c.en[o._plural.en(a.count)],c.en[0],c[o.g.language]?c[o.g.language][o._plural[o.g.language](a.count)]:void 0);if(null!==e)return e.replace(/{(\w+)}/g,((e,c)=>void 0!==(a.replace||a)[c]?(a.replace||a)[c]:e))}return c[o.g.language]?o.i18next(null,a,c[o.g.language]):o.i18next(null,a,c.en,"en")}}else if(c&&e){const d=`${e}${a.context?`_${a.context}`:""}`;if(c[d])return o.i18next(null,a,c[d])}return"number"==typeof e?e.toString():"string"!=typeof e?"":e},(()=>{var e={3666:0,1996:0};o.f.j=(a,c)=>{var d=o.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1(9(06|33|96)|072|16|252|390|531|737|833)|2(44[04]|[58]64|197|371|709|736)|3(7(03|45|99)|362|666|693|828|953)|4(0(52|57|66)|1(06|37|70|78)|(25|55|87)6|22|353|524|600)|5(0(58|83|99)|3(23|75|87)|168|446|480|579|699|826|975)|6(4(3|45|89)|84[27]|01|164|190|25|262|316|710)|7(93[59]|(15|51|7)9|(20|38|44)4|001|435|572)|8(054|222|257|544|666|692|859|985)|9(2(55|58|76|96)|325|481|608|654|753|766|967|977))$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var b=o.p+o.u(a),t=new Error;o.l(b,(c=>{if(o.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[b,t,l]=c,n=0;if(b.some((a=>0!==e[a]))){for(d in t)o.o(t,d)&&(o.m[d]=t[d]);if(l)var r=l(o)}for(a&&a(c);n<b.length;n++)f=b[n],o.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return o.O(r)},c=self.webpackChunktradingview=self.webpackChunktradingview||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})(),(()=>{const{miniCssF:e}=o;o.miniCssF=a=>self.document&&"rtl"===self.document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();
|
||||
File diff suppressed because one or more lines are too long
16
charting_library/charting_library.d.ts
vendored
16
charting_library/charting_library.d.ts
vendored
@@ -12129,8 +12129,16 @@ export interface IContext {
|
||||
*/
|
||||
is_main_symbol(symbol: ISymbolInstrument | undefined): boolean;
|
||||
/**
|
||||
* Allows the minimum depth to be forced.
|
||||
* @param {number} value - minimum depth to set
|
||||
* Allows you to specify how many data points beyond the [visible range](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Time-Scale#time-range) the library should request.
|
||||
* You should use this method only in **exceptional** cases.
|
||||
*
|
||||
* By default, the library request data for the visible range and some additional data points required for calculations.
|
||||
* For example, if you calculate 10-period Moving Average with the {@link PineJSStd.sma} function, the library will request at least 10 extra bars of historical data.
|
||||
*
|
||||
* However, the library cannot determine the number of extra bars when your indicator depends on another indicator (chained calculations).
|
||||
* In this exceptional case, you can specify this number using the `setMinimumAdditionalDepth` method.
|
||||
* Consider the [Custom Moving Average](https://www.tradingview.com/charting-library-docs/latest/tutorials/create-custom-indicator/constructor-implementation#2-call-setminimumadditionaldepth) example, where a series is calculated and then used as an input for the second calculation.
|
||||
* @param {number} value - minimum number of bars to request
|
||||
*/
|
||||
setMinimumAdditionalDepth(value: number): void;
|
||||
}
|
||||
@@ -20842,6 +20850,10 @@ export interface StudyOrDrawingAddedToChartEventParams {
|
||||
/**
|
||||
* Name of the added study or drawing.
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Id of the added study or drawing.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"description": "CL v29.5.0 (internal id d4304b56f4484593d3049db5abb2c22dadf6ea92 @ 2025-08-05T15:20:12.313Z)",
|
||||
"description": "CL v29.6.0 (internal id 7388a2a6e02df803a33011b40077c533f89a55f0 @ 2025-08-13T13:50:29.067Z)",
|
||||
"type": "module",
|
||||
"main": "charting_library.cjs.js",
|
||||
"module": "charting_library.esm.js",
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
},
|
||||
"homepage": "https://www.tradingview.com/charting-library-docs",
|
||||
"name": "charting_library",
|
||||
"version": "29.5.0",
|
||||
"version": "29.6.0",
|
||||
"types": "charting_library.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user