react-spring
Advanced tools
Comparing version 4.1.4 to 4.1.5
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],e):e(t.ReactSpring={},t.React,t.PropTypes)}(this,function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,r){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();var i=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},o=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}();var a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){a(t,e,n[e])})}return t},u=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this)||this)._value=e,a._parent=n,a._animationClass=r,a._animationConfig=i,a._callback=o,a.__attach(),a._hey=1,a}i(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(s({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(o),l=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}i(e,t);var n=e.prototype;return n.__addChild=function(t){t instanceof u&&(this._tracked=!0),0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(o);function c(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=_.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:w.hasOwnProperty(t)?w[t]:(e=_.rgb.exec(t))?(v(e[1])<<24|v(e[2])<<16|v(e[3])<<8|255)>>>0:(e=_.rgba.exec(t))?(v(e[1])<<24|v(e[2])<<16|v(e[3])<<8|g(e[4]))>>>0:(e=_.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=_.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=_.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=_.hsl.exec(t))?(255|p(y(e[1]),b(e[2]),b(e[3])))>>>0:(e=_.hsla.exec(t))?(p(y(e[1]),b(e[2]),b(e[3]))|g(e[4]))>>>0:null}function f(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function p(t,e,n){var r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=f(i,r,t+1/3),a=f(i,r,t),s=f(i,r,t-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}var h="[-+]?\\d*\\.?\\d+",d=h+"%";function m(){return"\\(\\s*("+(t=arguments,Array.prototype.slice.call(t,0)).join(")\\s*,\\s*(")+")\\s*\\)";var t}var _={rgb:new RegExp("rgb"+m(h,h,h)),rgba:new RegExp("rgba"+m(h,h,h,h)),hsl:new RegExp("hsl"+m(h,d,d)),hsla:new RegExp("hsla"+m(h,d,d,h)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function v(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function y(t){return(parseFloat(t)%360+360)%360/360}function g(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function b(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/100}var w={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};c.rgba=function(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}};var V=c,k=function(t){return t},x=function(){function t(){}return t.create=function(t){if("function"==typeof t)return function(){return t.apply(void 0,arguments)};if(t.output&&"string"==typeof t.output[0])return O(t);var e=t.output,n=t.range,r=t.easing||k,i="extend";void 0!==t.extrapolateLeft?i=t.extrapolateLeft:void 0!==t.extrapolate&&(i=t.extrapolate);var o="extend";return void 0!==t.extrapolateRight?o=t.extrapolateRight:void 0!==t.extrapolate&&(o=t.extrapolate),function(t){var a=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,n);return function(t,e,n,r,i,o,a,s){var u=t;if(u<e){if("identity"===a)return u;"clamp"===a&&(u=e)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}if(r===i)return r;if(e===n)return t<=e?r:i;e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e);u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r;return u}(t,n[a],n[a+1],e[a],e[a+1],r,i,o)}},t}();function A(t){var e=V(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var P=/[0-9\.-]+/g;function O(t){var e=t.output,n=(e=e.map(A))[0].match(P).map(function(){return[]});e.forEach(function(t){t.match(P).forEach(function(t,e){return n[e].push(+t)})});var r=e[0].match(P).map(function(e,r){return x.create(s({},t,{output:n[r]}))}),i=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(P,function(){var e=r[n++](t);return String(i&&n<4?Math.round(e):e)})}}var S=function(t){function e(e,n){var r;return(r=t.call(this)||this)._parents=Array.isArray(e)?e:[e],r._interpolation=x.create(n),r}i(e,t);var n=e.prototype;return n.__getValue=function(){return this._interpolation.apply(this,this._parents.map(function(t){return t.__getValue()}))},n.__attach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof o&&this._parents[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof o&&this._parents[t].__removeChild(this)},n.interpolate=function(t){return new e(this,t)},e}(l),C=0;var E=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._animation=null,n._animatedStyles=new Set,n._listeners={},n}i(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value},n._flush=function(){!function t(e,n){"function"==typeof e.update?n.add(e):e.__getChildren().forEach(function(e){return t(e,n)})}(this,this._animatedStyles),this._animatedStyles.forEach(function(t){return t.update()})},n._updateValue=function(t){for(var e in this._value=t,this._flush(),this._listeners)this._listeners[e]({value:this.__getValue()})},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._animatedStyles.clear(),this._updateValue(t)},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new S(this,t)},n.animate=function(t,e){var n=this,r=this._animation;this._animation&&this._animation.stop(),this._animation=t,this._animatedStyles.clear(),t.start(this._value,function(t){return n._updateValue(t)},function(t){n._animation=null,e&&e(t)},r)},n.addListener=function(t){var e=String(C++);return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},e}(l);var T=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i};var R=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},j=function(t){function e(e){var n;return(n=t.call(this)||this)._values=e.map(function(t){return new E(t)}),n}i(e,t);var n=e.prototype;return n.setValue=function(t){var e=this;t.forEach(function(t,n){return e._values[n].setValue(t)})},n.__getValue=function(){return this._values.map(function(t){return t.__getValue()})},n.stopAnimation=function(t){this._values.forEach(function(t){return t.stopAnimation()}),t&&t(this.__getValue())},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__removeChild(this)},e}(l),F=function(t){function e(e,n){var r;return(r=t.call(this)||this)._strings=e,r._values=n,console.warn("OBSOLETE: templates in react-spring will be superceded by interpolators in the next minor, so that template`${radius}deg` becomes: radius.interpolate(r => `${r}deg` or for multiple values: interpolate([x,y,z], (x,y,z) => `${x}px,${y}px,${z}px`)"),r}i(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof o?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__removeChild(this)},e}(l),M=function(t,e){return void 0===t||null===t?e:t},W=function(t,e){return{tension:(n=t,3.62*(n-30)+194),friction:function(t){return 3*(t-8)+25}(e)};var n},U=function(t){function e(e){var n;(n=t.call(this)||this).onUpdate=function(){var t=n._lastPosition,e=n._lastVelocity,r=n._lastPosition,i=n._lastVelocity,o=Date.now();o>n._lastTime+64&&(o=n._lastTime+64);for(var a=Math.floor((o-n._lastTime)/1),s=0;s<a;++s){var u=e,l=n._tension*(n._toValue-r)-n._friction*i,c=(r=t+.001*u/2,i=e+.001*l/2),f=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*c/2;var p=i=e+.001*f/2,h=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*p/2;var d=i=e+.001*h/2,m=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*p/2,i=e+.001*h/2,t+=.001*((u+2*(c+p)+d)/6),e+=.001*((l+2*(f+h)+m)/6)}if(n._lastTime=o,n._lastPosition=t,n._lastVelocity=e,n._onUpdate(t),n.__active){var _=!1;n._overshootClamping&&0!==n._tension&&(_=n._startPosition<n._toValue?t>n._toValue:t<n._toValue);var v=Math.abs(e)<=n._restSpeedThreshold,y=!0;if(0!==n._tension&&(y=Math.abs(n._toValue-t)<=n._restDisplacementThreshold),_||v&&y)return 0!==n._tension&&n._onUpdate(n._toValue),void n.__debouncedOnEnd({finished:!0});n._animationFrame=requestAnimationFrame(n.onUpdate)}},n._overshootClamping=M(e.overshootClamping,!1),n._restDisplacementThreshold=M(e.restDisplacementThreshold,.001),n._restSpeedThreshold=M(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=M(e.velocity,0),n._toValue=e.toValue,n.__isInteraction=void 0===e.isInteraction||e.isInteraction;var r=W(M(e.tension,40),M(e.friction,7));return n._tension=r.tension,n._friction=r.friction,n._delay=void 0!==e.delay?e.delay:0,n}i(e,t);var n=e.prototype;return n.start=function(t,n,r,i){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof e){var o=i.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this._delay?this._timeout=setTimeout(this.onUpdate,this._delay):this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.stop=function(){this.__active=!1,clearTimeout(this._timeout),cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(r),q="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function I(t,e){return t(e={exports:{}},e.exports),e.exports}var N=I(function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},e.apply(this,arguments)}t.exports=e}),D=function(t){function e(e){var n;return n=t.call(this)||this,e=e||{},n._style=e,n}i(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof o?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof o&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof o&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof o&&e.__removeChild(this)}},e}(l),L=function(t){function e(e,n){var r;return r=t.call(this)||this,e.style&&(e=s({},e,{style:new D(e.style)})),r._props=e,r._callback=n,r.__attach(),r}i(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof o?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof o&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof o&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof o&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(o),$={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){$.current=t,$.transformStyles=e}};var B=function(t,e){var n=0,r={},i=!(e&&!1===e.stopTogether),o={start:function(e){if(n===t.length)return e&&e({finished:!0});t.forEach(function(a,s){var u=function(a){if(r[s]=!0,++n===t.length)return n=0,e&&e(a);!a.finished&&i&&o.stop()};a?a.start(u):u({finished:!0})})},stop:function(){t.forEach(function(t,e){!r[e]&&t.stop(),r[e]=!0})}};return o},G={Value:E,Array:j,controller:function t(e,n,r){return function(t,e,n,r){var i=e.tension,o=e.friction,a=e.toValue;return t instanceof j?B(t._values.map(function(t,e){return n(t,{tension:i,friction:o,toValue:a[e]},r)}),{stopTogether:!1}):null}(e,n,t,r)||{start:function(t){var i=e,a=n;i.stopTracking(),n.toValue instanceof o?i.track(new u(i,n.toValue,r,a,t)):i.animate(new r(a),t)},stop:function(){e.stopAnimation()}}},template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new F(t,n)},interpolate:function(t,e){return new S(t,e)},createAnimatedComponent:function(t){return function(n){function r(){return n.apply(this,arguments)||this}i(r,n);var o=r.prototype;return o.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},o.setNativeProps=function(t){!1===$.current(this.node,t,this)&&this.forceUpdate()},o.componentWillMount=function(){this.attachProps(this.props)},o.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new L(t,function(){e.node&&!1===$.current(e.node,e._propsAnimated.__getAnimatedValue(),e)&&e.forceUpdate()}),n&&n.__detach()},o.componentWillReceiveProps=function(t){this.attachProps(t)},o.render=function(){var n=this,r=this._propsAnimated.__getValue(),i=r.style,o=T(r,["style"]);return e.createElement(t,N({},o,{style:$.transformStyles(i),ref:function(t){return n.node=t}}))},r}(e.Component)},inject:{ApplyAnimatedValues:$.inject},ApplyAnimatedValues:$,AnimatedProps:L},H={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var K=["Webkit","ms","Moz","O"];function X(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||H.hasOwnProperty(t)&&H[t]?(""+e).trim():e+"px"}Object.keys(H).forEach(function(t){K.forEach(function(e){H[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=H[t]})}),G.inject.ApplyAnimatedValues(function(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;!function(t,e){var n=t.style;for(var r in e)if(e.hasOwnProperty(r)){var i=0===r.indexOf("--"),o=X(r,e[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,o):n[r]=o}}(t,e.style),function(t,e){var n;for(var r in e)"style"!==r&&(n=e[r],t.getAttribute(r)&&t.setAttribute(r,n))}(t,e)}},function(t){return t});var Y=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return s({},t,((n={})[e]=G.createAnimatedComponent(e),n))},{}),J=s({},G,{elements:Y}),Q=J.elements,Z=J.template,tt=J.interpolate,et={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60}},nt=function(t){function e(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={props:void 0},n.defaultAnimation=new J.Value(0),n.animations={},n.callback=function(){n.props.onFrame&&n.props.onFrame(n.animatedProps.__getValue()),!n.props.native&&n.forceUpdate()},e||R(n)}i(e,t);var n=e.prototype;return n.componentWillUnmount=function(){this.stop()},n.componentWillMount=function(){this.updatePropsAsync(this.props)},n.componentWillReceiveProps=function(t){this.updatePropsAsync(t)},n.updatePropsAsync=function(t){var e=this;return t.inject?t.inject(t).then(function(t){return e.updateProps(t)}):this.updateProps(t)},n.updateProps=function(t){var e=this,n=t.impl,r=t.from,i=t.to,o=t.config,a=t.attach,u=t.immediate,l=t.reset,c=(t.onFrame,t.onRest),f=t.inject,p=Object.entries(s({},r,i)),h=this.defaultAnimation._value;this.defaultAnimation.setValue(0),this.interpolators={},this.animations=p.reduce(function(t,i,f){var p,d=i[0],m=i[1],_=!1===l&&e.animations[d]||(e.animations[d]={}),v="number"==typeof m,y=!v&&Array.isArray(m),g=void 0!==r[d]?r[d]:m,b=v||y?m:1;if(v&&a){var w=a(e),V=w&&w.animations[d];V&&(b=V.animation)}if(v||"auto"===b)_.animation=_.interpolation=_.animation||new J.Value(g);else if(y)_.animation=_.interpolation=_.animation||new J.Array(g);else{var k=_.interpolation&&_.interpolation._interpolation(h);_.animation=e.defaultAnimation,_.interpolation=e.defaultAnimation.interpolate({range:[0,1],output:[void 0!==k?k:g,m]})}return!u||!0!==u&&-1===u.indexOf(d)||_.animation.setValue(b),_.stopped=!1,_.start=function(t){J.controller(_.animation,s({toValue:b},o),n).start(function(n){if(n.finished&&(e.animations[d].stopped=!0,Object.values(e.animations).every(function(t){return t.stopped}))){var r=s({},e.props.from,e.props.to);c&&c(r),t&&t(r)}})},_.stop=function(){_.stopped=!0,_.animation.stopAnimation()},e.interpolators[d]=_.interpolation,s({},t,((p={})[d]=_,p))},{});var d=this.animatedProps;this.animatedProps=new J.AnimatedProps(this.interpolators,this.callback),d&&d.__detach(),f&&this.forceUpdate(),this.start()},n.start=function(){var t=this;return new Promise(function(e){return t.getAnimations().forEach(function(t){return t.start(e)})})},n.stop=function(){this.getAnimations().forEach(function(t){return t.stop()})},n.getAnimations=function(){return Object.values(this.animations)},n.getValues=function(){return this.animatedProps?this.animatedProps.__getValue():{}},n.getAnimatedValues=function(){return this.props.native?this.interpolators:this.getValues()},n.getForwardProps=function(){var t=this.props;t.to,t.fom,t.config,t.native,t.onRest,t.onFrame,t.children,t.render,t.reset,t.immediate,t.impl;return T(t,["to","fom","config","native","onRest","onFrame","children","render","reset","immediate","impl"])},n.render=function(){var t=this.props,e=t.children,n=t.render,r=this.getAnimatedValues();if(r&&Object.keys(r).length){var i=s({},this.getAnimatedValues(),this.getForwardProps());return n?n(s({},i,{children:e})):e(i)}return null},e}(e.PureComponent);nt.defaultProps={from:{},to:{},config:et.default,native:!1,immediate:!1,reset:!1,impl:U};var rt=function(t,e){return"function"==typeof t?t(e):t},it=function(t){function n(e){var n;n=t.call(this)||this;var r=e.children,i=e.render,o=e.keys,a=e.items,s=e.from,u=void 0===s?{}:s,l=e.enter,c=void 0===l?{}:l,f=(e.leave,e.update);return r=i||r||function(){return null},"function"==typeof o&&(o=a.map(o)),Array.isArray(r)||(r=[r],o=o?[o]:r),n.state={transitionKeys:o,transitions:r.map(function(t,e){var n=a?a[e]:o[e];return{children:t,key:o[e],item:n,to:rt(c,n),from:rt(u,n),update:rt(f,n)}})},n}i(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=this,n=this.state,r=n.transitions,i=n.transitionKeys,o=t.children,a=t.render,s=t.keys,u=t.items,l=t.from,c=void 0===l?{}:l,f=t.enter,p=void 0===f?{}:f,h=t.leave,d=void 0===h?{}:h,m=t.update;o=a||o||function(){return null},"function"==typeof s&&(s=u.map(s)),Array.isArray(o)||(o=[o],s=s?[s]:o);var _=new Set(s),v=new Set(i),y=s.filter(function(t){return!v.has(t)}),g=i.filter(function(t){return!_.has(t)}),b=s.filter(function(t){return v.has(t)});r=r.map(function(t){if(void 0===t.destroy){var e=s.indexOf(t.key),n=o[e];n&&(t.children=n),m&&-1!==b.indexOf(t.key)&&(t.to=rt(m,u?u[e]:s[e])||t.to)}return t}),y.length&&y.forEach(function(t){var e=s.indexOf(t),n=o[e],i=u?u[e]:s[e],a={children:n,key:s[e],item:i,to:rt(p,i),from:rt(c,i)};r=r.slice(0,e).concat([a],r.slice(e))}),g.length&&g.forEach(function(t){var n=r.find(function(e){return e.key===t});if(n){var i={destroy:!0,children:n.children,key:n.key,to:rt(d,n.item),from:rt(c,n.item),onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==i})}})}};r=r.map(function(t){return t===n?i:t})}}),i=r.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var w=s.map(function(t){return r.find(function(e){return e.key===t})});r.forEach(function(t,e){t.destroy&&!w.find(function(e){return e.key===t.key})&&(w=w.slice(0,e).concat([t],w.slice(e)))}),this.setState({transitions:w,transitionKeys:i})},r.getValues=function(){},r.render=function(){var t=this,n=this.props,r=n.render,i=(n.from,n.enter,n.leave,n.native),o=void 0!==i&&i,a=n.config,u=void 0===a?et.default:a,l=(n.keys,n.items,n.onFrame),c=(n.onRest,T(n,["render","from","enter","leave","native","config","keys","items","onFrame","onRest"])),f=s({native:o,config:u},c);return this.state.transitions.map(function(n,i){var o=n.key,a=n.item,s=n.children,u=T(n,["key","item","children"]);return e.createElement(nt,N({key:o},u,f,{onFrame:l&&function(t){return l(a,t)},render:r&&s,children:r?t.props.children:s}))})},n}(e.PureComponent),ot=function(t){function n(){return t.apply(this,arguments)||this}i(n,t);var r=n.prototype;return r.getValues=function(){return this.instance&&this.instance.getValues()},r.render=function(){var t=this,n=this.props,r=n.children,i=n.render,o=n.from,a=void 0===o?{}:o,u=n.to,l=void 0===u?{}:u,c=n.native,f=void 0!==c&&c,p=n.config,h=void 0===p?et.default:p,d=n.keys,m=n.onRest,_=T(n,["children","render","from","to","native","config","keys","onRest"]),v=new Set,y=s({},_,{native:f,config:h,from:a,to:l});return(i||r).map(function(n,o){return e.createElement(nt,N({ref:function(e){return 0===o&&(t.instance=e)},onRest:0===o?m:null,key:d[o]},y,{attach:function(t){return function(t,e){return v.add(e),0===t?void 0:Array.from(v)[t-1]}(o,t)},render:i&&n,children:i?r:n}))})},n}(e.PureComponent),at="__global_unique_id__",st=function(){return q[at]=(q[at]||0)+1};function ut(t){return function(){return t}}var lt=function(){};lt.thatReturns=ut,lt.thatReturnsFalse=ut(!1),lt.thatReturnsTrue=ut(!0),lt.thatReturnsNull=ut(null),lt.thatReturnsThis=function(){return this},lt.thatReturnsArgument=function(t){return t};var ct=lt;if("production"!==process.env.NODE_ENV){ct=function(t,e){if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(t){}}).apply(void 0,[e].concat(r))}}}var ft=ct,pt=I(function(t,r){r.__esModule=!0;s(e);var i=s(n),o=s(st),a=s(ft);function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=1073741823;r.default=function(t,n){var r,s,p="__create-react-context-"+(0,o.default)()+"__",h=function(t){function e(){var n,r,i,o;u(this,e);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=l(this,t.call.apply(t,[this].concat(s))),r.emitter=(i=r.props.value,o=[],{on:function(t){o.push(t)},off:function(t){o=o.filter(function(e){return e!==t})},get:function(){return i},set:function(t,e){i=t,o.forEach(function(t){return t(i,e)})}}),l(r,n)}return c(e,t),e.prototype.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},e.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e=this.props.value,r=t.value,i=void 0;((o=e)===(s=r)?0!==o||1/o==1/s:o!=o&&s!=s)?i=0:(i="function"==typeof n?n(e,r):f,"production"!==process.env.NODE_ENV&&(0,a.default)((i&f)===i,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",i),0!=(i|=0)&&this.emitter.set(t.value,i))}var o,s},e.prototype.render=function(){return this.props.children},e}(e.Component);h.childContextTypes=((r={})[p]=i.default.object.isRequired,r);var d=function(e){function n(){var t,r;u(this,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r=l(this,e.call.apply(e,[this].concat(o))),r.state={value:r.getValue()},r.onUpdate=function(t,e){0!=((0|r.observedBits)&e)&&r.setState({value:r.getValue()})},l(r,t)}return c(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?f:e},n.prototype.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?f:t},n.prototype.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[p]?this.context[p].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return d.contextTypes=((s={})[p]=i.default.object,s),{Provider:h,Consumer:d}},t.exports=r.default});z(pt);var ht=z(I(function(t,n){n.__esModule=!0;var r=o(e),i=o(pt);function o(t){return t&&t.__esModule?t:{default:t}}n.default=r.default.createContext||i.default,t.exports=n.default}))(null),dt=ht.Provider,mt=ht.Consumer;function _t(t){return t?"scrollLeft":"scrollTop"}var vt=function(t){function n(){return t.apply(this,arguments)||this}i(n,t);var r=n.prototype;return r.componentDidMount=function(){var t=this.parent;t&&(t.layers=t.layers.concat(this),t.update())},r.componentWillUnmount=function(){var t=this,e=this.parent;e&&(e.layers=e.layers.filter(function(e){return e!==t}),e.update())},r.setPosition=function(t,e,n){void 0===n&&(n=!1);var r=this.parent.props,i=r.config,o=r.impl,a=Math.floor(this.props.offset)*t,u=t*this.props.offset+a*this.props.speed,l=parseFloat(-e*this.props.speed+u);n?this.animatedTranslate.setValue(l):J.controller(this.animatedTranslate,s({toValue:l},i),o).start()},r.setHeight=function(t,e){void 0===e&&(e=!1);var n=this.parent.props,r=n.config,i=n.impl,o=parseFloat(t*this.props.factor);e?this.animatedSpace.setValue(o):J.controller(this.animatedSpace,s({toValue:o},r),i).start()},r.initialize=function(){var t=this.props,e=this.parent,n=Math.floor(t.offset)*e.space,r=e.space*t.offset+n*t.speed,i=parseFloat(-e.current*t.speed+r);this.animatedTranslate=new J.Value(i),this.animatedSpace=new J.Value(e.space*t.factor)},r.renderLayer=function(){var t,n=this.props,r=n.style,i=n.children,o=(n.offset,n.speed,n.factor,n.className),a=T(n,["style","children","offset","speed","factor","className"]),u=this.parent.props.horizontal,l=this.animatedTranslate.interpolate({range:[0,1],output:u?["translate3d(0px,0,0)","translate3d(1px,0,0)"]:["translate3d(0,0px,0)","translate3d(0,1px,0)"]});return e.createElement(Q.div,N({},a,{className:o,style:s((t={position:"absolute",backgroundSize:"auto",backgroundRepeat:"no-repeat",willChange:"transform"},t[u?"height":"width"]="100%",t[u?"width":"height"]=this.animatedSpace,t.WebkitTransform=l,t.MsTransform=l,t.transform=l,t),r)}),i)},r.render=function(){var t=this;return e.createElement(mt,null,function(e){return e&&!t.parent&&(t.parent=e,t.initialize()),t.renderLayer()})},n}(e.PureComponent);vt.defaultProps={factor:1,offset:0,speed:0};var yt=function(t){function n(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={ready:!1},n.layers=[],n.space=0,n.current=0,n.offset=0,n.busy=!1,n.moveItems=function(){n.layers.forEach(function(t){return t.setPosition(n.space,n.current)}),n.busy=!1},n.scrollerRaf=function(){return requestAnimationFrame(n.moveItems)},n.onScroll=function(t){var e=n.props.horizontal;n.busy||(n.busy=!0,n.scrollerRaf(),n.current=t.target[_t(e)])},n.update=function(){var t=n.props,e=t.scrolling,r=t.horizontal,i=_t(r);n.container&&(n.space=n.container[r?"clientWidth":"clientHeight"],e?n.current=n.container[i]:n.container[i]=n.current=n.offset*n.space,n.content&&(n.content.style[r?"width":"height"]=n.space*n.props.pages+"px"),n.layers.forEach(function(t){t.setHeight(n.space,!0),t.setPosition(n.space,n.current,!0)}))},n.updateRaf=function(){requestAnimationFrame(n.update),setTimeout(n.update,150)},n.scrollStop=function(t){return n.animatedScroll&&n.animatedScroll.stopAnimation()},e||R(n)}i(n,t);var r=n.prototype;return r.scrollTo=function(t){var e=this.props,n=e.horizontal,r=e.config,i=e.impl,o=_t(n);this.scrollStop(),this.offset=t;var a=this.container;this.animatedScroll=new J.Value(a[o]),this.animatedScroll.addListener(function(t){var e=t.value;return a[o]=e}),J.controller(this.animatedScroll,s({toValue:t*this.space},r),i).start()},r.componentDidMount=function(){window.addEventListener("resize",this.updateRaf,!1),this.update(),this.setState({ready:!0})},r.componentWillUnmount=function(){window.removeEventListener("resize",this.updateRaf,!1)},r.componentDidUpdate=function(){this.update()},r.render=function(){var t,n=this,r=this.props,i=r.style,o=r.innerStyle,a=r.pages,u=r.className,l=r.scrolling,c=r.children,f=r.horizontal,p=l?"scroll":"hidden";return e.createElement("div",{ref:function(t){return n.container=t},onScroll:this.onScroll,onWheel:l?this.scrollStop:null,onTouchStart:l?this.scrollStop:null,style:s({position:"absolute",width:"100%",height:"100%",overflow:p,overflowY:f?"hidden":p,overflowX:f?p:"hidden",WebkitOverflowScrolling:"touch",WebkitTransform:"translate(0,0)",MsTransform:"translate(0,0)",transform:"translate3d(0,0,0)"},i),className:u},this.state.ready&&e.createElement("div",{ref:function(t){return n.content=t},style:s((t={position:"absolute"},t[f?"height":"width"]="100%",t.WebkitTransform="translate(0,0)",t.MsTransform="translate(0,0)",t.transform="translate3d(0,0,0)",t.overflow="hidden",t[f?"width":"height"]=this.space*a,t),o)},e.createElement(dt,{value:this},c)))},n}(e.PureComponent);yt.Layer=vt,yt.defaultProps={config:et.slow,scrolling:!0,horizontal:!1,impl:U};var gt=function(t){function n(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={primitive:void 0,props:{},resolve:function(){return null}},n.next=function(t,e){return new Promise(function(r){var i=n.instance&&n.instance.getValues(),o="function"==typeof e.from?e.from:s({},n.state.props.from,i,e.from);n.setState(function(n){return{primitive:t,props:s({},e,{from:o}),resolve:r}})})},e||R(n)}i(n,t);var r=n.prototype;return r.componentDidMount=function(){this.props.script&&this.props.script(this.next)},r.render=function(){var t=this,n=this.state,r=n.primitive,i=n.props,o=n.resolve,a=this.props,s=(a.script,T(a,["script"]));return r?e.createElement(r,N({ref:function(e){return t.instance=e}},s,i,{onRest:o})):null},n}(e.Component);t.Spring=nt,t.Keyframes=gt,t.Transition=it,t.Trail=ot,t.Parallax=yt,t.ParallaxLayer=vt,t.config=et,t.template=Z,t.animated=Q,t.interpolate=tt,t.Animation=r,t.Value=E,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],e):e(t.ReactSpring={},t.React,t.PropTypes)}(this,function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,r){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();var i=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},o=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}();var a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){a(t,e,n[e])})}return t},u=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this)||this)._value=e,a._parent=n,a._animationClass=r,a._animationConfig=i,a._callback=o,a.__attach(),a._hey=1,a}i(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(s({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(o),l=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}i(e,t);var n=e.prototype;return n.__addChild=function(t){t instanceof u&&(this._tracked=!0),0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(o);function c(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=_.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:w.hasOwnProperty(t)?w[t]:(e=_.rgb.exec(t))?(v(e[1])<<24|v(e[2])<<16|v(e[3])<<8|255)>>>0:(e=_.rgba.exec(t))?(v(e[1])<<24|v(e[2])<<16|v(e[3])<<8|g(e[4]))>>>0:(e=_.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=_.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=_.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=_.hsl.exec(t))?(255|p(y(e[1]),b(e[2]),b(e[3])))>>>0:(e=_.hsla.exec(t))?(p(y(e[1]),b(e[2]),b(e[3]))|g(e[4]))>>>0:null}function f(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function p(t,e,n){var r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=f(i,r,t+1/3),a=f(i,r,t),s=f(i,r,t-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}var h="[-+]?\\d*\\.?\\d+",d=h+"%";function m(){return"\\(\\s*("+(t=arguments,Array.prototype.slice.call(t,0)).join(")\\s*,\\s*(")+")\\s*\\)";var t}var _={rgb:new RegExp("rgb"+m(h,h,h)),rgba:new RegExp("rgba"+m(h,h,h,h)),hsl:new RegExp("hsl"+m(h,d,d)),hsla:new RegExp("hsla"+m(h,d,d,h)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function v(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function y(t){return(parseFloat(t)%360+360)%360/360}function g(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function b(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/100}var w={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};c.rgba=function(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}};var V=c,k=function(t){return t},x=function(){function t(){}return t.create=function(t){if("function"==typeof t)return function(){return t.apply(void 0,arguments)};if(t.output&&"string"==typeof t.output[0])return O(t);var e=t.output,n=t.range,r=t.easing||k,i="extend";void 0!==t.extrapolateLeft?i=t.extrapolateLeft:void 0!==t.extrapolate&&(i=t.extrapolate);var o="extend";return void 0!==t.extrapolateRight?o=t.extrapolateRight:void 0!==t.extrapolate&&(o=t.extrapolate),function(t){var a=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,n);return function(t,e,n,r,i,o,a,s){var u=t;if(u<e){if("identity"===a)return u;"clamp"===a&&(u=e)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}if(r===i)return r;if(e===n)return t<=e?r:i;e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e);u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r;return u}(t,n[a],n[a+1],e[a],e[a+1],r,i,o)}},t}();function A(t){var e=V(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var P=/[0-9\.-]+/g;function O(t){var e=t.output,n=(e=e.map(A))[0].match(P).map(function(){return[]});e.forEach(function(t){t.match(P).forEach(function(t,e){return n[e].push(+t)})});var r=e[0].match(P).map(function(e,r){return x.create(s({},t,{output:n[r]}))}),i=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(P,function(){var e=r[n++](t);return String(i&&n<4?Math.round(e):e)})}}var S=function(t){function e(e,n){var r;return(r=t.call(this)||this)._parents=Array.isArray(e)?e:[e],r._interpolation=x.create(n),r}i(e,t);var n=e.prototype;return n.__getValue=function(){return this._interpolation.apply(this,this._parents.map(function(t){return t.__getValue()}))},n.__attach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof o&&this._parents[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof o&&this._parents[t].__removeChild(this)},n.interpolate=function(t){return new e(this,t)},e}(l),C=0;var E=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._animation=null,n._animatedStyles=new Set,n._listeners={},n}i(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value},n._flush=function(){!function t(e,n){"function"==typeof e.update?n.add(e):e.__getChildren().forEach(function(e){return t(e,n)})}(this,this._animatedStyles),this._animatedStyles.forEach(function(t){return t.update()})},n._updateValue=function(t){for(var e in this._value=t,this._flush(),this._listeners)this._listeners[e]({value:this.__getValue()})},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._animatedStyles.clear(),this._updateValue(t)},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new S(this,t)},n.animate=function(t,e){var n=this,r=this._animation;this._animation&&this._animation.stop(),this._animation=t,this._animatedStyles.clear(),t.start(this._value,function(t){return n._updateValue(t)},function(t){n._animation=null,e&&e(t)},r)},n.addListener=function(t){var e=String(C++);return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},e}(l);var T=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i};var R=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},j=function(t){function e(e){var n;return(n=t.call(this)||this)._values=e.map(function(t){return new E(t)}),n}i(e,t);var n=e.prototype;return n.setValue=function(t){var e=this;t.forEach(function(t,n){return e._values[n].setValue(t)})},n.__getValue=function(){return this._values.map(function(t){return t.__getValue()})},n.stopAnimation=function(t){this._values.forEach(function(t){return t.stopAnimation()}),t&&t(this.__getValue())},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__removeChild(this)},e}(l),F=function(t){function e(e,n){var r;return(r=t.call(this)||this)._strings=e,r._values=n,console.warn("OBSOLETE: templates in react-spring will be superceded by interpolators in the next minor, so that template`${radius}deg` becomes: radius.interpolate(r => `${r}deg` or for multiple values: interpolate([x,y,z], (x,y,z) => `${x}px,${y}px,${z}px`)"),r}i(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof o?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof o&&this._values[t].__removeChild(this)},e}(l),M=function(t,e){return void 0===t||null===t?e:t},W=function(t,e){return{tension:(n=t,3.62*(n-30)+194),friction:function(t){return 3*(t-8)+25}(e)};var n},U=function(t){function e(e){var n;(n=t.call(this)||this).onUpdate=function(){var t=n._lastPosition,e=n._lastVelocity,r=n._lastPosition,i=n._lastVelocity,o=Date.now();o>n._lastTime+64&&(o=n._lastTime+64);for(var a=Math.floor((o-n._lastTime)/1),s=0;s<a;++s){var u=e,l=n._tension*(n._toValue-r)-n._friction*i,c=(r=t+.001*u/2,i=e+.001*l/2),f=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*c/2;var p=i=e+.001*f/2,h=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*p/2;var d=i=e+.001*h/2,m=n._tension*(n._toValue-r)-n._friction*i;r=t+.001*p/2,i=e+.001*h/2,t+=.001*((u+2*(c+p)+d)/6),e+=.001*((l+2*(f+h)+m)/6)}if(n._lastTime=o,n._lastPosition=t,n._lastVelocity=e,n._onUpdate(t),n.__active){var _=!1;n._overshootClamping&&0!==n._tension&&(_=n._startPosition<n._toValue?t>n._toValue:t<n._toValue);var v=Math.abs(e)<=n._restSpeedThreshold,y=!0;if(0!==n._tension&&(y=Math.abs(n._toValue-t)<=n._restDisplacementThreshold),_||v&&y)return 0!==n._tension&&n._onUpdate(n._toValue),void n.__debouncedOnEnd({finished:!0});n._animationFrame=requestAnimationFrame(n.onUpdate)}},n._overshootClamping=M(e.overshootClamping,!1),n._restDisplacementThreshold=M(e.restDisplacementThreshold,.001),n._restSpeedThreshold=M(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=M(e.velocity,0),n._toValue=e.toValue,n.__isInteraction=void 0===e.isInteraction||e.isInteraction;var r=W(M(e.tension,40),M(e.friction,7));return n._tension=r.tension,n._friction=r.friction,n._delay=void 0!==e.delay?e.delay:0,n}i(e,t);var n=e.prototype;return n.start=function(t,n,r,i){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof e){var o=i.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this._delay?this._timeout=setTimeout(this.onUpdate,this._delay):this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.stop=function(){this.__active=!1,clearTimeout(this._timeout),cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(r),q="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function I(t,e){return t(e={exports:{}},e.exports),e.exports}var N=I(function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},e.apply(this,arguments)}t.exports=e}),D=function(t){function e(e){var n;return n=t.call(this)||this,e=e||{},n._style=e,n}i(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof o?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof o&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof o&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof o&&e.__removeChild(this)}},e}(l),L=function(t){function e(e,n){var r;return r=t.call(this)||this,e.style&&(e=s({},e,{style:new D(e.style)})),r._props=e,r._callback=n,r.__attach(),r}i(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof o?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof o&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof o&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof o&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(o),$={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){$.current=t,$.transformStyles=e}};var B=function(t,e){var n=0,r={},i=!(e&&!1===e.stopTogether),o={start:function(e){if(n===t.length)return e&&e({finished:!0});t.forEach(function(a,s){var u=function(a){if(r[s]=!0,++n===t.length)return n=0,e&&e(a);!a.finished&&i&&o.stop()};a?a.start(u):u({finished:!0})})},stop:function(){t.forEach(function(t,e){!r[e]&&t.stop(),r[e]=!0})}};return o},G={Value:E,Array:j,controller:function t(e,n,r){return function(t,e,n,r){var i=e.tension,o=e.friction,a=e.toValue;return t instanceof j?B(t._values.map(function(t,e){return n(t,{tension:i,friction:o,toValue:a[e]},r)}),{stopTogether:!1}):null}(e,n,t,r)||{start:function(t){var i=e,a=n;i.stopTracking(),n.toValue instanceof o?i.track(new u(i,n.toValue,r,a,t)):i.animate(new r(a),t)},stop:function(){e.stopAnimation()}}},template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new F(t,n)},interpolate:function(t,e){return new S(t,e)},createAnimatedComponent:function(t){return function(n){function r(){return n.apply(this,arguments)||this}i(r,n);var o=r.prototype;return o.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},o.setNativeProps=function(t){!1===$.current(this.node,t,this)&&this.forceUpdate()},o.componentWillMount=function(){this.attachProps(this.props)},o.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new L(t,function(){e.node&&!1===$.current(e.node,e._propsAnimated.__getAnimatedValue(),e)&&e.forceUpdate()}),n&&n.__detach()},o.componentWillReceiveProps=function(t){this.attachProps(t)},o.render=function(){var n=this,r=this._propsAnimated.__getValue(),i=r.style,o=T(r,["style"]);return e.createElement(t,N({},o,{style:$.transformStyles(i),ref:function(t){return n.node=t}}))},r}(e.Component)},inject:{ApplyAnimatedValues:$.inject},ApplyAnimatedValues:$,AnimatedProps:L},H={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var K=["Webkit","ms","Moz","O"];function X(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||H.hasOwnProperty(t)&&H[t]?(""+e).trim():e+"px"}Object.keys(H).forEach(function(t){K.forEach(function(e){H[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=H[t]})}),G.inject.ApplyAnimatedValues(function(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;!function(t,e){var n=t.style;for(var r in e)if(e.hasOwnProperty(r)){var i=0===r.indexOf("--"),o=X(r,e[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,o):n[r]=o}}(t,e.style),function(t,e){var n;for(var r in e)"style"!==r&&(n=e[r],t.getAttribute(r)&&t.setAttribute(r,n))}(t,e)}},function(t){return t});var Y=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return s({},t,((n={})[e]=G.createAnimatedComponent(e),n))},{}),J=s({},G,{elements:Y}),Q=J.elements,Z=J.template,tt=J.interpolate,et={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60}},nt=function(t){function e(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={props:void 0},n.defaultAnimation=new J.Value(0),n.animations={},n.callback=function(){n.props.onFrame&&n.props.onFrame(n.animatedProps.__getValue()),!n.props.native&&n.forceUpdate()},e||R(n)}i(e,t);var n=e.prototype;return n.componentWillUnmount=function(){this.stop()},n.componentWillMount=function(){this.updatePropsAsync(this.props)},n.componentWillReceiveProps=function(t){this.updatePropsAsync(t)},n.updatePropsAsync=function(t){var e=this;return t.inject?t.inject(t).then(function(t){return e.updateProps(t)}):this.updateProps(t)},n.updateProps=function(t){var e=this,n=t.impl,r=t.from,i=t.to,o=t.config,a=t.attach,u=t.immediate,l=t.reset,c=(t.onFrame,t.onRest),f=t.inject,p=Object.entries(s({},r,i)),h=this.defaultAnimation._value;this.defaultAnimation.setValue(0),this.interpolators={},this.animations=p.reduce(function(t,i,f){var p,d=i[0],m=i[1],_=!1===l&&e.animations[d]||(e.animations[d]={}),v="number"==typeof m,y=!v&&Array.isArray(m),g=void 0!==r[d]?r[d]:m,b=v||y?m:1;if(v&&a){var w=a(e),V=w&&w.animations[d];V&&(b=V.animation)}if(v||"auto"===b)_.animation=_.interpolation=_.animation||new J.Value(g);else if(y)_.animation=_.interpolation=_.animation||new J.Array(g);else{var k=_.interpolation&&_.interpolation._interpolation(h);_.animation=e.defaultAnimation,_.interpolation=e.defaultAnimation.interpolate({range:[0,1],output:[void 0!==k?k:g,m]})}return!u||!0!==u&&-1===u.indexOf(d)||_.animation.setValue(b),_.stopped=!1,_.start=function(t){J.controller(_.animation,s({toValue:b},o),n).start(function(n){if(n.finished&&(e.animations[d].stopped=!0,Object.values(e.animations).every(function(t){return t.stopped}))){var r=s({},e.props.from,e.props.to);c&&c(r),t&&t(r)}})},_.stop=function(){_.stopped=!0,_.animation.stopAnimation()},e.interpolators[d]=_.interpolation,s({},t,((p={})[d]=_,p))},{});var d=this.animatedProps;this.animatedProps=new J.AnimatedProps(this.interpolators,this.callback),d&&d.__detach(),f&&this.forceUpdate(),this.start()},n.start=function(){var t=this;return new Promise(function(e){return t.getAnimations().forEach(function(t){return t.start(e)})})},n.stop=function(){this.getAnimations().forEach(function(t){return t.stop()})},n.getAnimations=function(){return Object.values(this.animations)},n.getValues=function(){return this.animatedProps?this.animatedProps.__getValue():{}},n.getAnimatedValues=function(){return this.props.native?this.interpolators:this.getValues()},n.getForwardProps=function(){var t=this.props;t.to,t.from,t.config,t.native,t.onRest,t.onFrame,t.children,t.render,t.reset,t.immediate,t.impl;return T(t,["to","from","config","native","onRest","onFrame","children","render","reset","immediate","impl"])},n.render=function(){var t=this.props,e=t.children,n=t.render,r=this.getAnimatedValues();if(r&&Object.keys(r).length){var i=s({},this.getAnimatedValues(),this.getForwardProps());return n?n(s({},i,{children:e})):e(i)}return null},e}(e.PureComponent);nt.defaultProps={from:{},to:{},config:et.default,native:!1,immediate:!1,reset:!1,impl:U};var rt=function(t,e){return"function"==typeof t?t(e):t},it=function(t){function n(e){var n;n=t.call(this)||this;var r=e.children,i=e.render,o=e.keys,a=e.items,s=e.from,u=void 0===s?{}:s,l=e.enter,c=void 0===l?{}:l,f=(e.leave,e.update);return r=i||r||function(){return null},"function"==typeof o&&(o=a.map(o)),Array.isArray(r)||(r=[r],o=o?[o]:r),n.state={transitionKeys:o,transitions:r.map(function(t,e){var n=a?a[e]:o[e];return{children:t,key:o[e],item:n,to:rt(c,n),from:rt(u,n),update:rt(f,n)}})},n}i(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=this,n=this.state,r=n.transitions,i=n.transitionKeys,o=t.children,a=t.render,s=t.keys,u=t.items,l=t.from,c=void 0===l?{}:l,f=t.enter,p=void 0===f?{}:f,h=t.leave,d=void 0===h?{}:h,m=t.update;o=a||o||function(){return null},"function"==typeof s&&(s=u.map(s)),Array.isArray(o)||(o=[o],s=s?[s]:o);var _=new Set(s),v=new Set(i),y=s.filter(function(t){return!v.has(t)}),g=i.filter(function(t){return!_.has(t)}),b=s.filter(function(t){return v.has(t)});r=r.map(function(t){if(void 0===t.destroy){var e=s.indexOf(t.key),n=o[e];n&&(t.children=n),m&&-1!==b.indexOf(t.key)&&(t.to=rt(m,u?u[e]:s[e])||t.to)}return t}),y.length&&y.forEach(function(t){var e=s.indexOf(t),n=o[e],i=u?u[e]:s[e],a={children:n,key:s[e],item:i,to:rt(p,i),from:rt(c,i)};r=r.slice(0,e).concat([a],r.slice(e))}),g.length&&g.forEach(function(t){var n=r.find(function(e){return e.key===t});if(n){var i={destroy:!0,children:n.children,key:n.key,to:rt(d,n.item),from:rt(c,n.item),onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==i})}})}};r=r.map(function(t){return t===n?i:t})}}),i=r.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var w=s.map(function(t){return r.find(function(e){return e.key===t})});r.forEach(function(t,e){t.destroy&&!w.find(function(e){return e.key===t.key})&&(w=w.slice(0,e).concat([t],w.slice(e)))}),this.setState({transitions:w,transitionKeys:i})},r.getValues=function(){},r.render=function(){var t=this,n=this.props,r=n.render,i=(n.from,n.enter,n.leave,n.native),o=void 0!==i&&i,a=n.config,u=void 0===a?et.default:a,l=(n.keys,n.items,n.onFrame),c=(n.onRest,T(n,["render","from","enter","leave","native","config","keys","items","onFrame","onRest"])),f=s({native:o,config:u},c);return this.state.transitions.map(function(n,i){var o=n.key,a=n.item,s=n.children,u=T(n,["key","item","children"]);return e.createElement(nt,N({key:o},u,f,{onFrame:l&&function(t){return l(a,t)},render:r&&s,children:r?t.props.children:s}))})},n}(e.PureComponent),ot=function(t){function n(){return t.apply(this,arguments)||this}i(n,t);var r=n.prototype;return r.getValues=function(){return this.instance&&this.instance.getValues()},r.render=function(){var t=this,n=this.props,r=n.children,i=n.render,o=n.from,a=void 0===o?{}:o,u=n.to,l=void 0===u?{}:u,c=n.native,f=void 0!==c&&c,p=n.config,h=void 0===p?et.default:p,d=n.keys,m=n.onRest,_=T(n,["children","render","from","to","native","config","keys","onRest"]),v=new Set,y=s({},_,{native:f,config:h,from:a,to:l});return(i||r).map(function(n,o){return e.createElement(nt,N({ref:function(e){return 0===o&&(t.instance=e)},onRest:0===o?m:null,key:d[o]},y,{attach:function(t){return function(t,e){return v.add(e),0===t?void 0:Array.from(v)[t-1]}(o,t)},render:i&&n,children:i?r:n}))})},n}(e.PureComponent),at="__global_unique_id__",st=function(){return q[at]=(q[at]||0)+1};function ut(t){return function(){return t}}var lt=function(){};lt.thatReturns=ut,lt.thatReturnsFalse=ut(!1),lt.thatReturnsTrue=ut(!0),lt.thatReturnsNull=ut(null),lt.thatReturnsThis=function(){return this},lt.thatReturnsArgument=function(t){return t};var ct=lt;if("production"!==process.env.NODE_ENV){ct=function(t,e){if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(t){}}).apply(void 0,[e].concat(r))}}}var ft=ct,pt=I(function(t,r){r.__esModule=!0;s(e);var i=s(n),o=s(st),a=s(ft);function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=1073741823;r.default=function(t,n){var r,s,p="__create-react-context-"+(0,o.default)()+"__",h=function(t){function e(){var n,r,i,o;u(this,e);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=l(this,t.call.apply(t,[this].concat(s))),r.emitter=(i=r.props.value,o=[],{on:function(t){o.push(t)},off:function(t){o=o.filter(function(e){return e!==t})},get:function(){return i},set:function(t,e){i=t,o.forEach(function(t){return t(i,e)})}}),l(r,n)}return c(e,t),e.prototype.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},e.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e=this.props.value,r=t.value,i=void 0;((o=e)===(s=r)?0!==o||1/o==1/s:o!=o&&s!=s)?i=0:(i="function"==typeof n?n(e,r):f,"production"!==process.env.NODE_ENV&&(0,a.default)((i&f)===i,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",i),0!=(i|=0)&&this.emitter.set(t.value,i))}var o,s},e.prototype.render=function(){return this.props.children},e}(e.Component);h.childContextTypes=((r={})[p]=i.default.object.isRequired,r);var d=function(e){function n(){var t,r;u(this,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r=l(this,e.call.apply(e,[this].concat(o))),r.state={value:r.getValue()},r.onUpdate=function(t,e){0!=((0|r.observedBits)&e)&&r.setState({value:r.getValue()})},l(r,t)}return c(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?f:e},n.prototype.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?f:t},n.prototype.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[p]?this.context[p].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return d.contextTypes=((s={})[p]=i.default.object,s),{Provider:h,Consumer:d}},t.exports=r.default});z(pt);var ht=z(I(function(t,n){n.__esModule=!0;var r=o(e),i=o(pt);function o(t){return t&&t.__esModule?t:{default:t}}n.default=r.default.createContext||i.default,t.exports=n.default}))(null),dt=ht.Provider,mt=ht.Consumer;function _t(t){return t?"scrollLeft":"scrollTop"}var vt=function(t){function n(){return t.apply(this,arguments)||this}i(n,t);var r=n.prototype;return r.componentDidMount=function(){var t=this.parent;t&&(t.layers=t.layers.concat(this),t.update())},r.componentWillUnmount=function(){var t=this,e=this.parent;e&&(e.layers=e.layers.filter(function(e){return e!==t}),e.update())},r.setPosition=function(t,e,n){void 0===n&&(n=!1);var r=this.parent.props,i=r.config,o=r.impl,a=Math.floor(this.props.offset)*t,u=t*this.props.offset+a*this.props.speed,l=parseFloat(-e*this.props.speed+u);n?this.animatedTranslate.setValue(l):J.controller(this.animatedTranslate,s({toValue:l},i),o).start()},r.setHeight=function(t,e){void 0===e&&(e=!1);var n=this.parent.props,r=n.config,i=n.impl,o=parseFloat(t*this.props.factor);e?this.animatedSpace.setValue(o):J.controller(this.animatedSpace,s({toValue:o},r),i).start()},r.initialize=function(){var t=this.props,e=this.parent,n=Math.floor(t.offset)*e.space,r=e.space*t.offset+n*t.speed,i=parseFloat(-e.current*t.speed+r);this.animatedTranslate=new J.Value(i),this.animatedSpace=new J.Value(e.space*t.factor)},r.renderLayer=function(){var t,n=this.props,r=n.style,i=n.children,o=(n.offset,n.speed,n.factor,n.className),a=T(n,["style","children","offset","speed","factor","className"]),u=this.parent.props.horizontal,l=this.animatedTranslate.interpolate({range:[0,1],output:u?["translate3d(0px,0,0)","translate3d(1px,0,0)"]:["translate3d(0,0px,0)","translate3d(0,1px,0)"]});return e.createElement(Q.div,N({},a,{className:o,style:s((t={position:"absolute",backgroundSize:"auto",backgroundRepeat:"no-repeat",willChange:"transform"},t[u?"height":"width"]="100%",t[u?"width":"height"]=this.animatedSpace,t.WebkitTransform=l,t.MsTransform=l,t.transform=l,t),r)}),i)},r.render=function(){var t=this;return e.createElement(mt,null,function(e){return e&&!t.parent&&(t.parent=e,t.initialize()),t.renderLayer()})},n}(e.PureComponent);vt.defaultProps={factor:1,offset:0,speed:0};var yt=function(t){function n(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={ready:!1},n.layers=[],n.space=0,n.current=0,n.offset=0,n.busy=!1,n.moveItems=function(){n.layers.forEach(function(t){return t.setPosition(n.space,n.current)}),n.busy=!1},n.scrollerRaf=function(){return requestAnimationFrame(n.moveItems)},n.onScroll=function(t){var e=n.props.horizontal;n.busy||(n.busy=!0,n.scrollerRaf(),n.current=t.target[_t(e)])},n.update=function(){var t=n.props,e=t.scrolling,r=t.horizontal,i=_t(r);n.container&&(n.space=n.container[r?"clientWidth":"clientHeight"],e?n.current=n.container[i]:n.container[i]=n.current=n.offset*n.space,n.content&&(n.content.style[r?"width":"height"]=n.space*n.props.pages+"px"),n.layers.forEach(function(t){t.setHeight(n.space,!0),t.setPosition(n.space,n.current,!0)}))},n.updateRaf=function(){requestAnimationFrame(n.update),setTimeout(n.update,150)},n.scrollStop=function(t){return n.animatedScroll&&n.animatedScroll.stopAnimation()},e||R(n)}i(n,t);var r=n.prototype;return r.scrollTo=function(t){var e=this.props,n=e.horizontal,r=e.config,i=e.impl,o=_t(n);this.scrollStop(),this.offset=t;var a=this.container;this.animatedScroll=new J.Value(a[o]),this.animatedScroll.addListener(function(t){var e=t.value;return a[o]=e}),J.controller(this.animatedScroll,s({toValue:t*this.space},r),i).start()},r.componentDidMount=function(){window.addEventListener("resize",this.updateRaf,!1),this.update(),this.setState({ready:!0})},r.componentWillUnmount=function(){window.removeEventListener("resize",this.updateRaf,!1)},r.componentDidUpdate=function(){this.update()},r.render=function(){var t,n=this,r=this.props,i=r.style,o=r.innerStyle,a=r.pages,u=r.className,l=r.scrolling,c=r.children,f=r.horizontal,p=l?"scroll":"hidden";return e.createElement("div",{ref:function(t){return n.container=t},onScroll:this.onScroll,onWheel:l?this.scrollStop:null,onTouchStart:l?this.scrollStop:null,style:s({position:"absolute",width:"100%",height:"100%",overflow:p,overflowY:f?"hidden":p,overflowX:f?p:"hidden",WebkitOverflowScrolling:"touch",WebkitTransform:"translate(0,0)",MsTransform:"translate(0,0)",transform:"translate3d(0,0,0)"},i),className:u},this.state.ready&&e.createElement("div",{ref:function(t){return n.content=t},style:s((t={position:"absolute"},t[f?"height":"width"]="100%",t.WebkitTransform="translate(0,0)",t.MsTransform="translate(0,0)",t.transform="translate3d(0,0,0)",t.overflow="hidden",t[f?"width":"height"]=this.space*a,t),o)},e.createElement(dt,{value:this},c)))},n}(e.PureComponent);yt.Layer=vt,yt.defaultProps={config:et.slow,scrolling:!0,horizontal:!1,impl:U};var gt=function(t){function n(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=n=t.call.apply(t,[this].concat(i))||this,n.state={primitive:void 0,props:{},resolve:function(){return null}},n.next=function(t,e){return new Promise(function(r){var i=n.instance&&n.instance.getValues(),o="function"==typeof e.from?e.from:s({},n.state.props.from,i,e.from);n.setState(function(n){return{primitive:t,props:s({},e,{from:o}),resolve:r}})})},e||R(n)}i(n,t);var r=n.prototype;return r.componentDidMount=function(){this.props.script&&this.props.script(this.next)},r.render=function(){var t=this,n=this.state,r=n.primitive,i=n.props,o=n.resolve,a=this.props,s=(a.script,T(a,["script"]));return r?e.createElement(r,N({ref:function(e){return t.instance=e}},s,i,{onRest:o})):null},n}(e.Component);t.Spring=nt,t.Keyframes=gt,t.Transition=it,t.Trail=ot,t.Parallax=yt,t.ParallaxLayer=vt,t.config=et,t.template=Z,t.animated=Q,t.interpolate=tt,t.Animation=r,t.Value=E,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "react-spring", | ||
"version": "4.1.4", | ||
"version": "4.1.5", | ||
"description": "Animate React with ease", | ||
@@ -23,3 +23,4 @@ "main": "dist/react-spring", | ||
"trailingComma": "es5", | ||
"singleQuote": true | ||
"singleQuote": true, | ||
"jsxBracketSameLine": true | ||
}, | ||
@@ -26,0 +27,0 @@ "lint-staged": { |
@@ -42,4 +42,3 @@ import React from 'react' | ||
} | ||
}} | ||
> | ||
}}> | ||
{result} | ||
@@ -46,0 +45,0 @@ </div>, |
@@ -111,4 +111,3 @@ import React from 'react' | ||
...style, | ||
}} | ||
> | ||
}}> | ||
{children} | ||
@@ -261,4 +260,3 @@ </animated.div> | ||
}} | ||
className={className} | ||
> | ||
className={className}> | ||
{this.state.ready && ( | ||
@@ -276,4 +274,3 @@ <div | ||
...innerStyle, | ||
}} | ||
> | ||
}}> | ||
<Provider value={this}>{children}</Provider> | ||
@@ -280,0 +277,0 @@ </div> |
@@ -202,3 +202,3 @@ import React from 'react' | ||
to, | ||
fom, | ||
from, | ||
config, | ||
@@ -205,0 +205,0 @@ native, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
583607
7937