"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),a=require("lodash/mean");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(e),t=r(a);exports.smoothenSerie=function(e,a){if(!e.length)return e;var r=u.default(e[0],1)[0];return e.reduce((function(r,o,l){var n=u.default(o,1)[0];if(n-r.valueToCompare<a)return r;var d=function(e){var a=e.reduce((function(e,a){var r=u.default(a,2),t=r[0],o=r[1];return{xValues:e.xValues.concat(t),yValues:e.yValues.concat(o)}}),{xValues:[],yValues:[]}),r=a.xValues,o=a.yValues;return[t.default(r),t.default(o)]}(e.slice(r.valueToCompareIndex,l));return{normalizedData:r.normalizedData.concat([d]),valueToCompare:n,valueToCompareIndex:l}}),{normalizedData:[],valueToCompare:r,valueToCompareIndex:0}).normalizedData};
