framer-motion 11.3.26 → 11.3.28-alpha.0

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.
@@ -279,7 +279,7 @@ class MotionValue {
279
279
  * This will be replaced by the build step with the latest version number.
280
280
  * When MotionValues are provided to motion components, warn if versions are mixed.
281
281
  */
282
- this.version = "11.3.26";
282
+ this.version = "11.3.28-alpha.0";
283
283
  /**
284
284
  * Tracks whether this value can output a velocity. Currently this is only true
285
285
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -678,6 +678,9 @@ class GroupPlaybackControls {
678
678
  set speed(speed) {
679
679
  this.setAll("speed", speed);
680
680
  }
681
+ get startTime() {
682
+ return this.getAll("startTime");
683
+ }
681
684
  get duration() {
682
685
  let max = 0;
683
686
  for (let i = 0; i < this.animations.length; i++) {
@@ -2643,10 +2646,6 @@ class MainThreadAnimation extends BaseAnimation {
2643
2646
  * The time at which the animation was paused.
2644
2647
  */
2645
2648
  this.holdTime = null;
2646
- /**
2647
- * The time at which the animation was started.
2648
- */
2649
- this.startTime = null;
2650
2649
  /**
2651
2650
  * The time at which the animation was cancelled.
2652
2651
  */
@@ -2665,6 +2664,10 @@ class MainThreadAnimation extends BaseAnimation {
2665
2664
  * without us having to resolve it first.
2666
2665
  */
2667
2666
  this.pendingPlayState = "running";
2667
+ /**
2668
+ * The time at which the animation was started.
2669
+ */
2670
+ this.startTime = null;
2668
2671
  this.state = "idle";
2669
2672
  /**
2670
2673
  * This method is bound to the instance to fix a pattern where
@@ -2909,16 +2912,20 @@ class MainThreadAnimation extends BaseAnimation {
2909
2912
  }
2910
2913
  if (this.isStopped)
2911
2914
  return;
2912
- const { driver = frameloopDriver, onPlay } = this.options;
2915
+ const { driver = frameloopDriver, onPlay, startTime } = this.options;
2913
2916
  if (!this.driver) {
2914
2917
  this.driver = driver((timestamp) => this.tick(timestamp));
2915
2918
  }
2916
2919
  onPlay && onPlay();
2920
+ const now = this.driver.now();
2917
2921
  if (this.holdTime !== null) {
2918
- this.startTime = this.driver.now() - this.holdTime;
2922
+ this.startTime = now - this.holdTime;
2919
2923
  }
2920
- else if (!this.startTime || this.state === "finished") {
2921
- this.startTime = this.calcStartTime();
2924
+ else if (!this.startTime) {
2925
+ this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
2926
+ }
2927
+ else if (this.state === "finished") {
2928
+ this.startTime = now;
2922
2929
  }
2923
2930
  if (this.state === "finished") {
2924
2931
  this.updateFinishedPromise();
@@ -3114,7 +3121,7 @@ class AcceleratedAnimation extends BaseAnimation {
3114
3121
  }
3115
3122
  initPlayback(keyframes, finalKeyframe) {
3116
3123
  var _a;
3117
- let { duration = 300, times, ease, type, motionValue, name, } = this.options;
3124
+ let { duration = 300, times, ease, type, motionValue, name, startTime, } = this.options;
3118
3125
  /**
3119
3126
  * If element has since been unmounted, return false to indicate
3120
3127
  * the animation failed to initialised.
@@ -3143,7 +3150,7 @@ class AcceleratedAnimation extends BaseAnimation {
3143
3150
  const animation = animateStyle(motionValue.owner.current, name, keyframes, { ...this.options, duration, times, ease });
3144
3151
  // Override the browser calculated startTime with one synchronised to other JS
3145
3152
  // and WAAPI animations starting this event loop.
3146
- animation.startTime = this.calcStartTime();
3153
+ animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
3147
3154
  if (this.pendingTimeline) {
3148
3155
  animation.timeline = this.pendingTimeline;
3149
3156
  this.pendingTimeline = undefined;
@@ -3216,6 +3223,15 @@ class AcceleratedAnimation extends BaseAnimation {
3216
3223
  const { animation } = resolved;
3217
3224
  return animation.playState;
3218
3225
  }
3226
+ get startTime() {
3227
+ const { resolved } = this;
3228
+ if (!resolved)
3229
+ return null;
3230
+ const { animation } = resolved;
3231
+ // Coerce to number as TypeScript incorrectly types this
3232
+ // as CSSNumberish
3233
+ return animation.startTime;
3234
+ }
3219
3235
  /**
3220
3236
  * Replace the default DocumentTimeline with another AnimationTimeline.
3221
3237
  * Currently used for scroll animations.
@@ -3621,7 +3637,6 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
3621
3637
  }
3622
3638
  const valueTransition = {
3623
3639
  delay,
3624
- elapsed: 0,
3625
3640
  ...getValueTransition$1(transition || {}, key),
3626
3641
  };
3627
3642
  /**
@@ -3632,9 +3647,9 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
3632
3647
  if (window.MotionHandoffAnimation) {
3633
3648
  const appearId = getOptimisedAppearId(visualElement);
3634
3649
  if (appearId) {
3635
- const elapsed = window.MotionHandoffAnimation(appearId, key, frame);
3636
- if (elapsed !== null) {
3637
- valueTransition.elapsed = elapsed;
3650
+ const startTime = window.MotionHandoffAnimation(appearId, key, frame);
3651
+ if (startTime !== null) {
3652
+ valueTransition.startTime = startTime;
3638
3653
  isHandoff = true;
3639
3654
  }
3640
3655
  }
@@ -3775,7 +3790,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3775
3790
  * and warn against mismatches.
3776
3791
  */
3777
3792
  if (process.env.NODE_ENV === "development") {
3778
- warnOnce(nextValue.version === "11.3.26", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.26 may not work as expected.`);
3793
+ warnOnce(nextValue.version === "11.3.28-alpha.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.28-alpha.0 may not work as expected.`);
3779
3794
  }
3780
3795
  }
3781
3796
  else if (isMotionValue(prevValue)) {
package/dist/cjs/index.js CHANGED
@@ -3893,10 +3893,6 @@ class MainThreadAnimation extends BaseAnimation {
3893
3893
  * The time at which the animation was paused.
3894
3894
  */
3895
3895
  this.holdTime = null;
3896
- /**
3897
- * The time at which the animation was started.
3898
- */
3899
- this.startTime = null;
3900
3896
  /**
3901
3897
  * The time at which the animation was cancelled.
3902
3898
  */
@@ -3915,6 +3911,10 @@ class MainThreadAnimation extends BaseAnimation {
3915
3911
  * without us having to resolve it first.
3916
3912
  */
3917
3913
  this.pendingPlayState = "running";
3914
+ /**
3915
+ * The time at which the animation was started.
3916
+ */
3917
+ this.startTime = null;
3918
3918
  this.state = "idle";
3919
3919
  /**
3920
3920
  * This method is bound to the instance to fix a pattern where
@@ -4159,16 +4159,20 @@ class MainThreadAnimation extends BaseAnimation {
4159
4159
  }
4160
4160
  if (this.isStopped)
4161
4161
  return;
4162
- const { driver = frameloopDriver, onPlay } = this.options;
4162
+ const { driver = frameloopDriver, onPlay, startTime } = this.options;
4163
4163
  if (!this.driver) {
4164
4164
  this.driver = driver((timestamp) => this.tick(timestamp));
4165
4165
  }
4166
4166
  onPlay && onPlay();
4167
+ const now = this.driver.now();
4167
4168
  if (this.holdTime !== null) {
4168
- this.startTime = this.driver.now() - this.holdTime;
4169
+ this.startTime = now - this.holdTime;
4170
+ }
4171
+ else if (!this.startTime) {
4172
+ this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
4169
4173
  }
4170
- else if (!this.startTime || this.state === "finished") {
4171
- this.startTime = this.calcStartTime();
4174
+ else if (this.state === "finished") {
4175
+ this.startTime = now;
4172
4176
  }
4173
4177
  if (this.state === "finished") {
4174
4178
  this.updateFinishedPromise();
@@ -4355,7 +4359,7 @@ class AcceleratedAnimation extends BaseAnimation {
4355
4359
  }
4356
4360
  initPlayback(keyframes, finalKeyframe) {
4357
4361
  var _a;
4358
- let { duration = 300, times, ease, type, motionValue, name, } = this.options;
4362
+ let { duration = 300, times, ease, type, motionValue, name, startTime, } = this.options;
4359
4363
  /**
4360
4364
  * If element has since been unmounted, return false to indicate
4361
4365
  * the animation failed to initialised.
@@ -4384,7 +4388,7 @@ class AcceleratedAnimation extends BaseAnimation {
4384
4388
  const animation = animateStyle(motionValue.owner.current, name, keyframes, { ...this.options, duration, times, ease });
4385
4389
  // Override the browser calculated startTime with one synchronised to other JS
4386
4390
  // and WAAPI animations starting this event loop.
4387
- animation.startTime = this.calcStartTime();
4391
+ animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
4388
4392
  if (this.pendingTimeline) {
4389
4393
  animation.timeline = this.pendingTimeline;
4390
4394
  this.pendingTimeline = undefined;
@@ -4457,6 +4461,15 @@ class AcceleratedAnimation extends BaseAnimation {
4457
4461
  const { animation } = resolved;
4458
4462
  return animation.playState;
4459
4463
  }
4464
+ get startTime() {
4465
+ const { resolved } = this;
4466
+ if (!resolved)
4467
+ return null;
4468
+ const { animation } = resolved;
4469
+ // Coerce to number as TypeScript incorrectly types this
4470
+ // as CSSNumberish
4471
+ return animation.startTime;
4472
+ }
4460
4473
  /**
4461
4474
  * Replace the default DocumentTimeline with another AnimationTimeline.
4462
4475
  * Currently used for scroll animations.
@@ -4636,6 +4649,9 @@ class GroupPlaybackControls {
4636
4649
  set speed(speed) {
4637
4650
  this.setAll("speed", speed);
4638
4651
  }
4652
+ get startTime() {
4653
+ return this.getAll("startTime");
4654
+ }
4639
4655
  get duration() {
4640
4656
  let max = 0;
4641
4657
  for (let i = 0; i < this.animations.length; i++) {
@@ -4846,7 +4862,7 @@ class MotionValue {
4846
4862
  * This will be replaced by the build step with the latest version number.
4847
4863
  * When MotionValues are provided to motion components, warn if versions are mixed.
4848
4864
  */
4849
- this.version = "11.3.26";
4865
+ this.version = "11.3.28-alpha.0";
4850
4866
  /**
4851
4867
  * Tracks whether this value can output a velocity. Currently this is only true
4852
4868
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -5252,7 +5268,6 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
5252
5268
  }
5253
5269
  const valueTransition = {
5254
5270
  delay,
5255
- elapsed: 0,
5256
5271
  ...getValueTransition$1(transition || {}, key),
5257
5272
  };
5258
5273
  /**
@@ -5263,9 +5278,9 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
5263
5278
  if (window.MotionHandoffAnimation) {
5264
5279
  const appearId = getOptimisedAppearId(visualElement);
5265
5280
  if (appearId) {
5266
- const elapsed = window.MotionHandoffAnimation(appearId, key, frame);
5267
- if (elapsed !== null) {
5268
- valueTransition.elapsed = elapsed;
5281
+ const startTime = window.MotionHandoffAnimation(appearId, key, frame);
5282
+ if (startTime !== null) {
5283
+ valueTransition.startTime = startTime;
5269
5284
  isHandoff = true;
5270
5285
  }
5271
5286
  }
@@ -7308,7 +7323,7 @@ function updateMotionValuesFromProps(element, next, prev) {
7308
7323
  * and warn against mismatches.
7309
7324
  */
7310
7325
  if (process.env.NODE_ENV === "development") {
7311
- warnOnce(nextValue.version === "11.3.26", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.26 may not work as expected.`);
7326
+ warnOnce(nextValue.version === "11.3.28-alpha.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.28-alpha.0 may not work as expected.`);
7312
7327
  }
7313
7328
  }
7314
7329
  else if (isMotionValue(prevValue)) {
@@ -12171,7 +12186,6 @@ const appearStoreId = (id, value) => `${id}: ${value}`;
12171
12186
  const appearAnimationStore = new Map();
12172
12187
  const elementsWithAppearAnimations = new Set();
12173
12188
 
12174
- let handoffFrameTime;
12175
12189
  function handoffOptimizedAppearAnimation(elementId, valueName, frame) {
12176
12190
  const optimisedValueName = transformProps.has(valueName)
12177
12191
  ? "transform"
@@ -12200,23 +12214,7 @@ function handoffOptimizedAppearAnimation(elementId, valueName, frame) {
12200
12214
  return null;
12201
12215
  }
12202
12216
  else {
12203
- /**
12204
- * Otherwise we're starting a main thread animation.
12205
- *
12206
- * Record the time of the first handoff. We call performance.now() once
12207
- * here and once in startOptimisedAnimation to ensure we're getting
12208
- * close to a frame-locked time. This keeps all animations in sync.
12209
- */
12210
- if (handoffFrameTime === undefined) {
12211
- handoffFrameTime = performance.now();
12212
- }
12213
- /**
12214
- * We use main thread timings vs those returned by Animation.currentTime as it
12215
- * can be the case, particularly in Firefox, that currentTime doesn't return
12216
- * an updated value for several frames, even as the animation plays smoothly via
12217
- * the GPU.
12218
- */
12219
- return handoffFrameTime - startTime || 0;
12217
+ return startTime;
12220
12218
  }
12221
12219
  }
12222
12220
 
@@ -310,6 +310,7 @@ interface Transition extends AnimationPlaybackOptions, Omit<SpringOptions, "keyf
310
310
  type?: "decay" | "spring" | "keyframes" | "tween" | "inertia";
311
311
  duration?: number;
312
312
  autoplay?: boolean;
313
+ startTime?: number;
313
314
  }
314
315
  interface ValueAnimationTransition<V = any> extends Transition, AnimationPlaybackLifecycles<V> {
315
316
  }
@@ -340,6 +341,7 @@ type ElementOrSelector = Element | Element[] | NodeListOf<Element> | string;
340
341
  interface AnimationPlaybackControls {
341
342
  time: number;
342
343
  speed: number;
344
+ startTime: number | null;
343
345
  state?: AnimationPlayState;
344
346
  duration: number;
345
347
  stop: () => void;
@@ -702,6 +704,7 @@ declare class GroupPlaybackControls implements AnimationPlaybackControls {
702
704
  set time(time: number);
703
705
  get speed(): number;
704
706
  set speed(speed: number);
707
+ get startTime(): any;
705
708
  get duration(): number;
706
709
  private runAll;
707
710
  play(): void;
@@ -852,7 +855,7 @@ interface FrameData {
852
855
  isProcessing: boolean;
853
856
  }
854
857
 
855
- type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => null | number;
858
+ type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;
856
859
  /**
857
860
  * The window global object acts as a bridge between our inline script
858
861
  * triggering the optimized appear animations, and Framer Motion.
package/dist/dom.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class u{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>l(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 c(t,e){return e?t*(1e3/e):0}let h;function d(){h=void 0}const p={now:()=>(void 0===h&&p.set(o.isProcessing||n?o.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(d)}};class f{constructor(t,e={}){this.version="11.3.26",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=p.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=p.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new u);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=p.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function m(t,e){return new f(t,e)}let g=e,v=e;function y(t,e,n){var s;if("string"==typeof t){let r=document;e&&(v(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const w=new WeakMap;function b(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function x(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=x(()=>void 0!==window.ScrollTimeline);class T{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!S()||!e.attachTimeline)return e.pause(),b(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const V=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],A=new Set(V),M=t=>1e3*t,P=t=>t/1e3,k={type:"spring",stiffness:500,damping:25,restSpeed:10},C={type:"keyframes",duration:.8},F={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},E=(t,{keyframes:e})=>e.length>2?C:A.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:k:F;function O(t,e){return t[e]||t.default||t}const R=t=>null!==t;function B(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(R),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const I=t=>/^0[^.\s]+$/u.test(t);const W=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),D=t=>e=>"string"==typeof e&&e.startsWith(t),L=D("--"),N=D("var(--"),K=t=>!!N(t)&&z.test(t.split("/*")[0].trim()),z=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,j=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $(t,e,n=1){const[s,r]=function(t){const e=j.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return W(t)?parseFloat(t):t}return K(r)?$(r,e,n+1):r}const H=(t,e,n)=>n>e?e:n<t?t:n,U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Y={...U,transform:t=>H(0,1,t)},q={...U,default:1},X=t=>Math.round(1e5*t)/1e5,G=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Z=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function J(t){return"string"==typeof t}const Q=t=>({test:e=>J(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Q("deg"),et=Q("%"),nt=Q("px"),st=Q("vh"),rt=Q("vw"),it={...et,parse:t=>et.parse(t)/100,transform:t=>et.transform(100*t)},ot=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),at=t=>t===U||t===nt,lt=(t,e)=>parseFloat(t.split(", ")[e]),ut=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return lt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?lt(e[1],t):0}},ct=new Set(["x","y","z"]),ht=V.filter(t=>!ct.has(t));const dt={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:ut(4,13),y:ut(5,14)};dt.translateX=dt.x,dt.translateY=dt.y;const pt=t=>e=>e.test(t),ft=[U,nt,et,tt,rt,st,{test:t=>"auto"===t,parse:t=>t}],mt=t=>ft.find(pt(t)),gt=new Set;let vt=!1,yt=!1;function wt(){if(yt){const t=Array.from(gt).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return ht.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}yt=!1,vt=!1,gt.forEach(t=>t.complete()),gt.clear()}function bt(){gt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yt=!0)})}class xt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gt.add(this),vt||(vt=!0,r.read(bt),r.resolveKeyframes(wt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const St=(t,e)=>n=>Boolean(J(n)&&_.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Tt=(t,e,n)=>s=>{if(!J(s))return s;const[r,i,o,a]=s.match(G);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Vt={...U,transform:t=>Math.round((t=>H(0,255,t))(t))},At={test:St("rgb","red"),parse:Tt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Vt.transform(t)+", "+Vt.transform(e)+", "+Vt.transform(n)+", "+X(Y.transform(s))+")"};const Mt={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:At.transform},Pt={test:St("hsl","hue"),parse:Tt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+et.transform(X(e))+", "+et.transform(X(n))+", "+X(Y.transform(s))+")"},kt={test:t=>At.test(t)||Mt.test(t)||Pt.test(t),parse:t=>At.test(t)?At.parse(t):Pt.test(t)?Pt.parse(t):Mt.parse(t),transform:t=>J(t)?t:t.hasOwnProperty("red")?At.transform(t):Pt.transform(t)};const Ct=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ct,t=>(kt.test(t)?(s.color.push(i),r.push("color"),n.push(kt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function Et(t){return Ft(t).values}function Ot(t){const{split:e,types:n}=Ft(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?X(t[i]):"color"===e?kt.transform(t[i]):t[i]}return r}}const Rt=t=>"number"==typeof t?0:t;const Bt={test:function(t){var e,n;return isNaN(t)&&J(t)&&((null===(e=t.match(G))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Z))||void 0===n?void 0:n.length)||0)>0},parse:Et,createTransformer:Ot,getAnimatableNone:function(t){const e=Et(t);return Ot(t)(e.map(Rt))}},It=new Set(["brightness","contrast","saturate","opacity"]);function Wt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(G)||[];if(!s)return t;const r=n.replace(s,"");let i=It.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Dt=/\b([a-z-]*)\(.*?\)/gu,Lt={...Bt,getAnimatableNone:t=>{const e=t.match(Dt);return e?e.map(Wt).join(" "):t}},Nt={...U,transform:Math.round},Kt={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:tt,skewX:tt,skewY:tt,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Y,originX:it,originY:it,originZ:nt,zIndex:Nt,backgroundPositionX:nt,backgroundPositionY:nt,fillOpacity:Y,strokeOpacity:Y,numOctaves:Nt},zt={...Kt,color:kt,backgroundColor:kt,outlineColor:kt,fill:kt,stroke:kt,borderColor:kt,borderTopColor:kt,borderRightColor:kt,borderBottomColor:kt,borderLeftColor:kt,filter:Lt,WebkitFilter:Lt},jt=t=>zt[t];function $t(t,e){let n=jt(t);return n!==Lt&&(n=Bt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ht=new Set(["auto","none","0"]);class Ut extends xt{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),K(s))){const r=$(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!ot.has(n)||2!==t.length)return;const[s,r]=t,i=mt(s),o=mt(r);if(i!==o)if(at(i)&&at(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||I(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ht.has(e)&&Ft(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=$t(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=dt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Yt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Bt.test(t)&&"0"!==t||t.startsWith("url(")));class qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=p.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(bt(),wt()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=p.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=Yt(r,e),a=Yt(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&s)}(t,n,s,r)){if(!i)return null==a||a(B(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Xt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}function Gt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=H(.05,1,o),t=H(.01,10,P(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Zt(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Zt(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=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=M(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Zt(t,e){return t*Math.sqrt(1-e*e)}const _t=["duration","bounce"],Jt=["stiffness","damping","mass"];function Qt(t,e){return e.some(e=>void 0!==t[e])}function te({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Qt(t,Jt)&&Qt(t,_t)){const n=Gt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-P(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=P(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=Zt(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=0;f<1&&(r=0===t?M(p):Xt(y,t,s));const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,x;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=te({keyframes:[d.value,p(d.value)],velocity:Xt(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ne=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function se(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ne(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:ne(i(t),n,r)}const re=se(.42,0,1,1),ie=se(0,0,.58,1),oe=se(.42,0,.58,1),ae=t=>Array.isArray(t)&&"number"!=typeof t[0],le=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ue=t=>e=>1-t(1-e),ce=t=>1-Math.sin(Math.acos(t)),he=ue(ce),de=le(ce),pe=se(.33,1.53,.69,.99),fe=ue(pe),me=le(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ve={linear:e,easeIn:re,easeInOut:oe,easeOut:ie,circIn:ce,circInOut:de,circOut:he,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ye=t=>{if(Array.isArray(t)){v(4===t.length);const[e,n,s,r]=t;return se(e,n,s,r)}return"string"==typeof t?ve[t]:t},we=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(we),xe=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Se=(t,e,n)=>t+(e-t)*n;function Te(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ve(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Me=[Mt,At,Pt];function Pe(t){const e=(n=t,Me.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Pt&&(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=Te(a,s,t+1/3),i=Te(a,s,t),o=Te(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 ke=(t,e)=>{const n=Pe(t),s=Pe(e);if(!n||!s)return Ve(t,e);const r={...n};return t=>(r.red=Ae(n.red,s.red,t),r.green=Ae(n.green,s.green,t),r.blue=Ae(n.blue,s.blue,t),r.alpha=Se(n.alpha,s.alpha,t),At.transform(r))},Ce=new Set(["none","hidden"]);function Fe(t,e){return n=>Se(t,e,n)}function Ee(t){return"number"==typeof t?Fe:"string"==typeof t?K(t)?Ve:kt.test(t)?ke:Be:Array.isArray(t)?Oe:"object"==typeof t?kt.test(t)?ke:Re:Ve}function Oe(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Ee(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Ee(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Be=(t,e)=>{const n=Bt.createTransformer(e),s=Ft(t),r=Ft(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Ce.has(t)&&!r.values.length||Ce.has(e)&&!s.values.length?function(t,e){return Ce.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):be(Oe(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):Ve(t,e)};function Ie(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Se(t,e,n);return Ee(t)(t,e)}function We(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(v(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Ie,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=be(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=xe(t[n],t[n+1],e);return a[n](s)};return s?e=>u(H(t[0],t[o-1],e)):u}function De(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=xe(0,e,s);t.push(Se(n,1,r))}}function Le(t){const e=[0];return De(e,t.length-1),e}function Ne({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=ae(s)?s.map(ye):ye(s),i={done:!1,value:e[0]},o=We(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Le(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||oe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function Ke(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const ze=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:p.now()}},je={decay:ee,inertia:ee,tween:Ne,keyframes:Ne,spring:te},$e=t=>t/100;class He extends qt{constructor(t){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||xt;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=je[e]||Ne;let a,l;o!==Ne&&"number"!=typeof t[0]&&(a=be($e,Ie(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=Ke(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=H(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&void 0!==s&&(b.value=B(a,this.options,s)),m&&m(b.value),S&&this.finish(),b}get duration(){const{resolved:t}=this;return t?P(t.calculatedDuration):0}get time(){return P(this.currentTime)}set time(t){t=M(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=P(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ze,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e(),null!==this.holdTime?this.startTime=this.driver.now()-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=this.calcStartTime()),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ue=new Set(["opacity","clipPath","filter","transform"]),Ye=t=>Array.isArray(t)&&"number"==typeof t[0];function qe(t){return Boolean(!t||"string"==typeof t&&t in Ge||Ye(t)||Array.isArray(t)&&t.every(qe))}const Xe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xe([0,.65,.55,1]),circOut:Xe([.55,0,1,.45]),backIn:Xe([.31,.01,.66,-.59]),backOut:Xe([.33,1.53,.69,.99])};function Ze(t){return _e(t)||Ge.easeOut}function _e(t){return t?Ye(t)?Xe(t):Array.isArray(t)?t.map(Ze):Ge[t]:void 0}const Je=x(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Qe extends qt{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new Ut(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qe(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new He({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,r=c.times,i=c.ease,o="keyframes"}var u;const c=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=_e(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return c.startTime=this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(B(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return P(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return P(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=M(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new He({...u,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),h=M(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Je()&&n&&Ue.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const tn=(t,e,n,s={},i,o,a)=>l=>{const u=O(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=M(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete(),a&&a()},onStop:a,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(u)||(d={...d,...E(t,d)}),d.duration&&(d.duration=M(d.duration)),d.repeatDelay&&(d.repeatDelay=M(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(p=!0)),p&&!o&&void 0!==e.get()){const t=B(d.keyframes,u);if(void 0!==t)return r.update(()=>{d.onUpdate(t),d.onComplete()}),new T([])}return!o&&Qe.supports(d)?new Qe(d):new He(d)},en=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function nn(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function sn(t,e,n,s){if("function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function rn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,m(n))}function on(t,e){const n=function(t,e,n){const s=t.getProps();return sn(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){rn(t,e,en(i[e]))}}const an=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ln="data-"+an("framerAppearId");function un(t){return t.getProps()[ln]}class cn extends f{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=function(t){return A.has(t)?"transform":Ue.has(t)?an(t):void 0}(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let s=!1;return()=>{if(s)return;s=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(l(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const hn=t=>Boolean(t&&t.getVelocity);function dn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new cn("auto"),t.addValue("willChange",s)),r=s,Boolean(hn(r)&&r.add)?s.add(e):void 0;var r}function pn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&pn(h,e))continue;const l={delay:n,elapsed:0,...O(a||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=un(t);if(n){const t=window.MotionHandoffAnimation(n,e,r);null!==t&&(l.elapsed=t,d=!0)}}s.start(tn(e,s,i,t.shouldReduceMotion&&A.has(e)?{type:!1}:l,t,d,dn(t,e)));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&on(t,l)})}),c}const mn={};function gn(t,{layout:e,layoutId:n}){return A.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!mn[t]||"opacity"===t)}function vn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(hn(r[o])||e.style&&hn(e.style[o])||gn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const yn="undefined"!=typeof window,wn={current:null},bn={current:!1};function xn(t){return"string"==typeof t||Array.isArray(t)}const Sn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Tn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Sn.some(e=>xn(t[e]));var e}const Vn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},An={};for(const t in Vn)An[t]={isEnabled:e=>Vn[t].some(t=>!!e[t])};const Mn=[...ft,kt,Bt],Pn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),kn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Cn=Sn.length;class Fn extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Tn(e),this.isVariantNode=function(t){return Boolean(Tn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&hn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,w.set(t,this),this.projection&&!this.projection.instance&&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)),bn.current||function(){if(bn.current=!0,yn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wn.current=t.matches;t.addListener(e),e()}else wn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){w.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(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){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){const n=A.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in An){const e=An[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,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}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<kn.length;e++){const n=kn[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){for(const s in e){const r=e[s],i=n[s];if(hn(r))t.addValue(s,r);else if(hn(i))t.addValue(s,m(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,m(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),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<Cn;t++){const n=Sn[t],s=this.props[n];(xn(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){const n=this.values.get(t);e!==n&&(n&&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=m(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=s&&("string"==typeof s&&(W(s)||I(s))?s=parseFloat(s):(r=s,!Mn.find(pt(r))&&Bt.test(e)&&(s=$t(t,e))),this.setBaseTarget(t,hn(s)?s.get():s)),hn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=sn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||hn(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 u),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Ut}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]}}const En=(t,e)=>e&&"number"==typeof t?e.transform(t):t,On={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rn=V.length;function Bn(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(A.has(t))o=!0;else if(L(t))r[t]=n;else{const e=En(n,Kt[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<Rn;i++){const o=V[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=En(a,Kt[o]);if(!l){r=!1;s+=`${On[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}function In(t,e,n){return"string"==typeof t?t:nt.transform(e+n*t)}const Wn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dn={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Bn(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${In(e,t.x,t.width)} ${In(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Wn:Dn;t[i.offset]=nt.transform(-s);const o=nt.transform(e),a=nt.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Nn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Kn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class zn extends Fn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}return e=Nn.has(e)?e:an(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=vn(t,e,n);for(const n in t)if(hn(t[n])||hn(e[n])){s[-1!==V.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Ln(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Kn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Nn.has(n)?n:an(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class jn extends Fn{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Kn}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(L(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){Bn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return vn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function $n(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new zn(e):new jn(e);n.mount(t),w.set(t,n)}function Hn(t,e,n){const s=hn(t)?t:m(t);return s.start(tn("",s,e,n)),s.animation}function Un(t,e=100){const n=te({keyframes:[0,e],...t}),s=Math.min(Ke(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:P(s)}}function Yn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const qn=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Xn(t,e){return ae(t)?t[qn(0,t.length,e)]:t}function Gn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(l(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Se(r,i,s[o]),easing:Xn(n,o)})}function Zn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function _n(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Jn(t,e){return e[t]||(e[t]=[]),e[t]}function Qn(t){return Array.isArray(t)?t:[t]}function ts(t,e){return t[e]?{...t,...t[e]}:{...t}}const es=t=>"number"==typeof t,ns=t=>t.every(es);function ss(t,e,n,s){const r=y(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];w.has(s)||$n(s);const a=w.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...fn(a,{...e,transition:l},{}))}return new T(o)}function rs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,Yn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Yn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=Qn(t),{delay:l=0,times:u=Le(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&ns(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=M(g));const n=Un(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&De(u,x),1===a.length&&a.unshift(null),Gn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(hn(d)){g(p,f,Jn("default",_n(d,o)))}else{const t=y(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=_n(t[n],o);for(const t in p)g(p[t],ts(f,t),Jn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Zn);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(xe(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=hn(n)?Hn(n,t.default,e.default):ss(n,t,e),s.push(r)}),new T(s)}const is=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?rs(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?ss(e,n,s,t):Hn(e,n,s),t&&t.animations.push(r),r},os=is(),as=new WeakMap;let ls;function us({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=as.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function cs(t){t.forEach(us)}function hs(t,e){ls||"undefined"!=typeof ResizeObserver&&(ls=new ResizeObserver(cs));const n=y(t);return n.forEach(t=>{let n=as.get(t);n||(n=new Set,as.set(t,n)),n.add(e),null==ls||ls.observe(t)}),()=>{n.forEach(t=>{const n=as.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ls||ls.unobserve(t)})}}const ds=new Set;let ps;function fs(t){return ds.add(t),ps||(ps=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ds.forEach(t=>t(e))},window.addEventListener("resize",ps)),()=>{ds.delete(t),!ds.size&&ps&&(ps=void 0)}}const ms={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function gs(t,e,n,s){const r=n[e],{length:i,position:o}=ms[e],a=r.current,l=n.time;r.current=t["scroll"+o],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=xe(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:c(r.current-a,u)}const vs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ys={start:0,center:.5,end:1};function ws(t,e,n=0){let s=0;if(t in ys&&(t=ys[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const bs=[0,0];function xs(t,e,n,s){let r=Array.isArray(t)?t:bs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,ys[t]?t:"0"]),i=ws(r[0],n,s),o=ws(r[1],e),i-o}const Ss={x:0,y:0};function Ts(t,e,n){const{offset:s=vs.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Ss,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xs(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=We(e[i].offset,Le(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Vs(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){gs(t,"x",e,n),gs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Ts(t,n,s)},notify:()=>e(n)}}const As=new WeakMap,Ms=new WeakMap,Ps=new WeakMap,ks=t=>t===document.documentElement?window:t;function Cs(t,{container:e=document.documentElement,...n}={}){let s=Ps.get(e);s||(s=new Set,Ps.set(e,s));const a=Vs(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(a),!As.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};As.set(e,a);const c=ks(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ms.set(e,(u=a,"function"==typeof(l=e)?fs(l):hs(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=As.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=Ps.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=As.get(e);As.delete(e),s&&(ks(e).removeEventListener("scroll",s),null===(t=Ms.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Fs=new Map;function Es({source:t=document.documentElement,axis:e="y"}={}){Fs.has(t)||Fs.set(t,{});const n=Fs.get(t);return n[e]||(n[e]=S()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cs(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Os={some:0,all:1};const Rs=(t,e)=>Math.abs(t-e);const Bs=r,Is=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=f,t.animate=os,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=i,t.cancelSync=Is,t.circIn=ce,t.circInOut=de,t.circOut=he,t.clamp=H,t.createScopedAnimate=is,t.cubicBezier=se,t.delay=function(t,e){const n=p.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Rs,t.distance2D=function(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=re,t.easeInOut=oe,t.easeOut=ie,t.frame=r,t.frameData=o,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=y(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Os[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=We,t.invariant=v,t.mirrorEasing=le,t.mix=Ie,t.motionValue=m,t.pipe=be,t.progress=xe,t.reverseEasing=ue,t.scroll=function(t,e){const n=Es(e);return"function"==typeof t?b(t,n):t.attachTimeline(n)},t.scrollInfo=Cs,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ye(s)(l/e)*e}return e+l}},t.steps=a,t.sync=Bs,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=We(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=g,t.wrap=qn}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class u{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>l(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 c(t,e){return e?t*(1e3/e):0}let h;function d(){h=void 0}const p={now:()=>(void 0===h&&p.set(o.isProcessing||n?o.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(d)}};class f{constructor(t,e={}){this.version="11.3.28-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=p.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=p.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new u);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=p.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function m(t,e){return new f(t,e)}let g=e,v=e;function y(t,e,n){var s;if("string"==typeof t){let r=document;e&&(v(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const w=new WeakMap;function b(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function x(t){let e;return()=>(void 0===e&&(e=t()),e)}const T=x(()=>void 0!==window.ScrollTimeline);class S{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!T()||!e.attachTimeline)return e.pause(),b(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const V=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],A=new Set(V),M=t=>1e3*t,P=t=>t/1e3,k={type:"spring",stiffness:500,damping:25,restSpeed:10},C={type:"keyframes",duration:.8},F={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},E=(t,{keyframes:e})=>e.length>2?C:A.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:k:F;function O(t,e){return t[e]||t.default||t}const R=t=>null!==t;function B(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(R),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const I=t=>/^0[^.\s]+$/u.test(t);const W=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),D=t=>e=>"string"==typeof e&&e.startsWith(t),L=D("--"),N=D("var(--"),K=t=>!!N(t)&&z.test(t.split("/*")[0].trim()),z=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,j=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $(t,e,n=1){const[s,r]=function(t){const e=j.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return W(t)?parseFloat(t):t}return K(r)?$(r,e,n+1):r}const H=(t,e,n)=>n>e?e:n<t?t:n,U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Y={...U,transform:t=>H(0,1,t)},q={...U,default:1},X=t=>Math.round(1e5*t)/1e5,G=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Z=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function J(t){return"string"==typeof t}const Q=t=>({test:e=>J(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Q("deg"),et=Q("%"),nt=Q("px"),st=Q("vh"),rt=Q("vw"),it={...et,parse:t=>et.parse(t)/100,transform:t=>et.transform(100*t)},ot=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),at=t=>t===U||t===nt,lt=(t,e)=>parseFloat(t.split(", ")[e]),ut=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return lt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?lt(e[1],t):0}},ct=new Set(["x","y","z"]),ht=V.filter(t=>!ct.has(t));const dt={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:ut(4,13),y:ut(5,14)};dt.translateX=dt.x,dt.translateY=dt.y;const pt=t=>e=>e.test(t),ft=[U,nt,et,tt,rt,st,{test:t=>"auto"===t,parse:t=>t}],mt=t=>ft.find(pt(t)),gt=new Set;let vt=!1,yt=!1;function wt(){if(yt){const t=Array.from(gt).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return ht.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}yt=!1,vt=!1,gt.forEach(t=>t.complete()),gt.clear()}function bt(){gt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yt=!0)})}class xt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gt.add(this),vt||(vt=!0,r.read(bt),r.resolveKeyframes(wt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Tt=(t,e)=>n=>Boolean(J(n)&&_.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),St=(t,e,n)=>s=>{if(!J(s))return s;const[r,i,o,a]=s.match(G);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Vt={...U,transform:t=>Math.round((t=>H(0,255,t))(t))},At={test:Tt("rgb","red"),parse:St("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Vt.transform(t)+", "+Vt.transform(e)+", "+Vt.transform(n)+", "+X(Y.transform(s))+")"};const Mt={test:Tt("#"),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:At.transform},Pt={test:Tt("hsl","hue"),parse:St("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+et.transform(X(e))+", "+et.transform(X(n))+", "+X(Y.transform(s))+")"},kt={test:t=>At.test(t)||Mt.test(t)||Pt.test(t),parse:t=>At.test(t)?At.parse(t):Pt.test(t)?Pt.parse(t):Mt.parse(t),transform:t=>J(t)?t:t.hasOwnProperty("red")?At.transform(t):Pt.transform(t)};const Ct=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ct,t=>(kt.test(t)?(s.color.push(i),r.push("color"),n.push(kt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function Et(t){return Ft(t).values}function Ot(t){const{split:e,types:n}=Ft(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?X(t[i]):"color"===e?kt.transform(t[i]):t[i]}return r}}const Rt=t=>"number"==typeof t?0:t;const Bt={test:function(t){var e,n;return isNaN(t)&&J(t)&&((null===(e=t.match(G))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Z))||void 0===n?void 0:n.length)||0)>0},parse:Et,createTransformer:Ot,getAnimatableNone:function(t){const e=Et(t);return Ot(t)(e.map(Rt))}},It=new Set(["brightness","contrast","saturate","opacity"]);function Wt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(G)||[];if(!s)return t;const r=n.replace(s,"");let i=It.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Dt=/\b([a-z-]*)\(.*?\)/gu,Lt={...Bt,getAnimatableNone:t=>{const e=t.match(Dt);return e?e.map(Wt).join(" "):t}},Nt={...U,transform:Math.round},Kt={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:tt,skewX:tt,skewY:tt,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Y,originX:it,originY:it,originZ:nt,zIndex:Nt,backgroundPositionX:nt,backgroundPositionY:nt,fillOpacity:Y,strokeOpacity:Y,numOctaves:Nt},zt={...Kt,color:kt,backgroundColor:kt,outlineColor:kt,fill:kt,stroke:kt,borderColor:kt,borderTopColor:kt,borderRightColor:kt,borderBottomColor:kt,borderLeftColor:kt,filter:Lt,WebkitFilter:Lt},jt=t=>zt[t];function $t(t,e){let n=jt(t);return n!==Lt&&(n=Bt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ht=new Set(["auto","none","0"]);class Ut extends xt{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),K(s))){const r=$(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!ot.has(n)||2!==t.length)return;const[s,r]=t,i=mt(s),o=mt(r);if(i!==o)if(at(i)&&at(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||I(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ht.has(e)&&Ft(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=$t(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=dt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Yt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Bt.test(t)&&"0"!==t||t.startsWith("url(")));class qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=p.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(bt(),wt()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=p.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=Yt(r,e),a=Yt(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&s)}(t,n,s,r)){if(!i)return null==a||a(B(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Xt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}function Gt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=H(.05,1,o),t=H(.01,10,P(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Zt(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Zt(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=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=M(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Zt(t,e){return t*Math.sqrt(1-e*e)}const _t=["duration","bounce"],Jt=["stiffness","damping","mass"];function Qt(t,e){return e.some(e=>void 0!==t[e])}function te({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Qt(t,Jt)&&Qt(t,_t)){const n=Gt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-P(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=P(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=Zt(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=0;f<1&&(r=0===t?M(p):Xt(y,t,s));const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,x;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=te({keyframes:[d.value,p(d.value)],velocity:Xt(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),T(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ne=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function se(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ne(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:ne(i(t),n,r)}const re=se(.42,0,1,1),ie=se(0,0,.58,1),oe=se(.42,0,.58,1),ae=t=>Array.isArray(t)&&"number"!=typeof t[0],le=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ue=t=>e=>1-t(1-e),ce=t=>1-Math.sin(Math.acos(t)),he=ue(ce),de=le(ce),pe=se(.33,1.53,.69,.99),fe=ue(pe),me=le(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ve={linear:e,easeIn:re,easeInOut:oe,easeOut:ie,circIn:ce,circInOut:de,circOut:he,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ye=t=>{if(Array.isArray(t)){v(4===t.length);const[e,n,s,r]=t;return se(e,n,s,r)}return"string"==typeof t?ve[t]:t},we=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(we),xe=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Te=(t,e,n)=>t+(e-t)*n;function Se(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ve(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Me=[Mt,At,Pt];function Pe(t){const e=(n=t,Me.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Pt&&(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=Se(a,s,t+1/3),i=Se(a,s,t),o=Se(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 ke=(t,e)=>{const n=Pe(t),s=Pe(e);if(!n||!s)return Ve(t,e);const r={...n};return t=>(r.red=Ae(n.red,s.red,t),r.green=Ae(n.green,s.green,t),r.blue=Ae(n.blue,s.blue,t),r.alpha=Te(n.alpha,s.alpha,t),At.transform(r))},Ce=new Set(["none","hidden"]);function Fe(t,e){return n=>Te(t,e,n)}function Ee(t){return"number"==typeof t?Fe:"string"==typeof t?K(t)?Ve:kt.test(t)?ke:Be:Array.isArray(t)?Oe:"object"==typeof t?kt.test(t)?ke:Re:Ve}function Oe(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Ee(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Ee(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Be=(t,e)=>{const n=Bt.createTransformer(e),s=Ft(t),r=Ft(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Ce.has(t)&&!r.values.length||Ce.has(e)&&!s.values.length?function(t,e){return Ce.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):be(Oe(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):Ve(t,e)};function Ie(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Te(t,e,n);return Ee(t)(t,e)}function We(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(v(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Ie,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=be(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=xe(t[n],t[n+1],e);return a[n](s)};return s?e=>u(H(t[0],t[o-1],e)):u}function De(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=xe(0,e,s);t.push(Te(n,1,r))}}function Le(t){const e=[0];return De(e,t.length-1),e}function Ne({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=ae(s)?s.map(ye):ye(s),i={done:!1,value:e[0]},o=We(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Le(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||oe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function Ke(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const ze=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:p.now()}},je={decay:ee,inertia:ee,tween:Ne,keyframes:Ne,spring:te},$e=t=>t/100;class He extends qt{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||xt;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=je[e]||Ne;let a,l;o!==Ne&&"number"!=typeof t[0]&&(a=be($e,Ie(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=Ke(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=H(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return T&&void 0!==s&&(b.value=B(a,this.options,s)),m&&m(b.value),T&&this.finish(),b}get duration(){const{resolved:t}=this;return t?P(t.calculatedDuration):0}get time(){return P(this.currentTime)}set time(t){t=M(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=P(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ze,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ue=new Set(["opacity","clipPath","filter","transform"]),Ye=t=>Array.isArray(t)&&"number"==typeof t[0];function qe(t){return Boolean(!t||"string"==typeof t&&t in Ge||Ye(t)||Array.isArray(t)&&t.every(qe))}const Xe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xe([0,.65,.55,1]),circOut:Xe([.55,0,1,.45]),backIn:Xe([.31,.01,.66,-.59]),backOut:Xe([.33,1.53,.69,.99])};function Ze(t){return _e(t)||Ge.easeOut}function _e(t){return t?Ye(t)?Xe(t):Array.isArray(t)?t.map(Ze):Ge[t]:void 0}const Je=x(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Qe extends qt{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new Ut(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!qe(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new He({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,r=c.times,i=c.ease,o="keyframes"}var c;const h=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=_e(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(h.timeline=this.pendingTimeline,this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(B(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return P(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return P(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=M(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new He({...u,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),h=M(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Je()&&n&&Ue.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const tn=(t,e,n,s={},i,o,a)=>l=>{const u=O(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=M(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete(),a&&a()},onStop:a,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(u)||(d={...d,...E(t,d)}),d.duration&&(d.duration=M(d.duration)),d.repeatDelay&&(d.repeatDelay=M(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(p=!0)),p&&!o&&void 0!==e.get()){const t=B(d.keyframes,u);if(void 0!==t)return r.update(()=>{d.onUpdate(t),d.onComplete()}),new S([])}return!o&&Qe.supports(d)?new Qe(d):new He(d)},en=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function nn(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function sn(t,e,n,s){if("function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function rn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,m(n))}function on(t,e){const n=function(t,e,n){const s=t.getProps();return sn(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){rn(t,e,en(i[e]))}}const an=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ln="data-"+an("framerAppearId");function un(t){return t.getProps()[ln]}class cn extends f{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=function(t){return A.has(t)?"transform":Ue.has(t)?an(t):void 0}(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let s=!1;return()=>{if(s)return;s=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(l(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const hn=t=>Boolean(t&&t.getVelocity);function dn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new cn("auto"),t.addValue("willChange",s)),r=s,Boolean(hn(r)&&r.add)?s.add(e):void 0;var r}function pn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&pn(h,e))continue;const l={delay:n,...O(a||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=un(t);if(n){const t=window.MotionHandoffAnimation(n,e,r);null!==t&&(l.startTime=t,d=!0)}}s.start(tn(e,s,i,t.shouldReduceMotion&&A.has(e)?{type:!1}:l,t,d,dn(t,e)));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&on(t,l)})}),c}const mn={};function gn(t,{layout:e,layoutId:n}){return A.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!mn[t]||"opacity"===t)}function vn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(hn(r[o])||e.style&&hn(e.style[o])||gn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const yn="undefined"!=typeof window,wn={current:null},bn={current:!1};function xn(t){return"string"==typeof t||Array.isArray(t)}const Tn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Sn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Tn.some(e=>xn(t[e]));var e}const Vn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},An={};for(const t in Vn)An[t]={isEnabled:e=>Vn[t].some(t=>!!e[t])};const Mn=[...ft,kt,Bt],Pn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),kn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Cn=Tn.length;class Fn extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Sn(e),this.isVariantNode=function(t){return Boolean(Sn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&hn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,w.set(t,this),this.projection&&!this.projection.instance&&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)),bn.current||function(){if(bn.current=!0,yn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wn.current=t.matches;t.addListener(e),e()}else wn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){w.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(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){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){const n=A.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in An){const e=An[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,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}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<kn.length;e++){const n=kn[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){for(const s in e){const r=e[s],i=n[s];if(hn(r))t.addValue(s,r);else if(hn(i))t.addValue(s,m(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,m(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),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<Cn;t++){const n=Tn[t],s=this.props[n];(xn(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){const n=this.values.get(t);e!==n&&(n&&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=m(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=s&&("string"==typeof s&&(W(s)||I(s))?s=parseFloat(s):(r=s,!Mn.find(pt(r))&&Bt.test(e)&&(s=$t(t,e))),this.setBaseTarget(t,hn(s)?s.get():s)),hn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=sn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||hn(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 u),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Ut}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]}}const En=(t,e)=>e&&"number"==typeof t?e.transform(t):t,On={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rn=V.length;function Bn(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(A.has(t))o=!0;else if(L(t))r[t]=n;else{const e=En(n,Kt[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<Rn;i++){const o=V[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=En(a,Kt[o]);if(!l){r=!1;s+=`${On[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}function In(t,e,n){return"string"==typeof t?t:nt.transform(e+n*t)}const Wn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dn={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Bn(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${In(e,t.x,t.width)} ${In(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Wn:Dn;t[i.offset]=nt.transform(-s);const o=nt.transform(e),a=nt.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Nn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Kn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class zn extends Fn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}return e=Nn.has(e)?e:an(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=vn(t,e,n);for(const n in t)if(hn(t[n])||hn(e[n])){s[-1!==V.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Ln(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Kn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Nn.has(n)?n:an(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class jn extends Fn{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Kn}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(L(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){Bn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return vn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function $n(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new zn(e):new jn(e);n.mount(t),w.set(t,n)}function Hn(t,e,n){const s=hn(t)?t:m(t);return s.start(tn("",s,e,n)),s.animation}function Un(t,e=100){const n=te({keyframes:[0,e],...t}),s=Math.min(Ke(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:P(s)}}function Yn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const qn=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Xn(t,e){return ae(t)?t[qn(0,t.length,e)]:t}function Gn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(l(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Te(r,i,s[o]),easing:Xn(n,o)})}function Zn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function _n(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Jn(t,e){return e[t]||(e[t]=[]),e[t]}function Qn(t){return Array.isArray(t)?t:[t]}function ts(t,e){return t[e]?{...t,...t[e]}:{...t}}const es=t=>"number"==typeof t,ns=t=>t.every(es);function ss(t,e,n,s){const r=y(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];w.has(s)||$n(s);const a=w.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...fn(a,{...e,transition:l},{}))}return new S(o)}function rs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,Yn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Yn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=Qn(t),{delay:l=0,times:u=Le(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&ns(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=M(g));const n=Un(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&De(u,x),1===a.length&&a.unshift(null),Gn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(hn(d)){g(p,f,Jn("default",_n(d,o)))}else{const t=y(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=_n(t[n],o);for(const t in p)g(p[t],ts(f,t),Jn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Zn);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(xe(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=hn(n)?Hn(n,t.default,e.default):ss(n,t,e),s.push(r)}),new S(s)}const is=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?rs(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?ss(e,n,s,t):Hn(e,n,s),t&&t.animations.push(r),r},os=is(),as=new WeakMap;let ls;function us({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=as.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function cs(t){t.forEach(us)}function hs(t,e){ls||"undefined"!=typeof ResizeObserver&&(ls=new ResizeObserver(cs));const n=y(t);return n.forEach(t=>{let n=as.get(t);n||(n=new Set,as.set(t,n)),n.add(e),null==ls||ls.observe(t)}),()=>{n.forEach(t=>{const n=as.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ls||ls.unobserve(t)})}}const ds=new Set;let ps;function fs(t){return ds.add(t),ps||(ps=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ds.forEach(t=>t(e))},window.addEventListener("resize",ps)),()=>{ds.delete(t),!ds.size&&ps&&(ps=void 0)}}const ms={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function gs(t,e,n,s){const r=n[e],{length:i,position:o}=ms[e],a=r.current,l=n.time;r.current=t["scroll"+o],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=xe(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:c(r.current-a,u)}const vs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ys={start:0,center:.5,end:1};function ws(t,e,n=0){let s=0;if(t in ys&&(t=ys[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const bs=[0,0];function xs(t,e,n,s){let r=Array.isArray(t)?t:bs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,ys[t]?t:"0"]),i=ws(r[0],n,s),o=ws(r[1],e),i-o}const Ts={x:0,y:0};function Ss(t,e,n){const{offset:s=vs.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Ts,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xs(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=We(e[i].offset,Le(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Vs(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){gs(t,"x",e,n),gs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Ss(t,n,s)},notify:()=>e(n)}}const As=new WeakMap,Ms=new WeakMap,Ps=new WeakMap,ks=t=>t===document.documentElement?window:t;function Cs(t,{container:e=document.documentElement,...n}={}){let s=Ps.get(e);s||(s=new Set,Ps.set(e,s));const a=Vs(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(a),!As.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};As.set(e,a);const c=ks(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ms.set(e,(u=a,"function"==typeof(l=e)?fs(l):hs(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=As.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=Ps.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=As.get(e);As.delete(e),s&&(ks(e).removeEventListener("scroll",s),null===(t=Ms.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Fs=new Map;function Es({source:t=document.documentElement,axis:e="y"}={}){Fs.has(t)||Fs.set(t,{});const n=Fs.get(t);return n[e]||(n[e]=T()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cs(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Os={some:0,all:1};const Rs=(t,e)=>Math.abs(t-e);const Bs=r,Is=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=f,t.animate=os,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=i,t.cancelSync=Is,t.circIn=ce,t.circInOut=de,t.circOut=he,t.clamp=H,t.createScopedAnimate=is,t.cubicBezier=se,t.delay=function(t,e){const n=p.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Rs,t.distance2D=function(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=re,t.easeInOut=oe,t.easeOut=ie,t.frame=r,t.frameData=o,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=y(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Os[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=We,t.invariant=v,t.mirrorEasing=le,t.mix=Ie,t.motionValue=m,t.pipe=be,t.progress=xe,t.reverseEasing=ue,t.scroll=function(t,e){const n=Es(e);return"function"==typeof t?b(t,n):t.attachTimeline(n)},t.scrollInfo=Cs,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ye(s)(l/e)*e}return e+l}},t.steps=a,t.sync=Bs,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=We(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=g,t.wrap=qn}));