!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/disparity-index
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highstock
 *
 * (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,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/disparity-index",["highcharts/highcharts"],function(t){return r(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/disparity-index"]=r(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=r(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,r){return function(){"use strict";var e,n={512:function(t){t.exports=r},944:function(r){r.exports=t}},o={};function a(t){var r=o[t];if(void 0!==r)return r.exports;var e=o[t]={exports:{}};return n[t](e,e.exports,a),e.exports}a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,{a:r}),r},a.d=function(t,r){for(var e in r)a.o(r,e)&&!a.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var i={};a.d(i,{default:function(){return x}});var c=a(944),s=a.n(c),p=a(512),u=a.n(p),f=function(t,r,e){if(e||2==arguments.length)for(var n,o=0,a=r.length;o<a;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))};function l(t){return h(t)&&"number"==typeof t.nodeType}function y(t){var r=Object.prototype.toString.call(t);return"[object Array]"===r||"[object Array Iterator]"===r}function h(t,r){return!!t&&"object"==typeof t&&(!r||!y(t))}s().doc,s().win,Array.prototype.find;var d=(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)},function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),g=u().seriesTypes.sma,v=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return d(r,t),r.prototype.init=function(){var t=arguments,r=t[1].params,e=r&&r.average?r.average:void 0;this.averageIndicator=u().seriesTypes[e]||g,this.averageIndicator.prototype.init.apply(this,t)},r.prototype.calculateDisparityIndex=function(t,r){var e;return((e=t-r)>1e14?e:parseFloat(e.toPrecision(14)))/r*100},r.prototype.getValues=function(t,r){var e=r.index,n=t.xData,o=t.yData,a=o?o.length:0,i=[],c=[],s=[],p=this.averageIndicator,u=y(o[0]),f=p.prototype.getValues(t,r),l=f.yData,h=n.indexOf(f.xData[0]);if(l&&0!==l.length&&null!=e&&!(o.length<=h)){for(var d=h;d<a;d++){var g=this.calculateDisparityIndex(u?o[d][e]:o[d],l[d-h]);i.push([n[d],g]),c.push(n[d]),s.push(g)}return{values:i,xData:c,yData:s}}},r.defaultOptions=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var n,o=f([t],r,!0),a={},i=function(t,r){return"object"!=typeof t&&(t={}),function(t,r,e){for(var n in t)Object.hasOwnProperty.call(t,n)&&r.call((0,t[n]),t[n],n,t)}(r,function(e,n){if("__proto__"!==n&&"constructor"!==n){var o;!h(e,!0)||(o=null==e?void 0:e.constructor,h(e,!0)&&!l(e)&&(null==o?void 0:o.name)&&"Object"!==o.name)||l(e)?t[n]=r[n]:t[n]=i(t[n]||{},e)}}),t};!0===t&&(a=o[1],o=Array.prototype.slice.call(o,2));var c=o.length;for(n=0;n<c;n++)a=i(a,o[n]);return a}(g.defaultOptions,{params:{average:"sma",index:3},marker:{enabled:!1},dataGrouping:{approximation:"averages"}}),r}(g);!function(t,r){var e;for(e in t||(t={}),r)t[e]=r[e]}(v.prototype,{nameBase:"Disparity Index",nameComponents:["period","average"]}),u().registerSeriesType("disparityindex",v);var x=s();return i.default}()});