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.16.4 to 10.17.0

6

dist/animate/animate-style.cjs.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var data = require('./data.cjs.js');

@@ -24,3 +22,3 @@ var cssVar = require('./utils/css-var.cjs.js');

let animation;
let { duration = utils.defaults.duration, delay = utils.defaults.delay, endDelay = utils.defaults.endDelay, repeat = utils.defaults.repeat, easing: easing$1 = utils.defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, } = options;
let { duration = utils.defaults.duration, delay = utils.defaults.delay, endDelay = utils.defaults.endDelay, repeat = utils.defaults.repeat, easing: easing$1 = utils.defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = options;
const data$1 = data.getAnimationData(element);

@@ -200,2 +198,4 @@ const valueIsTransform = transforms.isTransform(key);

motionValue.setAnimation(animation);
if (animation && !autoplay)
animation.pause();
return animation;

@@ -202,0 +202,0 @@ };

@@ -20,3 +20,3 @@ import { getAnimationData, getMotionValue } from './data.es.js';

let animation;
let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, } = options;
let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = options;
const data = getAnimationData(element);

@@ -196,2 +196,4 @@ const valueIsTransform = isTransform(key);

motionValue.setAnimation(animation);
if (animation && !autoplay)
animation.pause();
return animation;

@@ -198,0 +200,0 @@ };

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var heyListen = require('hey-listen');

@@ -6,0 +4,0 @@ var animateStyle = require('./animate-style.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var types = require('@motionone/types');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var animation = require('@motionone/animation');

@@ -6,0 +4,0 @@ var createAnimate = require('./create-animate.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var cssVar = require('./utils/css-var.cjs.js');

@@ -6,0 +4,0 @@ var getStyleName = require('./utils/get-style-name.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var stopAnimation = require('./stop-animation.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var transforms = require('./transforms.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var featureDetection = require('./feature-detection.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const testAnimation = (keyframes, options) => document.createElement("div").animate(keyframes, options);

@@ -6,0 +4,0 @@ const featureTests = {

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var transforms = require('./transforms.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function hydrateKeyframes(keyframes, readInitialValue) {

@@ -6,0 +4,0 @@ for (let i = 0; i < keyframes.length; i++) {

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const getOptions = (options, key) =>

@@ -6,0 +4,0 @@ /**

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function stopAnimation(animation, needsCommit = true) {

@@ -6,0 +4,0 @@ if (!animation || animation.playState === "finished")

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var transforms = require('./transforms.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var styleObject = require('./style-object.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var data = require('../data.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var generators = require('@motionone/generators');

@@ -6,0 +4,0 @@ var utils = require('@motionone/utils');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var generators = require('@motionone/generators');

@@ -6,0 +4,0 @@ var createGeneratorEasing = require('../create-generator-easing.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var generators = require('@motionone/generators');

@@ -6,0 +4,0 @@ var createGeneratorEasing = require('../create-generator-easing.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var resolveElements = require('../utils/resolve-elements.cjs.js');

@@ -6,0 +4,0 @@ var utils = require('@motionone/utils');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var resolveElements = require('../../utils/resolve-elements.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const windowCallbacks = new Set();

@@ -6,0 +4,0 @@ let windowResizeHandler;

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var handleElement = require('./handle-element.cjs.js');

@@ -6,0 +4,0 @@ var handleWindow = require('./handle-window.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib = require('tslib');

@@ -6,0 +4,0 @@ var index = require('../resize/index.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var inset = require('./inset.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function calcInset(element, container) {

@@ -6,0 +4,0 @@ let inset = { x: 0, y: 0 };

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var edge = require('./edge.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const ScrollOffset = {

@@ -6,0 +4,0 @@ Enter: [

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var info = require('./info.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var index = require('./animate/index.cjs.js');

@@ -6,0 +4,0 @@ var createAnimate = require('./animate/create-animate.cjs.js');

@@ -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 n(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const a={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},i=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!i(t[0]),s=()=>{},o=t=>t,l=t=>"object"==typeof t&&Boolean(t.createAnimation),c=t=>"function"==typeof t,u=t=>1e3*t,f=["","X","Y","Z"],y={x:"translateX",y:"translateY",z:"translateZ"},d={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},p={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:d,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:o},skew:d},h=new Map,g=t=>`--motion-${t}`,m=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{f.forEach((e=>{m.push(t+e),h.set(g(t+e),p[t])}))}));const v=(t,e)=>m.indexOf(t)-m.indexOf(e),w=new Set(m),O=t=>w.has(t),b=t=>t.sort(v).reduce(x,"").trim(),x=(t,e)=>`${t} ${e}(var(${g(e)}))`,A=t=>t.startsWith("--"),D=new Set;const S=(t,e)=>document.createElement("div").animate(t,e),E={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{S({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(S({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{S({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},P={},V={};for(const t in E)V[t]=()=>(void 0===P[t]&&(P[t]=E[t]()),P[t]);const $=(t,e)=>c(t)?V.linearEasing()?`linear(${((t,e)=>{let n="";const a=Math.round(e/.015);for(let e=0;e<a;e++)n+=t((s=e,(r=a-1)-(i=0)==0?1:(s-i)/(r-i)))+", ";var i,r,s;return n.substring(0,n.length-2)})(t,e)})`:a.easing:(t=>Array.isArray(t)&&i(t[0]))(t)?k(t):t,k=([t,e,n,a])=>`cubic-bezier(${t}, ${e}, ${n}, ${a})`;function U(t){return y[t]&&(t=y[t]),O(t)?g(t):t}const j=(t,e)=>{e=U(e);let n=A(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=h.get(e);t&&(n=t.initialValue)}return n},C=(t,e,n)=>{e=U(e),A(e)?t.style.setProperty(e,n):t.style[e]=n};function M(e,f,d,p={},g){const m=window.__MOTION_DEV_TOOLS_RECORD,v=!1!==p.record&&m;let w,{duration:x=a.duration,delay:S=a.delay,endDelay:E=a.endDelay,repeat:P=a.repeat,easing:k=a.easing,persist:M=!1,direction:R,offset:_,allowWebkitAcceleration:z=!1}=p;const W=n(e),B=O(f);let F=V.waapi();B&&((t,e)=>{y[e]&&(e=y[e]);const{transforms:a}=n(t);var i,r;r=e,-1===(i=a).indexOf(r)&&i.push(r),t.style.transform=b(a)})(e,f);const K=U(f),T=function(e,n){return e.has(n)||e.set(n,new t),e.get(n)}(W.values,K),X=h.get(K);return function(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}(T.animation,!(l(k)&&T.generator)&&!1!==p.record),()=>{const t=()=>{var t,n;return null!==(n=null!==(t=j(e,K))&&void 0!==t?t:null==X?void 0:X.initialValue)&&void 0!==n?n:0};let n=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}((t=>Array.isArray(t)?t:[t])(d),t);const a=function(t,e){var n;let a=(null==e?void 0:e.toDefaultUnit)||o;const i=t[t.length-1];if("string"==typeof i){const t=(null===(n=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(a=e=>e+t)}return a}(n,X);if(l(k)){const e=k.createAnimation(n,"opacity"!==f,t,K,T);k=e.easing,n=e.keyframes||n,x=e.duration||x}if(A(K)&&(V.cssRegisterProperty()?function(t){if(!D.has(t)){D.add(t);try{const{syntax:e,initialValue:n}=h.has(t)?h.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(K):F=!1),B&&!V.linearEasing()&&(c(k)||r(k)&&k.some(c))&&(F=!1),F){X&&(n=n.map((t=>i(t)?X.toDefaultUnit(t):t))),1!==n.length||V.partialKeyframes()&&!v||n.unshift(t());const a={delay:u(S),duration:u(x),endDelay:u(E),easing:r(k)?void 0:$(k,x),direction:R,iterations:P+1,fill:"both"};w=e.animate({[K]:n,offset:_,easing:r(k)?k.map((t=>$(t,x))):void 0},a),w.finished||(w.finished=new Promise(((t,e)=>{w.onfinish=t,w.oncancel=e})));const o=n[n.length-1];w.finished.then((()=>{M||(C(e,K,o),w.cancel())})).catch(s),z||(w.playbackRate=1.000001)}else if(g&&B)n=n.map((t=>"string"==typeof t?parseFloat(t):t)),1===n.length&&n.unshift(parseFloat(t())),w=new g((t=>{C(e,K,a?a(t):t)}),n,Object.assign(Object.assign({},p),{duration:x,easing:k}));else{const t=n[n.length-1];C(e,K,X&&i(t)?X.toDefaultUnit(t):t)}return v&&m(e,f,n,{duration:x,delay:S,easing:k,repeat:P,offset:_},"motion-one"),T.setAnimation(w),w}}export{M 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 n(t){return e.has(t)||e.set(t,{transforms:[],values:new Map}),e.get(t)}const a={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},i=t=>"number"==typeof t,r=t=>Array.isArray(t)&&!i(t[0]),s=()=>{},o=t=>t,l=t=>"object"==typeof t&&Boolean(t.createAnimation),c=t=>"function"==typeof t,u=t=>"string"==typeof t,f=t=>1e3*t,y=["","X","Y","Z"],d={x:"translateX",y:"translateY",z:"translateZ"},p={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},h={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:p,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:o},skew:p},g=new Map,m=t=>`--motion-${t}`,v=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{y.forEach((e=>{v.push(t+e),g.set(m(t+e),h[t])}))}));const w=(t,e)=>v.indexOf(t)-v.indexOf(e),O=new Set(v),b=t=>O.has(t),x=t=>t.sort(w).reduce(A,"").trim(),A=(t,e)=>`${t} ${e}(var(${m(e)}))`,D=t=>t.startsWith("--"),S=new Set;const E=(t,e)=>document.createElement("div").animate(t,e),P={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{E({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(E({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{E({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},V={},$={};for(const t in P)$[t]=()=>(void 0===V[t]&&(V[t]=P[t]()),V[t]);const k=(t,e)=>c(t)?$.linearEasing()?`linear(${((t,e)=>{let n="";const a=Math.round(e/.015);for(let e=0;e<a;e++)n+=t((s=e,(r=a-1)-(i=0)==0?1:(s-i)/(r-i)))+", ";var i,r,s;return n.substring(0,n.length-2)})(t,e)})`:a.easing:(t=>Array.isArray(t)&&i(t[0]))(t)?U(t):t,U=([t,e,n,a])=>`cubic-bezier(${t}, ${e}, ${n}, ${a})`;function j(t){return d[t]&&(t=d[t]),b(t)?m(t):t}const C=(t,e)=>{e=j(e);let n=D(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=g.get(e);t&&(n=t.initialValue)}return n},M=(t,e,n)=>{e=j(e),D(e)?t.style.setProperty(e,n):t.style[e]=n};function R(e,y,p,h={},m){const v=window.__MOTION_DEV_TOOLS_RECORD,w=!1!==h.record&&v;let O,{duration:A=a.duration,delay:E=a.delay,endDelay:P=a.endDelay,repeat:V=a.repeat,easing:U=a.easing,persist:R=!1,direction:_,offset:z,allowWebkitAcceleration:W=!1,autoplay:B=!0}=h;const F=n(e),K=b(y);let T=$.waapi();K&&((t,e)=>{d[e]&&(e=d[e]);const{transforms:a}=n(t);var i,r;r=e,-1===(i=a).indexOf(r)&&i.push(r),t.style.transform=x(a)})(e,y);const X=j(y),Y=function(e,n){return e.has(n)||e.set(n,new t),e.get(n)}(F.values,X),Z=g.get(X);return function(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}(Y.animation,!(l(U)&&Y.generator)&&!1!==h.record),()=>{const t=()=>{var t,n;return null!==(n=null!==(t=C(e,X))&&void 0!==t?t:null==Z?void 0:Z.initialValue)&&void 0!==n?n:0};let n=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}((t=>Array.isArray(t)?t:[t])(p),t);const a=function(t,e){var n;let a=(null==e?void 0:e.toDefaultUnit)||o;const i=t[t.length-1];if(u(i)){const t=(null===(n=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(a=e=>e+t)}return a}(n,Z);if(l(U)){const e=U.createAnimation(n,"opacity"!==y,t,X,Y);U=e.easing,n=e.keyframes||n,A=e.duration||A}if(D(X)&&($.cssRegisterProperty()?function(t){if(!S.has(t)){S.add(t);try{const{syntax:e,initialValue:n}=g.has(t)?g.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(X):T=!1),K&&!$.linearEasing()&&(c(U)||r(U)&&U.some(c))&&(T=!1),T){Z&&(n=n.map((t=>i(t)?Z.toDefaultUnit(t):t))),1!==n.length||$.partialKeyframes()&&!w||n.unshift(t());const a={delay:f(E),duration:f(A),endDelay:f(P),easing:r(U)?void 0:k(U,A),direction:_,iterations:V+1,fill:"both"};O=e.animate({[X]:n,offset:z,easing:r(U)?U.map((t=>k(t,A))):void 0},a),O.finished||(O.finished=new Promise(((t,e)=>{O.onfinish=t,O.oncancel=e})));const o=n[n.length-1];O.finished.then((()=>{R||(M(e,X,o),O.cancel())})).catch(s),W||(O.playbackRate=1.000001)}else if(m&&K)n=n.map((t=>"string"==typeof t?parseFloat(t):t)),1===n.length&&n.unshift(parseFloat(t())),O=new m((t=>{M(e,X,a?a(t):t)}),n,Object.assign(Object.assign({},h),{duration:A,easing:U}));else{const t=n[n.length-1];M(e,X,Z&&i(t)?Z.toDefaultUnit(t):t)}return w&&v(e,y,n,{duration:A,delay:E,easing:U,repeat:V,offset:z},"motion-one"),Y.setAnimation(O),O&&!B&&O.pause(),O}}export{R as animateStyle};

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

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

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

const t=new WeakMap;let e;function n({target:e,contentRect:n,borderBoxSize:o}){var r;null===(r=t.get(e))||void 0===r||r.forEach((t=>{t({target:e,contentSize:n,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(e,o)}})}))}function o(t){t.forEach(n)}function r(n,r){e||"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(o));const i=function(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||[])}(n);return i.forEach((n=>{let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(r),null==e||e.observe(n)})),()=>{i.forEach((n=>{const o=t.get(n);null==o||o.delete(r),(null==o?void 0:o.size)||null==e||e.unobserve(n)}))}}const i=new Set;let s;function c(t){return i.add(t),s||(s=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};i.forEach((t=>t(e)))},window.addEventListener("resize",s)),()=>{i.delete(t),!i.size&&s&&(s=void 0)}}const l=t=>"number"==typeof t;function f(t,e){return(t=>Array.isArray(t)&&!l(t[0]))(t)?t[((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,e)]:t}const a=(t,e,n)=>-n*t+n*e+t,u=t=>t,g=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function h(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=g(0,e,o);t.push(a(n,1,r))}}function d(t){const e=[0];return h(e,t-1),e}function p(t,e=d(t.length),n=u){const o=t.length,r=o-e.length;return r>0&&h(e,r),r=>{let i=0;for(;i<o-2&&!(r<e[i+1]);i++);let s=(c=0,l=1,u=g(e[i],e[i+1],r),Math.min(Math.max(u,c),l));var c,l,u;return s=f(n,i)(s),a(t[i],t[i+1],s)}}const m=t=>"function"==typeof t,y=t=>"string"==typeof t;const v={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function w(t,e,n,o){const r=n[e],{length:i,position:s}=v[e],c=r.current,l=n.time;r.current=t["scroll"+s],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=g(0,r.scrollLength,r.current);const f=o-l;var a,u;r.velocity=f>50?0:(a=r.current-c,(u=f)?a*(1e3/u):0)}const x={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},E={start:0,center:.5,end:1};function L(t,e,n=0){let o=0;if(void 0!==E[t]&&(t=E[t]),y(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return l(t)&&(o=e*t),n+o}const O=[0,0];function W(t,e,n,o){let r=Array.isArray(t)?t:O,i=0,s=0;return l(t)?r=[t,t]:y(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,E[t]?t:"0"]),i=L(r[0],n,o),s=L(r[1],e),i-s}const z={x:0,y:0};function b(t,e,n){let{offset:o=x.All}=n;const{target:r=t,axis:i="y"}=n,s="y"===i?"height":"width",c=r!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(r,t):z,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},f={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let a=!e[i].interpolate;const u=o.length;for(let t=0;t<u;t++){const n=W(o[t],f[s],l[s],c[i]);a||n===e[i].interpolatorOffsets[t]||(a=!0),e[i].offset[t]=n}a&&(e[i].interpolate=p(d(u),e[i].offset),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function S(t,e,n,o={}){const r=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){w(t,"x",e,n),w(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&b(t,n,o)},notify:m(e)?()=>e(n):A(e,n[r])}}function A(t,e){return t.pause(),t.forEachNative(((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=u),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,r)}})),()=>{t.currentTime=e.progress}}const H=new WeakMap,B=new WeakMap,M=new WeakMap,T=t=>t===document.documentElement?window:t;function k(t,e={}){var{container:n=document.documentElement}=e,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}(e,["container"]);let i=M.get(n);i||(i=new Set,M.set(n,i));const s=S(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(s),!H.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};H.set(n,t);const e=T(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&B.set(n,(f=t,m(l=n)?c(l):r(l,f))),e.addEventListener("scroll",t,{passive:!0})}var l,f;const a=H.get(n),u=requestAnimationFrame(a);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(u);const o=M.get(n);if(!o)return;if(o.delete(s),o.size)return;const r=H.get(n);H.delete(n),r&&(T(n).removeEventListener("scroll",r),null===(e=B.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}}export{k as scroll};
"function"==typeof SuppressedError&&SuppressedError;const t=new WeakMap;let e;function n({target:e,contentRect:n,borderBoxSize:o}){var r;null===(r=t.get(e))||void 0===r||r.forEach((t=>{t({target:e,contentSize:n,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(e,o)}})}))}function o(t){t.forEach(n)}function r(n,r){e||"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(o));const i=function(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||[])}(n);return i.forEach((n=>{let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(r),null==e||e.observe(n)})),()=>{i.forEach((n=>{const o=t.get(n);null==o||o.delete(r),(null==o?void 0:o.size)||null==e||e.unobserve(n)}))}}const i=new Set;let s;function c(t){return i.add(t),s||(s=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};i.forEach((t=>t(e)))},window.addEventListener("resize",s)),()=>{i.delete(t),!i.size&&s&&(s=void 0)}}const f=(t,e,n)=>Math.min(Math.max(n,t),e),l=t=>"number"==typeof t,a=t=>Array.isArray(t)&&!l(t[0]),u=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};const g=(t,e,n)=>-n*t+n*e+t,h=t=>t,d=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function p(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=d(0,e,o);t.push(g(n,1,r))}}function m(t){const e=[0];return p(e,t-1),e}function y(t,e=m(t.length),n=h){const o=t.length,r=o-e.length;return r>0&&p(e,r),r=>{let i=0;for(;i<o-2&&!(r<e[i+1]);i++);let s=f(0,1,d(e[i],e[i+1],r));const c=function(t,e){return a(t)?t[u(0,t.length,e)]:t}(n,i);return s=c(s),g(t[i],t[i+1],s)}}const v=t=>"function"==typeof t,w=t=>"string"==typeof t;const E=50,x={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function L(t,e,n,o){const r=n[e],{length:i,position:s}=x[e],c=r.current,f=n.time;r.current=t["scroll"+s],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=d(0,r.scrollLength,r.current);const l=o-f;var a,u;r.velocity=l>E?0:(a=r.current-c,(u=l)?a*(1e3/u):0)}const O={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},W={start:0,center:.5,end:1};function S(t,e,n=0){let o=0;if(void 0!==W[t]&&(t=W[t]),w(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return l(t)&&(o=e*t),n+o}const z=[0,0];function b(t,e,n,o){let r=Array.isArray(t)?t:z,i=0,s=0;return l(t)?r=[t,t]:w(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,W[t]?t:"0"]),i=S(r[0],n,o),s=S(r[1],e),i-s}const A={x:0,y:0};function H(t,e,n){let{offset:o=O.All}=n;const{target:r=t,axis:i="y"}=n,s="y"===i?"height":"width",c=r!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(r,t):A,f=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},l={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let a=!e[i].interpolate;const u=o.length;for(let t=0;t<u;t++){const n=b(o[t],l[s],f[s],c[i]);a||n===e[i].interpolatorOffsets[t]||(a=!0),e[i].offset[t]=n}a&&(e[i].interpolate=y(m(u),e[i].offset),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function B(t,e,n,o={}){const r=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){L(t,"x",e,n),L(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&H(t,n,o)},notify:v(e)?()=>e(n):M(e,n[r])}}function M(t,e){return t.pause(),t.forEachNative(((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=h),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,r)}})),()=>{t.currentTime=e.progress}}const T=new WeakMap,k=new WeakMap,P=new WeakMap,j=t=>t===document.documentElement?window:t;function q(t,e={}){var{container:n=document.documentElement}=e,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}(e,["container"]);let i=P.get(n);i||(i=new Set,P.set(n,i));const s=B(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(s),!T.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};T.set(n,t);const e=j(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&k.set(n,(l=t,v(f=n)?c(f):r(f,l))),e.addEventListener("scroll",t,{passive:!0})}var f,l;const a=T.get(n),u=requestAnimationFrame(a);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(u);const o=P.get(n);if(!o)return;if(o.delete(s),o.size)return;const r=T.get(n);T.delete(n),r&&(j(n).removeEventListener("scroll",r),null===(e=k.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}}export{q as scroll};

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

const t=t=>t,e=t=>"string"==typeof t,n=t=>t/1e3;function a(t,e,n){const a=Math.max(e-5,0);return r=n-t(a),(o=e-a)?r*(1e3/o):0;var r,o}const r=100,o=10,s=1;const i=["","X","Y","Z"],c={x:"translateX",y:"translateY",z:"translateZ"},u={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},l={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:u,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:t},skew:u},h=new Map,f=t=>`--motion-${t}`,g=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{i.forEach((e=>{g.push(t+e),h.set(f(t+e),l[t])}))}));const d=new Set(g);function p(t){return c[t]&&(t=c[t]),e=t,d.has(e)?f(t):t;var e}function m(t){return(t=>"number"==typeof t)(t)&&!isNaN(t)}function v(t){return e(t)?parseFloat(t):t}const M=function(n){const r=new WeakMap;return(o={})=>{const s=new Map,i=(t=0,e=100,a=0,r=!1)=>{const i=`${t}-${e}-${a}-${r}`;return s.has(i)||s.set(i,n(Object.assign({from:t,to:e,velocity:a},o))),s.get(i)},c=(e,n)=>(r.has(e)||r.set(e,function(e,n=t){let a,r=10,o=e(0);const s=[n(o.current)];for(;!o.done&&r<1e4;)o=e(r),s.push(n(o.done?o.target:o.current)),void 0===a&&o.hasReachedTarget&&(a=r),r+=10;const i=r-10;return 1===s.length&&s.push(o.current),{keyframes:s,duration:i/1e3,overshootDuration:(null!=a?a:i)/1e3}}(e,n)),r.get(e));return{createAnimation:(n,r=!0,o,s,u)=>{let l,f,g,d=0,M=t;const x=n.length;if(r){M=function(n,a){var r;let o=(null==a?void 0:a.toDefaultUnit)||t;const s=n[n.length-1];if(e(s)){const t=(null===(r=s.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";t&&(o=e=>e+t)}return o}(n,s?h.get(p(s)):void 0);if(g=v(n[x-1]),x>1&&null!==n[0])f=v(n[0]);else{const t=null==u?void 0:u.generator;if(t){const{animation:e,generatorStartTime:n}=u,r=(null==e?void 0:e.startTime)||n||0,o=(null==e?void 0:e.currentTime)||performance.now()-r,s=t(o).current;f=s,d=a((e=>t(e).current),o,s)}else o&&(f=v(o()))}}if(m(f)&&m(g)){const t=i(f,g,d,null==s?void 0:s.includes("scale"));l=Object.assign(Object.assign({},c(t,M)),{easing:"linear"}),u&&(u.generator=t,u.generatorStartTime=performance.now())}if(!l){l={easing:"ease",duration:c(i(0,100)).overshootDuration}}return l}}}}((({stiffness:t=r,damping:e=o,mass:i=s,from:c=0,to:u=1,velocity:l=0,restSpeed:h,restDistance:f}={})=>{l=l?n(l):0;const g={done:!1,hasReachedTarget:!1,current:c,target:u},d=u-c,p=Math.sqrt(t/i)/1e3,m=((t=r,e=o,n=s)=>e/(2*Math.sqrt(t*n)))(t,e,i),v=Math.abs(d)<5;let M;if(h||(h=v?.01:2),f||(f=v?.005:.5),m<1){const t=p*Math.sqrt(1-m*m);M=e=>u-Math.exp(-m*p*e)*((m*p*d-l)/t*Math.sin(t*e)+d*Math.cos(t*e))}else M=t=>u-Math.exp(-p*t)*(d+(p*d-l)*t);return t=>{g.current=M(t);const e=0===t?l:a(M,t,g.current),n=Math.abs(e)<=h,r=Math.abs(u-g.current)<=f;var o,s,i;return g.done=n&&r,g.hasReachedTarget=(o=c,s=u,i=g.current,o<s&&i>=s||o>s&&i<=s),g}}));export{M as spring};
const t=t=>"number"==typeof t,e=t=>t,n=t=>"string"==typeof t,a=t=>t/1e3;const r=5;function o(t,e,n){const a=Math.max(e-r,0);return o=n-t(a),(s=e-a)?o*(1e3/s):0;var o,s}const s=100,i=10,c=1;const u=10,l=1e4;const h=["","X","Y","Z"],f={x:"translateX",y:"translateY",z:"translateZ"},g={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},d={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:g,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:e},skew:g},p=new Map,m=t=>`--motion-${t}`,v=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{h.forEach((e=>{v.push(t+e),p.set(m(t+e),d[t])}))}));const M=new Set(v),x=t=>M.has(t);function y(e){return t(e)&&!isNaN(e)}function b(t){return n(t)?parseFloat(t):t}const w=function(t){const a=new WeakMap;return(r={})=>{const s=new Map,i=(e=0,n=100,a=0,o=!1)=>{const i=`${e}-${n}-${a}-${o}`;return s.has(i)||s.set(i,t(Object.assign({from:e,to:n,velocity:a},r))),s.get(i)},c=(t,n)=>(a.has(t)||a.set(t,function(t,n=e){let a,r=u,o=t(0);const s=[n(o.current)];for(;!o.done&&r<l;)o=t(r),s.push(n(o.done?o.target:o.current)),void 0===a&&o.hasReachedTarget&&(a=r),r+=u;const i=r-u;return 1===s.length&&s.push(o.current),{keyframes:s,duration:i/1e3,overshootDuration:(null!=a?a:i)/1e3}}(t,n)),a.get(t));return{createAnimation:(t,a=!0,r,s,u)=>{let l,h,g,d=0,v=e;const M=t.length;if(a){v=function(t,a){var r;let o=(null==a?void 0:a.toDefaultUnit)||e;const s=t[t.length-1];if(n(s)){const t=(null===(r=s.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";t&&(o=e=>e+t)}return o}(t,s?p.get((f[w=s]&&(w=f[w]),x(w)?m(w):w)):void 0);if(g=b(t[M-1]),M>1&&null!==t[0])h=b(t[0]);else{const t=null==u?void 0:u.generator;if(t){const{animation:e,generatorStartTime:n}=u,a=(null==e?void 0:e.startTime)||n||0,r=(null==e?void 0:e.currentTime)||performance.now()-a,s=t(r).current;h=s,d=o((e=>t(e).current),r,s)}else r&&(h=b(r()))}}var w;if(y(h)&&y(g)){const t=i(h,g,d,null==s?void 0:s.includes("scale"));l=Object.assign(Object.assign({},c(t,v)),{easing:"linear"}),u&&(u.generator=t,u.generatorStartTime=performance.now())}if(!l){l={easing:"ease",duration:c(i(0,100)).overshootDuration}}return l}}}}((({stiffness:t=s,damping:e=i,mass:n=c,from:r=0,to:u=1,velocity:l=0,restSpeed:h,restDistance:f}={})=>{l=l?a(l):0;const g={done:!1,hasReachedTarget:!1,current:r,target:u},d=u-r,p=Math.sqrt(t/n)/1e3,m=((t=s,e=i,n=c)=>e/(2*Math.sqrt(t*n)))(t,e,n),v=Math.abs(d)<5;let M;if(h||(h=v?.01:2),f||(f=v?.005:.5),m<1){const t=p*Math.sqrt(1-m*m);M=e=>u-Math.exp(-m*p*e)*((m*p*d-l)/t*Math.sin(t*e)+d*Math.cos(t*e))}else M=t=>u-Math.exp(-p*t)*(d+(p*d-l)*t);return t=>{g.current=M(t);const e=0===t?l:o(M,t,g.current),n=Math.abs(e)<=h,a=Math.abs(u-g.current)<=f;var s,i,c;return g.done=n&&a,g.hasReachedTarget=(s=r,i=u,c=g.current,s<i&&c>=i||s>i&&c<=i),g}}));export{w as spring};

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

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

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

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib = require('tslib');

@@ -6,0 +4,0 @@ var events = require('../utils/events.cjs.js');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var events = require('../utils/events.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib = require('tslib');

@@ -6,0 +4,0 @@ var heyListen = require('hey-listen');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const motionEvent = (name, target) => new CustomEvent(name, { detail: { target } });

@@ -6,0 +4,0 @@ function dispatchPointerEvent(element, name, event) {

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function hasChanged(a, b) {

@@ -6,0 +4,0 @@ if (typeof a !== typeof b)

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function isVariant(definition) {

@@ -6,0 +4,0 @@ return typeof definition === "object";

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var isVariant = require('./is-variant.cjs.js');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib = require('tslib');

@@ -6,0 +4,0 @@ var heyListen = require('hey-listen');

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function compareByTime(a, b) {

@@ -6,0 +4,0 @@ if (a.at === b.at) {

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function resolveElements(elements, selectorCache) {

@@ -6,0 +4,0 @@ var _a;

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utils = require('@motionone/utils');

@@ -6,0 +4,0 @@ var animation = require('@motionone/animation');

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

let animation;
let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, } = options;
let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = options;
const data = getAnimationData(element);

@@ -196,2 +196,4 @@ const valueIsTransform = isTransform(key);

motionValue.setAnimation(animation);
if (animation && !autoplay)
animation.pause();
return animation;

@@ -198,0 +200,0 @@ };

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

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

"dependencies": {
"@motionone/animation": "^10.16.3",
"@motionone/generators": "^10.16.4",
"@motionone/types": "^10.16.3",
"@motionone/utils": "^10.16.3",
"@motionone/animation": "^10.17.0",
"@motionone/generators": "^10.17.0",
"@motionone/types": "^10.17.0",
"@motionone/utils": "^10.17.0",
"hey-listen": "^1.0.8",

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

"path": "./dist/size-animate.js",
"maxSize": "3.96 kB"
"maxSize": "4.1 kB"
},

@@ -38,3 +38,3 @@ {

"path": "./dist/size-timeline.js",
"maxSize": "4.8 kB"
"maxSize": "4.82 kB"
},

@@ -47,3 +47,3 @@ {

"path": "./dist/size-webpack-animate.js",
"maxSize": "3.9 kB"
"maxSize": "3.94 kB"
},

@@ -63,3 +63,3 @@ {

],
"gitHead": "1b73773be02af31fedb8ac4b5d391650d06f4094"
"gitHead": "2775786f4f0ba21cbf222d72a68263c7627c4825"
}
import type { AnimationOptions, BasicAnimationControls, UnresolvedValueKeyframe, OptionResolver } from "@motionone/types";
import type { NextTime } from "../timeline/types";
import { ValueKeyframe } from "@motionone/types";
export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export interface CSSStyleDeclarationWithTransform extends Omit<CSSStyleDeclaration, "direction" | "transition"> {

@@ -18,28 +18,28 @@ x: number | string;

}
export declare type StyleAnimationOptions = {
export type StyleAnimationOptions = {
[K in keyof CSSStyleDeclarationWithTransform]?: AnimationOptions;
};
export declare type VariableAnimationOptions = {
export type VariableAnimationOptions = {
[key: `--${string}`]: AnimationOptions;
};
export declare type AnimationOptionsWithOverrides = StyleAnimationOptions & VariableAnimationOptions & AnimationOptions;
export declare type ValueKeyframesDefinition = ValueKeyframe | ValueKeyframe[] | UnresolvedValueKeyframe[];
export declare type StyleKeyframes = {
export type AnimationOptionsWithOverrides = StyleAnimationOptions & VariableAnimationOptions & AnimationOptions;
export type ValueKeyframesDefinition = ValueKeyframe | ValueKeyframe[] | UnresolvedValueKeyframe[];
export type StyleKeyframes = {
[K in keyof CSSStyleDeclarationWithTransform]?: ValueKeyframe | ValueKeyframe[];
};
export declare type VariableKeyframes = {
export type VariableKeyframes = {
[key: `--${string}`]: ValueKeyframe | ValueKeyframe[];
};
export declare type MotionKeyframes = StyleKeyframes & VariableKeyframes;
export declare type StyleKeyframesDefinition = {
export type MotionKeyframes = StyleKeyframes & VariableKeyframes;
export type StyleKeyframesDefinition = {
[K in keyof CSSStyleDeclarationWithTransform]?: ValueKeyframesDefinition;
};
export declare type VariableKeyframesDefinition = {
export type VariableKeyframesDefinition = {
[key: `--${string}`]: ValueKeyframesDefinition;
};
export declare type MotionKeyframesDefinition = StyleKeyframesDefinition & VariableKeyframesDefinition;
export type MotionKeyframesDefinition = StyleKeyframesDefinition & VariableKeyframesDefinition;
export interface AnimationWithCommitStyles extends Animation {
commitStyles: VoidFunction;
}
export declare type AnimationListOptions = Omit<AnimationOptionsWithOverrides, "delay" | "direction" | "repeat"> & {
export type AnimationListOptions = Omit<AnimationOptionsWithOverrides, "delay" | "direction" | "repeat"> & {
delay?: number | OptionResolver<number>;

@@ -53,6 +53,6 @@ at?: NextTime;

}
export declare type CssPropertyDefinitionMap = {
export type CssPropertyDefinitionMap = {
[key: string]: CssPropertyDefinition;
};
export declare type AnimationFactory = () => BasicAnimationControls | undefined;
export type AnimationFactory = () => BasicAnimationControls | undefined;
//# sourceMappingURL=types.d.ts.map

@@ -8,5 +8,5 @@ declare const featureTests: {

};
declare type FeatureTests = Record<keyof typeof featureTests, () => boolean>;
type FeatureTests = Record<keyof typeof featureTests, () => boolean>;
export declare const supports: FeatureTests;
export {};
//# sourceMappingURL=feature-detection.d.ts.map
import { ElementOrSelector } from "../types";
export declare type ViewChangeHandler = (entry: IntersectionObserverEntry) => void;
export type ViewChangeHandler = (entry: IntersectionObserverEntry) => void;
export interface InViewOptions {

@@ -4,0 +4,0 @@ root?: Element | Document;

@@ -10,3 +10,3 @@ export interface Size {

}
export declare type ResizeHandler<I> = (info: ResizeInfo<I>) => void;
export type ResizeHandler<I> = (info: ResizeInfo<I>) => void;
//# sourceMappingURL=types.d.ts.map
import { AnimationControls } from "@motionone/types";
import { OnScroll, ScrollOptions } from "./types";
export declare type ScrollTargets = Array<HTMLElement>;
export type ScrollTargets = Array<HTMLElement>;
export declare function scroll(controls: AnimationControls, options?: ScrollOptions): VoidFunction;
export declare function scroll(onScroll: OnScroll, options?: ScrollOptions): VoidFunction;
//# sourceMappingURL=index.d.ts.map

@@ -19,4 +19,4 @@ import { EasingFunction } from "@motionone/types";

}
export declare type OnScroll = (info: ScrollInfo) => void;
export declare type OnScrollHandler = {
export type OnScroll = (info: ScrollInfo) => void;
export type OnScrollHandler = {
measure: () => void;

@@ -26,10 +26,10 @@ update: (time: number) => void;

};
export declare type SupportedEdgeUnit = "px" | "vw" | "vh" | "%";
export declare type EdgeUnit = `${number}${SupportedEdgeUnit}`;
export declare type NamedEdges = "start" | "end" | "center";
export declare type EdgeString = NamedEdges | EdgeUnit | `${number}`;
export declare type Edge = EdgeString | number;
export declare type ProgressIntersection = [number, number];
export declare type Intersection = `${Edge} ${Edge}`;
export declare type ScrollOffset = Array<Edge | Intersection | ProgressIntersection>;
export type SupportedEdgeUnit = "px" | "vw" | "vh" | "%";
export type EdgeUnit = `${number}${SupportedEdgeUnit}`;
export type NamedEdges = "start" | "end" | "center";
export type EdgeString = NamedEdges | EdgeUnit | `${number}`;
export type Edge = EdgeString | number;
export type ProgressIntersection = [number, number];
export type Intersection = `${Edge} ${Edge}`;
export type ScrollOffset = Array<Edge | Intersection | ProgressIntersection>;
export interface ScrollOptions {

@@ -36,0 +36,0 @@ container?: HTMLElement;

@@ -37,3 +37,3 @@ import { AnimationOptionsWithOverrides, MotionKeyframes, MotionKeyframesDefinition } from "../animate/types";

}
export declare type Variant = MotionKeyframesDefinition & {
export type Variant = MotionKeyframesDefinition & {
transition?: AnimationOptionsWithOverrides;

@@ -44,11 +44,11 @@ };

}
export declare type VariantDefinition = Variant | string;
export declare type MotionEventNames = "motionstart" | "motioncomplete" | "hoverstart" | "hoverend" | "pressstart" | "pressend" | "viewenter" | "viewleave";
export declare type MotionEvent = CustomEvent<{
export type VariantDefinition = Variant | string;
export type MotionEventNames = "motionstart" | "motioncomplete" | "hoverstart" | "hoverend" | "pressstart" | "pressend" | "viewenter" | "viewleave";
export type MotionEvent = CustomEvent<{
target: Variant;
}>;
export declare type CustomPointerEvent = CustomEvent<{
export type CustomPointerEvent = CustomEvent<{
originalEvent: PointerEvent;
}>;
export declare type ViewEvent = CustomEvent<{
export type ViewEvent = CustomEvent<{
originalEntry: IntersectionObserverEntry;

@@ -55,0 +55,0 @@ }>;

import type { AnimationOptions, PlaybackOptions } from "@motionone/types";
import type { AnimationOptionsWithOverrides, ValueKeyframesDefinition } from "../animate/types";
import type { TimelineDefinition } from "./types";
declare type AnimateStyleDefinition = [
type AnimateStyleDefinition = [
Element,

@@ -10,3 +10,3 @@ string,

];
export declare type TimelineOptions = PlaybackOptions & {
export type TimelineOptions = PlaybackOptions & {
duration?: number;

@@ -13,0 +13,0 @@ defaultOptions?: AnimationOptionsWithOverrides;

@@ -8,9 +8,9 @@ import type { AnimationListOptions, MotionKeyframesDefinition } from "../animate/types";

}
export declare type TimelineSegment = [ElementOrSelector, MotionKeyframesDefinition] | [ElementOrSelector, MotionKeyframesDefinition, AnimationListOptions] | string | AnnotatedLabel;
export declare type TimelineDefinition = TimelineSegment[];
export declare type NextTime = number | "<" | `+${number}` | `-${number}` | `${string}`;
export type TimelineSegment = [ElementOrSelector, MotionKeyframesDefinition] | [ElementOrSelector, MotionKeyframesDefinition, AnimationListOptions] | string | AnnotatedLabel;
export type TimelineDefinition = TimelineSegment[];
export type NextTime = number | "<" | `+${number}` | `-${number}` | `${string}`;
export interface ElementSequence {
[key: string]: ValueSequence;
}
export declare type AbsoluteKeyframe = {
export type AbsoluteKeyframe = {
value: string | number | null;

@@ -20,3 +20,3 @@ at: number;

};
export declare type ValueSequence = AbsoluteKeyframe[];
export type ValueSequence = AbsoluteKeyframe[];
//# sourceMappingURL=types.d.ts.map

@@ -6,3 +6,3 @@ import type { MotionValue } from "@motionone/types";

}
export declare type ElementOrSelector = Element | Element[] | NodeListOf<Element> | string;
export type ElementOrSelector = Element | Element[] | NodeListOf<Element> | string;
//# sourceMappingURL=types.d.ts.map
import type { Easing, OptionResolver, EasingFunction } from "@motionone/types";
export declare type From = "first" | "last" | "center" | number;
export declare type StaggerOptions = {
export type From = "first" | "last" | "center" | number;
export type StaggerOptions = {
start?: number;

@@ -5,0 +5,0 @@ from?: From;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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