initial commit with charts and assistant chat
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8537,5231],{45838:(e,t,i)=>{i.d(t,{convertToInt:()=>o,floor:()=>r,limitedPrecision:()=>l});var n=i(9860);function r(e){return Math.floor(e)}function o(e){return parseInt(String(e))}function l(e){const t=new n.LimitedPrecisionNumericFormatter(e,!0);return e=>{if(null===e)return e;const i=t.parse(t.format(e));return i.res?i.value:null}}},90700:(e,t,i)=>{i.d(t,{getLinesStylesPropertiesDefinitions:()=>f});var n=i(11542),r=i(95804),o=i(67725),l=i(95338),s=i(91682);const a=new r.TranslatedString("change {title} price label visibility",n.t(null,void 0,i(98822))),c=new r.TranslatedString("change {title} extension",n.t(null,void 0,i(10390))),d=new r.TranslatedString("change {title} time label visibility",n.t(null,void 0,i(66960))),p=n.t(null,void 0,i(97273)),u=n.t(null,void 0,i(56822)),h=n.t(null,void 0,i(41410));function f(e,t,i){const n=(0,s.removeSpaces)(i.originalText()),r=[],f=(0,o.createLineStyleDefinition)(e,{lineColor:t.linecolor,lineWidth:t.linewidth,lineStyle:t.linestyle},i,"Line");if(r.push(f),"showPrice"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showPrice,a.format({title:i}))},{id:`${n}ShowPrice`,title:p});r.push(o)}if("extendLine"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.extendLine,c.format({title:i}))},{id:`${n}ExtendLine`,title:h});r.push(o)}if("showTime"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showTime,d.format({title:i}))},{id:`${n}ShowTime`,title:u});r.push(o)}return{definitions:r}}},6255:(e,t,i)=>{i.r(t),i.d(t,{getSelectionStylePropertiesDefinitions:()=>y});var n=i(11542),r=i(65045),o=i(66567),l=i(95804),s=i(95338);const a=new l.TranslatedString("lines width",n.t(null,void 0,i(41594))),c=new l.TranslatedString("lines style",n.t(null,void 0,i(96400))),d=new l.TranslatedString("lines color",n.t(null,void 0,i(24621))),p=new l.TranslatedString("backgrounds color",n.t(null,void 0,i(61218))),u=new l.TranslatedString("backgrounds filled",n.t(null,void 0,i(48433))),h=new l.TranslatedString("text color",n.t(null,void 0,i(44461))),f=new l.TranslatedString("show price",n.t(null,void 0,i(59012)));function y(e,t){const l=[];if("linesWidths"in e||"linestyle"in e||"linesColors"in e){const p=(0,s.createLinePropertyDefinition)({width:e.linesWidths?new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.linesWidths),a,t):void 0,style:e.linestyle?new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.linestyle),c,t):void 0,color:e.linesColors?new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.linesColors),d,t):void 0},{id:"LineStyles",title:n.t(null,void 0,i(3554))});l.push(p)}if("showPrice"in e||"showPriceLabels"in e||"axisLabelVisible"in e){const{showPrice:a=[],showPriceLabels:c=[],axisLabelVisible:d=[]}=e,p=(0,s.createCheckablePropertyDefinition)({
|
||||
checked:new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty([...a,...c,...d]),f,t)},{id:"ShowPrice",title:n.t(null,void 0,i(97273))});l.push(p)}if("backgroundsColors"in e){const a=(0,s.createColorPropertyDefinition)({checked:e.fillBackground?new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.fillBackground),u,t):void 0,color:new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.backgroundsColors),p,t)},{id:"BackgroundColors",title:n.t(null,void 0,i(79468))});l.push(a)}if("textsColors"in e){const a=(0,s.createLinePropertyDefinition)({color:new o.CollectiblePropertyUndoWrapper(new r.LineToolCollectedProperty(e.textsColors),h,t)},{id:"TextColors",title:n.t(null,void 0,i(70320))});l.push(a)}return{definitions:l}}},67621:(e,t,i)=>{i.d(t,{getTrendLineToolsStylePropertiesDefinitions:()=>B});var n=i(11542),r=i(95804),o=i(67725),l=i(95338),s=i(22613),a=i(97760),c=i(91682);const d=new r.TranslatedString("change {title} middle point visibility",n.t(null,void 0,i(27470))),p=new r.TranslatedString("change {title} price labels visibility",n.t(null,void 0,i(343))),u=new r.TranslatedString("change {title} price range visibility",n.t(null,void 0,i(63962))),h=new r.TranslatedString("change {title} percent change visibility",n.t(null,void 0,i(87246))),f=new r.TranslatedString("change {title} change in pips visibility",n.t(null,void 0,i(81340))),y=new r.TranslatedString("change {title} bars range visibility",n.t(null,void 0,i(98845))),g=new r.TranslatedString("change {title} date/time range visibility",n.t(null,void 0,i(37563))),v=new r.TranslatedString("change {title} distance visibility",n.t(null,void 0,i(45153))),_=new r.TranslatedString("change {title} angle visibility",n.t(null,void 0,i(59288))),P=new r.TranslatedString("change {title} always show stats",n.t(null,void 0,i(80390))),T=new r.TranslatedString("change {title} stats position",n.t(null,void 0,i(86722))),D=[{value:a.StatsPosition.Left,title:n.t(null,void 0,i(11626))},{value:a.StatsPosition.Center,title:n.t(null,void 0,i(24197))},{value:a.StatsPosition.Right,title:n.t(null,void 0,i(50421))},{value:a.StatsPosition.Auto,title:n.t(null,void 0,i(21469))}],w=n.t(null,void 0,i(12516)),m=n.t(null,void 0,i(42747)),S=n.t(null,void 0,i(16053)),b=n.t(null,void 0,i(62362)),C=n.t(null,void 0,i(73525)),x=n.t(null,void 0,i(4518)),L=n.t(null,void 0,i(89073)),A=n.t(null,void 0,i(62374)),k=n.t(null,void 0,i(3369)),V=n.t(null,void 0,i(390)),M=n.t(null,void 0,i(93857)),$=n.t(null,void 0,i(26754)),W=n.t(null,void 0,i(42349));function B(e,t,i,n){const r=(0,c.removeSpaces)(i.originalText()),a=[],B=t,R=(0,o.createLineStyleDefinition)(e,{...B,lineColor:t.linecolor,lineWidth:t.linewidth,lineStyle:t.linestyle},i,"Line");a.push(R);const I=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showMiddlePoint,d.format({title:i}))},{id:`${r}MiddlePoint`,title:n&&n.middlePoint||w});a.push(I);const z=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showPriceLabels,p.format({title:i
|
||||
}))},{id:`${r}ShowPriceLabels`,title:n&&n.showPriceLabelsTitle||m});a.push(z);const N=[],E=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showPriceRange,u.format({title:i}))},{id:`${r}PriceRange`,title:n&&n.priceRange||b});N.push(E);const U=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showPercentPriceRange,h.format({title:i}))},{id:`${r}PercentChange`,title:n&&n.percentChange||C});N.push(U);const O=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showPipsPriceRange,f.format({title:i}))},{id:`${r}PipsChange`,title:n&&n.pipsChange||x});N.push(O);const G=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showBarsRange,y.format({title:i}))},{id:`${r}BarsRange`,title:n&&n.barRange||L});if(N.push(G),"showDateTimeRange"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showDateTimeRange,g.format({title:i}))},{id:`${r}DateTimeRange`,title:n&&n.dateTimeRange||A});N.push(o)}if("showDistance"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showDistance,v.format({title:i}))},{id:`${r}Distance`,title:n&&n.distance||k});N.push(o)}if("showAngle"in t){const o=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.showAngle,_.format({title:i}))},{id:`${r}Angle`,title:n&&n.angle||V});N.push(o)}const F=[];F.push((0,l.createPropertyDefinitionsCheckableListOptionsGroup)(N,void 0,[],"trendLineToolCheckableListGroup",$));const H=(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(e,t.statsPosition,T.format({title:i}))},{id:"trendLineToolStatsPosition",title:n&&n.statsPosition||S,options:new s.WatchedValue(D)});F.push(H);const j=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(e,t.alwaysShowStats,P.format({title:i}))},{id:`${r}ShowStats`,title:n&&n.showStats||M});return F.push(j),a.push((0,l.createPropertyDefinitionsGeneralGroup)(F,`${r}StatsGroup`,W)),{definitions:a}}},91445:(e,t,i)=>{i.d(t,{createTextStyleDefinition:()=>C});var n=i(11542),r=i(95804),o=i(95338),l=i(91682)
|
||||
;const s=new r.TranslatedString("change {toolName} text visibility",n.t(null,void 0,i(56634))),a=new r.TranslatedString("change {toolName} text color",n.t(null,void 0,i(64500))),c=new r.TranslatedString("change {toolName} text font size",n.t(null,void 0,i(21781))),d=new r.TranslatedString("change {toolName} text font bold",n.t(null,void 0,i(24701))),p=new r.TranslatedString("change {toolName} text font italic",n.t(null,void 0,i(42694))),u=new r.TranslatedString("change {toolName} text",n.t(null,void 0,i(66668))),h=new r.TranslatedString("change {toolName} labels alignment vertical",n.t(null,void 0,i(31689))),f=new r.TranslatedString("change {toolName} labels alignment horizontal",n.t(null,void 0,i(88277))),y=new r.TranslatedString("change {toolName} labels direction",n.t(null,void 0,i(61160))),g=new r.TranslatedString("change {toolName} text background visibility",n.t(null,void 0,i(31133))),v=new r.TranslatedString("change {toolName} text background color",n.t(null,void 0,i(22231))),_=new r.TranslatedString("change {toolName} text border visibility",n.t(null,void 0,i(58704))),P=new r.TranslatedString("change {toolName} text border width",n.t(null,void 0,i(35423))),T=new r.TranslatedString("change {toolName} text border color",n.t(null,void 0,i(36666))),D=new r.TranslatedString("change {toolName} text wrap",n.t(null,void 0,i(39587))),w=n.t(null,void 0,i(79468)),m=n.t(null,void 0,i(38408)),S=n.t(null,void 0,i(7560)),b=n.t(null,void 0,i(6060));function C(e,t,i,n){const r={},C={id:`${(0,l.removeSpaces)(i.originalText())}Text`,title:n.customTitles&&n.customTitles.text||"",placeholder:n.placeholder??b};if(void 0===t.showText||n.hideTextCheckbox||(r.checked=(0,o.convertToDefinitionProperty)(e,t.showText,s.format({toolName:i}))),void 0!==t.textColor&&(r.color=(0,o.getColorDefinitionProperty)(e,t.textColor,t.transparency||null,a.format({toolName:i}))),void 0!==t.fontSize&&(r.size=(0,o.convertToDefinitionProperty)(e,t.fontSize,c.format({toolName:i}))),void 0!==t.bold&&(r.bold=(0,o.convertToDefinitionProperty)(e,t.bold,d.format({toolName:i}))),void 0!==t.italic&&(r.italic=(0,o.convertToDefinitionProperty)(e,t.italic,p.format({toolName:i}))),void 0!==t.text){const l=u.format({toolName:i});r.text=(0,o.convertToDefinitionProperty)(e,t.text,l,void 0),C.isEditable=Boolean(n.isEditable),C.isMultiLine=Boolean(n.isMultiLine)}if(void 0!==t.vertLabelsAlign&&(r.alignmentVertical=(0,o.convertToDefinitionProperty)(e,t.vertLabelsAlign,h.format({toolName:i})),C.alignmentVerticalItems=n.alignmentVerticalItems),void 0!==t.horzLabelsAlign&&(r.alignmentHorizontal=(0,o.convertToDefinitionProperty)(e,t.horzLabelsAlign,f.format({toolName:i})),C.alignmentHorizontalItems=n.alignmentHorizontalItems),void 0!==t.textOrientation&&(r.orientation=(0,o.convertToDefinitionProperty)(e,t.textOrientation,y.format({toolName:i}))),void 0!==t.backgroundVisible&&(r.backgroundVisible=(0,o.convertToDefinitionProperty)(e,t.backgroundVisible,g.format({toolName:i}))),void 0!==t.backgroundColor){let n=null;void 0!==t.backgroundTransparency&&(n=t.backgroundTransparency),
|
||||
r.backgroundColor=(0,o.getColorDefinitionProperty)(e,t.backgroundColor,n,v.format({toolName:i}))}return void 0===t.backgroundVisible&&void 0===t.backgroundColor||(C.backgroundTitle=n.customTitles&&n.customTitles.backgroundTitle||w),void 0!==t.borderVisible&&(r.borderVisible=(0,o.convertToDefinitionProperty)(e,t.borderVisible,_.format({toolName:i}))),void 0!==t.borderWidth&&(r.borderWidth=(0,o.convertToDefinitionProperty)(e,t.borderWidth,P.format({toolName:i}))),void 0!==t.borderColor&&(r.borderColor=(0,o.getColorDefinitionProperty)(e,t.borderColor,null,T.format({toolName:i}))),void 0===t.borderVisible&&void 0===t.borderColor&&void 0===t.borderWidth||(C.borderTitle=n.customTitles&&n.customTitles.borderTitle||m),void 0!==t.wrap&&(r.wrap=(0,o.convertToDefinitionProperty)(e,t.wrap,D.format({toolName:i})),C.wrapTitle=n.customTitles&&n.customTitles.wrapTitle||S),(0,o.createTextPropertyDefinition)(r,C)}},28578:(e,t,i)=>{i.r(t),i.d(t,{ArrowMarkDefinitionsViewModel:()=>d});var n=i(11542),r=i(95804),o=i(91445),l=i(14472),s=i(95338);const a=new r.TranslatedString("change arrow color",n.t(null,void 0,i(77931))),c=n.t(null,void 0,i(11858));class d extends l.LineDataSourceDefinitionsViewModel{_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,o.createTextStyleDefinition)(this._propertyApplier,{text:e.text,textColor:e.color,fontSize:e.fontsize,bold:e.bold,italic:e.italic},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.arrowColor,null,a)},{id:"ArrowColor",title:c})]}}}},62171:(e,t,i)=>{i.r(t),i.d(t,{ArrowMarkerDefinitionsViewModel:()=>p});var n=i(11542),r=i(95804),o=i(95338),l=i(14472),s=i(91682),a=i(91445);const c=new r.TranslatedString("change {title} color",n.t(null,void 0,i(49442))),d=n.t(null,void 0,i(47370));class p extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createColorPropertyDefinition)({color:(0,o.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,null,c.format({title:i}))},{id:(0,s.removeSpaces)(`${t}Color`),title:d})]}}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,a.createTextStyleDefinition)(this._propertyApplier,{text:e.text,textColor:e.textColor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},1336:(e,t,i)=>{i.r(t),i.d(t,{BarsPatternDefinitionsViewModel:()=>T});var n=i(11542),r=i(95804),o=i(14472),l=i(95338),s=i(22613),a=i(45580),c=i(45838),d=i(91682)
|
||||
;const p=new r.TranslatedString("change {title} color",n.t(null,void 0,i(49442))),u=new r.TranslatedString("change {title} mode",n.t(null,void 0,i(57462))),h=new r.TranslatedString("change {title} mirrored",n.t(null,void 0,i(85198))),f=new r.TranslatedString("change {title} flipped",n.t(null,void 0,i(10643))),y=n.t(null,void 0,i(47370)),g=n.t(null,void 0,i(3214)),v=n.t(null,void 0,i(28941)),_=n.t(null,void 0,i(63271)),P=[{value:a.LineToolBarsPatternMode.Bars,title:n.t(null,void 0,i(49275))},{value:a.LineToolBarsPatternMode.OpenClose,title:n.t(null,void 0,i(98136))},{value:a.LineToolBarsPatternMode.Line,title:n.t(null,void 0,i(30216))},{value:a.LineToolBarsPatternMode.LineOpen,title:n.t(null,void 0,i(80332))},{value:a.LineToolBarsPatternMode.LineHigh,title:n.t(null,void 0,i(18387))},{value:a.LineToolBarsPatternMode.LineLow,title:n.t(null,void 0,i(53880))},{value:a.LineToolBarsPatternMode.LineHL2,title:n.t(null,void 0,i(32982))}];class T extends o.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType()),n=(0,d.removeSpaces)(t);return{definitions:[(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,e.color,null,p.format({title:i}))},{id:`${n}Color`,title:y}),(0,l.createOptionsPropertyDefinition)({option:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.mode,u.format({title:i}),[c.convertToInt])},{id:`${n}Mode`,title:g,options:new s.WatchedValue(P)}),(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.mirrored,h.format({title:i}))},{id:`${n}Mirrored`,title:v}),(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.flipped,f.format({title:i}))},{id:`${n}Flipped`,title:_})]}}}},56370:(e,t,i)=>{i.r(t),i.d(t,{BrushDefinitionsViewModel:()=>u});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682);const c=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),d=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),p=n.t(null,void 0,i(79468));class u extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth,leftEnd:e.leftEnd,rightEnd:e.rightEnd},i,"Line"),(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,c.format({title:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,e.transparency,d.format({title:i}))},{id:(0,a.removeSpaces)(`${t}BackgroundColor`),title:p})]}}_coordinatesPropertyDefinitions(){return null}}},1006:(e,t,i)=>{i.r(t),i.d(t,{CalloutDefinitionsViewModel:()=>l});var n=i(91445),r=i(14472),o=i(95804)
|
||||
;class l extends r.LineDataSourceDefinitionsViewModel{_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,n.createTextStyleDefinition)(this._propertyApplier,{textColor:e.color,fontSize:e.fontsize,bold:e.bold,italic:e.italic,text:e.text,backgroundColor:e.backgroundColor,backgroundTransparency:e.transparency,borderColor:e.bordercolor,borderWidth:e.linewidth,wrap:e.wordWrap},new o.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},87979:(e,t,i)=>{i.r(t),i.d(t,{CrossLineDefinitionsViewModel:()=>c});var n=i(11542),r=i(95804),o=i(14472),l=i(90700),s=i(91445);const a=n.t(null,void 0,i(70320));class c extends o.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,l.getLinesStylesPropertiesDefinitions)(this._propertyApplier,e,new r.TranslatedString(this._source.name(),this._source.translatedType()))}_textPropertyDefinitions(){const e=this._source.properties().childs();if("showLabel"in e){return{definitions:[(0,s.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.textcolor,fontSize:e.fontsize},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,customTitles:{text:a}})]}}return null}}},38111:(e,t,i)=>{i.r(t),i.d(t,{CyclicAndSineLinesPatternDefinitionsViewModel:()=>a});var n=i(11542),r=i(95804),o=i(67725),l=i(14472);const s=n.t(null,void 0,i(56982));class a extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},new r.TranslatedString(this._source.name(),this._source.translatedType()),"Line",{line:s})]}}}},6238:(e,t,i)=>{i.r(t),i.d(t,{ElliottPatternDefinitionsViewModel:()=>y});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(22613),c=i(91682);const d=new r.TranslatedString("change {title} color",n.t(null,void 0,i(49442))),p=new r.TranslatedString("change {title} degree",n.t(null,void 0,i(86650))),u=n.t(null,void 0,i(47370)),h=n.t(null,void 0,i(32998)),f=n.t(null,void 0,i(23403));class y extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.color,null,d.format({title:i}))},{id:(0,c.removeSpaces)(`${t}BackgroundColor`),title:u}),(0,o.createLineStyleDefinition)(this._propertyApplier,{showLine:e.showWave,lineWidth:e.linewidth},i,"Line",{line:h}),(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.degree,p.format({title:i}))},{id:`${t}Degree`,title:f,options:new a.WatchedValue(this._source.availableDegreesValues())})]}}}},3086:(e,t,i)=>{i.r(t),i.d(t,{EllipseCircleDefinitionsViewModel:()=>l})
|
||||
;var n=i(95804),r=i(91445),o=i(27877);class l extends o.GeneralFiguresDefinitionsViewModelBase{_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,r.createTextStyleDefinition)(this._propertyApplier,{textColor:e.textColor,text:e.text,bold:e.bold,italic:e.italic,fontSize:e.fontSize},new n.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},38455:(e,t,i)=>{i.r(t),i.d(t,{FibCirclesDefinitionsViewModel:()=>b});var n=i(50151),r=i(11542),o=i(95804),l=i(67725),s=i(95338),a=i(14472),c=i(91682),d=i(44005);const p=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),u=new o.TranslatedString("change {title} levels visibility",r.t(null,void 0,i(54517))),h=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),f=new o.TranslatedString("change {title} level {index} line width",r.t(null,void 0,i(97870))),y=new o.TranslatedString("change {title} level {index} line coeff",r.t(null,void 0,i(27154))),g=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),v=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),_=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),P=new o.TranslatedString("change {title} coeffs as percents visibility",r.t(null,void 0,i(31753))),T=r.t(null,void 0,i(51574)),D=r.t(null,void 0,i(28683)),w=r.t(null,void 0,i(79468)),m=r.t(null,void 0,i(79650)),S=r.t(null,void 0,i(53912));class b extends a.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),r=(0,c.removeSpaces)(i),a=new o.TranslatedString(i,this._source.translatedType()),b=t.trendline.childs(),C=(0,l.createLineStyleDefinition)(this._propertyApplier,{showLine:b.visible,lineColor:b.color,lineStyle:b.linestyle,lineWidth:b.linewidth},a,"TrendLine",{line:T});e.push(C);const x=this._source.levelsCount();for(let i=1;i<=x;i++){const n=t[`level${i}`].childs(),o=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,n.visible,p.format({title:a,index:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,n.color,null,h.format({title:a,index:i})),width:(0,s.convertToDefinitionProperty)(this._propertyApplier,n.linewidth,f.format({title:a,index:i})),level:(0,s.convertToDefinitionProperty)(this._propertyApplier,n.coeff,y.format({title:a,index:i}))},{id:`${r}LineLevel${i}`});e.push(o)}const L=(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,new d.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,g.format({title:a}),!0)},{id:`${r}AllLineColor`,title:D});e.push(L);const A=(0,s.createTransparencyPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,v.format({title:a})),transparency:(0,
|
||||
s.convertToDefinitionProperty)(this._propertyApplier,t.transparency,_.format({title:a}))},{id:`${r}Background`,title:w});e.push(A);const k=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.showCoeffs,u.format({title:a}))},{id:`${r}Levels`,title:m});e.push(k);const V=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.coeffsAsPercents,P.format({title:a}))},{id:`${r}Percentage`,title:S});return e.push(V),{definitions:e}}}},55200:(e,t,i)=>{i.r(t),i.d(t,{FibDrawingsWith24LevelsDefinitionsViewModel:()=>j});var n=i(50151),r=i(11542),o=i(95804),l=i(67725),s=i(95338),a=i(14472),c=i(50605),d=i(56689),p=i(22613),u=i(91682),h=i(44005);const f=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),y=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),g=new o.TranslatedString("change {title} level {index} line coeff",r.t(null,void 0,i(27154))),v=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),_=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),P=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),T=new o.TranslatedString("change {title} reverse",r.t(null,void 0,i(50762))),D=new o.TranslatedString("change {title} prices visibility",r.t(null,void 0,i(15818))),w=new o.TranslatedString("change {title} labels alignment",r.t(null,void 0,i(58312))),m=new o.TranslatedString("change {title} text alignment",r.t(null,void 0,i(55134))),S=new o.TranslatedString("change {title} text visibility",r.t(null,void 0,i(30353))),b=new o.TranslatedString("change {title} labels font size",r.t(null,void 0,i(19658))),C=new o.TranslatedString("change {title} style",r.t(null,void 0,i(98463))),x=new o.TranslatedString("change {title} fib levels based on log scale",r.t(null,void 0,i(85509))),L=r.t(null,void 0,i(51574)),A=r.t(null,void 0,i(36937)),k=r.t(null,void 0,i(68461)),V=r.t(null,void 0,i(25112)),M=r.t(null,void 0,i(79192)),$=r.t(null,void 0,i(25188)),W=r.t(null,void 0,i(64489)),B=r.t(null,void 0,i(29416)),R=r.t(null,void 0,i(79650)),I=r.t(null,void 0,i(5119)),z=r.t(null,void 0,i(70320)),N=r.t(null,void 0,i(2573)),E=r.t(null,void 0,i(28683)),U=r.t(null,void 0,i(79468)),O=r.t(null,void 0,i(66086)),G=[{id:"values",value:!1,title:r.t(null,void 0,i(60092))},{id:"percents",value:!0,title:r.t(null,void 0,i(33120))}],F=[{id:c.VerticalAlign.Top,value:c.VerticalAlign.Bottom,title:r.t(null,void 0,i(97118))},{id:c.VerticalAlign.Middle,value:c.VerticalAlign.Middle,title:r.t(null,void 0,i(68833))},{id:c.VerticalAlign.Bottom,value:c.VerticalAlign.Top,title:r.t(null,void 0,i(27567))}],H=[8,10,11,12,14,16,18,20,22,24].map((e=>({title:String(e),value:e})));class j extends a.LineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t),this._disabledBasedOnLog=null;if("fibLevelsBasedOnLogScale"in this._source.properties().childs()){const e=this._source.priceScale()
|
||||
;null!==e&&(this._disabledBasedOnLog=new p.WatchedValue(Boolean(!e.mode().log)),this._createPropertyRages(),e.modeChanged().subscribe(this,((e,t)=>{null!==this._disabledBasedOnLog&&this._disabledBasedOnLog.setValue(Boolean(!t.log))})))}}destroy(){super.destroy();const e=this._source.priceScale();null!==e&&e.modeChanged().unsubscribeAll(this)}_stylePropertyDefinitions(){const e=[],t=this._source.properties(),i=t.childs(),r=this._source.name(),a=(0,u.removeSpaces)(r),c=new o.TranslatedString(r,this._source.translatedType());if("trendline"in i){const t=i.trendline.childs(),n=(0,l.createLineStyleDefinition)(this._propertyApplier,{showLine:t.visible,lineColor:t.color,lineStyle:t.linestyle,lineWidth:t.linewidth},c,"TrendLine",{line:L});e.push(n)}const j=i.levelsStyle.childs(),Y={lineStyle:j.linestyle,lineWidth:j.linewidth},X={line:A};"extendLines"in i&&(Y.extendRight=i.extendLines,X.extendRightTitle=M),"extendLinesLeft"in i&&(Y.extendLeft=i.extendLinesLeft,X.extendLeftTitle=$),"extendRight"in i&&(Y.extendRight=i.extendRight,X.extendRightTitle=k),"extendLeft"in i&&(Y.extendLeft=i.extendLeft,X.extendLeftTitle=V);const q=(0,l.createLineStyleDefinition)(this._propertyApplier,Y,c,"LevelsStyleLine",X);e.push(q);const K=[],J=this._source.levelsCount();for(let e=1;e<=J;e++){const t=i[`level${e}`].childs(),n=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.visible,f.format({title:c,index:e})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,t.color,null,y.format({title:c,index:e})),level:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.coeff,g.format({title:c,index:e}))},{id:`${a}LineLevel${e}`});K.push(n)}const Q=(0,s.createPropertyDefinitionsLeveledLinesGroup)(K,`${a}LeveledLinesGroup`);e.push((0,s.createPropertyDefinitionsGeneralGroup)([Q],`${a}Group`));const Z=(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,new h.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,v.format({title:c}),!0)},{id:`${a}AllLineColor`,title:E});e.push(Z);const ee=(0,s.createTransparencyPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.fillBackground,_.format({title:c})),transparency:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.transparency,P.format({title:c}))},{id:`${a}Background`,title:U});e.push(ee);const te=i;if("reverse"in te){const t=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,te.reverse,T.format({title:c}))},{id:`${a}Reverse`,title:W});e.push(t)}const ie=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.showPrices,D.format({title:c}))},{id:`${a}Prices`,title:B});e.push(ie);const ne=(0,s.createOptionsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.showCoeffs,C.format({title:c})),option:(0,
|
||||
s.convertToDefinitionProperty)(this._propertyApplier,i.coeffsAsPercents,C.format({title:c}))},{id:`${a}PitchStyle`,title:R,options:new p.WatchedValue(G)});e.push(ne);const re=(0,s.createTwoOptionsPropertyDefinition)({option1:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.horzLabelsAlign,w.format({title:c})),option2:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.vertLabelsAlign,w.format({title:c}))},{id:`${a}Alignment`,title:I,optionsItems1:new p.WatchedValue(d.availableAlignmentHorizontalItems),optionsItems2:new p.WatchedValue(F)});e.push(re);const oe=t.child("showText"),le=t.child("horzTextAlign"),se=t.child("vertTextAlign");if(oe&&le&&se){const t=(0,s.createTwoOptionsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,oe,S.format({title:c})),option1:(0,s.convertToDefinitionProperty)(this._propertyApplier,le,m.format({title:c})),option2:(0,s.convertToDefinitionProperty)(this._propertyApplier,se,m.format({title:c}))},{id:`${a}Text`,title:z,optionsItems1:new p.WatchedValue(d.availableAlignmentHorizontalItems),optionsItems2:new p.WatchedValue(F)});e.push(t)}const ae=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.labelFontSize,b.format({title:c}))},{id:`${a}FontSize`,title:N,options:new p.WatchedValue(H)});if(e.push(ae),"fibLevelsBasedOnLogScale"in i&&null!==this._disabledBasedOnLog){const t=(0,s.createCheckablePropertyDefinition)({disabled:(0,s.convertFromWVToDefinitionProperty)(this._propertyApplier,this._disabledBasedOnLog,x.format({title:c})),checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.fibLevelsBasedOnLogScale,x.format({title:c}))},{id:`${a}BasedOnLog`,title:O});e.push(t)}return{definitions:e}}}},56689:(e,t,i)=>{i.r(t),i.d(t,{FibTimezoneDefinitionsViewModel:()=>x,availableAlignmentHorizontalItems:()=>C,availableAlignmentVerticalItems:()=>b});var n=i(50151),r=i(11542),o=i(95804),l=i(95338),s=i(14472),a=i(50605),c=i(22613),d=i(91682),p=i(44005);const u=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),h=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),f=new o.TranslatedString("change {title} level {index} line width",r.t(null,void 0,i(97870))),y=new o.TranslatedString("change {title} level {index} line style",r.t(null,void 0,i(64707))),g=new o.TranslatedString("change {title} level {index} line coeff",r.t(null,void 0,i(27154))),v=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),_=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),P=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),T=new o.TranslatedString("change {title} labels visibility",r.t(null,void 0,i(93340))),D=new o.TranslatedString("change {title} labels alignment",r.t(null,void 0,i(58312))),w=r.t(null,void 0,i(28683)),m=r.t(null,void 0,i(79468)),S=r.t(null,void 0,i(5119)),b=[{id:a.VerticalAlign.Bottom,value:a.VerticalAlign.Top,
|
||||
title:r.t(null,void 0,i(97118))},{id:a.VerticalAlign.Middle,value:a.VerticalAlign.Middle,title:r.t(null,void 0,i(68833))},{id:a.VerticalAlign.Top,value:a.VerticalAlign.Bottom,title:r.t(null,void 0,i(27567))}],C=[{id:a.HorizontalAlign.Left,value:a.HorizontalAlign.Left,title:r.t(null,void 0,i(11626))},{id:a.HorizontalAlign.Center,value:a.HorizontalAlign.Center,title:r.t(null,void 0,i(24197))},{id:a.HorizontalAlign.Right,value:a.HorizontalAlign.Right,title:r.t(null,void 0,i(50421))}];class x extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),r=(0,d.removeSpaces)(i),s=new o.TranslatedString(i,this._source.translatedType()),a=this._source.levelsCount();for(let i=1;i<=a;i++){const n=t[`level${i}`].childs(),o=(0,l.createLeveledLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.visible,u.format({title:s,index:i})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,n.color,null,h.format({title:s,index:i})),width:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.linewidth,f.format({title:s,index:i})),style:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.linestyle,y.format({title:s,index:i})),level:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.coeff,g.format({title:s,index:i}))},{id:`${r}LineLevel${i}`});e.push(o)}const x=(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,new p.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,v.format({title:s}),!0)},{id:`${r}AllLineColor`,title:w});e.push(x);const L=(0,l.createTransparencyPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,_.format({title:s})),transparency:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.transparency,P.format({title:s}))},{id:`${r}Background`,title:m});e.push(L);const A=(0,l.createTwoOptionsPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showLabels,T.format({title:s})),option1:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.horzLabelsAlign,D.format({title:s})),option2:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.vertLabelsAlign,D.format({title:s}))},{id:`${r}Labels`,title:S,optionsItems1:new c.WatchedValue(C),optionsItems2:new c.WatchedValue(b)});return e.push(A),{definitions:e}}}},77143:(e,t,i)=>{i.r(t),i.d(t,{FlagMarkDefinitionsViewModel:()=>c});var n=i(11542),r=i(95804),o=i(14472),l=i(95338);const s=new r.TranslatedString("change flag color",n.t(null,void 0,i(77883))),a=n.t(null,void 0,i(33885));class c extends o.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,e.flagColor,null,s)},{id:"FlagColor",title:a})]}}}},66758:(e,t,i)=>{i.r(t),i.d(t,{
|
||||
GannComplexAndFixedDefinitionsViewModel:()=>I,isGannComplexLineTool:()=>R});var n=i(50151),r=i(11542),o=i(95804),l=i(91445),s=i(95338),a=i(14472),c=i(68991),d=i(22613),p=i(45838),u=i(91682),h=i(44005);const f=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),y=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),g=new o.TranslatedString("change {title} level {index} line width",r.t(null,void 0,i(97870))),v=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),_=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),P=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),T=new o.TranslatedString("change {title} reverse",r.t(null,void 0,i(50762))),D=new o.TranslatedString("change {title} fan {index} line visibility",r.t(null,void 0,i(28833))),w=new o.TranslatedString("change {title} fan {index} line color",r.t(null,void 0,i(62500))),m=new o.TranslatedString("change {title} fan {index} line width",r.t(null,void 0,i(6298))),S=new o.TranslatedString("change {title} arcs {index} line visibility",r.t(null,void 0,i(4313))),b=new o.TranslatedString("change {title} arcs {index} line color",r.t(null,void 0,i(95582))),C=new o.TranslatedString("change {title} arcs {index} line width",r.t(null,void 0,i(8745))),x=new o.TranslatedString("change top margin",r.t(null,void 0,i(74883))),L=r.t(null,void 0,i(64489)),A=r.t(null,void 0,i(28683)),k=r.t(null,void 0,i(79468)),V=r.t(null,void 0,i(78393)),M=r.t(null,void 0,i(27177)),$=r.t(null,void 0,i(79650)),W=r.t(null,void 0,i(84885)),B=r.t(null,void 0,i(59129));function R(e){return e instanceof c.LineToolGannComplex}class I extends a.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),r=(0,u.removeSpaces)(i),a=new o.TranslatedString(i,this._source.translatedType()),c=[],I=t.levels.childCount();for(let e=0;e<I;e++){const i=t.levels.childs()[e].childs(),n=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.visible,f.format({title:a,index:e})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,i.color,null,y.format({title:a,index:e})),width:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.width,g.format({title:a,index:e}))},{id:`${r}LineLevel${e}`,title:`${e}`});c.push(n)}const z=(0,s.createPropertyDefinitionsLeveledLinesGroup)(c,`${r}LeveledLinesGroup`);e.push((0,s.createPropertyDefinitionsGeneralGroup)([z],`${r}LevelGroup`,$));const N=[],E=t.fanlines.childCount();for(let e=0;e<E;e++){const i=t.fanlines.childs()[e].childs(),n=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.visible,D.format({title:a,index:e})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,i.color,null,w.format({title:a,index:e})),width:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.width,m.format({title:a,
|
||||
index:e}))},{id:`${r}FanLineLevel${e}`,title:`${i.x.value()}x${i.y.value()}`});N.push(n)}const U=(0,s.createPropertyDefinitionsLeveledLinesGroup)(N,`${r}FanLeveledLinesGroup`);e.push((0,s.createPropertyDefinitionsGeneralGroup)([U],`${r}FanLinesGroup`,W));const O=[],G=t.arcs.childCount();for(let e=0;e<G;e++){const i=t.arcs.childs()[e].childs(),n=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.visible,S.format({title:a,index:e})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,i.color,null,b.format({title:a,index:e})),width:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.width,C.format({title:a,index:e}))},{id:`${r}ArcsLineLevel${e}`,title:`${i.x.value()}x${i.y.value()}`});O.push(n)}const F=(0,s.createPropertyDefinitionsLeveledLinesGroup)(O,`${r}ArcsLeveledLinesGroup`);e.push((0,s.createPropertyDefinitionsGeneralGroup)([F],`${r}ArcsLinesGroup`,B));const H=(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,new h.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,v.format({title:a})),null,null)},{id:`${r}AllLineColor`,title:A});e.push(H);const j=t.arcsBackground.childs(),Y=(0,s.createTransparencyPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,j.fillBackground,_.format({title:a})),transparency:(0,s.convertToDefinitionProperty)(this._propertyApplier,j.transparency,P.format({title:a}))},{id:`${r}Background`,title:k});e.push(Y);const X=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,t.reverse,T.format({title:a}))},{id:`${r}Reverse`,title:L});if(e.push(X),R(this._source)){const t=this._source,i=t.properties().childs(),n=(0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.scaleRatio,x,[(0,p.limitedPrecision)(7),e=>null!==e?parseFloat(t.getScaleRatioFormatter().format(e,{ignoreLocaleNumberFormat:!0,noExponentialForm:!0})):null])},{id:"scaleRatio",title:V,min:new d.WatchedValue(1e-7),max:new d.WatchedValue(1e8),step:new d.WatchedValue(t.getScaleRatioStep())});e.push(n);const r=i.labelsStyle.childs(),o=(0,l.createTextStyleDefinition)(this._propertyApplier,{showText:i.showLabels,fontSize:r.fontSize,bold:r.bold,italic:r.italic},a,{customTitles:{text:M}});e.push(o)}return{definitions:e}}}},52715:(e,t,i)=>{i.r(t),i.d(t,{GannFanDefinitionsViewModel:()=>D});var n=i(50151),r=i(11542),o=i(95804),l=i(95338),s=i(14472),a=i(91682),c=i(44005)
|
||||
;const d=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),p=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),u=new o.TranslatedString("change {title} level {index} line width",r.t(null,void 0,i(97870))),h=new o.TranslatedString("change {title} level {index} line style",r.t(null,void 0,i(64707))),f=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),y=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),g=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),v=new o.TranslatedString("change {title} labels visibility",r.t(null,void 0,i(93340))),_=r.t(null,void 0,i(28683)),P=r.t(null,void 0,i(79468)),T=r.t(null,void 0,i(5119));class D extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),r=(0,a.removeSpaces)(i),s=new o.TranslatedString(i,this._source.translatedType()),D=this._source.levelsCount();for(let i=1;i<=D;i++){const n=t[`level${i}`].childs(),o=(0,l.createLeveledLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.visible,d.format({title:s,index:i})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,n.color,null,p.format({title:s,index:i})),width:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.linewidth,u.format({title:s,index:i})),style:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.linestyle,h.format({title:s,index:i}))},{id:`${r}LineLevel${i}`,title:`${n.coeff1.value()}/${n.coeff2.value()}`});e.push(o)}const w=(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,new c.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,f.format({title:s}))},{id:`${r}AllLineColor`,title:_});e.push(w);const m=(0,l.createTransparencyPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,y.format({title:s})),transparency:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.transparency,g.format({title:s}))},{id:`${r}Background`,title:P});e.push(m);const S=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showLabels,v.format({title:s}))},{id:`${r}Labels`,title:T});return e.push(S),{definitions:e}}}},11033:(e,t,i)=>{i.r(t),i.d(t,{GannSquareDefinitionsViewModel:()=>$});var n=i(50151),r=i(11542),o=i(95804),l=i(95338),s=i(14472),a=i(91682),c=i(44005)
|
||||
;const d=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),p=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),u=new o.TranslatedString("change {title} level {index} line coeff",r.t(null,void 0,i(27154))),h=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),f=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),y=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),g=new o.TranslatedString("change {title} reverse",r.t(null,void 0,i(50762))),v=new o.TranslatedString("change {title} left labels visibility",r.t(null,void 0,i(63021))),_=new o.TranslatedString("change {title} right labels visibility",r.t(null,void 0,i(8390))),P=new o.TranslatedString("change {title} top labels visibility",r.t(null,void 0,i(81301))),T=new o.TranslatedString("change {title} bottom labels visibility",r.t(null,void 0,i(62130))),D=new o.TranslatedString("change {title} fans visibility",r.t(null,void 0,i(15972))),w=new o.TranslatedString("change {title} fans line color",r.t(null,void 0,i(1716))),m=r.t(null,void 0,i(28683)),S=r.t(null,void 0,i(79468)),b=r.t(null,void 0,i(58557)),C=r.t(null,void 0,i(58476)),x=r.t(null,void 0,i(65e3)),L=r.t(null,void 0,i(28971)),A=r.t(null,void 0,i(74939)),k=r.t(null,void 0,i(17129)),V=r.t(null,void 0,i(36335)),M=r.t(null,void 0,i(64489));class $ extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),r=(0,a.removeSpaces)(i),s=new o.TranslatedString(i,this._source.translatedType()),$=[],W=this._source.hLevelsCount();for(let e=1;e<=W;e++){const i=t[`hlevel${e}`].childs(),n=(0,l.createLeveledLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,i.visible,d.format({title:s,index:e})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,i.color,null,p.format({title:s,index:e})),level:(0,l.convertToDefinitionProperty)(this._propertyApplier,i.coeff,u.format({title:s,index:e}))},{id:`${r}HLineLevel${e}`});$.push(n)}const B=(0,l.createPropertyDefinitionsLeveledLinesGroup)($,`${r}HLeveledLinesGroup`),R=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showLeftLabels,v.format({title:s}))},{id:`${r}LeftLabels`,title:x}),I=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showRightLabels,_.format({title:s}))},{id:`${r}RightLabels`,title:L}),z=(0,l.createTransparencyPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.fillHorzBackground,f.format({title:s})),transparency:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.horzTransparency,y.format({title:s}))},{id:`${r}BackgroundH`,title:S}),N=(0,l.createPropertyDefinitionsGeneralGroup)([B,R,I,z],`${r}HLevelGroup`,b);e.push(N);const E=[],U=this._source.vLevelsCount();for(let e=1;e<=U;e++){
|
||||
const i=t[`vlevel${e}`].childs(),n=(0,l.createLeveledLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,i.visible,d.format({title:s,index:e})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,i.color,null,p.format({title:s,index:e})),level:(0,l.convertToDefinitionProperty)(this._propertyApplier,i.coeff,u.format({title:s,index:e}))},{id:`${r}VLineLevel${e}`});E.push(n)}const O=(0,l.createPropertyDefinitionsLeveledLinesGroup)(E,`${r}VLeveledLinesGroup`),G=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showTopLabels,P.format({title:s}))},{id:`${r}TopLabels`,title:A}),F=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.showBottomLabels,T.format({title:s}))},{id:`${r}BottomLabels`,title:k}),H=(0,l.createTransparencyPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.fillVertBackground,f.format({title:s})),transparency:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.vertTransparency,y.format({title:s}))},{id:`${r}BackgroundV`,title:S}),j=(0,l.createPropertyDefinitionsGeneralGroup)([O,G,F,H],`${r}VLevelGroup`,C);e.push(j);const Y=(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,new c.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,h.format({title:s}),!0)},{id:`${r}AllLineColor`,title:m});e.push(Y);const X=t.fans.childs(),q=(0,l.createColorPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,X.visible,D.format({title:s})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,X.color,null,w.format({title:s}))},{id:`${r}FansLines`,title:V});e.push(q);const K=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,t.reverse,g.format({title:s}))},{id:`${r}Reverse`,title:M});return e.push(K),{definitions:e}}}},83138:(e,t,i)=>{i.r(t),i.d(t,{GeneralBezierDefinitionsViewModel:()=>u});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682);const c=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),d=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),p=n.t(null,void 0,i(79468));class u extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle,extendLeft:e.extendLeft,extendRight:e.extendRight,leftEnd:e.leftEnd,rightEnd:e.rightEnd},i,"Line"),(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,e.fillBackground,c.format({title:i})),color:(0,s.getColorDefinitionProperty)(this._undoModel,e.backgroundColor,e.transparency,d.format({
|
||||
title:i}))},{id:(0,a.removeSpaces)(`${t}BackgroundColor`),title:p})]}}}},86763:(e,t,i)=>{i.r(t),i.d(t,{GeneralDatePriceRangeDefinitionsViewModel:()=>z});var n=i(11542),r=i(95804),o=i(67725),l=i(91445),s=i(14472),a=i(95338),c=i(91682);const d=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),p=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),u=new r.TranslatedString("change {title} extend top",n.t(null,void 0,i(30126))),h=new r.TranslatedString("change {title} extend bottom",n.t(null,void 0,i(59665))),f=new r.TranslatedString("change {title} extend left",n.t(null,void 0,i(35139))),y=new r.TranslatedString("change {title} price range visibility",n.t(null,void 0,i(63962))),g=new r.TranslatedString("change {title} percent change visibility",n.t(null,void 0,i(87246))),v=new r.TranslatedString("change {title} change in pips visibility",n.t(null,void 0,i(81340))),_=new r.TranslatedString("change {title} bars range visibility",n.t(null,void 0,i(98845))),P=new r.TranslatedString("change {title} date/time range visibility",n.t(null,void 0,i(37563))),T=new r.TranslatedString("change {title} volume visibility",n.t(null,void 0,i(36336))),D=n.t(null,void 0,i(3554)),w=n.t(null,void 0,i(38408)),m=n.t(null,void 0,i(79468)),S=n.t(null,void 0,i(71397)),b=n.t(null,void 0,i(76410)),C=n.t(null,void 0,i(25112)),x=n.t(null,void 0,i(68461)),L=n.t(null,void 0,i(42349)),A=n.t(null,void 0,i(26754)),k=n.t(null,void 0,i(89073)),V=n.t(null,void 0,i(62374)),M=n.t(null,void 0,i(37644)),$=n.t(null,void 0,i(62362)),W=n.t(null,void 0,i(73525)),B=n.t(null,void 0,i(4518)),R=n.t(null,void 0,i(74872)),I=n.t(null,void 0,i(16236));class z extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),s=this._source.name(),z=(0,c.removeSpaces)(s),N=new r.TranslatedString(s,this._source.translatedType()),E=(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:t.linecolor,lineWidth:t.linewidth},N,"Line",{line:D});e.push(E);const U=t.hasOwnProperty("borderWidth");if(U){const i=(0,o.createLineStyleDefinition)(this._propertyApplier,{showLine:t.drawBorder,lineColor:t.borderColor,lineWidth:t.borderWidth},N,"Border",{line:w});e.push(i)}const O=(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,d.format({title:N})),color:(0,a.getColorDefinitionProperty)(this._propertyApplier,t.backgroundColor,t.backgroundTransparency,p.format({title:N}))},{id:`${z}BackgroundColor`,title:m});e.push(O);const G=function(e){return e.hasOwnProperty("extendTop")}(t);if(G){const r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.extendTop,u.format({title:N}))},{id:`${z}ExtendTop`,title:S}),o=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.extendBottom,h.format({title:N}))},{id:`${z}ExtendBottom`,title:b});e.push((0,
|
||||
a.createPropertyDefinitionsCheckableListOptionsGroup)([r,o],void 0,[],"lineExtend",n.t(null,void 0,i(41410)),void 0,void 0,n.t(null,void 0,i(80736))))}const F=function(e){return e.hasOwnProperty("extendLeft")}(t);if(F){const r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.extendLeft,f.format({title:N}))},{id:`${z}ExtendLeft`,title:C}),o=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.extendRight,h.format({title:N}))},{id:`${z}ExtendRight`,title:x});e.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([r,o],void 0,[],"lineExtend",n.t(null,void 0,i(41410)),void 0,void 0,n.t(null,void 0,i(80736))))}const H=[];if(F||U){const e=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showPriceRange,y.format({title:N}))},{id:`${z}PriceRange`,title:$});H.push(e);const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showPercentPriceRange,g.format({title:N}))},{id:`${z}PercentChange`,title:W});H.push(i);const n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showPipsPriceRange,v.format({title:N}))},{id:`${z}PipsChange`,title:B});H.push(n)}if(G||U){const e=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showBarsRange,_.format({title:N}))},{id:`${z}BarsRange`,title:k});H.push(e);const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showDateTimeRange,P.format({title:N}))},{id:`${z}DateTimeRange`,title:V});H.push(i);const n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,t.showVolume,T.format({title:N}))},{id:`${z}ShowVolume`,title:M});H.push(n)}const j=[];j.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)(H,void 0,[],"datePriceRangeCheckableListGroup",A));const Y=(0,l.createTextStyleDefinition)(this._propertyApplier,{textColor:t.textcolor,backgroundColor:t.labelBackgroundColor,backgroundTransparency:t.backgroundTransparency,fontSize:t.fontsize,backgroundVisible:t.fillLabelBackground},N,{isEditable:!0,isMultiLine:!0,customTitles:{text:R,backgroundTitle:I}});return j.push(Y),e.push((0,a.createPropertyDefinitionsGeneralGroup)(j,`${z}InfoGroup`,L)),{definitions:e}}_textPropertyDefinitions(){const e=this._source.properties().childs().customText.childs();return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.color,fontSize:e.fontsize},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},27877:(e,t,i)=>{i.r(t),i.d(t,{GeneralFiguresDefinitionsViewModel:()=>f,GeneralFiguresDefinitionsViewModelBase:()=>h});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682)
|
||||
;const c=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),d=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),p=n.t(null,void 0,i(38408)),u=n.t(null,void 0,i(79468));class h extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType()),n=(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.color,lineWidth:e.linewidth,lineStyle:e.linestyle},i,"Line",{line:p}),l="transparency"in e?e.transparency:null;return{definitions:[n,(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,c.format({title:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,l,d.format({title:i}))},{id:(0,a.removeSpaces)(`${t}BackgroundColor`),title:u})]}}}class f extends h{}},96662:(e,t,i)=>{i.r(t),i.d(t,{GeneralTrendFiguresDefinitionsViewModel:()=>g});var n=i(11542),r=i(95804),o=i(67725),l=i(91445),s=i(14472),a=i(95338),c=i(50605),d=i(91682);const p=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),u=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),h=[{value:c.VerticalAlign.Bottom,title:n.t(null,void 0,i(97118))},{value:c.VerticalAlign.Middle,title:n.t(null,void 0,i(91612))},{value:c.VerticalAlign.Top,title:n.t(null,void 0,i(27567))}],f=n.t(null,void 0,i(29416)),y=n.t(null,void 0,i(79468));class g extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{...e,lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},i,"Line"),(0,l.createTextStyleDefinition)(this._propertyApplier,{showText:e.showPrices,textColor:e.textcolor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},i,{customTitles:{text:f}}),(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,p.format({title:i})),color:(0,a.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,e.transparency,u.format({title:i}))},{id:(0,d.removeSpaces)(`${t}Background`),title:y})]}}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{textColor:e.labelTextColor,text:e.labelText,bold:e.labelBold,italic:e.labelItalic,fontSize:e.labelFontSize,horzLabelsAlign:e.labelHorzAlign,vertLabelsAlign:e.labelVertAlign,showText:e.labelVisible},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,alignmentVerticalItems:h})]}}}},1486:(e,t,i)=>{i.r(t),i.d(t,{GhostFeedDefinitionsViewModel:()=>b});var n=i(11542),r=i(95804),o=i(14472),l=i(95338),s=i(22613),a=i(91682)
|
||||
;const c=new r.TranslatedString("change {title} candle up color",n.t(null,void 0,i(21631))),d=new r.TranslatedString("change {title} candle down color",n.t(null,void 0,i(80022))),p=new r.TranslatedString("change {title} candle border visibility",n.t(null,void 0,i(88530))),u=new r.TranslatedString("change {title} candle border up color",n.t(null,void 0,i(97345))),h=new r.TranslatedString("change {title} candle border down color",n.t(null,void 0,i(81139))),f=new r.TranslatedString("change {title} candle wick visibility",n.t(null,void 0,i(85382))),y=new r.TranslatedString("change {title} candle wick color",n.t(null,void 0,i(33589))),g=new r.TranslatedString("change {title} transparency",n.t(null,void 0,i(51085))),v=new r.TranslatedString("change {title} average HL value",n.t(null,void 0,i(39393))),_=new r.TranslatedString("change {title} variance value",n.t(null,void 0,i(23171))),P=n.t(null,void 0,i(45054)),T=n.t(null,void 0,i(333)),D=n.t(null,void 0,i(32163)),w=n.t(null,void 0,i(19788)),m=n.t(null,void 0,i(52648)),S=n.t(null,void 0,i(29566));class b extends o.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,a.removeSpaces)(t),n=new r.TranslatedString(t,this._source.translatedType()),o=e.candleStyle.childs();return{definitions:[(0,l.createTwoColorsPropertyDefinition)({color1:(0,l.getColorDefinitionProperty)(this._propertyApplier,o.upColor,null,c.format({title:n})),color2:(0,l.getColorDefinitionProperty)(this._propertyApplier,o.downColor,null,d.format({title:n}))},{id:`${i}Candle2Colors`,title:P}),(0,l.createTwoColorsPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,o.drawBorder,p.format({title:n})),color1:(0,l.getColorDefinitionProperty)(this._propertyApplier,o.borderUpColor,null,u.format({title:n})),color2:(0,l.getColorDefinitionProperty)(this._propertyApplier,o.borderDownColor,null,h.format({title:n}))},{id:`${i}CandleBorder2Colors`,title:T}),(0,l.createColorPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,o.drawWick,f.format({title:n})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,o.wickColor,null,y.format({title:n}))},{id:`${i}CandleWickColor`,title:D}),(0,l.createTransparencyPropertyDefinition)({transparency:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.transparency,g.format({title:n}))},{id:`${i}Transparency`,title:w})]}}_inputsPropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,a.removeSpaces)(t),n=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,l.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.averageHL,v.format({title:n}))},{id:`${i}AvgHL`,title:m,type:0,min:new s.WatchedValue(1),max:new s.WatchedValue(5e4),step:new s.WatchedValue(1)}),(0,l.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(this._propertyApplier,e.variance,_.format({title:n}))},{id:`${i}Variance`,title:S,type:0,
|
||||
min:new s.WatchedValue(1),max:new s.WatchedValue(100),step:new s.WatchedValue(1)})]}}}},32548:(e,t,i)=>{i.r(t),i.d(t,{HighlighterDefinitionsViewModel:()=>u});var n=i(11542),r=i(91682),o=i(95804),l=i(22613),s=i(95338),a=i(67725),c=i(14472);const d=new o.TranslatedString("change {title} width",n.t(null,void 0,i(60111))),p=[8,12,20,32,48,64,80,96].map((e=>({value:e,title:`${e.toString()}px`})));class u extends c.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),c=new o.TranslatedString(t,this._source.translatedType()),u=(0,r.removeSpaces)(t);return{definitions:[(0,a.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor},c,"Line"),(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.width,d.format({title:c}))},{id:`${u}Thickness`,title:n.t(null,void 0,i(54971)),options:new l.WatchedValue(p)})]}}_coordinatesPropertyDefinitions(){return null}}},1162:(e,t,i)=>{i.r(t),i.d(t,{HorizontalLineDefinitionsViewModel:()=>u});var n=i(11542),r=i(95804),o=i(95338),l=i(97578),s=i(91682),a=i(14472),c=i(90700),d=i(91445);const p=n.t(null,{context:"linetool point"},i(37814));class u extends a.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,c.getLinesStylesPropertiesDefinitions)(this._propertyApplier,e,new r.TranslatedString(this._source.name(),this._source.translatedType()))}_coordinatesPropertyDefinitions(){const e=this._source.pointsProperty().childs().points[0].childs(),t=this._getYCoordinateStepWV(),i=(0,l.getCoordinateYMetaInfo)(this._propertyApplier,e,t);return{definitions:[(0,o.createCoordinatesPropertyDefinition)({y:i.property},{id:(0,s.removeSpaces)(`${this._source.name()}Point`),title:p,...i.info})]}}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,d.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.textcolor,fontSize:e.fontsize,textOrientation:e.textOrientation},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},91509:(e,t,i)=>{i.r(t),i.d(t,{HorizontalRayDefinitionsViewModel:()=>s});var n=i(95804),r=i(14472),o=i(90700),l=i(91445);class s extends r.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,o.getLinesStylesPropertiesDefinitions)(this._propertyApplier,e,new n.TranslatedString(this._source.name(),this._source.translatedType()))}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.textcolor,fontSize:e.fontsize,textOrientation:e.textOrientation},new n.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},37120:(e,t,i)=>{i.r(t),i.d(t,{IconsDefinitionsViewModel:()=>d});var n=i(11542),r=i(95804),o=i(14472),l=i(95338),s=i(91682)
|
||||
;const a=new r.TranslatedString("change {title} color",n.t(null,void 0,i(49442))),c=n.t(null,void 0,i(47370));class d extends o.LineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t)}_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,l.createColorPropertyDefinition)({color:(0,l.getColorDefinitionProperty)(this._propertyApplier,e.color,null,a.format({title:i}))},{id:(0,s.removeSpaces)(`${t}Color`),title:c})]}}}},11375:(e,t,i)=>{i.r(t),i.d(t,{ImageDefinitionsViewModel:()=>y});var n=i(11542),r=i(95804),o=i(95338),l=i(14472),s=i(62414),a=i(43337);const c=new r.TranslatedString("change image",n.t(null,void 0,i(83842))),d=new r.TranslatedString("change image transparency",n.t(null,void 0,i(65309))),p=n.t(null,void 0,i(68065)),u=n.t(null,void 0,i(19788)),h=n.t(null,void 0,i(81169));function f(e){return null!==(0,s.buildAbsoluteUserImageUrl)(e)?"":h}class y extends l.LineDataSourceDefinitionsViewModel{destroy(){this._source.properties().childs().url.unsubscribeAll(this),super.destroy()}_stylePropertyDefinitions(){const e=this._source.properties().childs();if(void 0===this._customErrorProperty){const t=new a.Property(f(e.url.value()));this._customErrorProperty=t,e.url.subscribe(this,(e=>{t.setValue(f(e.value()))}))}return{definitions:[(0,o.createImagePropertyDefinition)({url:(0,o.convertToDefinitionProperty)(this._propertyApplier,this._source.absoluteUserImageUrl(),c),transparency:(0,o.convertToDefinitionProperty)(this._propertyApplier,e.transparency,d)},{id:"image",title:p}),(0,o.createTransparencyPropertyDefinition)({transparency:(0,o.convertToDefinitionProperty)(this._propertyApplier,e.transparency,d)},{id:"imageTransparency",title:u})]}}}},83904:(e,t,i)=>{i.r(t),i.d(t,{ParallelChannelDefinitionsViewModel:()=>C});var n=i(11542),r=i(50151),o=i(95804),l=i(95338),s=i(50605),a=i(14472),c=i(91445),d=i(91682),p=i(97578),u=i(60690);const h=new o.TranslatedString("change {title} extending left",n.t(null,void 0,i(58052))),f=new o.TranslatedString("change {title} extending right",n.t(null,void 0,i(74867))),y=new o.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),g=new o.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),v=[{value:s.VerticalAlign.Bottom,title:n.t(null,void 0,i(97118))},{value:s.VerticalAlign.Middle,title:n.t(null,void 0,i(91612))},{value:s.VerticalAlign.Top,title:n.t(null,void 0,i(27567))
|
||||
}],_=n.t(null,void 0,i(61856)),P=n.t(null,void 0,i(87430)),T=n.t(null,void 0,i(79468)),D=new o.TranslatedString("change {title} level {index} line visibility",n.t(null,void 0,i(51403))),w=new o.TranslatedString("change {title} level {index} line color",n.t(null,void 0,i(664))),m=new o.TranslatedString("change {title} level {index} line width",n.t(null,void 0,i(97870))),S=new o.TranslatedString("change {title} level {index} line style",n.t(null,void 0,i(64707))),b=new o.TranslatedString("change {title} level {index} line coeff",n.t(null,void 0,i(27154)));class C extends a.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties(),s=t.childs(),a=this._source.name(),c=(0,d.removeSpaces)(a),p=new o.TranslatedString(a,this._source.translatedType()),u=this._source.levelsCount();for(let i=1;i<=u;i++){const n=(0,r.ensureDefined)(t.child(`level${i}`)).childs(),o=(0,l.createLeveledLinePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.visible,D.format({title:p,index:i})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,n.color,null,w.format({title:p,index:i})),width:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.lineWidth,m.format({title:p,index:i})),style:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.lineStyle,S.format({title:p,index:i})),level:(0,l.convertToDefinitionProperty)(this._propertyApplier,n.coeff,b.format({title:p,index:i}))},{id:`${c}LineLevel${i}`,locked:2===i||6===i});e.push(o)}const v=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,s.extendLeft,h.format({title:p}))},{id:`${c}ExtendLeft`,title:_}),C=(0,l.createCheckablePropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,s.extendRight,f.format({title:p}))},{id:`${c}ExtendRight`,title:P});return e.push((0,l.createPropertyDefinitionsCheckableListOptionsGroup)([v,C],void 0,[],"lineExtend",n.t(null,void 0,i(41410)),void 0,void 0,n.t(null,void 0,i(80736)))),e.push((0,l.createColorPropertyDefinition)({checked:(0,l.convertToDefinitionProperty)(this._propertyApplier,s.fillBackground,y.format({title:p})),color:(0,l.getColorDefinitionProperty)(this._propertyApplier,s.backgroundColor,s.transparency,g.format({title:p}))},{id:`${c}Background`,title:T})),{definitions:e}}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,c.createTextStyleDefinition)(this._propertyApplier,{textColor:e.labelTextColor,text:e.labelText,bold:e.labelBold,italic:e.labelItalic,fontSize:e.labelFontSize,horzLabelsAlign:e.labelHorzAlign,vertLabelsAlign:e.labelVertAlign},new o.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,alignmentVerticalItems:v})]}}_coordinatesPropertyDefinitions(){const e=this._source.points().slice(0,2),t=this._source.pointsProperty().childs().points,r=[],s=this._getYCoordinateStepWV();return e.forEach(((e,i)=>{const n=t[i].childs();n&&r.push((0,
|
||||
p.getCoordinatesPropertiesDefinitions)(this._propertyApplier,n,e,s,a.pointPriceBarTitle.format({count:(i+1).toString()}),this._source.name()))})),r.push((0,u.createNumberPropertyDefinition)({value:(0,l.convertToDefinitionProperty)(this._propertyApplier,this._source.priceOffsetProperty(),new o.TranslatedString("Change price offset",n.t(null,void 0,i(9074))))},{id:"PriceOffset",title:"Price offset",type:1,step:s})),{definitions:r}}}},96375:(e,t,i)=>{i.r(t),i.d(t,{PathDefinitionsViewModel:()=>a});var n=i(11542),r=i(95804),o=i(67725),l=i(14472);const s=n.t(null,void 0,i(3554));class a extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.lineColor,lineWidth:e.lineWidth,lineStyle:e.lineStyle,leftEnd:e.leftEnd,rightEnd:e.rightEnd},new r.TranslatedString(this._source.name(),this._source.translatedType()),"Line",{line:s})]}}_coordinatesPropertyDefinitions(){return null}}},29809:(e,t,i)=>{i.r(t),i.d(t,{PatternWithBackgroundDefinitionViewModel:()=>y});var n=i(11542),r=i(95804),o=i(67725),l=i(91445),s=i(14472),a=i(95338),c=i(91682);const d=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),p=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),u=n.t(null,void 0,i(74872)),h=n.t(null,void 0,i(38408)),f=n.t(null,void 0,i(79468));class y extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{textColor:e.textcolor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},i,{isEditable:!0,isMultiLine:!0,customTitles:{text:u}}),(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.color,lineWidth:e.linewidth},i,"Line",{line:h}),(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,d.format({title:i})),color:(0,a.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,e.transparency,p.format({title:i}))},{id:(0,c.removeSpaces)(`${t}BackgroundColor`),title:f})]}}}},52536:(e,t,i)=>{i.r(t),i.d(t,{PatternWithoutBackgroundDefinitionsViewModel:()=>d});var n=i(11542),r=i(95804),o=i(67725),l=i(91445),s=i(14472);const a=n.t(null,void 0,i(74872)),c=n.t(null,void 0,i(38408));class d extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=new r.TranslatedString(this._source.name(),this._source.translatedType());return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{textColor:e.textcolor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},t,{isEditable:!0,isMultiLine:!0,customTitles:{text:a}}),(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.color,lineWidth:e.linewidth},t,"Line",{line:c})]}}}},71530:(e,t,i)=>{i.r(t),i.d(t,{
|
||||
PitchForkDefinitionsViewModel:()=>u});var n=i(11542),r=i(95804),o=i(95338),l=i(87997),s=i(36947),a=i(22613);const c=new r.TranslatedString("change {title} style",n.t(null,void 0,i(98463))),d=n.t(null,void 0,i(92516)),p=[{value:s.LineToolPitchforkStyle.Original,title:n.t(null,void 0,i(46005))},{value:s.LineToolPitchforkStyle.Schiff2,title:n.t(null,void 0,i(69904))},{value:s.LineToolPitchforkStyle.Schiff,title:n.t(null,void 0,i(70382))},{value:s.LineToolPitchforkStyle.Inside,title:n.t(null,void 0,i(91612))}];class u extends l.PitchBaseDefinitionsViewModel{_stylePropertyDefinitions(){const e=super._stylePropertyDefinitions(),t=this._source.properties().childs(),i=this._source.name(),n=new r.TranslatedString(i,this._source.translatedType()),l=(0,o.createOptionsPropertyDefinition)({option:(0,o.convertToDefinitionProperty)(this._propertyApplier,t.style,c.format({title:n}))},{id:`${i}PitchStyle`,title:d,options:new a.WatchedValue(p)});return e.definitions.push(l),e}}},78946:(e,t,i)=>{i.r(t),i.d(t,{PolylinesDefinitionsViewModel:()=>h});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682);const c=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),d=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),p=n.t(null,void 0,i(38408)),u=n.t(null,void 0,i(79468));class h extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth},i,"Line",{line:p}),(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,c.format({title:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,e.transparency,d.format({title:i}))},{id:(0,a.removeSpaces)(`${t}BackgroundColor`),title:u})]}}_coordinatesPropertyDefinitions(){return null}}},24457:(e,t,i)=>{i.r(t),i.d(t,{PredictionDefinitionsViewModel:()=>A});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682)
|
||||
;const c=new r.TranslatedString("change {title} source text color",n.t(null,void 0,i(45833))),d=new r.TranslatedString("change {title} source background color",n.t(null,void 0,i(63047))),p=new r.TranslatedString("change {title} source border color",n.t(null,void 0,i(93889))),u=new r.TranslatedString("change {title} target text color",n.t(null,void 0,i(32230))),h=new r.TranslatedString("change {title} target background color",n.t(null,void 0,i(25987))),f=new r.TranslatedString("change {title} target border color",n.t(null,void 0,i(24138))),y=new r.TranslatedString("change {title} success text color",n.t(null,void 0,i(71715))),g=new r.TranslatedString("change {title} success background color",n.t(null,void 0,i(80428))),v=new r.TranslatedString("change {title} failure text color",n.t(null,void 0,i(58406))),_=new r.TranslatedString("change {title} failure background color",n.t(null,void 0,i(91321))),P=n.t(null,void 0,i(88479)),T=n.t(null,void 0,i(14279)),D=n.t(null,void 0,i(64598)),w=n.t(null,void 0,i(59264)),m=n.t(null,void 0,i(95631)),S=n.t(null,void 0,i(79622)),b=n.t(null,void 0,i(23971)),C=n.t(null,void 0,i(90431)),x=n.t(null,void 0,i(71525)),L=n.t(null,void 0,i(28357));class A extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,a.removeSpaces)(t),n=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth},n,"Line"),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.sourceTextColor,null,c.format({title:n}))},{id:`${i}SourceTextColor`,title:P}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.sourceBackColor,e.transparency,d.format({title:n}))},{id:`${i}SourceBackgroundColor`,title:T}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.sourceStrokeColor,null,p.format({title:n}))},{id:`${i}SourceBorderColor`,title:D}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.targetTextColor,null,u.format({title:n}))},{id:`${i}TargetTextColor`,title:w}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.targetBackColor,null,h.format({title:n}))},{id:`${i}TargetBackgroundColor`,title:m}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.targetStrokeColor,null,f.format({title:n}))},{id:`${i}TargetBorderColor`,title:S}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.successTextColor,null,y.format({title:n}))},{id:`${i}SuccessTextColor`,title:b}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.successBackground,null,g.format({title:n}))},{id:`${i}SuccessBackgroundColor`,title:C}),(0,s.createColorPropertyDefinition)({color:(0,
|
||||
s.getColorDefinitionProperty)(this._propertyApplier,e.failureTextColor,null,v.format({title:n}))},{id:`${i}FailureTextColor`,title:x}),(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.failureBackground,null,_.format({title:n}))},{id:`${i}FailureBackgroundColor`,title:L})]}}}},4116:(e,t,i)=>{i.r(t),i.d(t,{PriceLabelDefinitionsViewModel:()=>a});var n=i(11542),r=i(95804),o=i(91445),l=i(14472);const s=n.t(null,void 0,i(70320));class a extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,o.createTextStyleDefinition)(this._propertyApplier,{textColor:e.color,fontSize:e.fontsize,backgroundColor:e.backgroundColor,backgroundTransparency:e.transparency,borderColor:e.borderColor},new r.TranslatedString(this._source.name(),this._source.translatedType()),{customTitles:{text:s}})]}}}},67291:(e,t,i)=>{i.r(t),i.d(t,{ProjectionDefinitionsViewModel:()=>h});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682);const c=new r.TranslatedString("change {title} background color 1",n.t(null,void 0,i(2788))),d=new r.TranslatedString("change {title} background color 2",n.t(null,void 0,i(47108))),p=n.t(null,void 0,i(38408)),u=n.t(null,void 0,i(79468));class h extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.color1,e.transparency,c.format({title:i})),color2:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.color2,e.transparency,d.format({title:i}))},{id:(0,a.removeSpaces)(`${t}Background2Color`),title:u}),(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.trendline.childs().color,lineWidth:e.linewidth},i,"Line",{line:p})]}}}},9833:(e,t,i)=>{i.r(t),i.d(t,{RectangleDefinitionsViewModel:()=>v});var n=i(11542),r=i(95804),o=i(91682),l=i(50605),s=i(95338),a=i(67725),c=i(27877),d=i(91445);const p=new r.TranslatedString("change {title} extending left",n.t(null,void 0,i(58052))),u=new r.TranslatedString("change {title} extending right",n.t(null,void 0,i(74867))),h=n.t(null,void 0,i(25112)),f=n.t(null,void 0,i(68461)),y=n.t(null,void 0,i(68286)),g=[{value:l.VerticalAlign.Bottom,title:n.t(null,void 0,i(97118))},{value:l.VerticalAlign.Middle,title:n.t(null,void 0,i(91612))},{value:l.VerticalAlign.Top,title:n.t(null,void 0,i(27567))}];class v extends c.GeneralFiguresDefinitionsViewModelBase{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),l=new r.TranslatedString(t,this._source.translatedType()),c=super._stylePropertyDefinitions(),d=e.middleLine.childs(),g=(0,a.createLineStyleDefinition)(this._propertyApplier,{showLine:d.showLine,lineColor:d.lineColor,lineWidth:d.lineWidth,lineStyle:d.lineStyle},l,t,{line:y}),v=c.definitions.findIndex((e=>e.id===(0,
|
||||
o.removeSpaces)(`${t}BackgroundColor`)));v<0?c.definitions.push(g):c.definitions.splice(v,0,g);const _=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.extendLeft,p.format({title:l}))},{id:`${t}ExtendLeft`,title:h}),P=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.extendRight,u.format({title:l}))},{id:`${t}ExtendRight`,title:f});return c.definitions.unshift((0,s.createPropertyDefinitionsCheckableListOptionsGroup)([_,P],void 0,[],"lineExtend",n.t(null,void 0,i(41410)),void 0,void 0,n.t(null,void 0,i(80736)))),c}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,d.createTextStyleDefinition)(this._propertyApplier,{textColor:e.textColor,text:e.text,bold:e.bold,italic:e.italic,fontSize:e.fontSize,horzLabelsAlign:e.horzLabelsAlign,vertLabelsAlign:e.vertLabelsAlign},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0,alignmentVerticalItems:g})]}}}},29065:(e,t,i)=>{i.r(t),i.d(t,{RiskRewardDefinitionsViewModel:()=>F});var n=i(91682),r=i(11542),o=i(95804),l=i(67725),s=i(91445),a=i(14472),c=i(95338),d=i(11810),p=i(22613);const u=new o.TranslatedString("change {title} stop color",r.t(null,void 0,i(26598))),h=new o.TranslatedString("change {title} target color",r.t(null,void 0,i(10504))),f=new o.TranslatedString("change {title} price labels visibility",r.t(null,void 0,i(343))),y=new o.TranslatedString("change {title} compact stats mode",r.t(null,void 0,i(49904))),g=new o.TranslatedString("change {title} always show stats",r.t(null,void 0,i(80390))),v=new o.TranslatedString("change {title} account size",r.t(null,void 0,i(99232))),_=(new o.TranslatedString("change {title} currency",r.t(null,void 0,i(91600))),new o.TranslatedString("change {title} lot size",r.t(null,void 0,i(54087)))),P=new o.TranslatedString("change {title} risk",r.t(null,void 0,i(79875))),T=new o.TranslatedString("change {title} risk display mode",r.t(null,void 0,i(60308))),D=new o.TranslatedString("change {title} entry price",r.t(null,void 0,i(91534))),w=new o.TranslatedString("change {title} profit level",r.t(null,void 0,i(64330))),m=new o.TranslatedString("change {title} profit price",r.t(null,void 0,i(12073))),S=new o.TranslatedString("change {title} stop level",r.t(null,void 0,i(45438))),b=new o.TranslatedString("change {title} stop price",r.t(null,void 0,i(27503))),C=r.t(null,void 0,i(56982)),x=r.t(null,void 0,i(33310)),L=r.t(null,void 0,i(3560)),A=r.t(null,void 0,i(70320)),k=r.t(null,void 0,i(89735)),V=r.t(null,void 0,i(24821)),M=r.t(null,void 0,i(83840)),$=r.t(null,void 0,i(6002)),W=r.t(null,void 0,i(67852)),B=r.t(null,void 0,i(23814)),R=r.t(null,void 0,i(97668)),I=r.t(null,void 0,i(74045)),z=r.t(null,void 0,i(63886)),N=r.t(null,void 0,i(93857)),E=r.t(null,void 0,i(42747)),U=r.t(null,void 0,i(75106)),O=r.t(null,void 0,i(87145));function G(e){return[{value:d.RiskDisplayMode.Percentage,title:U},{value:d.RiskDisplayMode.Money,title:e||O}]}
|
||||
class F extends a.LineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t);const i=this._source.properties().childs(),n=i.riskDisplayMode.value();this._riskMaxWV=new p.WatchedValue(this._getRiskMax(n)),this._riskStepWV=new p.WatchedValue(this._getRiskStep(n)),this._riskPrecisionWV=new p.WatchedValue(this._getRiskPrecision(n)),this._riskUnitWV=new p.WatchedValue(this._getRiskUnit()),this._riskUnitOptionsWV=new p.WatchedValue(this._getRiskUnitOptions()),this._lotSizeStepWV=new p.WatchedValue(this._getLotSizeStep()),this._createPropertyRages(),i.riskDisplayMode.subscribe(this,(e=>this._onRiskDisplayChanged(e))),i.accountSize.subscribe(this,(()=>this._onAccountSizeChanged())),i.lotSize.subscribe(this,(()=>this._onLotSizeChanged())),i.currency.subscribe(this,(()=>this._updateRiskUnit())),this._undoModel.model().mainSeries().dataEvents().symbolResolved().subscribe(this,this._updateRiskUnit)}destroy(){super.destroy();const e=this._source.properties().childs();e.riskDisplayMode.unsubscribeAll(this),e.accountSize.unsubscribeAll(this),e.lotSize.unsubscribeAll(this),this._undoModel.model().mainSeries().dataEvents().symbolResolved().unsubscribeAll(this)}_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,n.removeSpaces)(t),r=new o.TranslatedString(t,this._source.translatedType());return{definitions:[(0,l.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth},r,"Line",{line:C}),(0,c.createColorPropertyDefinition)({color:(0,c.getColorDefinitionProperty)(this._propertyApplier,e.stopBackground,e.stopBackgroundTransparency,u.format({title:r}))},{id:`${i}StopColor`,title:x}),(0,c.createColorPropertyDefinition)({color:(0,c.getColorDefinitionProperty)(this._propertyApplier,e.profitBackground,e.profitBackgroundTransparency,h.format({title:r}))},{id:`${i}ProfitColor`,title:L}),(0,s.createTextStyleDefinition)(this._propertyApplier,{textColor:e.textcolor,fontSize:e.fontsize},r,{isEditable:!0,isMultiLine:!0,customTitles:{text:A}}),(0,c.createCheckablePropertyDefinition)({checked:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.showPriceLabels,f.format({title:r}))},{id:`${i}ShowPriceLabels`,title:E}),(0,c.createCheckablePropertyDefinition)({checked:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.compact,y.format({title:r}))},{id:`${i}CompactMode`,title:k}),(0,c.createCheckablePropertyDefinition)({checked:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.alwaysShowStats,g.format({title:r}))},{id:`${i}AlwaysShowStats`,title:N})]}}_inputsPropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,n.removeSpaces)(t),r=new o.TranslatedString(t,this._source.translatedType()),l=this._getYCoordinateStepWV();let s;s=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.accountSize,v.format({title:r}))},{id:`${i}AccountSize`,title:R,type:1,min:new p.WatchedValue(1e-9),max:new p.WatchedValue(1e9),step:new p.WatchedValue(1),unit:this._riskUnitWV});const a=(0,
|
||||
c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.lotSize,_.format({title:r}))},{id:`${i}LotSize`,title:I,type:1,min:new p.WatchedValue(1e-9),max:new p.WatchedValue(1e8),step:this._lotSizeStepWV}),d=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.risk,P.format({title:r}),[e=>parseFloat(e)]),unitOptionsValue:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.riskDisplayMode,T.format({title:r}))},{id:`${i}Risk`,title:z,type:1,min:new p.WatchedValue(1e-9),max:this._riskMaxWV,precision:this._riskPrecisionWV,step:this._riskStepWV,unitOptions:this._riskUnitOptionsWV}),u=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.entryPrice,D.format({title:r}))},{id:`${i}EntryPrice`,title:$,type:1,step:l}),h=(0,c.createPropertyDefinitionsGeneralGroup)([s,a,d,u],`${i}AccountRisk`),f=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.profitLevel,w.format({title:r}))},{id:`${i}ProfitLevelTicks`,title:V,type:0,min:new p.WatchedValue(0),max:new p.WatchedValue(1e9),step:new p.WatchedValue(1)}),y=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.targetPrice,m.format({title:r}),[e=>e,e=>this._source.prepareProfitPrice(e)])},{id:`${i}ProfitLevelPrice`,title:M,type:1,step:l}),g=(0,c.createPropertyDefinitionsGeneralGroup)([f,y],`${i}ProfitLevel`,W),C=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.stopLevel,S.format({title:r}))},{id:`${i}StopLevelTicks`,title:V,type:0,min:new p.WatchedValue(0),max:new p.WatchedValue(1e9),step:new p.WatchedValue(1)}),x=(0,c.createNumberPropertyDefinition)({value:(0,c.convertToDefinitionProperty)(this._propertyApplier,e.stopPrice,b.format({title:r}),[e=>e,e=>this._source.prepareStopPrice(e)])},{id:`${i}StopLevelPrice`,title:M,type:1,step:l});return{definitions:[h,g,(0,c.createPropertyDefinitionsGeneralGroup)([C,x],`${i}StopLevel`,B)]}}_coordinatesPropertyDefinitions(){return null}_onRiskDisplayChanged(e){const t=e.value();this._riskMaxWV.setValue(this._getRiskMax(t)),this._riskStepWV.setValue(this._getRiskStep(t)),this._riskPrecisionWV.setValue(this._getRiskPrecision(t))}_onAccountSizeChanged(){this._riskMaxWV.setValue(this._getRiskMax(this._source.properties().childs().riskDisplayMode.value()))}_onLotSizeChanged(){this._lotSizeStepWV.setValue(this._getLotSizeStep())}_updateRiskUnit(){this._riskUnitWV.setValue(this._getRiskUnit()),this._riskUnitOptionsWV.setValue(this._getRiskUnitOptions())}_getRiskMax(e){return e===d.RiskDisplayMode.Percentage?100:this._source.properties().childs().accountSize.value()}_getRiskStep(e){return e===d.RiskDisplayMode.Percentage?.01:1}_getRiskPrecision(e){if(e===d.RiskDisplayMode.Percentage)return 2}_getLotSizeStep(){const e=this._source.properties().childs().lotSize.value();if(e%1==0)return 1;const t=e.toString(),i=t.split(".")
|
||||
;if(2===i.length)return Number(`1e-${i[1].length}`);{const e=/\d+e-(\d+)/.exec(t);if(null!==e)return Number(`1e-${e[1]}`)}return this._lotSizeStepWV.value()}_getRiskUnit(){const e=this._undoModel.model().mainSeries().symbolInfo();return null!==e&&e.currency_code||""}_getRiskUnitOptions(){const e=this._undoModel.model().mainSeries().symbolInfo();return null!==e?G(e.currency_code):G()}}},76399:(e,t,i)=>{i.r(t),i.d(t,{SignpostDefinitionsViewModel:()=>v});var n=i(11542),r=i(95804),o=i(91682),l=i(22613),s=i(95338),a=i(91445),c=i(97578),d=i(14472);const p=new r.TranslatedString("change vertical position Y coordinate",n.t(null,void 0,i(69183))),u=new r.TranslatedString("change {title} emoji visibility",n.t(null,void 0,i(53274))),h=new r.TranslatedString("change {title} image background color",n.t(null,void 0,i(86993))),f=new r.TranslatedString("change {title} emoji",n.t(null,void 0,i(73247))),y=n.t(null,{context:"linetool point"},i(87476)),g=n.t(null,void 0,i(71310));class v extends d.LineDataSourceDefinitionsViewModel{_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,a.createTextStyleDefinition)(this._propertyApplier,{text:e.text,fontSize:e.fontSize,bold:e.bold,italic:e.italic},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}_coordinatesPropertyDefinitions(){const e=this._source.pointsProperty().childs().points[0].childs(),t=this._source.name(),i=(0,c.getCoordinateXMetaInfo)(this._propertyApplier,e),n={property:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.price,p),info:{typeY:1,stepY:new l.WatchedValue(1),minY:new l.WatchedValue(-100),maxY:new l.WatchedValue(100)}};return{definitions:[(0,s.createCoordinatesPropertyDefinition)({x:i.property,y:n.property},{id:(0,o.removeSpaces)(`${t}Coordinates${y}`),title:y,...i.info,...n.info})]}}_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,s.createEmojiPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.showImage,u.format({title:i})),backgroundColor:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.plateColor,null,h.format({title:i})),emoji:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.emoji,f.format({title:i}))},{id:(0,o.removeSpaces)(`${t}Emoji${g}`),title:g})]}}}},13677:(e,t,i)=>{i.r(t),i.d(t,{TextDefinitionsViewModel:()=>l});var n=i(91445),r=i(14472),o=i(95804);class l extends r.LineDataSourceDefinitionsViewModel{_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,n.createTextStyleDefinition)(this._propertyApplier,{textColor:e.color,fontSize:e.fontsize,bold:e.bold,italic:e.italic,text:e.text,backgroundVisible:e.fillBackground,backgroundColor:e.backgroundColor,backgroundTransparency:e.backgroundTransparency,borderVisible:e.drawBorder,borderColor:e.borderColor,wrap:e.wordWrap},new o.TranslatedString(this._source.name(),this._source.translatedType()),{
|
||||
isEditable:!0,isMultiLine:!0})]}}}},39334:(e,t,i)=>{i.r(t),i.d(t,{TimeCyclesPatternDefinitionsViewModel:()=>h});var n=i(11542),r=i(95804),o=i(67725),l=i(14472),s=i(95338),a=i(91682);const c=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),d=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),p=n.t(null,void 0,i(3554)),u=n.t(null,void 0,i(79468));class h extends l.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=new r.TranslatedString(t,this._source.translatedType());return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},i,"Line",{line:p}),(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,e.fillBackground,c.format({title:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,e.backgroundColor,e.transparency,d.format({title:i}))},{id:(0,a.removeSpaces)(`${t}BackgroundColor`),title:u})]}}}},58227:(e,t,i)=>{i.r(t),i.d(t,{TrendAngleDefinitionsViewModel:()=>f});var n=i(11542),r=i(95804),o=i(95338),l=i(14472),s=i(22613),a=i(97578),c=i(67621);const d=new r.TranslatedString("change angle",n.t(null,void 0,i(3894))),p=n.t(null,void 0,i(390)),u=n.t(null,void 0,i(70320)),h=n.t(null,{context:"linetool point"},i(6737));class f extends l.LineDataSourceDefinitionsViewModel{_coordinatesPropertyDefinitions(){const e=this._source.points(),t=[],i=this._source.pointsProperty().childs().points[0].childs(),n=this._getYCoordinateStepWV();t.push((0,a.getCoordinatesPropertiesDefinitions)(this._propertyApplier,i,e[0],n,h,this._source.name()));const r=(0,o.createNumberPropertyDefinition)({value:(0,o.convertToDefinitionProperty)(this._propertyApplier,this._source.properties().childs().angle,d)},{id:"TrendLineAngleCoordinate",title:p,min:new s.WatchedValue(-360),max:new s.WatchedValue(360),step:new s.WatchedValue(1)});return t.push(r),{definitions:t}}_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,c.getTrendLineToolsStylePropertiesDefinitions)(this._propertyApplier,e,new r.TranslatedString(this._source.name(),this._source.translatedType()),{text:u})}}},85134:(e,t,i)=>{i.r(t),i.d(t,{TrendBasedFibTimeDefinitionsViewModel:()=>x});var n=i(50151),r=i(11542),o=i(95804),l=i(67725),s=i(95338),a=i(14472),c=i(56689),d=i(22613),p=i(91682),u=i(44005)
|
||||
;const h=new o.TranslatedString("change {title} level {index} line visibility",r.t(null,void 0,i(51403))),f=new o.TranslatedString("change {title} level {index} line color",r.t(null,void 0,i(664))),y=new o.TranslatedString("change {title} level {index} line width",r.t(null,void 0,i(97870))),g=new o.TranslatedString("change {title} level {index} line style",r.t(null,void 0,i(64707))),v=new o.TranslatedString("change {title} level {index} line coeff",r.t(null,void 0,i(27154))),_=new o.TranslatedString("change {title} all lines color",r.t(null,void 0,i(59577))),P=new o.TranslatedString("change {title} background visibility",r.t(null,void 0,i(30839))),T=new o.TranslatedString("change {title} background transparency",r.t(null,void 0,i(13783))),D=new o.TranslatedString("change {title} labels visibility",r.t(null,void 0,i(93340))),w=new o.TranslatedString("change {title} labels alignment",r.t(null,void 0,i(58312))),m=r.t(null,void 0,i(51574)),S=r.t(null,void 0,i(28683)),b=r.t(null,void 0,i(79468)),C=r.t(null,void 0,i(5119));class x extends a.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties(),i=t.childs(),r=this._source.name(),a=(0,p.removeSpaces)(r),x=new o.TranslatedString(r,this._source.translatedType()),L=i.trendline.childs(),A=(0,l.createLineStyleDefinition)(this._propertyApplier,{showLine:L.visible,lineColor:L.color,lineStyle:L.linestyle,lineWidth:L.linewidth},x,"TrendLine",{line:m});e.push(A);const k=this._source.levelsCount();for(let i=1;i<=k;i++){const r=(0,n.ensureDefined)(t.child(`level${i}`)).childs(),o=(0,s.createLeveledLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,r.visible,h.format({title:x,index:i})),color:(0,s.getColorDefinitionProperty)(this._propertyApplier,r.color,null,f.format({title:x,index:i})),width:(0,s.convertToDefinitionProperty)(this._propertyApplier,r.linewidth,y.format({title:x,index:i})),style:(0,s.convertToDefinitionProperty)(this._propertyApplier,r.linestyle,g.format({title:x,index:i})),level:(0,s.convertToDefinitionProperty)(this._propertyApplier,r.coeff,v.format({title:x,index:i}))},{id:`${a}LineLevel${i}`});e.push(o)}const V=(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._propertyApplier,new u.CollectibleColorPropertyUndoWrapper((0,n.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,_.format({title:x}),!0)},{id:`${a}AllLineColor`,title:S});e.push(V);const M=(0,s.createTransparencyPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.fillBackground,P.format({title:x})),transparency:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.transparency,T.format({title:x}))},{id:`${a}Background`,title:b});e.push(M);const $=(0,s.createTwoOptionsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.showCoeffs,D.format({title:x})),option1:(0,s.convertToDefinitionProperty)(this._propertyApplier,i.horzLabelsAlign,w.format({title:x})),option2:(0,
|
||||
s.convertToDefinitionProperty)(this._propertyApplier,i.vertLabelsAlign,w.format({title:x}))},{id:`${a}Labels`,title:C,optionsItems1:new d.WatchedValue(c.availableAlignmentHorizontalItems),optionsItems2:new d.WatchedValue(c.availableAlignmentVerticalItems)});return e.push($),{definitions:e}}}},71192:(e,t,i)=>{i.r(t),i.d(t,{TrendLineDefinitionsViewModel:()=>s});var n=i(95804),r=i(14472),o=i(67621),l=i(91445);class s extends r.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,o.getTrendLineToolsStylePropertiesDefinitions)(this._propertyApplier,e,new n.TranslatedString(this._source.name(),this._source.translatedType()))}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,l.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.textcolor,fontSize:e.fontsize},new n.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},50105:(e,t,i)=>{i.r(t),i.d(t,{VerticalLineDefinitionsViewModel:()=>u});var n=i(11542),r=i(95804),o=i(95338),l=i(97578),s=i(90700),a=i(91682),c=i(14472),d=i(91445);const p=n.t(null,{context:"linetool point"},i(26381));class u extends c.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return(0,s.getLinesStylesPropertiesDefinitions)(this._propertyApplier,e,new r.TranslatedString(this._source.name(),this._source.translatedType()))}_coordinatesPropertyDefinitions(){const e=this._source.pointsProperty().childs().points[0].childs(),t=(0,l.getCoordinateXMetaInfo)(this._propertyApplier,e);return{definitions:[(0,o.createCoordinatesPropertyDefinition)({x:t.property},{id:(0,a.removeSpaces)(`${this._source.name()}Point1`),title:p,...t.info})]}}_textPropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,d.createTextStyleDefinition)(this._propertyApplier,{...e,textColor:e.textcolor,fontSize:e.fontsize,textOrientation:e.textOrientation},new r.TranslatedString(this._source.name(),this._source.translatedType()),{isEditable:!0,isMultiLine:!0})]}}}},7750:(e,t,i)=>{i.r(t),i.d(t,{AnchoredVWAPDefinitionsViewModel:()=>O});var n=i(11542),r=i(95804),o=(i(40167),i(95338)),l=i(34108),s=i(91682),a=i(57058)
|
||||
;const c=new r.TranslatedString("change {title} VWAP line color",n.t(null,void 0,i(83030))),d=new r.TranslatedString("change {title} VWAP line width",n.t(null,void 0,i(47479))),p=new r.TranslatedString("change {title} lower band #1 line visibility",n.t(null,void 0,i(87716))),u=new r.TranslatedString("change {title} lower band #1 line color",n.t(null,void 0,i(67450))),h=new r.TranslatedString("change {title} lower band #1 line width",n.t(null,void 0,i(43181))),f=new r.TranslatedString("change {title} upper band #1 line visibility",n.t(null,void 0,i(44828))),y=new r.TranslatedString("change {title} upper band #1 line color",n.t(null,void 0,i(27326))),g=new r.TranslatedString("change {title} upper band #1 line width",n.t(null,void 0,i(1353))),v=new r.TranslatedString("change {title} lower band #2 line visibility",n.t(null,void 0,i(94308))),_=new r.TranslatedString("change {title} lower band #2 line color",n.t(null,void 0,i(35092))),P=new r.TranslatedString("change {title} lower band #2 line width",n.t(null,void 0,i(8873))),T=new r.TranslatedString("change {title} upper band #2 line visibility",n.t(null,void 0,i(93075))),D=new r.TranslatedString("change {title} upper band #2 line color",n.t(null,void 0,i(42905))),w=new r.TranslatedString("change {title} upper band #2 line width",n.t(null,void 0,i(7943))),m=new r.TranslatedString("change {title} lower band #3 line visibility",n.t(null,void 0,i(32442))),S=new r.TranslatedString("change {title} lower band #3 line color",n.t(null,void 0,i(68180))),b=new r.TranslatedString("change {title} lower band #3 line width",n.t(null,void 0,i(3476))),C=new r.TranslatedString("change {title} upper band #3 line visibility",n.t(null,void 0,i(15698))),x=new r.TranslatedString("change {title} upper band #3 line color",n.t(null,void 0,i(51780))),L=new r.TranslatedString("change {title} upper band #3 line width",n.t(null,void 0,i(27414))),A=new r.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),k=new r.TranslatedString("change {title} background color",n.t(null,void 0,i(49765))),V=new r.TranslatedString("change {title} price visibility",n.t(null,void 0,i(727))),M=n.t(null,void 0,i(5682)),$=n.t(null,void 0,i(71571)),W=n.t(null,void 0,i(21315)),B=n.t(null,void 0,i(91889)),R=n.t(null,void 0,i(65448)),I=n.t(null,void 0,i(83301)),z=n.t(null,void 0,i(64848)),N=n.t(null,void 0,i(58375)),E=n.t(null,void 0,i(97273));function U(e,t,i,n,r,l,s,c,d){return(0,o.createLinePropertyDefinition)({checked:(0,o.convertToDefinitionProperty)(e,new a.StudyPlotVisibleProperty(t.display),i.format({title:d})),color:(0,o.getColorDefinitionProperty)(e,t.color,t.transparency??null,n.format({title:d})),width:(0,o.convertToDefinitionProperty)(e,t.linewidth,r.format({title:d}))},{id:`${c}${s}`,title:l})}class O extends l.StudyLineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t)}_stylePropertyDefinitions(){const e=this._source.properties().childs(),t=this._source.name(),i=(0,
|
||||
s.removeSpaces)(t),n=new r.TranslatedString(t,this._source.translatedType()),l=e.styles.childs().VWAP.childs(),a=[(0,o.createLinePropertyDefinition)({color:(0,o.getColorDefinitionProperty)(this._propertyApplier,l.color,l.transparency??null,c.format({title:n})),width:(0,o.convertToDefinitionProperty)(this._propertyApplier,l.linewidth,d.format({title:n}))},{id:`${i}VWAPLine`,title:M})],O=this._source.metaInfo();if(O.styles?.UpperBand&&O.styles?.LowerBand){const t=e.styles.childs().LowerBand.childs(),r=U(this._propertyApplier,t,p,u,h,$,"LowerBandLine",i,n),o=e.styles.childs().UpperBand.childs(),l=U(this._propertyApplier,o,f,y,g,W,"UpperBandLine",i,n);a.push(r,l)}if(O?.area){const t=e.areaBackground.childs(),r=(0,o.createLinePropertyDefinition)({checked:(0,o.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,A.format({title:n})),color:(0,o.getColorDefinitionProperty)(this._propertyApplier,t.backgroundColor,t.transparency,k.format({title:n}))},{id:`${i}Background`,title:N});a.push(r)}if(O.styles?.UpperBand_2&&O.styles?.LowerBand_2&&O.styles?.UpperBand_3&&O.styles?.LowerBand_3){const t=e.styles.childs().LowerBand_2.childs(),r=U(this._propertyApplier,t,v,_,P,B,"LowerBand2Line",i,n),o=e.styles.childs().UpperBand_2.childs(),l=U(this._propertyApplier,o,T,D,w,R,"UpperBand2Line",i,n),s=e.styles.childs().LowerBand_3.childs(),c=U(this._propertyApplier,s,m,S,b,I,"LowerBand3Line",i,n),d=e.styles.childs().UpperBand_3.childs(),p=U(this._propertyApplier,d,C,x,L,z,"UpperBand3Line",i,n);a.push(r,l,c,p)}const G=(0,o.createCheckablePropertyDefinition)({checked:(0,o.convertToDefinitionProperty)(this._propertyApplier,e.axisLabelVisible,V.format({title:n}))},{id:`${i}ShowPrice`,title:E});return a.push(G),{definitions:a}}_coordinatesPropertyDefinitions(){return null}}},34108:(e,t,i)=>{i.r(t),i.d(t,{StudyLineDataSourceDefinitionsViewModel:()=>d});var n=i(11542),r=(i(40167),i(48096)),o=i(95338),l=i(14472),s=i(32823),a=i(97578),c=i(91682);class d extends l.LineDataSourceDefinitionsViewModel{constructor(e,t){super(e,t)}_inputsPropertyDefinitions(){return{definitions:[(0,o.createStudyInputsPropertyDefinition)({},{id:"StudyInputs",inputs:new s.MetaInfoHelper(this._source.metaInfo()).getUserEditableInputs(),inputsTabProperty:this._source.properties(),model:this._undoModel,studyMetaInfo:this._source.metaInfo(),source:{isInputsStudy:!0,symbolsResolved:()=>new r.Delegate,resolvedSymbolInfoBySymbol:e=>null}})]}}_coordinatesPropertyDefinitions(){const e=this._source.points(),t=this._source.pointsProperty().childs().points,r=[];return e.forEach(((e,l)=>{const s=t[l].childs();if(!s)return;const d=(0,a.getCoordinateXMetaInfo)(this._propertyApplier,s);r.push((0,o.createCoordinatesPropertyDefinition)({x:d.property},{id:(0,c.removeSpaces)(`${this._source.name()}Point${l}`),title:n.t(null,{context:"linetool point"},i(13616)).format({count:(l+1).toString()}),...d.info}))})),{definitions:r}}}},48282:(e,t,i)=>{i.d(t,{isCustomStudy:()=>r});const n={VbPFixed:!0,PivotPointsStandard:!0,VbPVisible:!0,VbPAnchored:!0};function r(e){return e in n}},
|
||||
32823:(e,t,i)=>{i.d(t,{MetaInfoHelper:()=>u});var n=i(50151),r=i(9343),o=i(19844),l=i(4359),s=i(87465),a=i(69422);function c(e){return!e.groupId&&!e.isHidden&&e.id!==a.RangeDependentStudyInputNames.FirstBar&&e.id!==a.RangeDependentStudyInputNames.LastBar}var d=i(48282);const p=(0,r.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo");class u{constructor(e){this._metaInfo=e}hasUserEditableInputs(){return this._metaInfo.inputs.some(c)}getUserEditableInputs(){return this._metaInfo.inputs.filter(c)}hasUserEditableProperties(){return o.StudyMetaInfo.isScriptStrategy(this._metaInfo)}hasUserEditableStyles(){const e=this._metaInfo;return e.plots.length>0||void 0!==e.bands||void 0!==e.filledAreas||(0,d.isCustomStudy)(e.shortId)||o.StudyMetaInfo.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((e=>void 0!==e))}getUserEditablePlots(){const e=new Set,t=this._metaInfo;return t.plots.filter((i=>{if((0,l.isColorerPlot)(i)||(0,l.isTextColorerPlot)(i)||(0,l.isDataOffsetPlot)(i)||(0,l.isOhlcColorerPlot)(i)||(0,l.isAlertConditionPlot)(i)||(0,l.isDataPlot)(i))return!1;if((0,l.isOhlcPlot)(i)){const r=i.target;if(e.has(r))return!1;e.add(r);const o=(0,n.ensureDefined)(t.ohlcPlots);return!(0,n.ensureDefined)(o[r]).isHidden}{const e=t.styles?t.styles[i.id]:void 0;return void 0===e||!e.isHidden}}))}hasUserEditableOptions(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()}getStrategyProperties(){const e=this._metaInfo,t=e.inputs.filter(f),i={...h};for(const n of t){const t=n.internalID;i[t]=n,h.hasOwnProperty(t)||p.logWarn(`Unknown strategy input internal id ${t} in ${e.fullId}`)}return(0,s.clone)(i)}}const h={currency:void 0,backtest_fill_limits_assumption:void 0,calc_on_every_tick:void 0,calc_on_order_fills:void 0,commission_value:void 0,commission_type:void 0,initial_capital:void 0,pyramiding:void 0,slippage:void 0,default_qty_type:void 0,default_qty_value:void 0,margin_long:void 0,margin_short:void 0,use_bar_magnifier:void 0,process_orders_on_close:void 0,fill_orders_on_standard_ohlc:void 0};function f(e){return"strategy_props"===e.groupId}},13098:(e,t,i)=>{i.d(t,{createPropertiesObject:()=>s});var n=i(87465),r=i(40226);function o(e,t,i){for(const r of Object.keys(e.levels??{}))if(e.levels[r]&&(0,n.isSameType)(e.levels[r],t.typecheck())){let n=t.tpl();i.names.forEach(((i,o)=>{n=t.fill(""+o,i,e.levels[r],n)})),e.levels[r]=n}return e}class l extends r.LevelsProperty{constructor(e,t,i){super({defaultName:e,state:i,map:{names:["width","color","visible"]},levelsIterator:o,theme:t})}}function s(e,t,i){return new l(e,t,i)}},68991:(e,t,i)=>{i.r(t),i.d(t,{LineToolGannComplex:()=>u});var n,r=i(10555),o=i(50151),l=i(9860),s=i(41414),a=i(66142),c=i(13098),d=i(65045),p=i(84617);!function(e){e[e.ScaleRatioStep=1e-7]="ScaleRatioStep",e[e.ScaleRatioPrecision=7]="ScaleRatioPrecision",e.ScaleRatioInitialValue=""}(n||(n={}));class u extends s.LineDataSource{constructor(e,t,n,r){super(e,t??u.createProperties(e.backgroundTheme().spawnOwnership()),n,r),this.version=2,
|
||||
this._scaleRatioFormatter=new l.LimitedPrecisionNumericFormatter(7),this.version=2,Promise.all([i.e(6290),i.e(986),i.e(6668),i.e(1583)]).then(i.bind(i,5497)).then((({GannComplexPaneView:e})=>{this._setPaneViews([new e(this,this.model())])}));const o=this.properties();this._adjustScaleRatio(o),o.subscribe(this,this._adjustScaleRatio),o.childs().scaleRatio.subscribe(this,this._correctFirstPoint),this._syncStateExclusions.push("scaleRatio"),o.onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),this._onTemplateApplying.subscribe(this,this._handleTemplateApplying),this._onTemplateApplied.subscribe(this,this._correctFirstPoint)}migrateVersion(e,t,i){1===e&&(this._points.length>=this.pointsCount()?setTimeout((()=>this._migratePoint())):this._timePoint.length>=this.pointsCount()&&this._pointAdded.subscribe(this,this._migratePoint))}destroy(){const e=this.properties();e.unsubscribe(this,this._adjustScaleRatio),e.childs().scaleRatio.unsubscribe(this,this._correctFirstPoint),e.onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),this._onTemplateApplying.unsubscribe(this,this._handleTemplateApplying),this._onTemplateApplied.unsubscribe(this,this._correctFirstPoint),super.destroy()}pointsCount(){return 2}name(){return"Gann Square"}addPoint(e,t,i){this._points.length>1&&this._points.pop();const n=super.addPoint(e,t,i),r=this.priceScale();return!(0,o.ensureNotNull)(r).isLog()&&n&&this._correctFirstPoint(),n}setPoint(e,t,i){super.setPoint(e,t,i),void 0!==i&&i.shift()?this._correctPoint(e):this._correctScaleRatio()}setLastPoint(e,t){const i=this.priceScale();return(0,o.ensureNotNull)(i).isLog()||(this._points[1]={...e,interval:this._model.mainSeries().interval()},this._correctPoint(1)),super.setLastPoint(e,t)}isReversed(){return this.properties().childs().reverse.value()}levelsCount(){return this.properties().childs().levels.childCount()}levels(){const e=[],t=this.properties().childs(),i=t.levels.childCount();for(let n=0;n<i;n++){const i=t.levels.childs()[n].childs();e.push({index:n,visible:i.visible.value(),color:i.color.value(),width:i.width.value()})}return e}fanLinesCount(){return this.properties().childs().fanlines.childCount()}fanLines(){const e=[],t=this.properties().childs(),i=t.fanlines.childCount();for(let n=0;n<i;n++){const i=t.fanlines.childs()[n].childs();e.push({index:n,visible:i.visible.value(),x:i.x.value(),y:i.y.value(),color:i.color.value(),width:i.width.value()})}return e}arcsCount(){return this.properties().childs().arcs.childCount()}arcs(){const e=[],t=this.properties().childs(),i=t.arcs.childCount();for(let n=0;n<i;n++){const i=t.arcs.childs()[n].childs();e.push({index:n,visible:i.visible.value(),x:i.x.value(),y:i.y.value(),color:i.color.value(),width:i.width.value()})}return e}arcsBackgroundTransparency(){return this.properties().childs().arcsBackground.childs().transparency.value()}isArcsBackgroundFilled(){return this.properties().childs().arcsBackground.childs().fillBackground.value()}isLabelsVisible(){
|
||||
return this.properties().childs().showLabels.value()}getLabelsStyle(){const e=this.properties().childs(),{fontSize:t,bold:i,italic:n}=e.labelsStyle.childs(),r=e.levels.childCount();return{textColor:e.levels.childs()[r-1].childs().color.value(),font:p.CHART_FONT_FAMILY,fontSize:t.value(),bold:i.value(),italic:n.value()}}getScaleRatioStep(){return 1e-7}getScaleRatioFormatter(){return this._scaleRatioFormatter}getPriceDiff(){const e=this.points();if(e.length<2)return null;const[t,i]=e;return i.price-t.price}getIndexDiff(){const e=this.points();if(e.length<2)return null;const[t,i]=e;return i.index-t.index}getScaleRatio(){const e=this.getPriceDiff(),t=this.getIndexDiff();return null!==e&&null!==t&&0!==t?Math.abs(e/t):null}static createProperties(e,t){const i=(0,c.createPropertiesObject)("linetoolganncomplex",e,t);return this._configureProperties(i),i}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(3198),i.e(5410),i.e(2745),i.e(8823),i.e(8537)]).then(i.bind(i,66758)).then((e=>e.GannComplexAndFixedDefinitionsViewModel))}static _configureProperties(e){super._configureProperties(e),e.addExcludedKey("scaleRatio",1);const t=[],i=[],n=e.childs();{const e=n.levels.childCount();for(let r=0;r<e;r++){const e=n.levels.childs()[r].childs();t.push(e.width),i.push(e.color)}}{const e=n.fanlines.childCount();for(let r=0;r<e;r++){const e=n.fanlines.childs()[r].childs();t.push(e.width),i.push(e.color)}}{const e=n.arcs.childCount();for(let r=0;r<e;r++){const e=n.arcs.childs()[r].childs();t.push(e.width),i.push(e.color)}}e.addChild("linesColors",new d.LineToolColorsProperty(i)),e.addChild("linesWidths",new d.LineToolWidthsProperty(t))}_correctScaleRatio(){const e=this.properties().childs(),t=this.getScaleRatio();e.scaleRatio.setValue(t)}_getAdjustedScaleRatio(){const e=this.model().mainSeries().priceScale(),t=this.model().timeScale();return(0,a.scaleRatio)(t,e)}_adjustScaleRatio(e){const t=e.scaleRatio.value();""!==t&&null!==t||e.scaleRatio.setValue(this._getAdjustedScaleRatio())}_correctPoint(e){if(this._points.length<2)return;const t=this.getIndexDiff();if(null===t)return;const i=this.properties().childs().scaleRatio.value();if(null!==i){const n=this._points[e],r=0===e?this._points[1]:this._points[0],o=n.price-r.price>0,l=n.index-r.index>0;let s=o&&!l||!o&&l?-1:1;0===e&&(s=-s),n.price=r.price+s*t*i,this._pointChanged.fire(e)}this._normalizePoints()}_correctFirstPoint(){this._correctPoint(this.isReversed()?0:1)}_handleRestoringFactoryDefaults(){this.properties().childs().scaleRatio.setValue(this._getAdjustedScaleRatio())}_handleTemplateApplying(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())}_migratePoint(){if(this.points().length<this.pointsCount())return;const e=this._getScreenPoints();if(null===e)return;const t=(0,o.ensureNotNull)(this.screenPointToPoint(e[1]));this.setPoint(1,t),this._pointAdded.unsubscribe(this,this._migratePoint)}_getScreenPoints(){const e=this._calcAngle();if(null===e)return null;let[t,i]=this.points();this.isReversed()&&([t,i]=[i,t]);const n=(0,
|
||||
o.ensureNotNull)(this.pointToScreenPoint(t)),l=(0,o.ensureNotNull)(this.pointToScreenPoint(i)),s=Math.sqrt(Math.pow(n.x-l.x,2)+Math.pow(n.y-l.y,2)),a=new r.Point(Math.cos(e),-Math.sin(e)),c=a.normalized(),d=c.x<0?-1:1,p=c.y<0?-1:1;return[n.addScaled(a,s),n.add(new r.Point(5*s*d,5*s*p))]}_calcAngle(){const[e,t]=this.points(),i=(0,o.ensureNotNull)(this.pointToScreenPoint(e));let n=(0,o.ensureNotNull)(this.pointToScreenPoint(t)).subtract(i);if(n.length()>0){n=n.normalized();let e=Math.acos(n.x);return n.y>0&&(e=-e),e}return null}}},62414:(e,t,i)=>{i.r(t),i.d(t,{LineToolImage:()=>M,OriginPoints:()=>x,buildAbsoluteUserImageUrl:()=>k});var n=i(50151),r=i(10555),o=i(9343),l=i(22613),s=i(78176),a=i(43337),c=i(41414),d=i(40472),p=i(1765),u=i(51768),h=i(97995),f=i(70347),y=i(11542),g=i(49483),v=i(68335),_=i(37103);const P=y.t(null,void 0,i(15402));var T=i(60709),D=i(78861);async function w(e,t){return async function(e){const[t]=await Promise.all([Promise.all([i.e(1874),i.e(8185),i.e(5371),i.e(2202),i.e(5563),i.e(2647),i.e(2537),i.e(7833),i.e(9487),i.e(8220),i.e(6043),i.e(4765),i.e(2227),i.e(2164),i.e(9418),i.e(7038)]).then(i.bind(i,47942))]);return t.renderImageDialog(e)}({onConfirm:e,onClose:t})}let m=null;function S(e){if("LineToolImage"!==e)return m?.then((e=>e())),void(m=null);(0,f.runOrSigninWithFeature)((()=>{const e="LineToolImage";D.tool.setValue(e),(0,h.trackDrawingToolSelected)(e,"Left panel"),m=w(b,(()=>{m?.then((e=>e())),m=null,D.tool.value()===e&&(0,D.resetToCursor)(!0)})),(0,u.trackEvent)("Image","Open image dialog")}),{feature:"drawings",source:"Change drawing tool state"})}function b(e){const t=(0,T.chartWidgetCollectionService)();if(null===t)return;const r=!Boolean(p.getBool("hint.pasteImage")),o=t.activeChartWidget.value();var l,s;o.model().pasteImageAsLineTool(e.url,e.blobUrl,(0,n.ensureNotNull)(o.model().model().paneForSource(o.model().mainSeries())),e.transparency),r&&(l=t.getContainer(),s="hint.pasteImage",_.enabled("popup_hints")&&!g.CheckMobile.any()&&Promise.all([i.e(6195),i.e(628),i.e(2227),i.e(6166)]).then(i.bind(i,91759)).then((e=>{const t=new e.ChartEventHintRenderer(l),i=P.format({shortcut:(0,v.humanReadableHash)(v.Modifiers.Mod+86)});let n=null;t.show(i,(()=>{null!==n&&(clearTimeout(n),n=null,p.setValue(s,!0,{forceFlush:!0}))})),n=setTimeout((()=>{n=null,t.hide()}),5e3)})))}const C=(0,o.getLogger)("Chart.LineToolImage");var x;function L(e){return e.toLowerCase().startsWith("blob:")}function A(e){return e.toLowerCase().startsWith("data:")}!function(e){e[e.LeftTopAnchor=0]="LeftTopAnchor",e[e.RightTopAnchor=1]="RightTopAnchor",e[e.LeftBottomAnchor=2]="LeftBottomAnchor",e[e.RightBottomAnchor=3]="RightBottomAnchor",e[e.Center=4]="Center"}(x||(x={}));window.AWS_BBS3_DOMAIN;function k(e){return L(e)||A(e)?e:null}function V(e){return A(e)?e:new URL(e).pathname}class M extends c.LineDataSource{constructor(e,t,n,r){super(e,t||M.createProperties(e.backgroundTheme().spawnOwnership()),n,r),this._hasEditableCoordinates=new l.WatchedValue(!1),this._image=null,this._originPoint=4
|
||||
;const o=this.properties().childs().url;this._absoluteUserImageUrl=new a.Property(k(this.properties().childs().url.value())??""),this._absoluteUserImageUrl.subscribe(this,(e=>{const t=e.value();if(L(t))return;const i=k(t);null!==i&&o.setValue(V(i))})),o.subscribe(this,(()=>{const e=k(o.value());null!==e&&this._absoluteUserImageUrl.setValue(e)})),this._loadImage(),Promise.all([i.e(6290),i.e(986),i.e(6668),i.e(1583)]).then(i.bind(i,69699)).then((({ImagePaneView:t})=>{this._setPaneViews([new t(this,e)])})),this.properties().childs().url.subscribe(this,(()=>{this._loadImage()}))}absoluteUserImageUrl(){return this._absoluteUserImageUrl}cssWidth(){return this.properties().childs().cssWidth.value()}cssHeight(){return this.properties().childs().cssHeight.value()}angle(){return this.properties().childs().angle.value()}originPoint(){return this._originPoint}dOffsetX(){return this._dOffsetX||0}pointsCount(){return 1}name(){return"Image"}image(){return this._image}setBlobImageUrl(e){this._image}getChangePointForSync(e){return null}pointToScreenPoint({index:e,price:t},i,o){const l=this._model.timeScale(),s=(0,n.ensureNotNull)(i?i.priceScale():this.priceScale()),a=(0,n.ensure)((i??this.ownerSource())?.firstValue()),c=l.indexToCoordinate(e)+(o??0),d=s.priceToCoordinate(t,a);return new r.Point(c,d)}setPoint(e,t,i){if(null===this._image)return;const{width:r,height:o}=this._image,l=(0,n.ensureNotNull)(this.pointToScreenPoint(t)),s=(0,n.ensureNotNull)(this.pointToScreenPoint(this._points[0],void 0,this.dOffsetX())),a=Math.max(Math.abs(s.x-l.x)/r,Math.abs(s.y-l.y)/o),c=Math.round(r*a),d=Math.round(o*a),p=this.properties().childs();p.cssWidth.setValue(c),p.cssHeight.setValue(d),this.propertiesChanged()}startChanging(e,t){super.startChanging(e,t),this._changeOriginPoint(M._oppositePoints[e])}endChanging(e,t){return this._changeOriginPoint(4),super.endChanging(e,t)}getPoint(){return null}syncLineStyleState(){const e=super.syncLineStyleState();return!e.url&&this._blobUrl&&(e.blobUrl=this._blobUrl),e}restoreExternalState(e){const{blobUrl:t,...i}=e;t&&this.setBlobImageUrl(t),super.restoreExternalState(i)}isSavedInChart(){return super.isSavedInChart()&&""!==this.absoluteUserImageUrl().value()}static createProperties(e,t){const i=new s.DefaultProperty({defaultName:"linetoolimage",state:t,theme:e});return this._configureProperties(i),i}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(3198),i.e(5410),i.e(2745),i.e(8823),i.e(8537)]).then(i.bind(i,11375))).ImageDefinitionsViewModel}static _configureProperties(e){super._configureProperties(e),e.hasChild("url")||e.addChild("url",new a.Property("")),e.addExcludedKey("url",1),e.addExcludedKey("cssWidth",1),e.addExcludedKey("cssHeight",1),e.addExcludedKey("angle",1)}_loadImage(){const e=this.properties(),t=(0,n.ensureDefined)(e.child("url")).value();t&&this._createImage(t)}_changeOriginPoint(e){
|
||||
const t=this.originPoint(),i=4===t?M._correctOriginDirections[e]:M._correctOriginDirections[M._oppositePoints[t]],o=this.properties().childs().cssWidth.value()/2,l=this.properties().childs().cssHeight.value()/2,[s]=this._points,a=(0,n.ensureNotNull)(this.pointToScreenPoint(s)),c=new r.Point(a.x+o*i[0],a.y+l*i[1]),d=(0,n.ensureNotNull)(this.screenPointToPoint(c));this._dOffsetX=4===t?c.x-(0,n.ensureNotNull)(this.pointToScreenPoint(d)).x:void 0,s.index=d.index,s.price=d.price,this._originPoint=e}_createImage(e){const t=L(e),i=k(e);if(null===i)return void C.logWarn(`Invalid image URL: ${e}`);if(i===this._image?.src)return;const r=document.createElement("img");r.crossOrigin="anonymous",r.src=i,r.addEventListener("load",(()=>{this._image=r;const e=this._model,o=this.properties().childs();if(!t){const e=V(i);o.url.setValue(e),this._blobUrl=void 0}if(o.cssWidth.value()&&o.cssHeight.value())return void this._model.updateSource(this);const l=e.timeScale().width()/4,s=(0,n.ensureNotNull)(this.priceScale()).height()/4,a=r.naturalWidth,c=r.naturalHeight,p=Math.min(1,l/a),u=Math.min(1,s/c),h=Math.min(p,u),f=Math.round(h*a),y=Math.round(h*c);o.cssWidth.setValue(f),o.cssHeight.setValue(y),this.updateAllViews((0,d.sourceChangeEvent)(this.id())),this._model.updateSource(this)})),r.addEventListener("error",(()=>{this.model().removeSource(this)}))}}M._correctOriginDirections=[[-1,-1],[1,-1],[-1,1],[1,1],[0,0]],M._oppositePoints=[3,2,1,0,4],(0,D.runOnDrawingStateReady)((()=>{D.tool.subscribe(S)}))},11810:(e,t,i)=>{var n;i.d(t,{RiskDisplayMode:()=>n}),function(e){e.Percentage="percents",e.Money="money"}(n||(n={}))},57058:(e,t,i)=>{i.d(t,{StudyPlotVisibleProperty:()=>o});var n=i(38486),r=i(79603);class o extends r.PropertyBase{constructor(e){super(),this._displayProperty=e,this._displayProperty.subscribe(this,this._displayPropertyValueChanged)}destroy(){this._displayProperty.unsubscribe(this,this._displayPropertyValueChanged),this._listeners.destroy()}value(){return 0!==this._displayProperty.value()}setValue(e,t){this._displayProperty.setValue(e?15:0)}setValueSilently(e){this._displayProperty.setValueSilently(e?15:0)}storeStateIfUndefined(){return!1}weakReference(){return(0,n.weakReference)(this)}ownership(){return(0,n.ownership)(this)}_displayPropertyValueChanged(){this.fireChanged()}}}}]);
|
||||
Reference in New Issue
Block a user