framer-motion 6.5.1 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -11
- package/dist/cjs/index.js +19 -25
- package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -2
- package/dist/es/components/AnimatePresence/use-presence.mjs +1 -2
- package/dist/es/context/MotionContext/create.mjs +1 -1
- package/dist/es/gestures/PanSession.mjs +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +2 -1
- package/dist/es/gestures/drag/utils/constraints.mjs +1 -1
- package/dist/es/projection/animation/mix-values.mjs +2 -2
- package/dist/es/projection/node/create-projection-node.mjs +1 -1
- package/dist/es/render/dom/utils/unit-conversion.mjs +1 -1
- package/dist/es/render/html/visual-element.mjs +1 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/use-animation-frame.mjs +5 -7
- package/dist/es/value/index.mjs +1 -1
- package/dist/es/value/scroll/use-element-scroll.mjs +3 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs +3 -0
- package/dist/framer-motion.dev.js +51 -80
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/projection.dev.js +7 -7
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -2
- package/dist/size-webpack-m.js +0 -1
- package/dist/three-entry.d.ts +2 -2
- package/package.json +17 -24
- package/dist/es/utils/use-id.mjs +0 -15
- package/dist/size-webpack-dom-max.js.LICENSE.txt +0 -14
- package/dist/size-webpack-m.js.LICENSE.txt +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -2566,7 +2566,7 @@ interface VisualElement<Instance = any, RenderState = any> extends LifecycleMana
|
|
|
2566
2566
|
current: Instance | null;
|
|
2567
2567
|
manuallyAnimateOnMount: boolean;
|
|
2568
2568
|
blockInitialAnimation?: boolean;
|
|
2569
|
-
presenceId:
|
|
2569
|
+
presenceId: string | undefined;
|
|
2570
2570
|
isMounted(): boolean;
|
|
2571
2571
|
mount(instance: Instance): void;
|
|
2572
2572
|
unmount(): void;
|
|
@@ -2642,7 +2642,7 @@ declare type VisualElementOptions<Instance, RenderState = any> = {
|
|
|
2642
2642
|
visualState: VisualState<Instance, RenderState>;
|
|
2643
2643
|
parent?: VisualElement<unknown>;
|
|
2644
2644
|
variantParent?: VisualElement<unknown>;
|
|
2645
|
-
presenceId?:
|
|
2645
|
+
presenceId?: string | undefined;
|
|
2646
2646
|
props: MotionProps;
|
|
2647
2647
|
blockInitialAnimation?: boolean;
|
|
2648
2648
|
shouldReduceMotion?: boolean | null;
|
|
@@ -3333,7 +3333,9 @@ declare const Reorder: {
|
|
|
3333
3333
|
unselectable?: "off" | "on" | undefined;
|
|
3334
3334
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
3335
3335
|
is?: string | undefined;
|
|
3336
|
-
} & MotionProps &
|
|
3336
|
+
} & MotionProps & {
|
|
3337
|
+
children?: React$1.ReactNode;
|
|
3338
|
+
} & React$1.RefAttributes<any>>;
|
|
3337
3339
|
Item: React$1.ForwardRefExoticComponent<Props$1<unknown> & {
|
|
3338
3340
|
color?: string | undefined;
|
|
3339
3341
|
translate?: "no" | "yes" | undefined;
|
|
@@ -3586,7 +3588,9 @@ declare const Reorder: {
|
|
|
3586
3588
|
unselectable?: "off" | "on" | undefined;
|
|
3587
3589
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
3588
3590
|
is?: string | undefined;
|
|
3589
|
-
} & MotionProps &
|
|
3591
|
+
} & MotionProps & {
|
|
3592
|
+
children?: React$1.ReactNode;
|
|
3593
|
+
} & React$1.RefAttributes<any>>;
|
|
3590
3594
|
};
|
|
3591
3595
|
|
|
3592
3596
|
declare const animations: FeatureComponents;
|
|
@@ -3700,6 +3704,12 @@ interface TransformOptions<T> {
|
|
|
3700
3704
|
* @public
|
|
3701
3705
|
*/
|
|
3702
3706
|
ease?: Easing$1 | Easing$1[];
|
|
3707
|
+
/**
|
|
3708
|
+
* Provide a function that can interpolate between any two values in the provided range.
|
|
3709
|
+
*
|
|
3710
|
+
* @public
|
|
3711
|
+
*/
|
|
3712
|
+
mixer?: (from: T, to: T) => (v: number) => any;
|
|
3703
3713
|
}
|
|
3704
3714
|
/**
|
|
3705
3715
|
* Transforms numbers into other values by mapping them from an input range to an output range.
|
|
@@ -3905,6 +3915,9 @@ declare function useScroll({ container, target, ...options }?: UseScrollOptions)
|
|
|
3905
3915
|
scrollYProgress: MotionValue<number>;
|
|
3906
3916
|
};
|
|
3907
3917
|
|
|
3918
|
+
/**
|
|
3919
|
+
* @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })
|
|
3920
|
+
*/
|
|
3908
3921
|
declare function useElementScroll(ref: RefObject<HTMLElement>): {
|
|
3909
3922
|
scrollX: MotionValue<number>;
|
|
3910
3923
|
scrollY: MotionValue<number>;
|
|
@@ -3912,6 +3925,9 @@ declare function useElementScroll(ref: RefObject<HTMLElement>): {
|
|
|
3912
3925
|
scrollYProgress: MotionValue<number>;
|
|
3913
3926
|
};
|
|
3914
3927
|
|
|
3928
|
+
/**
|
|
3929
|
+
* @deprecated useViewportScroll is deprecated. Convert to useScroll()
|
|
3930
|
+
*/
|
|
3915
3931
|
declare function useViewportScroll(): {
|
|
3916
3932
|
scrollX: MotionValue<number>;
|
|
3917
3933
|
scrollY: MotionValue<number>;
|
|
@@ -4034,10 +4050,10 @@ declare function isValidMotionProp(key: string): boolean;
|
|
|
4034
4050
|
* @public
|
|
4035
4051
|
*/
|
|
4036
4052
|
interface PresenceContextProps {
|
|
4037
|
-
id:
|
|
4053
|
+
id: string;
|
|
4038
4054
|
isPresent: boolean;
|
|
4039
|
-
register: (id:
|
|
4040
|
-
onExitComplete?: (id:
|
|
4055
|
+
register: (id: string) => () => void;
|
|
4056
|
+
onExitComplete?: (id: string) => void;
|
|
4041
4057
|
initial?: false | VariantLabels;
|
|
4042
4058
|
custom?: any;
|
|
4043
4059
|
}
|
package/dist/projection.dev.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Projection = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
9
9
|
|
|
10
10
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -408,8 +408,8 @@
|
|
|
408
408
|
const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);
|
|
409
409
|
const sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);
|
|
410
410
|
const floatRegex = /(-)?([\d]*\.?[\d])+/g;
|
|
411
|
-
const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2
|
|
412
|
-
const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2
|
|
411
|
+
const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
|
|
412
|
+
const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
413
413
|
function isString(v) {
|
|
414
414
|
return typeof v === 'string';
|
|
415
415
|
}
|
|
@@ -1281,7 +1281,7 @@
|
|
|
1281
1281
|
* This will be replaced by the build step with the latest version number.
|
|
1282
1282
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1283
1283
|
*/
|
|
1284
|
-
this.version = "
|
|
1284
|
+
this.version = "7.0.2";
|
|
1285
1285
|
/**
|
|
1286
1286
|
* Duration, in milliseconds, since last updating frame.
|
|
1287
1287
|
*
|
|
@@ -2643,9 +2643,9 @@
|
|
|
2643
2643
|
var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, checkIsScrollRoot = _a.checkIsScrollRoot, resetTransform = _a.resetTransform;
|
|
2644
2644
|
return /** @class */ (function () {
|
|
2645
2645
|
function ProjectionNode(id, latestValues, parent) {
|
|
2646
|
-
var _this = this;
|
|
2647
2646
|
if (latestValues === void 0) { latestValues = {}; }
|
|
2648
2647
|
if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); }
|
|
2648
|
+
var _this = this;
|
|
2649
2649
|
/**
|
|
2650
2650
|
* A Set containing all this component's children. This is used to iterate
|
|
2651
2651
|
* through the children.
|
|
@@ -4338,7 +4338,7 @@
|
|
|
4338
4338
|
* and warn against mismatches.
|
|
4339
4339
|
*/
|
|
4340
4340
|
{
|
|
4341
|
-
warnOnce(nextValue.version === "
|
|
4341
|
+
warnOnce(nextValue.version === "7.0.2", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 7.0.2 may not work as expected."));
|
|
4342
4342
|
}
|
|
4343
4343
|
}
|
|
4344
4344
|
else if (isMotionValue(prevValue)) {
|
|
@@ -5234,9 +5234,9 @@
|
|
|
5234
5234
|
* can be animated by Motion.
|
|
5235
5235
|
*/
|
|
5236
5236
|
makeTargetAnimatable: function (element, _a, _b, isMounted) {
|
|
5237
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
5237
5238
|
var transformValues = _b.transformValues;
|
|
5238
5239
|
if (isMounted === void 0) { isMounted = true; }
|
|
5239
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
5240
5240
|
var origin = getOrigin(target, transition || {}, element);
|
|
5241
5241
|
/**
|
|
5242
5242
|
* If Framer has provided a function to convert `Color` etc value types, convert them
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t,useRef as n,useContext as e,useEffect as r}from"react";var o=function(){return(o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function i(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function a(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function u(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function s(t){return"object"==typeof t&&"function"==typeof t.start}var c=t(null);var l=0,f=function(){return l++},d=function(){return t=f,null===(e=n(null)).current&&(e.current=t()),e.current;var t,e};var p=function(t){return Array.isArray(t)};function v(t,n){if(!Array.isArray(n))return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}const m=(t,n,e)=>Math.min(Math.max(e,t),n);function h({duration:t=800,bounce:n=.25,velocity:e=0,mass:r=1}){let o,i,a=1-n;a=m(.05,1,a),t=m(.01,10,t/1e3),a<1?(o=n=>{const r=n*a,o=r*t;return.001-(r-e)/g(n,a)*Math.exp(-o)},i=n=>{const r=n*a*t,i=r*e+e,u=Math.pow(a,2)*Math.pow(n,2)*t,s=Math.exp(-r),c=g(Math.pow(n,2),a);return(.001-o(n)>0?-1:1)*((i-u)*s)/c}):(o=n=>Math.exp(-n*t)*((n-e)*t+1)-.001,i=n=>Math.exp(-n*t)*(t*t*(e-n)));const u=function(t,n,e){let r=e;for(let e=1;e<12;e++)r-=t(r)/n(r);return r}(o,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const n=Math.pow(u,2)*r;return{stiffness:n,damping:2*a*Math.sqrt(r*n),duration:t}}}function g(t,n){return t*Math.sqrt(1-n*n)}const y=["duration","bounce"],b=["stiffness","damping","mass"];function w(t,n){return n.some(n=>void 0!==t[n])}function A(t){var{from:n=0,to:e=1,restSpeed:r=2,restDelta:o}=t,a=i(t,["from","to","restSpeed","restDelta"]);const u={done:!1,value:n};let{stiffness:s,damping:c,mass:l,velocity:f,duration:d,isResolvedFromDuration:p}=function(t){let n=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!w(t,b)&&w(t,y)){const e=h(t);n=Object.assign(Object.assign(Object.assign({},n),e),{velocity:0,mass:1}),n.isResolvedFromDuration=!0}return n}(a),v=V,m=V;function A(){const t=f?-f/1e3:0,r=e-n,i=c/(2*Math.sqrt(s*l)),a=Math.sqrt(s/l)/1e3;if(void 0===o&&(o=Math.min(Math.abs(e-n)/100,.4)),i<1){const n=g(a,i);v=o=>{const u=Math.exp(-i*a*o);return e-u*((t+i*a*r)/n*Math.sin(n*o)+r*Math.cos(n*o))},m=e=>{const o=Math.exp(-i*a*e);return i*a*o*(Math.sin(n*e)*(t+i*a*r)/n+r*Math.cos(n*e))-o*(Math.cos(n*e)*(t+i*a*r)-n*r*Math.sin(n*e))}}else if(1===i)v=n=>e-Math.exp(-a*n)*(r+(t+a*r)*n);else{const n=a*Math.sqrt(i*i-1);v=o=>{const u=Math.exp(-i*a*o),s=Math.min(n*o,300);return e-u*((t+i*a*r)*Math.sinh(s)+n*r*Math.cosh(s))/n}}}return A(),{next:t=>{const n=v(t);if(p)u.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=r,s=Math.abs(e-n)<=o;u.done=a&&s}return u.value=u.done?e:n,u},flipTarget:()=>{f=-f,[n,e]=[e,n],A()}}}A.needsInterpolation=(t,n)=>"string"==typeof t||"string"==typeof n;const V=t=>0,x=(t,n,e)=>{const r=n-t;return 0===r?1:(e-t)/r},O=(t,n,e)=>-e*t+e*n+t,S=(t,n)=>e=>Math.max(Math.min(e,n),t),M=t=>t%1?Number(t.toFixed(5)):t,T=/(-)?([\d]*\.?[\d])+/g,E=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,C=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function P(t){return"string"==typeof t}const k={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},I=Object.assign(Object.assign({},k),{transform:S(0,1)}),F=Object.assign(Object.assign({},k),{default:1}),R=t=>({test:n=>P(n)&&n.endsWith(t)&&1===n.split(" ").length,parse:parseFloat,transform:n=>`${n}${t}`}),j=R("deg"),D=R("%"),B=R("px"),L=R("vh"),U=R("vw"),N=Object.assign(Object.assign({},D),{parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)}),Y=(t,n)=>e=>Boolean(P(e)&&C.test(e)&&e.startsWith(t)||n&&Object.prototype.hasOwnProperty.call(e,n)),z=(t,n,e)=>r=>{if(!P(r))return r;const[o,i,a,u]=r.match(T);return{[t]:parseFloat(o),[n]:parseFloat(i),[e]:parseFloat(a),alpha:void 0!==u?parseFloat(u):1}},X={test:Y("hsl","hue"),parse:z("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:e,alpha:r=1})=>"hsla("+Math.round(t)+", "+D.transform(M(n))+", "+D.transform(M(e))+", "+M(I.transform(r))+")"},H=S(0,255),W=Object.assign(Object.assign({},k),{transform:t=>Math.round(H(t))}),Z={test:Y("rgb","red"),parse:z("red","green","blue"),transform:({red:t,green:n,blue:e,alpha:r=1})=>"rgba("+W.transform(t)+", "+W.transform(n)+", "+W.transform(e)+", "+M(I.transform(r))+")"};const $={test:Y("#"),parse:function(t){let n="",e="",r="",o="";return t.length>5?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),n+=n,e+=e,r+=r,o+=o),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Z.transform},q={test:t=>Z.test(t)||$.test(t)||X.test(t),parse:t=>Z.test(t)?Z.parse(t):X.test(t)?X.parse(t):$.parse(t),transform:t=>P(t)?t:t.hasOwnProperty("red")?Z.transform(t):X.transform(t)};function K(t){"number"==typeof t&&(t=""+t);const n=[];let e=0;const r=t.match(E);r&&(e=r.length,t=t.replace(E,"${c}"),n.push(...r.map(q.parse)));const o=t.match(T);return o&&(t=t.replace(T,"${n}"),n.push(...o.map(k.parse))),{values:n,numColors:e,tokenised:t}}function G(t){return K(t).values}function J(t){const{values:n,numColors:e,tokenised:r}=K(t),o=n.length;return t=>{let n=r;for(let r=0;r<o;r++)n=n.replace(r<e?"${c}":"${n}",r<e?q.transform(t[r]):M(t[r]));return n}}const _=t=>"number"==typeof t?0:t;const Q={test:function(t){var n,e,r,o;return isNaN(t)&&P(t)&&(null!==(e=null===(n=t.match(T))||void 0===n?void 0:n.length)&&void 0!==e?e:0)+(null!==(o=null===(r=t.match(E))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:G,createTransformer:J,getAnimatableNone:function(t){const n=G(t);return J(t)(n.map(_))}},tt=new Set(["brightness","contrast","saturate","opacity"]);function nt(t){let[n,e]=t.slice(0,-1).split("(");if("drop-shadow"===n)return t;const[r]=e.match(T)||[];if(!r)return t;const o=e.replace(r,"");let i=tt.has(n)?1:0;return r!==e&&(i*=100),n+"("+i+o+")"}const et=/([a-z-]*)\(.*?\)/g,rt=Object.assign(Object.assign({},Q),{getAnimatableNone:t=>{const n=t.match(et);return n?n.map(nt).join(" "):t}});function ot(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function it({hue:t,saturation:n,lightness:e,alpha:r}){t/=360,e/=100;let o=0,i=0,a=0;if(n/=100){const r=e<.5?e*(1+n):e+n-e*n,u=2*e-r;o=ot(u,r,t+1/3),i=ot(u,r,t),a=ot(u,r,t-1/3)}else o=i=a=e;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const at=(t,n,e)=>{const r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},ut=[$,Z,X],st=t=>ut.find(n=>n.test(t)),ct=(t,n)=>{let e=st(t),r=st(n),o=e.parse(t),i=r.parse(n);e===X&&(o=it(o),e=Z),r===X&&(i=it(i),r=Z);const a=Object.assign({},o);return t=>{for(const n in a)"alpha"!==n&&(a[n]=at(o[n],i[n],t));return a.alpha=O(o.alpha,i.alpha,t),e.transform(a)}},lt=(t,n)=>e=>n(t(e)),ft=(...t)=>t.reduce(lt);function dt(t,n){return"number"==typeof t?e=>O(t,n,e):q.test(t)?ct(t,n):ht(t,n)}const pt=(t,n)=>{const e=[...t],r=e.length,o=t.map((t,e)=>dt(t,n[e]));return t=>{for(let n=0;n<r;n++)e[n]=o[n](t);return e}},vt=(t,n)=>{const e=Object.assign(Object.assign({},t),n),r={};for(const o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=dt(t[o],n[o]));return t=>{for(const n in r)e[n]=r[n](t);return e}};function mt(t){const n=Q.parse(t),e=n.length;let r=0,o=0,i=0;for(let t=0;t<e;t++)r||"number"==typeof n[t]?r++:void 0!==n[t].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}const ht=(t,n)=>{const e=Q.createTransformer(n),r=mt(t),o=mt(n);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?ft(pt(r.parsed,o.parsed),e):e=>""+(e>0?n:t)},gt=(t,n)=>e=>O(t,n,e);function yt(t,n,e){const r=[],o=e||("number"==typeof(i=t[0])?gt:"string"==typeof i?q.test(i)?ct:ht:Array.isArray(i)?pt:"object"==typeof i?vt:void 0);var i;const a=t.length-1;for(let e=0;e<a;e++){let i=o(t[e],t[e+1]);if(n){const t=Array.isArray(n)?n[e]:n;i=ft(t,i)}r.push(i)}return r}function bt(t,n,{clamp:e=!0,ease:r,mixer:o}={}){const i=t.length;n.length,!r||!Array.isArray(r)||r.length,t[0]>t[i-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());const a=yt(n,r,o),u=2===i?function([t,n],[e]){return r=>e(x(t,n,r))}(t,a):function(t,n){const e=t.length,r=e-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){let n=1;for(;n<e&&!(t[n]>o||n===r);n++);i=n-1}const u=x(t[i],t[i+1],o);return n[i](u)}}(t,a);return e?n=>u(m(t[0],t[i-1],n)):u}const wt=t=>n=>1-t(1-n),At=t=>n=>n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2,Vt=t=>n=>n*n*((t+1)*n-t),xt=t=>t,Ot=(St=2,t=>Math.pow(t,St));var St;const Mt=wt(Ot),Tt=At(Ot),Et=t=>1-Math.sin(Math.acos(t)),Ct=wt(Et),Pt=At(Ct),kt=Vt(1.525),It=wt(kt),Ft=At(kt),Rt=(t=>{const n=Vt(t);return t=>(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),jt=t=>{if(1===t||0===t)return t;const n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Dt=wt(jt);function Bt(t,n){return t.map(()=>n||Tt).splice(0,t.length-1)}function Lt({from:t=0,to:n=1,ease:e,offset:r,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(n)?n:[t,n],u=function(t,n){return t.map(t=>t*n)}(r&&r.length===a.length?r:function(t){const n=t.length;return t.map((t,e)=>0!==e?e/(n-1):0)}(a),o);function s(){return bt(u,a,{ease:Array.isArray(e)?e:Bt(a,e)})}let c=s();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=s()}}}const Ut={keyframes:Lt,spring:A,decay:function({velocity:t=0,from:n=0,power:e=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:n};let u=e*t;const s=n+u,c=void 0===i?s:i(s);return c!==s&&(u=c-n),{next:t=>{const n=-u*Math.exp(-t/r);return a.done=!(n>o||n<-o),a.value=a.done?c:c+n,a},flipTarget:()=>{}}}};const Nt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Yt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Nt()),1/60*1e3);let zt=!0,Xt=!1,Ht=!1;const Wt={delta:0,timestamp:0},Zt=["read","update","preRender","render","postRender"],$t=Zt.reduce((t,n)=>(t[n]=function(t){let n=[],e=[],r=0,o=!1,i=!1;const a=new WeakSet,u={schedule:(t,i=!1,u=!1)=>{const s=u&&o,c=s?n:e;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),s&&o&&(r=n.length)),t},cancel:t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1),a.delete(t)},process:s=>{if(o)i=!0;else{if(o=!0,[n,e]=[e,n],e.length=0,r=n.length,r)for(let e=0;e<r;e++){const r=n[e];r(s),a.has(r)&&(u.schedule(r),t())}o=!1,i&&(i=!1,u.process(s))}}};return u}(()=>Xt=!0),t),{}),qt=Zt.reduce((t,n)=>{const e=$t[n];return t[n]=(t,n=!1,r=!1)=>(Xt||_t(),e.schedule(t,n,r)),t},{}),Kt=Zt.reduce((t,n)=>(t[n]=$t[n].cancel,t),{});Zt.reduce((t,n)=>(t[n]=()=>$t[n].process(Wt),t),{});const Gt=t=>$t[t].process(Wt),Jt=t=>{Xt=!1,Wt.delta=zt?1/60*1e3:Math.max(Math.min(t-Wt.timestamp,40),1),Wt.timestamp=t,Ht=!0,Zt.forEach(Gt),Ht=!1,Xt&&(zt=!1,Yt(Jt))},_t=()=>{Xt=!0,zt=!0,Ht||Yt(Jt)},Qt=()=>Wt;function tn(t,n,e=0){return t-n-e}const nn=t=>{const n=({delta:n})=>t(n);return{start:()=>qt.update(n,!0),stop:()=>Kt.update(n)}};function en(t){var n,e,{from:r,autoplay:o=!0,driver:a=nn,elapsed:u=0,repeat:s=0,repeatType:c="loop",repeatDelay:l=0,onPlay:f,onStop:d,onComplete:p,onRepeat:v,onUpdate:m}=t,h=i(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,y,b,{to:w}=h,V=0,x=h.duration,O=!1,S=!0;const M=function(t){if(Array.isArray(t.to))return Lt;if(Ut[t.type])return Ut[t.type];const n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?Lt:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?A:Lt}(h);(null===(e=(n=M).needsInterpolation)||void 0===e?void 0:e.call(n,r,w))&&(b=bt([0,100],[r,w],{clamp:!1}),r=0,w=100);const T=M(Object.assign(Object.assign({},h),{from:r,to:w}));function E(){V++,"reverse"===c?(S=V%2==0,u=function(t,n,e=0,r=!0){return r?tn(n+-t,n,e):n-(t-n)+e}(u,x,l,S)):(u=tn(u,x,l),"mirror"===c&&T.flipTarget()),O=!1,v&&v()}function C(t){if(S||(t=-t),u+=t,!O){const t=T.next(Math.max(0,u));y=t.value,b&&(y=b(y)),O=S?t.done:u<=0}null==m||m(y),O&&(0===V&&(null!=x||(x=u)),V<s?function(t,n,e,r){return r?t>=n+e:t<=-e}(u,x,l,S)&&E():(g.stop(),p&&p()))}return o&&(null==f||f(),g=a(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function rn(t,n){return n?t*(1e3/n):0}const on=(t,n)=>1-3*n+3*t,an=(t,n)=>3*n-6*t,un=t=>3*t,sn=(t,n,e)=>((on(n,e)*t+an(n,e))*t+un(n))*t,cn=(t,n,e)=>3*on(n,e)*t*t+2*an(n,e)*t+un(n);function ln(t,n,e,r){if(t===n&&e===r)return xt;const o=new Float32Array(11);for(let n=0;n<11;++n)o[n]=sn(.1*n,t,e);function i(n){let r=0,i=1;for(;10!==i&&o[i]<=n;++i)r+=.1;--i;const a=r+.1*((n-o[i])/(o[i+1]-o[i])),u=cn(a,t,e);return u>=.001?function(t,n,e,r){for(let o=0;o<8;++o){const o=cn(n,e,r);if(0===o)return n;n-=(sn(n,e,r)-t)/o}return n}(n,a,t,e):0===u?a:function(t,n,e,r,o){let i,a,u=0;do{a=n+(e-n)/2,i=sn(a,r,o)-t,i>0?e=a:n=a}while(Math.abs(i)>1e-7&&++u<10);return a}(n,r,r+.1,t,e)}return t=>0===t||1===t?t:sn(i(t),n,r)}var fn=function(t){return 1e3*t},dn={linear:xt,easeIn:Ot,easeInOut:Tt,easeOut:Mt,circIn:Et,circInOut:Pt,circOut:Ct,backIn:kt,backInOut:Ft,backOut:It,anticipate:Rt,bounceIn:Dt,bounceInOut:t=>t<.5?.5*(1-jt(1-2*t)):.5*jt(2*t-1)+.5,bounceOut:jt},pn=function(t){if(Array.isArray(t)){t.length;var n=a(t,4);return ln(n[0],n[1],n[2],n[3])}return"string"==typeof t?dn[t]:t},vn=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!Q.test(n)||n.startsWith("url(")))},mn=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},hn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},gn=function(){return{type:"keyframes",ease:"linear",duration:.3}},yn=function(t){return{type:"keyframes",duration:.8,values:t}},bn={x:mn,y:mn,z:mn,rotate:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scaleX:hn,scaleY:hn,scale:hn,opacity:gn,backgroundColor:gn,color:gn,default:hn},wn=o(o({},k),{transform:Math.round}),An={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:j,rotateX:j,rotateY:j,rotateZ:j,scale:F,scaleX:F,scaleY:F,scaleZ:F,skew:j,skewX:j,skewY:j,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:I,originX:N,originY:N,originZ:B,zIndex:wn,fillOpacity:I,strokeOpacity:I,numOctaves:wn},Vn=o(o({},An),{color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:rt,WebkitFilter:rt}),xn=function(t){return Vn[t]};function On(t,n){var e,r=xn(t);return r!==rt&&(r=Q),null===(e=r.getAnimatableNone)||void 0===e?void 0:e.call(r,n)}var Sn=!1,Mn=function(t){return p(t)?t[t.length-1]||0:t};function Tn(t){var n=t.ease,e=t.times,r=t.yoyo,a=t.flip,u=t.loop,s=i(t,["ease","times","yoyo","flip","loop"]),c=o({},s);return e&&(c.offset=e),s.duration&&(c.duration=fn(s.duration)),s.repeatDelay&&(c.repeatDelay=fn(s.repeatDelay)),n&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(n)?n.map(pn):pn(n)),"tween"===s.type&&(c.type="keyframes"),(r||u||a)&&(r?c.repeatType="reverse":u?c.repeatType="loop":a&&(c.repeatType="mirror"),c.repeat=u||r||a||s.repeat),"spring"!==s.type&&(c.type="keyframes"),c}function En(t,n,e){var r,s,c,l;return Array.isArray(n.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=u([],a(t.to),!1),t.to[0]=t.from)}(n),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var n=i(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=o(o({},t),(s=e,c=n.to,l=p(c)?yn:bn[s]||bn.default,o({to:c},l(c))))),o(o({},n),Tn(t))}function Cn(t,n,e,r,i){var a,u=In(r,t),s=null!==(a=u.from)&&void 0!==a?a:n.get(),c=vn(t,e);return"none"===s&&c&&"string"==typeof e?s=On(t,e):Pn(s)&&"string"==typeof e?s=kn(e):!Array.isArray(e)&&Pn(e)&&"string"==typeof s&&(e=kn(s)),vn(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:i,onUpdate:function(t){return n.set(t)}};return"inertia"===u.type||"decay"===u.type?function({from:t=0,velocity:n=0,min:e,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:u=10,restDelta:s=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:d,onStop:p}){let v;function m(t){return void 0!==e&&t<e||void 0!==r&&t>r}function h(t){return void 0===e?r:void 0===r||Math.abs(e-t)<Math.abs(r-t)?e:r}function g(t){null==v||v.stop(),v=en(Object.assign(Object.assign({},t),{driver:l,onUpdate:n=>{var e;null==f||f(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:d,onStop:p}))}function y(t){g(Object.assign({type:"spring",stiffness:a,damping:u,restDelta:s},t))}if(m(t))y({from:t,velocity:n,to:h(t)});else{let r=o*n+t;void 0!==c&&(r=c(r));const a=h(r),u=a===e?-1:1;let l,f;const d=t=>{l=f,f=t,n=rn(t-l,Qt().delta),(1===u&&t>a||-1===u&&t<a)&&y({from:t,to:a,velocity:n})};g({type:"decay",from:t,velocity:n,timeConstant:i,power:o,restDelta:s,modifyTarget:c,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(o(o({},r),u)):en(o(o({},En(u,r,t)),{onUpdate:function(t){var n;r.onUpdate(t),null===(n=u.onUpdate)||void 0===n||n.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t,r,o=Mn(e);return n.set(o),i(),null===(t=null==u?void 0:u.onUpdate)||void 0===t||t.call(u,o),null===(r=null==u?void 0:u.onComplete)||void 0===r||r.call(u),{stop:function(){}}}}function Pn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function kn(t){return"number"==typeof t?0:On("",t)}function In(t,n){return t[n]||t.default||t}function Fn(t,n,e,r){return void 0===r&&(r={}),Sn&&(r={type:!1}),n.start((function(o){var i,a,u=Cn(t,n,e,r,o),s=function(t,n){var e,r;return null!==(r=null!==(e=(In(t,n)||{}).delay)&&void 0!==e?e:t.delay)&&void 0!==r?r:0}(r,t),c=function(){return a=u()};return s?i=window.setTimeout(c,fn(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var Rn=function(t){return/^0[^.\s]+$/.test(t)};var jn=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var n,e,r=this;return n=this.subscriptions,e=t,-1===n.indexOf(e)&&n.push(e),function(){return function(t,n){var e=t.indexOf(n);e>-1&&t.splice(e,1)}(r.subscriptions,t)}},t.prototype.notify=function(t,n,e){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,n,e);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,n,e)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Dn=function(){function t(t){var n,e=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new jn,this.velocityUpdateSubscribers=new jn,this.renderSubscribers=new jn,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t;var r=Qt(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,qt.postRender(e.scheduleVelocityCheck)),e.prev!==e.current&&e.updateSubscribers.notify(e.current),e.velocityUpdateSubscribers.getSize()&&e.velocityUpdateSubscribers.notify(e.getVelocity()),n&&e.renderSubscribers.notify(e.current)},this.scheduleVelocityCheck=function(){return qt.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current,e.velocityUpdateSubscribers.notify(e.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?rn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var n=this;return this.stop(),new Promise((function(e){n.hasAnimated=!0,n.stopAnimation=t(e)})).then((function(){return n.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Bn(t){return new Dn(t)}var Ln=function(t){return function(n){return n.test(t)}},Un=[k,B,D,j,U,L,{test:function(t){return"auto"===t},parse:function(t){return t}}],Nn=function(t){return Un.find(Ln(t))},Yn=u(u([],a(Un),!1),[q,Q],!1),zn=function(t){return Yn.find(Ln(t))};function Xn(t){return Array.isArray(t)}function Hn(t){return"string"==typeof t||Xn(t)}function Wn(t,n,e){var r=t.getProps();return function(t,n,e,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),"string"==typeof n&&(n=null===(i=t.variants)||void 0===i?void 0:i[n]),"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),n}(r,n,null!=e?e:r.custom,function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.get()})),n}(t),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(t))}function Zn(t){var n;return"function"==typeof(null===(n=t.animate)||void 0===n?void 0:n.start)||Hn(t.initial)||Hn(t.animate)||Hn(t.whileHover)||Hn(t.whileDrag)||Hn(t.whileTap)||Hn(t.whileFocus)||Hn(t.exit)}function $n(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,Bn(e))}function qn(t,n){if(n)return(n[t]||n.default||n).from}var Kn=["","X","Y","Z"],Gn=["transformPerspective","x","y","z"];function Jn(t,n){return Gn.indexOf(t)-Gn.indexOf(n)}["translate","scale","rotate","skew"].forEach((function(t){return Kn.forEach((function(n){return Gn.push(t+n)}))}));var _n=new Set(Gn);function Qn(t){return _n.has(t)}var te,ne=new Set(["originX","originY","originZ"]);function ee(t){return ne.has(t)}function re(t,n,e){var r;void 0===e&&(e={});var i=Wn(t,n,e.custom),u=(i||{}).transition,s=void 0===u?t.getDefaultTransition()||{}:u;e.transitionOverride&&(s=e.transitionOverride);var c=i?function(){return oe(t,i,e)}:function(){return Promise.resolve()},l=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,a=void 0===i?0:i,u=s.staggerChildren,c=s.staggerDirection;return function(t,n,e,r,i,a){void 0===e&&(e=0);void 0===r&&(r=0);void 0===i&&(i=1);var u=[],s=(t.variantChildren.size-1)*r,c=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),s-t*r};return Array.from(t.variantChildren).sort(ie).forEach((function(t,r){u.push(re(t,n,o(o({},a),{delay:e+c(r)})).then((function(){return t.notifyAnimationComplete(n)})))})),Promise.all(u)}(t,n,a+r,u,c,e)}:function(){return Promise.resolve()},f=s.when;if(f){var d=a("beforeChildren"===f?[c,l]:[l,c],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([c(),l(e.delay)])}function oe(t,n,e){var r,a=void 0===e?{}:e,u=a.delay,s=void 0===u?0:u,c=a.transitionOverride,l=a.type,f=t.makeTargetAnimatable(n),d=f.transition,p=void 0===d?t.getDefaultTransition():d,v=f.transitionEnd,m=i(f,["transition","transitionEnd"]);c&&(p=c);var h=[],g=l&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[l]);for(var y in m){var b=t.getValue(y),w=m[y];if(!(!b||void 0===w||g&&ae(g,y))){var A=o({delay:s},p);t.shouldReduceMotion&&Qn(y)&&(A=o(o({},A),{type:!1,delay:0}));var V=Fn(y,b,w,A);h.push(V)}}return Promise.all(h).then((function(){v&&function(t,n){var e=Wn(t,n),r=e?t.makeTargetAnimatable(e,!1):{},a=r.transitionEnd,u=void 0===a?{}:a;r.transition;var s=i(r,["transitionEnd","transition"]);for(var c in s=o(o({},s),u)){$n(t,c,Mn(s[c]))}}(t,v)}))}function ie(t,n){return t.sortNodePosition(n)}function ae(t,n){var e=t.protectedKeys,r=t.needsAnimating,o=e.hasOwnProperty(n)&&!0!==r[n];return r[n]=!1,o}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(te||(te={}));var ue=[te.Animate,te.InView,te.Focus,te.Hover,te.Tap,te.Drag,te.Exit],se=u([],a(ue),!1).reverse(),ce=ue.length;function le(t){return function(n){return Promise.all(n.map((function(n){var e=n.animation,r=n.options;return function(t,n,e){var r;if(void 0===e&&(e={}),t.notifyAnimationStart(n),Array.isArray(n)){var o=n.map((function(n){return re(t,n,e)}));r=Promise.all(o)}else if("string"==typeof n)r=re(t,n,e);else{var i="function"==typeof n?Wn(t,n,e.custom):n;r=oe(t,i,e)}return r.then((function(){return t.notifyAnimationComplete(n)}))}(t,e,r)})))}}function fe(t){var n,e=le(t),r=((n={})[te.Animate]=de(!0),n[te.InView]=de(),n[te.Hover]=de(),n[te.Tap]=de(),n[te.Drag]=de(),n[te.Focus]=de(),n[te.Exit]=de(),n),c={},l=!0,f=function(n,e){var r=Wn(t,e);if(r){r.transition;var a=r.transitionEnd,u=i(r,["transition","transitionEnd"]);n=o(o(o({},n),u),a)}return n};function d(n,i){for(var d,m=t.getProps(),h=t.getVariantContext(!0)||{},g=[],y=new Set,b={},w=1/0,A=function(e){var c=se[e],A=r[c],V=null!==(d=m[c])&&void 0!==d?d:h[c],x=Hn(V),O=c===i?A.isActive:null;!1===O&&(w=e);var S=V===h[c]&&V!==m[c]&&x;if(S&&l&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys=o({},b),!A.isActive&&null===O||!V&&!A.prevProp||s(V)||"boolean"==typeof V)return"continue";var M=function(t,n){if("string"==typeof n)return n!==t;if(Xn(n))return!v(n,t);return!1}(A.prevProp,V),T=M||c===i&&A.isActive&&!S&&x||e>w&&x,E=Array.isArray(V)?V:[V],C=E.reduce(f,{});!1===O&&(C={});var P=A.prevResolvedValues,k=void 0===P?{}:P,I=o(o({},k),C),F=function(t){T=!0,y.delete(t),A.needsAnimating[t]=!0};for(var R in I){var j=C[R],D=k[R];b.hasOwnProperty(R)||(j!==D?p(j)&&p(D)?!v(j,D)||M?F(R):A.protectedKeys[R]=!0:void 0!==j?F(R):y.add(R):void 0!==j&&y.has(R)?F(R):A.protectedKeys[R]=!0)}A.prevProp=V,A.prevResolvedValues=C,A.isActive&&(b=o(o({},b),C)),l&&t.blockInitialAnimation&&(T=!1),T&&!S&&g.push.apply(g,u([],a(E.map((function(t){return{animation:t,options:o({type:c},n)}}))),!1))},V=0;V<ce;V++)A(V);if(c=o({},b),y.size){var x={};y.forEach((function(n){var e=t.getBaseTarget(n);void 0!==e&&(x[n]=e)})),g.push({animation:x})}var O=Boolean(g.length);return l&&!1===m.initial&&!t.manuallyAnimateOnMount&&(O=!1),l=!1,O?e(g):Promise.resolve()}return{isAnimated:function(t){return void 0!==c[t]},animateChanges:d,setActive:function(n,e,o){var i;if(r[n].isActive===e)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(n,e)})),r[n].isActive=e;var a=d(o,n);for(var u in r)r[u].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:function(){return r}}}function de(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var pe=function(t){return function(n){return t(n),null}},ve={animation:pe((function(t){var n=t.visualElement,e=t.animate;n.animationState||(n.animationState=fe(n)),s(e)&&r((function(){return e.subscribe(n)}),[e])})),exit:pe((function(t){var n=t.custom,o=t.visualElement,i=a(function(){var t=e(c);if(null===t)return[!0,null];var n=t.isPresent,o=t.onExitComplete,i=t.register,a=d();return r((function(){return i(a)}),[]),!n&&o?[!1,function(){return null==o?void 0:o(a)}]:[!0]}(),2),u=i[0],s=i[1],l=e(c);r((function(){var t,e;o.isPresent=u;var r=null===(t=o.animationState)||void 0===t?void 0:t.setActive(te.Exit,!u,{custom:null!==(e=null==l?void 0:l.custom)&&void 0!==e?e:n});!u&&(null==r||r.then(s))}),[u])}))};function me(t,n,e,r){return void 0===r&&(r={passive:!0}),t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e)}}function he(t,n,e,o){r((function(){var r=t.current;if(e&&r)return me(r,n,e,o)}),[t,n,e,o])}function ge(t){return!!t.touches}var ye={pageX:0,pageY:0};function be(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||ye;return{x:e[n+"X"],y:e[n+"Y"]}}function we(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}var Ae=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,function(t,n){return void 0===n&&(n="page"),{point:ge(t)?be(t,n):we(t,n)}}(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r},Ve="undefined"!=typeof document,xe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Oe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Se(t){return Ve&&null===window.onpointerdown?t:Ve&&null===window.ontouchstart?Oe[t]:Ve&&null===window.onmousedown?xe[t]:t}function Me(t,n,e,r){return me(t,Se(n),Ae(e,"pointerdown"===n),r)}function Te(t,n,e,r){return he(t,Se(n),e&&Ae(e,"pointerdown"===n),r)}function Ee(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Ce=Ee("dragHorizontal"),Pe=Ee("dragVertical");function ke(){var t=function(t){var n=!1;if("y"===t)n=Pe();else if("x"===t)n=Ce();else{var e=Ce(),r=Pe();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}(!0);return!t||(t(),!1)}function Ie(t,n,e){return function(r,o){var i;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!ke()&&(null===(i=t.animationState)||void 0===i||i.setActive(te.Hover,n),null==e||e(r,o))}}var Fe=function(t,n){return!!n&&(t===n||Fe(t,n.parentElement))};var Re=("undefined"==typeof process||process.env,"production"),je=new Set;var De=new WeakMap,Be=new WeakMap,Le=function(t){var n;null===(n=De.get(t.target))||void 0===n||n(t)},Ue=function(t){t.forEach(Le)};function Ne(t,n,e){var r=function(t){var n=t.root,e=i(t,["root"]),r=n||document;Be.has(r)||Be.set(r,{});var a=Be.get(r),u=JSON.stringify(e);return a[u]||(a[u]=new IntersectionObserver(Ue,o({root:n},e))),a[u]}(n);return De.set(t,e),r.observe(t),function(){De.delete(t),r.unobserve(t)}}var Ye={some:0,all:1};function ze(t,n,e,o){var i=o.root,a=o.margin,u=o.amount,s=void 0===u?"some":u,c=o.once;r((function(){if(t){var r={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof s?s:Ye[s]};return Ne(e.getInstance(),r,(function(t){var r,o=t.isIntersecting;if(n.isInView!==o&&(n.isInView=o,!c||o||!n.hasEnteredView)){o&&(n.hasEnteredView=!0),null===(r=e.animationState)||void 0===r||r.setActive(te.InView,o);var i=e.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,s])}function Xe(t,n,e,o){var i=o.fallback,a=void 0===i||i;r((function(){var r,o;t&&a&&("production"!==Re&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||je.has(r)||(console.warn(r),o&&console.warn(o),je.add(r))),requestAnimationFrame((function(){var t;n.hasEnteredView=!0;var r=e.getProps().onViewportEnter;null==r||r(null),null===(t=e.animationState)||void 0===t||t.setActive(te.InView,!0)})))}),[t])}var He={inView:pe((function(t){var e=t.visualElement,r=t.whileInView,o=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,u=void 0===a?{}:a,s=n({hasEnteredView:!1,isInView:!1}),c=Boolean(r||o||i);u.once&&s.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?Xe:ze)(c,s.current,e,u)})),tap:pe((function(t){var e,o=t.onTap,i=t.onTapStart,a=t.onTapCancel,u=t.whileTap,s=t.visualElement,c=o||i||a||u,l=n(!1),f=n(null),d={passive:!(i||o||a||g)};function p(){var t;null===(t=f.current)||void 0===t||t.call(f),f.current=null}function v(){var t;return p(),l.current=!1,null===(t=s.animationState)||void 0===t||t.setActive(te.Tap,!1),!ke()}function m(t,n){v()&&(Fe(s.getInstance(),t.target)?null==o||o(t,n):null==a||a(t,n))}function h(t,n){v()&&(null==a||a(t,n))}function g(t,n){var e;p(),l.current||(l.current=!0,f.current=ft(Me(window,"pointerup",m,d),Me(window,"pointercancel",h,d)),null===(e=s.animationState)||void 0===e||e.setActive(te.Tap,!0),null==i||i(t,n))}Te(s,"pointerdown",c?g:void 0,d),e=p,r((function(){return function(){return e()}}),[])})),focus:pe((function(t){var n=t.whileFocus,e=t.visualElement;he(e,"focus",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(te.Focus,!0)}:void 0),he(e,"blur",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(te.Focus,!1)}:void 0)})),hover:pe((function(t){var n=t.onHoverStart,e=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Te(o,"pointerenter",n||r?Ie(o,!0,n):void 0,{passive:!n}),Te(o,"pointerleave",e||r?Ie(o,!1,e):void 0,{passive:!e})}))},We=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},Ze=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var $e=function(t){var n=t.treeType,e=void 0===n?"":n,r=t.build,i=t.getBaseTarget,s=t.makeTargetAnimatable,c=t.measureViewportBox,l=t.render,f=t.readValueFromInstance,d=t.removeValueFromRenderState,p=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,n){var m=t.parent,h=t.props,g=t.presenceId,y=t.blockInitialAnimation,b=t.visualState,w=t.shouldReduceMotion;void 0===n&&(n={});var A,V,x=!1,O=b.latestValues,S=b.renderState,M=function(){var t=Ze.map((function(){return new jn})),n={},e={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Ze.forEach((function(r){var o,i="on"+r,a=t[i];null===(o=n[r])||void 0===o||o.call(n),a&&(n[r]=e[i](a))}))}};return t.forEach((function(t,n){e["on"+Ze[n]]=function(n){return t.add(n)},e["notify"+Ze[n]]=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.notify.apply(t,u([],a(n),!1))}})),e}(),T=new Map,E=new Map,C={},P=o({},O);function k(){A&&x&&(I(),l(A,S,h.style,N.projection))}function I(){r(N,S,O,n,h)}function F(){M.notifyUpdate(O)}function R(t,n){var e=n.onChange((function(n){O[t]=n,h.onUpdate&&qt.update(F,!1,!0)})),r=n.onRenderRequest(N.scheduleRender);E.set(t,(function(){e(),r()}))}var j=v(h);for(var D in j){var B=j[D];void 0!==O[D]&&We(B)&&B.set(O[D],!1)}var L=Zn(h),U=function(t){return Boolean(Zn(t)||t.variants)}(h),N=o(o({treeType:e,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:g,shouldReduceMotion:w,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(A)},mount:function(t){x=!0,A=N.current=t,N.projection&&N.projection.mount(t),U&&m&&!L&&(V=null==m?void 0:m.addVariantChild(N)),T.forEach((function(t,n){return R(n,t)})),null==m||m.children.add(N),N.setProps(h)},unmount:function(){var t;null===(t=N.projection)||void 0===t||t.unmount(),Kt.update(F),Kt.render(k),E.forEach((function(t){return t()})),null==V||V(),null==m||m.children.delete(N),M.clearAllListeners(),A=void 0,x=!1},addVariantChild:function(t){var n,e=N.getClosestVariantNode();if(e)return null===(n=e.variantChildren)||void 0===n||n.add(t),function(){return e.variantChildren.delete(t)}},sortNodePosition:function(t){return p&&e===t.treeType?p(N.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return U?N:null==m?void 0:m.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return A},getStaticValue:function(t){return O[t]},setStaticValue:function(t,n){return O[t]=n},getLatestValues:function(){return O},setVisibility:function(t){N.isVisible!==t&&(N.isVisible=t,N.scheduleRender())},makeTargetAnimatable:function(t,n){return void 0===n&&(n=!0),s(N,t,h,n)},measureViewportBox:function(){return c(A,h)},addValue:function(t,n){N.hasValue(t)&&N.removeValue(t),T.set(t,n),O[t]=n.get(),R(t,n)},removeValue:function(t){var n;T.delete(t),null===(n=E.get(t))||void 0===n||n(),E.delete(t),delete O[t],d(t,S)},hasValue:function(t){return T.has(t)},getValue:function(t,n){var e=T.get(t);return void 0===e&&void 0!==n&&(e=Bn(n),N.addValue(t,e)),e},forEachValue:function(t){return T.forEach(t)},readValue:function(t){var e;return null!==(e=O[t])&&void 0!==e?e:f(A,t,n)},setBaseTarget:function(t,n){P[t]=n},getBaseTarget:function(t){if(i){var n=i(h,t);if(void 0!==n&&!We(n))return n}return P[t]}},M),{build:function(){return I(),S},scheduleRender:function(){qt.render(k,!1,!0)},syncRender:k,setProps:function(t){(t.transformTemplate||h.transformTemplate)&&N.scheduleRender(),h=t,M.updatePropListeners(t),C=function(t,n,e){var r;for(var o in n){var i=n[o],a=e[o];if(We(i))t.addValue(o,i);else if(We(a))t.addValue(o,Bn(i));else if(a!==i)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(i)}else t.addValue(o,Bn(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in e)void 0===n[o]&&t.removeValue(o);return n}(N,v(h),C)},getProps:function(){return h},getVariant:function(t){var n;return null===(n=h.variants)||void 0===n?void 0:n[t]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==m?void 0:m.getVariantContext();if(!L){var n=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(n.initial=h.initial),n}for(var e={},r=0;r<Ke;r++){var o=qe[r],i=h[o];(Hn(i)||!1===i)&&(e[o]=i)}return e}});return N}},qe=u(["initial"],a(ue),!1),Ke=qe.length,Ge={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Je(t){return t.startsWith("--")}var _e=function(t,n){return n&&"number"==typeof t?n.transform(t):t};function Qe(t,n,e,r){var o,i=t.style,a=t.vars,u=t.transform,s=t.transformKeys,c=t.transformOrigin;s.length=0;var l=!1,f=!1,d=!0;for(var p in n){var v=n[p];if(Je(p))a[p]=v;else{var m=An[p],h=_e(v,m);if(Qn(p)){if(l=!0,u[p]=h,s.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else ee(p)?(c[p]=h,f=!0):i[p]=h}}l?i.transform=function(t,n,e,r){var o=t.transform,i=t.transformKeys,a=n.enableHardwareAcceleration,u=void 0===a||a,s=n.allowTransformNone,c=void 0===s||s,l="";i.sort(Jn);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];l+="".concat(Ge[v]||v,"(").concat(o[v],") "),"z"===v&&(f=!0)}return!f&&u?l+="translateZ(0)":l=l.trim(),r?l=r(o,e?"":l):c&&e&&(l="none"),l}(t,e,d,r):r?i.transform=r({},""):!n.transform&&i.transform&&(i.transform="none"),f&&(i.transformOrigin=function(t){var n=t.originX,e=void 0===n?"50%":n,r=t.originY,o=void 0===r?"50%":r,i=t.originZ,a=void 0===i?0:i;return"".concat(e," ").concat(o," ").concat(a)}(c))}function tr(t){return"string"==typeof t&&t.startsWith("var(--")}var nr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function er(t,n,e){var r=a(function(t){var n=nr.exec(t);if(!n)return[,];var e=a(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var u=window.getComputedStyle(n).getPropertyValue(o);return u?u.trim():tr(i)?er(i,n):i}}var rr,or=new Set(["width","height","top","left","right","bottom","x","y"]),ir=function(t){return or.has(t)},ar=function(t,n){t.set(n,!1),t.set(n)},ur=function(t){return t===k||t===B};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(rr||(rr={}));var sr=function(t,n){return parseFloat(t.split(", ")[n])},cr=function(t,n){return function(e,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return sr(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?sr(a[1],t):0}},lr=new Set(["x","y","z"]),fr=Gn.filter((function(t){return!lr.has(t)}));var dr={width:function(t,n){var e=t.x,r=n.paddingLeft,o=void 0===r?"0":r,i=n.paddingRight,a=void 0===i?"0":i;return e.max-e.min-parseFloat(o)-parseFloat(a)},height:function(t,n){var e=t.y,r=n.paddingTop,o=void 0===r?"0":r,i=n.paddingBottom,a=void 0===i?"0":i;return e.max-e.min-parseFloat(o)-parseFloat(a)},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.y,r=n.top;return parseFloat(r)+(e.max-e.min)},right:function(t,n){var e=t.x,r=n.left;return parseFloat(r)+(e.max-e.min)},x:cr(4,13),y:cr(5,14)},pr=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=o({},n),r=o({},r);var i=Object.keys(n).filter(ir),u=[],s=!1,c=[];if(i.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var a,l=e[o],f=Nn(l),d=n[o];if(p(d)){var v=d.length,m=null===d[0]?1:0;l=d[m],f=Nn(l);for(var h=m;h<v;h++)a?Nn(d[h]):a=Nn(d[h])}else a=Nn(d);if(f!==a)if(ur(f)&&ur(a)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof d?n[o]=parseFloat(d):Array.isArray(d)&&a===B&&(n[o]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==a?void 0:a.transform)&&(0===l||0===d)?0===l?i.set(a.transform(l)):n[o]=f.transform(d):(s||(u=function(t){var n=[];return fr.forEach((function(e){var r=t.getValue(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&t.syncRender(),n}(t),s=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],ar(i,d))}})),c.length){var l=c.indexOf("height")>=0?window.pageYOffset:null,f=function(t,n,e){var r=n.measureViewportBox(),o=n.getInstance(),i=getComputedStyle(o),a=i.display,u={};"none"===a&&n.setStaticValue("display",t.display||"block"),e.forEach((function(t){u[t]=dr[t](r,i)})),n.syncRender();var s=n.measureViewportBox();return e.forEach((function(e){var r=n.getValue(e);ar(r,u[e]),t[e]=dr[e](s,i)})),t}(n,t,c);return u.length&&u.forEach((function(n){var e=a(n,2),r=e[0],o=e[1];t.getValue(r).set(o)})),t.syncRender(),null!==l&&window.scrollTo({top:l}),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}};function vr(t,n,e,r){return function(t){return Object.keys(t).some(ir)}(n)?pr(t,n,e,r):{target:n,transitionEnd:r}}var mr=function(t,n,e,r){var a=function(t,n,e){var r,a=i(n,[]),u=t.getInstance();if(!(u instanceof Element))return{target:a,transitionEnd:e};for(var s in e&&(e=o({},e)),t.forEachValue((function(t){var n=t.get();if(tr(n)){var e=er(n,u);e&&t.set(e)}})),a){var c=a[s];if(tr(c)){var l=er(c,u);l&&(a[s]=l,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:a,transitionEnd:e}}(t,n,r);return vr(t,n=a.target,e,r=a.transitionEnd)},hr={};function gr(t,n){var e=n.layout,r=n.layoutId;return Qn(t)||ee(t)||(e||void 0!==r)&&(!!hr[t]||"opacity"===t)}function yr(t){var n=t.style,e={};for(var r in n)(We(n[r])||gr(r,t))&&(e[r]=n[r]);return e}function br(t,n,e,r){var o=n.style,i=n.vars;for(var a in Object.assign(t.style,o,r&&r.getProjectionStyles(e)),i)t.style.setProperty(a,i[a])}var wr={treeType:"dom",readValueFromInstance:function(t,n){if(Qn(n)){var e=xn(n);return e&&e.default||0}var r,o=(r=t,window.getComputedStyle(r));return(Je(n)?o.getPropertyValue(n):o[n])||0},sortNodePosition:function(t,n){return 2&t.compareDocumentPosition(n)?1:-1},getBaseTarget:function(t,n){var e;return null===(e=t.style)||void 0===e?void 0:e[n]},measureViewportBox:function(t,n){return function(t,n){return e=function(t,n){if(!n)return t;var e=n({x:t.left,y:t.top}),r=n({x:t.right,y:t.bottom});return{top:e.y,left:e.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),n),r=e.top,{x:{min:e.left,max:e.right},y:{min:r,max:e.bottom}};var e,r}(t,n.transformPagePoint)},resetTransform:function(t,n,e){var r=e.transformTemplate;n.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,n){t.style.transform=n.style.transform},removeValueFromRenderState:function(t,n){var e=n.vars,r=n.style;delete e[t],delete r[t]},makeTargetAnimatable:function(t,n,e,r){var a=e.transformValues;void 0===r&&(r=!0);var u=n.transition,s=n.transitionEnd,c=i(n,["transition","transitionEnd"]),l=function(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=qn(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}(c,u||{},t);if(a&&(s&&(s=a(s)),c&&(c=a(c)),l&&(l=a(l))),r){!function(t,n,e){var r,o,i,a,u=Object.keys(n).filter((function(n){return!t.hasValue(n)})),s=u.length;if(s)for(var c=0;c<s;c++){var l=u[c],f=n[l],d=null;Array.isArray(f)&&(d=f[0]),null===d&&(d=null!==(o=null!==(r=e[l])&&void 0!==r?r:t.readValue(l))&&void 0!==o?o:n[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Rn(d))?d=parseFloat(d):!zn(d)&&Q.test(f)&&(d=On(l,f)),t.addValue(l,Bn(d)),null!==(i=(a=e)[l])&&void 0!==i||(a[l]=d),t.setBaseTarget(l,d))}}(t,c,l);var f=mr(t,c,l,s);s=f.transitionEnd,c=f.target}return o({transition:u,transitionEnd:s},c)},scrapeMotionValuesFromProps:yr,build:function(t,n,e,r,o){void 0!==t.isVisible&&(n.style.visibility=t.isVisible?"visible":"hidden"),Qe(n,e,r,o.transformTemplate)},render:br},Ar=$e(wr);function Vr(t,n,e){return"string"==typeof t?t:B.transform(n+e*t)}var xr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Or={offset:"strokeDashoffset",array:"strokeDasharray"};function Sr(t,n,e,r){var o=n.attrX,a=n.attrY,u=n.originX,s=n.originY,c=n.pathLength,l=n.pathSpacing,f=void 0===l?1:l,d=n.pathOffset,p=void 0===d?0:d;Qe(t,i(n,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),e,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,h=t.dimensions;v.transform&&(h&&(m.transform=v.transform),delete v.transform),h&&(void 0!==u||void 0!==s||m.transform)&&(m.transformOrigin=function(t,n,e){var r=Vr(n,t.x,t.width),o=Vr(e,t.y,t.height);return"".concat(r," ").concat(o)}(h,void 0!==u?u:.5,void 0!==s?s:.5)),void 0!==o&&(v.x=o),void 0!==a&&(v.y=a),void 0!==c&&function(t,n,e,r,o){void 0===e&&(e=1),void 0===r&&(r=0),void 0===o&&(o=!0),t.pathLength=1;var i=o?xr:Or;t[i.offset]=B.transform(-r);var a=B.transform(n),u=B.transform(e);t[i.array]="".concat(a," ").concat(u)}(v,c,f,p,!1)}var Mr=/([a-z])([A-Z])/g,Tr=function(t){return t.replace(Mr,"$1-$2").toLowerCase()},Er=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Cr=$e(o(o({},wr),{getBaseTarget:function(t,n){return t[n]},readValueFromInstance:function(t,n){var e;return Qn(n)?(null===(e=xn(n))||void 0===e?void 0:e.default)||0:(n=Er.has(n)?n:Tr(n),t.getAttribute(n))},scrapeMotionValuesFromProps:function(t){var n=yr(t);for(var e in t){if(We(t[e]))n["x"===e||"y"===e?"attr"+e.toUpperCase():e]=t[e]}return n},build:function(t,n,e,r,o){Sr(n,e,r,o.transformTemplate)},render:function(t,n,e,r){for(var o in br(t,n,void 0,r),n.attrs)t.setAttribute(Er.has(o)?o:Tr(o),n.attrs[o])}})),Pr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];var kr=o(o({renderer:function(t,n){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Pr.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Cr(n,{enableHardwareAcceleration:!1}):Ar(n,{enableHardwareAcceleration:!0})}},ve),He);export{kr as domAnimation};
|
|
1
|
+
import{createContext as t,useContext as e,useId as n,useEffect as r,useRef as o}from"react";var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function u(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function c(t){return"object"==typeof t&&"function"==typeof t.start}var l=t(null);var f=function(t){return Array.isArray(t)};function d(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const p=(t,e,n)=>Math.min(Math.max(n,t),e);function v({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i,a=1-e;a=p(.05,1,a),t=p(.01,10,t/1e3),a<1?(o=e=>{const r=e*a,o=r*t;return.001-(r-n)/m(e,a)*Math.exp(-o)},i=e=>{const r=e*a*t,i=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),c=m(Math.pow(e,2),a);return(.001-o(e)>0?-1:1)*((i-s)*u)/c}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,i,5/t);if(t*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function m(t,e){return t*Math.sqrt(1-e*e)}const h=["duration","bounce"],g=["stiffness","damping","mass"];function y(t,e){return e.some(e=>void 0!==t[e])}function b(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,i=a(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:u,damping:c,mass:l,velocity:f,duration:d,isResolvedFromDuration:p}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!y(t,g)&&y(t,h)){const n=v(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),b=w,A=w;function V(){const t=f?-f/1e3:0,r=n-e,i=c/(2*Math.sqrt(u*l)),a=Math.sqrt(u/l)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-e)/100,.4)),i<1){const e=m(a,i);b=o=>{const s=Math.exp(-i*a*o);return n-s*((t+i*a*r)/e*Math.sin(e*o)+r*Math.cos(e*o))},A=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(e*n)*(t+i*a*r)/e+r*Math.cos(e*n))-o*(Math.cos(e*n)*(t+i*a*r)-e*r*Math.sin(e*n))}}else if(1===i)b=e=>n-Math.exp(-a*e)*(r+(t+a*r)*e);else{const e=a*Math.sqrt(i*i-1);b=o=>{const s=Math.exp(-i*a*o),u=Math.min(e*o,300);return n-s*((t+i*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return V(),{next:t=>{const e=b(t);if(p)s.done=t>=d;else{const i=1e3*A(t),a=Math.abs(i)<=r,u=Math.abs(n-e)<=o;s.done=a&&u}return s.value=s.done?n:e,s},flipTarget:()=>{f=-f,[e,n]=[n,e],V()}}}b.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const w=t=>0,A=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},V=(t,e,n)=>-n*t+n*e+t,x=(t,e)=>n=>Math.max(Math.min(n,e),t),O=t=>t%1?Number(t.toFixed(5)):t,S=/(-)?([\d]*\.?[\d])+/g,M=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,T=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function E(t){return"string"==typeof t}const C={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},P=Object.assign(Object.assign({},C),{transform:x(0,1)}),k=Object.assign(Object.assign({},C),{default:1}),I=t=>({test:e=>E(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),F=I("deg"),R=I("%"),j=I("px"),D=I("vh"),B=I("vw"),L=Object.assign(Object.assign({},R),{parse:t=>R.parse(t)/100,transform:t=>R.transform(100*t)}),U=(t,e)=>n=>Boolean(E(n)&&T.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),N=(t,e,n)=>r=>{if(!E(r))return r;const[o,i,a,s]=r.match(S);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Y={test:U("hsl","hue"),parse:N("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+R.transform(O(e))+", "+R.transform(O(n))+", "+O(P.transform(r))+")"},z=x(0,255),X=Object.assign(Object.assign({},C),{transform:t=>Math.round(z(t))}),H={test:U("rgb","red"),parse:N("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(n)+", "+O(P.transform(r))+")"};const W={test:U("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:H.transform},Z={test:t=>H.test(t)||W.test(t)||Y.test(t),parse:t=>H.test(t)?H.parse(t):Y.test(t)?Y.parse(t):W.parse(t),transform:t=>E(t)?t:t.hasOwnProperty("red")?H.transform(t):Y.transform(t)};function $(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(M);r&&(n=r.length,t=t.replace(M,"${c}"),e.push(...r.map(Z.parse)));const o=t.match(S);return o&&(t=t.replace(S,"${n}"),e.push(...o.map(C.parse))),{values:e,numColors:n,tokenised:t}}function q(t){return $(t).values}function K(t){const{values:e,numColors:n,tokenised:r}=$(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?Z.transform(t[r]):O(t[r]));return e}}const G=t=>"number"==typeof t?0:t;const J={test:function(t){var e,n,r,o;return isNaN(t)&&E(t)&&(null!==(n=null===(e=t.match(S))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(M))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:q,createTransformer:K,getAnimatableNone:function(t){const e=q(t);return K(t)(e.map(G))}},_=new Set(["brightness","contrast","saturate","opacity"]);function Q(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(S)||[];if(!r)return t;const o=n.replace(r,"");let i=_.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const tt=/([a-z-]*)\(.*?\)/g,et=Object.assign(Object.assign({},J),{getAnimatableNone:t=>{const e=t.match(tt);return e?e.map(Q).join(" "):t}});function nt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,i=0,a=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r;o=nt(s,r,t+1/3),i=nt(s,r,t),a=nt(s,r,t-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const ot=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},it=[W,H,Y],at=t=>it.find(e=>e.test(t)),st=(t,e)=>{let n=at(t),r=at(e),o=n.parse(t),i=r.parse(e);n===Y&&(o=rt(o),n=H),r===Y&&(i=rt(i),r=H);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=ot(o[e],i[e],t));return a.alpha=V(o.alpha,i.alpha,t),n.transform(a)}},ut=(t,e)=>n=>e(t(n)),ct=(...t)=>t.reduce(ut);function lt(t,e){return"number"==typeof t?n=>V(t,e,n):Z.test(t)?st(t,e):vt(t,e)}const ft=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>lt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},dt=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=lt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function pt(t){const e=J.parse(t),n=e.length;let r=0,o=0,i=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}const vt=(t,e)=>{const n=J.createTransformer(e),r=pt(t),o=pt(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?ct(ft(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},mt=(t,e)=>n=>V(t,e,n);function ht(t,e,n){const r=[],o=n||("number"==typeof(i=t[0])?mt:"string"==typeof i?Z.test(i)?st:vt:Array.isArray(i)?ft:"object"==typeof i?dt:void 0);var i;const a=t.length-1;for(let n=0;n<a;n++){let i=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=ct(t,i)}r.push(i)}return r}function gt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=ht(e,r,o),s=2===i?function([t,e],[n]){return r=>n(A(t,e,r))}(t,a):function(t,e){const n=t.length,r=n-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){let e=1;for(;e<n&&!(t[e]>o||e===r);e++);i=e-1}const s=A(t[i],t[i+1],o);return e[i](s)}}(t,a);return n?e=>s(p(t[0],t[i-1],e)):s}const yt=t=>e=>1-t(1-e),bt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,wt=t=>e=>e*e*((t+1)*e-t),At=t=>t,Vt=(xt=2,t=>Math.pow(t,xt));var xt;const Ot=yt(Vt),St=bt(Vt),Mt=t=>1-Math.sin(Math.acos(t)),Tt=yt(Mt),Et=bt(Tt),Ct=wt(1.525),Pt=yt(Ct),kt=bt(Ct),It=(t=>{const e=wt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Ft=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Rt=yt(Ft);function jt(t,e){return t.map(()=>e||St).splice(0,t.length-1)}function Dt({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map(t=>t*e)}(r&&r.length===a.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(a),o);function u(){return gt(s,a,{ease:Array.isArray(n)?n:jt(a,n)})}let c=u();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=u()}}}const Bt={keyframes:Dt,spring:b,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let s=n*t;const u=e+s,c=void 0===i?u:i(u);return c!==u&&(s=c-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>o||e<-o),a.value=a.done?c:c+e,a},flipTarget:()=>{}}}};const Lt="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Ut="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lt()),1/60*1e3);let Nt=!0,Yt=!1,zt=!1;const Xt={delta:0,timestamp:0},Ht=["read","update","preRender","render","postRender"],Wt=Ht.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,c=u?e:n;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),a.has(r)&&(s.schedule(r),t())}o=!1,i&&(i=!1,s.process(u))}}};return s}(()=>Yt=!0),t),{}),Zt=Ht.reduce((t,e)=>{const n=Wt[e];return t[e]=(t,e=!1,r=!1)=>(Yt||Gt(),n.schedule(t,e,r)),t},{}),$t=Ht.reduce((t,e)=>(t[e]=Wt[e].cancel,t),{});Ht.reduce((t,e)=>(t[e]=()=>Wt[e].process(Xt),t),{});const qt=t=>Wt[t].process(Xt),Kt=t=>{Yt=!1,Xt.delta=Nt?1/60*1e3:Math.max(Math.min(t-Xt.timestamp,40),1),Xt.timestamp=t,zt=!0,Ht.forEach(qt),zt=!1,Yt&&(Nt=!1,Ut(Kt))},Gt=()=>{Yt=!0,Nt=!0,zt||Ut(Kt)},Jt=()=>Xt;function _t(t,e,n=0){return t-e-n}const Qt=t=>{const e=({delta:e})=>t(e);return{start:()=>Zt.update(e,!0),stop:()=>$t.update(e)}};function te(t){var e,n,{from:r,autoplay:o=!0,driver:i=Qt,elapsed:s=0,repeat:u=0,repeatType:c="loop",repeatDelay:l=0,onPlay:f,onStop:d,onComplete:p,onRepeat:v,onUpdate:m}=t,h=a(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,y,w,{to:A}=h,V=0,x=h.duration,O=!1,S=!0;const M=function(t){if(Array.isArray(t.to))return Dt;if(Bt[t.type])return Bt[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Dt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?b:Dt}(h);(null===(n=(e=M).needsInterpolation)||void 0===n?void 0:n.call(e,r,A))&&(w=gt([0,100],[r,A],{clamp:!1}),r=0,A=100);const T=M(Object.assign(Object.assign({},h),{from:r,to:A}));function E(){V++,"reverse"===c?(S=V%2==0,s=function(t,e,n=0,r=!0){return r?_t(e+-t,e,n):e-(t-e)+n}(s,x,l,S)):(s=_t(s,x,l),"mirror"===c&&T.flipTarget()),O=!1,v&&v()}function C(t){if(S||(t=-t),s+=t,!O){const t=T.next(Math.max(0,s));y=t.value,w&&(y=w(y)),O=S?t.done:s<=0}null==m||m(y),O&&(0===V&&(null!=x||(x=s)),V<u?function(t,e,n,r){return r?t>=e+n:t<=-n}(s,x,l,S)&&E():(g.stop(),p&&p()))}return o&&(null==f||f(),g=i(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function ee(t,e){return e?t*(1e3/e):0}const ne=(t,e)=>1-3*e+3*t,re=(t,e)=>3*e-6*t,oe=t=>3*t,ie=(t,e,n)=>((ne(e,n)*t+re(e,n))*t+oe(e))*t,ae=(t,e,n)=>3*ne(e,n)*t*t+2*re(e,n)*t+oe(e);function se(t,e,n,r){if(t===e&&n===r)return At;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=ie(.1*e,t,n);function i(e){let r=0,i=1;for(;10!==i&&o[i]<=e;++i)r+=.1;--i;const a=r+.1*((e-o[i])/(o[i+1]-o[i])),s=ae(a,t,n);return s>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=ae(e,n,r);if(0===o)return e;e-=(ie(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){let i,a,s=0;do{a=e+(n-e)/2,i=ie(a,r,o)-t,i>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:ie(i(t),e,r)}var ue=function(t){return 1e3*t},ce={linear:At,easeIn:Vt,easeInOut:St,easeOut:Ot,circIn:Mt,circInOut:Et,circOut:Tt,backIn:Ct,backInOut:kt,backOut:Pt,anticipate:It,bounceIn:Rt,bounceInOut:t=>t<.5?.5*(1-Ft(1-2*t)):.5*Ft(2*t-1)+.5,bounceOut:Ft},le=function(t){if(Array.isArray(t)){t.length;var e=s(t,4);return se(e[0],e[1],e[2],e[3])}return"string"==typeof t?ce[t]:t},fe=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!J.test(e)||e.startsWith("url(")))},de=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},pe=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},ve=function(){return{type:"keyframes",ease:"linear",duration:.3}},me=function(t){return{type:"keyframes",duration:.8,values:t}},he={x:de,y:de,z:de,rotate:de,rotateX:de,rotateY:de,rotateZ:de,scaleX:pe,scaleY:pe,scale:pe,opacity:ve,backgroundColor:ve,color:ve,default:pe},ge=i(i({},C),{transform:Math.round}),ye={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,size:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:k,scaleX:k,scaleY:k,scaleZ:k,skew:F,skewX:F,skewY:F,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:P,originX:L,originY:L,originZ:j,zIndex:ge,fillOpacity:P,strokeOpacity:P,numOctaves:ge},be=i(i({},ye),{color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:et,WebkitFilter:et}),we=function(t){return be[t]};function Ae(t,e){var n,r=we(t);return r!==et&&(r=J),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Ve=!1,xe=function(t){return f(t)?t[t.length-1]||0:t};function Oe(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,s=t.loop,u=a(t,["ease","times","yoyo","flip","loop"]),c=i({},u);return n&&(c.offset=n),u.duration&&(c.duration=ue(u.duration)),u.repeatDelay&&(c.repeatDelay=ue(u.repeatDelay)),e&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(le):le(e)),"tween"===u.type&&(c.type="keyframes"),(r||s||o)&&(r?c.repeatType="reverse":s?c.repeatType="loop":o&&(c.repeatType="mirror"),c.repeat=s||r||o||u.repeat),"spring"!==u.type&&(c.type="keyframes"),c}function Se(t,e,n){var r,o,c,l;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=u([],s(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=a(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=i(i({},t),(o=n,c=e.to,l=f(c)?me:he[o]||he.default,i({to:c},l(c))))),i(i({},e),Oe(t))}function Me(t,e,n,r,o){var a,s=Ce(r,t),u=null!==(a=s.from)&&void 0!==a?a:e.get(),c=fe(t,n);return"none"===u&&c&&"string"==typeof n?u=Ae(t,n):Te(u)&&"string"==typeof n?u=Ee(n):!Array.isArray(n)&&Te(n)&&"string"==typeof u&&(n=Ee(u)),fe(t,u)&&c&&!1!==s.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:d,onStop:p}){let v;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function h(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==v||v.stop(),v=te(Object.assign(Object.assign({},t),{driver:l,onUpdate:e=>{var n;null==f||f(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:p}))}function y(t){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(m(t))y({from:t,velocity:e,to:h(t)});else{let r=o*e+t;void 0!==c&&(r=c(r));const a=h(r),s=a===n?-1:1;let l,f;const d=t=>{l=f,f=t,e=ee(t-l,Jt().delta),(1===s&&t>a||-1===s&&t<a)&&y({from:t,to:a,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:i,power:o,restDelta:u,modifyTarget:c,onUpdate:m(r)?d:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(i(i({},r),s)):te(i(i({},Se(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,r,i=xe(n);return e.set(i),o(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,i),null===(r=null==s?void 0:s.onComplete)||void 0===r||r.call(s),{stop:function(){}}}}function Te(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ee(t){return"number"==typeof t?0:Ae("",t)}function Ce(t,e){return t[e]||t.default||t}function Pe(t,e,n,r){return void 0===r&&(r={}),Ve&&(r={type:!1}),e.start((function(o){var i,a,s=Me(t,e,n,r,o),u=function(t,e){var n,r;return null!==(r=null!==(n=(Ce(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),c=function(){return a=s()};return u?i=window.setTimeout(c,ue(u)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var ke=function(t){return/^0[^.\s]+$/.test(t)};var Ie=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e,n,r=this;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),function(){return function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}(r.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Fe=function(){function t(t){var e,n=this;this.version="7.0.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ie,this.velocityUpdateSubscribers=new Ie,this.renderSubscribers=new Ie,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=Jt(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,Zt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return Zt.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?ee(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Re(t){return new Fe(t)}var je=function(t){return function(e){return e.test(t)}},De=[C,j,R,F,B,D,{test:function(t){return"auto"===t},parse:function(t){return t}}],Be=function(t){return De.find(je(t))},Le=u(u([],s(De),!1),[Z,J],!1),Ue=function(t){return Le.find(je(t))};function Ne(t){return Array.isArray(t)}function Ye(t){return"string"==typeof t||Ne(t)}function ze(t,e,n){var r=t.getProps();return function(t,e,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),"string"==typeof e&&(e=null===(i=t.variants)||void 0===i?void 0:i[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),e}(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Xe(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Ye(t.initial)||Ye(t.animate)||Ye(t.whileHover)||Ye(t.whileDrag)||Ye(t.whileTap)||Ye(t.whileFocus)||Ye(t.exit)}function He(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Re(n))}function We(t,e){if(e)return(e[t]||e.default||e).from}var Ze=["","X","Y","Z"],$e=["transformPerspective","x","y","z"];function qe(t,e){return $e.indexOf(t)-$e.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Ze.forEach((function(e){return $e.push(t+e)}))}));var Ke=new Set($e);function Ge(t){return Ke.has(t)}var Je,_e=new Set(["originX","originY","originZ"]);function Qe(t){return _e.has(t)}function tn(t,e,n){var r;void 0===n&&(n={});var o=ze(t,e,n.custom),a=(o||{}).transition,u=void 0===a?t.getDefaultTransition()||{}:a;n.transitionOverride&&(u=n.transitionOverride);var c=o?function(){return en(t,o,n)}:function(){return Promise.resolve()},l=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=u.delayChildren,a=void 0===o?0:o,s=u.staggerChildren,c=u.staggerDirection;return function(t,e,n,r,o,a){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var s=[],u=(t.variantChildren.size-1)*r,c=1===o?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),u-t*r};return Array.from(t.variantChildren).sort(nn).forEach((function(t,r){s.push(tn(t,e,i(i({},a),{delay:n+c(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,a+r,s,c,n)}:function(){return Promise.resolve()},f=u.when;if(f){var d=s("beforeChildren"===f?[c,l]:[l,c],2),p=d[0],v=d[1];return p().then(v)}return Promise.all([c(),l(n.delay)])}function en(t,e,n){var r,o=void 0===n?{}:n,s=o.delay,u=void 0===s?0:s,c=o.transitionOverride,l=o.type,f=t.makeTargetAnimatable(e),d=f.transition,p=void 0===d?t.getDefaultTransition():d,v=f.transitionEnd,m=a(f,["transition","transitionEnd"]);c&&(p=c);var h=[],g=l&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[l]);for(var y in m){var b=t.getValue(y),w=m[y];if(!(!b||void 0===w||g&&rn(g,y))){var A=i({delay:u},p);t.shouldReduceMotion&&Ge(y)&&(A=i(i({},A),{type:!1,delay:0}));var V=Pe(y,b,w,A);h.push(V)}}return Promise.all(h).then((function(){v&&function(t,e){var n=ze(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,s=void 0===o?{}:o;r.transition;var u=a(r,["transitionEnd","transition"]);for(var c in u=i(i({},u),s)){He(t,c,xe(u[c]))}}(t,v)}))}function nn(t,e){return t.sortNodePosition(e)}function rn(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,o}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Je||(Je={}));var on=[Je.Animate,Je.InView,Je.Focus,Je.Hover,Je.Tap,Je.Drag,Je.Exit],an=u([],s(on),!1).reverse(),sn=on.length;function un(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(e),Array.isArray(e)){var o=e.map((function(e){return tn(t,e,n)}));r=Promise.all(o)}else if("string"==typeof e)r=tn(t,e,n);else{var i="function"==typeof e?ze(t,e,n.custom):e;r=en(t,i,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function cn(t){var e,n=un(t),r=((e={})[Je.Animate]=ln(!0),e[Je.InView]=ln(),e[Je.Hover]=ln(),e[Je.Tap]=ln(),e[Je.Drag]=ln(),e[Je.Focus]=ln(),e[Je.Exit]=ln(),e),o={},l=!0,p=function(e,n){var r=ze(t,n);if(r){r.transition;var o=r.transitionEnd,s=a(r,["transition","transitionEnd"]);e=i(i(i({},e),s),o)}return e};function v(e,a){for(var v,m=t.getProps(),h=t.getVariantContext(!0)||{},g=[],y=new Set,b={},w=1/0,A=function(n){var o=an[n],A=r[o],V=null!==(v=m[o])&&void 0!==v?v:h[o],x=Ye(V),O=o===a?A.isActive:null;!1===O&&(w=n);var S=V===h[o]&&V!==m[o]&&x;if(S&&l&&t.manuallyAnimateOnMount&&(S=!1),A.protectedKeys=i({},b),!A.isActive&&null===O||!V&&!A.prevProp||c(V)||"boolean"==typeof V)return"continue";var M=function(t,e){if("string"==typeof e)return e!==t;if(Ne(e))return!d(e,t);return!1}(A.prevProp,V),T=M||o===a&&A.isActive&&!S&&x||n>w&&x,E=Array.isArray(V)?V:[V],C=E.reduce(p,{});!1===O&&(C={});var P=A.prevResolvedValues,k=void 0===P?{}:P,I=i(i({},k),C),F=function(t){T=!0,y.delete(t),A.needsAnimating[t]=!0};for(var R in I){var j=C[R],D=k[R];b.hasOwnProperty(R)||(j!==D?f(j)&&f(D)?!d(j,D)||M?F(R):A.protectedKeys[R]=!0:void 0!==j?F(R):y.add(R):void 0!==j&&y.has(R)?F(R):A.protectedKeys[R]=!0)}A.prevProp=V,A.prevResolvedValues=C,A.isActive&&(b=i(i({},b),C)),l&&t.blockInitialAnimation&&(T=!1),T&&!S&&g.push.apply(g,u([],s(E.map((function(t){return{animation:t,options:i({type:o},e)}}))),!1))},V=0;V<sn;V++)A(V);if(o=i({},b),y.size){var x={};y.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(x[e]=n)})),g.push({animation:x})}var O=Boolean(g.length);return l&&!1===m.initial&&!t.manuallyAnimateOnMount&&(O=!1),l=!1,O?n(g):Promise.resolve()}return{isAnimated:function(t){return void 0!==o[t]},animateChanges:v,setActive:function(e,n,o){var i;if(r[e].isActive===n)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n;var a=v(o,e);for(var s in r)r[s].protectedKeys={};return a},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function ln(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var fn=function(t){return function(e){return t(e),null}},dn={animation:fn((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=cn(e)),c(n)&&r((function(){return n.subscribe(e)}),[n])})),exit:fn((function(t){var o=t.custom,i=t.visualElement,a=s(function(){var t=e(l);if(null===t)return[!0,null];var o=t.isPresent,i=t.onExitComplete,a=t.register,s=n();return r((function(){return a(s)}),[]),!o&&i?[!1,function(){return null==i?void 0:i(s)}]:[!0]}(),2),u=a[0],c=a[1],f=e(l);r((function(){var t,e;i.isPresent=u;var n=null===(t=i.animationState)||void 0===t?void 0:t.setActive(Je.Exit,!u,{custom:null!==(e=null==f?void 0:f.custom)&&void 0!==e?e:o});!u&&(null==n||n.then(c))}),[u])}))};function pn(t,e,n,r){return void 0===r&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function vn(t,e,n,o){r((function(){var r=t.current;if(n&&r)return pn(r,e,n,o)}),[t,e,n,o])}function mn(t){return!!t.touches}var hn={pageX:0,pageY:0};function gn(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||hn;return{x:n[e+"X"],y:n[e+"Y"]}}function yn(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}var bn=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,function(t,e){return void 0===e&&(e="page"),{point:mn(t)?gn(t,e):yn(t,e)}}(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},wn="undefined"!=typeof document,An={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function xn(t){return wn&&null===window.onpointerdown?t:wn&&null===window.ontouchstart?Vn[t]:wn&&null===window.onmousedown?An[t]:t}function On(t,e,n,r){return pn(t,xn(e),bn(n,"pointerdown"===e),r)}function Sn(t,e,n,r){return vn(t,xn(e),n&&bn(n,"pointerdown"===e),r)}function Mn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Tn=Mn("dragHorizontal"),En=Mn("dragVertical");function Cn(){var t=function(t){var e=!1;if("y"===t)e=En();else if("x"===t)e=Tn();else{var n=Tn(),r=En();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(!0);return!t||(t(),!1)}function Pn(t,e,n){return function(r,o){var i;(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Cn()&&(null===(i=t.animationState)||void 0===i||i.setActive(Je.Hover,e),null==n||n(r,o))}}var kn=function(t,e){return!!e&&(t===e||kn(t,e.parentElement))};var In=("undefined"==typeof process||process.env,"production"),Fn=new Set;var Rn=new WeakMap,jn=new WeakMap,Dn=function(t){var e;null===(e=Rn.get(t.target))||void 0===e||e(t)},Bn=function(t){t.forEach(Dn)};function Ln(t,e,n){var r=function(t){var e=t.root,n=a(t,["root"]),r=e||document;jn.has(r)||jn.set(r,{});var o=jn.get(r),s=JSON.stringify(n);return o[s]||(o[s]=new IntersectionObserver(Bn,i({root:e},n))),o[s]}(e);return Rn.set(t,n),r.observe(t),function(){Rn.delete(t),r.unobserve(t)}}var Un={some:0,all:1};function Nn(t,e,n,o){var i=o.root,a=o.margin,s=o.amount,u=void 0===s?"some":s,c=o.once;r((function(){if(t){var r={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof u?u:Un[u]};return Ln(n.getInstance(),r,(function(t){var r,o=t.isIntersecting;if(e.isInView!==o&&(e.isInView=o,!c||o||!e.hasEnteredView)){o&&(e.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(Je.InView,o);var i=n.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,u])}function Yn(t,e,n,o){var i=o.fallback,a=void 0===i||i;r((function(){var r,o;t&&a&&("production"!==In&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Fn.has(r)||(console.warn(r),o&&console.warn(o),Fn.add(r))),requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var r=n.getProps().onViewportEnter;null==r||r(null),null===(t=n.animationState)||void 0===t||t.setActive(Je.InView,!0)})))}),[t])}var zn={inView:fn((function(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=o({hasEnteredView:!1,isInView:!1}),c=Boolean(n||r||i);s.once&&u.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?Yn:Nn)(c,u.current,e,s)})),tap:fn((function(t){var e,n=t.onTap,i=t.onTapStart,a=t.onTapCancel,s=t.whileTap,u=t.visualElement,c=n||i||a||s,l=o(!1),f=o(null),d={passive:!(i||n||a||g)};function p(){var t;null===(t=f.current)||void 0===t||t.call(f),f.current=null}function v(){var t;return p(),l.current=!1,null===(t=u.animationState)||void 0===t||t.setActive(Je.Tap,!1),!Cn()}function m(t,e){v()&&(kn(u.getInstance(),t.target)?null==n||n(t,e):null==a||a(t,e))}function h(t,e){v()&&(null==a||a(t,e))}function g(t,e){var n;p(),l.current||(l.current=!0,f.current=ct(On(window,"pointerup",m,d),On(window,"pointercancel",h,d)),null===(n=u.animationState)||void 0===n||n.setActive(Je.Tap,!0),null==i||i(t,e))}Sn(u,"pointerdown",c?g:void 0,d),e=p,r((function(){return function(){return e()}}),[])})),focus:fn((function(t){var e=t.whileFocus,n=t.visualElement;vn(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Je.Focus,!0)}:void 0),vn(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Je.Focus,!1)}:void 0)})),hover:fn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Sn(o,"pointerenter",e||r?Pn(o,!0,e):void 0,{passive:!e}),Sn(o,"pointerleave",n||r?Pn(o,!1,n):void 0,{passive:!n})}))},Xn=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},Hn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Wn=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,o=t.getBaseTarget,a=t.makeTargetAnimatable,c=t.measureViewportBox,l=t.render,f=t.readValueFromInstance,d=t.removeValueFromRenderState,p=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,e){var m=t.parent,h=t.props,g=t.presenceId,y=t.blockInitialAnimation,b=t.visualState,w=t.shouldReduceMotion;void 0===e&&(e={});var A,V,x=!1,O=b.latestValues,S=b.renderState,M=function(){var t=Hn.map((function(){return new Ie})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Hn.forEach((function(r){var o,i="on"+r,a=t[i];null===(o=e[r])||void 0===o||o.call(e),a&&(e[r]=n[i](a))}))}};return t.forEach((function(t,e){n["on"+Hn[e]]=function(e){return t.add(e)},n["notify"+Hn[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,u([],s(e),!1))}})),n}(),T=new Map,E=new Map,C={},P=i({},O);function k(){A&&x&&(I(),l(A,S,h.style,N.projection))}function I(){r(N,S,O,e,h)}function F(){M.notifyUpdate(O)}function R(t,e){var n=e.onChange((function(e){O[t]=e,h.onUpdate&&Zt.update(F,!1,!0)})),r=e.onRenderRequest(N.scheduleRender);E.set(t,(function(){n(),r()}))}var j=v(h);for(var D in j){var B=j[D];void 0!==O[D]&&Xn(B)&&B.set(O[D],!1)}var L=Xe(h),U=function(t){return Boolean(Xe(t)||t.variants)}(h),N=i(i({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:g,shouldReduceMotion:w,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(A)},mount:function(t){x=!0,A=N.current=t,N.projection&&N.projection.mount(t),U&&m&&!L&&(V=null==m?void 0:m.addVariantChild(N)),T.forEach((function(t,e){return R(e,t)})),null==m||m.children.add(N),N.setProps(h)},unmount:function(){var t;null===(t=N.projection)||void 0===t||t.unmount(),$t.update(F),$t.render(k),E.forEach((function(t){return t()})),null==V||V(),null==m||m.children.delete(N),M.clearAllListeners(),A=void 0,x=!1},addVariantChild:function(t){var e,n=N.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return p&&n===t.treeType?p(N.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return U?N:null==m?void 0:m.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return A},getStaticValue:function(t){return O[t]},setStaticValue:function(t,e){return O[t]=e},getLatestValues:function(){return O},setVisibility:function(t){N.isVisible!==t&&(N.isVisible=t,N.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),a(N,t,h,e)},measureViewportBox:function(){return c(A,h)},addValue:function(t,e){N.hasValue(t)&&N.removeValue(t),T.set(t,e),O[t]=e.get(),R(t,e)},removeValue:function(t){var e;T.delete(t),null===(e=E.get(t))||void 0===e||e(),E.delete(t),delete O[t],d(t,S)},hasValue:function(t){return T.has(t)},getValue:function(t,e){var n=T.get(t);return void 0===n&&void 0!==e&&(n=Re(e),N.addValue(t,n)),n},forEachValue:function(t){return T.forEach(t)},readValue:function(t){var n;return null!==(n=O[t])&&void 0!==n?n:f(A,t,e)},setBaseTarget:function(t,e){P[t]=e},getBaseTarget:function(t){if(o){var e=o(h,t);if(void 0!==e&&!Xn(e))return e}return P[t]}},M),{build:function(){return I(),S},scheduleRender:function(){Zt.render(k,!1,!0)},syncRender:k,setProps:function(t){(t.transformTemplate||h.transformTemplate)&&N.scheduleRender(),h=t,M.updatePropListeners(t),C=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(Xn(i))t.addValue(o,i);else if(Xn(a))t.addValue(o,Re(i));else if(a!==i)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(i)}else t.addValue(o,Re(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===e[o]&&t.removeValue(o);return e}(N,v(h),C)},getProps:function(){return h},getVariant:function(t){var e;return null===(e=h.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==m?void 0:m.getVariantContext();if(!L){var e=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(e.initial=h.initial),e}for(var n={},r=0;r<$n;r++){var o=Zn[r],i=h[o];(Ye(i)||!1===i)&&(n[o]=i)}return n}});return N}},Zn=u(["initial"],s(on),!1),$n=Zn.length,qn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Kn(t){return t.startsWith("--")}var Gn=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Jn(t,e,n,r){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,c=t.transformOrigin;u.length=0;var l=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(Kn(p))a[p]=v;else{var m=ye[p],h=Gn(v,m);if(Ge(p)){if(l=!0,s[p]=h,u.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else Qe(p)?(c[p]=h,f=!0):i[p]=h}}l?i.transform=function(t,e,n,r){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,c=void 0===u||u,l="";i.sort(qe);for(var f=!1,d=i.length,p=0;p<d;p++){var v=i[p];l+="".concat(qn[v]||v,"(").concat(o[v],") "),"z"===v&&(f=!0)}return!f&&s?l+="translateZ(0)":l=l.trim(),r?l=r(o,n?"":l):c&&n&&(l="none"),l}(t,n,d,r):r?i.transform=r({},""):!e.transform&&i.transform&&(i.transform="none"),f&&(i.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,o=void 0===r?"50%":r,i=t.originZ,a=void 0===i?0:i;return"".concat(n," ").concat(o," ").concat(a)}(c))}function _n(t){return"string"==typeof t&&t.startsWith("var(--")}var Qn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tr(t,e,n){var r=s(function(t){var e=Qn.exec(t);if(!e)return[,];var n=s(e,3);return[n[1],n[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a?a.trim():_n(i)?tr(i,e):i}}var er,nr=new Set(["width","height","top","left","right","bottom","x","y"]),rr=function(t){return nr.has(t)},or=function(t,e){t.set(e,!1),t.set(e)},ir=function(t){return t===C||t===j};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(er||(er={}));var ar=function(t,e){return parseFloat(t.split(", ")[e])},sr=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return ar(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?ar(a[1],t):0}},ur=new Set(["x","y","z"]),cr=$e.filter((function(t){return!ur.has(t)}));var lr={width:function(t,e){var n=t.x,r=e.paddingLeft,o=void 0===r?"0":r,i=e.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,o=void 0===r?"0":r,i=e.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:sr(4,13),y:sr(5,14)},fr=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=i({},e),r=i({},r);var o=Object.keys(e).filter(rr),a=[],u=!1,c=[];if(o.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var s,l=n[o],d=Be(l),p=e[o];if(f(p)){var v=p.length,m=null===p[0]?1:0;l=p[m],d=Be(l);for(var h=m;h<v;h++)s?Be(p[h]):s=Be(p[h])}else s=Be(p);if(d!==s)if(ir(d)&&ir(s)){var g=i.get();"string"==typeof g&&i.set(parseFloat(g)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&s===j&&(e[o]=p.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==s?void 0:s.transform)&&(0===l||0===p)?0===l?i.set(s.transform(l)):e[o]=d.transform(p):(u||(a=function(t){var e=[];return cr.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),u=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:e[o],or(i,p))}})),c.length){var l=c.indexOf("height")>=0?window.pageYOffset:null,d=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=lr[t](r,i)})),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);or(r,s[n]),t[n]=lr[n](u,i)})),t}(e,t,c);return a.length&&a.forEach((function(e){var n=s(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),t.syncRender(),null!==l&&window.scrollTo({top:l}),{target:d,transitionEnd:r}}return{target:e,transitionEnd:r}};function dr(t,e,n,r){return function(t){return Object.keys(t).some(rr)}(e)?fr(t,e,n,r):{target:e,transitionEnd:r}}var pr=function(t,e,n,r){var o=function(t,e,n){var r,o=a(e,[]),s=t.getInstance();if(!(s instanceof Element))return{target:o,transitionEnd:n};for(var u in n&&(n=i({},n)),t.forEachValue((function(t){var e=t.get();if(_n(e)){var n=tr(e,s);n&&t.set(n)}})),o){var c=o[u];if(_n(c)){var l=tr(c,s);l&&(o[u]=l,n&&(null!==(r=n[u])&&void 0!==r||(n[u]=c)))}}return{target:o,transitionEnd:n}}(t,e,r);return dr(t,e=o.target,n,r=o.transitionEnd)},vr={};function mr(t,e){var n=e.layout,r=e.layoutId;return Ge(t)||Qe(t)||(n||void 0!==r)&&(!!vr[t]||"opacity"===t)}function hr(t){var e=t.style,n={};for(var r in e)(Xn(e[r])||mr(r,t))&&(n[r]=e[r]);return n}function gr(t,e,n,r){var o=e.style,i=e.vars;for(var a in Object.assign(t.style,o,r&&r.getProjectionStyles(n)),i)t.style.setProperty(a,i[a])}var yr={treeType:"dom",readValueFromInstance:function(t,e){if(Ge(e)){var n=we(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r));return(Kn(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return function(t,e){return n=function(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e),r=n.top,{x:{min:n.left,max:n.right},y:{min:r,max:n.bottom}};var n,r}(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=e.transition,s=e.transitionEnd,u=a(e,["transition","transitionEnd"]),c=n.transformValues;void 0===r&&(r=!0);var l=function(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=We(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(u,o||{},t);if(c&&(s&&(s=c(s)),u&&(u=c(u)),l&&(l=c(l))),r){!function(t,e,n){var r,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var c=0;c<u;c++){var l=s[c],f=e[l],d=null;Array.isArray(f)&&(d=f[0]),null===d&&(d=null!==(o=null!==(r=n[l])&&void 0!==r?r:t.readValue(l))&&void 0!==o?o:e[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||ke(d))?d=parseFloat(d):!Ue(d)&&J.test(f)&&(d=Ae(l,f)),t.addValue(l,Re(d)),null!==(i=(a=n)[l])&&void 0!==i||(a[l]=d),t.setBaseTarget(l,d))}}(t,u,l);var f=pr(t,u,l,s);s=f.transitionEnd,u=f.target}return i({transition:o,transitionEnd:s},u)},scrapeMotionValuesFromProps:hr,build:function(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Jn(e,n,r,o.transformTemplate)},render:gr},br=Wn(yr);function wr(t,e,n){return"string"==typeof t?t:j.transform(e+n*t)}var Ar={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vr={offset:"strokeDashoffset",array:"strokeDasharray"};function xr(t,e,n,r){var o=e.attrX,i=e.attrY,s=e.originX,u=e.originY,c=e.pathLength,l=e.pathSpacing,f=void 0===l?1:l,d=e.pathOffset,p=void 0===d?0:d;Jn(t,a(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,h=t.dimensions;v.transform&&(h&&(m.transform=v.transform),delete v.transform),h&&(void 0!==s||void 0!==u||m.transform)&&(m.transformOrigin=function(t,e,n){var r=wr(e,t.x,t.width),o=wr(n,t.y,t.height);return"".concat(r," ").concat(o)}(h,void 0!==s?s:.5,void 0!==u?u:.5)),void 0!==o&&(v.x=o),void 0!==i&&(v.y=i),void 0!==c&&function(t,e,n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=!0),t.pathLength=1;var i=o?Ar:Vr;t[i.offset]=j.transform(-r);var a=j.transform(e),s=j.transform(n);t[i.array]="".concat(a," ").concat(s)}(v,c,f,p,!1)}var Or=/([a-z])([A-Z])/g,Sr=function(t){return t.replace(Or,"$1-$2").toLowerCase()},Mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Tr=Wn(i(i({},yr),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Ge(e)?(null===(n=we(e))||void 0===n?void 0:n.default)||0:(e=Mr.has(e)?e:Sr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=hr(t);for(var n in t){if(Xn(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,o){xr(e,n,r,o.transformTemplate)},render:function(t,e,n,r){for(var o in gr(t,e,void 0,r),e.attrs)t.setAttribute(Mr.has(o)?o:Sr(o),e.attrs[o])}})),Er=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];var Cr=i(i({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Er.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Tr(e,{enableHardwareAcceleration:!1}):br(e,{enableHardwareAcceleration:!0})}},dn),zn);export{Cr as domAnimation};
|