File: /var/www/quadcode/frontend/node_modules/highcharts/es5/indicators/chaikin.js
/*
Highstock JS v10.3.3 (2023-01-20)
Indicator series type for Highcharts Stock
(c) 2010-2021 Wojciech Chmiel
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/chaikin",["highcharts","highcharts/modules/stock"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,b,e,f){a.hasOwnProperty(b)||(a[b]=f.apply(null,e),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:b,module:a[b]}})))}
a=a?a._modules:{};f(a,"Stock/Indicators/AD/ADIndicator.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,b){var e=this&&this.__extends||function(){var a=function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(c[g]=d[g])};return a(b,c)};return function(b,c){function h(){this.constructor=b}if("function"!==typeof c&&null!==c)throw new TypeError("Class extends value "+
String(c)+" is not a constructor or null");a(b,c);b.prototype=null===c?Object.create(c):(h.prototype=c.prototype,new h)}}(),f=a.seriesTypes.sma,l=b.error,m=b.extend,r=b.merge;b=function(a){function b(){var c=null!==a&&a.apply(this,arguments)||this;c.data=void 0;c.options=void 0;c.points=void 0;return c}e(b,a);b.populateAverage=function(c,a,d,g,b){b=a[g][1];var p=a[g][2];a=a[g][3];d=d[g];return[c[g],a===b&&a===p||b===p?0:(2*a-p-b)/(b-p)*d]};b.prototype.getValues=function(a,h){var d=h.period,g=a.xData,
c=a.yData,n=h.volumeSeriesID,e=a.chart.get(n);h=e&&e.yData;var f=c?c.length:0,q=[],k=[],m=[];if(!(g.length<=d&&f&&4!==c[0].length)){if(e){for(n=d;n<f;n++)a=q.length,e=b.populateAverage(g,c,h,n,d),0<a&&(e[1]+=q[a-1][1]),q.push(e),k.push(e[0]),m.push(e[1]);return{values:q,xData:k,yData:m}}l("Series "+n+" not found! Check `volumeSeriesID`.",!0,a.chart)}};b.defaultOptions=r(f.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}});return b}(f);m(b.prototype,{nameComponents:!1,nameBase:"Accumulation/Distribution"});
a.registerSeriesType("ad",b);"";return b});f(a,"Stock/Indicators/Chaikin/ChaikinIndicator.js",[a["Stock/Indicators/AD/ADIndicator.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,b,e){var f=this&&this.__extends||function(){var a=function(b,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d])};return a(b,d)};return function(b,d){function c(){this.constructor=
b}if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");a(b,d);b.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)}}(),l=b.seriesTypes.ema,m=e.correctFloat,r=e.extend,u=e.merge,t=e.error;e=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}f(c,b);c.prototype.getValues=function(b,c){var d=c.periods,e=c.period,f=[],g=[],h=[],k;if(2!==d.length||
d[1]<=d[0])t('Error: "Chaikin requires two periods. Notice, first period should be lower than the second one."');else if(c=a.prototype.getValues.call(this,b,{volumeSeriesID:c.volumeSeriesID,period:e}))if(b=l.prototype.getValues.call(this,c,{period:d[0]}),c=l.prototype.getValues.call(this,c,{period:d[1]}),b&&c){d=d[1]-d[0];for(k=0;k<c.yData.length;k++)e=m(b.yData[k+d]-c.yData[k]),f.push([c.xData[k],e]),g.push(c.xData[k]),h.push(e);return{values:f,xData:g,yData:h}}};c.defaultOptions=u(l.defaultOptions,
{params:{index:void 0,volumeSeriesID:"volume",period:9,periods:[3,10]}});return c}(l);r(e.prototype,{nameBase:"Chaikin Osc",nameComponents:["periods"]});b.registerSeriesType("chaikin",e);"";return e});f(a,"masters/indicators/chaikin.src.js",[],function(){})});
//# sourceMappingURL=chaikin.js.map