/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/popmotion@8.7.6/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),popcorn=require("@popmotion/popcorn"),sync=require("framesync"),sync__default=_interopDefault(sync),styleValueTypes=require("style-value-types"),easing=require("@popmotion/easing"),styler=_interopDefault(require("stylefire")),heyListen=require("hey-listen"),Chainable=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(tslib.__assign(tslib.__assign({},this.props),{middleware:this.props.middleware?tslib.__spreadArrays([t],this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=1===t.length?t[0]:popcorn.pipe.apply(void 0,t);return this.applyMiddleware((function(t){return function(e){return t(r(e))}}))},t.prototype.while=function(t){return this.applyMiddleware((function(e,r){return function(n){return t(n)?e(n):r()}}))},t.prototype.filter=function(t){return this.applyMiddleware((function(e){return function(r){return t(r)&&e(r)}}))},t}(),Observer=function(t,e){var r=this,n=t.middleware,o=t.onComplete;this.isActive=!0,this.update=function(t){r.observer.update&&r.updateObserver(t)},this.complete=function(){r.observer.complete&&r.isActive&&r.observer.complete(),r.onComplete&&r.onComplete(),r.isActive=!1},this.error=function(t){r.observer.error&&r.isActive&&r.observer.error(t),r.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=o,e.update&&n&&n.length&&n.forEach((function(t){return r.updateObserver=t(r.updateObserver,r.complete)}))},createObserver=function(t,e,r){var n=e.middleware;return new Observer({middleware:n,onComplete:r},"function"==typeof t?{update:t}:t)},Action=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tslib.__extends(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,r={stop:function(){}},n=this.props,o=n.init,i=tslib.__rest(n,["init"]),s=o(createObserver(t,i,(function(){e=!0,r.stop()})));return r=s?tslib.__assign(tslib.__assign({},r),s):r,t.registerParent&&t.registerParent(r),e&&r.stop(),r},e}(Chainable),action=function(t){return new Action({init:t})},BaseMulticast=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.subscribers=[],e}return tslib.__extends(e,t),e.prototype.complete=function(){this.subscribers.forEach((function(t){return t.complete()}))},e.prototype.error=function(t){this.subscribers.forEach((function(e){return e.error(t)}))},e.prototype.update=function(t){for(var e=0;e<this.subscribers.length;e++)this.subscribers[e].update(t)},e.prototype.subscribe=function(t){var e=this,r=createObserver(t,this.props);this.subscribers.push(r);var n={unsubscribe:function(){var t=e.subscribers.indexOf(r);-1!==t&&e.subscribers.splice(t,1)}};return n},e.prototype.stop=function(){this.parent&&this.parent.stop()},e.prototype.registerParent=function(t){this.stop(),this.parent=t},e}(Chainable),Multicast=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tslib.__extends(e,t),e.prototype.create=function(t){return new e(t)},e}(BaseMulticast),multicast=function(){return new Multicast},stepProgress=function(t,e){var r=1/(t-1),n=1/(2*(t-1)),o=Math.min(e,1)/n;return Math.floor((o+1)/2)*r},calc=Object.freeze({__proto__:null,angle:popcorn.angle,degreesToRadians:popcorn.degreesToRadians,distance:popcorn.distance,isPoint3D:popcorn.isPoint3D,isPoint:popcorn.isPoint,dilate:popcorn.mix,getValueFromProgress:popcorn.mix,pointFromAngleAndDistance:popcorn.pointFromVector,getProgressFromValue:popcorn.progress,radiansToDegrees:popcorn.radiansToDegrees,smooth:popcorn.smoothFrame,speedPerFrame:popcorn.velocityPerFrame,speedPerSecond:popcorn.velocityPerSecond,stepProgress:stepProgress}),isValueList=function(t){return Array.isArray(t)},isSingleValue=function(t){var e=typeof t;return"string"===e||"number"===e},ValueReaction=function(t){function e(e){var r=t.call(this,e)||this;return r.scheduleVelocityCheck=function(){return sync__default.postRender(r.velocityCheck)},r.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current)},r.prev=r.current=e.value||0,isSingleValue(r.current)?(r.updateCurrent=function(t){return r.current=t},r.getVelocityOfCurrent=function(){return r.getSingleVelocity(r.current,r.prev)}):isValueList(r.current)?(r.updateCurrent=function(t){return r.current=tslib.__spreadArrays(t)},r.getVelocityOfCurrent=function(){return r.getListVelocity()}):(r.updateCurrent=function(t){for(var e in r.current={},t)t.hasOwnProperty(e)&&(r.current[e]=t[e])},r.getVelocityOfCurrent=function(){return r.getMapVelocity()}),e.initialSubscription&&r.subscribe(e.initialSubscription),r}return tslib.__extends(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.getVelocityOfCurrent()},e.prototype.update=function(e){t.prototype.update.call(this,e),this.prev=this.current,this.updateCurrent(e);var r=sync.getFrameData(),n=r.delta,o=r.timestamp;this.timeDelta=n,this.lastUpdated=o,sync__default.postRender(this.scheduleVelocityCheck)},e.prototype.subscribe=function(e){var r=t.prototype.subscribe.call(this,e);return this.subscribers[this.subscribers.length-1].update(this.current),r},e.prototype.getSingleVelocity=function(t,e){return"number"==typeof t&&"number"==typeof e?popcorn.velocityPerSecond(t-e,this.timeDelta):popcorn.velocityPerSecond(parseFloat(t)-parseFloat(e),this.timeDelta)||0},e.prototype.getListVelocity=function(){var t=this;return this.current.map((function(e,r){return t.getSingleVelocity(e,t.prev[r])}))},e.prototype.getMapVelocity=function(){var t={};for(var e in this.current)this.current.hasOwnProperty(e)&&(t[e]=this.getSingleVelocity(this.current[e],this.prev[e]));return t},e}(BaseMulticast),value=function(t,e){return new ValueReaction({value:t,initialSubscription:e})},multi=function(t){var e=t.getCount,r=t.getFirst,n=t.getOutput,o=t.mapApi,i=t.setProp,s=t.startActions;return function(t){return action((function(u){var a=u.update,c=u.complete,p=u.error,l=e(t),f=n(),d=function(){return a(f)},v=0,y=s(t,(function(t,e){var r=!1;return t.start({complete:function(){r||(r=!0,++v===l&&sync__default.update(c))},error:p,update:function(t){i(f,e,t),sync__default.update(d,!1,!0)}})}));return Object.keys(r(y)).reduce((function(t,e){return t[e]=o(y,e),t}),{})}))}},composite=multi({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return Object.keys(t).reduce((function(n,o){var i;return t[o][e]&&(r[0]&&void 0!==r[0][o]?n[o]=t[o][e](r[0][o]):n[o]=(i=t[o])[e].apply(i,r)),n}),{})}},setProp:function(t,e,r){return t[e]=r},startActions:function(t,e){return Object.keys(t).reduce((function(r,n){return r[n]=e(t[n],n),r}),{})}}),parallel=multi({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.map((function(t,n){if(t[e])return Array.isArray(r[0])?t[e](r[0][n]):t[e].apply(t,r)}))}},setProp:function(t,e,r){return t[e]=r},startActions:function(t,e){return t.map((function(t,r){return e(t,r)}))}}),parallel$1=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return parallel(t)},createVectorTests=function(t){var e=Object.keys(t),r=function(e,r){return void 0!==e&&!t[r](e)};return{getVectorKeys:function(t){return e.reduce((function(e,n){return r(t[n],n)&&e.push(n),e}),[])},testVectorProps:function(t){return t&&e.some((function(e){return r(t[e],e)}))}}},unitTypes=[styleValueTypes.px,styleValueTypes.percent,styleValueTypes.degrees,styleValueTypes.vh,styleValueTypes.vw],findUnitType=function(t){return unitTypes.find((function(e){return e.test(t)}))},isUnitProp=function(t){return Boolean(findUnitType(t))},createAction=function(t,e){return t(e)},reduceArrayValue=function(t){return function(e,r){return e[r]=e[r][t],e}},createArrayAction=function(t,e,r){var n=r[0],o=e[n].map((function(n,o){var i=r.reduce(reduceArrayValue(o),tslib.__assign({},e));return getActionCreator(n)(t,i)}));return parallel$1.apply(void 0,o)},reduceObjectValue=function(t){return function(e,r){return e[r]=e[r][t],e}},createObjectAction=function(t,e,r){var n=r[0],o=Object.keys(e[n]).reduce((function(o,i){var s=r.reduce(reduceObjectValue(i),tslib.__assign({},e));return o[i]=getActionCreator(e[n][i])(t,s),o}),{});return composite(o)},createUnitAction=function(t,e){var r=e.from,n=e.to,o=tslib.__rest(e,["from","to"]),i=findUnitType(r)||findUnitType(n),s=i.transform,u=i.parse;return t(tslib.__assign(tslib.__assign({},o),{from:"string"==typeof r?u(r):r,to:"string"==typeof n?u(n):n})).pipe(s)},createMixerAction=function(t){return function(e,r){var n=r.from,o=r.to,i=tslib.__rest(r,["from","to"]);return e(tslib.__assign(tslib.__assign({},i),{from:0,to:1})).pipe(t(n,o))}},createColorAction=createMixerAction(popcorn.mixColor),createComplexAction=createMixerAction(popcorn.mixComplex),createVectorAction=function(t,e){var r=createVectorTests(e),n=r.testVectorProps,o=r.getVectorKeys;return function(e){if(!n(e))return t(e);var r=o(e),i=e[r[0]];return getActionCreator(i)(t,e,r)}},getActionCreator=function(t){return"number"==typeof t?createAction:Array.isArray(t)?createArrayAction:isUnitProp(t)?createUnitAction:styleValueTypes.color.test(t)?createColorAction:styleValueTypes.complex.test(t)?createComplexAction:"object"==typeof t?createObjectAction:createAction},decay=function(t){return void 0===t&&(t={}),action((function(e){var r=e.complete,n=e.update,o=t.velocity,i=void 0===o?0:o,s=t.from,u=void 0===s?0:s,a=t.power,c=void 0===a?.8:a,p=t.timeConstant,l=void 0===p?350:p,f=t.restDelta,d=void 0===f?.5:f,v=t.modifyTarget,y=0,m=c*i,h=u+m,g=void 0===v?h:v(h);g!==h&&(m=g-u);var b=sync__default.update((function(t){var e=t.delta;y+=e;var o=-m*Math.exp(-y/l),i=o>d||o<-d;n(i?g+o:g),i||(sync.cancelSync.update(b),r())}),!0);return{stop:function(){return sync.cancelSync.update(b)}}}))},vectorDecay=createVectorAction(decay,{from:styleValueTypes.number.test,modifyTarget:function(t){return"function"==typeof t},velocity:styleValueTypes.number.test}),spring=function(t){return void 0===t&&(t={}),action((function(e){var r=e.update,n=e.complete,o=t.velocity,i=void 0===o?0:o,s=t.from,u=void 0===s?0:s,a=t.to,c=void 0===a?0:a,p=t.stiffness,l=void 0===p?100:p,f=t.damping,d=void 0===f?10:f,v=t.mass,y=void 0===v?1:v,m=t.restSpeed,h=void 0===m?.01:m,g=t.restDelta,b=void 0===g?.01:g,_=i?-i/1e3:0,x=0,T=c-u,V=u,A=V,P=sync__default.update((function(t){var e=t.delta;x+=e;var o=d/(2*Math.sqrt(l*y)),s=Math.sqrt(l/y)/1e3;if(A=V,o<1){var u=Math.exp(-o*s*x),a=s*Math.sqrt(1-o*o);V=c-u*((_+o*s*T)/a*Math.sin(a*x)+T*Math.cos(a*x))}else{u=Math.exp(-s*x);V=c-u*(T+(_+s*T)*x)}i=popcorn.velocityPerSecond(V-A,e);var p=Math.abs(i)<=h,f=Math.abs(c-V)<=b;p&&f?(r(V=c),sync.cancelSync.update(P),n()):r(V)}),!0);return{stop:function(){return sync.cancelSync.update(P)}}}))},vectorSpring=createVectorAction(spring,{from:styleValueTypes.number.test,to:styleValueTypes.number.test,stiffness:styleValueTypes.number.test,damping:styleValueTypes.number.test,mass:styleValueTypes.number.test,velocity:styleValueTypes.number.test}),inertia=function(t){var e=t.from,r=void 0===e?0:e,n=t.velocity,o=void 0===n?0:n,i=t.min,s=t.max,u=t.power,a=void 0===u?.8:u,c=t.timeConstant,p=void 0===c?700:c,l=t.bounceStiffness,f=void 0===l?500:l,d=t.bounceDamping,v=void 0===d?10:d,y=t.restDelta,m=void 0===y?1:y,h=t.modifyTarget;return action((function(t){var e,n=t.update,u=t.complete,c=r,l=r,d=function(t){return void 0!==i&&t<i||void 0!==s&&t>s},y=function(t){return Math.abs(i-t)<Math.abs(s-t)?i:s},g=function(t,r){e&&e.stop(),e=t.start({update:n,complete:function(){r?r():u()}})},b=function(t){g(spring(tslib.__assign(tslib.__assign({},t),{stiffness:f,damping:v,restDelta:m})))};if(d(r))b({from:r,velocity:o,to:y(r)});else{var _=a*o+r;void 0!==h&&(_=h(_),h=void 0,o=(_-r)/a);var x=decay({from:r,velocity:o,timeConstant:p,power:a,restDelta:m,modifyTarget:h}),T=void 0;if(d(_)){var V=y(_),A=V==i?-1:1;x=x.while((function(t){return c=l,o=popcorn.velocityPerSecond(t-c,sync.getFrameData().delta),l=t,V-t*A>0})),T=function(){return b({from:l,to:V,velocity:o})}}g(x,T)}return{stop:function(){return e&&e.stop()}}}))},index=createVectorAction(inertia,{from:styleValueTypes.number.test,velocity:styleValueTypes.number.test,min:styleValueTypes.number.test,max:styleValueTypes.number.test,damping:styleValueTypes.number.test,stiffness:styleValueTypes.number.test,modifyTarget:function(t){return"function"==typeof t}}),frame=function(){return action((function(t){var e=t.update,r=0,n=sync__default.update((function(t){var n=t.timestamp;r||(r=n),e(n-r)}),!0,!0);return{stop:function(){return sync.cancelSync.update(n)}}}))},scrubber=function(t){var e=t.from,r=void 0===e?0:e,n=t.to,o=void 0===n?1:n,i=t.ease,s=void 0===i?easing.linear:i,u=t.reverseEase;return void 0!==u&&u&&(s=easing.createReversedEasing(s)),action((function(t){var e=t.update;return{seek:function(t){return e(t)}}})).pipe(s,(function(t){return popcorn.mix(r,o,t)}))},vectorScrubber=createVectorAction(scrubber,{ease:function(t){return"function"==typeof t},from:styleValueTypes.number.test,to:styleValueTypes.number.test}),clampProgress=popcorn.clamp(0,1),tween=function(t){return void 0===t&&(t={}),action((function(e){var r,n=e.update,o=e.complete,i=t.duration,s=void 0===i?300:i,u=t.ease,a=void 0===u?easing.easeOut:u,c=t.flip,p=void 0===c?0:c,l=t.loop,f=void 0===l?0:l,d=t.yoyo,v=void 0===d?0:d,y=t.repeatDelay,m=void 0===y?0:y,h=t.from,g=void 0===h?0:h,b=t.to,_=void 0===b?1:b,x=t.elapsed,T=void 0===x?0:x,V=t.flipCount,A=void 0===V?0:V,P=t.yoyoCount,O=void 0===P?0:P,S=t.loopCount,D=void 0===S?0:S,w=vectorScrubber({from:g,to:_,ease:a}).start(n),C=0,M=!1,F=function(t){var e;void 0===t&&(t=!1),w=vectorScrubber({from:g=(e=[_,g])[0],to:_=e[1],ease:a,reverseEase:t}).start(n)},k=function(){C=clampProgress(popcorn.progress(0,s,T)),w.seek(C)},E=function(){M=!0,r=sync__default.update((function(t){var e,n=t.delta;T+=n,k(),!(e=M&&T>s+m)||(!e||f||p||v)&&(T=s-(T-m),f&&D<f?(D++,1):p&&A<p?(A++,F(),1):v&&O<v&&(O++,F(O%2!=0),1))||(sync.cancelSync.update(r),o&&sync__default.update(o,!1,!0))}),!0)},U=function(){M=!1,r&&sync.cancelSync.update(r)};return E(),{isActive:function(){return M},getElapsed:function(){return popcorn.clamp(0,s,T)},getProgress:function(){return C},stop:function(){U()},pause:function(){return U(),this},resume:function(){return M||E(),this},seek:function(t){return T=popcorn.mix(0,s,t),sync__default.update(k,!1,!0),this},reverse:function(){return F(),this}}}))},clampProgress$1=popcorn.clamp(0,1),defaultEasings=function(t,e){return t.map((function(){return e||easing.easeOut})).splice(0,t.length-1)},defaultTimings=function(t){var e=t.length;return t.map((function(t,r){return 0!==r?r/(e-1):0}))},interpolateScrubbers=function(t,e,r){var n=t.length,o=n-1,i=o-1,s=e.map((function(t){return t.start(r)}));return function(e){e<=t[0]&&s[0].seek(0),e>=t[o]&&s[i].seek(1);for(var r=1;r<n&&!(t[r]>e||r===o);r++);var u=popcorn.progress(t[r-1],t[r],e);s[r-1].seek(clampProgress$1(u))}},keyframes=function(t){var e=t.easings,r=t.ease,n=void 0===r?easing.linear:r,o=t.times,i=t.values,s=tslib.__rest(t,["easings","ease","times","values"]);e=Array.isArray(e)?e:defaultEasings(i,e),o=o||defaultTimings(i);var u=e.map((function(t,e){return vectorScrubber({from:i[e],to:i[e+1],ease:t})}));return tween(tslib.__assign(tslib.__assign({},s),{ease:n})).applyMiddleware((function(t){return interpolateScrubbers(o,u,t)}))},physics=function(t){return void 0===t&&(t={}),action((function(e){var r=e.complete,n=e.update,o=t.acceleration,i=void 0===o?0:o,s=t.friction,u=void 0===s?0:s,a=t.velocity,c=void 0===a?0:a,p=t.springStrength,l=t.to,f=t.restSpeed,d=void 0===f?.001:f,v=t.from,y=void 0===v?0:v,m=sync__default.update((function(t){var e=t.delta,o=Math.max(e,16);(i&&(c+=popcorn.velocityPerFrame(i,o)),u&&(c*=Math.pow(1-u,o/100)),void 0!==p&&void 0!==l)&&(c+=(l-y)*popcorn.velocityPerFrame(p,o));y+=popcorn.velocityPerFrame(c,o),n(y),!1!==d&&(!c||Math.abs(c)<=d)&&(sync.cancelSync.update(m),r())}),!0);return{set:function(t){return y=t,this},setAcceleration:function(t){return i=t,this},setFriction:function(t){return u=t,this},setSpringStrength:function(t){return p=t,this},setSpringTarget:function(t){return l=t,this},setVelocity:function(t){return c=t,this},stop:function(){return sync.cancelSync.update(m)}}}))},vectorPhysics=createVectorAction(physics,{acceleration:styleValueTypes.number.test,friction:styleValueTypes.number.test,velocity:styleValueTypes.number.test,from:styleValueTypes.number.test,to:styleValueTypes.number.test,springStrength:styleValueTypes.number.test}),DEFAULT_DURATION=300,flattenTimings=function(t){var e=[],r=t[t.length-1],n="number"==typeof r,o=n?r:0,i=n?t.slice(0,-1):t,s=i.length,u=0;return i.forEach((function(t,r){if(e.push(t),r!==s-1){var n=t.duration||DEFAULT_DURATION;u=o,e.push(""+(u-n))}})),e},flattenArrayInstructions=function(t,e){return Array.isArray(e)?t.push.apply(t,flattenTimings(e)):t.push(e),t},convertDefToProps=function(t,e,r){var n=t.duration,o=t.easings,i=t.times,s=t.values,u=s.length,a=i[u-1],c=0===e.at?0:e.at/n,p=(e.at+e.duration)/n;if(0===r)s.push(e.from),i.push(c);else if(a!==c){void 0!==e.from&&(s.push(s[u-1]),i.push(c),o.push(easing.linear));var l=void 0!==e.from?e.from:s[u-1];s.push(l),i.push(c),o.push(easing.linear)}else void 0!==e.from&&(s.push(e.from),i.push(c),o.push(easing.linear));return s.push(e.to),i.push(p),o.push(e.ease||easing.easeInOut),t},timeline=function(t,e){var r=void 0===e?{}:e,n=r.duration,o=r.elapsed,i=r.ease,s=r.loop,u=r.flip,a=r.yoyo,c=0,p=0,l=t.reduce(flattenArrayInstructions,[]),f=[];l.forEach((function(t){if("string"==typeof t)c+=parseFloat(t);else if("number"==typeof t)c=t;else{var e=tslib.__assign(tslib.__assign({},t),{at:c});e.duration=void 0===e.duration?DEFAULT_DURATION:e.duration,f.push(e),c+=e.duration,p=Math.max(p,e.at+e.duration)}}));for(var d={},v=f.length,y=0;y<v;y++){var m=f[y],h=m.track;if(void 0===h)throw new Error("No track defined");d.hasOwnProperty(h)||(d[h]=[]),d[h].push(m)}var g={};for(var b in d)if(d.hasOwnProperty(b)){var _=d[b].reduce(convertDefToProps,{duration:p,easings:[],times:[],values:[]});g[b]=keyframes(tslib.__assign(tslib.__assign({},_),{duration:n||p,ease:i,elapsed:o,loop:s,yoyo:a,flip:u}))}return composite(g)},listen=function(t,e,r){return action((function(n){var o=n.update,i=e.split(" ").map((function(e){return t.addEventListener(e,o,r),e}));return{stop:function(){return i.forEach((function(e){return t.removeEventListener(e,o,r)}))}}}))},defaultPointerPos=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},eventToPoint=function(t,e){return void 0===e&&(e=defaultPointerPos()),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},points=[defaultPointerPos()],isTouchDevice=!1;if("undefined"!=typeof document){var updatePointsLocation=function(t){var e=t.touches;isTouchDevice=!0;var r=e.length;points.length=0;for(var n=0;n<r;n++){var o=e[n];points.push(eventToPoint(o))}};listen(document,"touchstart touchmove",{passive:!0,capture:!0}).start(updatePointsLocation)}var multitouch=function(t){var e=void 0===t?{}:t,r=e.preventDefault,n=void 0===r||r,o=e.scale,i=void 0===o?1:o,s=e.rotate,u=void 0===s?0:s;return action((function(t){var e=t.update,r={touches:points,scale:i,rotate:u},o=0,s=0,a=points.length>1;if(a){var c=points[0],p=points[1];o=popcorn.distance(c,p),s=popcorn.angle(c,p)}var l=function(){if(a){var t=points[0],n=points[1],c=popcorn.distance(t,n),p=popcorn.angle(t,n);r.scale=i*(c/o),r.rotate=u+(p-s)}e(r)},f=listen(document,"touchmove",{passive:!n}).start((function(t){(n||t.touches.length>1)&&t.preventDefault(),sync__default.update(l)}));return isTouchDevice&&sync__default.update(l),{stop:function(){sync.cancelSync.update(l),f.stop()}}}))},getIsTouchDevice=function(){return isTouchDevice},point=defaultPointerPos(),isMouseDevice=!1;if("undefined"!=typeof document){var updatePointLocation=function(t){isMouseDevice=!0,eventToPoint(t,point)};listen(document,"mousedown mousemove",!0).start(updatePointLocation)}var mouse=function(t){var e=(void 0===t?{}:t).preventDefault,r=void 0===e||e;return action((function(t){var e=t.update,n=function(){return e(point)},o=listen(document,"mousemove").start((function(t){r&&t.preventDefault(),sync__default.update(n)}));return isMouseDevice&&sync__default.update(n),{stop:function(){sync.cancelSync.update(n),o.stop()}}}))},getFirstTouch=function(t){return t[0]},pointer=function(t){return void 0===t&&(t={}),getIsTouchDevice()?multitouch(t).pipe((function(t){return t.touches}),getFirstTouch):mouse(t)},index$1=function(t){void 0===t&&(t={});var e=t.x,r=t.y,n=tslib.__rest(t,["x","y"]);if(void 0!==e||void 0!==r){var o=popcorn.applyOffset(e||0),i=popcorn.applyOffset(r||0),s={x:0,y:0};return pointer(n).pipe((function(t){return s.x=o(t.x),s.y=i(t.y),s}))}return pointer(n)},chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return action((function(e){var r,n=e.update,o=e.complete,i=0,s=function(){r=t[i].start({complete:function(){++i>=t.length?o():s()},update:n})};return s(),{stop:function(){return r&&r.stop()}}}))},crossfade=function(t,e){return action((function(r){var n=0,o=parallel$1(t,e).start(tslib.__assign(tslib.__assign({},r),{update:function(t){var e=t[0],o=t[1];r.update(popcorn.mix(e,o,n))}}));return{setBalance:function(t){return n=t},stop:function(){return o.stop()}}}))},delay=function(t){return action((function(e){var r=e.complete,n=setTimeout(r,t);return{stop:function(){return clearTimeout(n)}}}))},merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return action((function(e){var r=t.map((function(t){return t.start(e)}));return{stop:function(){return r.forEach((function(t){return t.stop()}))}}}))},schedule=function(t,e){return action((function(r){var n,o=r.update,i=r.complete,s=t.start({update:function(){return void 0!==n&&o(n)},complete:i}),u=e.start({update:function(t){return n=t},complete:i});return{stop:function(){s.stop(),u.stop()}}}))},stagger=function(t,e){var r="number"==typeof e,n=t.map((function(t,n){var o=r?e*n:e(n);return chain(delay(o),t)}));return parallel$1.apply(void 0,n)},appendUnit=function(t){return function(e){return""+e+t}},steps=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),function(n){var o=popcorn.progress(e,r,n);return popcorn.mix(e,r,stepProgress(t,o))}},transformMap=function(t){return function(e){var r=tslib.__assign({},e);for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];r[n]=o(e[n])}return r}},transformers=Object.freeze({__proto__:null,applyOffset:popcorn.applyOffset,clamp:popcorn.clamp,conditional:popcorn.conditional,interpolate:popcorn.interpolate,blendArray:popcorn.mixArray,blendColor:popcorn.mixColor,pipe:popcorn.pipe,smooth:popcorn.smooth,snap:popcorn.snap,generateStaticSpring:popcorn.springForce,nonlinearSpring:popcorn.springForceExpo,linearSpring:popcorn.springForceLinear,wrap:popcorn.wrap,appendUnit:appendUnit,steps:steps,transformMap:transformMap}),css=function(t,e){return heyListen.warning(!1,"css() is deprecated, use styler instead"),styler(t,e)},svg=function(t,e){return heyListen.warning(!1,"svg() is deprecated, use styler instead"),styler(t,e)};exports.valueTypes=styleValueTypes,exports.easing=easing,exports.styler=styler,exports.Action=Action,exports.ValueReaction=ValueReaction,exports.action=action,exports.calc=calc,exports.chain=chain,exports.composite=composite,exports.crossfade=crossfade,exports.css=css,exports.decay=vectorDecay,exports.delay=delay,exports.everyFrame=frame,exports.inertia=index,exports.keyframes=keyframes,exports.listen=listen,exports.merge=merge,exports.mouse=mouse,exports.multicast=multicast,exports.multitouch=multitouch,exports.parallel=parallel$1,exports.physics=vectorPhysics,exports.pointer=index$1,exports.schedule=schedule,exports.spring=vectorSpring,exports.stagger=stagger,exports.svg=svg,exports.timeline=timeline,exports.transform=transformers,exports.tween=tween,exports.value=value;
//# sourceMappingURL=/sm/f52cdb772d3feac4fa3f8bba19147f2cea65278c2b102d0252e2d994c2e2edb1.map