/**
 * Highstock JS v11.2.0 (2023-10-30)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2021 Wojciech Chmiel
 *
 * License: www.highcharts.com/license
 */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/indicators/ao",["highcharts","highcharts/modules/stock"],function(o){return t(o),t.Highcharts=o,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var o=t?t._modules:{};function r(t,o,r,e){t.hasOwnProperty(o)||(t[o]=e.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:t[o]}})))}r(o,"Stock/Indicators/AO/AOIndicator.js",[o["Core/Globals.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(t,o,r){var e,n=this&&this.__extends||(e=function(t,o){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),i=t.noop,s=o.seriesTypes,a=s.column.prototype,c=s.sma,l=r.extend,p=r.merge,u=r.correctFloat,d=r.isArray,h=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.data=void 0,o.options=void 0,o.points=void 0,o}return n(o,t),o.prototype.drawGraph=function(){var t,o=this.options,r=this.points,e=this.userOptions.color,n=o.greaterBarColor,i=o.lowerBarColor,s=r[0];if(!e&&s)for(t=1,s.color=n;t<r.length;t++)r[t].y>r[t-1].y?r[t].color=n:r[t].y<r[t-1].y?r[t].color=i:r[t].color=r[t-1].color},o.prototype.getValues=function(t){var o,r,e,n,i,s,a=t.xData||[],c=t.yData||[],l=c.length,p=[],h=[],f=[],y=0,g=0;if(!(a.length<=34)&&d(c[0])&&4===c[0].length){for(i=0;i<33;i++)n=(c[i][1]+c[i][2])/2,i>=29&&(g=u(g+n)),y=u(y+n);for(s=33;s<l;s++)g=u(g+(n=(c[s][1]+c[s][2])/2)),y=u(y+n),o=u(g/5-y/34),p.push([a[s],o]),h.push(a[s]),f.push(o),r=s+1-5,e=s+1-34,g=u(g-(c[r][1]+c[r][2])/2),y=u(y-(c[e][1]+c[e][2])/2);return{values:p,xData:h,yData:f}}},o.defaultOptions=p(c.defaultOptions,{params:{index:void 0,period:void 0},greaterBarColor:"#06b535",lowerBarColor:"#f21313",threshold:0,groupPadding:.2,pointPadding:.2,crisp:!1,states:{hover:{halo:{size:0}}}}),o}(c);return l(h.prototype,{nameBase:"AO",nameComponents:!1,markerAttribs:i,getColumnMetrics:a.getColumnMetrics,crispCol:a.crispCol,translate:a.translate,drawPoints:a.drawPoints}),o.registerSeriesType("ao",h),h}),r(o,"masters/indicators/ao.src.js",[],function(){})});//# sourceMappingURL=ao.js.map