!function(a,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t(require,exports,module):a.countup=t()}(this,function(a,t,e){var n=function(a,t,e,n,i,r){function o(a){a=a.tofixed(c.decimals),a+="";var t,e,n,i;if(t=a.split("."),e=t[0],n=t.length>1?c.options.decimal+t[1]:"",i=/(\d+)(\d{3})/,c.options.usegrouping)for(;i.test(e);)e=e.replace(i,"$1"+c.options.separator+"$2");return c.options.prefix+e+n+c.options.suffix}function l(a,t,e,n){return e*(-math.pow(2,-10*a/n)+1)*1024/1023+t}function s(a){return"number"==typeof a&&!isnan(a)}for(var u=0,m=["webkit","moz","ms","o"],d=0;dc.endval,c.frameval=c.startval,c.initialized=!0,!0):(console.error("[countup] startval or endval is not a number",c.startval,c.endval),!1)):(console.error("[countup] target is null or undefined",c.d),!1))},c.printvalue=function(a){var t=c.options.formattingfn(a);"input"===c.d.tagname?this.d.value=t:"text"===c.d.tagname||"tspan"===c.d.tagname?this.d.textcontent=t:this.d.innerhtml=t},c.count=function(a){c.starttime||(c.starttime=a),c.timestamp=a;var t=a-c.starttime;c.remaining=c.duration-t,c.options.useeasing?c.countdown?c.frameval=c.startval-c.options.easingfn(t,0,c.startval-c.endval,c.duration):c.frameval=c.options.easingfn(t,c.startval,c.endval-c.startval,c.duration):c.countdown?c.frameval=c.startval-(c.startval-c.endval)*(t/c.duration):c.frameval=c.startval+(c.endval-c.startval)*(t/c.duration),c.countdown?c.frameval=c.framevalc.endval?c.endval:c.frameval,c.frameval=math.round(c.frameval*c.dec)/c.dec,c.printvalue(c.frameval),tc.endval,c.raf=requestanimationframe(c.count))):void console.error("[countup] update() - new endval is not a number",a)},c.initialize()&&c.printvalue(c.startval)};return n});