animated-timeline
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
@@ -1,1 +0,1 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("invariant"),require("react"),require("svg-tag-names"),require("html-tags"),require("rebound"),require("prop-types"),require("fastdom"));else if("function"==typeof define&&define.amd)define(["invariant","react","svg-tag-names","html-tags","rebound","prop-types","fastdom"],t);else{var n="object"==typeof exports?t(require("invariant"),require("react"),require("svg-tag-names"),require("html-tags"),require("rebound"),require("prop-types"),require("fastdom")):t(e.invariant,e.react,e["svg-tag-names"],e["html-tags"],e.rebound,e["prop-types"],e.fastdom);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e,t,n,r,o,i,a){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=24)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAvailableTransforms=t.createTimeline=t.animated=t.getAnimatables=t.parseElements=t.validateValue=t.getOriginalelementValue=t.getAnimationType=t.getCSSValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=y(n(3)),u=y(n(0)),s=y(n(9)),c=y(n(8)),l=n(2),f=n(19),d=n(4),p=n(5),m=n(18),v=n(7);function y(e){return e&&e.__esModule?e:{default:e}}function g(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var b=void 0,h=[].concat(g(s.default),g(c.default)),A=!1,O=function(e,t,n){return Math.min(Math.max(e,t),n)},w=function(e,t){return"function"!=typeof e?e:e(t.target,t.id)},T=t.getCSSValue=function(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue((0,l.stringToHyphens)(t))||"0"},S=t.getAnimationType=function(e,t){return(0,l.isDOM)(e)&&(0,l.arrayContains)(m.validTransforms,t)?"transform":(0,l.isDOM)(e)&&(e.getAttribute(t)||(0,l.isSVG)(e)&&e[t])?"attribute":(0,l.isDOM)(e)&&"transform"!==t&&T(e,t)?"css":null!=e[t]?"object":void 0},j=t.getOriginalelementValue=function(e,t){switch(S(e,t)){case"transform":return(0,m.getTransformValue)(e,t);case"css":return T(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0},_=t.validateValue=function(e,t){if((0,l.isCol)(e))return(0,l.colorToRgb)(e);var n=(0,l.getUnit)(e),r=n?e.substr(0,e.length-n.length):e;return t&&!/\s/g.test(e)?r+t:r},M=function(e,t){var n=/-?\d*\.?\d+/g,r=_((0,l.isPath)(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:(0,l.isString)(e)||t?r.split(n):[]}},P=t.parseElements=function(e){var t=e?(0,l.flattenArray)((0,l.isArray)(e)?e.map(l.toArray):(0,l.toArray)(e)):[];return(0,l.filterArray)(t,function(e,t,n){return n.indexOf(e)===t})},C=t.getAnimatables=function(e){var t=P(e);return t.map(function(e,n){return{element:e,id:n,total:t.length}})},x=function(e,t){var n=(0,l.clone)(t);if((0,l.isArray)(e)){var r=e.length;2!==r||(0,l.isObject)(e[0])?(0,l.isFunc)(t.duration)||(n.duration=t.duration/r):e={value:e}}return(0,l.toArray)(e).map(function(e,n){var r=n?0:t.delay,o=(0,l.isObject)(e)?e:{value:e};return(0,l.isUnd)(o.delay)&&(o.delay=r),o}).map(function(e){return(0,l.mergeObjects)(e,n)})},E=function(e,t,n){var r=[],o=(0,l.mergeObjects)(e,t);for(var i in n)o.hasOwnProperty(i)||"element"===i&&"multipleEl"===i||r.push({name:i,offset:o.offset,tweens:x(n[i],t)});return r},V=function(e,t){var n=void 0;return e.tweens.map(function(r){var o,i=function(e,t){var n={};for(var r in e){var o=w(e[r],t);(0,l.isArray)(o)&&1===(o=o.map(function(e){return w(e,t)})).length&&(o=o[0]),n[r]=o}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(r,t),a=i.value,u=j(t.element,e.name),s=n?n.to.original:u,c=(0,l.isArray)(a)?a[0]:s,f=(0,l.getRelativeValue)((0,l.isArray)(a)?a[1]:a,c),m=(0,l.getUnit)(f)||(0,l.getUnit)(c)||(0,l.getUnit)(u);return i.from=M(c,m),i.to=M(f,m),i.start=n?n.end:e.offset,i.end=i.start+i.delay+i.duration,i.easing=(o=i.easing,(0,l.isArray)(o)?p.bezier.apply(void 0,o):d.easings[o]),i.elasticity=(1e3-O(i.elasticity,1,999))/1e3,i.isColor=(0,l.isCol)(i.from.original),i.isColor&&(i.round=1),n=i,i})},k={css:function(e,t,n){return(0,v.batchMutation)(function(){return e.style[t]=n})},attribute:function(e,t,n){return(0,v.batchMutation)(function(){return e.setAttribute(t,n)})},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,o){r[o]||(r[o]=[]),r[o].push(t+"("+n+")")}};function R(e,t){return(0,l.filterArray)((0,l.flattenArray)(e.map(function(e){return t.map(function(t){return function(e,t){var n=S(e.element,t.name);if(n){var r=V(t,e);return{type:n,property:t.name,animatable:e,tweens:r,duration:r[r.length-1].end,delay:r[0].delay}}}(e,t)})})),function(e){return!(0,l.isUnd)(e)})}function U(e,t,n,r){var o="delay"===e;return t.length?(o?Math.min:Math.max).apply(Math,t.map(function(t){return t[e]})):o?r.delay:n.offset+r.delay+r.duration}var F=function(e){["onStart","onUpdate","tick","onComplete"].forEach(function(t){e.hasOwnProperty(t)&&(delete e[t],console.error("Lifecycle hook cannot be passed as a parameter to Timeline function. They are accessible only via the timeline instance."))})};function N(e,t){return function(n){function r(e){!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return n.targets=[],n.addTargets=function(e){n.targets=[].concat(g(n.targets),[e])},t.elements&&Array.isArray(t.elements)||(t.elements=[]),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,a.default.PureComponent),i(r,[{key:"componentDidMount",value:function(){t.elements=[].concat(g(t.elements),[this.targets])}},{key:"componentWillUnmount",value:function(){t.elements=[]}},{key:"render",value:function(){return a.default.createElement(e,o({},this.props,{ref:this.addTargets}))}}]),r}()}var q=[],D=0,L=function(){function e(){D=requestAnimationFrame(t)}function t(t){var n=q.length;if(n){for(var r=0;r<n;)q[r]&&q[r].frameLoop(t),r++;e()}else cancelAnimationFrame(D),D=0}return e}();function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,o=0,i=function(e){F(e);var t=(0,l.replaceObjectProps)((0,f.getDefaultInstanceParams)(),e),n=(0,l.replaceObjectProps)((0,f.getDefaultTweensParams)(),e),r=C(e.el||e.multipleEl),o=R(r,E(t,n,e));return(0,l.mergeObjects)(t,{children:[],animatables:r,animations:o,duration:U("duration",o,t,n),delay:U("delay",o,t,n)})}(e),a=null;function s(){return window.Promise&&new Promise(function(e){return a=e})}var c=s();function d(){i.reversed=!i.reversed}function p(e){return i.reversed?i.duration-e:e}function m(e,t,n,r){var o=e.animatables[t].element;if(n[t])return(0,v.batchMutation)(function(){return o.style[r]=n[t].join(" ")})}function y(e){for(var t=0,n={},r=i.animations,o=r.length;t<o;){var a=r[t],u=a.animatable,s=a.tweens,c=s.length-1,f=s[c];c&&(f=(0,l.filterArray)(s,function(t){return e<t.end})[0]||f);for(var d=O(e-f.start-f.delay,0,f.duration)/f.duration,p=isNaN(d)?1:f.easing(d,f.elasticity),y=f.to.strings,g=f.round,h=[],A=void 0,w=f.to.numbers.length,S=0;S<w;S++){var j=void 0,_=f.to.numbers[S],M=f.from.numbers[S];j=M+p*(_-M),g&&(f.isColor&&S>2||(j=Math.round(j*g)/g)),h.push(j)}var P=y.length;if(P){A=y[0];for(var C=0;C<P;C++){y[C];var x=y[C+1],E=h[C];isNaN(E)||(A+=x?E+x:E+" ")}}else A=h[0];k[a.type](u.element,a.property,A,n,u.id),a.currentValue=A,t++}var V=Object.keys(n).length;if(V)for(var R=0;R<V;R++)b||function(){var e="transform";b=(0,v.batchRead)(function(){return T(document.body,e)})?e:"-webkit-"+e}(),m(i,R,n,b);i.currentTime=e,i.progress=e/i.duration*100}function g(e){var t={completed:i.completed,progress:i.progress,duration:i.duration,remaining:i.remaining,reversed:i.reversed,currentTime:i.currentTime,began:i.began,paused:i.paused,controller:{start:i.start,stop:i.stop,restart:i.restart,reverse:i.reverse,reset:i.reset}};i[e]&&i[e](t)}function w(){i.remaining&&!0!==i.remaining&&i.remaining--}function S(e){var r=i.duration,u=i.offset,l=u+i.delay,f=i.currentTime,m=i.reversed,b=p(e);i.children.length&&function(e){var t=i.children,n=t.length;if(e>=i.currentTime)for(var r=0;r<n;r++)t[r].seek(e);else for(var o=n;o--;)t[o].seek(e)}(b),(b>=l||!r)&&(i.began||(i.began=!0,g("onStart"))),b>u&&b<r?y(b):(b<=u&&0!==f&&(y(0),m&&w()),(b>=r&&f!==r||!r)&&(y(r),m||w())),g("onUpdate"),e>=r&&(i.remaining?(n=t,"alternate"===i.direction&&d()):(i.stop(),i.completed||(i.completed=!0,B(i.animatables),(0,v.emptyScheduledJobs)(),g("onComplete"),"Promise"in window&&(A||a({msg:"Animation completed!"}),c=s()))),o=0)}function j(e,t){if(0!==i.children.length){for(var n=void 0,r=P(e),o=i.children.length;o--;)for(var a=i.children[o].animations,u=a.length;u--;)(0,l.arrayContains)(r,a[u].animatable.element)&&(n=i.children[o][t]);return n}}return Object.assign(i,h.reduce(function(e,t){return e[t]=N(t.toLowerCase(),i),e},{})),i.reset=function(){var e=i.direction,t=i.iterations;i.currentTime=0,i.progress=0,i.paused=!0,i.began=!1,i.completed=!1,i.reversed="reverse"===e,i.remaining="alternate"===e&&1===t?2:t,y(0);for(var n=i.children.length;n--;)i.children[n].reset()},i.frameLoop=function(r){var a=!1;t=r,n||(n=t),e.speed&&(a=!0),S((o+t-n)*(a?e.speed:i.speed?i.speed:1))},i.speed=1,i.setSpeed=function(t){(0,u.default)("number"==typeof t||"string"==typeof t,"setSpeed() expected a number or string value for speed but instead got "+(void 0===t?"undefined":r(t))+"."),e.speed=t,i.speed=t},i.seek=function(e){S(p(e))},i.stop=function(){var e=q.indexOf(i);e>-1&&q.splice(e,1),i.paused=!0},i.start=function(){i.paused&&(i.paused=!1,n=0,o=p(i.currentTime),q.push(i),D||L())},i.reverse=function(){d(),n=0,o=p(i.currentTime)},i.restart=function(){i.stop(),i.reset(),i.start()},i.sequence=function(){return i},i.cancel=function(){return D&&cancelAnimationFrame(D)},i.getAnimationTime=function(){var e=i.iterations===1/0?1:Number(i.iterations);return i.duration*e},i.getAnimationTimeByElement=function(e){return(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+"."),j(e,"duration")},i.getCurrentTime=function(){return Number(i.currentTime).toFixed(2)},i.getCurrentTimeByElement=function(e){(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+".");var t=j(e,"currentTime");return Number(t).toFixed(2)},i.getAnimationProgress=function(){return Number(i.progress).toFixed(2)},i.getAnimationProgressByElement=function(e){(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+".");var t=j(e,"progress");return Number(t).toFixed(2)},i.getComputedTiming=function(){return{activeTime:i.getAnimationTime()||null,currentTime:Number(i.getCurrentTime())||null,progress:Number(i.getAnimationProgress())||null,currentIteration:i.iterations===1/0?1/0:i.iterations-i.remaining==0?1:i.iterations-i.remaining}},i.getAnimations=function(){return 0!==q.length?q:[]},i.finish=function(){i.completed=!0,i.paused=!0,i.currentTime=0,i.duration=1e3,i.progress="normal"===i.direction?100:0,i.remaining=0,i.reversed="normal"!==i.direction},i.onfinish=c,i.oncancel=function(e){var t=null,n=window.Promise&&new Promise(function(e){return t=e}),r=P(e);function o(e,t,n,r){if((0,l.arrayContains)(t,n[e].animatable.element)){var o=n[e].animatable.element;n.splice(e,1),n.length||(i.paused=!0,A||(A=!0),r({element:o,msg:"Removed the element from the timeline"}))}}for(var a=q.length;a--;){var u=q[a];if(0===u.animations.length&&0!==u.children.length)for(var s=u.children.length;s--;)for(var c=u.children[s].animations,f=c.length;f--;)o(f,r,c,t);else for(var d=u.animations,p=d.length;p--;)o(p,r,d,t)}return n},i.reset(),i.autoplay&&i.start(),i}var B=function(e){e.forEach(function(e){e.element.style["will-change"]=""})};t.animated=I,t.createTimeline=function(e){var t=I(e);return t.stop(),t.duration=0,t.animate=function(n){return t.children.forEach(function(e){e.began=!0,e.completed=!0}),(0,l.toArray)(n).forEach(function(n){var r=(0,l.mergeObjects)(n,(0,l.replaceObjectProps)((0,f.getDefaultTweensParams)(),e||{}));r.el=r.el||r.multipleEl||t.elements||[];var o=t.duration,i=r.offset;r.autoplay=!1,r.direction=t.direction,r.offset=(0,l.isUnd)(i)?o:(0,l.getRelativeValue)(i,o),t.began=!0,t.completed=!0,t.seek(r.offset);var a=I(r);a.began=!0,a.completed=!0,a.duration>o&&(t.duration=a.duration),t.children.push(a)}),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},t.getAvailableTransforms=function(){return m.validTransforms}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeValue=t.getUnit=t.colorToRgb=t.hslToRgba=t.hexToRgba=t.rgbToRgba=t.mergeObjects=t.replaceObjectProps=t.clone=t.arrayContains=t.toArray=t.flattenArray=t.filterArray=t.selectString=t.stringToHyphens=t.isPath=t.isCol=t.isHsl=t.isRgb=t.isHex=t.isUnd=t.isFunc=t.isString=t.isDOM=t.isSVG=t.isObject=t.minMaxValue=t.isArray=t.stringContains=t.DOMELEMENTS=void 0;var r=arguments,o=a(n(9)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.DOMELEMENTS=[].concat(u(o.default),u(i.default));var s=t.stringContains=function(e,t){return e.indexOf(t)>-1},c=t.isArray=function(e){return Array.isArray(e)},l=(t.minMaxValue=function(e,t,n){return Math.min(Math.max(e,t),n)},t.isObject=function(e){return s(Object.prototype.toString.call(e),"Object")}),f=t.isSVG=function(e){return e instanceof SVGElement},d=(t.isDOM=function(e){return e.nodeType||f(e)},t.isString=function(e){return"string"==typeof e}),p=(t.isFunc=function(e){return"function"==typeof e},t.isUnd=function(e){return void 0===e}),m=t.isHex=function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},v=t.isRgb=function(e){return/^rgb/.test(e)},y=t.isHsl=function(e){return/^hsl/.test(e)},g=t.isCol=function(e){return m(e)||v(e)||y(e)},b=(t.isPath=function(e){return l(e)&&e.hasOwnProperty("totalLength")},t.stringToHyphens=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},t.selectString=function(e){if(!g(e))try{return document.querySelectorAll(e)}catch(e){return}}),h=(t.filterArray=function(e,t){for(var n=e.length,o=r.length>=2?r[1]:void 0,i=[],a=0;a<n;a++)if(a in e){var u=e[a];t.call(o,u,a,e)&&i.push(u)}return i},t.flattenArray=function e(t){return t.reduce(function(t,n){return t.concat(c(n)?e(n):n)},[])},t.toArray=function(e){return c(e)?e:(d(e)&&(e=b(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])},t.arrayContains=function(e,t){return e.some(function(e){return e===t})},t.clone=function(e){var t={};for(var n in e)t[n]=e[n];return t}),A=(t.replaceObjectProps=function(e,t){var n=h(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n},t.mergeObjects=function(e,t){var n=h(e);for(var r in t)n[r]=p(e[r])?t[r]:e[r];return n},t.rgbToRgba=function(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}),O=t.hexToRgba=function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"},w=t.hslToRgba=function(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),n=parseInt(t[1])/360,r=parseInt(t[2])/100,o=parseInt(t[3])/100,i=t[4]||1,a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=void 0,s=void 0,c=void 0;if(0==r)u=s=c=o;else{var l=o<.5?o*(1+r):o+r-o*r,f=2*o-l;u=a(f,l,n+1/3),s=a(f,l,n),c=a(f,l,n-1/3)}return"rgba("+255*u+","+255*s+","+255*c+","+i+")"},T=(t.colorToRgb=function(e){return v(e)?A(e):m(e)?O(e):y(e)?w(e):void 0},t.getUnit=function(e){e=String(e);var t=/([\+\-]?[0-9#\.]+)(%|px|em|rem|in|cm|mm|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e.replace(/\s/g,""));if(t)return t[2]});t.getRelativeValue=function(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=T(e)||0,o=parseFloat(t),i=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.easings=void 0;var r=n(5),o=n(2),i=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],a=function(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin((e-1-t/(2*Math.PI)*Math.asin(1))*(2*Math.PI)/t)},u={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],a],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,t){return 1-a(1-e,t)}],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,t){return e<.5?a(2*e,t)/2:1-a(-2*e+2,t)/2}]},s=function(){var e={linear:(0,r.bezier)(.25,.25,.75,.75)},t=function(t){u[t].forEach(function(n,a){e["ease"+t+i[a]]=(0,o.isFunc)(n)?n:r.bezier.apply(void 0,n)})};for(var n in u)t(n);return e}();t.easings=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return 1-3*t+3*e},o=function(e,t){return 3*t-6*e},i=function(e){return 3*e},a=function(e,t,n){return((r(t,n)*e+o(t,n))*e+i(t))*e},u=function(e,t,n){return 3*r(t,n)*e*e+2*o(t,n)*e+i(t)};t.bezier=function(e,t,n,r){if(0<=e&&e<=1&&0<=n&&n<=1){var o=new Float32Array(11);if(e!==t||n!==r)for(var i=0;i<11;++i)o[i]=a(.1*i,e,n);var s=function(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=.1;var s=r+(t-o[--i])/(o[i+1]-o[i])*.1,c=u(s,e,n);return c>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=u(t,n,r);if(0===i)return t;t-=(a(t,n,r)-e)/i}return t}(t,s,e,n):0===c?s:function(e,t,n,r,o){var i=void 0,u=void 0,s=0;do{(i=a(u=t+(n-t)/2,r,o)-e)>0?n=u:t=u}while(Math.abs(i)>1e-7&&++s<10);return u}(t,r,r+.1,e,n)};return function(o){return e===t&&n===r?o:0===o?0:1===o?1:a(s(o),t,r)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMover=void 0;var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(r=n(0))&&r.__esModule?r:{default:r};t.createMover=function(e){(0,i.default)(void 0!==e||null!==e||"object"===e,"Invalid timeline instance passed to createMover().");var t=function(t){return e.seek(e.duration*(Number(t)/100))},n=function(t){(0,i.default)("function"==typeof t,"Expected callback to be a function instead got a "+(void 0===t?"undefined":o(t))+"."),e.seek(t({duration:e.duration,iterations:e.iterations,progress:e.progress,offset:e.offset,delay:e.delay,currentTime:e.currentTime}))};return function(e){return(0,i.default)("number"==typeof e||"function"==typeof e||"string"==typeof e,"seek() expected a number or a callback function but instead got a "+(void 0===e?"undefined":o(e))),"number"==typeof e||"string"==typeof e?t(e):"function"==typeof e?n(e):void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyScheduledJobs=t.exceptions=t.batchRead=t.batchMutation=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=null,a=null;t.batchMutation=function(e){return i=o.default.mutate(function(){return e()})},t.batchRead=function(e){return a=o.default.measure(function(){return e()})},t.exceptions=function(){o.default.catch=function(e){console.error(e)}},t.emptyScheduledJobs=function(){o.default.clear(a),o.default.clear(i)}},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return(e=String(e)).includes(t)?e:e.concat(t)},o=(t.deg=function(e){return r(e,"deg")},t.px=function(e){return r(e,"px")},t.em=function(e){return r(e,"em")},t.rem=function(e){return r(e,"rem")},t.rad=function(e){return r(e,"rad")},t.grad=function(e){return r(e,"grad")},t.turn=function(e){return r(e,"turn")},/([\+\-]?[0-9#\.]+)(%|px|em|rem|in|cm|mm|vw|vh|vmin|vmax|deg|rad|turn)?$/);t.parseValue=function(e){return e=String(e),o.exec(e.replace(/\s/g,""))||""}},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.Spring=function(e){var t=void 0;if(e&&"object"===(void 0===e?"undefined":r(e))){var n=e.friction,o=e.tension,i=e.bounciness,u=e.speed;if(i||u){if(n||o)throw new Error("Cannot configure "+(void 0!==n?"friction":"tension")+" property with "+(void 0!==i?"bounciness":"speed")+".");t=A(i,u)}else if(n||o){if(i||u)throw new Error("Cannot configure "+(void 0!==i?"bounciness":"speed")+" property with "+(void 0!==n?"friction":"tension")+".");t=h(n,o)}else t=b()}else t=b();Object.assign(t,f.DOMELEMENTS.reduce(function(e,n){return e[n.toLowerCase()]=O(n.toLowerCase(),t),e},{}));var l=s.default.MathUtil.mapValueInRange,p=s.default.util.interpolateColor,m=null,w=void 0;return t.animate=function(e){var n=e.el,o=e.property,i=e.map,u=void 0===i?{input:[0,1],output:[1,1.5]}:i,f=e.blend,b=void 0===f?{colors:["#183a72","#85c497"],range:[]}:f,h=e.interpolation,A=void 0===h?function(e,t,n){}:h,O=e.shouldOscillate,w=void 0===O||O;(0,a.default)(!Array.isArray(n)||"string"==typeof n||"object"===(void 0===n?"undefined":r(n)),void 0!==r(t.element),'Can only pass a selector (id or class) or a reference to the property "el" or use data binding instead.'),(0,a.default)("string"==typeof o,"Expected property to be a string but instead got a "+(void 0===o?"undefined":r(o))+"."),(0,a.default)("function"==typeof A,"Expected interpolate to be a function but instead got a "+(void 0===A?"undefined":r(A))+"."),w||t.setOvershootClampingEnabled(!0);var T=void 0,S="";if("object"===(void 0===n?"undefined":r(n)))T=n;else if("string"==typeof n)T=document.querySelector(n);else{if(void 0===t.element)throw new Error("Received an invalid element type "+(void 0===T?"undefined":r(T))+".");T=t.element}return"transform"===(0,c.getAnimationType)(T,o)?S="transform":"css"===(0,c.getAnimationType)(T,o)&&(S="css"),y(T,{property:o,value:v(o)?b.colors[0]:u.output[0],type:S}),t.addListener({onSpringActivate:function(e){t.onStart&&"function"==typeof t.onStart&&t.onStart(g(e))},onSpringAtRest:function(e){t.onRest&&"function"==typeof t.onRest&&t.onRest(g(e))},onSpringUpdate:function(e){var t=e.getCurrentValue();if(v(o)){if(v(o)){var n=b.colors,r=b.range;t=r&&Array.isArray(r)&&2===r.length?p(t,n[0],n[1],r[0],r[1]):p(t,n[0],n[1])}}else{var i=u.input,a=u.output,c=(0,d.parseValue)(a[0])[2]||(0,d.parseValue)(a[1])[2]||"",f=Number((0,d.parseValue)(a[0])[1])||1,y=Number((0,d.parseValue)(a[1])[1])||1.5;t=String(l(t,i[0],i[1],f,y)).concat(c)}m=window.requestAnimationFrame(function(){A(T.style,v(o)?t:Number((0,d.parseValue)(String(t))[1])||t,{mapValues:s.default.MathUtil.mapValueInRange,interpolateColor:s.default.util.interpolateColor,radiansToDegrees:s.default.util.radiansToDegrees,degreesToRadians:s.default.util.degreesToRadians,px:d.px,deg:d.deg,rad:d.rad,grad:d.grad,turn:d.turn,em:d.em,rem:d.rem}),"transform"===S?T.style.transform.includes(o)?T.style.transform=o+"("+t+")":T.style.transform=T.style.transform.concat(o+"("+t+")"):"css"===S&&(T.style[o]=""+t)})}}),t},t.setValue=t.setEndValue,t.setValueVelocity=function(e){var n=e.value,r=e.velocity;return t.setVelocity(r).setValue(n)},t.stop=function(){t.setAtRest()},t.moveTo=function(e){return t.setCurrentValue(e).stop()},t.startAt=function(e){return t.setValue(e)},t.reset=function(){return t.setCurrentValue(-1)},t.reverse=function(){return t.setValue(-t.getCurrentValue())},t.seek=function(e){return t.setValue(e)},t.start=function(){return t.setValue(t.getEndValue()-t.getCurrentValue())},t.infinite=function(e,n,r){t.setValue(e),w=setTimeout(function(){t.setValue(n)},r||1e3)},t.remove=function(){t.removeAllListeners(),w&&clearTimeout(w),m&&window.cancelAnimationFrame(m)},t.exceeded=function(){return t.isOvershooting()},t.state=function(){return{currentValue:t.getCurrentValue(),endValue:t.getEndValue(),velocity:t.getVelocity(),springAtRest:t.isAtRest(),isOscillating:t.isOvershootClampingEnabled(),exceeded:t.exceeded()}},t.oncancel=function(){var e=function(e){},n=window.Promise&&new Promise(function(t){return e=t});return t.destroy(),w&&clearTimeout(w),m&&window.cancelAnimationFrame(m),e({msg:"Animation cancelled."}),n},t};var a=p(n(0)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(3)),s=p(n(11)),c=n(1),l=n(7),f=n(2),d=n(10);function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){return e.includes("Color")||e.includes("color")},y=function(e,t){var n=t.property,r=t.value,o=t.type;"transform"===o?(0,l.batchMutation)(function(){return e.style.transform=n+"("+r+")"}):"css"===o&&(0,l.batchMutation)(function(){return e.style[n]=r})},g=function(e){return i({},e.state())},b=function(){return(new s.default.SpringSystem).createSpring(13,3)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return(new s.default.SpringSystem).createSpring(e,t)},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return(new s.default.SpringSystem).createSpringWithBouncinessAndSpeed(e,t)},O=function(e,t){var n=function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=n=m(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.addRef=function(e){n.target=e},m(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,u.Component),o(r,[{key:"componentDidMount",value:function(){t.element=null===this.props.forwardref?this.target:this.props.forwardref.current}},{key:"render",value:function(){var t=this.props,n=t.forwardref,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["forwardref"]);return u.createElement(e,i({},r,{ref:null===n?this.addRef:n}))}}]),r}();return u.forwardRef(function(e,t){return u.createElement(n,i({},e,{forwardref:t}))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(e){return e}},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Animate=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=l(n(3)),a=l(n(14)),u=n(1),s=n(13),c=n(6);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=t.Animate=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.ctrl=null,r.seek=null,r.elements=[],r.enableControls=function(e,t){e.stop&&t.stop(),e.start&&t.start(),e.reverse&&t.reverse(),e.reset&&t.reset(),e.restart&&t.restart()},r.addLifecycle=function(e,t){e.onStart&&(t.onStart=e.onStart),e.onComplete&&(t.onComplete=e.onComplete),e.onUpdate&&(t.onUpdate=e.onUpdate)},r.addElements=function(e){r.elements=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r.elements),[e])},r.resolveChildren=function(){var e=r.props.children;return Array.isArray(e)||(e=[e]),e.map(function(e,t){return i.default.cloneElement(e,{key:t,ref:r.addElements})})},r.seekAnimation=function(){r.props.seekAnimation&&(r.seek=(0,c.createMover)(r.ctrl),r.seek(r.props.seekAnimation))},r.cancel=function(e){r.ctrl.oncancel(e).then(function(e){return e})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Component),o(t,[{key:"componentDidMount",value:function(){this.ctrl=(0,u.animated)(r({el:this.elements},this.props.timingProps,this.props.animationProps,{autoplay:this.props.autoplay||!0})),this.addLifecycle(this.props.lifecycle,this.ctrl),this.enableControls(this.props,this.ctrl),this.seekAnimation()}},{key:"componentDidUpdate",value:function(){this.enableControls(this.props,this.ctrl),this.seekAnimation()}},{key:"componentWillUnmount",value:function(){this.ctrl&&this.cancel(this.elements)}},{key:"render",value:function(){return this.resolveChildren()}}]),t}();d.propTypes={autoplay:a.default.bool,timingProps:a.default.object,animationProps:a.default.object,lifecyle:a.default.shape({onUpdate:a.default.func,onStart:a.default.func,onComplete:a.default.func}),seekAnimation:a.default.oneOfType([a.default.number,a.default.func,a.default.string]),stop:a.default.bool,start:a.default.bool,reset:a.default.bool,restart:a.default.bool,reverse:a.default.bool},d.defaultProps={autoplay:!0,lifecycle:{onUpdate:s.noop,onStart:s.noop,onComplete:s.noop},seekAnimation:0,start:!1,stop:!1,reset:!1,restart:!1,reverse:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timeline=void 0;var r,o=((r=n(0))&&r.__esModule,n(1));t.Timeline=function(e){return e=e||{},(0,o.createTimeline)(e)}},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validTransforms=t.getTransformValue=t.getTransformUnit=void 0;var r=n(2),o=t.getTransformUnit=function(e){return(0,r.stringContains)(e,"translate")||"perspective"===e?"px":(0,r.stringContains)(e,"rotate")||(0,r.stringContains)(e,"skew")?"deg":void 0};t.getTransformValue=function(e,t){var n=o(t),i=(0,r.stringContains)(t,"scale")?1:0+n,a=e.style.transform;if(!a)return i;for(var u=[],s=[],c=[],l=/(\w+)\((.+?)\)/g;u=l.exec(a);)s.push(u[1]),c.push(u[2]);var f=c.filter(function(e,n){return s[n]===t});return f.length?f[0]:i},t.validTransforms=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){};t.getDefaultInstanceParams=function(){return{onUpdate:r,onComplete:r,onStart:r,iterations:1,direction:"normal",autoplay:!1,offset:0}},t.getDefaultTweensParams=function(){return{duration:1e3,delay:0,easing:"linear",elasticity:500,round:0}},t.validTransforms=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAvailableEasings=void 0;var r=n(4);t.getAvailableEasings=function(){var e=[];return Object.keys(r.easings).forEach(function(t){return e.push(t)}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transition=function(e){return[e.from,e.to]},t.times=function(e){return"*="+e},t.startAfter=function(e){return"+="+e},t.startBefore=function(e){return"-="+e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.Keyframes=a;var o,i=(o=n(0))&&o.__esModule?o:{default:o};function a(){this.frames=[]}a.prototype.add=function(e){return(0,i.default)("object"===(void 0===e?"undefined":r(e)),"Expected values to be an object instead got a "+(void 0===e?"undefined":r(e))+"."),this.frames.push(e),this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.createEasingCurve=function(e,t){return(0,i.default)("string"==typeof e,"Expected easing curve name to be a string instead got a "+(void 0===e?"undefined":r(e))+"."),(0,i.default)(Array.isArray(t),"Expected points to be an array instead got a "+(void 0===t?"undefined":r(t))+"."),u.easings[e]=(0,a.bezier)(t[0],t[1],t[2],t[3]),e};var o,i=(o=n(0))&&o.__esModule?o:{default:o},a=n(5),u=n(4)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Spring=t.createMover=t.Animate=t.Keyframes=t.createTimeline=t.helpers=void 0;var r=n(23),o=n(22),i=n(21),a=n(20),u=n(1),s=n(16),c=n(6),l=n(15),f=n(12);t.helpers={createEasingCurve:r.createEasingCurve,transition:i.transition,times:i.times,startAfter:i.startAfter,startBefore:i.startBefore,getAvailableEasings:a.getAvailableEasings,getAvailableTransforms:u.getAvailableTransforms},t.createTimeline=s.Timeline,t.Keyframes=o.Keyframes,t.Animate=l.Animate,t.createMover=c.createMover,t.Spring=f.Spring}])}); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("invariant"),require("react"),require("svg-tag-names"),require("html-tags"),require("rebound"),require("prop-types"),require("fastdom"));else if("function"==typeof define&&define.amd)define(["invariant","react","svg-tag-names","html-tags","rebound","prop-types","fastdom"],t);else{var n="object"==typeof exports?t(require("invariant"),require("react"),require("svg-tag-names"),require("html-tags"),require("rebound"),require("prop-types"),require("fastdom")):t(e.invariant,e.react,e["svg-tag-names"],e["html-tags"],e.rebound,e["prop-types"],e.fastdom);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e,t,n,r,o,i,a){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=24)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAvailableTransforms=t.createTimeline=t.animated=t.getAnimatables=t.parseElements=t.validateValue=t.getOriginalelementValue=t.getAnimationType=t.getCSSValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=y(n(3)),u=y(n(0)),s=y(n(9)),c=y(n(8)),l=n(2),f=n(19),d=n(4),p=n(5),m=n(18),v=n(7);function y(e){return e&&e.__esModule?e:{default:e}}function g(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var b=void 0,h=[].concat(g(s.default),g(c.default)),A=!1,O=function(e,t,n){return Math.min(Math.max(e,t),n)},w=function(e,t){return"function"!=typeof e?e:e(t.element,t.id)},T=t.getCSSValue=function(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue((0,l.stringToHyphens)(t))||"0"},S=t.getAnimationType=function(e,t){return(0,l.isDOM)(e)&&(0,l.arrayContains)(m.validTransforms,t)?"transform":(0,l.isDOM)(e)&&(e.getAttribute(t)||(0,l.isSVG)(e)&&e[t])?"attribute":(0,l.isDOM)(e)&&"transform"!==t&&T(e,t)?"css":null!=e[t]?"object":void 0},j=t.getOriginalelementValue=function(e,t){switch(S(e,t)){case"transform":return(0,m.getTransformValue)(e,t);case"css":return T(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0},_=t.validateValue=function(e,t){if((0,l.isCol)(e))return(0,l.colorToRgb)(e);var n=(0,l.getUnit)(e),r=n?e.substr(0,e.length-n.length):e;return t&&!/\s/g.test(e)?r+t:r},M=function(e,t){var n=/-?\d*\.?\d+/g,r=_((0,l.isPath)(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:(0,l.isString)(e)||t?r.split(n):[]}},P=t.parseElements=function(e){var t=e?(0,l.flattenArray)((0,l.isArray)(e)?e.map(l.toArray):(0,l.toArray)(e)):[];return(0,l.filterArray)(t,function(e,t,n){return n.indexOf(e)===t})},x=t.getAnimatables=function(e){var t=P(e);return t.map(function(e,n){return{element:e,id:n,total:t.length}})},C=function(e,t){var n=(0,l.clone)(t);if((0,l.isArray)(e)){var r=e.length;2!==r||(0,l.isObject)(e[0])?(0,l.isFunc)(t.duration)||(n.duration=t.duration/r):e={value:e}}return(0,l.toArray)(e).map(function(e,n){var r=n?0:t.delay,o=(0,l.isObject)(e)?e:{value:e};return(0,l.isUnd)(o.delay)&&(o.delay=r),o}).map(function(e){return(0,l.mergeObjects)(e,n)})},E=function(e,t,n){var r=[],o=(0,l.mergeObjects)(e,t);for(var i in n)o.hasOwnProperty(i)||"el"===i&&"multipleEl"===i||r.push({name:i,offset:o.offset,tweens:C(n[i],t)});return r},V=function(e,t){var n=void 0;return e.tweens.map(function(r){var o,i=function(e,t){var n={};for(var r in e){var o=w(e[r],t);(0,l.isArray)(o)&&1===(o=o.map(function(e){return w(e,t)})).length&&(o=o[0]),n[r]=o}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(r,t),a=i.value,u=j(t.element,e.name),s=n?n.to.original:u,c=(0,l.isArray)(a)?a[0]:s,f=(0,l.getRelativeValue)((0,l.isArray)(a)?a[1]:a,c),m=(0,l.getUnit)(f)||(0,l.getUnit)(c)||(0,l.getUnit)(u);return i.from=M(c,m),i.to=M(f,m),i.start=n?n.end:e.offset,i.end=i.start+i.delay+i.duration,i.easing=(o=i.easing,(0,l.isArray)(o)?p.bezier.apply(void 0,o):d.easings[o]),i.elasticity=(1e3-O(i.elasticity,1,999))/1e3,n=i,i})},k={css:function(e,t,n){return(0,v.batchMutation)(function(){return e.style[t]=n})},attribute:function(e,t,n){return(0,v.batchMutation)(function(){return e.setAttribute(t,n)})},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,o){r[o]||(r[o]=[]),r[o].push(t+"("+n+")")}};function R(e,t){return(0,l.filterArray)((0,l.flattenArray)(e.map(function(e){return t.map(function(t){return function(e,t){var n=S(e.element,t.name);if(n){var r=V(t,e);return{type:n,property:t.name,animatable:e,tweens:r,duration:r[r.length-1].end,delay:r[0].delay}}}(e,t)})})),function(e){return!(0,l.isUnd)(e)})}function U(e,t,n,r){var o="delay"===e;return t.length?(o?Math.min:Math.max).apply(Math,t.map(function(t){return t[e]})):o?r.delay:n.offset+r.delay+r.duration}var F=function(e){["onStart","onUpdate","tick","onComplete"].forEach(function(t){e.hasOwnProperty(t)&&(delete e[t],console.error("Lifecycle hook cannot be passed as a parameter to Timeline function. They are accessible only via the timeline instance."))})};function N(e,t){return function(n){function r(e){!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return n.targets=[],n.addTargets=function(e){n.targets=[].concat(g(n.targets),[e])},t.elements&&Array.isArray(t.elements)||(t.elements=[]),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,a.default.PureComponent),i(r,[{key:"componentDidMount",value:function(){t.elements=[].concat(g(t.elements),[this.targets])}},{key:"componentWillUnmount",value:function(){t.elements=[]}},{key:"render",value:function(){return a.default.createElement(e,o({},this.props,{ref:this.addTargets}))}}]),r}()}var q=[],D=0,L=function(){function e(){D=requestAnimationFrame(t)}function t(t){var n=q.length;if(n){for(var r=0;r<n;)q[r]&&q[r].frameLoop(t),r++;e()}else cancelAnimationFrame(D),D=0}return e}();function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,o=0,i=function(e){F(e);var t=(0,l.replaceObjectProps)((0,f.getDefaultInstanceParams)(),e),n=(0,l.replaceObjectProps)((0,f.getDefaultTweensParams)(),e),r=x(e.el||e.multipleEl),o=R(r,E(t,n,e));return(0,l.mergeObjects)(t,{children:[],animatables:r,animations:o,duration:U("duration",o,t,n),delay:U("delay",o,t,n)})}(e),a=null;function s(){return window.Promise&&new Promise(function(e){return a=e})}var c=s();function d(){i.reversed=!i.reversed}function p(e){return i.reversed?i.duration-e:e}function m(e,t,n,r){var o=e.animatables[t].element;if(n[t])return(0,v.batchMutation)(function(){return o.style[r]=n[t].join(" ")})}function y(e){for(var t=0,n={},r=i.animations,o=r.length;t<o;){var a=r[t],u=a.animatable,s=a.tweens,c=s.length-1,f=s[c];c&&(f=(0,l.filterArray)(s,function(t){return e<t.end})[0]||f);for(var d=O(e-f.start-f.delay,0,f.duration)/f.duration,p=isNaN(d)?1:f.easing(d,f.elasticity),y=f.to.strings,g=[],h=void 0,A=f.to.numbers.length,w=0;w<A;w++){var S,j=f.to.numbers[w],_=f.from.numbers[w];S=_+p*(j-_),g.push(S)}var M=y.length;if(M){h=y[0];for(var P=0;P<M;P++){y[P];var x=y[P+1],C=g[P];isNaN(C)||(h+=x?C+x:C+" ")}}else h=g[0];k[a.type](u.element,a.property,h,n,u.id),a.currentValue=h,t++}var E=Object.keys(n).length;if(E)for(var V=0;V<E;V++)b||function(){var e="transform";b=(0,v.batchRead)(function(){return T(document.body,e)})?e:"-webkit-"+e}(),m(i,V,n,b);i.currentTime=e,i.progress=e/i.duration*100}function g(e){var t=i.completed,n=i.progress,r=i.duration,o=i.remaining,a=i.reversed,u=i.currentTime,s=i.began,c=i.paused,l={start:i.start,stop:i.stop,restart:i.restart,reverse:i.reverse,reset:i.reset,finish:i.finish};i[e]&&i[e]({completed:t,progress:n,duration:r,remaining:o,reversed:a,currentTime:u,began:s,paused:c,controller:l})}function w(){i.remaining&&!0!==i.remaining&&i.remaining--}function S(e){var r=i.duration,u=i.offset,l=u+i.delay,f=i.currentTime,m=i.reversed,b=p(e);i.children.length&&function(e){var t=i.children,n=t.length;if(e>=i.currentTime)for(var r=0;r<n;r++)t[r].seek(e);else for(var o=n;o--;)t[o].seek(e)}(b),(b>=l||!r)&&(i.began||(i.began=!0,g("onStart"))),b>u&&b<r?y(b):(b<=u&&0!==f&&(y(0),m&&w()),(b>=r&&f!==r||!r)&&(y(r),m||w())),g("onUpdate"),e>=r&&(i.remaining?(n=t,"alternate"===i.direction&&d()):(i.stop(),i.completed||(i.completed=!0,B(i.animatables),(0,v.emptyScheduledJobs)(),g("onComplete"),"Promise"in window&&(A||a({msg:"Animation completed!"}),c=s()))),o=0)}function j(e,t){if(0!==i.children.length){for(var n=void 0,r=P(e),o=i.children.length;o--;)for(var a=i.children[o].animations,u=a.length;u--;)(0,l.arrayContains)(r,a[u].animatable.element)&&(n=i.children[o][t]);return n}}return Object.assign(i,h.reduce(function(e,t){return e[t]=N(t.toLowerCase(),i),e},{})),i.reset=function(){var e=i.direction,t=i.iterations;i.currentTime=0,i.progress=0,i.paused=!0,i.began=!1,i.completed=!1,i.reversed="reverse"===e,i.remaining="alternate"===e&&1===t?2:t,y(0);for(var n=i.children.length;n--;)i.children[n].reset()},i.frameLoop=function(r){var a=!1;t=r,n||(n=t),e.speed&&(a=!0),S((o+t-n)*(a?e.speed:i.speed?i.speed:1))},i.speed=1,i.setSpeed=function(t){(0,u.default)("number"==typeof t||"string"==typeof t,"setSpeed() expected a number or string value for speed but instead got "+(void 0===t?"undefined":r(t))+"."),e.speed=t,i.speed=t},i.seek=function(e){S(p(e))},i.stop=function(){var e=q.indexOf(i);e>-1&&q.splice(e,1),i.paused=!0},i.start=function(){i.paused&&(i.paused=!1,n=0,o=p(i.currentTime),q.push(i),D||L())},i.reverse=function(){d(),n=0,o=p(i.currentTime)},i.restart=function(){i.stop(),i.reset(),i.start()},i.sequence=function(){return i},i.cancel=function(){return D&&cancelAnimationFrame(D)},i.getAnimationTime=function(){var e=i.iterations===1/0?1:Number(i.iterations);return i.duration*e},i.getAnimationTimeByElement=function(e){return(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+"."),j(e,"duration")},i.getCurrentTime=function(){return Number(i.currentTime).toFixed(2)},i.getCurrentTimeByElement=function(e){(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+".");var t=j(e,"currentTime");return Number(t).toFixed(2)},i.getAnimationProgress=function(){return Number(i.progress).toFixed(2)},i.getAnimationProgressByElement=function(e){(0,u.default)("string"==typeof e||"object"===(void 0===e?"undefined":r(e)),"Received an invalid element type "+(void 0===e?"undefined":r(e))+".");var t=j(e,"progress");return Number(t).toFixed(2)},i.getComputedTiming=function(){return{activeTime:i.getAnimationTime()||null,currentTime:Number(i.getCurrentTime())||null,progress:Number(i.getAnimationProgress())||null,currentIteration:i.iterations===1/0?1/0:i.iterations-i.remaining==0?1:i.iterations-i.remaining}},i.getAnimations=function(){return 0!==q.length?q:[]},i.finish=function(){i.completed=!0,i.paused=!0,i.currentTime=0,i.duration=1e3,i.progress="normal"===i.direction?100:0,i.remaining=0,i.reversed="normal"!==i.direction},i.onfinish=c,i.oncancel=function(e){var t=null,n=window.Promise&&new Promise(function(e){return t=e}),r=P(e);function o(e,t,n,r){if((0,l.arrayContains)(t,n[e].animatable.element)){var o=n[e].animatable.element;n.splice(e,1),n.length||(i.paused=!0,A||(A=!0),r({element:o,msg:"Removed the element from the timeline"}))}}for(var a=q.length;a--;){var u=q[a];if(0===u.animations.length&&0!==u.children.length)for(var s=u.children.length;s--;)for(var c=u.children[s].animations,f=c.length;f--;)o(f,r,c,t);else for(var d=u.animations,p=d.length;p--;)o(p,r,d,t)}return n},i.reset(),i.autoplay&&i.start(),i}var B=function(e){e.forEach(function(e){e.element.style["will-change"]=""})};t.animated=I,t.createTimeline=function(e){var t=I(e);return t.stop(),t.duration=0,t.animate=function(n){return t.children.forEach(function(e){e.began=!0,e.completed=!0}),(0,l.toArray)(n).forEach(function(n){var r=(0,l.mergeObjects)(n,(0,l.replaceObjectProps)((0,f.getDefaultTweensParams)(),e||{}));r.el=r.el||r.multipleEl||t.elements||[];var o=t.duration,i=r.offset;r.autoplay=!1,r.direction=t.direction,r.offset=(0,l.isUnd)(i)?o:(0,l.getRelativeValue)(i,o),t.began=!0,t.completed=!0,t.seek(r.offset);var a=I(r);a.began=!0,a.completed=!0,a.duration>o&&(t.duration=a.duration),t.children.push(a)}),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},t.getAvailableTransforms=function(){return m.validTransforms}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeValue=t.getUnit=t.colorToRgb=t.hslToRgba=t.hexToRgba=t.rgbToRgba=t.mergeObjects=t.replaceObjectProps=t.clone=t.arrayContains=t.toArray=t.flattenArray=t.filterArray=t.selectString=t.stringToHyphens=t.isPath=t.isCol=t.isHsl=t.isRgb=t.isHex=t.isUnd=t.isFunc=t.isString=t.isDOM=t.isSVG=t.isObject=t.minMaxValue=t.isArray=t.stringContains=t.DOMELEMENTS=void 0;var r=arguments,o=a(n(9)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.DOMELEMENTS=[].concat(u(o.default),u(i.default));var s=t.stringContains=function(e,t){return e.indexOf(t)>-1},c=t.isArray=function(e){return Array.isArray(e)},l=(t.minMaxValue=function(e,t,n){return Math.min(Math.max(e,t),n)},t.isObject=function(e){return s(Object.prototype.toString.call(e),"Object")}),f=t.isSVG=function(e){return e instanceof SVGElement},d=(t.isDOM=function(e){return e.nodeType||f(e)},t.isString=function(e){return"string"==typeof e}),p=(t.isFunc=function(e){return"function"==typeof e},t.isUnd=function(e){return void 0===e}),m=t.isHex=function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},v=t.isRgb=function(e){return/^rgb/.test(e)},y=t.isHsl=function(e){return/^hsl/.test(e)},g=t.isCol=function(e){return m(e)||v(e)||y(e)},b=(t.isPath=function(e){return l(e)&&e.hasOwnProperty("totalLength")},t.stringToHyphens=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},t.selectString=function(e){if(!g(e))try{return document.querySelectorAll(e)}catch(e){return}}),h=(t.filterArray=function(e,t){for(var n=e.length,o=r.length>=2?r[1]:void 0,i=[],a=0;a<n;a++)if(a in e){var u=e[a];t.call(o,u,a,e)&&i.push(u)}return i},t.flattenArray=function e(t){return t.reduce(function(t,n){return t.concat(c(n)?e(n):n)},[])},t.toArray=function(e){return c(e)?e:(d(e)&&(e=b(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])},t.arrayContains=function(e,t){return e.some(function(e){return e===t})},t.clone=function(e){var t={};for(var n in e)t[n]=e[n];return t}),A=(t.replaceObjectProps=function(e,t){var n=h(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n},t.mergeObjects=function(e,t){var n=h(e);for(var r in t)n[r]=p(e[r])?t[r]:e[r];return n},t.rgbToRgba=function(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}),O=t.hexToRgba=function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"},w=t.hslToRgba=function(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),n=parseInt(t[1])/360,r=parseInt(t[2])/100,o=parseInt(t[3])/100,i=t[4]||1,a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=void 0,s=void 0,c=void 0;if(0==r)u=s=c=o;else{var l=o<.5?o*(1+r):o+r-o*r,f=2*o-l;u=a(f,l,n+1/3),s=a(f,l,n),c=a(f,l,n-1/3)}return"rgba("+255*u+","+255*s+","+255*c+","+i+")"},T=(t.colorToRgb=function(e){return v(e)?A(e):m(e)?O(e):y(e)?w(e):void 0},t.getUnit=function(e){e=String(e);var t=/([\+\-]?[0-9#\.]+)(%|px|em|rem|in|cm|mm|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e.replace(/\s/g,""));if(t)return t[2]});t.getRelativeValue=function(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=T(e)||0,o=parseFloat(t),i=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.easings=void 0;var r=n(5),o=n(2),i=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],a=function(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin((e-1-t/(2*Math.PI)*Math.asin(1))*(2*Math.PI)/t)},u={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],a],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,t){return 1-a(1-e,t)}],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,t){return e<.5?a(2*e,t)/2:1-a(-2*e+2,t)/2}]},s=function(){var e={linear:(0,r.bezier)(.25,.25,.75,.75)},t=function(t){u[t].forEach(function(n,a){e["ease"+t+i[a]]=(0,o.isFunc)(n)?n:r.bezier.apply(void 0,n)})};for(var n in u)t(n);return e}();t.easings=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return 1-3*t+3*e},o=function(e,t){return 3*t-6*e},i=function(e){return 3*e},a=function(e,t,n){return((r(t,n)*e+o(t,n))*e+i(t))*e},u=function(e,t,n){return 3*r(t,n)*e*e+2*o(t,n)*e+i(t)};t.bezier=function(e,t,n,r){if(0<=e&&e<=1&&0<=n&&n<=1){var o=new Float32Array(11);if(e!==t||n!==r)for(var i=0;i<11;++i)o[i]=a(.1*i,e,n);var s=function(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=.1;var s=r+(t-o[--i])/(o[i+1]-o[i])*.1,c=u(s,e,n);return c>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=u(t,n,r);if(0===i)return t;t-=(a(t,n,r)-e)/i}return t}(t,s,e,n):0===c?s:function(e,t,n,r,o){var i=void 0,u=void 0,s=0;do{(i=a(u=t+(n-t)/2,r,o)-e)>0?n=u:t=u}while(Math.abs(i)>1e-7&&++s<10);return u}(t,r,r+.1,e,n)};return function(o){return e===t&&n===r?o:0===o?0:1===o?1:a(s(o),t,r)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMover=void 0;var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(r=n(0))&&r.__esModule?r:{default:r};t.createMover=function(e){(0,i.default)(void 0!==e||null!==e||"object"===e,"Invalid timeline instance passed to createMover().");var t=function(t){return e.seek(e.duration*(Number(t)/100))},n=function(t){(0,i.default)("function"==typeof t,"Expected callback to be a function instead got a "+(void 0===t?"undefined":o(t))+"."),e.seek(t({duration:e.duration,iterations:e.iterations,progress:e.progress,offset:e.offset,delay:e.delay,currentTime:e.currentTime}))};return function(e){return(0,i.default)("number"==typeof e||"function"==typeof e||"string"==typeof e,"seek() expected a number or a callback function but instead got a "+(void 0===e?"undefined":o(e))),"number"==typeof e||"string"==typeof e?t(e):"function"==typeof e?n(e):void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyScheduledJobs=t.exceptions=t.batchRead=t.batchMutation=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=null,a=null;t.batchMutation=function(e){return i=o.default.mutate(function(){return e()})},t.batchRead=function(e){return a=o.default.measure(function(){return e()})},t.exceptions=function(){o.default.catch=function(e){console.error(e)}},t.emptyScheduledJobs=function(){o.default.clear(a),o.default.clear(i)}},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return(e=String(e)).includes(t)?e:e.concat(t)},o=(t.deg=function(e){return r(e,"deg")},t.px=function(e){return r(e,"px")},t.em=function(e){return r(e,"em")},t.rem=function(e){return r(e,"rem")},t.rad=function(e){return r(e,"rad")},t.grad=function(e){return r(e,"grad")},t.turn=function(e){return r(e,"turn")},/([\+\-]?[0-9#\.]+)(%|px|em|rem|in|cm|mm|vw|vh|vmin|vmax|deg|rad|turn)?$/);t.parseValue=function(e){return e=String(e),o.exec(e.replace(/\s/g,""))||""}},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.Spring=function(e){var t=void 0;if(e&&"object"===(void 0===e?"undefined":r(e))){var n=e.friction,o=e.tension,i=e.bounciness,u=e.speed;if(i||u){if(n||o)throw new Error("Cannot configure "+(void 0!==n?"friction":"tension")+" property with "+(void 0!==i?"bounciness":"speed")+".");t=A(i,u)}else if(n||o){if(i||u)throw new Error("Cannot configure "+(void 0!==i?"bounciness":"speed")+" property with "+(void 0!==n?"friction":"tension")+".");t=h(n,o)}else t=b()}else t=b();Object.assign(t,f.DOMELEMENTS.reduce(function(e,n){return e[n.toLowerCase()]=O(n.toLowerCase(),t),e},{}));var l=s.default.MathUtil.mapValueInRange,p=s.default.util.interpolateColor,m=null,w=void 0;return t.animate=function(e){var n=e.el,o=e.property,i=e.map,u=void 0===i?{inputRange:[0,1],outputRange:[1,1.5]}:i,f=e.blend,b=void 0===f?{colors:["#183a72","#85c497"],range:[]}:f,h=e.interpolation,A=void 0===h?function(e,t,n){}:h,O=e.shouldOscillate,w=void 0===O||O;(0,a.default)(!Array.isArray(n)||"string"==typeof n||"object"===(void 0===n?"undefined":r(n)),void 0!==r(t.element),'Can only pass a selector (id or class) or a reference to the property "el" or use data binding instead.'),(0,a.default)("string"==typeof o,"Expected property to be a string but instead got a "+(void 0===o?"undefined":r(o))+"."),(0,a.default)("function"==typeof A,"Expected interpolate to be a function but instead got a "+(void 0===A?"undefined":r(A))+"."),w||t.setOvershootClampingEnabled(!0);var T=void 0,S="";if("object"===(void 0===n?"undefined":r(n)))T=n;else if("string"==typeof n)T=document.querySelector(n);else{if(void 0===t.element)throw new Error("Received an invalid element type "+(void 0===T?"undefined":r(T))+".");T=t.element}return"transform"===(0,c.getAnimationType)(T,o)?S="transform":"css"===(0,c.getAnimationType)(T,o)&&(S="css"),y(T,{property:o,value:v(o)?b.colors[0]:u.outputRange[0],type:S}),t.addListener({onSpringActivate:function(e){t.onStart&&"function"==typeof t.onStart&&t.onStart(g(e))},onSpringAtRest:function(e){t.onRest&&"function"==typeof t.onRest&&t.onRest(g(e))},onSpringUpdate:function(e){var t=e.getCurrentValue();if(v(o)){if(v(o)){var n=b.colors,r=b.range;t=r&&Array.isArray(r)&&2===r.length?p(t,n[0],n[1],r[0],r[1]):p(t,n[0],n[1])}}else{var i=u.inputRange,a=u.outputRange,c=(0,d.parseValue)(a[0])[2]||(0,d.parseValue)(a[1])[2]||"",f=Number((0,d.parseValue)(a[0])[1])||1,y=Number((0,d.parseValue)(a[1])[1])||1.5;t=String(l(t,i[0],i[1],f,y)).concat(c)}m=window.requestAnimationFrame(function(){A(T.style,v(o)?t:Number((0,d.parseValue)(String(t))[1])||t,{mapValues:s.default.MathUtil.mapValueInRange,interpolateColor:s.default.util.interpolateColor,radiansToDegrees:s.default.util.radiansToDegrees,degreesToRadians:s.default.util.degreesToRadians,px:d.px,deg:d.deg,rad:d.rad,grad:d.grad,turn:d.turn,em:d.em,rem:d.rem}),"transform"===S?T.style.transform.includes(o)?T.style.transform=o+"("+t+")":T.style.transform=T.style.transform.concat(o+"("+t+")"):"css"===S&&(T.style[o]=""+t)})}}),t},t.setValue=t.setEndValue,t.setValueVelocity=function(e){var n=e.value,r=e.velocity;return t.setVelocity(r).setValue(n)},t.stop=function(){t.setAtRest()},t.moveTo=function(e){return t.setCurrentValue(e).stop()},t.startAt=function(e){return t.setValue(e)},t.reset=function(){return t.setCurrentValue(-1)},t.reverse=function(){return t.setValue(-t.getCurrentValue())},t.seek=function(e){return t.setValue(e)},t.start=function(){return t.setValue(t.getEndValue()-t.getCurrentValue())},t.infinite=function(e,n,r){t.setValue(e),w=setTimeout(function(){t.setValue(n)},r||1e3)},t.remove=function(){t.removeAllListeners(),w&&clearTimeout(w),m&&window.cancelAnimationFrame(m)},t.exceeded=function(){return t.isOvershooting()},t.state=function(){return{currentValue:t.getCurrentValue(),endValue:t.getEndValue(),velocity:t.getVelocity(),springAtRest:t.isAtRest(),isOscillating:t.isOvershootClampingEnabled(),exceeded:t.exceeded()}},t.oncancel=function(){var e=function(e){},n=window.Promise&&new Promise(function(t){return e=t});return t.destroy(),w&&clearTimeout(w),m&&window.cancelAnimationFrame(m),e({msg:"Animation cancelled."}),n},t};var a=p(n(0)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(3)),s=p(n(11)),c=n(1),l=n(7),f=n(2),d=n(10);function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){return e.includes("Color")||e.includes("color")},y=function(e,t){var n=t.property,r=t.value,o=t.type;"transform"===o?(0,l.batchMutation)(function(){return e.style.transform=n+"("+r+")"}):"css"===o&&(0,l.batchMutation)(function(){return e.style[n]=r})},g=function(e){return i({},e.state())},b=function(){return(new s.default.SpringSystem).createSpring(13,3)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return(new s.default.SpringSystem).createSpring(e,t)},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return(new s.default.SpringSystem).createSpringWithBouncinessAndSpeed(e,t)},O=function(e,t){var n=function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=n=m(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.addRef=function(e){n.target=e},m(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,u.Component),o(r,[{key:"componentDidMount",value:function(){t.element=null===this.props.forwardref?this.target:this.props.forwardref.current}},{key:"render",value:function(){var t=this.props,n=t.forwardref,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["forwardref"]);return u.createElement(e,i({},r,{ref:null===n?this.addRef:n}))}}]),r}();return u.forwardRef(function(e,t){return u.createElement(n,i({},e,{forwardref:t}))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(e){return e}},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Animate=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=l(n(3)),a=l(n(14)),u=n(1),s=n(13),c=n(6);function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=t.Animate=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.ctrl=null,r.seek=null,r.elements=[],r.enableControls=function(e,t){e.stop&&t.stop(),e.start&&t.start(),e.reverse&&t.reverse(),e.reset&&t.reset(),e.restart&&t.restart(),e.finish&&t.finish()},r.addLifecycle=function(e,t){e.onStart&&(t.onStart=e.onStart),e.onComplete&&(t.onComplete=e.onComplete),e.onUpdate&&(t.onUpdate=e.onUpdate)},r.addElements=function(e){r.elements=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r.elements),[e])},r.resolveChildren=function(){var e=r.props.children;return Array.isArray(e)||(e=[e]),e.map(function(e,t){return i.default.cloneElement(e,{key:t,ref:r.addElements})})},r.seekAnimation=function(){r.props.seekAnimation&&(r.seek=(0,c.createMover)(r.ctrl),r.seek(r.props.seekAnimation))},r.cancel=function(e){r.ctrl.oncancel(e).then(function(e){return e})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Component),o(t,[{key:"componentDidMount",value:function(){this.ctrl=(0,u.animated)(r({el:this.elements},this.props.timingProps,this.props.animationProps,{autoplay:this.props.autoplay||!0})),this.addLifecycle(this.props.lifecycle,this.ctrl),this.enableControls(this.props,this.ctrl),this.seekAnimation()}},{key:"componentDidUpdate",value:function(){this.enableControls(this.props,this.ctrl),this.seekAnimation()}},{key:"componentWillUnmount",value:function(){this.ctrl&&this.cancel(this.elements)}},{key:"render",value:function(){return this.resolveChildren()}}]),t}();d.propTypes={autoplay:a.default.bool,timingProps:a.default.object,animationProps:a.default.object,lifecyle:a.default.shape({onUpdate:a.default.func,onStart:a.default.func,onComplete:a.default.func}),seekAnimation:a.default.oneOfType([a.default.number,a.default.func,a.default.string]),stop:a.default.bool,start:a.default.bool,reset:a.default.bool,restart:a.default.bool,reverse:a.default.bool,finish:a.default.bool},d.defaultProps={autoplay:!0,lifecycle:{onUpdate:s.noop,onStart:s.noop,onComplete:s.noop},seekAnimation:0,start:!1,stop:!1,reset:!1,restart:!1,reverse:!1,finish:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timeline=void 0;var r,o=((r=n(0))&&r.__esModule,n(1));t.Timeline=function(e){return e=e||{},(0,o.createTimeline)(e)}},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validTransforms=t.getTransformValue=t.getTransformUnit=void 0;var r=n(2),o=t.getTransformUnit=function(e){return(0,r.stringContains)(e,"translate")||"perspective"===e?"px":(0,r.stringContains)(e,"rotate")||(0,r.stringContains)(e,"skew")?"deg":void 0};t.getTransformValue=function(e,t){var n=o(t),i=(0,r.stringContains)(t,"scale")?1:0+n,a=e.style.transform;if(!a)return i;for(var u=[],s=[],c=[],l=/(\w+)\((.+?)\)/g;u=l.exec(a);)s.push(u[1]),c.push(u[2]);var f=c.filter(function(e,n){return s[n]===t});return f.length?f[0]:i},t.validTransforms=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){};t.getDefaultInstanceParams=function(){return{onUpdate:r,onComplete:r,onStart:r,iterations:1,direction:"normal",autoplay:!1,offset:0}},t.getDefaultTweensParams=function(){return{duration:1e3,delay:0,easing:"linear",elasticity:500,round:0}},t.validTransforms=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAvailableEasings=void 0;var r=n(4);t.getAvailableEasings=function(){var e=[];return Object.keys(r.easings).forEach(function(t){return e.push(t)}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transition=function(e){return[e.from,e.to]},t.times=function(e){return"*="+e},t.startAfter=function(e){return"+="+e},t.startBefore=function(e){return"-="+e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.Keyframes=a;var o,i=(o=n(0))&&o.__esModule?o:{default:o};function a(){this.frames=[]}a.prototype.add=function(e){return(0,i.default)("object"===(void 0===e?"undefined":r(e)),"Expected values to be an object instead got a "+(void 0===e?"undefined":r(e))+"."),this.frames.push(e),this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.createEasingCurve=function(e,t){return(0,i.default)("string"==typeof e,"Expected easing curve name to be a string instead got a "+(void 0===e?"undefined":r(e))+"."),(0,i.default)(Array.isArray(t),"Expected points to be an array instead got a "+(void 0===t?"undefined":r(t))+"."),u.easings[e]=(0,a.bezier)(t[0],t[1],t[2],t[3]),e};var o,i=(o=n(0))&&o.__esModule?o:{default:o},a=n(5),u=n(4)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Spring=t.createMover=t.Animate=t.Keyframes=t.createTimeline=t.helpers=void 0;var r=n(23),o=n(22),i=n(21),a=n(20),u=n(1),s=n(16),c=n(6),l=n(15),f=n(12);t.helpers={createEasingCurve:r.createEasingCurve,transition:i.transition,times:i.times,startAfter:i.startAfter,startBefore:i.startBefore,getAvailableEasings:a.getAvailableEasings,getAvailableTransforms:u.getAvailableTransforms},t.createTimeline=s.Timeline,t.Keyframes=o.Keyframes,t.Animate=l.Animate,t.createMover=c.createMover,t.Spring=f.Spring}])}); |
{ | ||
"name": "animated-timeline", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"description": "Timeline based animations in React", | ||
@@ -10,7 +10,8 @@ "main": "build/animated-timeline.min.js", | ||
"scripts": { | ||
"start": "npm run build && ./node_modules/.bin/parcel demo/index.html", | ||
"start": "./node_modules/.bin/parcel demo/index.html", | ||
"flow": "./node_modules/.bin/flow", | ||
"test": "./node_modules/.bin/jest", | ||
"build": "NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack.config.js --progress", | ||
"format": "find src -name '*.js' && find examples -name '*.js' && find demo -name '*.js' | xargs ./node_modules/.bin/prettier --write --no-semi --single-quote" | ||
"build:watch": "NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack.config.js -w --progress", | ||
"format": "find src -name '*.js' | xargs ./node_modules/.bin/prettier --write --no-semi --single-quote" | ||
}, | ||
@@ -17,0 +18,0 @@ "author": "Nitin Tulswani <tulswani19@gmail.com>", |
# Animated Timeline | ||
![author](https://img.shields.io/badge/author-Nitin%20Tulswani-blue.svg) ![size](https://img.shields.io/badge/size-35.5%20KB-brightgreen.svg) [![Build Status](https://travis-ci.org/nitin42/Timeline.svg?branch=beta0)](https://travis-ci.org/nitin42/Timeline) | ||
> Create playback based animations in React | ||
@@ -36,9 +37,9 @@ | ||
Nope! Though you can use it as a library or extract some part of this project as `animated-timeline` provides playback based APIs to perform animations and some other utilities like changing the animation position along its timeline, APIs for performing spring based animations etc but the main goal of this project is to - | ||
Nope! Though you can use it as a library. The main goal of this project is to provide - | ||
* provide utilities to create animation tools. | ||
* utilities to create animation tools | ||
* create a fitting abstraction on top of this project. | ||
* low-level APIs to create a fitting abstraction on top of this project | ||
* provide APIs for composing animations that transition from one state to another, use loops, callbacks and timer APIs to create interactive animations. | ||
* APIs for composing animations that transition from one state to another, use loops, callbacks and timer APIs to create interactive animations | ||
@@ -93,4 +94,2 @@ ## Concepts | ||
> Note - This project is not experimental and doesn't require a polyfill. See [browser usage](#browser-usage). | ||
**This project also depends on `react` and `react-dom` so make sure you've them installed.** | ||
@@ -170,6 +169,8 @@ | ||
componentDidMount() { | ||
t.animate({ | ||
opacity: helpers.transition({ from: 0.2, to: 0.8 }), | ||
rotate: helpers.transition({ from: 360, to: 180 }) | ||
}).start() | ||
t | ||
.animate({ | ||
opacity: helpers.transition({ from: 0.2, to: 0.8 }), | ||
rotate: helpers.transition({ from: 360, to: 180 }) | ||
}) | ||
.start() | ||
} | ||
@@ -237,4 +238,2 @@ | ||
[See example code for sequence based animations](./examples/Timeline/sequence.js) | ||
<p align="center"> | ||
@@ -244,6 +243,6 @@ <img src="./media/sequence.gif" /> | ||
[![Edit 6j08xylw7n](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/6j08xylw7n) | ||
### Timing based animations | ||
[See example code for timing based animations](./examples/Timeline/timing.js) | ||
<p align="center"> | ||
@@ -253,16 +252,24 @@ <img src="./media/timing.gif" /> | ||
### Keyframes | ||
[![Edit 92lm0xrl44](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/92lm0xrl44) | ||
[**See example code for keyframes**](./examples/Keyframes/index.js) | ||
### Staggered animation | ||
<p align="center"> | ||
<img src="./media/staggered.gif" /> | ||
</p> | ||
[![Edit 743n1z9826](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/743n1z9826) | ||
### Keyframes | ||
<p align="center"> | ||
<img src="./media/keyframes.gif" /> | ||
</p> | ||
[![Edit 92lm0xrl44](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/92lm0xrl44) | ||
### Changing the animation position | ||
You can also change the animation position along its timeline using an input value. | ||
You can also change the animation position along its timeline with an input value. | ||
[See example code](./examples/Seeking/basic.js) | ||
<p align="center"> | ||
@@ -272,6 +279,6 @@ <img src="./media/mover.gif" /> | ||
[![Edit kkjn9jq6k7](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/kkjn9jq6k7) | ||
### Spring based animations | ||
[See examples for spring based animations](./examples/Spring) | ||
<p align="center"> | ||
@@ -283,11 +290,11 @@ <img src="./media/spring.gif" /> | ||
* [Animation lifecycle hooks](./examples/Lifecycle/index.js) | ||
* [Using animation lifecycle hooks](./examples/Lifecycle/index.js) | ||
* [Promise based APIs to manage `completion` and `cancellation` events for an animation](./examples/Promise/index.js) | ||
* [Using promise based APIs to manage `completion` and `cancellation` events for an animation](./examples/Promise/index.js) | ||
* [Animation using timer APIs](./examples/Extra/speed.js) | ||
* [Using timer APIs to perform Animation](./examples/Extra/speed.js) | ||
## Animation values | ||
* For transforms | ||
* **For transforms** | ||
@@ -301,3 +308,3 @@ ```js | ||
* For css properties | ||
* **For css properties** | ||
@@ -310,3 +317,3 @@ ```js | ||
* Defining values using objects | ||
* **Defining values using objects** | ||
@@ -326,3 +333,3 @@ ```js | ||
* `from` - `to` based animation values | ||
* **`from` - `to` based animation values** | ||
@@ -337,4 +344,6 @@ ```js | ||
* Timing based animation values | ||
Read more about `helpers` object [here](./docs/helpers.md). | ||
* **Timing based animation values** | ||
Use property `offset` to perform timing animations | ||
@@ -346,9 +355,15 @@ | ||
t | ||
.animate({ | ||
el: '.one', | ||
scale: 2 | ||
}) | ||
.animate({ el: '.two', scale: 1, offset: helpers.startAfter(2000) }) | ||
.sequence([ | ||
t.animate({ | ||
el: '.one', | ||
scale: 2 | ||
}), | ||
t.animate({ el: '.two', scale: 1, offset: helpers.startAfter(2000) }) | ||
]) | ||
.start() | ||
``` | ||
You can set a value for a property with or without any unit such as `px`, `em`, `rem`, `in`, `cm`, `mm`, `vw`, `vh`, `vmin`, `vmax`, `deg`, `rad`, `turn` etc. | ||
## Documentation | ||
@@ -355,0 +370,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45784
367