Socket
Socket
Sign inDemoInstall

@motionone/dom

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@motionone/dom - npm Package Compare versions

Comparing version 10.13.0 to 10.13.1

4

dist/animate/animate-style.cjs.js

@@ -85,3 +85,5 @@ 'use strict';

*/
if (utils.isFunction(easing$1) && !featureDetection.supports.linearEasing() && valueIsTransform) {
if (valueIsTransform &&
!featureDetection.supports.linearEasing() &&
(utils.isFunction(easing$1) || (utils.isEasingList(easing$1) && easing$1.some(utils.isFunction)))) {
canAnimateNatively = false;

@@ -88,0 +90,0 @@ }

import { getAnimationData, getMotionValue } from './data.es.js';
import { isCssVar, registerCssVariable } from './utils/css-var.es.js';
import { Animation } from '@motionone/animation';
import { defaults, isEasingGenerator, isFunction, isNumber, time, isEasingList, noop } from '@motionone/utils';
import { defaults, isEasingGenerator, isFunction, isEasingList, isNumber, time, noop } from '@motionone/utils';
import { isTransform, addTransformToElement, transformDefinitions } from './utils/transforms.es.js';

@@ -81,3 +81,5 @@ import { convertEasing } from './utils/easing.es.js';

*/
if (isFunction(easing) && !supports.linearEasing() && valueIsTransform) {
if (valueIsTransform &&
!supports.linearEasing() &&
(isFunction(easing) || (isEasingList(easing) && easing.some(isFunction)))) {
canAnimateNatively = false;

@@ -84,0 +86,0 @@ }

@@ -1,1 +0,1 @@

class t{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const e=new WeakMap;function i(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const a=(t,e,i)=>Math.min(Math.max(i,t),e),n={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},s=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!s(t[0]);const o=(t,e,i)=>-i*t+i*e+t,l=()=>{},h=t=>t,c=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function u(t,e){const i=t[t.length-1];for(let a=1;a<=e;a++){const n=c(0,e,a);t.push(o(i,1,n))}}function d(t,e=function(t){const e=[0];return u(e,t-1),e}(t.length),i=h){const n=t.length,s=n-e.length;return s>0&&u(e,s),s=>{let l=0;for(;l<n-2&&!(s<e[l+1]);l++);let h=a(0,1,c(e[l],e[l+1],s));const u=function(t,e){return r(t)?t[((t,e,i)=>{const a=e-t;return((i-t)%a+a)%a+t})(0,t.length,e)]:t}(i,l);return h=u(h),o(t[l],t[l+1],h)}}const f=t=>"object"==typeof t&&Boolean(t.createAnimation),p=t=>"function"==typeof t,m=t=>1e3*t,y=["","X","Y","Z"],g={x:"translateX",y:"translateY",z:"translateZ"},v={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},T={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:v,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:h},skew:v},S=new Map,w=t=>`--motion-${t}`,D=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{y.forEach((e=>{D.push(t+e),S.set(w(t+e),T[t])}))}));const A=(t,e)=>D.indexOf(t)-D.indexOf(e),x=new Set(D),b=t=>x.has(t),k=t=>t.sort(A).reduce(M,"").trim(),M=(t,e)=>`${t} ${e}(var(${w(e)}))`,O=t=>t.startsWith("--"),R=new Set;const P=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function E(t,e,i,a){if(t===e&&i===a)return h;const n=e=>function(t,e,i,a,n){let s,r,o=0;do{r=e+(i-e)/2,s=P(r,a,n)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:P(n(t),e,a)}const V={ease:E(.25,.1,.25,1),"ease-in":E(.42,0,1,1),"ease-in-out":E(.42,0,.58,1),"ease-out":E(0,0,.58,1)},$=/\((.*?)\)/;function j(t){if(p(t))return t;if(Array.isArray(t))return E(...t);if(V[t])return V[t];if(t.startsWith("steps")){const e=$.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const n=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(n):Math.ceil(n);return a(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return h}class q{constructor(t,e=[0,1],{easing:i,duration:a=n.duration,delay:s=n.delay,endDelay:o=n.endDelay,repeat:l=n.repeat,offset:c,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=h,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||n.easing,f(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(a=t.duration)}this.repeat=l,this.easing=r(i)?h:j(i),this.updateDuration(a);const p=d(e,c,r(i)?i.map(j):h);this.tick=e=>{var i;let a=0;a=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=a,a/=1e3,a=Math.max(a-s,0),"finished"===this.playState&&void 0===this.pauseTime&&(a=this.totalDuration);const n=a/this.duration;let r=Math.floor(n),l=n%1;!l&&n>=1&&(l=1),1===l&&r--;const h=r%2;("reverse"===u||"alternate"===u&&h||"alternate-reverse"===u&&!h)&&(l=1-l);const c=a>=this.totalDuration?1:Math.min(l,1),d=p(this.easing(c));t(d);void 0===this.pauseTime&&("finished"===this.playState||a>=this.totalDuration+o)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,d)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const F=(t,e)=>document.createElement("div").animate(t,e),U={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{F({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(F({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{F({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},C={},I={};for(const t in U)I[t]=()=>(void 0===C[t]&&(C[t]=U[t]()),C[t]);const _=(t,e)=>p(t)?I.linearEasing()?`linear(${((t,e)=>{let i="";const a=Math.round(e/.015);for(let e=0;e<a;e++)i+=t(c(0,a-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:n.easing:(t=>Array.isArray(t)&&s(t[0]))(t)?W(t):t,W=([t,e,i,a])=>`cubic-bezier(${t}, ${e}, ${i}, ${a})`;function z(t){return g[t]&&(t=g[t]),b(t)?w(t):t}const B=(t,e)=>{e=z(e);let i=O(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=S.get(e);t&&(i=t.initialValue)}return i},K=(t,e,i)=>{e=z(e),O(e)?t.style.setProperty(e,i):t.style[e]=i};function X(e,a,o,h={}){const c=window.__MOTION_DEV_TOOLS_RECORD,u=!1!==h.record&&c;let d,{duration:y=n.duration,delay:v=n.delay,endDelay:T=n.endDelay,repeat:w=n.repeat,easing:D=n.easing,direction:A,offset:x,allowWebkitAcceleration:M=!1}=h;const P=i(e),E=b(a);let V=I.waapi();E&&((t,e)=>{g[e]&&(e=g[e]);const{transforms:a}=i(t);var n,s;s=e,-1===(n=a).indexOf(s)&&n.push(s),t.style.transform=k(a)})(e,a);const $=z(a),j=function(e,i){return e.has(i)||e.set(i,new t),e.get(i)}(P.values,$),F=S.get($);return function(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}(j.animation,!(f(D)&&j.generator)&&!1!==h.record),()=>{const t=()=>{var t,i;return null!==(i=null!==(t=B(e,$))&&void 0!==t?t:null==F?void 0:F.initialValue)&&void 0!==i?i:0};let i=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(o),t);if(f(D)){const e=D.createAnimation(i,t,E,$,j);D=e.easing,void 0!==e.keyframes&&(i=e.keyframes),void 0!==e.duration&&(y=e.duration)}if(O($)&&(I.cssRegisterProperty()?function(t){if(!R.has(t)){R.add(t);try{const{syntax:e,initialValue:i}=S.has(t)?S.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}($):V=!1),p(D)&&!I.linearEasing()&&E&&(V=!1),V){F&&(i=i.map((t=>s(t)?F.toDefaultUnit(t):t))),1!==i.length||I.partialKeyframes()&&!u||i.unshift(t());const a={delay:m(v),duration:m(y),endDelay:m(T),easing:r(D)?void 0:_(D,y),direction:A,iterations:w+1,fill:"both"};d=e.animate({[$]:i,offset:x,easing:r(D)?D.map((t=>_(t,y))):void 0},a),d.finished||(d.finished=new Promise(((t,e)=>{d.onfinish=t,d.oncancel=e})));const n=i[i.length-1];d.finished.then((()=>{K(e,$,n),d.cancel()})).catch(l),M||(d.playbackRate=1.000001)}else if(E){i=i.map((t=>"string"==typeof t?parseFloat(t):t)),1===i.length&&i.unshift(parseFloat(t()));d=new q((t=>{F&&(t=F.toDefaultUnit(t)),K(e,$,t)}),i,Object.assign(Object.assign({},h),{duration:y,easing:D}))}else{const t=i[i.length-1];K(e,$,F&&s(t)?F.toDefaultUnit(t):t)}return u&&c(e,a,i,{duration:y,delay:v,easing:D,repeat:w,offset:x},"motion-one"),j.setAnimation(d),d}}export{X as animateStyle};
class t{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const e=new WeakMap;function i(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const a=(t,e,i)=>Math.min(Math.max(i,t),e),n={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},s=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!s(t[0]);const o=(t,e,i)=>-i*t+i*e+t,l=()=>{},h=t=>t,c=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function u(t,e){const i=t[t.length-1];for(let a=1;a<=e;a++){const n=c(0,e,a);t.push(o(i,1,n))}}function d(t,e=function(t){const e=[0];return u(e,t-1),e}(t.length),i=h){const n=t.length,s=n-e.length;return s>0&&u(e,s),s=>{let l=0;for(;l<n-2&&!(s<e[l+1]);l++);let h=a(0,1,c(e[l],e[l+1],s));const u=function(t,e){return r(t)?t[((t,e,i)=>{const a=e-t;return((i-t)%a+a)%a+t})(0,t.length,e)]:t}(i,l);return h=u(h),o(t[l],t[l+1],h)}}const f=t=>"object"==typeof t&&Boolean(t.createAnimation),p=t=>"function"==typeof t,m=t=>1e3*t,y=["","X","Y","Z"],g={x:"translateX",y:"translateY",z:"translateZ"},v={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},T={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:v,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:h},skew:v},S=new Map,w=t=>`--motion-${t}`,D=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{y.forEach((e=>{D.push(t+e),S.set(w(t+e),T[t])}))}));const A=(t,e)=>D.indexOf(t)-D.indexOf(e),x=new Set(D),b=t=>x.has(t),k=t=>t.sort(A).reduce(M,"").trim(),M=(t,e)=>`${t} ${e}(var(${w(e)}))`,O=t=>t.startsWith("--"),R=new Set;const P=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function E(t,e,i,a){if(t===e&&i===a)return h;const n=e=>function(t,e,i,a,n){let s,r,o=0;do{r=e+(i-e)/2,s=P(r,a,n)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:P(n(t),e,a)}const V={ease:E(.25,.1,.25,1),"ease-in":E(.42,0,1,1),"ease-in-out":E(.42,0,.58,1),"ease-out":E(0,0,.58,1)},$=/\((.*?)\)/;function j(t){if(p(t))return t;if(Array.isArray(t))return E(...t);if(V[t])return V[t];if(t.startsWith("steps")){const e=$.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const n=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(n):Math.ceil(n);return a(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return h}class q{constructor(t,e=[0,1],{easing:i,duration:a=n.duration,delay:s=n.delay,endDelay:o=n.endDelay,repeat:l=n.repeat,offset:c,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=h,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||n.easing,f(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(a=t.duration)}this.repeat=l,this.easing=r(i)?h:j(i),this.updateDuration(a);const p=d(e,c,r(i)?i.map(j):h);this.tick=e=>{var i;let a=0;a=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=a,a/=1e3,a=Math.max(a-s,0),"finished"===this.playState&&void 0===this.pauseTime&&(a=this.totalDuration);const n=a/this.duration;let r=Math.floor(n),l=n%1;!l&&n>=1&&(l=1),1===l&&r--;const h=r%2;("reverse"===u||"alternate"===u&&h||"alternate-reverse"===u&&!h)&&(l=1-l);const c=a>=this.totalDuration?1:Math.min(l,1),d=p(this.easing(c));t(d);void 0===this.pauseTime&&("finished"===this.playState||a>=this.totalDuration+o)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,d)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const F=(t,e)=>document.createElement("div").animate(t,e),U={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{F({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(F({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{F({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},C={},I={};for(const t in U)I[t]=()=>(void 0===C[t]&&(C[t]=U[t]()),C[t]);const _=(t,e)=>p(t)?I.linearEasing()?`linear(${((t,e)=>{let i="";const a=Math.round(e/.015);for(let e=0;e<a;e++)i+=t(c(0,a-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:n.easing:(t=>Array.isArray(t)&&s(t[0]))(t)?W(t):t,W=([t,e,i,a])=>`cubic-bezier(${t}, ${e}, ${i}, ${a})`;function z(t){return g[t]&&(t=g[t]),b(t)?w(t):t}const B=(t,e)=>{e=z(e);let i=O(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=S.get(e);t&&(i=t.initialValue)}return i},K=(t,e,i)=>{e=z(e),O(e)?t.style.setProperty(e,i):t.style[e]=i};function X(e,a,o,h={}){const c=window.__MOTION_DEV_TOOLS_RECORD,u=!1!==h.record&&c;let d,{duration:y=n.duration,delay:v=n.delay,endDelay:T=n.endDelay,repeat:w=n.repeat,easing:D=n.easing,direction:A,offset:x,allowWebkitAcceleration:M=!1}=h;const P=i(e),E=b(a);let V=I.waapi();E&&((t,e)=>{g[e]&&(e=g[e]);const{transforms:a}=i(t);var n,s;s=e,-1===(n=a).indexOf(s)&&n.push(s),t.style.transform=k(a)})(e,a);const $=z(a),j=function(e,i){return e.has(i)||e.set(i,new t),e.get(i)}(P.values,$),F=S.get($);return function(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}(j.animation,!(f(D)&&j.generator)&&!1!==h.record),()=>{const t=()=>{var t,i;return null!==(i=null!==(t=B(e,$))&&void 0!==t?t:null==F?void 0:F.initialValue)&&void 0!==i?i:0};let i=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(o),t);if(f(D)){const e=D.createAnimation(i,t,E,$,j);D=e.easing,void 0!==e.keyframes&&(i=e.keyframes),void 0!==e.duration&&(y=e.duration)}if(O($)&&(I.cssRegisterProperty()?function(t){if(!R.has(t)){R.add(t);try{const{syntax:e,initialValue:i}=S.has(t)?S.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}($):V=!1),E&&!I.linearEasing()&&(p(D)||r(D)&&D.some(p))&&(V=!1),V){F&&(i=i.map((t=>s(t)?F.toDefaultUnit(t):t))),1!==i.length||I.partialKeyframes()&&!u||i.unshift(t());const a={delay:m(v),duration:m(y),endDelay:m(T),easing:r(D)?void 0:_(D,y),direction:A,iterations:w+1,fill:"both"};d=e.animate({[$]:i,offset:x,easing:r(D)?D.map((t=>_(t,y))):void 0},a),d.finished||(d.finished=new Promise(((t,e)=>{d.onfinish=t,d.oncancel=e})));const n=i[i.length-1];d.finished.then((()=>{K(e,$,n),d.cancel()})).catch(l),M||(d.playbackRate=1.000001)}else if(E){i=i.map((t=>"string"==typeof t?parseFloat(t):t)),1===i.length&&i.unshift(parseFloat(t()));d=new q((t=>{F&&(t=F.toDefaultUnit(t)),K(e,$,t)}),i,Object.assign(Object.assign({},h),{duration:y,easing:D}))}else{const t=i[i.length-1];K(e,$,F&&s(t)?F.toDefaultUnit(t):t)}return u&&c(e,a,i,{duration:y,delay:v,easing:D,repeat:w,offset:x},"motion-one"),j.setAnimation(d),d}}export{X as animateStyle};

@@ -1,1 +0,1 @@

class t{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const e=new WeakMap;function i(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const n=(t,e,i)=>Math.min(Math.max(i,t),e),a={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},s=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!s(t[0]);const o=(t,e,i)=>-i*t+i*e+t,l=()=>{},c=t=>t,u=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function h(t,e){const i=t[t.length-1];for(let n=1;n<=e;n++){const a=u(0,e,n);t.push(o(i,1,a))}}function d(t,e=function(t){const e=[0];return h(e,t-1),e}(t.length),i=c){const a=t.length,s=a-e.length;return s>0&&h(e,s),s=>{let l=0;for(;l<a-2&&!(s<e[l+1]);l++);let c=n(0,1,u(e[l],e[l+1],s));const h=function(t,e){return r(t)?t[((t,e,i)=>{const n=e-t;return((i-t)%n+n)%n+t})(0,t.length,e)]:t}(i,l);return c=h(c),o(t[l],t[l+1],c)}}const f=t=>"object"==typeof t&&Boolean(t.createAnimation),m=t=>"function"==typeof t,p=t=>1e3*t,y=t=>t/1e3,g=["","X","Y","Z"],v={x:"translateX",y:"translateY",z:"translateZ"},T={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},S={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:T,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:c},skew:T},w=new Map,A=t=>`--motion-${t}`,b=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{g.forEach((e=>{b.push(t+e),w.set(A(t+e),S[t])}))}));const D=(t,e)=>b.indexOf(t)-b.indexOf(e),k=new Set(b),x=t=>k.has(t),O=t=>t.sort(D).reduce(M,"").trim(),M=(t,e)=>`${t} ${e}(var(${A(e)}))`,E=t=>t.startsWith("--"),R=new Set;const P=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function j(t,e,i,n){if(t===e&&i===n)return c;const a=e=>function(t,e,i,n,a){let s,r,o=0;do{r=e+(i-e)/2,s=P(r,n,a)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:P(a(t),e,n)}const V={ease:j(.25,.1,.25,1),"ease-in":j(.42,0,1,1),"ease-in-out":j(.42,0,.58,1),"ease-out":j(0,0,.58,1)},$=/\((.*?)\)/;function q(t){if(m(t))return t;if(Array.isArray(t))return j(...t);if(V[t])return V[t];if(t.startsWith("steps")){const e=$.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return c}class F{constructor(t,e=[0,1],{easing:i,duration:n=a.duration,delay:s=a.delay,endDelay:o=a.endDelay,repeat:l=a.repeat,offset:u,direction:h="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=c,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||a.easing,f(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(n=t.duration)}this.repeat=l,this.easing=r(i)?c:q(i),this.updateDuration(n);const m=d(e,u,r(i)?i.map(q):c);this.tick=e=>{var i;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-s,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const a=n/this.duration;let r=Math.floor(a),l=a%1;!l&&a>=1&&(l=1),1===l&&r--;const c=r%2;("reverse"===h||"alternate"===h&&c||"alternate-reverse"===h&&!c)&&(l=1-l);const u=n>=this.totalDuration?1:Math.min(l,1),d=m(this.easing(u));t(d);void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+o)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,d)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const U=(t,e)=>document.createElement("div").animate(t,e),C={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{U({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(U({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{U({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},I={},_={};for(const t in C)_[t]=()=>(void 0===I[t]&&(I[t]=C[t]()),I[t]);const W=(t,e)=>m(t)?_.linearEasing()?`linear(${((t,e)=>{let i="";const n=Math.round(e/.015);for(let e=0;e<n;e++)i+=t(u(0,n-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:a.easing:(t=>Array.isArray(t)&&s(t[0]))(t)?z(t):t,z=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`;function B(t){return v[t]&&(t=v[t]),x(t)?A(t):t}const K=(t,e)=>{e=B(e);let i=E(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=w.get(e);t&&(i=t.initialValue)}return i},N=(t,e,i)=>{e=B(e),E(e)?t.style.setProperty(e,i):t.style[e]=i};function X(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function Y(e,n,o,c={}){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==c.record&&u;let d,{duration:y=a.duration,delay:g=a.delay,endDelay:T=a.endDelay,repeat:S=a.repeat,easing:A=a.easing,direction:b,offset:D,allowWebkitAcceleration:k=!1}=c;const M=i(e),P=x(n);let j=_.waapi();P&&((t,e)=>{v[e]&&(e=v[e]);const{transforms:n}=i(t);var a,s;s=e,-1===(a=n).indexOf(s)&&a.push(s),t.style.transform=O(n)})(e,n);const V=B(n),$=function(e,i){return e.has(i)||e.set(i,new t),e.get(i)}(M.values,V),q=w.get(V);return X($.animation,!(f(A)&&$.generator)&&!1!==c.record),()=>{const t=()=>{var t,i;return null!==(i=null!==(t=K(e,V))&&void 0!==t?t:null==q?void 0:q.initialValue)&&void 0!==i?i:0};let i=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(o),t);if(f(A)){const e=A.createAnimation(i,t,P,V,$);A=e.easing,void 0!==e.keyframes&&(i=e.keyframes),void 0!==e.duration&&(y=e.duration)}if(E(V)&&(_.cssRegisterProperty()?function(t){if(!R.has(t)){R.add(t);try{const{syntax:e,initialValue:i}=w.has(t)?w.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}(V):j=!1),m(A)&&!_.linearEasing()&&P&&(j=!1),j){q&&(i=i.map((t=>s(t)?q.toDefaultUnit(t):t))),1!==i.length||_.partialKeyframes()&&!h||i.unshift(t());const n={delay:p(g),duration:p(y),endDelay:p(T),easing:r(A)?void 0:W(A,y),direction:b,iterations:S+1,fill:"both"};d=e.animate({[V]:i,offset:D,easing:r(A)?A.map((t=>W(t,y))):void 0},n),d.finished||(d.finished=new Promise(((t,e)=>{d.onfinish=t,d.oncancel=e})));const a=i[i.length-1];d.finished.then((()=>{N(e,V,a),d.cancel()})).catch(l),k||(d.playbackRate=1.000001)}else if(P){i=i.map((t=>"string"==typeof t?parseFloat(t):t)),1===i.length&&i.unshift(parseFloat(t()));d=new F((t=>{q&&(t=q.toDefaultUnit(t)),N(e,V,t)}),i,Object.assign(Object.assign({},c),{duration:y,easing:A}))}else{const t=i[i.length-1];N(e,V,q&&s(t)?q.toDefaultUnit(t):t)}return h&&u(e,n,i,{duration:y,delay:g,easing:A,repeat:S,offset:D},"motion-one"),$.setAnimation(d),d}}const Z=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);const L=t=>t(),G={get:(t,e)=>{const i=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return y((null==i?void 0:i[e])||0);case"playbackRate":case"playState":return null==i?void 0:i[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(H)).catch(l)),t.finished;case"stop":return()=>{t.animations.forEach((t=>X(t)))};case"forEachNative":return e=>{t.animations.forEach((i=>e(i,t)))};default:return void 0===(null==i?void 0:i[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,i)=>{switch(e){case"currentTime":i=p(i);case"currentTime":case"playbackRate":for(let n=0;n<t.animations.length;n++)t.animations[n][e]=i;return!0}return!1}},H=t=>t.finished;function J(t,e,i){return m(t)?t(e,i):t}function Q(t,e,i={}){const n=(t=function(t,e){var i;return"string"==typeof t?e?(null!==(i=e[t])&&void 0!==i||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length,s=[];for(let a=0;a<n;a++){const r=t[a];for(const t in e){const o=Z(i,t);o.delay=J(o.delay,a,n);const l=Y(r,t,e[t],o);s.push(l)}}return((t,e,i=a.duration)=>new Proxy({animations:t.map(L).filter(Boolean),duration:i,options:e},G))(s,i,i.duration)}export{Q as animate};
class t{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const e=new WeakMap;function i(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const n=(t,e,i)=>Math.min(Math.max(i,t),e),a={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},s=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!s(t[0]);const o=(t,e,i)=>-i*t+i*e+t,l=()=>{},c=t=>t,u=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function h(t,e){const i=t[t.length-1];for(let n=1;n<=e;n++){const a=u(0,e,n);t.push(o(i,1,a))}}function d(t,e=function(t){const e=[0];return h(e,t-1),e}(t.length),i=c){const a=t.length,s=a-e.length;return s>0&&h(e,s),s=>{let l=0;for(;l<a-2&&!(s<e[l+1]);l++);let c=n(0,1,u(e[l],e[l+1],s));const h=function(t,e){return r(t)?t[((t,e,i)=>{const n=e-t;return((i-t)%n+n)%n+t})(0,t.length,e)]:t}(i,l);return c=h(c),o(t[l],t[l+1],c)}}const f=t=>"object"==typeof t&&Boolean(t.createAnimation),m=t=>"function"==typeof t,p=t=>1e3*t,y=t=>t/1e3,g=["","X","Y","Z"],v={x:"translateX",y:"translateY",z:"translateZ"},T={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},S={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:T,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:c},skew:T},w=new Map,A=t=>`--motion-${t}`,b=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{g.forEach((e=>{b.push(t+e),w.set(A(t+e),S[t])}))}));const D=(t,e)=>b.indexOf(t)-b.indexOf(e),k=new Set(b),x=t=>k.has(t),O=t=>t.sort(D).reduce(M,"").trim(),M=(t,e)=>`${t} ${e}(var(${A(e)}))`,E=t=>t.startsWith("--"),R=new Set;const P=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function j(t,e,i,n){if(t===e&&i===n)return c;const a=e=>function(t,e,i,n,a){let s,r,o=0;do{r=e+(i-e)/2,s=P(r,n,a)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:P(a(t),e,n)}const V={ease:j(.25,.1,.25,1),"ease-in":j(.42,0,1,1),"ease-in-out":j(.42,0,.58,1),"ease-out":j(0,0,.58,1)},$=/\((.*?)\)/;function q(t){if(m(t))return t;if(Array.isArray(t))return j(...t);if(V[t])return V[t];if(t.startsWith("steps")){const e=$.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return c}class F{constructor(t,e=[0,1],{easing:i,duration:n=a.duration,delay:s=a.delay,endDelay:o=a.endDelay,repeat:l=a.repeat,offset:u,direction:h="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=c,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||a.easing,f(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(n=t.duration)}this.repeat=l,this.easing=r(i)?c:q(i),this.updateDuration(n);const m=d(e,u,r(i)?i.map(q):c);this.tick=e=>{var i;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-s,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const a=n/this.duration;let r=Math.floor(a),l=a%1;!l&&a>=1&&(l=1),1===l&&r--;const c=r%2;("reverse"===h||"alternate"===h&&c||"alternate-reverse"===h&&!c)&&(l=1-l);const u=n>=this.totalDuration?1:Math.min(l,1),d=m(this.easing(u));t(d);void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+o)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,d)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const U=(t,e)=>document.createElement("div").animate(t,e),C={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{U({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(U({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{U({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},I={},_={};for(const t in C)_[t]=()=>(void 0===I[t]&&(I[t]=C[t]()),I[t]);const W=(t,e)=>m(t)?_.linearEasing()?`linear(${((t,e)=>{let i="";const n=Math.round(e/.015);for(let e=0;e<n;e++)i+=t(u(0,n-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:a.easing:(t=>Array.isArray(t)&&s(t[0]))(t)?z(t):t,z=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`;function B(t){return v[t]&&(t=v[t]),x(t)?A(t):t}const K=(t,e)=>{e=B(e);let i=E(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=w.get(e);t&&(i=t.initialValue)}return i},N=(t,e,i)=>{e=B(e),E(e)?t.style.setProperty(e,i):t.style[e]=i};function X(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function Y(e,n,o,c={}){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==c.record&&u;let d,{duration:y=a.duration,delay:g=a.delay,endDelay:T=a.endDelay,repeat:S=a.repeat,easing:A=a.easing,direction:b,offset:D,allowWebkitAcceleration:k=!1}=c;const M=i(e),P=x(n);let j=_.waapi();P&&((t,e)=>{v[e]&&(e=v[e]);const{transforms:n}=i(t);var a,s;s=e,-1===(a=n).indexOf(s)&&a.push(s),t.style.transform=O(n)})(e,n);const V=B(n),$=function(e,i){return e.has(i)||e.set(i,new t),e.get(i)}(M.values,V),q=w.get(V);return X($.animation,!(f(A)&&$.generator)&&!1!==c.record),()=>{const t=()=>{var t,i;return null!==(i=null!==(t=K(e,V))&&void 0!==t?t:null==q?void 0:q.initialValue)&&void 0!==i?i:0};let i=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(o),t);if(f(A)){const e=A.createAnimation(i,t,P,V,$);A=e.easing,void 0!==e.keyframes&&(i=e.keyframes),void 0!==e.duration&&(y=e.duration)}if(E(V)&&(_.cssRegisterProperty()?function(t){if(!R.has(t)){R.add(t);try{const{syntax:e,initialValue:i}=w.has(t)?w.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}(V):j=!1),P&&!_.linearEasing()&&(m(A)||r(A)&&A.some(m))&&(j=!1),j){q&&(i=i.map((t=>s(t)?q.toDefaultUnit(t):t))),1!==i.length||_.partialKeyframes()&&!h||i.unshift(t());const n={delay:p(g),duration:p(y),endDelay:p(T),easing:r(A)?void 0:W(A,y),direction:b,iterations:S+1,fill:"both"};d=e.animate({[V]:i,offset:D,easing:r(A)?A.map((t=>W(t,y))):void 0},n),d.finished||(d.finished=new Promise(((t,e)=>{d.onfinish=t,d.oncancel=e})));const a=i[i.length-1];d.finished.then((()=>{N(e,V,a),d.cancel()})).catch(l),k||(d.playbackRate=1.000001)}else if(P){i=i.map((t=>"string"==typeof t?parseFloat(t):t)),1===i.length&&i.unshift(parseFloat(t()));d=new F((t=>{q&&(t=q.toDefaultUnit(t)),N(e,V,t)}),i,Object.assign(Object.assign({},c),{duration:y,easing:A}))}else{const t=i[i.length-1];N(e,V,q&&s(t)?q.toDefaultUnit(t):t)}return h&&u(e,n,i,{duration:y,delay:g,easing:A,repeat:S,offset:D},"motion-one"),$.setAnimation(d),d}}const Z=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);const L=t=>t(),G={get:(t,e)=>{const i=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return y((null==i?void 0:i[e])||0);case"playbackRate":case"playState":return null==i?void 0:i[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(H)).catch(l)),t.finished;case"stop":return()=>{t.animations.forEach((t=>X(t)))};case"forEachNative":return e=>{t.animations.forEach((i=>e(i,t)))};default:return void 0===(null==i?void 0:i[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,i)=>{switch(e){case"currentTime":i=p(i);case"currentTime":case"playbackRate":for(let n=0;n<t.animations.length;n++)t.animations[n][e]=i;return!0}return!1}},H=t=>t.finished;function J(t,e,i){return m(t)?t(e,i):t}function Q(t,e,i={}){const n=(t=function(t,e){var i;return"string"==typeof t?e?(null!==(i=e[t])&&void 0!==i||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length,s=[];for(let a=0;a<n;a++){const r=t[a];for(const t in e){const o=Z(i,t);o.delay=J(o.delay,a,n);const l=Y(r,t,e[t],o);s.push(l)}}return((t,e,i=a.duration)=>new Proxy({animations:t.map(L).filter(Boolean),duration:i,options:e},G))(s,i,i.duration)}export{Q as animate};

@@ -1,1 +0,1 @@

var t=function(){};function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}"production"!==process.env.NODE_ENV&&(t=function(t,e){if(!t)throw new Error(e)});const n=(t,e,n)=>Math.min(Math.max(n,t),e),i={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},a=t=>"number"==typeof t,s=t=>Array.isArray(t)&&!a(t[0]);function r(t,e){return s(t)?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t}const o=(t,e,n)=>-n*t+n*e+t,l=()=>{},c=t=>t,u=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function h(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=u(0,e,i);t.push(o(n,1,a))}}function f(t){const e=[0];return h(e,t-1),e}const d=t=>"object"==typeof t&&Boolean(t.createAnimation),p=t=>"function"==typeof t,m=t=>1e3*t,y=t=>t/1e3,g=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function v(t,e,n,i){if(t===e&&n===i)return c;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=g(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:g(a(t),e,i)}const O={ease:v(.25,.1,.25,1),"ease-in":v(.42,0,1,1),"ease-in-out":v(.42,0,.58,1),"ease-out":v(0,0,.58,1)},b=/\((.*?)\)/;function w(t){if(p(t))return t;if(Array.isArray(t))return v(...t);if(O[t])return O[t];if(t.startsWith("steps")){const e=b.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return c}class S{constructor(t,e=[0,1],{easing:a,duration:l=i.duration,delay:p=i.delay,endDelay:m=i.endDelay,repeat:y=i.repeat,offset:g,direction:v="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=c,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||i.easing,d(a)){const t=a.createAnimation(e,(()=>"0"),!0);a=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(l=t.duration)}this.repeat=y,this.easing=s(a)?c:w(a),this.updateDuration(l);const O=function(t,e=f(t.length),i=c){const a=t.length,s=a-e.length;return s>0&&h(e,s),s=>{let l=0;for(;l<a-2&&!(s<e[l+1]);l++);let c=n(0,1,u(e[l],e[l+1],s));return c=r(i,l)(c),o(t[l],t[l+1],c)}}(e,g,s(a)?a.map(w):c);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-p,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===v||"alternate"===v&&o||"alternate-reverse"===v&&!o)&&(r=1-r);const l=i>=this.totalDuration?1:Math.min(r,1),c=O(this.easing(l));t(c);void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+m)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,c)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}function T(t,e,n){return p(t)?t(e,n):t}class A{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const x=new WeakMap;function D(t){return x.has(t)||x.set(t,{transforms:[],values:new Map}),x.get(t)}const k=["","X","Y","Z"],M={x:"translateX",y:"translateY",z:"translateZ"},E={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},j={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:E,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:c},skew:E},P=new Map,R=t=>`--motion-${t}`,V=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{k.forEach((e=>{V.push(t+e),P.set(R(t+e),j[t])}))}));const $=(t,e)=>V.indexOf(t)-V.indexOf(e),q=new Set(V),F=t=>q.has(t),I=t=>t.sort($).reduce(U,"").trim(),U=(t,e)=>`${t} ${e}(var(${R(e)}))`,W=t=>t.startsWith("--"),_=new Set;const C=(t,e)=>document.createElement("div").animate(t,e),B={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{C({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(C({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{C({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},N={},z={};for(const t in B)z[t]=()=>(void 0===N[t]&&(N[t]=B[t]()),N[t]);const K=(t,e)=>p(t)?z.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(u(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:i.easing:(t=>Array.isArray(t)&&a(t[0]))(t)?X(t):t,X=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const Y=t=>Array.isArray(t)?t:[t];function Z(t){return M[t]&&(t=M[t]),F(t)?R(t):t}const L=(t,e)=>{e=Z(e);let n=W(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=P.get(e);t&&(n=t.initialValue)}return n},G=(t,e,n)=>{e=Z(e),W(e)?t.style.setProperty(e,n):t.style[e]=n};function H(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function J(t,e,n,r={}){const o=window.__MOTION_DEV_TOOLS_RECORD,c=!1!==r.record&&o;let u,{duration:h=i.duration,delay:f=i.delay,endDelay:y=i.endDelay,repeat:g=i.repeat,easing:v=i.easing,direction:O,offset:b,allowWebkitAcceleration:w=!1}=r;const T=D(t),x=F(e);let k=z.waapi();x&&((t,e)=>{M[e]&&(e=M[e]);const{transforms:n}=D(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=I(n)})(t,e);const E=Z(e),j=function(t,e){return t.has(e)||t.set(e,new A),t.get(e)}(T.values,E),R=P.get(E);return H(j.animation,!(d(v)&&j.generator)&&!1!==r.record),()=>{const i=()=>{var e,n;return null!==(n=null!==(e=L(t,E))&&void 0!==e?e:null==R?void 0:R.initialValue)&&void 0!==n?n:0};let T=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(Y(n),i);if(d(v)){const t=v.createAnimation(T,i,x,E,j);v=t.easing,void 0!==t.keyframes&&(T=t.keyframes),void 0!==t.duration&&(h=t.duration)}if(W(E)&&(z.cssRegisterProperty()?function(t){if(!_.has(t)){_.add(t);try{const{syntax:e,initialValue:n}=P.has(t)?P.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(E):k=!1),p(v)&&!z.linearEasing()&&x&&(k=!1),k){R&&(T=T.map((t=>a(t)?R.toDefaultUnit(t):t))),1!==T.length||z.partialKeyframes()&&!c||T.unshift(i());const e={delay:m(f),duration:m(h),endDelay:m(y),easing:s(v)?void 0:K(v,h),direction:O,iterations:g+1,fill:"both"};u=t.animate({[E]:T,offset:b,easing:s(v)?v.map((t=>K(t,h))):void 0},e),u.finished||(u.finished=new Promise(((t,e)=>{u.onfinish=t,u.oncancel=e})));const n=T[T.length-1];u.finished.then((()=>{G(t,E,n),u.cancel()})).catch(l),w||(u.playbackRate=1.000001)}else if(x){T=T.map((t=>"string"==typeof t?parseFloat(t):t)),1===T.length&&T.unshift(parseFloat(i()));u=new S((e=>{R&&(e=R.toDefaultUnit(e)),G(t,E,e)}),T,Object.assign(Object.assign({},r),{duration:h,easing:v}))}else{const e=T[T.length-1];G(t,E,R&&a(e)?R.toDefaultUnit(e):e)}return c&&o(t,e,T,{duration:h,delay:f,easing:v,repeat:g,offset:b},"motion-one"),j.setAnimation(u),u}}const Q=t=>t(),tt={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return y((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(et)).catch(l)),t.finished;case"stop":return()=>{t.animations.forEach((t=>H(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=m(n);case"currentTime":case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},et=t=>t.finished,nt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function it(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}function at(t,e,n,i){var s;return a(e)?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function st(t,n,i,a,s,l){!function(t,n,i){for(let a=0;a<t.length;a++){const s=t[a];s.at>n&&s.at<i&&(e(t,s),a--)}}(t,s,l);for(let e=0;e<n.length;e++)t.push({value:n[e],at:o(s,l,a[e]),easing:r(i,e)})}function rt(t,e){return t.at===e.at?null===t.value?1:-1:t.at-e.at}function ot(t,e={}){var n;const a=lt(t,e),s=a.map((t=>J(...t))).filter(Boolean);return((t,e,n=i.duration)=>new Proxy({animations:t.map(Q).filter(Boolean),duration:n,options:e},tt))(s,e,null===(n=a[0])||void 0===n?void 0:n[3].duration)}function lt(e,n={}){var{defaultOptions:a={}}=n,s=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(n,["defaultOptions"]);const r=[],o=new Map,l={},c=new Map;let p=0,m=0,y=0;for(let n=0;n<e.length;n++){const s=e[n];if("string"==typeof s){c.set(s,m);continue}if(!Array.isArray(s)){c.set(s.name,at(m,s.at,p,c));continue}const[r,u,g={}]=s;void 0!==g.at&&(m=at(m,g.at,p,c));let v=0;const O=it(r,l),b=O.length;for(let e=0;e<b;e++){const n=ct(O[e],o);for(const s in u){const r=ut(s,n);let o=Y(u[s]);const l=nt(g,s);let{duration:c=a.duration||i.duration,easing:p=a.easing||i.easing}=l;if(d(p)){const e=F(s);t(2===o.length||!e,"spring must be provided 2 keyframes within timeline");const n=p.createAnimation(o,(()=>"0"),e);p=n.easing,void 0!==n.keyframes&&(o=n.keyframes),void 0!==n.duration&&(c=n.duration)}const O=T(g.delay,e,b)||0,w=m+O,S=w+c;let{offset:A=f(o.length)}=l;1===A.length&&0===A[0]&&(A[1]=1);const x=length-o.length;x>0&&h(A,x),1===o.length&&o.unshift(null),st(r,o,p,A,w,S),v=Math.max(O+c,v),y=Math.max(S,y)}}p=m,m+=v}return o.forEach(((t,e)=>{for(const n in t){const o=t[n];o.sort(rt);const l=[],c=[],h=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:a}=o[t];l.push(n),c.push(u(0,y,e)),h.push(a||i.easing)}0!==c[0]&&(c.unshift(0),l.unshift(l[0]),h.unshift("linear")),1!==c[c.length-1]&&(c.push(1),l.push(null)),r.push([e,n,l,Object.assign(Object.assign(Object.assign({},a),{duration:y,easing:h,offset:c}),s)])}})),r}function ct(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ut(t,e){return e[t]||(e[t]=[]),e[t]}export{lt as createAnimationsFromTimeline,ot as timeline};
var t=function(){};function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}"production"!==process.env.NODE_ENV&&(t=function(t,e){if(!t)throw new Error(e)});const n=(t,e,n)=>Math.min(Math.max(n,t),e),i={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},a=t=>"number"==typeof t,s=t=>Array.isArray(t)&&!a(t[0]);function r(t,e){return s(t)?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t}const o=(t,e,n)=>-n*t+n*e+t,l=()=>{},c=t=>t,u=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function h(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=u(0,e,i);t.push(o(n,1,a))}}function f(t){const e=[0];return h(e,t-1),e}const d=t=>"object"==typeof t&&Boolean(t.createAnimation),p=t=>"function"==typeof t,m=t=>1e3*t,y=t=>t/1e3,g=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function v(t,e,n,i){if(t===e&&n===i)return c;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=g(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:g(a(t),e,i)}const O={ease:v(.25,.1,.25,1),"ease-in":v(.42,0,1,1),"ease-in-out":v(.42,0,.58,1),"ease-out":v(0,0,.58,1)},b=/\((.*?)\)/;function w(t){if(p(t))return t;if(Array.isArray(t))return v(...t);if(O[t])return O[t];if(t.startsWith("steps")){const e=b.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return c}class S{constructor(t,e=[0,1],{easing:a,duration:l=i.duration,delay:p=i.delay,endDelay:m=i.endDelay,repeat:y=i.repeat,offset:g,direction:v="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=c,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||i.easing,d(a)){const t=a.createAnimation(e,(()=>"0"),!0);a=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(l=t.duration)}this.repeat=y,this.easing=s(a)?c:w(a),this.updateDuration(l);const O=function(t,e=f(t.length),i=c){const a=t.length,s=a-e.length;return s>0&&h(e,s),s=>{let l=0;for(;l<a-2&&!(s<e[l+1]);l++);let c=n(0,1,u(e[l],e[l+1],s));return c=r(i,l)(c),o(t[l],t[l+1],c)}}(e,g,s(a)?a.map(w):c);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-p,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===v||"alternate"===v&&o||"alternate-reverse"===v&&!o)&&(r=1-r);const l=i>=this.totalDuration?1:Math.min(r,1),c=O(this.easing(l));t(c);void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+m)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,c)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}function T(t,e,n){return p(t)?t(e,n):t}class A{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const x=new WeakMap;function D(t){return x.has(t)||x.set(t,{transforms:[],values:new Map}),x.get(t)}const k=["","X","Y","Z"],M={x:"translateX",y:"translateY",z:"translateZ"},E={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},j={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:E,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:c},skew:E},P=new Map,R=t=>`--motion-${t}`,V=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{k.forEach((e=>{V.push(t+e),P.set(R(t+e),j[t])}))}));const $=(t,e)=>V.indexOf(t)-V.indexOf(e),q=new Set(V),F=t=>q.has(t),I=t=>t.sort($).reduce(U,"").trim(),U=(t,e)=>`${t} ${e}(var(${R(e)}))`,W=t=>t.startsWith("--"),_=new Set;const C=(t,e)=>document.createElement("div").animate(t,e),B={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{C({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(C({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{C({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},N={},z={};for(const t in B)z[t]=()=>(void 0===N[t]&&(N[t]=B[t]()),N[t]);const K=(t,e)=>p(t)?z.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(u(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:i.easing:(t=>Array.isArray(t)&&a(t[0]))(t)?X(t):t,X=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const Y=t=>Array.isArray(t)?t:[t];function Z(t){return M[t]&&(t=M[t]),F(t)?R(t):t}const L=(t,e)=>{e=Z(e);let n=W(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=P.get(e);t&&(n=t.initialValue)}return n},G=(t,e,n)=>{e=Z(e),W(e)?t.style.setProperty(e,n):t.style[e]=n};function H(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function J(t,e,n,r={}){const o=window.__MOTION_DEV_TOOLS_RECORD,c=!1!==r.record&&o;let u,{duration:h=i.duration,delay:f=i.delay,endDelay:y=i.endDelay,repeat:g=i.repeat,easing:v=i.easing,direction:O,offset:b,allowWebkitAcceleration:w=!1}=r;const T=D(t),x=F(e);let k=z.waapi();x&&((t,e)=>{M[e]&&(e=M[e]);const{transforms:n}=D(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=I(n)})(t,e);const E=Z(e),j=function(t,e){return t.has(e)||t.set(e,new A),t.get(e)}(T.values,E),R=P.get(E);return H(j.animation,!(d(v)&&j.generator)&&!1!==r.record),()=>{const i=()=>{var e,n;return null!==(n=null!==(e=L(t,E))&&void 0!==e?e:null==R?void 0:R.initialValue)&&void 0!==n?n:0};let T=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(Y(n),i);if(d(v)){const t=v.createAnimation(T,i,x,E,j);v=t.easing,void 0!==t.keyframes&&(T=t.keyframes),void 0!==t.duration&&(h=t.duration)}if(W(E)&&(z.cssRegisterProperty()?function(t){if(!_.has(t)){_.add(t);try{const{syntax:e,initialValue:n}=P.has(t)?P.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(E):k=!1),x&&!z.linearEasing()&&(p(v)||s(v)&&v.some(p))&&(k=!1),k){R&&(T=T.map((t=>a(t)?R.toDefaultUnit(t):t))),1!==T.length||z.partialKeyframes()&&!c||T.unshift(i());const e={delay:m(f),duration:m(h),endDelay:m(y),easing:s(v)?void 0:K(v,h),direction:O,iterations:g+1,fill:"both"};u=t.animate({[E]:T,offset:b,easing:s(v)?v.map((t=>K(t,h))):void 0},e),u.finished||(u.finished=new Promise(((t,e)=>{u.onfinish=t,u.oncancel=e})));const n=T[T.length-1];u.finished.then((()=>{G(t,E,n),u.cancel()})).catch(l),w||(u.playbackRate=1.000001)}else if(x){T=T.map((t=>"string"==typeof t?parseFloat(t):t)),1===T.length&&T.unshift(parseFloat(i()));u=new S((e=>{R&&(e=R.toDefaultUnit(e)),G(t,E,e)}),T,Object.assign(Object.assign({},r),{duration:h,easing:v}))}else{const e=T[T.length-1];G(t,E,R&&a(e)?R.toDefaultUnit(e):e)}return c&&o(t,e,T,{duration:h,delay:f,easing:v,repeat:g,offset:b},"motion-one"),j.setAnimation(u),u}}const Q=t=>t(),tt={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return y((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(et)).catch(l)),t.finished;case"stop":return()=>{t.animations.forEach((t=>H(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=m(n);case"currentTime":case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},et=t=>t.finished,nt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function it(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}function at(t,e,n,i){var s;return a(e)?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function st(t,n,i,a,s,l){!function(t,n,i){for(let a=0;a<t.length;a++){const s=t[a];s.at>n&&s.at<i&&(e(t,s),a--)}}(t,s,l);for(let e=0;e<n.length;e++)t.push({value:n[e],at:o(s,l,a[e]),easing:r(i,e)})}function rt(t,e){return t.at===e.at?null===t.value?1:-1:t.at-e.at}function ot(t,e={}){var n;const a=lt(t,e),s=a.map((t=>J(...t))).filter(Boolean);return((t,e,n=i.duration)=>new Proxy({animations:t.map(Q).filter(Boolean),duration:n,options:e},tt))(s,e,null===(n=a[0])||void 0===n?void 0:n[3].duration)}function lt(e,n={}){var{defaultOptions:a={}}=n,s=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(n,["defaultOptions"]);const r=[],o=new Map,l={},c=new Map;let p=0,m=0,y=0;for(let n=0;n<e.length;n++){const s=e[n];if("string"==typeof s){c.set(s,m);continue}if(!Array.isArray(s)){c.set(s.name,at(m,s.at,p,c));continue}const[r,u,g={}]=s;void 0!==g.at&&(m=at(m,g.at,p,c));let v=0;const O=it(r,l),b=O.length;for(let e=0;e<b;e++){const n=ct(O[e],o);for(const s in u){const r=ut(s,n);let o=Y(u[s]);const l=nt(g,s);let{duration:c=a.duration||i.duration,easing:p=a.easing||i.easing}=l;if(d(p)){const e=F(s);t(2===o.length||!e,"spring must be provided 2 keyframes within timeline");const n=p.createAnimation(o,(()=>"0"),e);p=n.easing,void 0!==n.keyframes&&(o=n.keyframes),void 0!==n.duration&&(c=n.duration)}const O=T(g.delay,e,b)||0,w=m+O,S=w+c;let{offset:A=f(o.length)}=l;1===A.length&&0===A[0]&&(A[1]=1);const x=length-o.length;x>0&&h(A,x),1===o.length&&o.unshift(null),st(r,o,p,A,w,S),v=Math.max(O+c,v),y=Math.max(S,y)}}p=m,m+=v}return o.forEach(((t,e)=>{for(const n in t){const o=t[n];o.sort(rt);const l=[],c=[],h=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:a}=o[t];l.push(n),c.push(u(0,y,e)),h.push(a||i.easing)}0!==c[0]&&(c.unshift(0),l.unshift(l[0]),h.unshift("linear")),1!==c[c.length-1]&&(c.push(1),l.push(null)),r.push([e,n,l,Object.assign(Object.assign(Object.assign({},a),{duration:y,easing:h,offset:c}),s)])}})),r}function ct(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ut(t,e){return e[t]||(e[t]=[]),e[t]}export{lt as createAnimationsFromTimeline,ot as timeline};

@@ -1,1 +0,1 @@

var t={d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{j:()=>H});class i{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const a=new WeakMap;function n(t){return a.has(t)||a.set(t,{transforms:[],values:new Map}),a.get(t)}const s=()=>{},r=t=>t,o=["","X","Y","Z"],l={x:"translateX",y:"translateY",z:"translateZ"},c={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},u={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:c,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:r},skew:c},h=new Map,d=t=>`--motion-${t}`,f=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{o.forEach((e=>{f.push(t+e),h.set(d(t+e),u[t])}))}));const m=(t,e)=>f.indexOf(t)-f.indexOf(e),p=new Set(f),y=t=>p.has(t),g=(t,e)=>`${t} ${e}(var(${d(e)}))`,v=t=>t.startsWith("--"),T=new Set,w={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},b=t=>"object"==typeof t&&Boolean(t.createAnimation),S=t=>"number"==typeof t,A=t=>Array.isArray(t)&&!S(t[0]),D=(t,e,i)=>-i*t+i*e+t,O=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function k(t,e){const i=t[t.length-1];for(let a=1;a<=e;a++){const n=O(0,e,a);t.push(D(i,1,n))}}const x=(t,e,i)=>Math.min(Math.max(i,t),e);const M=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function j(t,e,i,a){if(t===e&&i===a)return r;return n=>0===n||1===n?n:M(function(t,e,i,a,n){let s,r,o=0;do{r=e+(i-e)/2,s=M(r,a,n)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(n,0,1,t,i),e,a)}const E=t=>"function"==typeof t,P={ease:j(.25,.1,.25,1),"ease-in":j(.42,0,1,1),"ease-in-out":j(.42,0,.58,1),"ease-out":j(0,0,.58,1)},R=/\((.*?)\)/;function V(t){if(E(t))return t;if(Array.isArray(t))return j(...t);if(P[t])return P[t];if(t.startsWith("steps")){const e=R.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,n="end"===e?Math.floor(a):Math.ceil(a);return x(0,1,n/t)})(parseFloat(t[0]),t[1].trim())}}return r}class ${constructor(t,e=[0,1],{easing:i,duration:a=w.duration,delay:n=w.delay,endDelay:s=w.endDelay,repeat:o=w.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=r,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||w.easing,b(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(a=t.duration)}this.repeat=o,this.easing=A(i)?r:V(i),this.updateDuration(a);const u=function(t,e=function(t){const e=[0];return k(e,t-1),e}(t.length),i=r){const a=t.length,n=a-e.length;return n>0&&k(e,n),n=>{let s=0;for(;s<a-2&&!(n<e[s+1]);s++);let r=x(0,1,O(e[s],e[s+1],n));const o=function(t,e){return A(t)?t[((t,e,i)=>{const a=e-0;return((i-0)%a+a)%a+0})(0,t.length,e)]:t}(i,s);return r=o(r),D(t[s],t[s+1],r)}}(e,l,A(i)?i.map(V):r);this.tick=e=>{var i;let a=0;a=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=a,a/=1e3,a=Math.max(a-n,0),"finished"===this.playState&&void 0===this.pauseTime&&(a=this.totalDuration);const r=a/this.duration;let o=Math.floor(r),l=r%1;!l&&r>=1&&(l=1),1===l&&o--;const h=o%2;("reverse"===c||"alternate"===c&&h||"alternate-reverse"===c&&!h)&&(l=1-l);const d=a>=this.totalDuration?1:Math.min(l,1),f=u(this.easing(d));t(f),void 0===this.pauseTime&&("finished"===this.playState||a>=this.totalDuration+s)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,f)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const q=t=>1e3*t,F=(t,e)=>document.createElement("div").animate(t,e),U={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{F({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(F({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{F({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},C={},I={};for(const t in U)I[t]=()=>(void 0===C[t]&&(C[t]=U[t]()),C[t]);const _=(t,e)=>E(t)?I.linearEasing()?`linear(${((t,e)=>{let i="";const a=Math.round(e/.015);for(let e=0;e<a;e++)i+=t(O(0,a-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:w.easing:(t=>Array.isArray(t)&&S(t[0]))(t)?W(t):t,W=([t,e,i,a])=>`cubic-bezier(${t}, ${e}, ${i}, ${a})`;function z(t){return l[t]&&(t=l[t]),y(t)?d(t):t}const B=(t,e,i)=>{e=z(e),v(e)?t.style.setProperty(e,i):t.style[e]=i};function K(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function N(t,e,a,r={}){const o=window.__MOTION_DEV_TOOLS_RECORD,c=!1!==r.record&&o;let u,{duration:d=w.duration,delay:f=w.delay,endDelay:p=w.endDelay,repeat:D=w.repeat,easing:O=w.easing,direction:k,offset:x,allowWebkitAcceleration:M=!1}=r;const j=n(t),P=y(e);let R=I.waapi();P&&((t,e)=>{l[e]&&(e=l[e]);const{transforms:i}=n(t);var a,s;s=e,-1===(a=i).indexOf(s)&&a.push(s),t.style.transform=(t=>t.sort(m).reduce(g,"").trim())(i)})(t,e);const V=z(e),F=function(t,e){return t.has(e)||t.set(e,new i),t.get(e)}(j.values,V),U=h.get(V);return K(F.animation,!(b(O)&&F.generator)&&!1!==r.record),()=>{const i=()=>{var e,i;return null!==(i=null!==(e=((t,e)=>{e=z(e);let i=v(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=h.get(e);t&&(i=t.initialValue)}return i})(t,V))&&void 0!==e?e:null==U?void 0:U.initialValue)&&void 0!==i?i:0};let n=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(a),i);if(b(O)){const t=O.createAnimation(n,i,P,V,F);O=t.easing,void 0!==t.keyframes&&(n=t.keyframes),void 0!==t.duration&&(d=t.duration)}if(v(V)&&(I.cssRegisterProperty()?function(t){if(!T.has(t)){T.add(t);try{const{syntax:e,initialValue:i}=h.has(t)?h.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}(V):R=!1),E(O)&&!I.linearEasing()&&P&&(R=!1),R){U&&(n=n.map((t=>S(t)?U.toDefaultUnit(t):t))),1!==n.length||I.partialKeyframes()&&!c||n.unshift(i());const e={delay:q(f),duration:q(d),endDelay:q(p),easing:A(O)?void 0:_(O,d),direction:k,iterations:D+1,fill:"both"};u=t.animate({[V]:n,offset:x,easing:A(O)?O.map((t=>_(t,d))):void 0},e),u.finished||(u.finished=new Promise(((t,e)=>{u.onfinish=t,u.oncancel=e})));const a=n[n.length-1];u.finished.then((()=>{B(t,V,a),u.cancel()})).catch(s),M||(u.playbackRate=1.000001)}else if(P)n=n.map((t=>"string"==typeof t?parseFloat(t):t)),1===n.length&&n.unshift(parseFloat(i())),u=new $((e=>{U&&(e=U.toDefaultUnit(e)),B(t,V,e)}),n,Object.assign(Object.assign({},r),{duration:d,easing:O}));else{const e=n[n.length-1];B(t,V,U&&S(e)?U.toDefaultUnit(e):e)}return c&&o(t,e,n,{duration:d,delay:f,easing:O,repeat:D,offset:x},"motion-one"),F.setAnimation(u),u}}const X=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t),Y=t=>t(),Z={get:(t,e)=>{const i=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return((null==i?void 0:i[e])||0)/1e3;case"playbackRate":case"playState":return null==i?void 0:i[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(L)).catch(s)),t.finished;case"stop":return()=>{t.animations.forEach((t=>K(t)))};case"forEachNative":return e=>{t.animations.forEach((i=>e(i,t)))};default:return void 0===(null==i?void 0:i[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,i)=>{switch(e){case"currentTime":i=q(i);case"currentTime":case"playbackRate":for(let a=0;a<t.animations.length;a++)t.animations[a][e]=i;return!0}return!1}},L=t=>t.finished;function G(t,e,i){return E(t)?t(e,i):t}function H(t,e,i={}){const a=(t=function(t,e){return"string"==typeof t?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length,n=[];for(let s=0;s<a;s++){const r=t[s];for(const t in e){const o=X(i,t);o.delay=G(o.delay,s,a);const l=N(r,t,e[t],o);n.push(l)}}return((t,e,i=w.duration)=>new Proxy({animations:t.map(Y).filter(Boolean),duration:i,options:e},Z))(n,i,i.duration)}var J=e.j;export{J as animate};
var t={d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{j:()=>H});class i{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const a=new WeakMap;function n(t){return a.has(t)||a.set(t,{transforms:[],values:new Map}),a.get(t)}const s=()=>{},r=t=>t,o=["","X","Y","Z"],l={x:"translateX",y:"translateY",z:"translateZ"},c={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},u={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:c,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:r},skew:c},h=new Map,d=t=>`--motion-${t}`,f=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{o.forEach((e=>{f.push(t+e),h.set(d(t+e),u[t])}))}));const m=(t,e)=>f.indexOf(t)-f.indexOf(e),p=new Set(f),y=t=>p.has(t),g=(t,e)=>`${t} ${e}(var(${d(e)}))`,v=t=>t.startsWith("--"),T=new Set,w={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},b=t=>"object"==typeof t&&Boolean(t.createAnimation),S=t=>"number"==typeof t,A=t=>Array.isArray(t)&&!S(t[0]),D=(t,e,i)=>-i*t+i*e+t,O=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function k(t,e){const i=t[t.length-1];for(let a=1;a<=e;a++){const n=O(0,e,a);t.push(D(i,1,n))}}const x=(t,e,i)=>Math.min(Math.max(i,t),e);const M=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function j(t,e,i,a){if(t===e&&i===a)return r;return n=>0===n||1===n?n:M(function(t,e,i,a,n){let s,r,o=0;do{r=e+(i-e)/2,s=M(r,a,n)-t,s>0?i=r:e=r}while(Math.abs(s)>1e-7&&++o<12);return r}(n,0,1,t,i),e,a)}const E=t=>"function"==typeof t,P={ease:j(.25,.1,.25,1),"ease-in":j(.42,0,1,1),"ease-in-out":j(.42,0,.58,1),"ease-out":j(0,0,.58,1)},R=/\((.*?)\)/;function V(t){if(E(t))return t;if(Array.isArray(t))return j(...t);if(P[t])return P[t];if(t.startsWith("steps")){const e=R.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,n="end"===e?Math.floor(a):Math.ceil(a);return x(0,1,n/t)})(parseFloat(t[0]),t[1].trim())}}return r}class ${constructor(t,e=[0,1],{easing:i,duration:a=w.duration,delay:n=w.delay,endDelay:s=w.endDelay,repeat:o=w.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=r,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||w.easing,b(i)){const t=i.createAnimation(e,(()=>"0"),!0);i=t.easing,void 0!==t.keyframes&&(e=t.keyframes),void 0!==t.duration&&(a=t.duration)}this.repeat=o,this.easing=A(i)?r:V(i),this.updateDuration(a);const u=function(t,e=function(t){const e=[0];return k(e,t-1),e}(t.length),i=r){const a=t.length,n=a-e.length;return n>0&&k(e,n),n=>{let s=0;for(;s<a-2&&!(n<e[s+1]);s++);let r=x(0,1,O(e[s],e[s+1],n));const o=function(t,e){return A(t)?t[((t,e,i)=>{const a=e-0;return((i-0)%a+a)%a+0})(0,t.length,e)]:t}(i,s);return r=o(r),D(t[s],t[s+1],r)}}(e,l,A(i)?i.map(V):r);this.tick=e=>{var i;let a=0;a=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=a,a/=1e3,a=Math.max(a-n,0),"finished"===this.playState&&void 0===this.pauseTime&&(a=this.totalDuration);const r=a/this.duration;let o=Math.floor(r),l=r%1;!l&&r>=1&&(l=1),1===l&&o--;const h=o%2;("reverse"===c||"alternate"===c&&h||"alternate-reverse"===c&&!h)&&(l=1-l);const d=a>=this.totalDuration?1:Math.min(l,1),f=u(this.easing(d));t(f),void 0===this.pauseTime&&("finished"===this.playState||a>=this.totalDuration+s)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,f)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}const q=t=>1e3*t,F=(t,e)=>document.createElement("div").animate(t,e),U={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{F({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(F({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{F({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},C={},I={};for(const t in U)I[t]=()=>(void 0===C[t]&&(C[t]=U[t]()),C[t]);const _=(t,e)=>E(t)?I.linearEasing()?`linear(${((t,e)=>{let i="";const a=Math.round(e/.015);for(let e=0;e<a;e++)i+=t(O(0,a-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:w.easing:(t=>Array.isArray(t)&&S(t[0]))(t)?W(t):t,W=([t,e,i,a])=>`cubic-bezier(${t}, ${e}, ${i}, ${a})`;function z(t){return l[t]&&(t=l[t]),y(t)?d(t):t}const B=(t,e,i)=>{e=z(e),v(e)?t.style.setProperty(e,i):t.style[e]=i};function K(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function N(t,e,a,r={}){const o=window.__MOTION_DEV_TOOLS_RECORD,c=!1!==r.record&&o;let u,{duration:d=w.duration,delay:f=w.delay,endDelay:p=w.endDelay,repeat:D=w.repeat,easing:O=w.easing,direction:k,offset:x,allowWebkitAcceleration:M=!1}=r;const j=n(t),P=y(e);let R=I.waapi();P&&((t,e)=>{l[e]&&(e=l[e]);const{transforms:i}=n(t);var a,s;s=e,-1===(a=i).indexOf(s)&&a.push(s),t.style.transform=(t=>t.sort(m).reduce(g,"").trim())(i)})(t,e);const V=z(e),F=function(t,e){return t.has(e)||t.set(e,new i),t.get(e)}(j.values,V),U=h.get(V);return K(F.animation,!(b(O)&&F.generator)&&!1!==r.record),()=>{const i=()=>{var e,i;return null!==(i=null!==(e=((t,e)=>{e=z(e);let i=v(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=h.get(e);t&&(i=t.initialValue)}return i})(t,V))&&void 0!==e?e:null==U?void 0:U.initialValue)&&void 0!==i?i:0};let n=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(a),i);if(b(O)){const t=O.createAnimation(n,i,P,V,F);O=t.easing,void 0!==t.keyframes&&(n=t.keyframes),void 0!==t.duration&&(d=t.duration)}if(v(V)&&(I.cssRegisterProperty()?function(t){if(!T.has(t)){T.add(t);try{const{syntax:e,initialValue:i}=h.has(t)?h.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}(V):R=!1),P&&!I.linearEasing()&&(E(O)||A(O)&&O.some(E))&&(R=!1),R){U&&(n=n.map((t=>S(t)?U.toDefaultUnit(t):t))),1!==n.length||I.partialKeyframes()&&!c||n.unshift(i());const e={delay:q(f),duration:q(d),endDelay:q(p),easing:A(O)?void 0:_(O,d),direction:k,iterations:D+1,fill:"both"};u=t.animate({[V]:n,offset:x,easing:A(O)?O.map((t=>_(t,d))):void 0},e),u.finished||(u.finished=new Promise(((t,e)=>{u.onfinish=t,u.oncancel=e})));const a=n[n.length-1];u.finished.then((()=>{B(t,V,a),u.cancel()})).catch(s),M||(u.playbackRate=1.000001)}else if(P)n=n.map((t=>"string"==typeof t?parseFloat(t):t)),1===n.length&&n.unshift(parseFloat(i())),u=new $((e=>{U&&(e=U.toDefaultUnit(e)),B(t,V,e)}),n,Object.assign(Object.assign({},r),{duration:d,easing:O}));else{const e=n[n.length-1];B(t,V,U&&S(e)?U.toDefaultUnit(e):e)}return c&&o(t,e,n,{duration:d,delay:f,easing:O,repeat:D,offset:x},"motion-one"),F.setAnimation(u),u}}const X=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t),Y=t=>t(),Z={get:(t,e)=>{const i=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return((null==i?void 0:i[e])||0)/1e3;case"playbackRate":case"playState":return null==i?void 0:i[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(L)).catch(s)),t.finished;case"stop":return()=>{t.animations.forEach((t=>K(t)))};case"forEachNative":return e=>{t.animations.forEach((i=>e(i,t)))};default:return void 0===(null==i?void 0:i[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,i)=>{switch(e){case"currentTime":i=q(i);case"currentTime":case"playbackRate":for(let a=0;a<t.animations.length;a++)t.animations[a][e]=i;return!0}return!1}},L=t=>t.finished;function G(t,e,i){return E(t)?t(e,i):t}function H(t,e,i={}){const a=(t=function(t,e){return"string"==typeof t?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length,n=[];for(let s=0;s<a;s++){const r=t[s];for(const t in e){const o=X(i,t);o.delay=G(o.delay,s,a);const l=N(r,t,e[t],o);n.push(l)}}return((t,e,i=w.duration)=>new Proxy({animations:t.map(Y).filter(Boolean),duration:i,options:e},Z))(n,i,i.duration)}var J=e.j;export{J as animate};

@@ -81,3 +81,5 @@ import { getAnimationData, getMotionValue } from "./data";

*/
if (isFunction(easing) && !supports.linearEasing() && valueIsTransform) {
if (valueIsTransform &&
!supports.linearEasing() &&
(isFunction(easing) || (isEasingList(easing) && easing.some(isFunction)))) {
canAnimateNatively = false;

@@ -84,0 +86,0 @@ }

{
"name": "@motionone/dom",
"version": "10.13.0",
"version": "10.13.1",
"description": "A tiny, performant animation library for the DOM",

@@ -18,6 +18,6 @@ "license": "MIT",

"dependencies": {
"@motionone/animation": "^10.13.0",
"@motionone/generators": "^10.13.0",
"@motionone/animation": "^10.13.1",
"@motionone/generators": "^10.13.1",
"@motionone/types": "^10.13.0",
"@motionone/utils": "^10.13.0",
"@motionone/utils": "^10.13.1",
"hey-listen": "^1.0.8",

@@ -64,3 +64,3 @@ "tslib": "^2.3.1"

],
"gitHead": "40bc3d673c83ba5bf2fd0118c55db2389617d901"
"gitHead": "ddaaf9ddc461760f8ebdca38b12f5049e1b92953"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc