You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

animated-number-vue

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animated-number-vue - npm Package Compare versions

Comparing version

to
0.0.4

7

dist/animated-number-vue.common.js

@@ -94,3 +94,6 @@ module.exports =

props: {
value: [Number, String],
value: {
type: [Number, String],
required: true
},
formatValue: {

@@ -130,3 +133,3 @@ type: Function,

});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-62e75d93","hasScoped":false,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/AnimatedNumber.vue
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-13da75d0","hasScoped":false,"optionsId":"1","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/AnimatedNumber.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_vm._v(_vm._s(_vm.formatValue(_vm.animatedValue)))])}

@@ -133,0 +136,0 @@ var staticRenderFns = []

@@ -103,3 +103,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

props: {
value: [Number, String],
value: {
type: [Number, String],
required: true
},
formatValue: {

@@ -139,3 +142,3 @@ type: Function,

});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-62e75d93","hasScoped":false,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/AnimatedNumber.vue
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-13da75d0","hasScoped":false,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/AnimatedNumber.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_vm._v(_vm._s(_vm.formatValue(_vm.animatedValue)))])}

@@ -142,0 +145,0 @@ var staticRenderFns = []

@@ -1,2 +0,2 @@

(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["animated-number-vue"]=e():t["animated-number-vue"]=e()})("undefined"!==typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./",n(n.s=0)}({0:function(t,e,n){t.exports=n("1HMB")},"1HMB":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("A5qe"),o=n.n(r),a={props:{value:[Number,String],formatValue:{type:Function,default:function(t){return t}},duration:{type:Number,default:1e3}},data:function(){return{animatedValue:0}},mounted:function(){this.animateValue(this.value)},watch:{value:function(t){this.animateValue(t)}},methods:{animateValue:function(t){o()({targets:this,animatedValue:t,duration:this.duration})}}},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",[t._v(t._s(t.formatValue(t.animatedValue)))])},u=[];function s(t,e,n,r,o,a,i,u){t=t||{};var s=typeof t.default;"object"!==s&&"function"!==s||(t=t.default);var f,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId=a),i?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=f):o&&(f=u?function(){o.call(this,this.$root.$options.shadowRoot)}:o),f)if(c.functional){c._injectStyles=f;var l=c.render;c.render=function(t,e){return f.call(e),l(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,f):[f]}return{exports:t,options:c}}var f=!1,c=null,l=null,d=null,p=s(a,i,u,f,c,l,d);e["default"]=p.exports},A5qe:function(t,e,n){(function(n){var r,o,a,i={scope:{}};i.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},i.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof n&&null!=n?n:t},i.global=i.getGlobal(this),i.SYMBOL_PREFIX="jscomp_symbol_",i.initSymbol=function(){i.initSymbol=function(){},i.global.Symbol||(i.global.Symbol=i.Symbol)},i.symbolCounter_=0,i.Symbol=function(t){return i.SYMBOL_PREFIX+(t||"")+i.symbolCounter_++},i.initSymbolIterator=function(){i.initSymbol();var t=i.global.Symbol.iterator;t||(t=i.global.Symbol.iterator=i.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&i.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return i.arrayIterator(this)}}),i.initSymbolIterator=function(){}},i.arrayIterator=function(t){var e=0;return i.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},i.iteratorPrototype=function(t){return i.initSymbolIterator(),t={next:t},t[i.global.Symbol.iterator]=function(){return this},t},i.array=i.array||{},i.iteratorFromArray=function(t,e){i.initSymbolIterator(),t instanceof String&&(t+="");var n=0,r={next:function(){if(n<t.length){var o=n++;return{value:e(o,t[o]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r},i.polyfill=function(t,e,n,r){if(e){for(n=i.global,t=t.split("."),r=0;r<t.length-1;r++){var o=t[r];o in n||(n[o]={}),n=n[o]}t=t[t.length-1],r=n[t],e=e(r),e!=r&&null!=e&&i.defineProperty(n,t,{configurable:!0,writable:!0,value:e})}},i.polyfill("Array.prototype.keys",function(t){return t||function(){return i.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var u=this;(function(n,i){o=[],r=i,a="function"===typeof r?r.apply(e,o):r,void 0===a||(t.exports=a)})(0,function(){function t(t){if(!N.col(t))try{return document.querySelectorAll(t)}catch(t){}}function e(t,e){for(var n=t.length,r=2<=arguments.length?arguments[1]:void 0,o=[],a=0;a<n;a++)if(a in t){var i=t[a];e.call(r,i,a,t)&&o.push(i)}return o}function n(t){return t.reduce(function(t,e){return t.concat(N.arr(e)?n(e):e)},[])}function r(e){return N.arr(e)?e:(N.str(e)&&(e=t(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function o(t,e){return t.some(function(t){return t===e})}function a(t){var e,n={};for(e in t)n[e]=t[e];return n}function i(t,e){var n,r=a(t);for(n in t)r[n]=e.hasOwnProperty(n)?e[n]:t[n];return r}function s(t,e){var n,r=a(t);for(n in e)r[n]=N.und(t[n])?e[n]:t[n];return r}function f(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,n,r){return e+e+n+n+r+r});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var n=parseInt(e[2],16);e=parseInt(e[3],16);return"rgba("+t+","+n+","+e+",1)"}function c(t){function e(t,e,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:.5>n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,o=parseInt(n[3])/100;n=n[4]||1;if(0==r)o=r=t=o;else{var a=.5>o?o*(1+r):o+r-o*r,i=2*o-a;o=e(i,a,t+1/3),r=e(i,a,t);t=e(i,a,t-1/3)}return"rgba("+255*o+","+255*r+","+255*t+","+n+")"}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function d(t){return-1<t.indexOf("translate")||"perspective"===t?"px":-1<t.indexOf("rotate")||-1<t.indexOf("skew")?"deg":void 0}function p(t,e){return N.fnc(t)?t(e.target,e.id,e.total):t}function m(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function y(t,e){return N.dom(t)&&o(L,e)?"transform":N.dom(t)&&(t.getAttribute(e)||N.svg(t)&&t[e])?"attribute":N.dom(t)&&"transform"!==e&&m(t,e)?"css":null!=t[e]?"object":void 0}function h(t,n){var r=d(n);r=-1<n.indexOf("scale")?1:0+r;if(t=t.style.transform,!t)return r;for(var o=[],a=[],i=[],u=/(\w+)\((.+?)\)/g;o=u.exec(t);)a.push(o[1]),i.push(o[2]);return t=e(i,function(t,e){return a[e]===n}),t.length?t[0]:r}function g(t,e){switch(y(t,e)){case"transform":return h(t,e);case"css":return m(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function v(t,e){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var r=l(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(n[0],"")),n[0][0]){case"+":return e+t+r;case"-":return e-t+r;case"*":return e*t+r}}function b(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x(t){t=t.points;for(var e,n=0,r=0;r<t.numberOfItems;r++){var o=t.getItem(r);0<r&&(n+=b(e,o)),e=o}return n}function w(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return b({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return x(t);case"polygon":var e=t.points;return x(t)+b(e.getItem(e.numberOfItems-1),e.getItem(0))}}function _(t,e){function n(n){return n=void 0===n?0:n,t.el.getPointAtLength(1<=e+n?e+n:0)}var r=n(),o=n(-1),a=n(1);switch(t.property){case"x":return r.x;case"y":return r.y;case"angle":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}}function S(t,e){var n,r=/-?\d*\.?\d+/g;if(n=N.pth(t)?t.totalLength:t,N.col(n))if(N.rgb(n)){var o=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n);n=o?"rgba("+o[1]+",1)":n}else n=N.hex(n)?f(n):N.hsl(n)?c(n):void 0;else o=(o=l(n))?n.substr(0,n.length-o.length):n,n=e&&!/\s/g.test(n)?o+e:o;return n+="",{original:n,numbers:n.match(r)?n.match(r).map(Number):[0],strings:N.str(t)||e?n.split(r):[]}}function A(t){return t=t?n(N.arr(t)?t.map(r):r(t)):[],e(t,function(t,e,n){return n.indexOf(t)===e})}function M(t){var e=A(t);return e.map(function(t,n){return{target:t,id:n,total:e.length}})}function O(t,e){var n=a(e);if(N.arr(t)){var o=t.length;2!==o||N.obj(t[0])?N.fnc(e.duration)||(n.duration=e.duration/o):t={value:t}}return r(t).map(function(t,n){return n=n?0:e.delay,t=N.obj(t)&&!N.pth(t)?t:{value:t},N.und(t.delay)&&(t.delay=n),t}).map(function(t){return s(t,n)})}function I(t,e){var n,r={};for(n in t){var o=p(t[n],e);N.arr(o)&&(o=o.map(function(t){return p(t,e)}),1===o.length&&(o=o[0])),r[n]=o}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}function P(t){return N.arr(t)?R.apply(this,t):X[t]}function j(t,e){var n;return t.tweens.map(function(r){r=I(r,e);var o=r.value,a=g(e.target,t.name),i=n?n.to.original:a,u=(i=N.arr(o)?o[0]:i,v(N.arr(o)?o[1]:o,i));a=l(u)||l(i)||l(a);return r.from=S(i,a),r.to=S(u,a),r.start=n?n.end:t.offset,r.end=r.start+r.delay+r.duration,r.easing=P(r.easing),r.elasticity=(1e3-Math.min(Math.max(r.elasticity,1),999))/1e3,r.isPath=N.pth(o),r.isColor=N.col(r.from.original),r.isColor&&(r.round=1),n=r})}function C(t,r){return e(n(t.map(function(t){return r.map(function(e){var n=y(t.target,e.name);if(n){var r=j(e,t);e={type:n,property:e.name,animatable:t,tweens:r,duration:r[r.length-1].end,delay:r[0].delay}}else e=void 0;return e})})),function(t){return!N.und(t)})}function k(t,e,n,r){var o="delay"===t;return e.length?(o?Math.min:Math.max).apply(Math,e.map(function(e){return e[t]})):o?r.delay:n.offset+r.delay+r.duration}function E(t){var e,n=i(V,t),r=i($,t),o=M(t.targets),a=[],u=s(n,r);for(e in t)u.hasOwnProperty(e)||"targets"===e||a.push({name:e,offset:u.offset,tweens:O(t[e],r)});return t=C(o,a),s(n,{children:[],animatables:o,animations:t,duration:k("duration",t,n,r),delay:k("delay",t,n,r)})}function F(t){function n(){return window.Promise&&new Promise(function(t){return l=t})}function r(t){return p.reversed?p.duration-t:t}function o(t){for(var n=0,r={},o=p.animations,a=o.length;n<a;){var i=o[n],u=i.animatable,s=i.tweens,f=s.length-1,c=s[f];f&&(c=e(s,function(e){return t<e.end})[0]||c);s=Math.min(Math.max(t-c.start-c.delay,0),c.duration)/c.duration;for(var l=isNaN(s)?1:c.easing(s,c.elasticity),d=(s=c.to.strings,c.round),y=(f=[],void 0),h=(y=c.to.numbers.length,0);h<y;h++){var g=void 0,v=(g=c.to.numbers[h],c.from.numbers[h]);g=c.isPath?_(c.value,l*g):v+l*(g-v);d&&(c.isColor&&2<h||(g=Math.round(g*d)/d)),f.push(g)}if(c=s.length)for(y=s[0],l=0;l<c;l++)d=s[l+1],h=f[l],isNaN(h)||(y=d?y+(h+d):y+(h+" "));else y=f[0];Y[i.type](u.target,i.property,y,r,u.id),i.currentValue=y,n++}if(n=Object.keys(r).length)for(o=0;o<n;o++)T||(T=m(document.body,"transform")?"transform":"-webkit-transform"),p.animatables[o].target.style[T]=r[o].join(" ");p.currentTime=t,p.progress=t/p.duration*100}function a(t){p[t]&&p[t](p)}function i(){p.remaining&&!0!==p.remaining&&p.remaining--}function u(t){var e=p.duration,u=p.offset,m=u+p.delay,y=p.currentTime,h=p.reversed,g=r(t);if(p.children.length){var v=p.children,b=v.length;if(g>=p.currentTime)for(var x=0;x<b;x++)v[x].seek(g);else for(;b--;)v[b].seek(g)}(g>=m||!e)&&(p.began||(p.began=!0,a("begin")),a("run")),g>u&&g<e?o(g):(g<=u&&0!==y&&(o(0),h&&i()),(g>=e&&y!==e||!e)&&(o(e),h||i())),a("update"),t>=e&&(p.remaining?(f=s,"alternate"===p.direction&&(p.reversed=!p.reversed)):(p.pause(),p.completed||(p.completed=!0,a("complete"),"Promise"in window&&(l(),d=n()))),c=0)}t=void 0===t?{}:t;var s,f,c=0,l=null,d=n(),p=E(t);return p.reset=function(){var t=p.direction,e=p.loop;for(p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.completed=!1,p.reversed="reverse"===t,p.remaining="alternate"===t&&1===e?2:e,o(0),t=p.children.length;t--;)p.children[t].reset()},p.tick=function(t){s=t,f||(f=s),u((c+s-f)*F.speed)},p.seek=function(t){u(r(t))},p.pause=function(){var t=q.indexOf(p);-1<t&&q.splice(t,1),p.paused=!0},p.play=function(){p.paused&&(p.paused=!1,f=0,c=r(p.currentTime),q.push(p),B||Z())},p.reverse=function(){p.reversed=!p.reversed,f=0,c=r(p.currentTime)},p.restart=function(){p.pause(),p.reset(),p.play()},p.finished=d,p.reset(),p.autoplay&&p.play(),p}var T,V={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},$={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},L="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),N={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return N.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||N.svg(t)},str:function(t){return"string"===typeof t},fnc:function(t){return"function"===typeof t},und:function(t){return"undefined"===typeof t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return N.hex(t)||N.rgb(t)||N.hsl(t)}},R=function(){function t(t,e,n){return(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t}return function(e,n,r,o){if(0<=e&&1>=e&&0<=r&&1>=r){var a=new Float32Array(11);if(e!==n||r!==o)for(var i=0;11>i;++i)a[i]=t(.1*i,e,r);return function(i){if(e===n&&r===o)return i;if(0===i)return 0;if(1===i)return 1;for(var u=0,s=1;10!==s&&a[s]<=i;++s)u+=.1;--s;s=u+(i-a[s])/(a[s+1]-a[s])*.1;var f=3*(1-3*r+3*e)*s*s+2*(3*r-6*e)*s+3*e;if(.001<=f){for(u=0;4>u;++u){if(f=3*(1-3*r+3*e)*s*s+2*(3*r-6*e)*s+3*e,0===f)break;var c=t(s,e,r)-i;s=s-c/f}i=s}else if(0===f)i=s;else{s=u,u=u+.1;var l=0;do{c=s+(u-s)/2,f=t(c,e,r)-i,0<f?u=c:s=c}while(1e-7<Math.abs(f)&&10>++l);i=c}return t(i,n,o)}}}}(),X=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},o={linear:R(.25,.25,.75,.75)},a={};for(e in r)a.type=e,r[a.type].forEach(function(t){return function(e,r){o["ease"+t.type+n[r]]=N.fnc(e)?e:R.apply(u,e)}}(a)),a={type:a.type};return o}(),Y={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,o){r[o]||(r[o]=[]),r[o].push(e+"("+n+")")}},q=[],B=0,Z=function(){function t(){B=requestAnimationFrame(e)}function e(e){var n=q.length;if(n){for(var r=0;r<n;)q[r]&&q[r].tick(e),r++;t()}else cancelAnimationFrame(B),B=0}return t}();return F.version="2.2.0",F.speed=1,F.running=q,F.remove=function(t){t=A(t);for(var e=q.length;e--;)for(var n=q[e],r=n.animations,a=r.length;a--;)o(t,r[a].animatable.target)&&(r.splice(a,1),r.length||n.pause())},F.getValue=g,F.path=function(e,n){var r=N.str(e)?t(e)[0]:e,o=n||100;return function(t){return{el:r,property:t,totalLength:w(r)*(o/100)}}},F.setDashoffset=function(t){var e=w(t);return t.setAttribute("stroke-dasharray",e),e},F.bezier=R,F.easings=X,F.timeline=function(t){var e=F(t);return e.pause(),e.duration=0,e.add=function(n){return e.children.forEach(function(t){t.began=!0,t.completed=!0}),r(n).forEach(function(n){var r=s(n,i($,t||{}));r.targets=r.targets||t.targets,n=e.duration;var o=r.offset;r.autoplay=!1,r.direction=e.direction,r.offset=N.und(o)?n:v(o,n),e.began=!0,e.completed=!0,e.seek(r.offset),r=F(r),r.began=!0,r.completed=!0,r.duration>n&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},F.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},F})}).call(e,n("DuR2"))},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n}})["default"]});
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["animated-number-vue"]=e():t["animated-number-vue"]=e()})("undefined"!==typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./",n(n.s=0)}({0:function(t,e,n){t.exports=n("1HMB")},"1HMB":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("A5qe"),o=n.n(r),a={props:{value:{type:[Number,String],required:!0},formatValue:{type:Function,default:function(t){return t}},duration:{type:Number,default:1e3}},data:function(){return{animatedValue:0}},mounted:function(){this.animateValue(this.value)},watch:{value:function(t){this.animateValue(t)}},methods:{animateValue:function(t){o()({targets:this,animatedValue:t,duration:this.duration})}}},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",[t._v(t._s(t.formatValue(t.animatedValue)))])},u=[];function s(t,e,n,r,o,a,i,u){t=t||{};var s=typeof t.default;"object"!==s&&"function"!==s||(t=t.default);var f,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId=a),i?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=f):o&&(f=u?function(){o.call(this,this.$root.$options.shadowRoot)}:o),f)if(c.functional){c._injectStyles=f;var l=c.render;c.render=function(t,e){return f.call(e),l(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,f):[f]}return{exports:t,options:c}}var f=!1,c=null,l=null,d=null,p=s(a,i,u,f,c,l,d);e["default"]=p.exports},A5qe:function(t,e,n){(function(n){var r,o,a,i={scope:{}};i.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},i.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof n&&null!=n?n:t},i.global=i.getGlobal(this),i.SYMBOL_PREFIX="jscomp_symbol_",i.initSymbol=function(){i.initSymbol=function(){},i.global.Symbol||(i.global.Symbol=i.Symbol)},i.symbolCounter_=0,i.Symbol=function(t){return i.SYMBOL_PREFIX+(t||"")+i.symbolCounter_++},i.initSymbolIterator=function(){i.initSymbol();var t=i.global.Symbol.iterator;t||(t=i.global.Symbol.iterator=i.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&i.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return i.arrayIterator(this)}}),i.initSymbolIterator=function(){}},i.arrayIterator=function(t){var e=0;return i.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},i.iteratorPrototype=function(t){return i.initSymbolIterator(),t={next:t},t[i.global.Symbol.iterator]=function(){return this},t},i.array=i.array||{},i.iteratorFromArray=function(t,e){i.initSymbolIterator(),t instanceof String&&(t+="");var n=0,r={next:function(){if(n<t.length){var o=n++;return{value:e(o,t[o]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r},i.polyfill=function(t,e,n,r){if(e){for(n=i.global,t=t.split("."),r=0;r<t.length-1;r++){var o=t[r];o in n||(n[o]={}),n=n[o]}t=t[t.length-1],r=n[t],e=e(r),e!=r&&null!=e&&i.defineProperty(n,t,{configurable:!0,writable:!0,value:e})}},i.polyfill("Array.prototype.keys",function(t){return t||function(){return i.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var u=this;(function(n,i){o=[],r=i,a="function"===typeof r?r.apply(e,o):r,void 0===a||(t.exports=a)})(0,function(){function t(t){if(!N.col(t))try{return document.querySelectorAll(t)}catch(t){}}function e(t,e){for(var n=t.length,r=2<=arguments.length?arguments[1]:void 0,o=[],a=0;a<n;a++)if(a in t){var i=t[a];e.call(r,i,a,t)&&o.push(i)}return o}function n(t){return t.reduce(function(t,e){return t.concat(N.arr(e)?n(e):e)},[])}function r(e){return N.arr(e)?e:(N.str(e)&&(e=t(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function o(t,e){return t.some(function(t){return t===e})}function a(t){var e,n={};for(e in t)n[e]=t[e];return n}function i(t,e){var n,r=a(t);for(n in t)r[n]=e.hasOwnProperty(n)?e[n]:t[n];return r}function s(t,e){var n,r=a(t);for(n in e)r[n]=N.und(t[n])?e[n]:t[n];return r}function f(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,n,r){return e+e+n+n+r+r});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var n=parseInt(e[2],16);e=parseInt(e[3],16);return"rgba("+t+","+n+","+e+",1)"}function c(t){function e(t,e,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:.5>n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,o=parseInt(n[3])/100;n=n[4]||1;if(0==r)o=r=t=o;else{var a=.5>o?o*(1+r):o+r-o*r,i=2*o-a;o=e(i,a,t+1/3),r=e(i,a,t);t=e(i,a,t-1/3)}return"rgba("+255*o+","+255*r+","+255*t+","+n+")"}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function d(t){return-1<t.indexOf("translate")||"perspective"===t?"px":-1<t.indexOf("rotate")||-1<t.indexOf("skew")?"deg":void 0}function p(t,e){return N.fnc(t)?t(e.target,e.id,e.total):t}function m(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function y(t,e){return N.dom(t)&&o(L,e)?"transform":N.dom(t)&&(t.getAttribute(e)||N.svg(t)&&t[e])?"attribute":N.dom(t)&&"transform"!==e&&m(t,e)?"css":null!=t[e]?"object":void 0}function h(t,n){var r=d(n);r=-1<n.indexOf("scale")?1:0+r;if(t=t.style.transform,!t)return r;for(var o=[],a=[],i=[],u=/(\w+)\((.+?)\)/g;o=u.exec(t);)a.push(o[1]),i.push(o[2]);return t=e(i,function(t,e){return a[e]===n}),t.length?t[0]:r}function g(t,e){switch(y(t,e)){case"transform":return h(t,e);case"css":return m(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function v(t,e){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var r=l(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(n[0],"")),n[0][0]){case"+":return e+t+r;case"-":return e-t+r;case"*":return e*t+r}}function b(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x(t){t=t.points;for(var e,n=0,r=0;r<t.numberOfItems;r++){var o=t.getItem(r);0<r&&(n+=b(e,o)),e=o}return n}function w(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return b({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return x(t);case"polygon":var e=t.points;return x(t)+b(e.getItem(e.numberOfItems-1),e.getItem(0))}}function _(t,e){function n(n){return n=void 0===n?0:n,t.el.getPointAtLength(1<=e+n?e+n:0)}var r=n(),o=n(-1),a=n(1);switch(t.property){case"x":return r.x;case"y":return r.y;case"angle":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}}function S(t,e){var n,r=/-?\d*\.?\d+/g;if(n=N.pth(t)?t.totalLength:t,N.col(n))if(N.rgb(n)){var o=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n);n=o?"rgba("+o[1]+",1)":n}else n=N.hex(n)?f(n):N.hsl(n)?c(n):void 0;else o=(o=l(n))?n.substr(0,n.length-o.length):n,n=e&&!/\s/g.test(n)?o+e:o;return n+="",{original:n,numbers:n.match(r)?n.match(r).map(Number):[0],strings:N.str(t)||e?n.split(r):[]}}function A(t){return t=t?n(N.arr(t)?t.map(r):r(t)):[],e(t,function(t,e,n){return n.indexOf(t)===e})}function M(t){var e=A(t);return e.map(function(t,n){return{target:t,id:n,total:e.length}})}function O(t,e){var n=a(e);if(N.arr(t)){var o=t.length;2!==o||N.obj(t[0])?N.fnc(e.duration)||(n.duration=e.duration/o):t={value:t}}return r(t).map(function(t,n){return n=n?0:e.delay,t=N.obj(t)&&!N.pth(t)?t:{value:t},N.und(t.delay)&&(t.delay=n),t}).map(function(t){return s(t,n)})}function I(t,e){var n,r={};for(n in t){var o=p(t[n],e);N.arr(o)&&(o=o.map(function(t){return p(t,e)}),1===o.length&&(o=o[0])),r[n]=o}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}function P(t){return N.arr(t)?R.apply(this,t):X[t]}function j(t,e){var n;return t.tweens.map(function(r){r=I(r,e);var o=r.value,a=g(e.target,t.name),i=n?n.to.original:a,u=(i=N.arr(o)?o[0]:i,v(N.arr(o)?o[1]:o,i));a=l(u)||l(i)||l(a);return r.from=S(i,a),r.to=S(u,a),r.start=n?n.end:t.offset,r.end=r.start+r.delay+r.duration,r.easing=P(r.easing),r.elasticity=(1e3-Math.min(Math.max(r.elasticity,1),999))/1e3,r.isPath=N.pth(o),r.isColor=N.col(r.from.original),r.isColor&&(r.round=1),n=r})}function C(t,r){return e(n(t.map(function(t){return r.map(function(e){var n=y(t.target,e.name);if(n){var r=j(e,t);e={type:n,property:e.name,animatable:t,tweens:r,duration:r[r.length-1].end,delay:r[0].delay}}else e=void 0;return e})})),function(t){return!N.und(t)})}function k(t,e,n,r){var o="delay"===t;return e.length?(o?Math.min:Math.max).apply(Math,e.map(function(e){return e[t]})):o?r.delay:n.offset+r.delay+r.duration}function E(t){var e,n=i(V,t),r=i($,t),o=M(t.targets),a=[],u=s(n,r);for(e in t)u.hasOwnProperty(e)||"targets"===e||a.push({name:e,offset:u.offset,tweens:O(t[e],r)});return t=C(o,a),s(n,{children:[],animatables:o,animations:t,duration:k("duration",t,n,r),delay:k("delay",t,n,r)})}function F(t){function n(){return window.Promise&&new Promise(function(t){return l=t})}function r(t){return p.reversed?p.duration-t:t}function o(t){for(var n=0,r={},o=p.animations,a=o.length;n<a;){var i=o[n],u=i.animatable,s=i.tweens,f=s.length-1,c=s[f];f&&(c=e(s,function(e){return t<e.end})[0]||c);s=Math.min(Math.max(t-c.start-c.delay,0),c.duration)/c.duration;for(var l=isNaN(s)?1:c.easing(s,c.elasticity),d=(s=c.to.strings,c.round),y=(f=[],void 0),h=(y=c.to.numbers.length,0);h<y;h++){var g=void 0,v=(g=c.to.numbers[h],c.from.numbers[h]);g=c.isPath?_(c.value,l*g):v+l*(g-v);d&&(c.isColor&&2<h||(g=Math.round(g*d)/d)),f.push(g)}if(c=s.length)for(y=s[0],l=0;l<c;l++)d=s[l+1],h=f[l],isNaN(h)||(y=d?y+(h+d):y+(h+" "));else y=f[0];q[i.type](u.target,i.property,y,r,u.id),i.currentValue=y,n++}if(n=Object.keys(r).length)for(o=0;o<n;o++)T||(T=m(document.body,"transform")?"transform":"-webkit-transform"),p.animatables[o].target.style[T]=r[o].join(" ");p.currentTime=t,p.progress=t/p.duration*100}function a(t){p[t]&&p[t](p)}function i(){p.remaining&&!0!==p.remaining&&p.remaining--}function u(t){var e=p.duration,u=p.offset,m=u+p.delay,y=p.currentTime,h=p.reversed,g=r(t);if(p.children.length){var v=p.children,b=v.length;if(g>=p.currentTime)for(var x=0;x<b;x++)v[x].seek(g);else for(;b--;)v[b].seek(g)}(g>=m||!e)&&(p.began||(p.began=!0,a("begin")),a("run")),g>u&&g<e?o(g):(g<=u&&0!==y&&(o(0),h&&i()),(g>=e&&y!==e||!e)&&(o(e),h||i())),a("update"),t>=e&&(p.remaining?(f=s,"alternate"===p.direction&&(p.reversed=!p.reversed)):(p.pause(),p.completed||(p.completed=!0,a("complete"),"Promise"in window&&(l(),d=n()))),c=0)}t=void 0===t?{}:t;var s,f,c=0,l=null,d=n(),p=E(t);return p.reset=function(){var t=p.direction,e=p.loop;for(p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.completed=!1,p.reversed="reverse"===t,p.remaining="alternate"===t&&1===e?2:e,o(0),t=p.children.length;t--;)p.children[t].reset()},p.tick=function(t){s=t,f||(f=s),u((c+s-f)*F.speed)},p.seek=function(t){u(r(t))},p.pause=function(){var t=Y.indexOf(p);-1<t&&Y.splice(t,1),p.paused=!0},p.play=function(){p.paused&&(p.paused=!1,f=0,c=r(p.currentTime),Y.push(p),B||Z())},p.reverse=function(){p.reversed=!p.reversed,f=0,c=r(p.currentTime)},p.restart=function(){p.pause(),p.reset(),p.play()},p.finished=d,p.reset(),p.autoplay&&p.play(),p}var T,V={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},$={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},L="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),N={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return N.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||N.svg(t)},str:function(t){return"string"===typeof t},fnc:function(t){return"function"===typeof t},und:function(t){return"undefined"===typeof t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return N.hex(t)||N.rgb(t)||N.hsl(t)}},R=function(){function t(t,e,n){return(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t}return function(e,n,r,o){if(0<=e&&1>=e&&0<=r&&1>=r){var a=new Float32Array(11);if(e!==n||r!==o)for(var i=0;11>i;++i)a[i]=t(.1*i,e,r);return function(i){if(e===n&&r===o)return i;if(0===i)return 0;if(1===i)return 1;for(var u=0,s=1;10!==s&&a[s]<=i;++s)u+=.1;--s;s=u+(i-a[s])/(a[s+1]-a[s])*.1;var f=3*(1-3*r+3*e)*s*s+2*(3*r-6*e)*s+3*e;if(.001<=f){for(u=0;4>u;++u){if(f=3*(1-3*r+3*e)*s*s+2*(3*r-6*e)*s+3*e,0===f)break;var c=t(s,e,r)-i;s=s-c/f}i=s}else if(0===f)i=s;else{s=u,u=u+.1;var l=0;do{c=s+(u-s)/2,f=t(c,e,r)-i,0<f?u=c:s=c}while(1e-7<Math.abs(f)&&10>++l);i=c}return t(i,n,o)}}}}(),X=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},o={linear:R(.25,.25,.75,.75)},a={};for(e in r)a.type=e,r[a.type].forEach(function(t){return function(e,r){o["ease"+t.type+n[r]]=N.fnc(e)?e:R.apply(u,e)}}(a)),a={type:a.type};return o}(),q={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,o){r[o]||(r[o]=[]),r[o].push(e+"("+n+")")}},Y=[],B=0,Z=function(){function t(){B=requestAnimationFrame(e)}function e(e){var n=Y.length;if(n){for(var r=0;r<n;)Y[r]&&Y[r].tick(e),r++;t()}else cancelAnimationFrame(B),B=0}return t}();return F.version="2.2.0",F.speed=1,F.running=Y,F.remove=function(t){t=A(t);for(var e=Y.length;e--;)for(var n=Y[e],r=n.animations,a=r.length;a--;)o(t,r[a].animatable.target)&&(r.splice(a,1),r.length||n.pause())},F.getValue=g,F.path=function(e,n){var r=N.str(e)?t(e)[0]:e,o=n||100;return function(t){return{el:r,property:t,totalLength:w(r)*(o/100)}}},F.setDashoffset=function(t){var e=w(t);return t.setAttribute("stroke-dasharray",e),e},F.bezier=R,F.easings=X,F.timeline=function(t){var e=F(t);return e.pause(),e.duration=0,e.add=function(n){return e.children.forEach(function(t){t.began=!0,t.completed=!0}),r(n).forEach(function(n){var r=s(n,i($,t||{}));r.targets=r.targets||t.targets,n=e.duration;var o=r.offset;r.autoplay=!1,r.direction=e.direction,r.offset=N.und(o)?n:v(o,n),e.began=!0,e.completed=!0,e.seek(r.offset),r=F(r),r.began=!0,r.completed=!0,r.duration>n&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},F.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},F})}).call(e,n("DuR2"))},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n}})["default"]});
//# sourceMappingURL=animated-number-vue.umd.min.js.map
{
"name": "animated-number-vue",
"version": "0.0.3",
"version": "0.0.4",
"private": false,

@@ -36,4 +36,4 @@ "scripts": {

"license": "MIT",
"unpkg": "umd/animated-number-vue.umd.min.js",
"jsdelivr": "umd/animated-number-vue.umd.min.js"
"unpkg": "dist/animated-number-vue.umd.min.js",
"jsdelivr": "dist/animated-number-vue.umd.min.js"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet