framer-motion 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).Motion={},t.React)}(this,(function(t,n){"use strict";var e="default"in n?n.default:n,r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function o(t,n){function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var i=function(){return(i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function a(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function s(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var u,c=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},f=0,l="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-f));f=n+e,setTimeout((function(){return t(f)}),e)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(u||(u={}));var d=1/60*1e3,p=!0,h=!1,v=!1,m={delta:0,timestamp:0},y=[u.Read,u.Update,u.Render,u.PostRender],g=function(t){return h=t},x=y.reduce((function(t,n){var e=function(t){var n=[],e=[],r=0,o=!1,i=0,a=new WeakSet,s=new WeakSet,u={cancel:function(t){var n=e.indexOf(t);a.add(t),-1!==n&&e.splice(n,1)},process:function(c){var f,l;if(o=!0,n=(f=[e,n])[0],(e=f[1]).length=0,r=n.length)for(i=0;i<r;i++)(l=n[i])(c),!0!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));o=!1},schedule:function(t,i,u){void 0===i&&(i=!1),void 0===u&&(u=!1);var c=u&&o,f=c?n:e;a.delete(t),i&&s.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=n.length))}};return u}(g);return t.sync[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),h||S(),e.schedule(t,n,r),t},t.cancelSync[n]=function(t){return e.cancel(t)},t.steps[n]=e,t}),{steps:{},sync:{},cancelSync:{}}),b=x.steps,E=x.sync,w=x.cancelSync,C=function(t){return b[t].process(m)},P=function(t){h=!1,m.delta=p?d:Math.max(Math.min(t-m.timestamp,40),1),p||(d=m.delta),m.timestamp=t,v=!0,y.forEach(C),v=!1,h&&(p=!1,l(P))},S=function(){h=!0,p=!0,v||l(P)},A=function(){return m},V=function(){return(V=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},M=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},T=function(t){return t%1?Number(t.toFixed(5)):t},L=/(-)?(\d[\d\.]*)/g,O=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,k=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,B={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},R=V(V({},B),{transform:M(0,1)}),D=V(V({},B),{default:1}),F=function(t){return{test:function(n){return"string"==typeof n&&n.endsWith(t)&&1===n.split(" ").length},parse:parseFloat,transform:function(n){return""+n+t}}},I=F("deg"),U=F("%"),j=F("px"),X=F("vh"),Y=F("vw"),H=V(V({},U),{parse:function(t){return U.parse(t)/100},transform:function(t){return U.transform(100*t)}}),z=M(0,255),W=function(t){return void 0!==t.red},N=function(t){return void 0!==t.hue},G=function(t){return function(n){if("string"!=typeof n)return n;for(var e,r={},o=(e=n,e.substring(e.indexOf("(")+1,e.lastIndexOf(")"))).split(/,\s*/),i=0;i<4;i++)r[t[i]]=void 0!==o[i]?parseFloat(o[i]):1;return r}},_=V(V({},B),{transform:function(t){return Math.round(z(t))}});function Z(t,n){return t.startsWith(n)&&k.test(t)}var q={test:function(t){return"string"==typeof t?Z(t,"rgb"):W(t)},parse:G(["red","green","blue","alpha"]),transform:function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha;return"rgba("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({red:_.transform(n),green:_.transform(e),blue:_.transform(r),alpha:T(R.transform(i))})}},$={test:function(t){return"string"==typeof t?Z(t,"hsl"):N(t)},parse:G(["hue","saturation","lightness","alpha"]),transform:function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha;return"hsla("+n+", "+e+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(n),saturation:U.transform(T(e)),lightness:U.transform(T(r)),alpha:T(R.transform(i))})}},K=V(V({},q),{test:function(t){return"string"==typeof t&&Z(t,"#")},parse:function(t){var n="",e="",r="";return t.length>4?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(t){return"string"==typeof t&&k.test(t)||W(t)||N(t)},parse:function(t){return q.test(t)?q.parse(t):$.test(t)?$.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return W(t)?q.transform(t):N(t)?$.transform(t):t}},Q=function(t){return"number"==typeof t?0:t},tt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(L),r=t.match(O);return e&&(n+=e.length),r&&(n+=r.length),n>0},parse:function(t){var n=t,e=[],r=n.match(O);r&&(n=n.replace(O,"${c}"),e.push.apply(e,r.map(J.parse)));var o=n.match(L);return o&&e.push.apply(e,o.map(B.parse)),e},createTransformer:function(t){var n=t,e=0,r=t.match(O),o=r?r.length:0;if(r)for(var i=0;i<o;i++)n=n.replace(r[i],"${c}"),e++;var a=n.match(L),s=a?a.length:0;if(a)for(i=0;i<s;i++)n=n.replace(a[i],"${n}"),e++;return function(t){for(var r=n,i=0;i<e;i++)r=r.replace(i<o?"${c}":"${n}",i<o?J.transform(t[i]):T(t[i]));return r}},getAnimatableNone:function(t){var n=tt.parse(t);return tt.createTransformer(t)(n.map(Q))}},nt=function(t){return function(n){return 1-t(1-n)}},et=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},rt=nt,ot=et,it=function(t){return function(n){return Math.pow(n,t)}},at=function(t){return function(n){return n*n*((t+1)*n-t)}},st=function(t){var n=at(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},ut=function(t){return t},ct=it(2),ft=nt(ct),lt=et(ct),dt=function(t){return 1-Math.sin(Math.acos(t))},pt=nt(dt),ht=et(pt),vt=at(1.525),mt=nt(vt),yt=et(vt),gt=st(1.525),xt=function(t){var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},bt="undefined"!=typeof Float32Array,Et=function(t,n){return 1-3*n+3*t},wt=function(t,n){return 3*n-6*t},Ct=function(t){return 3*t},Pt=function(t,n,e){return 3*Et(n,e)*t*t+2*wt(n,e)*t+Ct(n)},St=function(t,n,e){return((Et(n,e)*t+wt(n,e))*t+Ct(n))*t};function At(t,n,e,r){var o=bt?new Float32Array(11):new Array(11),i=function(n){for(var r,i,a,s=0,u=1;10!==u&&o[u]<=n;++u)s+=.1;return--u,r=(n-o[u])/(o[u+1]-o[u]),(a=Pt(i=s+.1*r,t,e))>=.001?function(n,r){for(var o=0,i=0;o<8;++o){if(0===(i=Pt(r,t,e)))return r;r-=(St(r,t,e)-n)/i}return r}(n,i):0===a?i:function(n,r,o){var i,a,s=0;do{(i=St(a=r+(o-r)/2,t,e)-n)>0?o=a:r=a}while(Math.abs(i)>1e-7&&++s<10);return a}(n,s,s+.1)};!function(){for(var n=0;n<11;++n)o[n]=St(.1*n,t,e)}();return function(o){return t===n&&e===r?o:0===o?0:1===o?1:St(i(o),n,r)}}var Vt=Object.freeze({__proto__:null,reversed:nt,mirrored:et,createReversedEasing:rt,createMirroredEasing:ot,createExpoIn:it,createBackIn:at,createAnticipateEasing:st,linear:ut,easeIn:ct,easeOut:ft,easeInOut:lt,circIn:dt,circOut:pt,circInOut:ht,backIn:vt,backOut:mt,backInOut:yt,anticipate:gt,bounceOut:xt,bounceIn:function(t){return 1-xt(1-t)},bounceInOut:function(t){return t<.5?.5*(1-xt(1-2*t)):.5*xt(2*t-1)+.5},cubicBezier:At}),Mt={x:0,y:0,z:0},Tt=function(t){return"number"==typeof t},Lt=function(t){return function(n,e,r){return void 0!==r?t(n,e,r):function(r){return t(n,e,r)}}},Ot=Lt((function(t,n,e){return Math.min(Math.max(e,t),n)})),kt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Bt=function(t){return kt(t)&&t.hasOwnProperty("z")},Rt=function(t,n){return Math.abs(t-n)},Dt=function(t,n){if(void 0===n&&(n=Mt),Tt(t)&&Tt(n))return Rt(t,n);if(kt(t)&&kt(n)){var e=Rt(t.x,n.x),r=Rt(t.y,n.y),o=Bt(t)&&Bt(n)?Rt(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Ft=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},It=function(t,n,e){return-e*t+e*n+t},Ut=function(){return(Ut=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},jt=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},Xt=[K,q,$],Yt=function(t){return Xt.find((function(n){return n.test(t)}))},Ht=function(t,n){var e=Yt(t),r=Yt(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),a=Ut({},o),s=e===$?It:jt;return function(t){for(var n in a)"alpha"!==n&&(a[n]=s(o[n],i[n],t));return a.alpha=It(o.alpha,i.alpha,t),e.transform(a)}},zt=function(t,n){return function(e){return n(t(e))}},Wt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(zt)};function Nt(t,n){return Tt(t)?function(e){return It(t,n,e)}:J.test(t)?Ht(t,n):qt(t,n)}var Gt=function(t,n){var e=t.slice(),r=e.length,o=t.map((function(t,e){return Nt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},_t=function(t,n){var e=Ut({},t,n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=Nt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function Zt(t){for(var n=tt.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var qt=function(t,n){var e=tt.createTransformer(n),r=Zt(t),o=Zt(n);return Wt(Gt(r.parsed,o.parsed),e)},$t=function(t,n){return function(e){return It(t,n,e)}};function Kt(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?$t:"string"==typeof r?J.test(r)?Ht:qt:Array.isArray(r)?Gt:"object"==typeof r?_t:void 0),a=t.length-1,s=0;s<a;s++){var u=i(t[s],t[s+1]);if(n){var c=Array.isArray(n)?n[s]:n;u=Wt(c,u)}o.push(u)}return o}function Jt(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,u=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[u-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=Kt(n,a,s),f=2===u?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(Ft(e,r,t))}}(t,c):function(t,n){var e=t.length,r=e-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var s=1;s<e&&!(t[s]>o||s===r);s++);i=s-1}var u=Ft(t[i],t[i+1],o);return n[i](u)}}(t,c);return i?Wt(Ot(t[0],t[u-1]),f):f}var Qt=function(t,n){return n?t*(1e3/n):0},tn=Lt((function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t})),nn=(Ot(0,1),function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t,e.updateSubscribers&&e.prev!==e.current&&e.updateSubscribers.forEach(e.notifySubscriber),n&&e.renderSubscribers&&e.renderSubscribers.forEach(e.notifySubscriber);var r=A(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,E.postRender(e.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(e.current)},this.scheduleVelocityCheck=function(){return E.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current)},this.set(t,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.subscribeTo=function(t,n){var e=this,r=function(){return n(e.current)};return t.add(r),function(){return t.delete(r)}},t.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},t.prototype.clearListeners=function(){var t;null===(t=this.updateSubscribers)||void 0===t||t.clear()},t.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Qt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var n=this;return this.stop(),new Promise((function(e){n.stopAnimation=t(e)})).then((function(){return n.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.stop()},t}());function en(t){return new nn(t)}var rn=function(){function t(t,n){var e=this;this.children=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.update=function(){return e.config.onUpdate(e.latest)},this.triggerRender=function(){return e.render()},this.scheduleRender=function(){return E.render(e.triggerRender,!1,!0)},this.ref=function(t){t?e.mount(t):e.unmount(),e.externalRef&&("function"==typeof e.externalRef?e.externalRef(t):c(e.externalRef)&&(e.externalRef.current=t))},this.parent=t,this.treePath=t?s(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=n}return t.prototype.subscribe=function(t){var n=this;return this.children.add(t),function(){return n.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latest[t]=n.get(),this.element&&this.subscribeToValue(t,n)},t.prototype.removeValue=function(t){var n=this.valueSubscriptions.get(t);n&&n(),this.values.delete(t),delete this.latest[t],this.valueSubscriptions.delete(t)},t.prototype.getValue=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new nn(n),this.addValue(t,e)),e},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=i({},t)},t.prototype.setSingleStaticValue=function(t,n){this.latest[t]=n},t.prototype.setStaticValues=function(t,n){if("string"==typeof t)this.setSingleStaticValue(t,n);else for(var e in t)this.setSingleStaticValue(e,t[e])},t.prototype.subscribeToValue=function(t,n){var e=this,r=n.onChange((function(n){e.setSingleStaticValue(t,n),e.latest[t]=n,e.config.onUpdate&&E.update(e.update,!1,!0)})),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){var n=this;this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t,this.forEachValue((function(t,e){return n.subscribeToValue(e,t)}))},t.prototype.unmount=function(){var t=this;this.forEachValue((function(n,e){return t.removeValue(e)})),w.update(this.update),w.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function on(t){return t}function an(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function sn(t){return{x:i({},t.x),y:i({},t.y)}}var un={translate:0,scale:1,origin:0,originPoint:0};function cn(){return{x:i({},un),y:i({},un)}}var fn=i(i({},B),{transform:Math.round}),ln={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,size:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,rotate:I,rotateX:I,rotateY:I,rotateZ:I,scale:D,scaleX:D,scaleY:D,scaleZ:D,skew:I,skewX:I,skewY:I,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,opacity:R,originX:H,originY:H,originZ:j,zIndex:fn,fillOpacity:R,strokeOpacity:R,numOctaves:fn},dn=[B,j,U,I,Y,X,{test:function(t){return"auto"===t},parse:function(t){return t}}],pn=function(t){return function(n){return n.test(t)}},hn=function(t){return dn.find(pn(t))},vn=s(dn,[J,tt]),mn=function(t){return vn.find(pn(t))},yn=function(t){return ln[t]},gn=function(t,n){return n&&"number"==typeof t?n.transform(t):t},xn=["","X","Y","Z"],bn=["x","y","z"];function En(t,n){return bn.indexOf(t)-bn.indexOf(n)}["translate","scale","rotate","skew","transformPerspective"].forEach((function(t){xn.forEach((function(n){return bn.push(t+n)}))}));var wn=new Set(bn);function Cn(t){return wn.has(t)}var Pn=new Set(["originX","originY","originZ"]);function Sn(t){return Pn.has(t)}var An={x:"translateX",y:"translateY",z:"translateZ"};function Vn(t){return t.startsWith("--")}function Mn(t,n){return t/(n.max-n.min)*100}var Tn={process:function(t,n){return"number"!=typeof t?t:Mn(t,n.x)+"% "+Mn(t,n.y)+"%"}},Ln={borderRadius:i(i({},Tn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Tn,borderTopRightRadius:Tn,borderBottomLeftRadius:Tn,borderBottomRightRadius:Tn,boxShadow:{process:function(t,n,e,r){var o=tt.parse(t),i=tt.createTransformer(t),a=e.x.scale*r.x,s=e.y.scale*r.y;o[1]/=a,o[2]/=s;var u=It(a,s,.5);return"number"==typeof o[3]&&(o[3]/=u),"number"==typeof o[4]&&(o[4]/=u),i(o)}}};function On(t,n,e,r,o,i,a,s,u,c,f,l){var d=a.enableHardwareAcceleration,p=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!!s,m=!!s,y=!0;for(var g in t){var x=t[g],b=yn(g),E=gn(x,b);if(Cn(g)){if(v=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(Sn(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=Vn(g)?e:n;if(s&&Ln[g]){var C=Ln[g].process(x,l,u,f),P=Ln[g].applyTo;if(P)for(var S=P.length,A=0;A<S;A++)w[P[A]]=C;else w[g]=C}else w[g]=E}}if((v||p)&&(n.transform=s?function(t,n){var e=t.x.translate/n.x,r=t.y.translate/n.y,o=t.x.scale,i=t.y.scale;return"translate3d("+e+"px, "+r+"px, 0) scale("+o+", "+i+")"}(c,f):function(t,n,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="",s=!1;n.sort(En);for(var u=n.length,c=0;c<u;c++){var f=n[c];a+=(An[f]||f)+"("+t[f]+") ","z"===f&&(s=!0)}return!s&&o?a+="translateZ(0)":a=a.trim(),e?a=e(t,r?"":a):i&&r&&(a="none"),a}(r,i,p,y,d,h)),m){var V=s?100*c.x.origin+"%":o.originX||"50%",M=s?100*c.y.origin+"%":o.originY||"50%",T=o.originZ||"0";n.transformOrigin=V+" "+M+" "+T}}function kn(t,n){t.min=n.min,t.max=n.max}function Bn(t,n,e){return e+n*(t-e)}function Rn(t,n,e,r,o){return void 0!==o&&(t=Bn(t,o,r)),Bn(t,e,r)+n}function Dn(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=Rn(t.min,n,e,r,o),t.max=Rn(t.max,n,e,r,o)}function Fn(t,n){var e=n.x,r=n.y;Dn(t.x,e.translate,e.scale,e.originPoint),Dn(t.y,r.translate,r.scale,r.originPoint)}function In(t,n,e,r){var o=r[0],i=r[1],a=r[2];t.min=n.min,t.max=n.max;var s=It(n.min,n.max,e[a]||.5);Dn(t,e[o],e[i],s,e.scale)}var Un=["x","scaleX","originX"],jn=["y","scaleY","originY"];function Xn(t,n,e,r,o){return t=Bn(t-=n,1/e,r),void 0!==o&&(t=Bn(t,1/o,r)),t}function Yn(t,n,e){var r=e[0],o=e[1],i=e[2];!function(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),void 0===r&&(r=.5);var i=It(t.min,t.max,r)-n;t.min=Xn(t.min,n,e,i,o),t.max=Xn(t.max,n,e,i,o)}(t,n[r],n[o],n[i],n.scale)}var Hn=Ot(0,1);function zn(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),Dt(t,n)<e}function Wn(t,n){var e=.5,r=t.max-t.min,o=n.max-n.min;return o>r?e=Ft(n.min,n.max-r,t.min):r>o&&(e=Ft(t.min,t.max-o,n.min)),Hn(e)}function Nn(t,n,e,r){var o=n.max-n.min,i=e.max-e.min;t.origin=void 0===r?Wn(n,e):r,t.originPoint=It(n.min,n.max,t.origin),t.scale=i/o,zn(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,n,e){var r=It(t.min,t.max,e);return It(n.min,n.max,e)-r}(n,e,t.origin),zn(t.translate)&&(t.translate=0)}function Gn(t,n,e,r){Nn(t.x,n.x,e.x,r),Nn(t.y,n.y,e.y,r)}function _n(t){return[t("x"),t("y")]}var Zn=function(){return function(t,n){var e=this,r=t.middleware,o=t.onComplete;this.isActive=!0,this.update=function(t){e.observer.update&&e.updateObserver(t)},this.complete=function(){e.observer.complete&&e.isActive&&e.observer.complete(),e.onComplete&&e.onComplete(),e.isActive=!1},this.error=function(t){e.observer.error&&e.isActive&&e.observer.error(t),e.isActive=!1},this.observer=n,this.updateObserver=function(t){return n.update(t)},this.onComplete=o,n.update&&r&&r.length&&r.forEach((function(t){return e.updateObserver=t(e.updateObserver,e.complete)}))}}(),qn=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.create=function(n){return new t(n)},t.prototype.start=function(t){void 0===t&&(t={});var n=!1,e={stop:function(){}},r=this.props,o=(0,r.init)(function(t,n,e){var r=n.middleware;return new Zn({middleware:r,onComplete:e},"function"==typeof t?{update:t}:t)}(t,a(r,["init"]),(function(){n=!0,e.stop()})));return e=o?i({},e,o):e,n&&e.stop(),e},t.prototype.applyMiddleware=function(t){return this.create(i({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=1===t.length?t[0]:Wt.apply(void 0,t);return this.applyMiddleware((function(t){return function(n){return t(e(n))}}))},t}(),$n=function(t){return new qn({init:t})},Kn=[j,U,I,X,Y],Jn=function(t){return Kn.find((function(n){return n.test(t)}))},Qn=function(t,n){return t(n)},te=function(t,n){var e=n.from,r=n.to,o=a(n,["from","to"]),s=Jn(e)||Jn(r),u=s.transform,c=s.parse;return t(i({},o,{from:"string"==typeof e?c(e):e,to:"string"==typeof r?c(r):r})).pipe(u)},ne=function(t){return function(n,e){var r=e.from,o=e.to,s=a(e,["from","to"]);return n(i({},s,{from:0,to:1})).pipe(t(r,o))}},ee=ne(Ht),re=ne(qt),oe=function(t,n){var e=function(t){var n=Object.keys(t),e=function(n,e){return void 0!==n&&!t[e](n)};return{getVectorKeys:function(t){return n.reduce((function(n,r){return e(t[r],r)&&n.push(r),n}),[])},testVectorProps:function(t){return t&&n.some((function(n){return e(t[n],n)}))}}}(n),r=e.testVectorProps,o=e.getVectorKeys;return function(n){if(!r(n))return t(n);var e=o(n),i=n[e[0]];return ie(i)(t,n,e)}},ie=function(t){return"number"==typeof t?Qn:function(t){return Boolean(Jn(t))}(t)?te:J.test(t)?ee:tt.test(t)?re:Qn},ae=oe((function(t){return void 0===t&&(t={}),$n((function(n){var e=n.complete,r=n.update,o=t.velocity,i=void 0===o?0:o,a=t.from,s=void 0===a?0:a,u=t.power,c=void 0===u?.8:u,f=t.timeConstant,l=void 0===f?350:f,d=t.restDelta,p=void 0===d?.5:d,h=t.modifyTarget,v=0,m=c*i,y=Math.round(s+m),g=void 0===h?y:h(y),x=E.update((function(t){var n=t.delta;v+=n;var o=-m*Math.exp(-v/l),i=o>p||o<-p;r(i?g+o:g),i||(w.update(x),e())}),!0);return{stop:function(){return w.update(x)}}}))}),{from:B.test,modifyTarget:function(t){return"function"==typeof t},velocity:B.test}),se=oe((function(t){return void 0===t&&(t={}),$n((function(n){var e=n.update,r=n.complete,o=t.velocity,i=void 0===o?0:o,a=t.from,s=void 0===a?0:a,u=t.to,c=void 0===u?0:u,f=t.stiffness,l=void 0===f?100:f,d=t.damping,p=void 0===d?10:d,h=t.mass,v=void 0===h?1:h,m=t.restSpeed,y=void 0===m?.01:m,g=t.restDelta,x=void 0===g?.01:g,b=i?-i/1e3:0,C=0,P=c-s,S=s,A=S,V=E.update((function(t){var n=t.delta;C+=n;var o=p/(2*Math.sqrt(l*v)),a=Math.sqrt(l/v)/1e3;if(A=S,o<1){var s=Math.exp(-o*a*C),u=a*Math.sqrt(1-o*o);S=c-s*((b+o*a*P)/u*Math.sin(u*C)+P*Math.cos(u*C))}else{s=Math.exp(-a*C);S=c-s*(P+(b+a*P)*C)}i=Qt(S-A,n);var f=Math.abs(i)<=y,d=Math.abs(c-S)<=x;f&&d?(e(S=c),w.update(V),r()):e(S)}),!0);return{stop:function(){return w.update(V)}}}))}),{from:B.test,to:B.test,stiffness:B.test,damping:B.test,mass:B.test,velocity:B.test}),ue=oe((function(t){var n=t.from,e=void 0===n?0:n,r=t.velocity,o=void 0===r?0:r,a=t.min,s=t.max,u=t.power,c=void 0===u?.8:u,f=t.timeConstant,l=void 0===f?700:f,d=t.bounceStiffness,p=void 0===d?500:d,h=t.bounceDamping,v=void 0===h?10:h,m=t.restDelta,y=void 0===m?1:m,g=t.modifyTarget;return $n((function(t){var n,r=t.update,u=t.complete,f=e,d=e,h=!1,m=function(t){return void 0!==a&&t<=a},x=function(t){return void 0!==s&&t>=s},b=function(t){return m(t)||x(t)},E=function(t){r(t),f=d,o=Qt((d=t)-f,A().delta),n&&!h&&function(t,n){return m(t)&&n<0||x(t)&&n>0}(t,o)&&C({from:t,velocity:o})},w=function(t,e){n&&n.stop(),n=t.start({update:E,complete:function(){e?e():u()}})},C=function(t){h=!0,w(se(i({},t,{to:m(t.from)?a:s,stiffness:p,damping:v,restDelta:y})))};if(b(e))C({from:e,velocity:o});else if(0!==o){var P=ae({from:e,velocity:o,timeConstant:l,power:c,restDelta:b(e)?20:y,modifyTarget:g});w(P,(function(){b(d)?C({from:d,velocity:o}):u()}))}else u();return{stop:function(){return n&&n.stop()}}}))}),{from:B.test,velocity:B.test,min:B.test,max:B.test,damping:B.test,stiffness:B.test,modifyTarget:function(t){return"function"==typeof t}}),ce=oe((function(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=void 0===i?ut:i,s=t.reverseEase;return void 0!==s&&s&&(a=rt(a)),$n((function(t){var n=t.update;return{seek:function(t){return n(t)}}})).pipe(a,(function(t){return It(e,o,t)}))}),{ease:function(t){return"function"==typeof t},from:B.test,to:B.test}),fe=Ot(0,1),le=function(t){return void 0===t&&(t={}),$n((function(n){var e,r=n.update,o=n.complete,i=t.duration,a=void 0===i?300:i,s=t.ease,u=void 0===s?ft:s,c=t.flip,f=void 0===c?0:c,l=t.loop,d=void 0===l?0:l,p=t.yoyo,h=void 0===p?0:p,v=t.repeatDelay,m=void 0===v?0:v,y=t.from,g=void 0===y?0:y,x=t.to,b=void 0===x?1:x,C=t.elapsed,P=void 0===C?0:C,S=t.flipCount,A=void 0===S?0:S,V=t.yoyoCount,M=void 0===V?0:V,T=t.loopCount,L=void 0===T?0:T,O=ce({from:g,to:b,ease:u}).start(r),k=0,B=!1,R=function(t){var n;void 0===t&&(t=!1),O=ce({from:g=(n=[b,g])[0],to:b=n[1],ease:u,reverseEase:t}).start(r)},D=function(){k=fe(Ft(0,a,P)),O.seek(k)},F=function(){B=!0,e=E.update((function(t){var n,r=t.delta;P+=r,D(),!(n=B&&P>a+m)||(!n||d||f||h)&&(P=P-a-m,d&&L<d?(L++,1):f&&A<f?(A++,R(),1):h&&M<h&&(M++,R(M%2!=0),1))||(w.update(e),o&&E.update(o,!1,!0))}),!0)},I=function(){B=!1,e&&w.update(e)};return F(),{isActive:function(){return B},getElapsed:function(){return Ot(0,a,P)},getProgress:function(){return k},stop:function(){I()},pause:function(){return I(),this},resume:function(){return B||F(),this},seek:function(t){return P=It(0,a,t),E.update(D,!1,!0),this},reverse:function(){return R(),this}}}))},de=Ot(0,1),pe=function(t,n,e){return $n((function(r){var o=r.update,i=n.split(" ").map((function(n){return t.addEventListener(n,o,e),n}));return{stop:function(){return i.forEach((function(n){return t.removeEventListener(n,o,e)}))}}}))},he=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},ve=function(t,n){return void 0===n&&(n={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),n.clientX=n.x=t.clientX,n.clientY=n.y=t.clientY,n.pageX=t.pageX,n.pageY=t.pageY,n},me=[he()];if("undefined"!=typeof document){pe(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(t){var n=t.touches,e=n.length;me.length=0;for(var r=0;r<e;r++){var o=n[r];me.push(ve(o))}}))}var ye=he();if("undefined"!=typeof document){pe(document,"mousedown mousemove",!0).start((function(t){ve(t,ye)}))}var ge=function(t){return $n((function(n){var e=n.complete,r=setTimeout(e,t);return{stop:function(){return clearTimeout(r)}}}))},xe=function(t){return Array.isArray(t)},be=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Ee=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},we=function(){return{ease:"linear",duration:.3}},Ce=function(t){return{type:"keyframes",duration:.8,values:t}},Pe={x:be,y:be,z:be,rotate:be,rotateX:be,rotateY:be,rotateZ:be,scaleX:Ee,scaleY:Ee,scale:Ee,opacity:we,backgroundColor:we,color:we,default:Ee},Se=function(t){var n=t.to,e=t.duration;return $n((function(t){var r=t.update,o=t.complete;r(n),e?ge(e).start({complete:o}):o()}))},Ae=function(t){return Array.isArray(t)?(t.length,At(t[0],t[1],t[2],t[3])):"string"==typeof t?(Vt[t],Vt[t]):t},Ve=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},Me=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!tt.test(n)||n.startsWith("url(")))},Te=function(t){return 1e3*t},Le={tween:le,spring:se,keyframes:function(t){var n=t.easings,e=t.ease,r=void 0===e?ut:e,o=t.times,s=t.values,u=a(t,["easings","ease","times","values"]);n=Array.isArray(n)?n:function(t,n){return t.map((function(){return n||ft})).splice(0,t.length-1)}(s,n),o=o||function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(s);var c=n.map((function(t,n){return ce({from:s[n],to:s[n+1],ease:t})}));return le(i({},u,{ease:r})).applyMiddleware((function(t){return function(t,n,e){var r=t.length,o=r-1,i=o-1,a=n.map((function(t){return t.start(e)}));return function(n){n<=t[0]&&a[0].seek(0),n>=t[o]&&a[i].seek(1);for(var e=1;e<r&&!(t[e]>n||e===o);e++);var s=Ft(t[e-1],t[e],n);a[e-1].seek(de(s))}}(o,c,t)}))},inertia:ue,just:Se},Oe={tween:function(t){if(t.ease){var n=Ve(t.ease)?t.ease[0]:t.ease;t.ease=Ae(n)}return t},keyframes:function(t){var n=t.from,e=(t.to,t.velocity,a(t,["from","to","velocity"]));if(e.values&&null===e.values[0]){var r=s(e.values);r[0]=n,e.values=r}return e.ease&&(e.easings=Ve(e.ease)?e.ease.map(Ae):Ae(e.ease)),e.ease=ut,e}},ke=function(t,n,e){var r=e?e.delay:0;if(void 0===e||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var n=a(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(n).length}(e))return i({delay:r},function(t,n){var e;return e=xe(n)?Ce:Pe[t]||Pe.default,i({to:n},e(n))}(t,n));var o=e[t]||e.default||e;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:xe(n)?n[n.length-1]:n,type:"just"}:xe(n)?i(i({values:n,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):i({type:"tween",to:n,delay:r},o)},Be=function(t,n,e,r){var o,s=n.get(),u=Me(t,s),c=Me(t,e),f=ke(t,e,r),l=f.type,d=void 0===l?"tween":l,p=a(f,["type"]),h=u&&c?Le[d]:Se,v=function(t,n){return Oe[t]?Oe[t](n):n}(d,i({from:s,velocity:n.getVelocity()},p));return((o=v).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(v.duration&&(v.duration=Te(v.duration)),v.repeatDelay&&(v.repeatDelay=Te(v.repeatDelay))),[h,v]};function Re(t,n,e,r){void 0===r&&(r={});var o=r.delay,i=void 0===o?0:o,s=a(r,["delay"]);return n.start((function(r){var o,u=Be(t,n,e,s),c=u[0],f=u[1],l=f.delay,d=a(f,["delay"]);void 0!==l&&(i=l);var p=function(){var t=c(d);o=t.start({update:function(t){return n.set(t)},complete:r})};return i?o=ge(Te(i)).start({complete:p}):p(),function(){o&&o.stop()}}))}function De(t,n){return an(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=on);var a=n({x:r,y:e}),s=n({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),n))}var Fe=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},n.style={},n.reactStyle={},n.vars={},n.transform={},n.transformOrigin={},n.transformKeys=[],n.config=n.defaultConfig,n.isLayoutProjectionEnabled=!1,n.hasLayoutChildren=!1,n.layoutUpdateListeners=new Set,n.hasViewportBoxUpdated=!1,n.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},n.treeScale={x:1,y:1},n.delta=cn(),n.deltaFinal=cn(),n.stopLayoutAxisAnimation={x:function(){},y:function(){}},n.isTargetBoxLocked=!1,n.axisProgress={x:en(0),y:en(0)},n}return o(n,t),n.prototype.removeValue=function(n){t.prototype.removeValue.call(this,n),delete this.vars[n],delete this.style[n]},n.prototype.clean=function(){this.style={},this.vars={},this.transform={}},n.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=i(i({},this.defaultConfig),t)},n.prototype.read=function(t){return this.getComputedStyle()[t]||0},n.prototype.readNativeValue=function(t){if(Cn(t)){var n=yn(t);return n&&n.default||0}return this.read(t)},n.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0,function(t,n){var e=t.parent;for(;e;)n(e),e=e.parent}(this,(function(t){return t.hasLayoutChildren=!0}))},n.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},n.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},n.prototype.onLayoutUpdate=function(t){var n=this;return this.layoutUpdateListeners.add(t),function(){return n.layoutUpdateListeners.delete(t)}},n.prototype.layoutReady=function(t){var n=this;this.layoutUpdateListeners.forEach((function(e){e(n.box,n.prevViewportBox||n.box,t)}))},n.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return De(this.element,t)},n.prototype.getBoundingBoxWithoutTransforms=function(){var t,n,e=this.getBoundingBox();return t=e,n=this.latest,Yn(t.x,n,Un),Yn(t.y,n,jn),e},n.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},n.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,n=t.x,e=t.y;this.isTargetBoxLocked||n.isAnimating()||e.isAnimating()||(this.targetBox=sn(this.prevViewportBox))},n.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=sn(this.box),this.targetBox||(this.targetBox=sn(this.box))},n.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},n.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},n.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},n.prototype.resetTransform=function(){this.element.style.transform="none",this.scheduleRender()},n.prototype.setAxisTarget=function(t,n,e){var r=this.targetBox[t];r.min=n,r.max=e,this.hasViewportBoxUpdated=!0,Ie(this)},n.prototype.startLayoutAxisAnimation=function(t,n){var e=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(n){return e.setAxisTarget(t,n,n+a)})),Re(t,r,0,n)},n.prototype.stopLayoutAnimation=function(){var t=this;_n((function(n){return t.axisProgress[n].stop()}))},n.prototype.updateLayoutDeltas=function(t){var n,e,r,o;(this.treePath.forEach((function(n){return n.updateLayoutDeltas(t)})),this.isLayoutProjectionEnabled&&this.box)&&(r=this.boxCorrected,o=this.box,kn(r.x,o.x),kn(r.y,o.y),function(t,n,e){n.x=n.y=1;for(var r=e.length,o=0;o<r;o++){var i=e[o].delta;Fn(t,i),n.x*=i.x.scale,n.y*=i.y.scale}}(this.boxCorrected,this.treeScale,this.treePath),function(t,n,e){In(t.x,n.x,e,Un),In(t.y,n.y,e,jn)}(this.targetBoxFinal,this.targetBox,this.latest),Gn(this.delta,this.boxCorrected,this.targetBox),Gn(this.deltaFinal,this.boxCorrected,this.targetBoxFinal),t||(this.hasViewportBoxUpdated&&(null===(e=(n=this.config).onViewportBoxUpdate)||void 0===e||e.call(n,this.targetBox,this.delta)),this.hasViewportBoxUpdated=!1))},n.prototype.build=function(t){void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),this.isLayoutProjectionEnabled&&this.box&&this.updateLayoutDeltas(t),On(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},n.prototype.render=function(){for(var t in this.build(!1),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},n}(rn);function Ie(t){t.isLayoutProjectionEnabled&&t.scheduleRender(),t.hasLayoutChildren&&t.children.forEach(Ie)}function Ue(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function je(t,n,e){return"string"==typeof t?t:j.transform(n+e*t)}var Xe=function(t,n){return j.transform(t*n)},Ye={offset:"stroke-dashoffset",array:"stroke-dasharray"},He={offset:"strokeDashoffset",array:"strokeDasharray"};var ze={x:0,y:0,width:0,height:0};function We(t,n,e,r,o,i,s,u,c,f){var l=t.attrX,d=t.attrY,p=t.originX,h=t.originY,v=t.pathLength,m=t.pathSpacing,y=void 0===m?1:m,g=t.pathOffset,x=void 0===g?0:g;return On(a(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,e,o,i,s,u),r.transform&&(n.transform=r.transform,delete r.transform),(void 0!==p||void 0!==h||n.transform)&&(n.transformOrigin=function(t,n,e){return je(n,t.x,t.width)+" "+je(e,t.y,t.height)}(c||ze,void 0!==p?p:.5,void 0!==h?h:.5)),void 0!==l&&(r.x=l),void 0!==d&&(r.y=d),void 0!==f&&void 0!==v&&function(t,n,e,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?Ye:He;t[a.offset]=Xe(-o,n);var s=Xe(e,n),u=Xe(r,n);t[a.array]=s+" "+u}(r,f,v,y,x,!1),r}var Ne=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),Ge=/([a-z])([A-Z])/g,_e=function(t){return t.replace(Ge,"$1-$2").toLowerCase()},Ze=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.attrs={},n.defaultConfig={enableHardwareAcceleration:!1},n.config=n.defaultConfig,n}return o(n,t),n.prototype.mount=function(n){t.prototype.mount.call(this,n),this.measure()},n.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},n.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},n.prototype.read=function(t){return t=Ne.has(t)?t:_e(t),this.element.getAttribute(t)},n.prototype.build=function(){We(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength)},n.prototype.render=function(){for(var n in t.prototype.render.call(this),this.attrs)this.element.setAttribute(_e(n),this.attrs[n])},n}(Fe);var qe=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function $e(t){return"string"==typeof t&&qe.has(t)}var Ke=n.createContext(null);function Je(){var t=n.useContext(Ke);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=er();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Qe(){var t=n.useContext(Ke);return null===t||t.isPresent}var tr=0,nr=function(){return tr++},er=function(){return Ue(nr)},rr=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function or(t){return rr.has(t)}var ir=function(t){return!or(t)};try{var ar=require("@emotion/is-prop-valid").default;ir=function(t){return t.startsWith("on")?!or(t):ar(t)}}catch(x){}function sr(t){return"string"==typeof t&&t.startsWith("var(--")}var ur=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function cr(t,n,e){var r=function(t){var n=ur.exec(t);return n?[n[1],n[2]]:[,]}(t),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(n).getPropertyValue(o);return a||(sr(i)?cr(i,n):i)}}var fr,lr=new Set(["width","height","top","left","right","bottom","x","y"]),dr=function(t){return lr.has(t)},pr=function(t,n){t.set(n,!1),t.set(n)},hr=function(t){return t===B||t===j};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(fr||(fr={}));var vr=function(t,n){return parseFloat(t.split(", ")[n])},mr=function(t,n){return function(e,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return vr(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?vr(a[1],t):0}},yr=new Set(["x","y","z"]),gr=bn.filter((function(t){return!yr.has(t)}));var xr={width:function(t){var n=t.x;return n.max-n.min},height:function(t){var n=t.y;return n.max-n.min},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.y,r=n.top;return parseFloat(r)+(e.max-e.min)},right:function(t,n){var e=t.x,r=n.left;return parseFloat(r)+(e.max-e.min)},x:mr(4,13),y:mr(5,14)},br=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=i({},n),r=i({},r);var o=Object.keys(n).filter(dr),a=[],s=!1,u=[];if(o.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var c,f=e[o],l=n[o],d=hn(f);if(xe(l))for(var p=l.length,h=null===l[0]?1:0;h<p;h++)c?hn(l[h]):c=hn(l[h]);else c=hn(l);if(d!==c)if(hr(d)&&hr(c)){var v=i.get();"string"==typeof v&&i.set(parseFloat(v)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&c===j&&(n[o]=l.map(parseFloat))}else s||(a=function(t){var n=[];return gr.forEach((function(e){var r=t.getValue(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&t.render(),n}(t),s=!0),u.push(o),r[o]=void 0!==r[o]?r[o]:n[o],pr(i,l)}})),u.length){var c=function(t,n,e){var r=n.getBoundingBox(),o=n.getComputedStyle(),i=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===i&&n.setStaticValues("display",t.display||"block"),n.render();var s=n.getBoundingBox();return e.forEach((function(e){var i=n.getValue(e);pr(i,xr[e](r,a)),t[e]=xr[e](s,o)})),t}(n,t,u);return a.length&&a.forEach((function(n){var e=n[0],r=n[1];t.getValue(e).set(r)})),t.render(),{target:c,transitionEnd:r}}return{target:n,transitionEnd:r}};function Er(t,n,e,r){return function(t){return Object.keys(t).some(dr)}(n)?br(t,n,e,r):{target:n,transitionEnd:r}}var wr=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(t){this.variants=t,this.componentControls.forEach((function(n){return n.setVariants(t)}))},t.prototype.setDefaultTransition=function(t){this.defaultTransition=t,this.componentControls.forEach((function(n){return n.setDefaultTransition(t)}))},t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){var e=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(e){var o=e.start(t,{transitionOverride:n});r.push(o)})),Promise.all(r)}return new Promise((function(r){e.pendingAnimations.push({animation:[t,n],resolve:r})}))},t.prototype.set=function(t){return this.hasMounted,this.componentControls.forEach((function(n){return n.apply(t)}))},t.prototype.stop=function(){this.componentControls.forEach((function(t){return t.stop()}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(n){var e=n.animation,r=n.resolve;return t.start.apply(t,e).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Cr=n.createContext({static:!1}),Pr=function(t){return"string"==typeof t||Array.isArray(t)},Sr=function(t){return t instanceof wr},Ar=function(t,e,r,o,i){void 0===o&&(o=!1);var a,s=i.initial,u=i.animate,c=i.variants,f=i.whileTap,l=i.whileHover,d=i.layoutId,p=n.useContext(Ke),h=null==p?void 0:p.id;r.isPresenceRoot=t.presenceId!==h,void 0!==(null==p?void 0:p.initial)&&(s=p.initial),!1!==s||Sr(u)?"boolean"!=typeof s&&(a=s):a=u;var v=n.useRef(!1),m=c||Pr(u)||Pr(f)||Pr(l)||Sr(u),y=Pr(a)?a:t.initial,g=Pr(u)?u:t.animate,x=o?y:null,b=m&&Pr(g)?g:null,E=n.useMemo((function(){return{controls:m?e:t.controls,initial:y,animate:g,visualElement:r,hasMounted:v,isReducedMotion:t.isReducedMotion,presenceId:h}}),[x,b,t.isReducedMotion,u,d,h]);return E.static=o,function(t,e){void 0===e&&(e=!1);var r=n.useRef(!0);(!e||e&&r.current)&&t(),r.current=!1}((function(){var n=a||t.initial;n&&e.apply(n)}),!o),n.useEffect((function(){v.current=!0}),[]),E},Vr=function(t){var n=t.animate,e=t.variants,r=t.inherit;return(void 0===r||r)&&!!e&&(!n||n instanceof wr)},Mr=function(t){return t instanceof nn};function Tr(t,n,e,r){for(var o in void 0===r&&(r=!1),r&&(t.reactStyle={}),e){var i=e[o],a=!1;if(Mr(i))Lr.has(o)||(t.addValue(o,i),a=!0);else if(Cn(o)||Sn(o)){if(t.hasValue(o)){if(i!==n[o]){t.getValue(o).set(i)}}else t.addValue(o,en(i));a=!0}else r&&(t.reactStyle[o]=i);a&&(n[o]=i)}}var Lr=new Set([]),Or=function(){return{}},kr=function(t){return xe(t)?t[t.length-1]||0:t},Br=function(){function t(t,n){var e=this,r=n.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.visualElement.hasValue(t)},this.visualElement=t,this.makeTargetAnimatable=r,this.visualElement.forEachValue((function(t,n){return e.baseTarget[n]=t.get()}))}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,n){var e=void 0===n?{}:n,r=e.isActive,o=void 0===r?new Set:r,a=e.priority,s=this.resolveVariant(t),u=s.target,c=s.transitionEnd;for(var f in u=this.transformValues(i(i({},u),c))){if(o.has(f))return;if(o.add(f),u){var l=kr(u[f]);if(this.visualElement.hasValue(f)){var d=this.visualElement.getValue(f);d&&d.set(l)}else this.visualElement.addValue(f,en(l));a||(this.baseTarget[f]=l)}}},t.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},t.prototype.checkForNewValues=function(t){var n=Object.keys(t).filter(this.hasValue),e=n.length;if(e)for(var r=0;r<e;r++){var o=n[r],i=t[o],a=null;if(Array.isArray(i)&&(a=i[0]),null===a){var s=this.visualElement.readNativeValue(o);a=void 0!==s?s:t[o]}"string"==typeof a&&/^\-?\d*\.?\d+$/.test(a)?a=parseFloat(a):!mn(a)&&tt.test(i)&&(a=tt.getAnimatableNone(i)),this.visualElement.addValue(o,en(a)),this.baseTarget[o]=a}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e;"function"==typeof t&&(t=t(this.props.custom,(n=this.visualElement,e={},n.forEachValue((function(t,n){return e[n]=t.get()})),e),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(this.visualElement)));var r=t.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:t.transitionEnd,target:a(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},t.prototype.setOverride=function(t,n){this.overrides[n]=t,this.children&&this.children.forEach((function(e){return e.setOverride(t,n)}))},t.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},t.prototype.clearOverride=function(t){var n=this;if(this.children&&this.children.forEach((function(n){return n.clearOverride(t)})),this.overrides[t]){this.activeOverrides.delete(t);var e=this.getHighestPriority();if(this.resetIsAnimating(),e)this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[t];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then((function(){return n.onComplete()}))}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(t){var n=this,e=new Set;s(t).reverse().forEach((function(r){var o=n.resolveVariant(n.variants[r]),i=o.target,a=o.transitionEnd;a&&n.setValues(a,{isActive:e}),i&&n.setValues(i,{isActive:e}),n.children&&n.children.size&&n.children.forEach((function(n){return n.applyVariantLabels(t)}))}))},t.prototype.start=function(t,n){var e,r,o=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then((function(){return o.onComplete()}))},t.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,o=r.delay,a=void 0===o?0:o,s=r.priority,u=void 0===s?0:s,c=r.transitionOverride,f=this.resolveVariant(t),l=f.target,d=f.transition,p=f.transitionEnd;if(c&&(d=c),!l)return Promise.resolve();l=this.transformValues(l),p&&(p=this.transformValues(p)),this.checkForNewValues(l);var h=this.transformValues(function(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Rr(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}(l,d,this.visualElement));if(this.makeTargetAnimatable){var v=this.makeTargetAnimatable(this.visualElement,l,h,p);l=v.target,p=v.transitionEnd}u&&(this.resolvedOverrides[u]=l),this.checkForNewValues(l);var m=[];for(var y in l){var g=this.visualElement.getValue(y);if(g&&l&&void 0!==l[y]){var x=l[y];u||(this.baseTarget[y]=kr(x)),this.isAnimating.has(y)||(this.isAnimating.add(y),m.push(Re(y,g,x,i({delay:a},d))))}}var b=Promise.all(m);return p?b.then((function(){e.setValues(p,{priority:u})})):b},t.prototype.animateVariantLabels=function(t,n){var e=this,r=s(t).reverse().map((function(t){return e.animateVariant(t,n)}));return Promise.all(r)},t.prototype.animateVariant=function(t,n){var e=this,r=!1,o=0,i=0,a=1,s=n&&n.priority||0,u=this.variants[t],c=u?function(){return e.animate(u,n)}:function(){return Promise.resolve()},f=this.children?function(){return e.animateChildren(t,o,i,a,s)}:function(){return Promise.resolve()};if(u&&this.children){var l=this.resolveVariant(u).transition;l&&(r=l.when||r,o=l.delayChildren||o,i=l.staggerChildren||i,a=l.staggerDirection||a)}if(r){var d="beforeChildren"===r?[c,f]:[f,c],p=d[1];return(0,d[0])().then(p)}return Promise.all([c(),f()])},t.prototype.animateChildren=function(t,n,e,r,o){if(void 0===n&&(n=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var i=[],a=(this.children.size-1)*e,s=1===r?function(t){return t*e}:function(t){return a-t*e};return Array.from(this.children).forEach((function(e,r){var a=e.animateVariant(t,{priority:o,delay:n+s(r)});i.push(a)})),Promise.all(i)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},t.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var o in r)this.isAnimating.add(o)}},t.prototype.resetIsAnimating=function(t){void 0===t&&(t=0),this.isAnimating.clear(),t<this.getHighestPriority()&&this.checkOverrideIsAnimating(t),this.children&&this.children.forEach((function(n){return n.resetIsAnimating(t)}))},t.prototype.stop=function(){this.visualElement.forEachValue((function(t){return t.stop()}))},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t),this.overrides.forEach((function(n,e){n&&t.setOverride(n,e)}))},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();function Rr(t,n){if(n)return(n[t]||n.default||n).from}function Dr(t,e,r){var o=Vr(e),i=e.variants,s=e.transition,u=n.useContext(Cr).controls,c=n.useContext(Ke),f=Ue((function(){return new Br(t,r)}));return c&&!c.isPresent||(f.resetChildren(),f.setProps(e),f.setVariants(i),f.setDefaultTransition(s)),n.useEffect((function(){o&&u&&u.addChild(f)})),n.useEffect((function(){return function(){e.onAnimationComplete;var t=a(e,["onAnimationComplete"]);f.setProps(t),u&&u.removeChild(f)}}),[]),f}var Fr=n.createContext({transformPagePoint:function(t){return t},features:[]});function Ir(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Ur=Ir("dragHorizontal"),jr=Ir("dragVertical");function Xr(t){var n=!1;if("y"===t)n=jr();else if("x"===t)n=Ur();else{var e=Ur(),r=jr();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}var Yr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(t){Yr&&t.preventDefault()}),{passive:!1});var Hr=function(){return Yr=!1};function zr(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Wr(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return zr(n,e,r,o)}),[t,e,r,o])}function Nr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Gr(t){return!!t.touches}var _r={pageX:0,pageY:0};function Zr(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||_r;return{x:e[n+"X"],y:e[n+"Y"]}}function qr(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function $r(t,n){return void 0===n&&(n="page"),{point:Gr(t)?Zr(t,n):qr(t,n)}}function Kr(t){return $r(t,"client")}var Jr,Qr=function(t,n){if(void 0===n&&(n=!1),t){var e=function(n){return t(n,$r(n))};return n?function(t){if(t)return function(n){var e=n instanceof MouseEvent;(!e||e&&0===n.button)&&t(n)}}(e):e}},to="undefined"!=typeof window,no={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},eo={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ro(t){return to&&null===window.onpointerdown?t:to&&null===window.ontouchstart?eo[t]:to&&null===window.onmousedown?no[t]:t}function oo(t,n,e,r){return zr(t,ro(n),Qr(e,"pointerdown"===n),r)}function io(t,n,e,r){return Wr(t,ro(n),Qr(e,"pointerdown"===n),r)}!function(t){t.subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},t.relativeTo=function(t){var n;return function(e){var r=e.x,o=e.y,i=void 0!==n?n:n="string"==typeof t?document.getElementById(t):t;if(i){var a=i.getBoundingClientRect();return{x:r-a.left-window.scrollX,y:o-a.top-window.scrollY}}}}}(Jr||(Jr={}));var ao=function(){function t(t,n,e){var r=this,o=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=uo(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=Dt(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,a=A().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,u=s.onStart,c=s.onMove;n||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(Gr(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var a=so($r(t),this.transformPagePoint),s=a.point,u=A().timestamp;this.history=[i(i({},s),{timestamp:u})];var c=n.onSessionStart;c&&c(t,uo(a,this.history));var f=oo(window,"pointermove",(function(t,n){return r.handlePointerMove(t,n)})),l=oo(window,"pointerup",(function(t,n){return r.handlePointerUp(t,n)}));this.removeListeners=function(){f&&f(),l&&l()}}}return t.prototype.handlePointerMove=function(t,n){this.lastMoveEvent=t,this.lastMoveEventInfo=so(n,this.transformPagePoint),Nr(t)&&0===t.buttons?this.handlePointerUp(t,n):E.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,n){this.end();var e=this.handlers.onEnd;if(e){var r=uo(so(n,this.transformPagePoint),this.history);e&&e(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint),Hr()},t}();function so(t,n){return n?{point:n(t.point)}:t}function uo(t,n){var e=t.point;return{point:e,delta:Jr.subtract(e,fo(n)),offset:Jr.subtract(e,co(n)),velocity:lo(n,.1)}}function co(t){return t[0]}function fo(t){return t[t.length-1]}function lo(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=fo(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>Te(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function po(t,n,e,r,o){var i=t-n*e;return r?function(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?It(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?It(o,t,e):Math.min(t,o)),t}(i,r,o):i}function ho(t,n,e){var r={},o=t.max-t.min;return void 0!==n&&(r.min=t.min+n),void 0!==e&&(r.max=Math.max(t.min+e-o,t.min+e)),r}function vo(t,n){var e,r=n.min-t.min,o=n.max-t.max;return n.max-n.min<t.max-t.min&&(r=(e=[o,r])[0],o=e[1]),{min:t.min+r,max:t.min+o}}var mo,yo=new WeakMap,go=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.cursorProgress={x:.5,y:.5},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),yo.set(n,this)}return t.prototype.start=function(t,n){var e=this,r=void 0===n?{}:n,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress;i&&this.snapToCursor(t);var s=this.props.transformPagePoint;this.panSession=new ao(t,{onSessionStart:function(){Yr=!0,e.stopMotion()},onStart:function(t,n){var r,o,i=e.props,s=i.drag,u=i.dragPropagation;if(!s||u||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=Xr(s),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockTargetBox(),e.resolveDragConstraints();var c=Kr(t).point;_n((function(t){var n=e.visualElement.targetBox[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:Ft(r,o,c[t])})),e.isDragging=!0,e.currentDirection=null,null===(o=(r=e.props).onDragStart)||void 0===o||o.call(r,t,n)}},onMove:function(t,n){var r,o,i,a,s=e.props,u=s.dragPropagation,c=s.dragDirectionLock;if(u||e.openGlobalLock){var f=n.offset;if(c&&null===e.currentDirection)return e.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x");return e}(f),void(null!==e.currentDirection&&(null===(o=(r=e.props).onDirectionLock)||void 0===o||o.call(r,e.currentDirection)));e.updateAxis("x",t),e.updateAxis("y",t),null===(a=(i=e.props).onDrag)||void 0===a||a.call(i,t,n),mo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:s})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),n=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=n,this.visualElement.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t=this.props.dragConstraints;this.constraints=!!t&&(c(t)?this.resolveRefConstraints(this.visualElement.box,t):function(t,n){var e=n.top,r=n.left,o=n.bottom,i=n.right;return{x:ho(t.x,r,i),y:ho(t.y,e,o)}}(this.visualElement.box,t))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=De(i,o);var a=function(t,n){return{x:vo(t.x,n.x),y:vo(t.y,n.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));s&&(a=an(s))}return a},t.prototype.cancelDrag=function(){Hr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,n){var e;this.visualElement.unlockTargetBox(),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,s=o.onDragEnd;if(i||a){var u=n.velocity;this.animateDragEnd(u)}null==s||s(t,n)}},t.prototype.snapToCursor=function(t){this.prepareBoundingBox(),this.cursorProgress.x=.5,this.cursorProgress.y=.5,this.updateAxis("x",t),this.updateAxis("y",t)},t.prototype.updateAxis=function(t,n){var e,r=this.props,o=r.drag,i=r.dragElastic;if(xo(t,o,this.currentDirection)){var a=this.visualElement.box[t],s=a.max-a.min,u=this.cursorProgress[t],c=po(Kr(n).point[t],s,u,null===(e=this.constraints)||void 0===e?void 0:e[t],i);this.visualElement.setAxisTarget(t,c,c+s)}},t.prototype.updateProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,o=void 0!==r&&r,s=t.dragPropagation,u=void 0!==s&&s,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,d=void 0===l?.35:l,p=t.dragMomentum,h=void 0===p||p,v=a(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:e,dragDirectionLock:o,dragPropagation:u,dragConstraints:f,dragElastic:d,dragMomentum:h},v)},t.prototype.animateDragEnd=function(t){var n=this,e=this.props,r=e.drag,o=e.dragMomentum,a=e.dragElastic,s=e.dragTransition,u=_n((function(e){if(xo(e,r,n.currentDirection)){var u=n.constraints?n.constraints[e]:{},c=a?200:1e6,f=a?40:1e7,l=i(i({type:"inertia",velocity:o?t[e]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),u);return n.visualElement.startLayoutAxisAnimation(e,l)}}));return Promise.all(u).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){this.visualElement.stopLayoutAnimation()},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag,r=n.dragConstraints;if(c(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};_n((function(n){o[n]=Wn(t.visualElement.targetBox[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),_n((function(n){if(xo(n,e,null)){var r=function(t,n,e){var r=t.max-t.min,o=It(n.min,n.max-r,e);return{min:o,max:o+r}}(t.visualElement.targetBox[n],t.constraintsBox[n],o[n]),i=r.min,a=r.max;t.visualElement.setAxisTarget(n,i,a)}}))}},t.prototype.mount=function(t){var n=this,e=oo(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=zr(window,"resize",(function(){n.scalePoint()})),o=t.onLayoutUpdate((function(){n.isDragging&&n.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(mo,{cursorProgress:i.cursorProgress}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function xo(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var bo=function(t){return function(n){return t(n),null}},Eo={key:"drag",shouldRender:function(t){return!!t.drag},Component:bo((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Fr).transformPagePoint,a=Ue((function(){return new go({visualElement:e})}));a.updateProps(i(i({},t),{transformPagePoint:o})),n.useEffect((function(){return r&&r.subscribe(a)}),[a]),n.useEffect((function(){return a.mount(e)}),[])}(a(t,["visualElement"]),e)}))};function wo(t){return n.useEffect((function(){return function(){return t()}}),[])}function Co(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,s=r||o||i||a,u=n.useRef(null),c=n.useContext(Fr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){u.current=null,i&&i(t,n)}};n.useEffect((function(){null!==u.current&&u.current.updateHandlers(f)})),io(e,"pointerdown",s&&function(t){u.current=new ao(t,f,{transformPagePoint:c})}),wo((function(){return u.current&&u.current.end()}))}var Po=function(t,n){return!!n&&(t===n||Po(t,n.parentElement))},So=["whileHover","whileTap","whileDrag"],Ao=function(t){return So.indexOf(t)+1},Vo=Ao("whileTap");function Mo(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,s=t.controls,u=r||o||i||a,c=n.useRef(!1),f=n.useRef(null);function l(){f.current&&f.current(),f.current=null}a&&s&&s.setOverride(a,Vo);var d=n.useRef(null);d.current=function(t,n){var o=e.current;if(l(),c.current&&o){c.current=!1,s&&a&&s.clearOverride(Vo);var u=Xr(!0);u&&(u(),Po(o,t.target)?r&&r(t,n):i&&i(t,n))}},io(e,"pointerdown",u?function(t,n){l(),f.current=oo(window,"pointerup",(function(t,n){return d.current(t,n)})),e.current&&!c.current&&(c.current=!0,o&&o(t,n),s&&a&&s.startOverride(Vo))}:void 0),wo(l)}var To=Ao("whileHover"),Lo=function(t){return function(n,e){Nr(n)&&t(n,e)}};function Oo(t,n){Co(t,n),Mo(t,n),function(t,n){var e=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;e&&i&&i.setOverride(e,To),io(n,"pointerenter",Lo((function(t,n){r&&r(t,n),e&&i&&i.startOverride(To)}))),io(n,"pointerleave",Lo((function(t,n){o&&o(t,n),e&&i&&i.clearOverride(To)})))}(t,n)}var ko,Bo=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Ro={key:"gestures",shouldRender:function(t){return Bo.some((function(n){return t.hasOwnProperty(n)}))},Component:bo((function(t){var n=t.visualElement;Oo(a(t,["visualElement"]),n)}))},Do={key:"exit",shouldRender:function(t){return!!t.exit&&!Vr(t)},Component:bo((function(t){var e=t.animate,r=t.controls,o=t.exit,a=Je(),s=a[0],u=a[1],c=n.useContext(Ke),f=n.useRef(!1),l=void 0!==(null==c?void 0:c.custom)?c.custom:t.custom;n.useEffect((function(){s?!f.current||!e||"boolean"==typeof e||e instanceof wr||r.start(e):(!f.current&&o&&(r.setProps(i(i({},t),{custom:l})),r.start(o).then(u)),f.current=!0),s&&(f.current=!1)}),[e,r,l,o,s,u,t])}))};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(ko||(ko={}));function Fo(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=a(t,["transition","transitionEnd"]);return n?i(i({},r),e):r}var Io,Uo,jo=function(t){var n,e=t instanceof nn?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))};var Xo,Yo,Ho=((Io={})[ko.Target]=bo((function(t){return function(t,e,r,o){var a=n.useRef(!0),s=n.useRef(null);s.current||(s.current=Fo(t,!0)),n.useEffect((function(){var n,u,c={},f=Fo(t),l=Fo(t,!0);for(var d in f){var p=a.current&&(!r.hasValue(d)||r.getValue(d).get()!==l[d]),h=null!==l[d],v=(n=s.current[d],void 0!==(u=l[d])&&(Array.isArray(n)&&Array.isArray(u)?!function(t,n){if(null===n)return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}(u,n):n!==u));h&&(v||p)&&(c[d]=f[d])}a.current=!1,s.current=i(i({},s.current),l),Object.keys(c).length&&e.start(i(i({},c),{transition:t.transition||o,transitionEnd:t.transitionEnd}))}),[t])}(t.animate,t.controls,t.visualElement,t.transition)})),Io[ko.VariantLabel]=bo((function(t){var e=t.animate,r=t.inherit,o=void 0===r||r,i=t.controls;return function(t,e,r,o){var i=jo(e),a=n.useContext(Cr),s=a.hasMounted&&a.hasMounted.current,u=n.useRef(!1);n.useEffect((function(){var n,e,c=!1;r?(c=!!s,i=jo(a.animate)):c=u.current||(n=jo(t),e=i,n.join(",")!==e.join(",")),c&&o.start(i),u.current=!0}),[i.join(",")])}(t.initial,e,o,i)})),Io[ko.AnimationSubscription]=bo((function(t){return function(t,e){var r=n.useMemo((function(){return t.subscribe(e)}),[t]);n.useEffect((function(){return function(){r&&r()}}),[r])}(t.animate,t.controls)})),Io),zo=function(t){return t.animate instanceof wr},Wo=["initial","animate","whileTap","whileHover"],No=((Uo={})[ko.Target]=function(t){return!(void 0===t.animate||(n=t.animate,Array.isArray(n)||"string"==typeof n)||zo(t));var n},Uo[ko.VariantLabel]=function(t){return void 0!==t.variants||Wo.some((function(n){return"string"==typeof t[n]}))},Uo[ko.AnimationSubscription]=zo,Uo);!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(Xo||(Xo={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(Yo||(Yo={}));var Go=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},n.stopAxisAnimation={x:void 0,y:void 0},n.animate=function(t,e,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,s=r.visibilityAction,u=a(r,["originBox","targetBox","visibilityAction"]),c=n.props,f=c.visualElement,l=c.layout,d=Zo(e=o||e,t=i||t),p=_n((function(r){if("position"===l){var o=t[r].max-t[r].min;e[r].max=e[r].min+o}if(!f.isTargetBoxLocked)return void 0===s?d?n.animateAxis(r,t[r],e[r],u):f.setAxisTarget(r,t[r].min,t[r].max):void(s===Yo.Hide?f.hide():f.show())}));return f.render(),Promise.all(p).then((function(){var t,e;null===(t=u.onLayoutAnimationComplete)||void 0===t||t.call(u),f.isPresent?f.presence=Xo.Present:(null===(e=u.onLayoutAnimationComplete)||void 0===e||e.call(u),n.safeToRemove())}))},n}return o(n,t),n.prototype.componentDidMount=function(){var t=this.props.visualElement;t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate)},n.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),_n((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},n.prototype.animateAxis=function(t,n,e,r){var o,i,a=void 0===r?{}:r,s=a.transition,u=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c=this.props.visualElement,f=this.frameTarget[t],l=c.axisProgress[t];l.clearListeners(),l.set(0),l.set(0);var d=u&&this.createCrossfadeAnimation(u),p=function(){var r=l.get()/1e3;!function(t,n,e,r){t.min=It(n.min,e.min,r),t.max=It(n.max,e.max,r)}(f,e,n,r),c.setAxisTarget(t,f.min,f.max),null==d||d(r)};p();var h=Re("x"===t?"layoutX":"layoutY",l,1e3,s||this.props.transition||$o),v=l.onChange(p);return this.stopAxisAnimation[t]=function(){l.stop(),v()},h},n.prototype.createCrossfadeAnimation=function(t){var n=this.props.visualElement.getValue("opacity",0);return function(e){n.set(Jo(It(0,1,e))),t.set(Qo(It(1,0,e)))}},n.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},n.prototype.render=function(){return null},n}(n.Component),_o={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},Component:function(t){var e=Je()[1];return n.createElement(Go,i({},t,{safeToRemove:e}))}};function Zo(t,n){return qo(t.x,n.x)||qo(t.y,n.y)}function qo(t,n){return t.min!==n.min||t.max!==n.max}var $o={duration:.45,ease:[.4,0,.1,1]};function Ko(t,n,e){return function(r){return r<t?0:r>n?1:e(Ft(t,n,r))}}var Jo=Ko(0,.5,pt),Qo=Ko(.5,.95,ut),ti={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},ni=function(t,n){return t.depth-n.depth};function ei(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?ti:n,r=e.measureLayout,o=e.layoutReady,i=Array.from(t).sort(ni);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=Xo.Present)})),t.clear()}}}function ri(t){return!!t.forceUpdate}var oi=n.createContext(ei()),ii=function(t){function n(n){var e=t.call(this,n)||this,r=n.syncLayout;return ri(r)||(e.componentDidUpdate=function(){return r.flush()}),e}return o(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;ri(n)&&n.register(e)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return ri(n)?n.syncUpdate():(e.snapshotBoundingBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){},n.prototype.render=function(){return null},n}(e.Component),ai=[{key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},Component:function(t){var r=n.useContext(oi);return e.createElement(ii,i({},t,{syncLayout:r}))}},Eo,Ro,Do,_o];function si(t,e,r,o,a,u,c){var f=n.useContext(Fr);if(t||"undefined"==typeof window)return null;var l=s(ai,f.features),d=l.length,p=[],h=function(t){var n=void 0;for(var e in ko)No[e](t)&&(n=e);return n?Ho[n]:void 0}(o);h&&p.push(n.createElement(h,{key:"animation",initial:o.initial,animate:o.animate,variants:o.variants,transition:o.transition,controls:r,inherit:c,visualElement:e}));for(var v=0;v<d;v++){var m=l[v],y=m.shouldRender,g=m.key,x=m.Component;y(o,u)&&p.push(n.createElement(x,i({key:g},o,{localContext:a,parentContext:u,visualElement:e,controls:r})))}return p}function ui(t,e){var r=e.useVisualElement,o=e.render,i=e.animationControlsConfig;return n.forwardRef((function(e,a){var s=n.useContext(Cr),u=Vr(e),c=s.static||e.static||!1,f=r(t,e,s.visualElement,c,a);!function(t,n){var e=Ue(Or);for(var r in e){var o=Cn(r)||Sn(r),i=n[r],a=n.style&&n.style[r],s=i&&Mr(n[r]),u=a&&Mr(n.style[r]);(o&&!i&&!a||!o&&!s&&!u)&&(t.removeValue(r),delete e[r])}Tr(t,e,n),n.style&&Tr(t,e,n.style,!0),n.transformValues&&(t.reactStyle=n.transformValues(t.reactStyle))}(f,e);var l=Dr(f,e,i),d=Ar(s,l,f,c,e),p=si(c,f,l,e,d,s,u),h=o(t,e,f);return function(t){var e=n.useContext(oi);wo((function(){ri(e)&&e.remove(t)}))}(f),n.createElement(n.Fragment,null,n.createElement(Cr.Provider,{value:d},h),p)}))}var ci={useVisualElement:function(t,n,e,r,o){var a=Ue((function(){return new($e(t)?Ze:Fe)(e,o)}));a.updateConfig(i({enableHardwareAcceleration:!r},n)),a.layoutId=n.layoutId;var s=Qe();return a.isPresent=void 0!==n.isPresent?n.isPresent:s,a},render:function(t,e,r){var o="string"==typeof t?function(t){var n={};for(var e in t)ir(e)&&(n[e]=t[e]);return n}(e):e;r.clean(),r.build(!0);var a=$e(t)?function(t){return i(i({},t.attrs),{style:i({},t.reactStyle)})}(r):function(t,n){var e=n.drag,r={style:i(i(i({},t.reactStyle),t.style),t.vars)};return e&&(r.style.userSelect="none",r.draggable=!1),r}(r,e);return n.createElement(t,i(i(i({},o),{ref:r.ref}),a))},animationControlsConfig:{makeTargetAnimatable:function(t,n,e,r){var o=function(t,n,e){var r=a(n,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:r,transitionEnd:e};for(var s in e&&(e=i({},e)),t.forEachValue((function(t){var n=t.get();if(sr(n)){var e=cr(n,o);e&&t.set(e)}})),r){var u=r[s];if(sr(u)){var c=cr(u,o);c&&(r[s]=c,e&&void 0===e[s]&&(e[s]=u))}}return{target:r,transitionEnd:e}}(t,n,r);return Er(t,n=o.target,e,r=o.transitionEnd)}}};var fi=new Map;var li=new Proxy({custom:function(t){return ui(t,ci)}},{get:function(t,n){return"custom"===n?t.custom:(fi.has(n)||fi.set(n,ui(n,ci)),fi.get(n))}});var di=0;function pi(){var t=di;return di++,t}var hi=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,s=Ue(vi),u={id:Ue(pi),initial:r,isPresent:o,custom:a,onExitComplete:function(t){s.set(t,!0);var n=!0;s.forEach((function(t){t||(n=!1)})),n&&(null==i||i())},register:function(t){return s.set(t,!1),function(){return s.delete(t)}}};return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.createElement(Ke.Provider,{value:u},e)};function vi(){return new Map}function mi(t){return t.key||""}function yi(t,n){return n&&t!==n.lead?{visibilityAction:Yo.Hide}:n&&t.presence!==Xo.Entering&&t===n.lead&&n.lead!==n.prevLead?{visibilityAction:Yo.Show}:(t.presence===Xo.Entering?e=null==n?void 0:n.getFollowOrigin():t.presence===Xo.Exiting&&(r=null==n?void 0:n.getFollowTarget()),{originBox:e,targetBox:r});var e,r}function gi(t,n){var e,r,o,i={},a=n&&n.lead,s=null==a?void 0:a.presence;return n&&t===a?t.presence===Xo.Entering?i.originBox=n.getFollowOrigin():t.presence===Xo.Exiting&&(i.targetBox=n.getFollowTarget()):n&&t===n.follow&&(i.transition=n.getLeadTransition(),s===Xo.Entering?i.targetBox=n.getLeadTarget():s===Xo.Exiting&&(i.originBox=n.getLeadOrigin())),(null===(e=null==n?void 0:n.follow)||void 0===e?void 0:e.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(n&&t!==a?n&&t===n.follow?a&&s!==Xo.Entering&&s===Xo.Exiting&&(i.crossfadeOpacity=null===(o=null==n?void 0:n.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=Yo.Hide:t.presence===Xo.Entering&&(i.crossfadeOpacity=null===(r=null==n?void 0:n.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var xi=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var n,e=t.config.layoutOrder;if(void 0===e)this.order.push(t);else{var r=this.order.findIndex((function(t){return e<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?Xo.Entering:Xo.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(n=t.getValue(i))||void 0===n||n.set(o[i]):t.addValue(i,en(o[i]))}this.hasChildren=!0},t.prototype.remove=function(t){var n=this.order.findIndex((function(n){return t===n}));-1!==n&&this.order.splice(n,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=function(t,n){for(var e=n[0],r=n[1],o=void 0,i=0,a=void 0,s=t.length,u=!1,c=s-1;c>=0;c--){var f=t[c];if(c===s-1&&(u=f.isPresent),u)o=f;else{var l=t[c-1];l&&l.isPresent&&(o=f)}if(o){i=c;break}}if(o||(o=t[0]),a=t[i-1],o)for(c=i-1;c>=0;c--){if((f=t[c]).isPresent){a=f;break}}return o!==e&&!u&&a===r&&t.find((function(t){return t===e}))&&(o=e),[o,a]}(this.order,[this.lead,this.follow]),n=t[0],e=t[1];this.lead=n,this.follow=e},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(n,e){var r=n.get();Cn(r)||(t.latestMotionValues[e]=r)}));var n=yo.get(this.lead);n&&n.isDragging&&(t.isDragging=!0,t.cursorProgress=n.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==Xo.Exiting},t.prototype.shouldStackAnimate=function(){return!0},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}(),bi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.children=new Set,n.stacks=new Map,n.hasMounted=!1,n.updateScheduled=!1,n.renderScheduled=!1,n.syncContext=i(i({},ei()),{syncUpdate:function(t){return n.scheduleUpdate(t)},forceUpdate:function(){n.syncContext=i({},n.syncContext),n.scheduleUpdate(!0)},register:function(t){return n.addChild(t)},remove:function(t){return n.removeChild(t)}}),n}return o(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var n=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==Xo.Entering&&(t.presence=t.presence===Xo.Exiting?Xo.Entering:Xo.Present):t.presence=Xo.Exiting})),this.updateStacks();var e="crossfade"===n?gi:yi,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(n){var r=n.layoutId;n.layoutReady(e(n,t.getStack(r)))}};this.children.forEach((function(n){return t.syncContext.add(n)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?Xo.Entering:Xo.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var n=this.getStack(t.layoutId);null==n||n.add(t)},e.prototype.removeFromStack=function(t){var n=this.getStack(t.layoutId);null==n||n.remove(t)},e.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new xi),this.stacks.get(t)},e.prototype.render=function(){return n.createElement(oi.Provider,{value:this.syncContext},this.props.children)},e}(n.Component);function Ei(t){return Ue((function(){return en(t)}))}var wi=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Ci(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],a=t[1+r],s=t[2+r],u=t[3+r],c=Jt(a,s,i({mixer:wi(s[0])},u));return e?c(o):c}var Pi=function(t){return"function"==typeof t};function Si(t,e,r,o){var i=Pi(e)?[t]:[t,e.join(","),null==r?void 0:r.join(",")],a=n.useMemo((function(){return Pi(e)?e:Ci(e,r,o)}),i),s=a(t.get()),u=Ei(s),c=n.useRef();return n.useMemo((function(){c.current&&c.current(),c.current=t.onChange((function(t){return u.set(a(t))})),u.set(s)}),[t,u,a]),wo((function(){return c.current&&c.current()})),u}var Ai=function(t){return t>.001?1/t:1e5};function Vi(){return{scrollX:en(0),scrollY:en(0),scrollXProgress:en(0),scrollYProgress:en(0)}}function Mi(t,n,e){e.set(t&&n?t/n:0)}function Ti(t,n){var e=function(){var e=n(),r=e.xOffset,o=e.yOffset,i=e.xMaxOffset,a=e.yMaxOffset;t.scrollX.set(r),t.scrollY.set(o),Mi(r,i,t.scrollXProgress),Mi(o,a,t.scrollYProgress)};return e(),e}var Li="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;var Oi=Vi();function ki(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Bi=!1;var Ri=en(null);if("undefined"!=typeof window)if(window.matchMedia){var Di=window.matchMedia("(prefers-reduced-motion)"),Fi=function(){return Ri.set(Di.matches)};Di.addListener(Fi),Fi()}else Ri.set(!1);function Ii(t,n){return"boolean"==typeof n?n:Boolean(t)}var Ui=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){this.componentControls.forEach((function(e){e.start(t.nativeEvent||t,n)}))},t}(),ji=function(){return new Ui};var Xi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.initialState={},n}return o(n,t),n.prototype.build=function(){},n.prototype.clean=function(){},n.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},n.prototype.readNativeValue=function(t){return this.initialState[t]||0},n.prototype.render=function(){this.build()},n}(rn);t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,u=t.exitBeforeEnter,c=function(){var t=n.useState(0),e=t[0],r=t[1];return n.useCallback((function(){return r(e+1)}),[e])}(),f=n.useContext(oi);ri(f)&&(c=f.forceUpdate);var l=n.useRef(!0),d=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),p=n.useRef(d),h=n.useRef(new Map).current,v=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=mi(t);n.set(e,t)}))}(d,h),l.current)return l.current=!1,n.createElement(n.Fragment,null,d.map((function(t){return n.createElement(hi,{key:mi(t),isPresent:!0,initial:!!i&&void 0},t)})));for(var m=s(d),y=p.current.map(mi),g=d.map(mi),x=y.length,b=0;b<x;b++){var E=y[b];-1===g.indexOf(E)?v.add(E):v.delete(E)}return u&&v.size&&(m=[]),v.forEach((function(t){if(-1===g.indexOf(t)){var e=h.get(t);if(e){var o=y.indexOf(t);m.splice(o,0,n.createElement(hi,{key:mi(e),isPresent:!1,onExitComplete:function(){h.delete(t),v.delete(t);var n=p.current.findIndex((function(n){return n.key===t}));p.current.splice(n,1),v.size||(p.current=d,c(),a&&a())},custom:r},e))}}})),m=m.map((function(t){var e=t.key;return v.has(e)?t:n.createElement(hi,{key:mi(t),isPresent:!0},t)})),p.current=m,n.createElement(n.Fragment,null,v.size?m:m.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=bi,t.AnimationControls=wr,t.DragControls=Ui,t.MotionContext=Cr,t.MotionPluginContext=Fr,t.MotionPlugins=function(t){var e=t.children,r=a(t,["children"]),o=n.useContext(Fr),s=n.useRef(i({},o)).current;for(var u in r)s[u]=r[u];return n.createElement(Fr.Provider,{value:s},e)},t.MotionValue=nn,t.PresenceContext=Ke,t.ReducedMotion=function(t){var e=t.children,r=t.enabled,o=n.useContext(Cr);return o=n.useMemo((function(){return i(i({},o),{isReducedMotion:r})}),[r]),n.createElement(Cr.Provider,{value:o},e)},t.VisualElementAnimationControls=Br,t.addScaleCorrection=function(t){for(var n in t)Ln[n]=t[n]},t.animationControls=function(){return new wr},t.createMotionComponent=ui,t.isValidMotionProp=or,t.motion=li,t.motionValue=en,t.resolveMotionValue=function(t){var n,e=t instanceof nn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.transform=Ci,t.useAnimatedState=function(t){var e=n.useState(t),r=e[0],o=e[1],a=Ue((function(){return new Xi}));a.updateConfig({onUpdate:function(t){return o(i({},t))}}),a.initialState=t;var s=Dr(a,{},{});return n.useEffect((function(){return a.mount({}),function(){return a.unmount()}}),[]),[r,Ue((function(){return function(t){return s.start(t)}}))]},t.useAnimation=function(){var t=Ue((function(){return new wr}));return n.useEffect((function(){return t.mount(),function(){return t.unmount()}}),[]),t},t.useCycle=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=n.useRef(0),o=n.useState(t[r.current]),i=o[0],a=o[1];return[i,function(n){r.current="number"!=typeof n?tn(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDomEvent=Wr,t.useDragControls=function(){return Ue(ji)},t.useElementScroll=function(t){var n=Ue(Vi);return Li((function(){var e=t.current;if(e){var r=Ti(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=zr(e,"scroll",r,{passive:!0}),i=zr(e,"resize",r);return function(){o&&o(),i&&i()}}}),[]),n},t.useExternalRef=function(t){var e=t&&"function"!=typeof t?t:n.useRef(null);return t&&"function"==typeof t&&n.useEffect((function(){return t(e.current),function(){return t(null)}}),[]),e},t.useGestures=Oo,t.useInvertedScale=function(t){var e=Ei(1),r=Ei(1),o=n.useContext(Cr).visualElement;return t?(e=t.scaleX||e,r=t.scaleY||r):o&&(e=o.getValue("scaleX",1),r=o.getValue("scaleY",1)),{scaleX:Si(e,Ai),scaleY:Si(r,Ai)}},t.useIsPresent=Qe,t.useMotionValue=Ei,t.usePanGesture=Co,t.usePresence=Je,t.useReducedMotion=function(){var t=n.useContext(Cr).isReducedMotion,e=n.useState(Ii(Ri.get(),t)),r=e[0],o=e[1];return n.useEffect((function(){return Ri.onChange((function(n){o(Ii(n,t))}))}),[o,t]),r},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useRef(null),o=Ei(Mr(t)?t.get():t);return n.useMemo((function(){return o.attach((function(t,n){return r.current&&r.current.stop(),r.current=se(i({from:o.get(),to:t,velocity:o.getVelocity()},e)).start(n),o.get()}))}),Object.values(e)),function(t,e){n.useEffect((function(){return Mr(t)?t.onChange(e):void 0}),[t])}(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=Mo,t.useTransform=Si,t.useViewportScroll=function(){return Li((function(){!Bi&&function(){if(Bi=!0,"undefined"!=typeof window){var t=Ti(Oi,ki);zr(window,"scroll",t,{passive:!0}),zr(window,"resize",t)}}()}),[]),Oi},Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t=t||self).Motion={},t.React)}(this,(function(t,e){"use strict";var n="default"in e?e.default:e,r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function s(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var u,c=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},f=0,l="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-f));f=e+n,setTimeout((function(){return t(f)}),n)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(u||(u={}));var d=1/60*1e3,p=!0,h=!1,v=!1,m={delta:0,timestamp:0},y=[u.Read,u.Update,u.Render,u.PostRender],g=function(t){return h=t},x=y.reduce((function(t,e){var n=function(t){var e=[],n=[],r=0,o=!1,i=0,a=new WeakSet,s=new WeakSet,u={cancel:function(t){var e=n.indexOf(t);a.add(t),-1!==e&&n.splice(e,1)},process:function(c){var f,l;if(o=!0,e=(f=[n,e])[0],(n=f[1]).length=0,r=e.length)for(i=0;i<r;i++)(l=e[i])(c),!0!==s.has(l)||a.has(l)||(u.schedule(l),t(!0));o=!1},schedule:function(t,i,u){void 0===i&&(i=!1),void 0===u&&(u=!1);var c=u&&o,f=c?e:n;a.delete(t),i&&s.add(t),-1===f.indexOf(t)&&(f.push(t),c&&(r=e.length))}};return u}(g);return t.sync[e]=function(t,e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),h||S(),n.schedule(t,e,r),t},t.cancelSync[e]=function(t){return n.cancel(t)},t.steps[e]=n,t}),{steps:{},sync:{},cancelSync:{}}),b=x.steps,E=x.sync,w=x.cancelSync,C=function(t){return b[t].process(m)},P=function(t){h=!1,m.delta=p?d:Math.max(Math.min(t-m.timestamp,40),1),p||(d=m.delta),m.timestamp=t,v=!0,y.forEach(C),v=!1,h&&(p=!1,l(P))},S=function(){h=!0,p=!0,v||l(P)},A=function(){return m},V=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},T=function(t){return t%1?Number(t.toFixed(5)):t},M=/(-)?(\d[\d\.]*)/g,L=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,k=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,O={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},B=i(i({},O),{transform:V(0,1)}),R=i(i({},O),{default:1}),D=function(t){return{test:function(e){return"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},F=D("deg"),I=D("%"),U=D("px"),j=D("vh"),X=D("vw"),Y=i(i({},I),{parse:function(t){return I.parse(t)/100},transform:function(t){return I.transform(100*t)}}),H=V(0,255),z=function(t){return void 0!==t.red},W=function(t){return void 0!==t.hue};var N=function(t){return function(e){if("string"!=typeof e)return e;for(var n={},r=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}(e).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)n[t[o]]=void 0!==r[o]?parseFloat(r[o]):1;return n}},G=i(i({},O),{transform:function(t){return Math.round(H(t))}});function _(t,e){return t.startsWith(e)&&k.test(t)}var Z={test:function(t){return"string"==typeof t?_(t,"rgb"):z(t)},parse:N(["red","green","blue","alpha"]),transform:function(t){var e=t.red,n=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return function(t){var e=t.red,n=t.green,r=t.blue,o=t.alpha;return"rgba("+e+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(e),green:G.transform(n),blue:G.transform(r),alpha:T(B.transform(i))})}},q={test:function(t){return"string"==typeof t?_(t,"hsl"):W(t)},parse:N(["hue","saturation","lightness","alpha"]),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return function(t){var e=t.hue,n=t.saturation,r=t.lightness,o=t.alpha;return"hsla("+e+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(e),saturation:I.transform(T(n)),lightness:I.transform(T(r)),alpha:T(B.transform(i))})}},$=i(i({},Z),{test:function(t){return"string"==typeof t&&_(t,"#")},parse:function(t){var e="",n="",r="";return t.length>4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),K={test:function(t){return"string"==typeof t&&k.test(t)||z(t)||W(t)},parse:function(t){return Z.test(t)?Z.parse(t):q.test(t)?q.parse(t):$.test(t)?$.parse(t):t},transform:function(t){return z(t)?Z.transform(t):W(t)?q.transform(t):t}},J=function(t){return"number"==typeof t?0:t},Q={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(M),r=t.match(L);return n&&(e+=n.length),r&&(e+=r.length),e>0},parse:function(t){var e=t,n=[],r=e.match(L);r&&(e=e.replace(L,"${c}"),n.push.apply(n,r.map(K.parse)));var o=e.match(M);return o&&n.push.apply(n,o.map(O.parse)),n},createTransformer:function(t){var e=t,n=0,r=t.match(L),o=r?r.length:0;if(r)for(var i=0;i<o;i++)e=e.replace(r[i],"${c}"),n++;var a=e.match(M),s=a?a.length:0;if(a)for(i=0;i<s;i++)e=e.replace(a[i],"${n}"),n++;return function(t){for(var r=e,i=0;i<n;i++)r=r.replace(i<o?"${c}":"${n}",i<o?K.transform(t[i]):T(t[i]));return r}},getAnimatableNone:function(t){var e=Q.parse(t);return Q.createTransformer(t)(e.map(J))}},tt=function(t){return function(e){return 1-t(1-e)}},et=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},nt=tt,rt=et,ot=function(t){return function(e){return Math.pow(e,t)}},it=function(t){return function(e){return e*e*((t+1)*e-t)}},at=function(t){var e=it(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},st=function(t){return t},ut=ot(2),ct=tt(ut),ft=et(ut),lt=function(t){return 1-Math.sin(Math.acos(t))},dt=tt(lt),pt=et(dt),ht=it(1.525),vt=tt(ht),mt=et(ht),yt=at(1.525),gt=function(t){var e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},xt="undefined"!=typeof Float32Array,bt=function(t,e){return 1-3*e+3*t},Et=function(t,e){return 3*e-6*t},wt=function(t){return 3*t},Ct=function(t,e,n){return 3*bt(e,n)*t*t+2*Et(e,n)*t+wt(e)},Pt=function(t,e,n){return((bt(e,n)*t+Et(e,n))*t+wt(e))*t};function St(t,e,n,r){var o=xt?new Float32Array(11):new Array(11),i=function(e){for(var r,i,a,s=0,u=1;10!==u&&o[u]<=e;++u)s+=.1;return--u,r=(e-o[u])/(o[u+1]-o[u]),(a=Ct(i=s+.1*r,t,n))>=.001?function(e,r){for(var o=0,i=0;o<8;++o){if(0===(i=Ct(r,t,n)))return r;r-=(Pt(r,t,n)-e)/i}return r}(e,i):0===a?i:function(e,r,o){var i,a,s=0;do{(i=Pt(a=r+(o-r)/2,t,n)-e)>0?o=a:r=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,s,s+.1)};!function(){for(var e=0;e<11;++e)o[e]=Pt(.1*e,t,n)}();return function(o){return t===e&&n===r?o:0===o?0:1===o?1:Pt(i(o),e,r)}}var At=Object.freeze({__proto__:null,reversed:tt,mirrored:et,createReversedEasing:nt,createMirroredEasing:rt,createExpoIn:ot,createBackIn:it,createAnticipateEasing:at,linear:st,easeIn:ut,easeOut:ct,easeInOut:ft,circIn:lt,circOut:dt,circInOut:pt,backIn:ht,backOut:vt,backInOut:mt,anticipate:yt,bounceOut:gt,bounceIn:function(t){return 1-gt(1-t)},bounceInOut:function(t){return t<.5?.5*(1-gt(1-2*t)):.5*gt(2*t-1)+.5},cubicBezier:St}),Vt={x:0,y:0,z:0},Tt=function(t){return"number"==typeof t},Mt=function(t){return function(e,n,r){return void 0!==r?t(e,n,r):function(r){return t(e,n,r)}}},Lt=Mt((function(t,e,n){return Math.min(Math.max(n,t),e)})),kt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Ot=function(t){return kt(t)&&t.hasOwnProperty("z")},Bt=function(t,e){return Math.abs(t-e)},Rt=function(t,e){if(void 0===e&&(e=Vt),Tt(t)&&Tt(e))return Bt(t,e);if(kt(t)&&kt(e)){var n=Bt(t.x,e.x),r=Bt(t.y,e.y),o=Ot(t)&&Ot(e)?Bt(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Dt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Ft=function(t,e,n){return-n*t+n*e+t},It=function(){return(It=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ut=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},jt=[$,Z,q],Xt=function(t){return jt.find((function(e){return e.test(t)}))},Yt=function(t,e){var n=Xt(t),r=Xt(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),a=It({},o),s=n===q?Ft:Ut;return function(t){for(var e in a)"alpha"!==e&&(a[e]=s(o[e],i[e],t));return a.alpha=Ft(o.alpha,i.alpha,t),n.transform(a)}},Ht=function(t,e){return function(n){return e(t(n))}},zt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ht)};function Wt(t,e){return Tt(t)?function(n){return Ft(t,e,n)}:K.test(t)?Yt(t,e):Zt(t,e)}var Nt=function(t,e){var n=t.slice(),r=n.length,o=t.map((function(t,n){return Wt(t,e[n])}));return function(t){for(var e=0;e<r;e++)n[e]=o[e](t);return n}},Gt=function(t,e){var n=It({},t,e),r={};for(var o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=Wt(t[o],e[o]));return function(t){for(var e in r)n[e]=r[e](t);return n}};function _t(t){for(var e=Q.parse(t),n=e.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"==typeof e[a]?r++:void 0!==e[a].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}var Zt=function(t,e){var n=Q.createTransformer(e),r=_t(t),o=_t(e);return zt(Nt(r.parsed,o.parsed),n)},qt=function(t,e){return function(n){return Ft(t,e,n)}};function $t(t,e,n){for(var r,o=[],i=n||("number"==typeof(r=t[0])?qt:"string"==typeof r?K.test(r)?Yt:Zt:Array.isArray(r)?Nt:"object"==typeof r?Gt:void 0),a=t.length-1,s=0;s<a;s++){var u=i(t[s],t[s+1]);if(e){var c=Array.isArray(e)?e[s]:e;u=zt(c,u)}o.push(u)}return o}function Kt(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,u=t.length;e.length,!a||!Array.isArray(a)||a.length,t[0]>t[u-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=$t(e,a,s),f=2===u?function(t,e){var n=t[0],r=t[1],o=e[0];return function(t){return o(Dt(n,r,t))}}(t,c):function(t,e){var n=t.length,r=n-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(t[s]>o||s===r);s++);i=s-1}var u=Dt(t[i],t[i+1],o);return e[i](u)}}(t,c);return i?zt(Lt(t[0],t[u-1]),f):f}var Jt=function(t,e){return e?t*(1e3/e):0},Qt=Mt((function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t})),te=(Lt(0,1),function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t,n.updateSubscribers&&n.prev!==n.current&&n.updateSubscribers.forEach(n.notifySubscriber),e&&n.renderSubscribers&&n.renderSubscribers.forEach(n.notifySubscriber);var r=A(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,E.postRender(n.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(n.current)},this.scheduleVelocityCheck=function(){return E.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current)},this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.subscribeTo=function(t,e){var n=this,r=function(){return e(n.current)};return t.add(r),function(){return t.delete(r)}},t.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},t.prototype.clearListeners=function(){var t;null===(t=this.updateSubscribers)||void 0===t||t.clear()},t.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Jt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.stop()},t}());function ee(t){return new te(t)}var ne=function(){function t(t,e){var n=this;this.children=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.update=function(){return n.config.onUpdate(n.latest)},this.triggerRender=function(){return n.render()},this.scheduleRender=function(){return E.render(n.triggerRender,!1,!0)},this.ref=function(t){t?n.mount(t):n.unmount(),n.externalRef&&("function"==typeof n.externalRef?n.externalRef(t):c(n.externalRef)&&(n.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?s(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=e}return t.prototype.subscribe=function(t){var e=this;return this.children.add(t),function(){return e.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latest[t]=e.get(),this.element&&this.subscribeToValue(t,e)},t.prototype.removeValue=function(t){var e=this.valueSubscriptions.get(t);e&&e(),this.values.delete(t),delete this.latest[t],this.valueSubscriptions.delete(t)},t.prototype.getValue=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new te(e),this.addValue(t,n)),n},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=i({},t)},t.prototype.setSingleStaticValue=function(t,e){this.latest[t]=e},t.prototype.setStaticValues=function(t,e){if("string"==typeof t)this.setSingleStaticValue(t,e);else for(var n in t)this.setSingleStaticValue(n,t[n])},t.prototype.scheduleUpdateLayoutDelta=function(){E.update(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,e){var n=this,r=e.onChange((function(e){n.setSingleStaticValue(t,e),n.latest[t]=e,n.config.onUpdate&&E.update(n.update,!1,!0)})),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){var e=this;this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t,this.forEachValue((function(t,n){return e.subscribeToValue(n,t)}))},t.prototype.unmount=function(){var t=this;this.forEachValue((function(e,n){return t.removeValue(n)})),w.update(this.update),w.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function re(t){return t}function oe(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function ie(t){return{x:i({},t.x),y:i({},t.y)}}var ae={translate:0,scale:1,origin:0,originPoint:0};function se(){return{x:i({},ae),y:i({},ae)}}var ue=i(i({},O),{transform:Math.round}),ce={color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,size:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:R,scaleX:R,scaleY:R,scaleZ:R,skew:F,skewX:F,skewY:F,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,opacity:B,originX:Y,originY:Y,originZ:U,zIndex:ue,fillOpacity:B,strokeOpacity:B,numOctaves:ue},fe=[O,U,I,F,X,j,{test:function(t){return"auto"===t},parse:function(t){return t}}],le=function(t){return function(e){return e.test(t)}},de=function(t){return fe.find(le(t))},pe=s(fe,[K,Q]),he=function(t){return pe.find(le(t))},ve=function(t){return ce[t]},me=function(t,e){return e&&"number"==typeof t?e.transform(t):t},ye=["","X","Y","Z"],ge=["x","y","z"];function xe(t,e){return ge.indexOf(t)-ge.indexOf(e)}["translate","scale","rotate","skew","transformPerspective"].forEach((function(t){ye.forEach((function(e){return ge.push(t+e)}))}));var be=new Set(ge);function Ee(t){return be.has(t)}var we=new Set(["originX","originY","originZ"]);function Ce(t){return we.has(t)}var Pe={x:"translateX",y:"translateY",z:"translateZ"};function Se(t){return t.startsWith("--")}function Ae(t,e){return t/(e.max-e.min)*100}var Ve={process:function(t,e){return"number"!=typeof t?t:Ae(t,e.x)+"% "+Ae(t,e.y)+"%"}},Te={borderRadius:i(i({},Ve),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomLeftRadius:Ve,borderBottomRightRadius:Ve,boxShadow:{process:function(t,e,n,r){var o=Q.parse(t),i=Q.createTransformer(t),a=n.x.scale*r.x,s=n.y.scale*r.y;o[1]/=a,o[2]/=s;var u=Ft(a,s,.5);return"number"==typeof o[3]&&(o[3]/=u),"number"==typeof o[4]&&(o[4]/=u),i(o)}}};function Me(t,e){return"translate3d("+t.x.translate/e.x+"px, "+t.y.translate/e.y+"px, 0) scale("+t.x.scale+", "+t.y.scale+")"}function Le(t,e,n,r,o,i,a,s,u,c,f,l){var d=a.enableHardwareAcceleration,p=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!!s,m=!!s,y=!0;for(var g in t){var x=t[g],b=ve(g),E=me(x,b);if(Ee(g)){if(v=!0,r[g]=E,i.push(g),!y)continue;x!==(void 0!==b.default?b.default:0)&&(y=!1)}else if(Ce(g))o[g]=E,m=!0;else if("transform"!==g||"function"!=typeof x){var w=Se(g)?n:e;if(s&&Te[g]){var C=Te[g].process(x,l,u,f),P=Te[g].applyTo;if(P)for(var S=P.length,A=0;A<S;A++)w[P[A]]=C;else w[g]=C}else w[g]=E}}if((v||p)&&(s?(e.transform=Me(c,f),p&&(e.transform=p(r,e.transform))):e.transform=function(t,e,n,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="",s=!1;e.sort(xe);for(var u=e.length,c=0;c<u;c++){var f=e[c];a+=(Pe[f]||f)+"("+t[f]+") ","z"===f&&(s=!0)}return!s&&o?a+="translateZ(0)":a=a.trim(),n?a=n(t,r?"":a):i&&r&&(a="none"),a}(r,i,p,y,d,h)),m){var V=s?100*c.x.origin+"%":o.originX||"50%",T=s?100*c.y.origin+"%":o.originY||"50%",M=o.originZ||"0";e.transformOrigin=V+" "+T+" "+M}}function ke(t,e){t.min=e.min,t.max=e.max}function Oe(t,e,n){return n+e*(t-n)}function Be(t,e,n,r,o){return void 0!==o&&(t=Oe(t,o,r)),Oe(t,n,r)+e}function Re(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),t.min=Be(t.min,e,n,r,o),t.max=Be(t.max,e,n,r,o)}function De(t,e){var n=e.x,r=e.y;Re(t.x,n.translate,n.scale,n.originPoint),Re(t.y,r.translate,r.scale,r.originPoint)}function Fe(t,e,n,r){var o=r[0],i=r[1],a=r[2];t.min=e.min,t.max=e.max;var s=Ft(e.min,e.max,n[a]||.5);Re(t,n[o],n[i],s,n.scale)}var Ie=["x","scaleX","originX"],Ue=["y","scaleY","originY"];function je(t,e,n,r,o){return t=Oe(t-=e,1/n,r),void 0!==o&&(t=Oe(t,1/o,r)),t}function Xe(t,e,n){var r=n[0],o=n[1],i=n[2];!function(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=Ft(t.min,t.max,r)-e;t.min=je(t.min,e,n,i,o),t.max=je(t.max,e,n,i,o)}(t,e[r],e[o],e[i],e.scale)}var Ye=Lt(0,1);function He(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Rt(t,e)<n}function ze(t,e){var n=.5,r=t.max-t.min,o=e.max-e.min;return o>r?n=Dt(e.min,e.max-r,t.min):r>o&&(n=Dt(t.min,t.max-o,e.min)),Ye(n)}function We(t,e,n,r){var o=e.max-e.min,i=n.max-n.min;t.origin=void 0===r?ze(e,n):r,t.originPoint=Ft(e.min,e.max,t.origin),t.scale=i/o,He(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,e,n){var r=Ft(t.min,t.max,n);return Ft(e.min,e.max,n)-r}(e,n,t.origin),He(t.translate)&&(t.translate=0)}function Ne(t,e,n,r){We(t.x,e.x,n.x,r),We(t.y,e.y,n.y,r)}function Ge(t){return[t("x"),t("y")]}var _e=function(){return function(t,e){var n=this,r=t.middleware,o=t.onComplete;this.isActive=!0,this.update=function(t){n.observer.update&&n.updateObserver(t)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(t){n.observer.error&&n.isActive&&n.observer.error(t),n.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=o,e.update&&r&&r.length&&r.forEach((function(t){return n.updateObserver=t(n.updateObserver,n.complete)}))}}(),Ze=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.create=function(e){return new t(e)},t.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=(0,r.init)(function(t,e,n){var r=e.middleware;return new _e({middleware:r,onComplete:n},"function"==typeof t?{update:t}:t)}(t,a(r,["init"]),(function(){e=!0,n.stop()})));return n=o?i({},n,o):n,e&&n.stop(),n},t.prototype.applyMiddleware=function(t){return this.create(i({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:zt.apply(void 0,t);return this.applyMiddleware((function(t){return function(e){return t(n(e))}}))},t}(),qe=function(t){return new Ze({init:t})},$e=[U,I,F,j,X],Ke=function(t){return $e.find((function(e){return e.test(t)}))},Je=function(t,e){return t(e)},Qe=function(t,e){var n=e.from,r=e.to,o=a(e,["from","to"]),s=Ke(n)||Ke(r),u=s.transform,c=s.parse;return t(i({},o,{from:"string"==typeof n?c(n):n,to:"string"==typeof r?c(r):r})).pipe(u)},tn=function(t){return function(e,n){var r=n.from,o=n.to,s=a(n,["from","to"]);return e(i({},s,{from:0,to:1})).pipe(t(r,o))}},en=tn(Yt),nn=tn(Zt),rn=function(t,e){var n=function(t){var e=Object.keys(t),n=function(e,n){return void 0!==e&&!t[n](e)};return{getVectorKeys:function(t){return e.reduce((function(e,r){return n(t[r],r)&&e.push(r),e}),[])},testVectorProps:function(t){return t&&e.some((function(e){return n(t[e],e)}))}}}(e),r=n.testVectorProps,o=n.getVectorKeys;return function(e){if(!r(e))return t(e);var n=o(e),i=e[n[0]];return on(i)(t,e,n)}},on=function(t){return"number"==typeof t?Je:function(t){return Boolean(Ke(t))}(t)?Qe:K.test(t)?en:Q.test(t)?nn:Je},an=rn((function(t){return void 0===t&&(t={}),qe((function(e){var n=e.complete,r=e.update,o=t.velocity,i=void 0===o?0:o,a=t.from,s=void 0===a?0:a,u=t.power,c=void 0===u?.8:u,f=t.timeConstant,l=void 0===f?350:f,d=t.restDelta,p=void 0===d?.5:d,h=t.modifyTarget,v=0,m=c*i,y=Math.round(s+m),g=void 0===h?y:h(y),x=E.update((function(t){var e=t.delta;v+=e;var o=-m*Math.exp(-v/l),i=o>p||o<-p;r(i?g+o:g),i||(w.update(x),n())}),!0);return{stop:function(){return w.update(x)}}}))}),{from:O.test,modifyTarget:function(t){return"function"==typeof t},velocity:O.test}),sn=rn((function(t){return void 0===t&&(t={}),qe((function(e){var n=e.update,r=e.complete,o=t.velocity,i=void 0===o?0:o,a=t.from,s=void 0===a?0:a,u=t.to,c=void 0===u?0:u,f=t.stiffness,l=void 0===f?100:f,d=t.damping,p=void 0===d?10:d,h=t.mass,v=void 0===h?1:h,m=t.restSpeed,y=void 0===m?.01:m,g=t.restDelta,x=void 0===g?.01:g,b=i?-i/1e3:0,C=0,P=c-s,S=s,A=S,V=E.update((function(t){var e=t.delta;C+=e;var o=p/(2*Math.sqrt(l*v)),a=Math.sqrt(l/v)/1e3;if(A=S,o<1){var s=Math.exp(-o*a*C),u=a*Math.sqrt(1-o*o);S=c-s*((b+o*a*P)/u*Math.sin(u*C)+P*Math.cos(u*C))}else{s=Math.exp(-a*C);S=c-s*(P+(b+a*P)*C)}i=Jt(S-A,e);var f=Math.abs(i)<=y,d=Math.abs(c-S)<=x;f&&d?(n(S=c),w.update(V),r()):n(S)}),!0);return{stop:function(){return w.update(V)}}}))}),{from:O.test,to:O.test,stiffness:O.test,damping:O.test,mass:O.test,velocity:O.test}),un=rn((function(t){var e=t.from,n=void 0===e?0:e,r=t.velocity,o=void 0===r?0:r,a=t.min,s=t.max,u=t.power,c=void 0===u?.8:u,f=t.timeConstant,l=void 0===f?700:f,d=t.bounceStiffness,p=void 0===d?500:d,h=t.bounceDamping,v=void 0===h?10:h,m=t.restDelta,y=void 0===m?1:m,g=t.modifyTarget;return qe((function(t){var e,r=t.update,u=t.complete,f=n,d=n,h=!1,m=function(t){return void 0!==a&&t<=a},x=function(t){return void 0!==s&&t>=s},b=function(t){return m(t)||x(t)},E=function(t){r(t),f=d,o=Jt((d=t)-f,A().delta),e&&!h&&function(t,e){return m(t)&&e<0||x(t)&&e>0}(t,o)&&C({from:t,velocity:o})},w=function(t,n){e&&e.stop(),e=t.start({update:E,complete:function(){n?n():u()}})},C=function(t){h=!0,w(sn(i({},t,{to:m(t.from)?a:s,stiffness:p,damping:v,restDelta:y})))};if(b(n))C({from:n,velocity:o});else if(0!==o){var P=an({from:n,velocity:o,timeConstant:l,power:c,restDelta:b(n)?20:y,modifyTarget:g});w(P,(function(){b(d)?C({from:d,velocity:o}):u()}))}else u();return{stop:function(){return e&&e.stop()}}}))}),{from:O.test,velocity:O.test,min:O.test,max:O.test,damping:O.test,stiffness:O.test,modifyTarget:function(t){return"function"==typeof t}}),cn=rn((function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,a=void 0===i?st:i,s=t.reverseEase;return void 0!==s&&s&&(a=nt(a)),qe((function(t){var e=t.update;return{seek:function(t){return e(t)}}})).pipe(a,(function(t){return Ft(n,o,t)}))}),{ease:function(t){return"function"==typeof t},from:O.test,to:O.test}),fn=Lt(0,1),ln=function(t){return void 0===t&&(t={}),qe((function(e){var n,r=e.update,o=e.complete,i=t.duration,a=void 0===i?300:i,s=t.ease,u=void 0===s?ct:s,c=t.flip,f=void 0===c?0:c,l=t.loop,d=void 0===l?0:l,p=t.yoyo,h=void 0===p?0:p,v=t.repeatDelay,m=void 0===v?0:v,y=t.from,g=void 0===y?0:y,x=t.to,b=void 0===x?1:x,C=t.elapsed,P=void 0===C?0:C,S=t.flipCount,A=void 0===S?0:S,V=t.yoyoCount,T=void 0===V?0:V,M=t.loopCount,L=void 0===M?0:M,k=cn({from:g,to:b,ease:u}).start(r),O=0,B=!1,R=function(t){var e;void 0===t&&(t=!1),k=cn({from:g=(e=[b,g])[0],to:b=e[1],ease:u,reverseEase:t}).start(r)},D=function(){O=fn(Dt(0,a,P)),k.seek(O)},F=function(){B=!0,n=E.update((function(t){var e,r=t.delta;P+=r,D(),!(e=B&&P>a+m)||(!e||d||f||h)&&(P=P-a-m,d&&L<d?(L++,1):f&&A<f?(A++,R(),1):h&&T<h&&(T++,R(T%2!=0),1))||(w.update(n),o&&E.update(o,!1,!0))}),!0)},I=function(){B=!1,n&&w.update(n)};return F(),{isActive:function(){return B},getElapsed:function(){return Lt(0,a,P)},getProgress:function(){return O},stop:function(){I()},pause:function(){return I(),this},resume:function(){return B||F(),this},seek:function(t){return P=Ft(0,a,t),E.update(D,!1,!0),this},reverse:function(){return R(),this}}}))},dn=Lt(0,1),pn=function(t,e,n){return qe((function(r){var o=r.update,i=e.split(" ").map((function(e){return t.addEventListener(e,o,n),e}));return{stop:function(){return i.forEach((function(e){return t.removeEventListener(e,o,n)}))}}}))},hn=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},vn=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},mn=[hn()];if("undefined"!=typeof document){pn(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(t){var e=t.touches,n=e.length;mn.length=0;for(var r=0;r<n;r++){var o=e[r];mn.push(vn(o))}}))}var yn=hn();if("undefined"!=typeof document){pn(document,"mousedown mousemove",!0).start((function(t){vn(t,yn)}))}var gn=function(t){return qe((function(e){var n=e.complete,r=setTimeout(n,t);return{stop:function(){return clearTimeout(r)}}}))},xn=function(t){return Array.isArray(t)},bn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},En=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},wn=function(){return{ease:"linear",duration:.3}},Cn=function(t){return{type:"keyframes",duration:.8,values:t}},Pn={x:bn,y:bn,z:bn,rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scaleX:En,scaleY:En,scale:En,opacity:wn,backgroundColor:wn,color:wn,default:En},Sn=function(t){var e=t.to,n=t.duration;return qe((function(t){var r=t.update,o=t.complete;r(e),n?gn(n).start({complete:o}):o()}))},An=function(t){return Array.isArray(t)?(t.length,St(t[0],t[1],t[2],t[3])):"string"==typeof t?(At[t],At[t]):t},Vn=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},Tn=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Q.test(e)||e.startsWith("url(")))},Mn=function(t){return 1e3*t},Ln={tween:ln,spring:sn,keyframes:function(t){var e=t.easings,n=t.ease,r=void 0===n?st:n,o=t.times,s=t.values,u=a(t,["easings","ease","times","values"]);e=Array.isArray(e)?e:function(t,e){return t.map((function(){return e||ct})).splice(0,t.length-1)}(s,e),o=o||function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(s);var c=e.map((function(t,e){return cn({from:s[e],to:s[e+1],ease:t})}));return ln(i({},u,{ease:r})).applyMiddleware((function(t){return function(t,e,n){var r=t.length,o=r-1,i=o-1,a=e.map((function(t){return t.start(n)}));return function(e){e<=t[0]&&a[0].seek(0),e>=t[o]&&a[i].seek(1);for(var n=1;n<r&&!(t[n]>e||n===o);n++);var s=Dt(t[n-1],t[n],e);a[n-1].seek(dn(s))}}(o,c,t)}))},inertia:un,just:Sn},kn={tween:function(t){if(t.ease){var e=Vn(t.ease)?t.ease[0]:t.ease;t.ease=An(e)}return t},keyframes:function(t){var e=t.from,n=(t.to,t.velocity,a(t,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=s(n.values);r[0]=e,n.values=r}return n.ease&&(n.easings=Vn(n.ease)?n.ease.map(An):An(n.ease)),n.ease=st,n}},On=function(t,e,n){var r=n?n.delay:0;if(void 0===n||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var e=a(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(e).length}(n))return i({delay:r},function(t,e){var n;return n=xn(e)?Cn:Pn[t]||Pn.default,i({to:e},n(e))}(t,e));var o=n[t]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:xn(e)?e[e.length-1]:e,type:"just"}:xn(e)?i(i({values:e,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):i({type:"tween",to:e,delay:r},o)},Bn=function(t,e,n,r){var o,s=e.get(),u=Tn(t,s),c=Tn(t,n),f=On(t,n,r),l=f.type,d=void 0===l?"tween":l,p=a(f,["type"]),h=u&&c?Ln[d]:Sn,v=function(t,e){return kn[t]?kn[t](e):e}(d,i({from:s,velocity:e.getVelocity()},p));return((o=v).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(v.duration&&(v.duration=Mn(v.duration)),v.repeatDelay&&(v.repeatDelay=Mn(v.repeatDelay))),[h,v]};function Rn(t,e,n,r){void 0===r&&(r={});var o=r.delay,i=void 0===o?0:o,s=a(r,["delay"]);return e.start((function(r){var o,u=Bn(t,e,n,s),c=u[0],f=u[1],l=f.delay,d=a(f,["delay"]);void 0!==l&&(i=l);var p=function(){var t=c(d);o=t.start({update:function(t){return e.set(t)},complete:r})};return i?o=gn(Mn(i)).start({complete:p}):p(),function(){o&&o.stop()}}))}function Dn(t,e){return oe(function(t,e){var n=t.top,r=t.left,o=t.bottom,i=t.right;void 0===e&&(e=re);var a=e({x:r,y:n}),s=e({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var Fn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new Set,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.delta=se(),e.deltaFinal=se(),e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.axisProgress={x:ee(0),y:ee(0)},e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach(In)},e}return o(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=i(i({},this.defaultConfig),t)},e.prototype.read=function(t){return this.getComputedStyle()[t]||0},e.prototype.readNativeValue=function(t){if(Ee(t)){var e=ve(t);return e&&e.default||0}return this.read(t)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){var e=this;return this.layoutUpdateListeners.add(t),function(){return e.layoutUpdateListeners.delete(t)}},e.prototype.layoutReady=function(t){var e=this;this.layoutUpdateListeners.forEach((function(n){n(e.box,e.prevViewportBox||e.box,t)}))},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return Dn(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,n=this.getBoundingBox();return t=n,e=this.latest,Xe(t.x,e,Ie),Xe(t.y,e,Ue),n},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,e=t.x,n=t.y;this.isTargetBoxLocked||e.isAnimating()||n.isAnimating()||(this.targetBox=ie(this.prevViewportBox))},e.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=ie(this.box),this.targetBox||(this.targetBox=ie(this.box))},e.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.setAxisTarget=function(t,e,n){var r=this.targetBox[t];r.min=e,r.max=n,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.startLayoutAxisAnimation=function(t,e){var n=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(e){return n.setAxisTarget(t,e,e+a)})),Rn(t,r,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;Ge((function(e){return t.axisProgress[e].stop()}))},e.prototype.updateLayoutDeltas=function(){var t,e,n,r,o,i,a;n=this.boxCorrected,r=this.box,ke(n.x,r.x),ke(n.y,r.y),this.parent&&(o=this.treeScale,i=this.parent.treeScale,a=this.parent.delta,o.x=i.x*a.x.scale,o.y=i.y*a.y.scale),function(t,e){for(var n=e.length,r=0;r<n;r++)De(t,e[r].delta)}(this.boxCorrected,this.treePath),Ne(this.delta,this.boxCorrected,this.targetBox),this.hasViewportBoxUpdated&&(null===(e=(t=this.config).onViewportBoxUpdate)||void 0===e||e.call(t,this.targetBox,this.delta)),this.hasViewportBoxUpdated=!1;var s=Me(this.delta,this.treeScale);s!==this.deltaTransform&&this.scheduleRender(),this.deltaTransform=s},e.prototype.updateTransformDeltas=function(){var t,e,n;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,e=this.targetBox,n=this.latest,Fe(t.x,e.x,n,Ie),Fe(t.y,e.y,n,Ue),Ne(this.deltaFinal,this.boxCorrected,this.targetBoxFinal))},e.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),Le(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},e}(ne),In=function(t){return t.updateLayoutDelta()};function Un(t){var n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}function jn(t,e,n){return"string"==typeof t?t:U.transform(e+n*t)}var Xn=function(t,e){return U.transform(t*e)},Yn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hn={offset:"strokeDashoffset",array:"strokeDasharray"};var zn={x:0,y:0,width:0,height:0};function Wn(t,e,n,r,o,i,s,u,c,f,l,d,p,h,v){var m=t.attrX,y=t.attrY,g=t.originX,x=t.originY,b=t.pathLength,E=t.pathSpacing,w=void 0===E?1:E,C=t.pathOffset,P=void 0===C?0:C;return Le(a(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n,o,i,s,u,l,d,p,h,v),r.transform&&(e.transform=r.transform,delete r.transform),(void 0!==g||void 0!==x||e.transform)&&(e.transformOrigin=function(t,e,n){return jn(e,t.x,t.width)+" "+jn(n,t.y,t.height)}(c||zn,void 0!==g?g:.5,void 0!==x?x:.5)),void 0!==m&&(r.x=m),void 0!==y&&(r.y=y),void 0!==f&&void 0!==b&&function(t,e,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?Yn:Hn;t[a.offset]=Xn(-o,e);var s=Xn(n,e),u=Xn(r,e);t[a.array]=s+" "+u}(r,f,b,w,P,!1),r}var Nn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),Gn=/([a-z])([A-Z])/g,_n=function(t){return t.replace(Gn,"$1-$2").toLowerCase()},Zn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs={},e.defaultConfig={enableHardwareAcceleration:!1},e.config=e.defaultConfig,e}return o(e,t),e.prototype.mount=function(e){t.prototype.mount.call(this,e),this.measure()},e.prototype.measure=function(){try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength())},e.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},e.prototype.read=function(t){return t=Nn.has(t)?t:_n(t),this.element.getAttribute(t)},e.prototype.build=function(){this.updateTransformDeltas(),Wn(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var e in t.prototype.render.call(this),this.attrs)this.element.setAttribute(_n(e),this.attrs[e])},e}(Fn);var qn=new Set(["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"]);function $n(t){return"string"==typeof t&&qn.has(t)}var Kn=e.createContext(null);function Jn(){var t=e.useContext(Kn);if(null===t)return[!0,null];var n=t.isPresent,r=t.onExitComplete,o=t.register,i=nr();e.useEffect((function(){return o(i)}),[]);return!n&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Qn(){var t=e.useContext(Kn);return null===t||t.isPresent}var tr=0,er=function(){return tr++},nr=function(){return Un(er)},rr=function(t,e,n,r,o){var a=Un((function(){return new($n(t)?Zn:Fn)(n,o)}));a.updateConfig(i({enableHardwareAcceleration:!r},e)),a.layoutId=e.layoutId;var s=Qn();return a.isPresent=void 0!==e.isPresent?e.isPresent:s,a},or=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function ir(t){return or.has(t)}var ar=function(t){return!ir(t)};try{var sr=require("@emotion/is-prop-valid").default;ar=function(t){return t.startsWith("on")?!ir(t):sr(t)}}catch(x){}function ur(t,n,r){var o="string"==typeof t?function(t){var e={};for(var n in t)ar(n)&&(e[n]=t[n]);return e}(n):n;r.clean(),r.build();var a=$n(t)?function(t){return i(i({},t.attrs),{style:i({},t.reactStyle)})}(r):function(t,e){var n=e.drag,r={style:i(i(i({},t.reactStyle),t.style),t.vars)};return n&&(r.style.userSelect="none",r.draggable=!1),r}(r,n);return e.createElement(t,i(i(i({},o),{ref:r.ref}),a))}function cr(t){return"string"==typeof t&&t.startsWith("var(--")}var fr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function lr(t,e,n){var r=function(t){var e=fr.exec(t);return e?[e[1],e[2]]:[,]}(t),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a||(cr(i)?lr(i,e):i)}}var dr,pr=new Set(["width","height","top","left","right","bottom","x","y"]),hr=function(t){return pr.has(t)},vr=function(t,e){t.set(e,!1),t.set(e)},mr=function(t){return t===O||t===U};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(dr||(dr={}));var yr=function(t,e){return parseFloat(t.split(", ")[e])},gr=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return yr(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?yr(a[1],t):0}},xr=new Set(["x","y","z"]),br=ge.filter((function(t){return!xr.has(t)}));var Er={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:gr(4,13),y:gr(5,14)},wr=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=i({},e),r=i({},r);var o=Object.keys(e).filter(hr),a=[],s=!1,u=[];if(o.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var c,f=n[o],l=e[o],d=de(f);if(xn(l))for(var p=l.length,h=null===l[0]?1:0;h<p;h++)c?de(l[h]):c=de(l[h]);else c=de(l);if(d!==c)if(mr(d)&&mr(c)){var v=i.get();"string"==typeof v&&i.set(parseFloat(v)),"string"==typeof l?e[o]=parseFloat(l):Array.isArray(l)&&c===U&&(e[o]=l.map(parseFloat))}else s||(a=function(t){var e=[];return br.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),s=!0),u.push(o),r[o]=void 0!==r[o]?r[o]:e[o],vr(i,l)}})),u.length){var c=function(t,e,n){var r=e.getBoundingBox(),o=e.getComputedStyle(),i=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===i&&e.setStaticValues("display",t.display||"block"),e.render();var s=e.getBoundingBox();return n.forEach((function(n){var i=e.getValue(n);vr(i,Er[n](r,a)),t[n]=Er[n](s,o)})),t}(e,t,u);return a.length&&a.forEach((function(e){var n=e[0],r=e[1];t.getValue(n).set(r)})),t.render(),{target:c,transitionEnd:r}}return{target:e,transitionEnd:r}};function Cr(t,e,n,r){return function(t){return Object.keys(t).some(hr)}(e)?wr(t,e,n,r):{target:e,transitionEnd:r}}var Pr=function(t,e,n,r){var o=function(t,e,n){var r=a(e,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:r,transitionEnd:n};for(var s in n&&(n=i({},n)),t.forEachValue((function(t){var e=t.get();if(cr(e)){var n=lr(e,o);n&&t.set(n)}})),r){var u=r[s];if(cr(u)){var c=lr(u,o);c&&(r[s]=c,n&&void 0===n[s]&&(n[s]=u))}}return{target:r,transitionEnd:n}}(t,e,r);return Cr(t,e=o.target,n,r=o.transitionEnd)};var Sr=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(t){this.variants=t,this.componentControls.forEach((function(e){return e.setVariants(t)}))},t.prototype.setDefaultTransition=function(t){this.defaultTransition=t,this.componentControls.forEach((function(e){return e.setDefaultTransition(t)}))},t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var o=n.start(t,{transitionOverride:e});r.push(o)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[t,e],resolve:r})}))},t.prototype.set=function(t){return this.hasMounted,this.componentControls.forEach((function(e){return e.apply(t)}))},t.prototype.stop=function(){this.componentControls.forEach((function(t){return t.stop()}))},t.prototype.mount=function(){var t=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(e){var n=e.animation,r=e.resolve;return t.start.apply(t,n).then(r)}))},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Ar=e.createContext({static:!1}),Vr=function(t){return"string"==typeof t||Array.isArray(t)},Tr=function(t){return t instanceof Sr},Mr=function(t,n,r,o,i){void 0===o&&(o=!1);var a,s=i.initial,u=i.animate,c=i.variants,f=i.whileTap,l=i.whileHover,d=i.layoutId,p=e.useContext(Kn),h=null==p?void 0:p.id;r.isPresenceRoot=t.presenceId!==h,void 0!==(null==p?void 0:p.initial)&&(s=p.initial),!1!==s||Tr(u)?"boolean"!=typeof s&&(a=s):a=u;var v=e.useRef(!1),m=c||Vr(u)||Vr(f)||Vr(l)||Tr(u),y=Vr(a)?a:t.initial,g=Vr(u)?u:t.animate,x=o?y:null,b=m&&Vr(g)?g:null,E=e.useMemo((function(){return{controls:m?n:t.controls,initial:y,animate:g,visualElement:r,hasMounted:v,isReducedMotion:t.isReducedMotion,presenceId:h}}),[x,b,t.isReducedMotion,u,d,h]);return E.static=o,function(t,n){void 0===n&&(n=!1);var r=e.useRef(!0);(!n||n&&r.current)&&t(),r.current=!1}((function(){var e=a||t.initial;e&&n.apply(e)}),!o),e.useEffect((function(){v.current=!0}),[]),E},Lr=function(t){var e=t.animate,n=t.variants,r=t.inherit;return(void 0===r||r)&&!!n&&(!e||e instanceof Sr)},kr=function(t){return t instanceof te};function Or(t,e,n,r){for(var o in void 0===r&&(r=!1),r&&(t.reactStyle={}),n){var i=n[o],a=!1;if(kr(i))Br.has(o)||(t.addValue(o,i),a=!0);else if(Ee(o)||Ce(o)){if(t.hasValue(o)){if(i!==e[o]){t.getValue(o).set(i)}}else t.addValue(o,ee(i));a=!0}else r&&(t.reactStyle[o]=i);a&&(e[o]=i)}}var Br=new Set([]),Rr=function(){return{}},Dr=function(t){return xn(t)?t[t.length-1]||0:t},Fr=function(){function t(t,e){var n=this,r=e.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!n.visualElement.hasValue(t)},this.visualElement=t,this.makeTargetAnimatable=r,this.visualElement.forEachValue((function(t,e){return n.baseTarget[e]=t.get()}))}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,e){var n=void 0===e?{}:e,r=n.isActive,o=void 0===r?new Set:r,a=n.priority,s=this.resolveVariant(t),u=s.target,c=s.transitionEnd;for(var f in u=this.transformValues(i(i({},u),c))){if(o.has(f))return;if(o.add(f),u){var l=Dr(u[f]);if(this.visualElement.hasValue(f)){var d=this.visualElement.getValue(f);d&&d.set(l)}else this.visualElement.addValue(f,ee(l));a||(this.baseTarget[f]=l)}}},t.prototype.transformValues=function(t){var e=this.props.transformValues;return e?e(t):t},t.prototype.checkForNewValues=function(t){var e=Object.keys(t).filter(this.hasValue),n=e.length;if(n)for(var r=0;r<n;r++){var o=e[r],i=t[o],a=null;if(Array.isArray(i)&&(a=i[0]),null===a){var s=this.visualElement.readNativeValue(o);a=void 0!==s?s:t[o]}"string"==typeof a&&/^\-?\d*\.?\d+$/.test(a)?a=parseFloat(a):!he(a)&&Q.test(i)&&(a=Q.getAnimatableNone(i)),this.visualElement.addValue(o,ee(a)),this.baseTarget[o]=a}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var e,n;"function"==typeof t&&(t=t(this.props.custom,(e=this.visualElement,n={},e.forEachValue((function(t,e){return n[e]=t.get()})),n),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(this.visualElement)));var r=t.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:t.transitionEnd,target:a(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},t.prototype.setOverride=function(t,e){this.overrides[e]=t,this.children&&this.children.forEach((function(n){return n.setOverride(t,e)}))},t.prototype.startOverride=function(t){var e=this.overrides[t];if(e)return this.start(e,{priority:t})},t.prototype.clearOverride=function(t){var e=this;if(this.children&&this.children.forEach((function(e){return e.clearOverride(t)})),this.overrides[t]){this.activeOverrides.delete(t);var n=this.getHighestPriority();if(this.resetIsAnimating(),n)this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[t];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then((function(){return e.onComplete()}))}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(t){var e=this,n=new Set;s(t).reverse().forEach((function(r){var o=e.resolveVariant(e.variants[r]),i=o.target,a=o.transitionEnd;a&&e.setValues(a,{isActive:n}),i&&e.setValues(i,{isActive:n}),e.children&&e.children.size&&e.children.forEach((function(e){return e.applyVariantLabels(t)}))}))},t.prototype.start=function(t,e){var n,r,o=this;return void 0===e&&(e={}),e.priority&&this.activeOverrides.add(e.priority),this.resetIsAnimating(e.priority),r=t,n=Array.isArray(r)?this.animateVariantLabels(t,e):"string"==typeof t?this.animateVariant(t,e):this.animate(t,e),this.onStart(),n.then((function(){return o.onComplete()}))},t.prototype.animate=function(t,e){var n=this,r=void 0===e?{}:e,o=r.delay,a=void 0===o?0:o,s=r.priority,u=void 0===s?0:s,c=r.transitionOverride,f=this.resolveVariant(t),l=f.target,d=f.transition,p=f.transitionEnd;if(c&&(d=c),!l)return Promise.resolve();l=this.transformValues(l),p&&(p=this.transformValues(p)),this.checkForNewValues(l);var h=this.transformValues(function(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=Ir(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(l,d,this.visualElement));if(this.makeTargetAnimatable){var v=this.makeTargetAnimatable(this.visualElement,l,h,p);l=v.target,p=v.transitionEnd}u&&(this.resolvedOverrides[u]=l),this.checkForNewValues(l);var m=[];for(var y in l){var g=this.visualElement.getValue(y);if(g&&l&&void 0!==l[y]){var x=l[y];u||(this.baseTarget[y]=Dr(x)),this.isAnimating.has(y)||(this.isAnimating.add(y),m.push(Rn(y,g,x,i({delay:a},d))))}}var b=Promise.all(m);return p?b.then((function(){n.setValues(p,{priority:u})})):b},t.prototype.animateVariantLabels=function(t,e){var n=this,r=s(t).reverse().map((function(t){return n.animateVariant(t,e)}));return Promise.all(r)},t.prototype.animateVariant=function(t,e){var n=this,r=!1,o=0,i=0,a=1,s=e&&e.priority||0,u=this.variants[t],c=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},f=this.children?function(){return n.animateChildren(t,o,i,a,s)}:function(){return Promise.resolve()};if(u&&this.children){var l=this.resolveVariant(u).transition;l&&(r=l.when||r,o=l.delayChildren||o,i=l.staggerChildren||i,a=l.staggerDirection||a)}if(r){var d="beforeChildren"===r?[c,f]:[f,c],p=d[1];return(0,d[0])().then(p)}return Promise.all([c(),f()])},t.prototype.animateChildren=function(t,e,n,r,o){if(void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var i=[],a=(this.children.size-1)*n,s=1===r?function(t){return t*n}:function(t){return a-t*n};return Array.from(this.children).forEach((function(n,r){var a=n.animateVariant(t,{priority:o,delay:e+s(r)});i.push(a)})),Promise.all(i)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},t.prototype.checkOverrideIsAnimating=function(t){for(var e=this.overrides.length,n=t+1;n<e;n++){var r=this.resolvedOverrides[n];if(r)for(var o in r)this.isAnimating.add(o)}},t.prototype.resetIsAnimating=function(t){void 0===t&&(t=0),this.isAnimating.clear(),t<this.getHighestPriority()&&this.checkOverrideIsAnimating(t),this.children&&this.children.forEach((function(e){return e.resetIsAnimating(t)}))},t.prototype.stop=function(){this.visualElement.forEachValue((function(t){return t.stop()}))},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t),this.overrides.forEach((function(e,n){e&&t.setOverride(e,n)}))},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();function Ir(t,e){if(e)return(e[t]||e.default||e).from}function Ur(t,n,r){var o=Lr(n),i=n.variants,s=n.transition,u=e.useContext(Ar).controls,c=e.useContext(Kn),f=Un((function(){return new Fr(t,r)}));return c&&!c.isPresent||(f.resetChildren(),f.setProps(n),f.setVariants(i),f.setDefaultTransition(s)),e.useEffect((function(){o&&u&&u.addChild(f)})),e.useEffect((function(){return function(){n.onAnimationComplete;var t=a(n,["onAnimationComplete"]);f.setProps(t),u&&u.removeChild(f)}}),[]),f}var jr,Xr,Yr=e.createContext({transformPagePoint:function(t){return t},features:[]});!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(jr||(jr={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(Xr||(Xr={}));var Hr={measureLayout:function(t){return t.measureLayout()},layoutReady:function(t){return t.layoutReady()}},zr=function(t,e){return t.depth-e.depth};function Wr(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var n=void 0===e?Hr:e,r=n.measureLayout,o=n.layoutReady,i=Array.from(t).sort(zr);i.forEach((function(t){return t.resetTransform()})),i.forEach(r),i.forEach(o),i.forEach((function(t){t.isPresent&&(t.presence=jr.Present)})),t.clear()}}}function Nr(t){return!!t.forceUpdate}var Gr=e.createContext(Wr());function _r(t){return e.useEffect((function(){return function(){return t()}}),[])}function Zr(t,n){var r=n.defaultFeatures,o=n.useVisualElement,a=n.render,u=n.animationControlsConfig;return e.forwardRef((function(n,c){var f=e.useContext(Ar),l=Lr(n),d=f.static||n.static||!1,p=o(t,n,f.visualElement,d,c);!function(t,e){var n=Un(Rr);for(var r in n){var o=Ee(r)||Ce(r),i=e[r],a=e.style&&e.style[r],s=i&&kr(e[r]),u=a&&kr(e.style[r]);(o&&!i&&!a||!o&&!s&&!u)&&(t.removeValue(r),delete n[r])}Or(t,n,e),e.style&&Or(t,n,e.style,!0),e.transformValues&&(t.reactStyle=e.transformValues(t.reactStyle))}(p,n);var h=Ur(p,n,u),v=Mr(f,h,p,d,n),m=function(t,n,r,o,a,u,c,f){var l=e.useContext(Yr);if(n||"undefined"==typeof window)return null;for(var d=s(t,l.features),p=d.length,h=[],v=0;v<p;v++){var m=d[v],y=m.shouldRender,g=m.key,x=m.getComponent;if(y(a,c)){var b=x(a);b&&h.push(e.createElement(b,i({key:g},a,{localContext:u,parentContext:c,visualElement:r,controls:o,inherit:f})))}}return h}(r,d,p,h,n,v,f,l),y=a(t,n,p);return function(t){var n=e.useContext(Gr);_r((function(){Nr(n)&&n.remove(t)}))}(p),e.createElement(e.Fragment,null,e.createElement(Ar.Provider,{value:v},y),m)}))}function qr(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var $r=qr("dragHorizontal"),Kr=qr("dragVertical");function Jr(t){var e=!1;if("y"===t)e=Kr();else if("x"===t)e=$r();else{var n=$r(),r=Kr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}var Qr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(t){Qr&&t.preventDefault()}),{passive:!1});var to=function(){return Qr=!1};function eo(t,e,n,r){if(n)return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function no(t,n,r,o){e.useEffect((function(){var e=t.current;if(r&&e)return eo(e,n,r,o)}),[t,n,r,o])}function ro(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function oo(t){return!!t.touches}var io={pageX:0,pageY:0};function ao(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||io;return{x:n[e+"X"],y:n[e+"Y"]}}function so(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function uo(t,e){return void 0===e&&(e="page"),{point:oo(t)?ao(t,e):so(t,e)}}function co(t){return uo(t,"client")}var fo,lo=function(t,e){if(void 0===e&&(e=!1),t){var n=function(e){return t(e,uo(e))};return e?function(t){if(t)return function(e){var n=e instanceof MouseEvent;(!n||n&&0===e.button)&&t(e)}}(n):n}},po="undefined"!=typeof window,ho={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},vo={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function mo(t){return po&&null===window.onpointerdown?t:po&&null===window.ontouchstart?vo[t]:po&&null===window.onmousedown?ho[t]:t}function yo(t,e,n,r){return eo(t,mo(e),lo(n,"pointerdown"===e),r)}function go(t,e,n,r){return no(t,mo(e),lo(n,"pointerdown"===e),r)}!function(t){t.subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.relativeTo=function(t){var e;return function(n){var r=n.x,o=n.y,i=void 0!==e?e:e="string"==typeof t?document.getElementById(t):t;if(i){var a=i.getBoundingClientRect();return{x:r-a.left-window.scrollX,y:o-a.top-window.scrollY}}}}}(fo||(fo={}));var xo=function(){function t(t,e,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=Eo(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=Rt(t.offset,{x:0,y:0})>=3;if(e||n){var o=t.point,a=A().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,u=s.onStart,c=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(oo(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var a=bo(uo(t),this.transformPagePoint),s=a.point,u=A().timestamp;this.history=[i(i({},s),{timestamp:u})];var c=e.onSessionStart;c&&c(t,Eo(a,this.history));var f=yo(window,"pointermove",(function(t,e){return r.handlePointerMove(t,e)})),l=yo(window,"pointerup",(function(t,e){return r.handlePointerUp(t,e)}));this.removeListeners=function(){f&&f(),l&&l()}}}return t.prototype.handlePointerMove=function(t,e){this.lastMoveEvent=t,this.lastMoveEventInfo=bo(e,this.transformPagePoint),ro(t)&&0===t.buttons?this.handlePointerUp(t,e):E.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,e){this.end();var n=this.handlers.onEnd;if(n){var r=Eo(bo(e,this.transformPagePoint),this.history);n&&n(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint),to()},t}();function bo(t,e){return e?{point:e(t.point)}:t}function Eo(t,e){var n=t.point;return{point:n,delta:fo.subtract(n,Co(e)),offset:fo.subtract(n,wo(e)),velocity:Po(e,.1)}}function wo(t){return t[0]}function Co(t){return t[t.length-1]}function Po(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=Co(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>Mn(e)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function So(t,e,n,r,o){var i=t-e*n;return r?function(t,e,n){var r=e.min,o=e.max;return void 0!==r&&t<r?t=n?Ft(r,t,n):Math.max(t,r):void 0!==o&&t>o&&(t=n?Ft(o,t,n):Math.min(t,o)),t}(i,r,o):i}function Ao(t,e,n){var r={},o=t.max-t.min;return void 0!==e&&(r.min=t.min+e),void 0!==n&&(r.max=Math.max(t.min+n-o,t.min)),r}function Vo(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=[o,r])[0],o=n[1]),{min:t.min+r,max:t.min+o}}var To,Mo=new WeakMap,Lo=function(){function t(t){var e=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.cursorProgress={x:.5,y:.5},this.openGlobalLock=null,this.panSession=null,this.visualElement=e,this.visualElement.enableLayoutProjection(),Mo.set(e,this)}return t.prototype.start=function(t,e){var n=this,r=void 0===e?{}:e,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress;i&&this.snapToCursor(t);var s=this.props.transformPagePoint;this.panSession=new xo(t,{onSessionStart:function(){Qr=!0,n.stopMotion()},onStart:function(t,e){var r,o,i=n.props,s=i.drag,u=i.dragPropagation;if(!s||u||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Jr(s),n.openGlobalLock)){n.prepareBoundingBox(),n.visualElement.lockTargetBox(),n.resolveDragConstraints();var c=co(t).point;Ge((function(t){var e=n.visualElement.targetBox[t],r=e.min,o=e.max;n.cursorProgress[t]=a?a[t]:Dt(r,o,c[t])})),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,t,e)}},onMove:function(t,e){var r,o,i,a,s=n.props,u=s.dragPropagation,c=s.dragDirectionLock;if(u||n.openGlobalLock){var f=e.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(f),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t),n.updateAxis("y",t),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,t,e),To=t}},onEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:s})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),e=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=e,this.visualElement.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t=this.props.dragConstraints;this.constraints=!!t&&(c(t)?this.resolveRefConstraints(this.visualElement.box,t):function(t,e){var n=e.top,r=e.left,o=e.bottom,i=e.right;return{x:Ao(t.x,r,i),y:Ao(t.y,n,o)}}(this.visualElement.box,t))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=e.current;this.constraintsBox=Dn(i,o);var a=function(t,e){return{x:Vo(t.x,e.x),y:Vo(t.y,e.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));s&&(a=oe(s))}return a},t.prototype.cancelDrag=function(){to(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,e){var n;this.visualElement.unlockTargetBox(),null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,s=o.onDragEnd;if(i||a){var u=e.velocity;this.animateDragEnd(u)}null==s||s(t,e)}},t.prototype.snapToCursor=function(t){this.prepareBoundingBox(),this.cursorProgress.x=.5,this.cursorProgress.y=.5,this.updateAxis("x",t),this.updateAxis("y",t)},t.prototype.updateAxis=function(t,e){var n,r=this.props,o=r.drag,i=r.dragElastic;if(ko(t,o,this.currentDirection)){var a=this.visualElement.box[t],s=a.max-a.min,u=this.cursorProgress[t],c=So(co(e).point[t],s,u,null===(n=this.constraints)||void 0===n?void 0:n[t],i);this.visualElement.setAxisTarget(t,c,c+s)}},t.prototype.updateProps=function(t){var e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,o=void 0!==r&&r,s=t.dragPropagation,u=void 0!==s&&s,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,d=void 0===l?.35:l,p=t.dragMomentum,h=void 0===p||p,v=a(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:n,dragDirectionLock:o,dragPropagation:u,dragConstraints:f,dragElastic:d,dragMomentum:h},v)},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,u=Ge((function(n){if(ko(n,r,e.currentDirection)){var u=e.constraints?e.constraints[n]:{},c=a?200:1e6,f=a?40:1e7,l=i(i({type:"inertia",velocity:o?t[n]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),u);return e.visualElement.startLayoutAxisAnimation(n,l)}}));return Promise.all(u).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){this.visualElement.stopLayoutAnimation()},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag,r=e.dragConstraints;if(c(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};Ge((function(e){o[e]=ze(t.visualElement.targetBox[e],t.constraintsBox[e])})),this.prepareBoundingBox(),this.resolveDragConstraints(),Ge((function(e){if(ko(e,n,null)){var r=function(t,e,n){var r=t.max-t.min,o=Ft(e.min,e.max-r,n);return{min:o,max:o+r}}(t.visualElement.targetBox[e],t.constraintsBox[e],o[e]),i=r.min,a=r.max;t.visualElement.setAxisTarget(e,i,a)}}))}},t.prototype.mount=function(t){var e=this,n=yo(t.getInstance(),"pointerdown",(function(t){var n=e.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),r=eo(window,"resize",(function(){e.scalePoint()})),o=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(To,{cursorProgress:i.cursorProgress}),function(){null==n||n(),null==r||r(),null==o||o(),e.cancelDrag()}},t}();function ko(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var Oo=function(t){return function(e){return t(e),null}},Bo=Oo((function(t){var n=t.visualElement;return function(t,n){var r=t.dragControls,o=e.useContext(Yr).transformPagePoint,a=Un((function(){return new Lo({visualElement:n})}));a.updateProps(i(i({},t),{transformPagePoint:o})),e.useEffect((function(){return r&&r.subscribe(a)}),[a]),e.useEffect((function(){return a.mount(n)}),[])}(a(t,["visualElement"]),n)})),Ro={key:"drag",shouldRender:function(t){return!!t.drag},getComponent:function(){return Bo}};function Do(t,n){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,s=r||o||i||a,u=e.useRef(null),c=e.useContext(Yr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,e){u.current=null,i&&i(t,e)}};e.useEffect((function(){null!==u.current&&u.current.updateHandlers(f)})),go(n,"pointerdown",s&&function(t){u.current=new xo(t,f,{transformPagePoint:c})}),_r((function(){return u.current&&u.current.end()}))}var Fo=function(t,e){return!!e&&(t===e||Fo(t,e.parentElement))},Io=["whileHover","whileTap","whileDrag"],Uo=function(t){return Io.indexOf(t)+1},jo=Uo("whileTap");function Xo(t,n){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,s=t.controls,u=r||o||i||a,c=e.useRef(!1),f=e.useRef(null);function l(){f.current&&f.current(),f.current=null}a&&s&&s.setOverride(a,jo);var d=e.useRef(null);d.current=function(t,e){var o=n.current;if(l(),c.current&&o){c.current=!1,s&&a&&s.clearOverride(jo);var u=Jr(!0);u&&(u(),Fo(o,t.target)?r&&r(t,e):i&&i(t,e))}},go(n,"pointerdown",u?function(t,e){l(),f.current=yo(window,"pointerup",(function(t,e){return d.current(t,e)})),n.current&&!c.current&&(c.current=!0,o&&o(t,e),s&&a&&s.startOverride(jo))}:void 0),_r(l)}var Yo=Uo("whileHover"),Ho=function(t){return function(e,n){ro(e)&&t(e,n)}};function zo(t,e){Do(t,e),Xo(t,e),function(t,e){var n=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;n&&i&&i.setOverride(n,Yo),go(e,"pointerenter",Ho((function(t,e){r&&r(t,e),n&&i&&i.startOverride(Yo)}))),go(e,"pointerleave",Ho((function(t,e){o&&o(t,e),n&&i&&i.clearOverride(Yo)})))}(t,e)}var Wo,No=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Go=Oo((function(t){var e=t.visualElement;zo(a(t,["visualElement"]),e)})),_o={key:"gestures",shouldRender:function(t){return No.some((function(e){return t.hasOwnProperty(e)}))},getComponent:function(){return Go}},Zo=Oo((function(t){var n=t.animate,r=t.controls,o=t.exit,a=Jn(),s=a[0],u=a[1],c=e.useContext(Kn),f=e.useRef(!1),l=void 0!==(null==c?void 0:c.custom)?c.custom:t.custom;e.useEffect((function(){s?!f.current||!n||"boolean"==typeof n||n instanceof Sr||r.start(n):(!f.current&&o&&(r.setProps(i(i({},t),{custom:l})),r.start(o).then(u)),f.current=!0),s&&(f.current=!1)}),[n,r,l,o,s,u,t])})),qo={key:"exit",shouldRender:function(t){return!!t.exit&&!Lr(t)},getComponent:function(){return Zo}};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(Wo||(Wo={}));function $o(t,e){void 0===e&&(e=!1);t.transition;var n=t.transitionEnd,r=a(t,["transition","transitionEnd"]);return e?i(i({},r),n):r}var Ko,Jo,Qo=function(t){var e,n=t instanceof te?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))};var ti=((Ko={})[Wo.Target]=Oo((function(t){return function(t,n,r,o){var a=e.useRef(!0),s=e.useRef(null);s.current||(s.current=$o(t,!0)),e.useEffect((function(){var e,u,c={},f=$o(t),l=$o(t,!0);for(var d in f){var p=a.current&&(!r.hasValue(d)||r.getValue(d).get()!==l[d]),h=null!==l[d],v=(e=s.current[d],void 0!==(u=l[d])&&(Array.isArray(e)&&Array.isArray(u)?!function(t,e){if(null===e)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(u,e):e!==u));h&&(v||p)&&(c[d]=f[d])}a.current=!1,s.current=i(i({},s.current),l),Object.keys(c).length&&n.start(i(i({},c),{transition:t.transition||o,transitionEnd:t.transitionEnd}))}),[t])}(t.animate,t.controls,t.visualElement,t.transition)})),Ko[Wo.VariantLabel]=Oo((function(t){var n=t.animate,r=t.inherit,o=void 0===r||r,i=t.controls;return function(t,n,r,o){var i=Qo(n),a=e.useContext(Ar),s=a.hasMounted&&a.hasMounted.current,u=e.useRef(!1);e.useEffect((function(){var e,n,c=!1;r?(c=!!s,i=Qo(a.animate)):c=u.current||(e=Qo(t),n=i,e.join(",")!==n.join(",")),c&&o.start(i),u.current=!0}),[i.join(",")])}(t.initial,n,o,i)})),Ko[Wo.AnimationSubscription]=Oo((function(t){return function(t,n){var r=e.useMemo((function(){return t.subscribe(n)}),[t]);e.useEffect((function(){return function(){r&&r()}}),[r])}(t.animate,t.controls)})),Ko),ei=function(t){return t.animate instanceof Sr},ni=["initial","animate","whileTap","whileHover"],ri=((Jo={})[Wo.Target]=function(t){return!(void 0===t.animate||(e=t.animate,Array.isArray(e)||"string"==typeof e)||ei(t));var e},Jo[Wo.VariantLabel]=function(t){return void 0!==t.variants||ni.some((function(e){return"string"==typeof t[e]}))},Jo[Wo.AnimationSubscription]=ei,Jo),oi={key:"animation",shouldRender:function(){return!0},getComponent:function(t){var e=void 0;for(var n in Wo)ri[n](t)&&(e=n);return e?ti[e]:void 0}};var ii=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},e.stopAxisAnimation={x:void 0,y:void 0},e.animate=function(t,n,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,s=r.visibilityAction,u=a(r,["originBox","targetBox","visibilityAction"]),c=e.props,f=c.visualElement,l=c.layout,d=si(n=o||n,t=i||t),p=Ge((function(r){if("position"===l){var o=t[r].max-t[r].min;n[r].max=n[r].min+o}if(!f.isTargetBoxLocked)return void 0===s?d?e.animateAxis(r,t[r],n[r],u):f.setAxisTarget(r,t[r].min,t[r].max):void(s===Xr.Hide?f.hide():f.show())}));return f.render(),Promise.all(p).then((function(){var t,n;null===(n=(t=e.props).onLayoutAnimationComplete)||void 0===n||n.call(t),f.isPresent?f.presence=jr.Present:e.safeToRemove()}))},e}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.visualElement;t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate)},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),Ge((function(e){var n,r;return null===(r=(n=t.stopAxisAnimation)[e])||void 0===r?void 0:r.call(n)}))},e.prototype.animateAxis=function(t,e,n,r){var o,i,a=void 0===r?{}:r,s=a.transition,u=a.crossfadeOpacity;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var c=this.props.visualElement,f=this.frameTarget[t],l=c.axisProgress[t];l.clearListeners(),l.set(0),l.set(0);var d=u&&this.createCrossfadeAnimation(u),p=function(){var r=l.get()/1e3;!function(t,e,n,r){t.min=Ft(e.min,n.min,r),t.max=Ft(e.max,n.max,r)}(f,n,e,r),c.setAxisTarget(t,f.min,f.max),null==d||d(r)};p();var h=Rn("x"===t?"layoutX":"layoutY",l,1e3,s||this.props.transition||ci),v=l.onChange(p);return this.stopAxisAnimation[t]=function(){l.stop(),v()},h},e.prototype.createCrossfadeAnimation=function(t){var e=this.props.visualElement.getValue("opacity",0);return function(n){e.set(li(Ft(0,1,n))),t.set(di(Ft(1,0,n)))}},e.prototype.safeToRemove=function(){var t,e;null===(e=(t=this.props).safeToRemove)||void 0===e||e.call(t)},e.prototype.render=function(){return null},e}(e.Component);function ai(t){var n=Jn()[1];return e.createElement(ii,i({},t,{safeToRemove:n}))}function si(t,e){return ui(t.x,e.x)||ui(t.y,e.y)}function ui(t,e){return t.min!==e.min||t.max!==e.max}var ci={duration:.45,ease:[.4,0,.1,1]};function fi(t,e,n){return function(r){return r<t?0:r>e?1:n(Dt(t,e,r))}}var li=fi(0,.5,dt),di=fi(.5,.95,st),pi={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return ai}},hi=function(t){function e(e){var n=t.call(this,e)||this,r=e.syncLayout;return Nr(r)||(n.componentDidUpdate=function(){return r.flush()}),n}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;Nr(e)&&e.register(n)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return Nr(e)?e.syncUpdate():(n.snapshotBoundingBox(),e.add(n)),null},e.prototype.componentDidUpdate=function(){},e.prototype.render=function(){return null},e}(n.Component);function vi(t){var r=e.useContext(Gr);return n.createElement(hi,i({},t,{syncLayout:r}))}var mi={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return vi}};function yi(t){var e={defaultFeatures:t,useVisualElement:rr,render:ur,animationControlsConfig:{makeTargetAnimatable:Pr}};var n=new Map;return new Proxy({custom:function(t){return Zr(t,e)}},{get:function(t,r){return"custom"===r?t.custom:(n.has(r)||n.set(r,Zr(r,e)),n.get(r))}})}var gi=yi([mi,oi,Ro,_o,qo,pi]),xi=yi([mi]);var bi=0;function Ei(){var t=bi;return bi++,t}var wi=function(t){var n=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,s=Un(Ci),u={id:Un(Ei),initial:r,isPresent:o,custom:a,onExitComplete:function(t){s.set(t,!0);var e=!0;s.forEach((function(t){t||(e=!1)})),e&&(null==i||i())},register:function(t){return s.set(t,!1),function(){return s.delete(t)}}};return e.useMemo((function(){s.forEach((function(t,e){return s.set(e,!1)}))}),[o]),e.createElement(Kn.Provider,{value:u},n)};function Ci(){return new Map}function Pi(t){return t.key||""}function Si(t,e){return e&&t!==e.lead?{visibilityAction:Xr.Hide}:e&&t.presence!==jr.Entering&&t===e.lead&&e.lead!==e.prevLead?{visibilityAction:Xr.Show}:(t.presence===jr.Entering?n=null==e?void 0:e.getFollowOrigin():t.presence===jr.Exiting&&(r=null==e?void 0:e.getFollowTarget()),{originBox:n,targetBox:r});var n,r}function Ai(t,e){var n,r,o,i={},a=e&&e.lead,s=null==a?void 0:a.presence;return e&&t===a?t.presence===jr.Entering?i.originBox=e.getFollowOrigin():t.presence===jr.Exiting&&(i.targetBox=e.getFollowTarget()):e&&t===e.follow&&(i.transition=e.getLeadTransition(),s===jr.Entering?i.targetBox=e.getLeadTarget():s===jr.Exiting&&(i.originBox=e.getLeadOrigin())),(null===(n=null==e?void 0:e.follow)||void 0===n?void 0:n.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(e&&t!==a?e&&t===e.follow?a&&s!==jr.Entering&&s===jr.Exiting&&(i.crossfadeOpacity=null===(o=null==e?void 0:e.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=Xr.Hide:t.presence===jr.Entering&&(i.crossfadeOpacity=null===(r=null==e?void 0:e.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var Vi=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var e,n=t.config.layoutOrder;if(void 0===n)this.order.push(t);else{var r=this.order.findIndex((function(t){return n<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?jr.Entering:jr.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(e=t.getValue(i))||void 0===e||e.set(o[i]):t.addValue(i,ee(o[i]))}this.hasChildren=!0},t.prototype.remove=function(t){var e=this.order.findIndex((function(e){return t===e}));-1!==e&&this.order.splice(e,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=function(t,e){for(var n=e[0],r=e[1],o=void 0,i=0,a=void 0,s=t.length,u=!1,c=s-1;c>=0;c--){var f=t[c];if(c===s-1&&(u=f.isPresent),u)o=f;else{var l=t[c-1];l&&l.isPresent&&(o=f)}if(o){i=c;break}}if(o||(o=t[0]),a=t[i-1],o)for(c=i-1;c>=0;c--){if((f=t[c]).isPresent){a=f;break}}return o!==n&&!u&&a===r&&t.find((function(t){return t===n}))&&(o=n),[o,a]}(this.order,[this.lead,this.follow]),e=t[0],n=t[1];this.lead=e,this.follow=n},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(e,n){var r=e.get();Ee(r)||(t.latestMotionValues[n]=r)}));var e=Mo.get(this.lead);e&&e.isDragging&&(t.isDragging=!0,t.cursorProgress=e.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==jr.Exiting},t.prototype.shouldStackAnimate=function(){return!0},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}(),Ti=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=new Set,e.stacks=new Map,e.hasMounted=!1,e.updateScheduled=!1,e.renderScheduled=!1,e.syncContext=i(i({},Wr()),{syncUpdate:function(t){return e.scheduleUpdate(t)},forceUpdate:function(){e.syncContext=i({},e.syncContext),e.scheduleUpdate(!0)},register:function(t){return e.addChild(t)},remove:function(t){return e.removeChild(t)}}),e}return o(n,t),n.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},n.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},n.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},n.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var e=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==jr.Entering&&(t.presence=t.presence===jr.Exiting?jr.Entering:jr.Present):t.presence=jr.Exiting})),this.updateStacks();var n="crossfade"===e?Ai:Si,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(e){var r=e.layoutId;e.layoutReady(n(e,t.getStack(r)))}};this.children.forEach((function(e){return t.syncContext.add(e)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},n.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},n.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},n.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?jr.Entering:jr.Present},n.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},n.prototype.addToStack=function(t){var e=this.getStack(t.layoutId);null==e||e.add(t)},n.prototype.removeFromStack=function(t){var e=this.getStack(t.layoutId);null==e||e.remove(t)},n.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new Vi),this.stacks.get(t)},n.prototype.render=function(){return e.createElement(Gr.Provider,{value:this.syncContext},this.props.children)},n}(e.Component);function Mi(t){return Un((function(){return ee(t)}))}var Li=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function ki(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!Array.isArray(t[0]),r=n?0:-1,o=t[0+r],a=t[1+r],s=t[2+r],u=t[3+r],c=Kt(a,s,i({mixer:Li(s[0])},u));return n?c(o):c}var Oi=function(t){return"function"==typeof t};function Bi(t,n,r,o){var i=Oi(n)?[t]:[t,n.join(","),null==r?void 0:r.join(",")],a=e.useMemo((function(){return Oi(n)?n:ki(n,r,o)}),i),s=a(t.get()),u=Mi(s),c=e.useRef();return e.useMemo((function(){c.current&&c.current(),c.current=t.onChange((function(t){return u.set(a(t))})),u.set(s)}),[t,u,a]),_r((function(){return c.current&&c.current()})),u}var Ri=function(t){return t>.001?1/t:1e5};function Di(){return{scrollX:ee(0),scrollY:ee(0),scrollXProgress:ee(0),scrollYProgress:ee(0)}}function Fi(t,e,n){n.set(t&&e?t/e:0)}function Ii(t,e){var n=function(){var n=e(),r=n.xOffset,o=n.yOffset,i=n.xMaxOffset,a=n.yMaxOffset;t.scrollX.set(r),t.scrollY.set(o),Fi(r,i,t.scrollXProgress),Fi(o,a,t.scrollYProgress)};return n(),n}var Ui="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;var ji=Di();function Xi(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Yi=!1;var Hi=ee(null);if("undefined"!=typeof window)if(window.matchMedia){var zi=window.matchMedia("(prefers-reduced-motion)"),Wi=function(){return Hi.set(zi.matches)};zi.addListener(Wi),Wi()}else Hi.set(!1);function Ni(t,e){return"boolean"==typeof e?e:Boolean(t)}var Gi=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))},t}(),_i=function(){return new Gi};var Zi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.initialState={},e}return o(e,t),e.prototype.updateLayoutDelta=function(){},e.prototype.build=function(){},e.prototype.clean=function(){},e.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},e.prototype.readNativeValue=function(t){return this.initialState[t]||0},e.prototype.render=function(){this.build()},e}(ne);t.AnimateLayoutFeature=pi,t.AnimatePresence=function(t){var n=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,u=t.exitBeforeEnter,c=function(){var t=e.useState(0),n=t[0],r=t[1];return e.useCallback((function(){return r(n+1)}),[n])}(),f=e.useContext(Gr);Nr(f)&&(c=f.forceUpdate);var l=e.useRef(!0),d=function(t){var n=[];return e.Children.forEach(t,(function(t){e.isValidElement(t)&&n.push(t)})),n}(n),p=e.useRef(d),h=e.useRef(new Map).current,v=e.useRef(new Set).current;if(function(t,e){t.forEach((function(t){var n=Pi(t);e.set(n,t)}))}(d,h),l.current)return l.current=!1,e.createElement(e.Fragment,null,d.map((function(t){return e.createElement(wi,{key:Pi(t),isPresent:!0,initial:!!i&&void 0},t)})));for(var m=s(d),y=p.current.map(Pi),g=d.map(Pi),x=y.length,b=0;b<x;b++){var E=y[b];-1===g.indexOf(E)?v.add(E):v.delete(E)}return u&&v.size&&(m=[]),v.forEach((function(t){if(-1===g.indexOf(t)){var n=h.get(t);if(n){var o=y.indexOf(t);m.splice(o,0,e.createElement(wi,{key:Pi(n),isPresent:!1,onExitComplete:function(){h.delete(t),v.delete(t);var e=p.current.findIndex((function(e){return e.key===t}));p.current.splice(e,1),v.size||(p.current=d,c(),a&&a())},custom:r},n))}}})),m=m.map((function(t){var n=t.key;return v.has(n)?t:e.createElement(wi,{key:Pi(t),isPresent:!0},t)})),p.current=m,e.createElement(e.Fragment,null,v.size?m:m.map((function(t){return e.cloneElement(t)})))},t.AnimateSharedLayout=Ti,t.AnimationControls=Sr,t.AnimationFeature=oi,t.DragControls=Gi,t.DragFeature=Ro,t.ExitFeature=qo,t.GesturesFeature=_o,t.MotionConfig=function(t){var n=t.children,r=t.features,o=void 0===r?[]:r,i=a(t,["children","features"]),u=s(e.useContext(Yr).features,o),c=e.useMemo((function(){return{features:u}}),[u.length]);for(var f in i)c[f]=i[f];return e.createElement(Yr.Provider,{value:c},n)},t.MotionConfigContext=Yr,t.MotionContext=Ar,t.MotionValue=te,t.PresenceContext=Kn,t.ReducedMotion=function(t){var n=t.children,r=t.enabled,o=e.useContext(Ar);return o=e.useMemo((function(){return i(i({},o),{isReducedMotion:r})}),[r]),e.createElement(Ar.Provider,{value:o},n)},t.VisualElementAnimationControls=Fr,t.addScaleCorrection=function(t){for(var e in t)Te[e]=t[e]},t.animationControls=function(){return new Sr},t.createMotionComponent=Zr,t.isValidMotionProp=ir,t.m=xi,t.motion=gi,t.motionValue=ee,t.resolveMotionValue=function(t){var e,n=t instanceof te?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n},t.transform=ki,t.useAnimatedState=function(t){var n=e.useState(t),r=n[0],o=n[1],a=Un((function(){return new Zi}));a.updateConfig({onUpdate:function(t){return o(i({},t))}}),a.initialState=t;var s=Ur(a,{},{});return e.useEffect((function(){return a.mount({}),function(){return a.unmount()}}),[]),[r,Un((function(){return function(t){return s.start(t)}}))]},t.useAnimation=function(){var t=Un((function(){return new Sr}));return e.useEffect((function(){return t.mount(),function(){return t.unmount()}}),[]),t},t.useCycle=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.useRef(0),o=e.useState(t[r.current]),i=o[0],a=o[1];return[i,function(e){r.current="number"!=typeof e?Qt(0,t.length,r.current+1):e,a(t[r.current])}]},t.useDomEvent=no,t.useDragControls=function(){return Un(_i)},t.useElementScroll=function(t){var e=Un(Di);return Ui((function(){var n=t.current;if(n){var r=Ii(e,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(n)),o=eo(n,"scroll",r,{passive:!0}),i=eo(n,"resize",r);return function(){o&&o(),i&&i()}}}),[]),e},t.useExternalRef=function(t){var n=t&&"function"!=typeof t?t:e.useRef(null);return t&&"function"==typeof t&&e.useEffect((function(){return t(n.current),function(){return t(null)}}),[]),n},t.useGestures=zo,t.useInvertedScale=function(t){var n=Mi(1),r=Mi(1),o=e.useContext(Ar).visualElement;return t?(n=t.scaleX||n,r=t.scaleY||r):o&&(n=o.getValue("scaleX",1),r=o.getValue("scaleY",1)),{scaleX:Bi(n,Ri),scaleY:Bi(r,Ri)}},t.useIsPresent=Qn,t.useMotionValue=Mi,t.usePanGesture=Do,t.usePresence=Jn,t.useReducedMotion=function(){var t=e.useContext(Ar).isReducedMotion,n=e.useState(Ni(Hi.get(),t)),r=n[0],o=n[1];return e.useEffect((function(){return Hi.onChange((function(e){o(Ni(e,t))}))}),[o,t]),r},t.useSpring=function(t,n){void 0===n&&(n={});var r=e.useRef(null),o=Mi(kr(t)?t.get():t);return e.useMemo((function(){return o.attach((function(t,e){return r.current&&r.current.stop(),r.current=sn(i({from:o.get(),to:t,velocity:o.getVelocity()},n)).start(e),o.get()}))}),Object.values(n)),function(t,n){e.useEffect((function(){return kr(t)?t.onChange(n):void 0}),[t])}(t,(function(t){return o.set(parseFloat(t))})),o},t.useTapGesture=Xo,t.useTransform=Bi,t.useViewportScroll=function(){return Ui((function(){!Yi&&function(){if(Yi=!0,"undefined"!=typeof window){var t=Ii(ji,Xi);eo(window,"scroll",t,{passive:!0}),eo(window,"resize",t)}}()}),[]),ji},Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "main": "dist/framer-motion.cjs.js",
5
5
  "module": "dist/framer-motion.es.js",
6
6
  "types": "dist/framer-motion.d.ts",
@@ -25,9 +25,10 @@
25
25
  "test-server": "jest --config jest.config.ssr.json",
26
26
  "test-e2e": "start-server-and-test start-dev-server http://localhost:9990 'cypress run'",
27
27
  "test-e2e-ci": "start-server-and-test start-dev-server http://localhost:9990 'cypress run'",
28
- "watch": "jest --watch --coverage --coverageReporters=lcov --config jest.config.json",
28
+ "test-watch": "jest --watch --coverage --coverageReporters=lcov --config jest.config.json",
29
29
  "prettier": "prettier ./src/* --write",
30
30
  "build": "tsc -p . && rollup -c && make api && yarn measure",
31
+ "watch": "concurrently \"tsc --watch -p .\" \"rollup -c -w\"",
31
32
  "prepublishOnly": "yarn test && yarn build",
32
33
  "measure": "gzip -c dist/framer-motion.js | wc -c",
33
34
  "deduplicate": "yarn-deduplicate yarn.lock",
@@ -53,6 +54,7 @@
53
54
  "@typescript-eslint/parser": "^1.5.0",
54
55
  "array-move": "^2.1.0",
55
56
  "cache-loader": "^1.2.5",
57
+ "concurrently": "^5.2.0",
56
58
  "convert-tsconfig-paths-to-webpack-aliases": "^0.9.2",
57
59
  "cypress": "^3.4.0",
58
60
  "eslint": "^5.16.0",
@@ -93,7 +95,7 @@
93
95
  "framesync": "^4.0.4",
94
96
  "hey-listen": "^1.0.8",
95
97
  "popmotion": "9.0.0-beta-8",
96
- "style-value-types": "^3.1.6",
98
+ "style-value-types": "^3.1.9",
97
99
  "tslib": "^1.10.0"
98
100
  },
99
101
  "optionalDependencies": {