/**
 * Highstock JS v11.2.0 (2023-10-30)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2021 Paweł Fus
 *
 * 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/rsi",["highcharts","highcharts/modules/stock"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Stock/Indicators/RSI/RSIIndicator.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o,n=this&&this.__extends||(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)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=t.seriesTypes.sma,i=e.isNumber,s=e.merge;function a(t,e){return parseFloat(t.toFixed(e))}var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.points=void 0,e.options=void 0,e}return n(e,t),e.prototype.getValues=function(t,e){var o,n,r,s,u,c,p=e.period,d=t.xData,f=t.yData,h=f?f.length:0,l=e.decimals,y=[],m=[],g=[],v=0,_=0,x=e.index,j=1;if(!(d.length<p)){for(i(f[0])?c=f:(x=Math.min(x,f[0].length-1),c=f.map(function(t){return t[x]}));j<p;)(n=a(c[j]-c[j-1],l))>0?v+=n:_+=Math.abs(n),j++;for(r=a(v/(p-1),l),s=a(_/(p-1),l),u=j;u<h;u++)(n=a(c[u]-c[u-1],l))>0?(v=n,_=0):(v=0,_=Math.abs(n)),r=a((r*(p-1)+v)/p,l),o=0===(s=a((s*(p-1)+_)/p,l))?100:0===r?0:a(100-100/(1+r/s),l),y.push([d[u],o]),m.push(d[u]),g.push(o);return{values:y,xData:m,yData:g}}},e.defaultOptions=s(r.defaultOptions,{params:{decimals:4,index:3}}),e}(r);return t.registerSeriesType("rsi",u),u}),o(e,"masters/indicators/rsi.src.js",[],function(){})});//# sourceMappingURL=rsi.js.map