framer-motion 9.0.4 → 9.0.6

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/dist/index.d.ts CHANGED
@@ -1661,6 +1661,10 @@ interface AnimationOptions<V = any> extends AnimationLifecycleOptions<V>, Animat
1661
1661
  * @public
1662
1662
  */
1663
1663
  declare type ControlsAnimationDefinition = string | string[] | TargetAndTransition | TargetResolver;
1664
+ interface PlaybackControls {
1665
+ stop: () => void;
1666
+ currentTime?: number;
1667
+ }
1664
1668
  /**
1665
1669
  * @public
1666
1670
  */
@@ -4319,10 +4323,40 @@ declare function delay(callback: DelayedFunction, timeout: number): () => void;
4319
4323
  declare const distance: (a: number, b: number) => number;
4320
4324
  declare function distance2D(a: Point, b: Point): number;
4321
4325
 
4326
+ declare type Mix<T> = (v: number) => T;
4327
+ declare type MixerFactory<T> = (from: T, to: T) => Mix<T>;
4328
+ interface InterpolateOptions<T> {
4329
+ clamp?: boolean;
4330
+ ease?: EasingFunction | EasingFunction[];
4331
+ mixer?: MixerFactory<T>;
4332
+ }
4333
+ /**
4334
+ * Create a function that maps from a numerical input array to a generic output array.
4335
+ *
4336
+ * Accepts:
4337
+ * - Numbers
4338
+ * - Colors (hex, hsl, hsla, rgb, rgba)
4339
+ * - Complex (combinations of one or more numbers or strings)
4340
+ *
4341
+ * ```jsx
4342
+ * const mixColor = interpolate([0, 1], ['#fff', '#000'])
4343
+ *
4344
+ * mixColor(0.5) // 'rgba(128, 128, 128, 1)'
4345
+ * ```
4346
+ *
4347
+ * TODO Revist this approach once we've moved to data models for values,
4348
+ * probably not needed to pregenerate mixer functions.
4349
+ *
4350
+ * @public
4351
+ */
4352
+ declare function interpolate<T>(input: number[], output: T[], { clamp: isClamp, ease, mixer }?: InterpolateOptions<T>): (v: number) => T;
4353
+
4322
4354
  declare const mix: (from: number, to: number, progress: number) => number;
4323
4355
 
4324
4356
  declare const pipe: (...transformers: Function[]) => Function;
4325
4357
 
4358
+ declare const progress: (from: number, to: number, value: number) => number;
4359
+
4326
4360
  declare const wrap: (min: number, max: number, v: number) => number;
4327
4361
 
4328
4362
  declare const sync: Sync;
@@ -4332,6 +4366,88 @@ declare const frameData: {
4332
4366
  timestamp: number;
4333
4367
  };
4334
4368
 
4369
+ declare function animateValue<V = number>({ duration, driver, elapsed, repeat: repeatMax, repeatType, repeatDelay, keyframes, autoplay, onPlay, onStop, onComplete, onRepeat, onUpdate, type, ...options }: AnimationOptions<V>): {
4370
+ stop: () => void;
4371
+ /**
4372
+ * Set the current time of the animation. This is purposefully
4373
+ * mirroring the WAAPI animation API to make them interchanagable.
4374
+ * Going forward this file should be ported more towards
4375
+ * https://github.com/motiondivision/motionone/blob/main/packages/animation/src/Animation.ts
4376
+ * Which behaviourally adheres to WAAPI as far as possible.
4377
+ *
4378
+ * WARNING: This is not safe to use for most animations. We currently
4379
+ * only use it for handoff from WAAPI within Framer.
4380
+ *
4381
+ * This animation function consumes time every frame rather than being sampled for time.
4382
+ * So the sample() method performs some headless frames to ensure
4383
+ * repeats are handled correctly. Ideally in the future we will replace
4384
+ * that method with this, once repeat calculations are pure.
4385
+ */
4386
+ currentTime: number;
4387
+ /**
4388
+ * animate() can't yet be sampled for time, instead it
4389
+ * consumes time. So to sample it we have to run a low
4390
+ * temporal-resolution version.
4391
+ */
4392
+ sample: (t: number) => {
4393
+ done: boolean;
4394
+ value: V;
4395
+ };
4396
+ };
4397
+
4398
+ declare function inertia({ keyframes, velocity, min, max, power, timeConstant, bounceStiffness, bounceDamping, restDelta, modifyTarget, driver, onUpdate, onComplete, onStop, }: AnimationOptions): {
4399
+ stop: () => void;
4400
+ };
4401
+
4402
+ declare type Transformer = (v: any) => any;
4403
+ declare type ValueType = {
4404
+ test: (v: any) => boolean;
4405
+ parse: (v: any) => any;
4406
+ transform?: Transformer;
4407
+ createTransformer?: (template: string) => Transformer;
4408
+ default?: any;
4409
+ getAnimatableNone?: (v: any) => any;
4410
+ };
4411
+ declare type RGBA = {
4412
+ red: number;
4413
+ green: number;
4414
+ blue: number;
4415
+ alpha: number;
4416
+ };
4417
+ declare type HSLA = {
4418
+ hue: number;
4419
+ saturation: number;
4420
+ lightness: number;
4421
+ alpha: number;
4422
+ };
4423
+ declare type Color = HSLA | RGBA;
4424
+
4425
+ declare const color: {
4426
+ test: (v: any) => boolean;
4427
+ parse: (v: any) => {
4428
+ [x: string]: number;
4429
+ alpha: number;
4430
+ };
4431
+ transform: (v: HSLA | RGBA | string) => string;
4432
+ };
4433
+
4434
+ declare function test(v: any): boolean;
4435
+ declare function parse(v: string | number): (number | Color)[];
4436
+ declare function createTransformer(source: string | number): (v: Array<Color | number | string>) => string;
4437
+ declare function getAnimatableNone(v: string | number): string;
4438
+ declare const complex: {
4439
+ test: typeof test;
4440
+ parse: typeof parse;
4441
+ createTransformer: typeof createTransformer;
4442
+ getAnimatableNone: typeof getAnimatableNone;
4443
+ };
4444
+
4445
+ declare const px: {
4446
+ test: (v: string | number) => boolean;
4447
+ parse: typeof parseFloat;
4448
+ transform: (v: number | string) => string;
4449
+ };
4450
+
4335
4451
  interface NativeAnimationOptions {
4336
4452
  delay?: number;
4337
4453
  duration?: number;
@@ -4428,4 +4544,4 @@ interface ScaleMotionValues {
4428
4544
  */
4429
4545
  declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;
4430
4546
 
4431
- export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, Variant, VariantLabels, Variants, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, resolveMotionValue, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, wrap };
4547
+ export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inertia, interpolate, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, wrap };
@@ -1109,7 +1109,7 @@
1109
1109
  stop: () => cancelSync.update(passTimestamp),
1110
1110
  };
1111
1111
  };
1112
- function animate$1({ duration, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = "loop", repeatDelay = 0, keyframes: keyframes$1, autoplay = true, onPlay, onStop, onComplete, onRepeat, onUpdate, type = "keyframes", ...options }) {
1112
+ function animateValue({ duration, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = "loop", repeatDelay = 0, keyframes: keyframes$1, autoplay = true, onPlay, onStop, onComplete, onRepeat, onUpdate, type = "keyframes", ...options }) {
1113
1113
  const initialElapsed = elapsed;
1114
1114
  let driverControls;
1115
1115
  let repeatCount = 0;
@@ -1319,7 +1319,7 @@
1319
1319
  */
1320
1320
  if (options.repeat === Infinity)
1321
1321
  return;
1322
- const sampleAnimation = animate$1({ ...options, elapsed: 0 });
1322
+ const sampleAnimation = animateValue({ ...options, elapsed: 0 });
1323
1323
  let state = { done: false, value: keyframes[0] };
1324
1324
  const pregeneratedKeyframes = [];
1325
1325
  /**
@@ -1384,7 +1384,10 @@
1384
1384
  */
1385
1385
  const { currentTime } = animation;
1386
1386
  if (currentTime) {
1387
- const sampleAnimation = animate$1({ ...options, autoplay: false });
1387
+ const sampleAnimation = animateValue({
1388
+ ...options,
1389
+ autoplay: false,
1390
+ });
1388
1391
  value.setWithVelocity(sampleAnimation.sample(currentTime - sampleDelta).value, sampleAnimation.sample(currentTime).value, sampleDelta);
1389
1392
  }
1390
1393
  sync.update(() => animation.cancel());
@@ -1431,7 +1434,7 @@
1431
1434
  }
1432
1435
  function startAnimation(options) {
1433
1436
  currentAnimation && currentAnimation.stop();
1434
- currentAnimation = animate$1({
1437
+ currentAnimation = animateValue({
1435
1438
  keyframes: [0, 1],
1436
1439
  velocity: 0,
1437
1440
  ...options,
@@ -1858,7 +1861,7 @@
1858
1861
  /**
1859
1862
  * If we didn't create an accelerated animation, create a JS animation
1860
1863
  */
1861
- return animate$1(options);
1864
+ return animateValue(options);
1862
1865
  };
1863
1866
  };
1864
1867
 
@@ -1931,7 +1934,7 @@
1931
1934
  * This will be replaced by the build step with the latest version number.
1932
1935
  * When MotionValues are provided to motion components, warn if versions are mixed.
1933
1936
  */
1934
- this.version = "9.0.4";
1937
+ this.version = "9.0.6";
1935
1938
  /**
1936
1939
  * Duration, in milliseconds, since last updating frame.
1937
1940
  *
@@ -5100,7 +5103,7 @@
5100
5103
  * and warn against mismatches.
5101
5104
  */
5102
5105
  {
5103
- warnOnce(nextValue.version === "9.0.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 9.0.4 may not work as expected.`);
5106
+ warnOnce(nextValue.version === "9.0.6", `Attempting to mix Framer Motion versions ${nextValue.version} with 9.0.6 may not work as expected.`);
5104
5107
  }
5105
5108
  }
5106
5109
  else if (isMotionValue(prevValue)) {
@@ -5738,7 +5741,7 @@
5738
5741
  exports.HTMLProjectionNode = HTMLProjectionNode;
5739
5742
  exports.HTMLVisualElement = HTMLVisualElement;
5740
5743
  exports.addScaleCorrector = addScaleCorrector;
5741
- exports.animate = animate$1;
5744
+ exports.animate = animateValue;
5742
5745
  exports.buildTransform = buildTransform;
5743
5746
  exports.calcBoxDelta = calcBoxDelta;
5744
5747
  exports.correctBorderRadius = correctBorderRadius;
@@ -1 +1 @@
1
- import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,n as b,J as V,c as w,K as A,i as C,f as P,b as x,m as S,a as M,L as T,g as E,p as F,M as k,N as I,s as O,h as N,o as D,j as L,k as R}from"./size-rollup-dom-animation-assets.js";function j(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const B=t=>/^0[^.\s]+$/.test(t),U={delta:0,timestamp:0},z="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),H="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(z()),1/60*1e3);let q=!0,$=!1,W=!1;const K=["read","update","preRender","render","postRender"],G=K.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>$=!0),t),{}),Y=K.reduce((t,e)=>{const n=G[e];return t[e]=(t,e=!1,s=!1)=>($||_(),n.schedule(t,e,s)),t},{}),X=K.reduce((t,e)=>(t[e]=G[e].cancel,t),{});K.reduce((t,e)=>(t[e]=()=>G[e].process(U),t),{});const Z=t=>G[t].process(U),J=t=>{$=!1,U.delta=q?1/60*1e3:Math.max(Math.min(t-U.timestamp,40),1),U.timestamp=t,W=!0,K.forEach(Z),W=!1,$&&(q=!1,H(J))},_=()=>{$=!0,q=!0,W||H(J)};class Q{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tt(t,e){return e?t*(1e3/e):0}class et{constructor(t,e={}){var n;this.version="9.0.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=U;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Y.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Y.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Q);const n=this.events[t].add(e);return"change"===t?()=>{n(),Y.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new et(t,e)}const st=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),rt=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},it={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ot={test:st("rgb","red"),parse:rt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+s(r.transform(i))+")"};const at={test:st("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ot.transform},ut={test:st("hsl","hue"),parse:rt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ct={test:t=>ot.test(t)||at.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):at.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ot.transform(e):ut.transform(e)};function lt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ct.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ht(t){return lt(t).values}function pt(t){const{values:e,numColors:n,tokenised:r}=lt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ct.transform(t[r]):s(t[r]));return e}}const dt=t=>"number"==typeof t?0:t;const ft={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ht,createTransformer:pt,getAnimatableNone:function(t){const e=ht(t);return pt(t)(e.map(dt))}},mt=new Set(["brightness","contrast","saturate","opacity"]);function gt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=mt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const vt=/([a-z-]*)\(.*?\)/g,yt={...ft,getAnimatableNone:t=>{const e=t.match(vt);return e?e.map(gt).join(" "):t}},bt={...c,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:yt,WebkitFilter:yt},Vt=t=>bt[t];function wt(t,e){let n=Vt(t);return n!==yt&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const At=t=>e=>e.test(t),Ct=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Pt=t=>Ct.find(At(t)),xt=[...Ct,ct,ft],St=t=>xt.find(At(t));function Mt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Tt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function Et(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ft(t){return Boolean(g(t)&&t.add)}const kt="data-"+v("framerAppearId");const It=t=>1e3*t,Ot=!1,Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dt=t=>e=>1-t(1-e),Lt=t=>t*t,Rt=Dt(Lt),jt=Nt(Lt),Bt=(t,e,n)=>-n*t+n*e+t;function Ut(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}const zt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Ht=[at,ot,ut];function qt(t){const e=(n=t,Ht.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ut&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ut(a,s,t+1/3),i=Ut(a,s,t),o=Ut(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const $t=(t,e)=>{const n=qt(t),s=qt(e),r={...n};return t=>(r.red=zt(n.red,s.red,t),r.green=zt(n.green,s.green,t),r.blue=zt(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),ot.transform(r))},Wt=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Wt);function Gt(t,e){return"number"==typeof t?n=>Bt(t,e,n):ct.test(t)?$t(t,e):Zt(t,e)}const Yt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>Gt(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},Xt=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Gt(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Zt=(t,e)=>{const n=ft.createTransformer(e),s=lt(t),r=lt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Kt(Yt(s.values,r.values),n):n=>""+(n>0?e:t)},Jt=(t,e)=>n=>Bt(t,e,n);function _t(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?Jt:"string"==typeof i?ct.test(i)?$t:Zt:Array.isArray(i)?Yt:"object"==typeof i?Xt:Jt);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Kt(t,i)}s.push(i)}return s}function Qt(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_t(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=((t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s})(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}const te=t=>t,ee=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ne(t,e,n,s){if(t===e&&n===s)return te;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ee(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ee(r(t),e,s)}const se=t=>1-Math.sin(Math.acos(t)),re=Dt(se),ie=Nt(re),oe=ne(.33,1.53,.69,.99),ae=Dt(oe),ue=Nt(ae),ce={linear:te,easeIn:Lt,easeInOut:jt,easeOut:Rt,circIn:se,circInOut:ie,circOut:re,backIn:ae,backInOut:ue,backOut:oe,anticipate:t=>(t*=2)<1?.5*ae(t):.5*(2-Math.pow(2,-10*(t-1)))},le=t=>{if(Array.isArray(t)){t.length;const[e,n,s,r]=t;return ne(e,n,s,r)}return"string"==typeof t?ce[t]:t};function he({keyframes:t,ease:e=jt,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(le):le(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(t),s);function a(){return Qt(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||jt).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function pe({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/de(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=de(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function de(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ge(t,e){return e.some(e=>void 0!==t[e])}function ve({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ge(t,me)&&ge(t,fe)){const n=pe(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=ye,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=de(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=tt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}ve.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:he,tween:he,spring:ve};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>Y.update(e,!0),stop:()=>X.update(e)}};function Ae({duration:t,driver:e=we,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,V=!1,w=!0;const A=be[o.length>2?"keyframes":d]||he,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=Qt([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(w=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Ve(e+-t,e,n):e-(t-e)+n}(n,b,i,w)):(n=Ve(n,b,i),"mirror"===r&&M.flipTarget()),V=!1,h&&h()}function E(t){w||(t=-t),n+=t,V||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),V=w?x.done:n<=0),p&&p(x.value),V&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,w)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const Ce=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ce([0,.65,.55,1]),circOut:Ce([.55,0,1,.45]),backIn:Ce([.31,.01,.66,-.59]),backOut:Ce([.33,1.53,.69,.99])};function xe(t){if(t)return Array.isArray(t)?Ce(t):Pe[t]}const Se={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Me={},Te={};for(const t in Se)Te[t]=()=>(void 0===Me[t]&&(Me[t]=Se[t]()),Me[t]);const Ee=new Set(["opacity"]);function Fe(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Te.waapi()&&Ee.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Pe[c])){if(r.repeat===1/0)return;const t=Ae({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:xe(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Y.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Ae({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Y.update(()=>l.cancel())}}}function ke(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Y.read(s,!0),()=>X.read(s)}function Ie({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:ke(r,-e)}:r()}const Oe=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ne=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),De=()=>({type:"keyframes",ease:"linear",duration:.3}),Le={type:"keyframes",duration:.8},Re={x:Oe,y:Oe,z:Oe,rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scaleX:Ne,scaleY:Ne,scale:Ne,opacity:De,backgroundColor:De,color:De,default:Ne},je=(t,{keyframes:e})=>{if(e.length>2)return Le;return(Re[t]||Re.default)(e[1])},Be=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)||e.startsWith("url(")));function Ue(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ze(t){return"number"==typeof t?0:wt("",t)}const He=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=It(o);const u=function(t,e,n,s){const r=Be(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=wt(e,n):Ue(i)&&"string"==typeof n?i=ze(n):!Array.isArray(n)&&Ue(n)&&"string"==typeof i&&(n=ze(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=Be(t,c),p=Be(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Ot||!1===i.type)return Ie(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ae({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=tt(t-a,U.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...je(t,d)}),d.duration&&(d.duration=It(d.duration)),d.repeatDelay&&(d.repeatDelay=It(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Fe(e,t,d);if(n)return n}return Ae(d)};function qe(t,e,n={}){const s=Mt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>$e(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(We).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(qe(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function $e(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Ke(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[kt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Y))}let h=s.start(He(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ft(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Tt(t,e,m(i[e]))}}(t,o)})}function We(t,e){return t.sortNodePosition(e)}function Ke({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}var Ge;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ge||(Ge={}));const Ye=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],Xe=[...Ye].reverse(),Ze=Ye.length;function Je(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>qe(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=qe(t,e,n);else{const r="function"==typeof e?Mt(t,e,n.custom):e;s=$e(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function _e(t){let e=Je(t);const n={[Ge.Animate]:tn(!0),[Ge.InView]:tn(),[Ge.Hover]:tn(),[Ge.Tap]:tn(),[Ge.Drag]:tn(),[Ge.Focus]:tn(),[Ge.Exit]:tn()};let s=!0;const r=(e,n)=>{const s=Mt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Ze;e++){const d=Xe[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=w(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=Qe(f.prevProp,m);let C=A||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!j(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){if(n[e].isActive===s)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(t=>{t.animationState&&t.animationState.setActive(e,s)}),n[e].isActive=s;const o=i(r,e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Qe(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!j(e,t)}function tn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class en{constructor(t){this.isMounted=!1,this.node=t}update(){}}let nn=0;const sn={animation:{Feature:class extends en{constructor(t){super(t),t.animationState||(t.animationState=_e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends en{constructor(){super(...arguments),this.id=nn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive(Ge.Exit,!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function rn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function on(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function an(t,e,n,s){return rn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,on(e)))(n),s)}function un(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const cn=un("dragHorizontal"),ln=un("dragVertical");function hn(){const t=function(t){let e=!1;if("y"===t)e=ln();else if("x"===t)e=cn();else{const t=cn(),n=ln();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function pn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return an(t.current,n,(n,r)=>{if("touch"===n.type||hn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive(Ge.Hover,e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const dn=(t,e)=>!!e&&(t===e||dn(t,e.parentElement));function fn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,on(n))}const mn=new WeakMap,gn=new WeakMap,vn=t=>{const e=mn.get(t.target);e&&e(t)},yn=t=>{t.forEach(vn)};function bn(t,e,n){const s=function({root:t,...e}){const n=t||document;gn.has(n)||gn.set(n,{});const s=gn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(yn,{root:t,...e})),s[r]}(e);return mn.set(t,n),s.observe(t),()=>{mn.delete(t),s.unobserve(t)}}const Vn={some:0,all:1};const wn={inView:{Feature:class extends en{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(Ge.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Vn[s]};return bn(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(Ge.InView,e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends en{constructor(){super(...arguments),this.removeStartListeners=te,this.removeEndListeners=te,this.removeAccessibleListeners=te,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=an(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();dn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=an(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Kt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=rn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fn("up",this.node.getProps().onTap)}),fn("down",(t,e)=>{this.startPress(t,e)})}),e=rn(this.node.current,"blur",()=>{this.isPressing&&fn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Kt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!1),!hn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=an(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=rn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends en{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!1),this.isActive=!1)}mount(){this.unmount=Kt(rn(this.node.current,"focus",()=>this.onFocus()),rn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends en{mount(){this.unmount=Kt(pn(this.node,!0),pn(this.node,!1))}unmount(){}}}};function An(t){return"string"==typeof t&&t.startsWith("var(--")}const Cn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pn(t,e,n=1){const[s,r]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():An(r)?Pn(r,e,n+1):r}const xn=new Set(["width","height","top","left","right","bottom","x","y"]),Sn=t=>xn.has(t),Mn=t=>t===i||t===l;var Tn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Tn||(Tn={}));const En=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return En(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?En(e[1],t):0}},kn=new Set(["x","y","z"]),In=A.filter(t=>!kn.has(t));const On={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Fn(4,13),y:Fn(5,14)},Nn=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Sn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Pt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Pt(c);for(let n=e;n<t;n++)d?Pt(p[n]):d=Pt(p[n])}else d=Pt(p);if(h!==d)if(Mn(h)&&Mn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return In.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=On[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=On[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),C&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Dn(t,e,n,s){return(t=>Object.keys(t).some(Sn))(e)?Nn(t,e,n,s):{target:e,transitionEnd:s}}const Ln=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!An(e))return;const n=Pn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!An(r))continue;const i=Pn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Dn(t,e=r.target,n,s=r.transitionEnd)},Rn={current:null},jn={current:!1};const Bn=Object.keys(P),Un=Bn.length,zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Hn=["initial",...Ye],qn=Hn.length;class $n extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Y.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=x(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ft(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),jn.current||function(){if(jn.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rn.current=t.matches;t.addListener(e),e()}else Rn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Y.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<Un;t++){const n=Bn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=P[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&M(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<zn.length;e++){const n=zn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ft(s)&&s.add(r);else if(g(o))t.addValue(r,nt(i,{owner:t})),Ft(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,nt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<qn;t++){const n=Hn[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=nt(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Q),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=Et(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||B(c))?c=parseFloat(c):!St(c)&&ft.test(u)&&(c=wt(o,u)),t.addValue(o,nt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Ln(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Wn extends $n{readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(T(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){E(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return F(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){k(t,e,n,s)}}class Kn extends $n{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}return e=I.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return O(t,e)}build(t,e,n,s){N(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){D(t,e,n,s)}mount(t){this.isSVGTag=L(t.tagName),super.mount(t)}}const Gn={renderer:(t,e)=>R(t)?new Kn(e,{enableHardwareAcceleration:!1}):new Wn(e,{enableHardwareAcceleration:!0}),...sn,...wn};export{Gn as domAnimation};
1
+ import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as g,H as v,I as y,n as b,J as V,c as w,K as A,i as C,f as P,b as x,m as S,a as M,L as T,g as E,p as F,M as k,N as I,s as O,h as N,o as D,j as L,k as R}from"./size-rollup-dom-animation-assets.js";function j(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const B=t=>/^0[^.\s]+$/.test(t),U={delta:0,timestamp:0},z="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),H="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(z()),1/60*1e3);let q=!0,$=!1,W=!1;const K=["read","update","preRender","render","postRender"],G=K.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>$=!0),t),{}),Y=K.reduce((t,e)=>{const n=G[e];return t[e]=(t,e=!1,s=!1)=>($||_(),n.schedule(t,e,s)),t},{}),X=K.reduce((t,e)=>(t[e]=G[e].cancel,t),{});K.reduce((t,e)=>(t[e]=()=>G[e].process(U),t),{});const Z=t=>G[t].process(U),J=t=>{$=!1,U.delta=q?1/60*1e3:Math.max(Math.min(t-U.timestamp,40),1),U.timestamp=t,W=!0,K.forEach(Z),W=!1,$&&(q=!1,H(J))},_=()=>{$=!0,q=!0,W||H(J)};class Q{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tt(t,e){return e?t*(1e3/e):0}class et{constructor(t,e={}){var n;this.version="9.0.6",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=U;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Y.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Y.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Q);const n=this.events[t].add(e);return"change"===t?()=>{n(),Y.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new et(t,e)}const st=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),rt=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},it={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ot={test:st("rgb","red"),parse:rt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+s(r.transform(i))+")"};const at={test:st("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ot.transform},ut={test:st("hsl","hue"),parse:rt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ct={test:t=>ot.test(t)||at.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):at.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ot.transform(e):ut.transform(e)};function lt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ct.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ht(t){return lt(t).values}function pt(t){const{values:e,numColors:n,tokenised:r}=lt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ct.transform(t[r]):s(t[r]));return e}}const dt=t=>"number"==typeof t?0:t;const ft={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ht,createTransformer:pt,getAnimatableNone:function(t){const e=ht(t);return pt(t)(e.map(dt))}},mt=new Set(["brightness","contrast","saturate","opacity"]);function gt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=mt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const vt=/([a-z-]*)\(.*?\)/g,yt={...ft,getAnimatableNone:t=>{const e=t.match(vt);return e?e.map(gt).join(" "):t}},bt={...c,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:yt,WebkitFilter:yt},Vt=t=>bt[t];function wt(t,e){let n=Vt(t);return n!==yt&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const At=t=>e=>e.test(t),Ct=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Pt=t=>Ct.find(At(t)),xt=[...Ct,ct,ft],St=t=>xt.find(At(t));function Mt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Tt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function Et(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ft(t){return Boolean(g(t)&&t.add)}const kt="data-"+v("framerAppearId");const It=t=>1e3*t,Ot=!1,Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dt=t=>e=>1-t(1-e),Lt=t=>t*t,Rt=Dt(Lt),jt=Nt(Lt),Bt=(t,e,n)=>-n*t+n*e+t;function Ut(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}const zt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Ht=[at,ot,ut];function qt(t){const e=(n=t,Ht.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ut&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ut(a,s,t+1/3),i=Ut(a,s,t),o=Ut(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const $t=(t,e)=>{const n=qt(t),s=qt(e),r={...n};return t=>(r.red=zt(n.red,s.red,t),r.green=zt(n.green,s.green,t),r.blue=zt(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),ot.transform(r))},Wt=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Wt);function Gt(t,e){return"number"==typeof t?n=>Bt(t,e,n):ct.test(t)?$t(t,e):Zt(t,e)}const Yt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>Gt(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},Xt=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Gt(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Zt=(t,e)=>{const n=ft.createTransformer(e),s=lt(t),r=lt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Kt(Yt(s.values,r.values),n):n=>""+(n>0?e:t)},Jt=(t,e)=>n=>Bt(t,e,n);function _t(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?Jt:"string"==typeof i?ct.test(i)?$t:Zt:Array.isArray(i)?Yt:"object"==typeof i?Xt:Jt);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Kt(t,i)}s.push(i)}return s}function Qt(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_t(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=((t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s})(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}const te=t=>t,ee=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ne(t,e,n,s){if(t===e&&n===s)return te;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ee(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ee(r(t),e,s)}const se=t=>1-Math.sin(Math.acos(t)),re=Dt(se),ie=Nt(re),oe=ne(.33,1.53,.69,.99),ae=Dt(oe),ue=Nt(ae),ce={linear:te,easeIn:Lt,easeInOut:jt,easeOut:Rt,circIn:se,circInOut:ie,circOut:re,backIn:ae,backInOut:ue,backOut:oe,anticipate:t=>(t*=2)<1?.5*ae(t):.5*(2-Math.pow(2,-10*(t-1)))},le=t=>{if(Array.isArray(t)){t.length;const[e,n,s,r]=t;return ne(e,n,s,r)}return"string"==typeof t?ce[t]:t};function he({keyframes:t,ease:e=jt,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(le):le(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(t),s);function a(){return Qt(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||jt).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function pe({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/de(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=de(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function de(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ge(t,e){return e.some(e=>void 0!==t[e])}function ve({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ge(t,me)&&ge(t,fe)){const n=pe(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=ye,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function g(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=de(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return g(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=tt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],g()}}}ve.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:he,tween:he,spring:ve};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>Y.update(e,!0),stop:()=>X.update(e)}};function Ae({duration:t,driver:e=we,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let g,v,y=0,b=t,V=!1,w=!0;const A=be[o.length>2?"keyframes":d]||he,C=o[0],P=o[o.length-1];let x={done:!1,value:C};const{needsInterpolation:S}=A;S&&S(C,P)&&(v=Qt([0,100],[C,P],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(w=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Ve(e+-t,e,n):e-(t-e)+n}(n,b,i,w)):(n=Ve(n,b,i),"mirror"===r&&M.flipTarget()),V=!1,h&&h()}function E(t){w||(t=-t),n+=t,V||(x=M.next(Math.max(0,n)),v&&(x.value=v(x.value)),V=w?x.done:n<=0),p&&p(x.value),V&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,w)&&T():(g&&g.stop(),l&&l()))}return a&&(u&&u(),g=e(E),g.start()),{stop:()=>{c&&c(),g&&g.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const Ce=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ce([0,.65,.55,1]),circOut:Ce([.55,0,1,.45]),backIn:Ce([.31,.01,.66,-.59]),backOut:Ce([.33,1.53,.69,.99])};function xe(t){if(t)return Array.isArray(t)?Ce(t):Pe[t]}const Se={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Me={},Te={};for(const t in Se)Te[t]=()=>(void 0===Me[t]&&(Me[t]=Se[t]()),Me[t]);const Ee=new Set(["opacity"]);function Fe(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Te.waapi()&&Ee.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Pe[c])){if(r.repeat===1/0)return;const t=Ae({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:xe(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Y.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Ae({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Y.update(()=>l.cancel())}}}function ke(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Y.read(s,!0),()=>X.read(s)}function Ie({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:ke(r,-e)}:r()}const Oe=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ne=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),De=()=>({type:"keyframes",ease:"linear",duration:.3}),Le={type:"keyframes",duration:.8},Re={x:Oe,y:Oe,z:Oe,rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scaleX:Ne,scaleY:Ne,scale:Ne,opacity:De,backgroundColor:De,color:De,default:Ne},je=(t,{keyframes:e})=>{if(e.length>2)return Le;return(Re[t]||Re.default)(e[1])},Be=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)||e.startsWith("url(")));function Ue(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ze(t){return"number"==typeof t?0:wt("",t)}const He=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=It(o);const u=function(t,e,n,s){const r=Be(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=wt(e,n):Ue(i)&&"string"==typeof n?i=ze(n):!Array.isArray(n)&&Ue(n)&&"string"==typeof i&&(n=ze(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=Be(t,c),p=Be(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Ot||!1===i.type)return Ie(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function v(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ae({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(g(f))b({velocity:e,keyframes:[f,v(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=v(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=tt(t-a,U.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:g(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...je(t,d)}),d.duration&&(d.duration=It(d.duration)),d.repeatDelay&&(d.repeatDelay=It(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Fe(e,t,d);if(n)return n}return Ae(d)};function qe(t,e,n={}){const s=Mt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>$e(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(We).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(qe(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function $e(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Ke(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[kt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Y))}let h=s.start(He(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ft(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Tt(t,e,m(i[e]))}}(t,o)})}function We(t,e){return t.sortNodePosition(e)}function Ke({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}var Ge;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ge||(Ge={}));const Ye=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],Xe=[...Ye].reverse(),Ze=Ye.length;function Je(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>qe(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=qe(t,e,n);else{const r="function"==typeof e?Mt(t,e,n.custom):e;s=$e(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function _e(t){let e=Je(t);const n={[Ge.Animate]:tn(!0),[Ge.InView]:tn(),[Ge.Hover]:tn(),[Ge.Tap]:tn(),[Ge.Drag]:tn(),[Ge.Focus]:tn(),[Ge.Exit]:tn()};let s=!0;const r=(e,n)=>{const s=Mt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Ze;e++){const d=Xe[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],g=w(m),v=d===o?f.isActive:null;!1===v&&(p=e);let y=m===u[d]&&m!==a[d]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===v||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=Qe(f.prevProp,m);let C=A||d===o&&f.isActive&&!y&&g||e>p&&g;const P=Array.isArray(m)?m:[m];let x=P.reduce(r,{});!1===v&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{C=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!j(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(C=!1),C&&!y&&c.push(...P.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){if(n[e].isActive===s)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(t=>{t.animationState&&t.animationState.setActive(e,s)}),n[e].isActive=s;const o=i(r,e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Qe(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!j(e,t)}function tn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class en{constructor(t){this.isMounted=!1,this.node=t}update(){}}let nn=0;const sn={animation:{Feature:class extends en{constructor(t){super(t),t.animationState||(t.animationState=_e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends en{constructor(){super(...arguments),this.id=nn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive(Ge.Exit,!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function rn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function on(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function an(t,e,n,s){return rn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,on(e)))(n),s)}function un(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const cn=un("dragHorizontal"),ln=un("dragVertical");function hn(){const t=function(t){let e=!1;if("y"===t)e=ln();else if("x"===t)e=cn();else{const t=cn(),n=ln();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function pn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return an(t.current,n,(n,r)=>{if("touch"===n.type||hn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive(Ge.Hover,e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const dn=(t,e)=>!!e&&(t===e||dn(t,e.parentElement));function fn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,on(n))}const mn=new WeakMap,gn=new WeakMap,vn=t=>{const e=mn.get(t.target);e&&e(t)},yn=t=>{t.forEach(vn)};function bn(t,e,n){const s=function({root:t,...e}){const n=t||document;gn.has(n)||gn.set(n,{});const s=gn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(yn,{root:t,...e})),s[r]}(e);return mn.set(t,n),s.observe(t),()=>{mn.delete(t),s.unobserve(t)}}const Vn={some:0,all:1};const wn={inView:{Feature:class extends en{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(Ge.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Vn[s]};return bn(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(Ge.InView,e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends en{constructor(){super(...arguments),this.removeStartListeners=te,this.removeEndListeners=te,this.removeAccessibleListeners=te,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=an(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();dn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=an(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Kt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=rn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=rn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fn("up",this.node.getProps().onTap)}),fn("down",(t,e)=>{this.startPress(t,e)})}),e=rn(this.node.current,"blur",()=>{this.isPressing&&fn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Kt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(Ge.Tap,!1),!hn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=an(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=rn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends en{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(Ge.Focus,!1),this.isActive=!1)}mount(){this.unmount=Kt(rn(this.node.current,"focus",()=>this.onFocus()),rn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends en{mount(){this.unmount=Kt(pn(this.node,!0),pn(this.node,!1))}unmount(){}}}};function An(t){return"string"==typeof t&&t.startsWith("var(--")}const Cn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Pn(t,e,n=1){const[s,r]=function(t){const e=Cn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():An(r)?Pn(r,e,n+1):r}const xn=new Set(["width","height","top","left","right","bottom","x","y"]),Sn=t=>xn.has(t),Mn=t=>t===i||t===l;var Tn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Tn||(Tn={}));const En=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return En(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?En(e[1],t):0}},kn=new Set(["x","y","z"]),In=A.filter(t=>!kn.has(t));const On={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Fn(4,13),y:Fn(5,14)},Nn=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Sn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Pt(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Pt(c);for(let n=e;n<t;n++)d?Pt(p[n]):d=Pt(p[n])}else d=Pt(p);if(h!==d)if(Mn(h)&&Mn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return In.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=On[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=On[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),C&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Dn(t,e,n,s){return(t=>Object.keys(t).some(Sn))(e)?Nn(t,e,n,s):{target:e,transitionEnd:s}}const Ln=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!An(e))return;const n=Pn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!An(r))continue;const i=Pn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Dn(t,e=r.target,n,s=r.transitionEnd)},Rn={current:null},jn={current:!1};const Bn=Object.keys(P),Un=Bn.length,zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Hn=["initial",...Ye],qn=Hn.length;class $n extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Y.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=x(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&g(e)&&(e.set(o[t],!1),Ft(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),jn.current||function(){if(jn.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rn.current=t.matches;t.addListener(e),e()}else Rn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Y.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<Un;t++){const n=Bn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=P[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&M(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<zn.length;e++){const n=zn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(g(i))t.addValue(r,i),Ft(s)&&s.add(r);else if(g(o))t.addValue(r,nt(i,{owner:t})),Ft(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,nt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<qn;t++){const n=Hn[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=nt(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||g(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Q),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=Et(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||B(c))?c=parseFloat(c):!St(c)&&ft.test(u)&&(c=wt(o,u)),t.addValue(o,nt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Ln(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Wn extends $n{readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(T(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){E(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return F(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;g(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){k(t,e,n,s)}}class Kn extends $n{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}return e=I.has(e)?e:v(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return O(t,e)}build(t,e,n,s){N(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){D(t,e,n,s)}mount(t){this.isSVGTag=L(t.tagName),super.mount(t)}}const Gn={renderer:(t,e)=>R(t)?new Kn(e,{enableHardwareAcceleration:!1}):new Wn(e,{enableHardwareAcceleration:!0}),...sn,...wn};export{Gn as domAnimation};