text: "use strict";import H from"../parts/Globals.js";import U from"../parts/Utilities.js";var isArray=U.isArray,seriesType=H.seriesType;function populateAverage(e,r,a,s,t){var i,p;return p=t<0?(i=r[a-s])?(r[a]-i)/i*100:null:(i=r[a-s][t])?(r[a][t]-i)/i*100:null,[e[a],p]}seriesType("roc","sma",{params:{index:3,period:9}},{nameBase:"Rate of Change",getValues:function(e,r){var a,s,t=r.period,i=e.xData,p=e.yData,n=p?p.length:0,u=[],o=[],l=[],y=-1;if(i.length<=t)return!1;for(isArray(p[0])&&(y=r.index),a=t;a<n;a++)s=populateAverage(i,p,a,t,y),u.push(s),o.push(s[0]),l.push(s[1]);return{values:u,xData:o,yData:l}}});