!/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/indicators/dmi
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Rafał Sebestjański
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/dmi",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/dmi"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e){return function(){"use strict";var o,r,i={512:function(t){t.exports=e},944:function(e){e.exports=t}},n={};function a(t){var e=n[t];if(void 0!==e)return e.exports;var o=n[t]={exports:{}};return i[t](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var s={};a.d(s,{default:function(){return m}});var p=a(944),l=a.n(p),c=a(512),h=a.n(c),u=h().seriesTypes.sma.prototype;!function(t){var e=["bottomLine"],o=["top","bottom"],r=["top"];function i(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function n(t,e){var o=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&o.push(i(t))}),o}function a(){var t,e=this,o=e.pointValKey,r=e.linesApiNames,a=e.areaLinesNames,s=e.points,l=e.options,c=e.graph,h={options:{gapSize:l.gapSize}},f=[],y=n(e,o),d=s.length;if(y.forEach(function(e,o){for(f[o]=[];d--;)t=s[d],f[o].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:!(0,p.defined)(t[e])});d=s.length}),e.userOptions.fillColor&&a.length){var g=f[y.indexOf(i(a[0]))],m=1===a.length?s:f[y.indexOf(i(a[1]))],v=e.color;e.points=m,e.nextPoints=g,e.color=e.userOptions.fillColor,e.options=(0,p.merge)(s,h),e.graph=e.area,e.fillGraph=!0,u.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=v}r.forEach(function(t,o){f[o]?(e.points=f[o],l[t]?e.options=(0,p.merge)(l[t].styles,h):(0,p.error)('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],u.drawGraph.call(e),e["graph"+t]=e.graph):(0,p.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=s,e.options=l,e.graph=c,u.drawGraph.call(e)}function s(t){var e,o=[],r=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=u.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",o=u.getGraphPath.call(this,t),r=e.slice(0,o.length);for(var i=r.length-1;i>=0;i--)o.push(r[i])}}else o=u.getGraphPath.apply(this,arguments);return o}function l(t){var e=[];return(this.pointArrayMap||[]).forEach(function(o){e.push(t[o])}),e}function c(){var t,e=this,o=this.pointArrayMap,r=[];r=n(this),u.translate.apply(this,arguments),this.points.forEach(function(i){o.forEach(function(o,n){t=i[o],e.dataModify&&(t=e.dataModify.modifyValue(t)),null!==t&&(i[r[n]]=e.yAxis.toPixels(t,!0))})})}t.compose=function(t){var i=t.prototype;return i.linesApiNames=i.linesApiNames||e.slice(),i.pointArrayMap=i.pointArrayMap||o.slice(),i.pointValKey=i.pointValKey||"top",i.areaLinesNames=i.areaLinesNames||r.slice(),i.drawGraph=a,i.getGraphPath=s,i.toYData=l,i.translate=c,t}}(r||(r={}));var f=r,y=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),d=h().seriesTypes.sma,g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),e.prototype.calculateDM=function(t,e,o){var r,i=t[e][1],n=t[e][2],a=t[e-1][1],s=t[e-1][2];return r=i-a>s-n?o?Math.max(i-a,0):0:o?0:Math.max(s-n,0),(0,p.correctFloat)(r)},e.prototype.calculateDI=function(t,e){return t/e*100},e.prototype.calculateDX=function(t,e){return(0,p.correctFloat)(Math.abs(t-e)/Math.abs(t+e)*100)},e.prototype.smoothValues=function(t,e,o){return(0,p.correctFloat)(t-t/o+e)},e.prototype.getTR=function(t,e){return(0,p.correctFloat)(Math.max(t[1]-t[2],e?Math.abs(t[1]-e[3]):0,e?Math.abs(t[2]-e[3]):0))},e.prototype.getValues=function(t,e){var o=e.period,r=t.xData,i=t.yData,n=i?i.length:0,a=[],s=[],l=[];if(!(r.length<=o)&&(0,p.isArray)(i[0])&&4===i[0].length){var c,h=0,u=0,f=0;for(c=1;c<n;c++){var y=void 0,d=void 0,g=void 0,m=void 0,v=void 0,D=void 0,x=void 0,M=void 0,b=void 0;c<=o?(m=this.calculateDM(i,c,!0),v=this.calculateDM(i,c),D=this.getTR(i[c],i[c-1]),h+=m,u+=v,f+=D,c===o&&(x=this.calculateDI(h,f),M=this.calculateDI(u,f),b=this.calculateDX(h,u),a.push([r[c],b,x,M]),s.push(r[c]),l.push([b,x,M]))):(m=this.calculateDM(i,c,!0),v=this.calculateDM(i,c),D=this.getTR(i[c],i[c-1]),y=this.smoothValues(h,m,o),d=this.smoothValues(u,v,o),g=this.smoothValues(f,D,o),h=y,u=d,f=g,x=this.calculateDI(h,f),M=this.calculateDI(u,f),b=this.calculateDX(h,u),a.push([r[c],b,x,M]),s.push(r[c]),l.push([b,x,M]))}return{values:a,xData:s,yData:l}}},e.defaultOptions=(0,p.merge)(d.defaultOptions,{params:{index:void 0},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color: {point.color}">●</span><b> {series.name}</b><br/><span style="color: {point.color}">DX</span>: {point.y}<br/><span style="color: {point.series.options.plusDILine.styles.lineColor}">+DI</span>: {point.plusDI}<br/><span style="color: {point.series.options.minusDILine.styles.lineColor}">-DI</span>: {point.minusDI}<br/>'},plusDILine:{styles:{lineWidth:1,lineColor:"var(--highcharts-positive-color)"}},minusDILine:{styles:{lineWidth:1,lineColor:"var(--highcharts-negative-color)"}},dataGrouping:{approximation:"averages"}}),e}(d);(0,p.extend)(g.prototype,{areaLinesNames:[],nameBase:"DMI",linesApiNames:["plusDILine","minusDILine"],pointArrayMap:["y","plusDI","minusDI"],parallelArrays:["x","y","plusDI","minusDI"],pointValKey:"y"}),f.compose(g),h().registerSeriesType("dmi",g);var m=l();return s.default}()});