old_contents: function countUp(a,b,c,d,e){for(var f=0,g=["webkit","moz","ms"],h=0;h<g.length&&!window.requestAnimationFrame;++h)window.requestAnimationFrame=window[g[h]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[g[h]+"CancelAnimationFrame"]||window[g[h]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a){var c=(new Date).getTime(),d=Math.max(0,16-(c-f)),e=window.setTimeout(function(){a(c+d)},d);return f=c+d,e}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});var i=this;this.useEasing=!0,this.d=document.getElementById(a),i.startVal=Number(b),c=Number(c),this.countDown=b>c?!0:!1,d=Math.max(0,d||0),this.dec=Math.pow(10,d),this.duration=1e3*e||2e3,this.startTime=null,this.timestamp=null,this.remaining=null,this.frameVal=b,this.rAF=null,this.easeOutExpo=function(a,b,c,d){return 1024*c*(-Math.pow(2,-10*a/d)+1)/1023+b},this.count=function(a){null===i.startTime&&(i.startTime=a),i.timestamp=a;var e=a-i.startTime;if(i.remaining=i.duration-e,i.useEasing)if(i.countDown){var f=i.easeOutExpo(e,0,i.startVal-c,i.duration);i.frameVal=b-f}else i.frameVal=i.easeOutExpo(e,i.startVal,c-i.startVal,i.duration);else if(i.countDown){var f=(i.startVal-c)*(e/i.duration);i.frameVal=i.startVal-f}else i.frameVal=i.startVal+(c-i.startVal)*(e/i.duration);i.frameVal=Math.round(i.frameVal*i.dec)/i.dec,i.frameVal=i.countDown?i.frameVal<c?c:i.frameVal:i.frameVal>c?c:i.frameVal,i.d.innerHTML=i.addCommas(i.frameVal.toFixed(d)),e<i.duration?i.rAF=requestAnimationFrame(i.count):null!=i.callback&&i.callback()},this.start=function(a){return i.callback=a,isNaN(c)||isNaN(b)?(console.log("countUp error: startVal or endVal is not a number"),i.d.innerHTML="--"):i.rAF=requestAnimationFrame(i.count),!1},this.stop=function(){cancelAnimationFrame(i.rAF)},this.reset=function(){cancelAnimationFrame(i.rAF),i.d.innerHTML=i.addCommas(b.toFixed(d))},this.resume=function(){i.startTime=null,i.duration=i.remaining,i.startVal=i.frameVal,requestAnimationFrame(i.count)},this.addCommas=function(a){a+="";var b,c,d,e;for(b=a.split("."),c=b[0],d=b.length>1?"."+b[1]:"",e=/(\d+)(\d{3})/;e.test(c);)c=c.replace(e,"$1,$2");return c+d},i.d.innerHTML=i.addCommas(b.toFixed(d))}
new_contents: (function(){var countUp;countUp=function(target,startVal,endVal,decimals,duration){var lastTime,vendors;lastTime=0;vendors=["webkit","moz","ms"];this.useEasing=true;this.doc=document.getElementById(target);startVal=Number(startVal);endVal=Number(endVal);this.countDown=startVal>endVal?true:false;decimals=Math.max(0,decimals||0);this.dec=Math.pow(10,decimals);this.duration=duration*1e3||2e3;this.startTime=null;this.remaining=null;this.frameVal=startVal;this.rAF=null;while(x<vendors.length&&!window.requestAnimationFrame){window.requestAnimationFrame=window[vendors[x]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[vendors[x]+"CancelAnimationFrame"]||window[vendors[x]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame){window.requestAnimationFrame=function(callback,element){var currTime,id,timeToCall;currTime=(new Date).getTime();timeToCall=Math.max(0,16-(currTime-lastTime));id=window.setTimeout(function(){return callback(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id}}if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(id){return clearTimeout(id)}}this.easeOutExpo=function(t,b,c,d){return c*(-Math.pow(2,-10*t/d)+1)*1024/1023+b};this.count=function(timestamp){var i,progress;if(this.startTime===null){this.startTime=timestamp}this.timestamp=timestamp;progress=timestamp-this.startTime;if(this.useEasing){if(this.countDown){i=this.easeOutExpo(progress,0,startVal-endVal,this.duration);this.frameVal=startVal-i}else{this.frameVal=this.easeOutExpo(progress,startVal,endVal-startVal,this.duration)}}else{if(this.countDown){i=(startVal-endVal)*(progress/this.duration);this.frameVal=startVal-i}else{this.frameVal=startVal+(endVal-startVal)*(progress/this.duration)}}this.frameVal=Math.round(this.frameVal*this.dec)/this.dec;if(this.countDown){this.frameVal=this.framVal<endVal?endVal:this.frameVal}else{this.frameVal=this.framVal>endVal?endVal:this.frameVal}this.doc.innerHTML=this.addCommas(this.frameVal.toFixed(decimals));if(progress<this.duration){return this.rAF=requestAnimationFrame(this.count)}else{if(this.callback!=null){return this.callback()}}};this.start=function(callback){this.callback=callback;requestAnimationFrame(this.count(!(isNaN(endVal)&&isNan(startVal)!==null)?void 0:(console.log("countUp error: startVal or endVal is not a number"),this.doc.innerHTML="--")));return false};this.stop=function(){return cancelAnimationFrame(this.rAF)};this.reset=function(){cancelAnimationFrame(this.rAF);return this.doc.innerHTML=this.addCommas(startVal.toFixed(decimals))};this.resume=function(){this.startTime=null;this.duration=this.remaining;this.startVal=this.framVal;return requestAnimationFrame(this.count)};this.addCommas=function(nStr){var rgx,x,x1,x2;nStr+="";x=nStr.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,"$1"+","+"$2")}return x1+x2};return this.doc.innerHTML=this.addCommas(startVal.toFixed(decimals))}}).call(this)
subject: update v0.0.6