react-spring
Version:
Animate React with ease
2 lines (1 loc) • 42.3 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],e):e(t.ReactSpring={},t.React,t.ReactDOM)}(this,function(t,g,v){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}g=g&&g.hasOwnProperty("default")?g.default:g,v=v&&v.hasOwnProperty("default")?v.default:v;var E=e(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});var y=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],0<=e.indexOf(n)||(i[n]=t[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i};var s=function(t,e){t.prototype.__proto__=e&&e.prototype,t.__proto__=e},_=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}(),b=function(a){function t(t,e,n,r,i){var o;return(o=a.call(this)||this)._value=t,o._parent=e,o._animationClass=n,o._animationConfig=r,o._callback=i,o.__attach(),o._hey=1,o}var e=t.prototype;return e.__getValue=function(){return this._parent.__getValue()},e.__attach=function(){this._parent.__addChild(this)},e.__detach=function(){this._parent.__removeChild(this)},e.update=function(){this._value.animate(new this._animationClass(E({},this._animationConfig,{to:this._animationConfig.to.__getValue()})),this._callback)},s(t,a),t}(_),n=function(e){function t(){var t;return(t=e.call(this)||this)._children=[],t}var n=t.prototype;return n.__addChild=function(t){t instanceof b&&(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},s(t,e),t}(_),i=function(n){function t(t){var e;return t=t||{},(e=n.call(this)||this)._style=t,e}var e=t.prototype;return e.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof _?n.__getValue():n}return t},e.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof _&&(t[e]=n.__getAnimatedValue())}return t},e.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof _&&e.__addChild(this)}},e.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof _&&e.__removeChild(this)}},s(t,n),t}(n),a=function(r){function t(t,e){var n;return n=r.call(this)||this,t.style&&(t=E({},t,{style:new i(t.style)})),n._props=t,n._callback=e,n.__attach(),n}var e=t.prototype;return e.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof _?n.__getValue():n}return t},e.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof _&&(t[e]=n.__getAnimatedValue())}return t},e.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof _&&e.__addChild(this)}},e.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof _&&e.__removeChild(this)}},e.update=function(){this._callback()},s(t,r),t}(_),o=function(){function t(){}return t.create=function(t){return function(){return t.apply(void 0,arguments)}},t}(),r=void 0,u=void 0;function c(i){return function(t){function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},n.setNativeProps=function(t){!1===u.fn(this.node,t,this)&&this.forceUpdate()},n.componentWillMount=function(){this.attachProps(this.props)},n.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new a(t,function(){e.node&&!1===u.fn(e.node,e._propsAnimated.__getAnimatedValue(),e)&&e.forceUpdate()}),n&&n.__detach()},n.componentWillReceiveProps=function(t){this.attachProps(t)},n.render=function(){var e=this,t=this._propsAnimated.__getValue(),n=t.style,r=y(t,["style"]);return g.createElement(i,E({},r,{style:u.transform(n),ref:function(t){return e.node=t}}))},s(e,t),e}(g.Component)}function l(t,e,n){return n<0&&(n+=1),1<n&&(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 f(t,e,n){var r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=l(i,r,t+1/3),a=l(i,r,t),s=l(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+",p=h+"%";function d(){return"\\(\\s*("+(t=arguments,Array.prototype.slice.call(t,0)).join(")\\s*,\\s*(")+")\\s*\\)";var t}var m={rgb:new RegExp("rgb"+d(h,h,h)),rgba:new RegExp("rgba"+d(h,h,h,h)),hsl:new RegExp("hsl"+d(h,p,p)),hsla:new RegExp("hsla"+d(h,p,p,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 w(t){var e=parseInt(t,10);return e<0?0:255<e?255:e}function x(t){return(parseFloat(t)%360+360)%360/360}function k(t){var e=parseFloat(t);return e<0?0:1<e?255:Math.round(255*e)}function P(t){var e=parseFloat(t,10);return e<0?0:100<e?1:e/100}var S={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},A=function(t){return t},O=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 function(n){var r=n.output,i=(r=r.map(function(t){return t.replace(T,V)}).map(function(t){return t.replace(C,V)}))[0].match(F).map(function(){return[]});r.forEach(function(t){t.match(F).forEach(function(t,e){return i[e].push(+t)})});var o=r[0].match(F).map(function(t,e){return O.create(E({},n,{output:i[e]}))});return function(t){var e=0;return r[0].replace(F,function(){return o[e++](t)}).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,function(t,e,n,r,i){return"rgba("+Math.round(e)+", "+Math.round(n)+", "+Math.round(r)+", "+i+")"})}}(t);var n=t.output,r=t.range,i=t.easing||A,o="extend",a=t.map;void 0!==t.extrapolateLeft?o=t.extrapolateLeft:void 0!==t.extrapolate&&(o=t.extrapolate);var s="extend";return void 0!==t.extrapolateRight?s=t.extrapolateRight:void 0!==t.extrapolate&&(s=t.extrapolate),function(t){var e=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,r);return function(t,e,n,r,i,o,a,s,u){var c=u?u(t):t;if(c<e){if("identity"===a)return c;"clamp"===a&&(c=e)}if(n<c){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(e===n)return t<=e?r:i;e===-1/0?c=-c:n===1/0?c-=e:c=(c-e)/(n-e);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(t,r[e],r[e+1],n[e],n[e+1],i,o,s,a)}},t}();function V(t){var e,n,r="number"==typeof(e=t)?e>>>0===e&&0<=e&&e<=4294967295?e:null:(n=m.hex6.exec(e))?parseInt(n[1]+"ff",16)>>>0:S.hasOwnProperty(e)?S[e]:(n=m.rgb.exec(e))?(w(n[1])<<24|w(n[2])<<16|w(n[3])<<8|255)>>>0:(n=m.rgba.exec(e))?(w(n[1])<<24|w(n[2])<<16|w(n[3])<<8|k(n[4]))>>>0:(n=m.hex3.exec(e))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=m.hex8.exec(e))?parseInt(n[1],16)>>>0:(n=m.hex4.exec(e))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=m.hsl.exec(e))?(255|f(x(n[1]),P(n[2]),P(n[3])))>>>0:(n=m.hsla.exec(e))?(f(x(n[1]),P(n[2]),P(n[3]))|k(n[4]))>>>0:null;return null===r?t:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var F=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,T=/(#[\d\w]+|\w+\((?:\d+%?(?:,\s)*){3}(?:\d*\.?\d+)?\))/,C=new RegExp("("+Object.keys(S).join("|")+")","g");var R=function(r){function e(t,e){var n;return(n=r.call(this)||this)._parents=Array.isArray(t)?t:[t],n._interpolation=o.create(e),n}var t=e.prototype;return t.__getValue=function(){return this._interpolation.apply(this,this._parents.map(function(t){return t.__getValue()}))},t.__attach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof _&&this._parents[t].__addChild(this)},t.__detach=function(){for(var t=0;t<this._parents.length;++t)this._parents[t]instanceof _&&this._parents[t].__removeChild(this)},t.interpolate=function(t){return new e(this,t)},s(e,r),e}(n),j=0;var L=function(n){function t(t){var e;return(e=n.call(this)||this)._value=t,e._animation=null,e._animatedStyles=new Set,e._listeners={},e}var e=t.prototype;return e.__detach=function(){this.stopAnimation()},e.__getValue=function(){return this._value},e._update=function(){!function e(t,n){"function"==typeof t.update?n.add(t):t.__getChildren().forEach(function(t){return e(t,n)})}(this,this._animatedStyles)},e._flush=function(){0===this._animatedStyles.size&&this._update(),this._animatedStyles.forEach(function(t){return t.update()})},e._updateValue=function(t){for(var e in this._value=t,this._flush(),this._listeners)this._listeners[e]({value:this.__getValue()})},e.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._animatedStyles.clear(),this._updateValue(t)},e.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},e.interpolate=function(t){return new R(this,t)},e.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)},e.addListener=function(t){var e=String(j++);return this._listeners[e]=t,e},e.removeListener=function(t){delete this._listeners[t]},e.removeAllListeners=function(){this._listeners={}},e.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},e.track=function(t){this.stopTracking(),this._tracking=t},s(t,n),t}(n),M=function(e){return Object.keys(e).map(function(t){return e[t]})},W=function(t){return"auto"===t};var U={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 N=["Webkit","Ms","Moz","O"];Object.keys(U).forEach(function(r){N.forEach(function(t){var e,n;U[(e=t,n=r,e+n.charAt(0).toUpperCase()+n.substring(1))]=U[r]})}),o=O,r=function(h,p){p.native,p.children,p.render;var d=p.from,m=p.to;if(M(d).concat(M(m)).some(W)){var t=h.renderChildren(p,h.convertValues(p)),e=t.props.style;return g.createElement(t.type,E({},t.props,{style:E({},e,{position:"absolute",visibility:"hidden"}),ref:function(t){if(t){var e,n,r=v.findDOMNode(t),i=getComputedStyle(r);if("border-box"===i.boxSizing)e=r.clientWidth,n=r.clientHeight;else{var o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),a=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),s=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),u=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);e=r.offsetWidth-o-s,n=r.offsetHeight-a-u}var c=(l=e,f=n,function(t,e){var n,r=e[0],i=e[1];return E({},t,((n={})[r]="auto"===i?~r.indexOf("height")?f:l:i,n))});requestAnimationFrame(function(){return h.updateProps(E({},p,{from:Object.entries(d).reduce(c,d),to:Object.entries(m).reduce(c,m)}),!0,!0)})}var l,f}}))}},u={fn:function(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;!function(t,e){var n,r,i,o=t.style;for(var a in e)if(e.hasOwnProperty(a)){var s=0===a.indexOf("--"),u=(r=e[n=a],i=s,null==r||"boolean"==typeof r||""===r?"":i||"number"!=typeof r||0===r||U.hasOwnProperty(n)&&U[n]?(""+r).trim():r+"px");"float"===a&&(a="cssFloat"),s?o.setProperty(a,u):o[a]=u}}(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)}},transform:function(t){return t}};var q=["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 E({},t,((n={})[e]=c(e),n))},{}),z=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}(),D=function(t,e){return null==t?e:t},I=function(a){function o(t){var y;(y=a.call(this)||this).onUpdate=function(){var t=y._lastPosition,e=y._lastVelocity,n=y._lastPosition,r=y._lastVelocity,i=Date.now();i>y._lastTime+64&&(i=y._lastTime+64);for(var o=Math.floor((i-y._lastTime)/1),a=0;a<o;++a){var s=.001,u=e,c=y._tension*(y._to-n)-y._friction*r,l=(n=t+u*s/2,r=e+c*s/2),f=y._tension*(y._to-n)-y._friction*r;n=t+l*s/2;var h=r=e+f*s/2,p=y._tension*(y._to-n)-y._friction*r;n=t+h*s/2;var d=r=e+p*s/2,m=y._tension*(y._to-n)-y._friction*r;n=t+h*s/2,r=e+p*s/2,t+=(u+2*(l+h)+d)/6*s,e+=(c+2*(f+p)+m)/6*s}if(y._lastTime=i,y._lastPosition=t,y._lastVelocity=e,y._onUpdate(t),y.__active){var v=!1;y._overshootClamping&&0!==y._tension&&(v=y._startPosition<y._to?t>y._to:t<y._to);var _=Math.abs(e)<=y._restSpeedThreshold,g=!0;if(0!==y._tension&&(g=Math.abs(y._to-t)<=y._restDisplacementThreshold),v||_&&g)return 0!==y._tension&&y._onUpdate(y._to),y.__debouncedOnEnd({finished:!0});y._animationFrame=requestAnimationFrame(y.onUpdate)}},y._overshootClamping=D(t.overshootClamping,!1),y._restDisplacementThreshold=D(t.restDisplacementThreshold,1e-4),y._restSpeedThreshold=D(t.restSpeedThreshold,1e-4),y._initialVelocity=t.velocity,y._lastVelocity=D(t.velocity,0),y._to=t.to;var e,n,r,i,o=(e=D(t.tension,40),n=D(t.friction,7),{tension:(i=e,3.62*(i-30)+194),friction:(r=n,3*(r-8)+25)});return y._tension=o.tension,y._friction=o.friction,y}var t=o.prototype;return t.start=function(t,e,n,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=e,this.__onEnd=n,this._lastTime=Date.now(),r instanceof o){var i=r.getInternalState();this._lastPosition=i.lastPosition,this._lastVelocity=i.lastVelocity,this._lastTime=i.lastTime}if("string"==typeof t)return this._onUpdate(t),this.__debouncedOnEnd({finished:!0});void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},t.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},t.stop=function(){this.__active=!1,clearTimeout(this._timeout),cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},s(o,a),o}(z),G=function(n){function t(t){var e;return(e=n.call(this)||this)._values=t.map(function(t){return new L(t)}),e}var e=t.prototype;return e.setValue=function(t){var n=this;t.forEach(function(t,e){return n._values[e].setValue(t)})},e.__getValue=function(){return this._values.map(function(t){return t.__getValue()})},e.stopAnimation=function(t){this._values.forEach(function(t){return t.stopAnimation()}),t&&t(this.__getValue())},e.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof _&&this._values[t].__addChild(this)},e.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof _&&this._values[t].__removeChild(this)},s(t,n),t}(n);function H(r,i,o){return void 0===o&&(o=I),t=r,n=H,a=o,p=(e=i).tension,d=e.friction,m=e.to,(t instanceof G?(s=t._values.map(function(t,e){return n(t,{tension:p,friction:d,to:m[e]},a)}),c=0,u={stopTogether:(l={},!1)},f=!(!1===u.stopTogether),h={start:function(r){if(c===s.length)return r&&r({finished:!0});s.forEach(function(t,e){var n=function(t){if(l[e]=!0,++c===s.length)return c=0,r&&r(t);!t.finished&&f&&h.stop()};t?t.start(n):n({finished:!0})})},stop:function(){s.forEach(function(t,e){!l[e]&&t.stop(),l[e]=!0})}}):null)||{start:function(t){var e=r,n=i;e.stopTracking(),i.to instanceof _?e.track(new b(e,i.to,o,n,t)):e.animate(new o(n),t)},stop:function(){r.stopAnimation()}};var t,e,n,a,s,u,c,l,f,h,p,d,m}var $=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},Y={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}},B=function(t,e){return"function"==typeof t?t(e):t},K=function(t,e){var n,r=e[0],i=e[1];return E({},t,((n={})[r]=new L(i),n))},X=function(o){function t(){for(var t,e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e=o.call.apply(o,[this].concat(r))||this,e.state={props:void 0},e.animations={},e.callback=function(){e.props.onFrame&&e.props.onFrame(e.animatedProps.__getValue()),!e.props.native&&e.forceUpdate()},t||$(e)}var e=t.prototype;return e.componentWillUnmount=function(){this.stop()},e.componentWillMount=function(){this.updatePropsAsync(this.props)},e.componentWillReceiveProps=function(t){this.updatePropsAsync(t)},e.updatePropsAsync=function(t){t.inject&&(this.inject=t.inject(this,t),this.inject)||this.updateProps(t)},e.updateProps=function(t,e,v){var _=this;if(void 0===e&&(e=!1),void 0===v&&(v=!1),!this.destroyed||!t.destroyed){this.destroyed=t.destroyed;var g=t.impl,y=t.from,n=t.to,b=t.config,w=t.attach,x=t.immediate,k=t.hold,P=t.reset,A=(t.onFrame,t.onRest),r=(t.inject,t.native,Object.entries(E({},y,n)));this.interpolators={},this.animations=r.reduce(function(t,e,n){var r,i=e[0],o=e[1],a=!1===P&&_.animations[i]||(_.animations[i]={}),s="number"==typeof o,u="string"==typeof o&&!/\d/.test(o)&&!S[o],c=!s&&!u&&Array.isArray(o),l=void 0!==y[i]?y[i]:o,f=l instanceof L,h=s||c?o:1;if(w){var p=w(_),d=p&&p.animations[i];d&&(h=d.animation)}if(f)a.animation=a.interpolation=l;else if(s||u)a.animation=a.interpolation=a.animation||new L(l);else if(c)a.animation=a.interpolation=a.animation||new G(l);else{var m=a.interpolation&&a.interpolation._interpolation(a.animation._value);a.animation=new L(0),a.interpolation=a.animation.interpolate({range:[0,1],output:[void 0!==m?m:l,o]})}return B(x,i)&&a.animation.setValue(h),a.stopped=!1,a.onFinish=function(t){if(_.animations[i].stopped=!0,_.getAnimations().every(function(t){return t.stopped})){var e=E({},_.props.from,_.props.to);if(A&&A(e),t&&"function"==typeof t&&t(e),v){var n=_.convertValues(_.props);_.inject=_.renderChildren(_.props,n),_.forceUpdate()}}},a.start=function(e){if(B(k,i))return a.onFinish(e);H(a.animation,E({to:h},B(b,i)),g).start(function(t){return t.finished&&a.onFinish(e)})},a.stop=function(){a.stopped=!0,a.animation.stopAnimation()},_.interpolators[i]=a.interpolation,E({},t,((r={})[i]=a,r))},{});var i=this.animatedProps;this.animatedProps=new a(this.interpolators,this.callback),i&&i.__detach(),this.updateToken=!0,e&&this.forceUpdate()}},e.start=function(){var e,t=this,n=function(){return t.getAnimations().forEach(function(t){return t.start(e)})},r=new Promise(function(t){return e=t});return this.props.delay?(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){return n()},this.props.delay)):(n(),r)},e.stop=function(){this.getAnimations().forEach(function(t){return t.stop()})},e.flush=function(){this.getAnimations().forEach(function(t){var e=t.interpolation;return e._update&&e._update()})},e.getAnimations=function(){var e=this;return Object.keys(this.animations).map(function(t){return e.animations[t]})},e.getValues=function(){return this.animatedProps?this.animatedProps.__getValue():{}},e.getAnimatedValues=function(){return this.props.native?this.interpolators:this.getValues()},e.convertValues=function(t){var e=t.from,n=t.to,r=t.native,i=(t.children,t.render,this.getForwardProps(t)),o=Object.entries(E({},e,n));return r?o.reduce(K,i):E({},e,n,i)},e.getForwardProps=function(t){void 0===t&&(t=this.props);var e=t;e.to,e.from,e.config,e.native,e.onRest,e.onFrame,e.children,e.render,e.reset,e.immediate,e.impl,e.inject,e.hold;return y(e,["to","from","config","native","onRest","onFrame","children","render","reset","immediate","impl","inject","hold"])},e.componentDidUpdate=function(){this.updateToken&&(this.updateToken=!1,this.start())},e.componentDidMount=function(){this.start()},e.renderChildren=function(t,e){return t.render?t.render(E({},e,{children:t.children})):t.children(e)},e.render=function(){if(this.inject){var t=this.inject;return this.inject=void 0,t}var e=this.props,n=(e.children,e.render,this.getAnimatedValues());return n&&Object.keys(n).length?this.renderChildren(this.props,E({},n,this.getForwardProps())):null},s(t,o),t}(g.PureComponent);X.defaultProps={from:{},to:{},config:Y.default,native:!1,immediate:!1,hold:!1,reset:!1,impl:I,inject:r};var J=function(){return null},Q=function(t,e){return void 0===t&&(t={}),"function"==typeof t?t(e):t},Z=function(t){var e=t.keys,n=t.children,r=t.render,i=t.items,o=y(t,["keys","children","render","items"]);return n=r||n||J,e="function"==typeof e?i.map(e):e,Array.isArray(n)||(n=[n],e=e?[e]:n),E({keys:e,children:n,items:i},o)},tt=function(o){function t(){for(var t,e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e=o.call.apply(o,[this].concat(r))||this,e.springs=[],e.state={transitions:[]},t||$(e)}var e=t.prototype;return e.componentDidMount=function(){this.componentWillReceiveProps(this.props)},e.componentWillReceiveProps=function(t){var a=this,n=this.state.transitions,e=Z(t),s=e.keys,u=e.children,c=e.items,l=e.from,f=e.enter,h=e.leave,p=e.update,r=Z(this.props),d=r.keys,m=(r.children,r.items),i=n.map(function(t){return t.key}),o=new Set(s),v=new Set(i),_=s.filter(function(t){return!v.has(t)}),g=i.filter(function(t){return!o.has(t)}),y=s.filter(function(t){return v.has(t)});_.forEach(function(t){var e=s.indexOf(t);n=n.slice(0,e).concat([t],n.slice(e))}),n=n.map(function(e){var t="object"==typeof e,n=t?e.key:e,r=s.indexOf(n),i=c?c[r]:n;if(t){if(g.find(function(t){return t===n})){if(e.key=e.key+"_",!e.destroyed){var o=m?m[d.indexOf(n)]:n;e.to=Q(h,o),e.destroyed=!0}e.from=a.springs[n].getValues(),e.onRest=function(){return a.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==e})}})}}else e.children=u[r]||e.children,p&&-1!==y.indexOf(e.key)&&(e.to=Q(p,i)||e.to);return e}return{children:u[r],key:n,item:i,to:Q(f,i),from:Q(l,i)}});var b=s.map(function(e){return n.find(function(t){return t.key===e})});n.forEach(function(t,e){t.destroyed&&(b=b.slice(0,e).concat([t],b.slice(e)))}),this.setState({transitions:b})},e.getValues=function(){},e.render=function(){var a=this,t=this.props,s=t.render,e=(t.from,t.enter,t.leave,t.native),n=void 0!==e&&e,r=t.config,i=void 0===r?Y.default:r,u=(t.keys,t.items,t.onFrame),c=t.onRest,o=y(t,["render","from","enter","leave","native","config","keys","items","onFrame","onRest"]),l=E({native:n,config:i},o);return this.state.transitions.map(function(t,e){var n=t.key,r=t.item,i=t.children,o=y(t,["key","item","children"]);return g.createElement(X,E({ref:function(t){return t?a.springs[n]=t:delete a.springs[n]},key:n,onRest:c&&function(t){return c(r,t)},onFrame:u&&function(t){return u(r,t)}},o,l,{render:s&&i,children:s?a.props.children:i}))})},s(t,o),t}(g.PureComponent),et=function(t){function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getValues=function(){return this.instance&&this.instance.getValues()},n.componentDidMount=function(){this.instance&&this.instance.flush()},n.componentDidUpdate=function(){this.instance&&this.instance.flush()},n.render=function(){var n=this,t=this.props,i=t.children,o=t.render,e=t.from,r=void 0===e?{}:e,a=t.to,s=void 0===a?{}:a,u=t.native,c=void 0!==u&&u,l=t.config,f=void 0===l?Y.default:l,h=t.keys,p=t.delay,d=t.onRest,m=y(t,["children","render","from","to","native","config","keys","delay","onRest"]),v=new Set,_=E({},m,{native:c,from:r,config:f,to:s});return(o||i).map(function(t,r){var e=0===r&&p;return g.createElement(X,E({ref:function(t){return 0===r&&(n.instance=t)},onRest:0===r?d:null,key:h[r]},_,{delay:e,attach:function(t){return e=r,n=t,v.add(n),0===e?void 0:Array.from(v)[e-1];var e,n},render:o&&t,children:o?i:t}))})},s(e,t),e}(g.PureComponent),nt=c("div"),rt=g.createContext(null),it=rt.Provider,ot=rt.Consumer;function at(t){return t?"scrollLeft":"scrollTop"}var st="translate3d(0px,0px,0px)",ut="translate(0px,0px)",ct=function(t){function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.componentDidMount=function(){var t=this.parent;t&&(t.layers=t.layers.concat(this),t.update())},n.componentWillUnmount=function(){var e=this,t=this.parent;t&&(t.layers=t.layers.filter(function(t){return t!==e}),t.update())},n.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,s=t*this.props.offset+a*this.props.speed,u=parseFloat(-e*this.props.speed+s);n?this.animatedTranslate.setValue(u):H(this.animatedTranslate,E({to:u},i),o).start()},n.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):H(this.animatedSpace,E({to:o},r),i).start()},n.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 L(i),this.animatedSpace=new L(e.space*t.factor)},n.renderLayer=function(){var t,e=this.props,n=e.style,r=e.children,i=(e.offset,e.speed,e.factor,e.className),o=y(e,["style","children","offset","speed","factor","className"]),a=this.parent.props.horizontal,s=this.animatedTranslate.interpolate({range:[0,1],output:a?[st,"translate3d(1px,0,0)"]:[st,"translate3d(0,1px,0)"]});return g.createElement(nt,E({},o,{className:i,style:E((t={position:"absolute",backgroundSize:"auto",backgroundRepeat:"no-repeat",willChange:"transform"},t[a?"height":"width"]="100%",t[a?"width":"height"]=this.animatedSpace,t.WebkitTransform=s,t.MsTransform=s,t.transform=s,t),n)}),r)},n.render=function(){var e=this;return g.createElement(ot,null,function(t){return t&&!e.parent&&(e.parent=t,e.initialize()),e.renderLayer()})},s(e,t),e}(g.PureComponent);ct.defaultProps={factor:1,offset:0,speed:0};var lt=function(o){function t(){for(var t,i,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=i=o.call.apply(o,[this].concat(n))||this,i.state={ready:!1},i.layers=[],i.space=0,i.current=0,i.offset=0,i.busy=!1,i.moveItems=function(){i.layers.forEach(function(t){return t.setPosition(i.space,i.current)}),i.busy=!1},i.scrollerRaf=function(){return requestAnimationFrame(i.moveItems)},i.onScroll=function(t){var e=i.props.horizontal;i.busy||(i.busy=!0,i.scrollerRaf(),i.current=t.target[at(e)])},i.update=function(){var t=i.props,e=t.scrolling,n=t.horizontal,r=at(n);i.container&&(i.space=i.container[n?"clientWidth":"clientHeight"],e?i.current=i.container[r]:i.container[r]=i.current=i.offset*i.space,i.content&&(i.content.style[n?"width":"height"]=i.space*i.props.pages+"px"),i.layers.forEach(function(t){t.setHeight(i.space,!0),t.setPosition(i.space,i.current,!0)}))},i.updateRaf=function(){requestAnimationFrame(i.update),setTimeout(i.update,150)},i.scrollStop=function(t){return i.animatedScroll&&i.animatedScroll.stopAnimation()},t||$(i)}var e=t.prototype;return e.scrollTo=function(t){var e=this.props,n=e.horizontal,r=e.config,i=e.impl,o=at(n);this.scrollStop(),this.offset=t;var a=this.container;this.animatedScroll=new L(a[o]),this.animatedScroll.addListener(function(t){var e=t.value;return a[o]=e}),H(this.animatedScroll,E({to:t*this.space},r),i).start()},e.componentDidMount=function(){window.addEventListener("resize",this.updateRaf,!1),this.update(),this.setState({ready:!0})},e.componentWillUnmount=function(){window.removeEventListener("resize",this.updateRaf,!1)},e.componentDidUpdate=function(){this.update()},e.render=function(){var t,e=this,n=this.props,r=n.style,i=n.innerStyle,o=n.pages,a=n.className,s=n.scrolling,u=n.children,c=n.horizontal,l=s?"scroll":"hidden";return g.createElement("div",{ref:function(t){return e.container=t},onScroll:this.onScroll,onWheel:s?this.scrollStop:null,onTouchStart:s?this.scrollStop:null,style:E({position:"absolute",width:"100%",height:"100%",overflow:l,overflowY:c?"hidden":l,overflowX:c?l:"hidden",WebkitOverflowScrolling:"touch",WebkitTransform:ut,MsTransform:ut,transform:st},r),className:a},this.state.ready&&g.createElement("div",{ref:function(t){return e.content=t},style:E((t={position:"absolute"},t[c?"height":"width"]="100%",t.WebkitTransform=ut,t.MsTransform=ut,t.transform=st,t.overflow="hidden",t[c?"width":"height"]=this.space*o,t),i)},g.createElement(it,{value:this},u)))},s(t,o),t}(g.PureComponent);lt.Layer=ct,lt.defaultProps={config:Y.slow,scrolling:!0,horizontal:!1,impl:I};var ft=e(function(T){!function(t){var u,e=Object.prototype,c=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag",a=t.regeneratorRuntime;if(a)T.exports=a;else{(a=t.regeneratorRuntime=T.exports).wrap=g;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",m={},s={};s[i]=function(){return this};var l=Object.getPrototypeOf,v=l&&l(l(V([])));v&&v!==e&&c.call(v,i)&&(s=v);var _=x.prototype=b.prototype=Object.create(s);w.prototype=_.constructor=x,x.constructor=w,x[o]=w.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(_),t},a.awrap=function(t){return{__await:t}},k(P.prototype),P.prototype[r]=function(){return this},a.AsyncIterator=P,a.async=function(t,e,n,r){var i=new P(g(t,e,n,r));return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},k(_),_[o]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},a.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=V,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&c.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=u),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=c.call(i,"catchLoc"),s=c.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&c.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:V(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=u),m}}}function g(t,e,n,r){var o,a,s,u,i=e&&e.prototype instanceof b?e:b,c=Object.create(i.prototype),l=new O(r||[]);return c._invoke=(o=t,a=n,s=l,u=f,function(t,e){if(u===p)throw new Error("Generator is already running");if(u===d){if("throw"===t)throw e;return F()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=A(n,s);if(r){if(r===m)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(u===f)throw u=d,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);u=p;var i=y(o,a,s);if("normal"===i.type){if(u=s.done?d:h,i.arg===m)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(u=d,s.method="throw",s.arg=i.arg)}}),c}function y(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function b(){}function w(){}function x(){}function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(u){var e;this._invoke=function(n,r){function t(){return new Promise(function(t,e){!function e(t,n,r,i){var o=y(u[t],u,n);if("throw"!==o.type){var a=o.arg,s=a.value;return s&&"object"==typeof s&&c.call(s,"__await")?Promise.resolve(s.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):Promise.resolve(s).then(function(t){a.value=t,r(a)},i)}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function A(t,e){var n=t.iterator[e.method];if(n===u){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=u,A(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=y(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,m;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u),e.delegate=null,m):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function V(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(c.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=u,t.done=!0,t};return r.next=r}}return{next:F}}function F(){return{value:u,done:!0}}}(function(){return this}()||Function("return this")())}),ht=function(){return this}()||Function("return this")(),pt=ht.regeneratorRuntime&&0<=Object.getOwnPropertyNames(ht).indexOf("regeneratorRuntime"),dt=pt&&ht.regeneratorRuntime;ht.regeneratorRuntime=void 0;var mt=ft;if(pt)ht.regeneratorRuntime=dt;else try{delete ht.regeneratorRuntime}catch(t){ht.regeneratorRuntime=void 0}var vt=mt;var _t=function(r){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=r.apply(t,n);function e(t,e){try{var n=a[t](e),r=n.value}catch(t){return void o(t)}n.done?i(r):Promise.resolve(r).then(s,u)}function s(t){e("next",t)}function u(t){e("throw",t)}s()})}},gt=function(o){function t(){for(var t,i,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=i=o.call.apply(o,[this].concat(n))||this,i.guid=0,i.state={primitive:void 0,props:{},oldProps:{},resolve:function(){return null}},i.next=function(n,r){return new Promise(function(e){i.setState(function(t){return{primitive:n,props:r,oldProps:E({},i.state.props),resolve:e}})})},t||$(i)}var e=t.prototype;return e.componentDidMount=function(){this.props.script&&this.props.script(this.next),this.UNSAFE_componentWillReceiveProps(this.props)},e.UNSAFE_componentWillReceiveProps=function(){var e=_t(vt.mark(function t(e){var n,r,i,o,a,s,u,c,l,f,h=this;return vt.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.states,r=e.state,i=e.primitive,o=++this.guid,!(n&&r&&i)){t.next=26;break}if(a=n[r],!Array.isArray(a)){t.next=25;break}s=a,u=Array.isArray(s),c=0,s=u?s:s[Symbol.iterator]();case 6:if(!u){t.next=12;break}if(!(c>=s.length)){t.next=9;break}return t.abrupt("break",23);case 9:l=s[c++],t.next=16;break;case 12:if(!(c=s.next()).done){t.next=15;break}return t.abrupt("break",23);case 15:l=c.value;case 16:if(f=l,t.t0=o===this.guid,!t.t0){t.next=21;break}return t.next=21,this.next(i,f);case 21:t.next=6;break;case 23:t.next=26;break;case 25:"function"==typeof a?a(function(t){return o===h.guid&&h.next(i,t)}):this.next(i,n[r]);case 26:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.render=function(){var e=this,t=this.state,n=t.primitive,r=t.props,i=t.oldProps,o=t.resolve,a=this.props,s=(a.script,a.from),u=y(a,["script","from"]);if(n){var c=this.instance&&this.instance.getValues(),l="function"==typeof r.from?r.from:E({},i.from,c,r.from);return g.createElement(n,E({ref:function(t){return e.instance=t}},u,r,{from:E({},l,s),onRest:o}))}return null},s(t,o),t}(g.Component);gt.Spring=function(t){return yt(X,t)},gt.Trail=function(t){return yt(et,t)},gt.Transition=function(t){return yt(tt,t)};var yt=function(e,n){return function(t){return g.createElement(gt,E({primitive:e,states:n},t))}};t.Spring=X,t.Keyframes=gt,t.Transition=tt,t.Trail=et,t.Parallax=lt,t.ParallaxLayer=ct,t.Animation=z,t.SpringAnimation=I,t.AnimatedValue=L,t.config=Y,t.animated=q,t.controller=H,t.interpolate=function(t,e){return new R(t,e)},t.createAnimatedComponent=c,Object.defineProperty(t,"__esModule",{value:!0})});