motion 12.34.0-alpha.0 → 12.34.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.
- package/dist/motion.dev.js +76 -118
- package/dist/motion.js +1 -1
- package/package.json +3 -3
package/dist/motion.dev.js
CHANGED
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
render.process(state);
|
|
451
451
|
postRender.process(state);
|
|
452
452
|
state.isProcessing = false;
|
|
453
|
-
if (runNextFrame && allowKeepAlive
|
|
453
|
+
if (runNextFrame && allowKeepAlive) {
|
|
454
454
|
useDefaultElapsed = false;
|
|
455
455
|
scheduleNextBatch(processBatch);
|
|
456
456
|
}
|
|
@@ -458,32 +458,10 @@
|
|
|
458
458
|
const wake = () => {
|
|
459
459
|
runNextFrame = true;
|
|
460
460
|
useDefaultElapsed = true;
|
|
461
|
-
if (!state.isProcessing
|
|
462
|
-
(!MotionGlobalConfig.useManualTiming || !allowKeepAlive)) {
|
|
461
|
+
if (!state.isProcessing) {
|
|
463
462
|
scheduleNextBatch(processBatch);
|
|
464
463
|
}
|
|
465
464
|
};
|
|
466
|
-
/**
|
|
467
|
-
* Manually process all scheduled frame callbacks.
|
|
468
|
-
* Used for manual frame rendering in environments without requestAnimationFrame
|
|
469
|
-
* (e.g., WebXR, Remotion, server-side rendering of videos).
|
|
470
|
-
*/
|
|
471
|
-
const processFrame = (timestamp, delta) => {
|
|
472
|
-
runNextFrame = false;
|
|
473
|
-
state.delta = delta !== undefined ? delta : 1000 / 60;
|
|
474
|
-
state.timestamp = timestamp;
|
|
475
|
-
state.isProcessing = true;
|
|
476
|
-
// Unrolled render loop for better per-frame performance
|
|
477
|
-
setup.process(state);
|
|
478
|
-
read.process(state);
|
|
479
|
-
resolveKeyframes.process(state);
|
|
480
|
-
preUpdate.process(state);
|
|
481
|
-
update.process(state);
|
|
482
|
-
preRender.process(state);
|
|
483
|
-
render.process(state);
|
|
484
|
-
postRender.process(state);
|
|
485
|
-
state.isProcessing = false;
|
|
486
|
-
};
|
|
487
465
|
const schedule = stepsOrder.reduce((acc, key) => {
|
|
488
466
|
const step = steps[key];
|
|
489
467
|
acc[key] = (process, keepAlive = false, immediate = false) => {
|
|
@@ -498,10 +476,10 @@
|
|
|
498
476
|
steps[stepsOrder[i]].cancel(process);
|
|
499
477
|
}
|
|
500
478
|
};
|
|
501
|
-
return { schedule, cancel, state, steps
|
|
479
|
+
return { schedule, cancel, state, steps };
|
|
502
480
|
}
|
|
503
481
|
|
|
504
|
-
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps,
|
|
482
|
+
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$1, true);
|
|
505
483
|
|
|
506
484
|
let now;
|
|
507
485
|
function clearTime() {
|
|
@@ -518,8 +496,7 @@
|
|
|
518
496
|
const time = {
|
|
519
497
|
now: () => {
|
|
520
498
|
if (now === undefined) {
|
|
521
|
-
time.set(frameData.isProcessing ||
|
|
522
|
-
MotionGlobalConfig.useManualTiming
|
|
499
|
+
time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming
|
|
523
500
|
? frameData.timestamp
|
|
524
501
|
: performance.now());
|
|
525
502
|
}
|
|
@@ -1752,12 +1729,7 @@
|
|
|
1752
1729
|
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
1753
1730
|
// If this animation has finished, set the current time to the total duration.
|
|
1754
1731
|
if (this.state === "finished" && this.holdTime === null) {
|
|
1755
|
-
|
|
1756
|
-
this.state = "running";
|
|
1757
|
-
}
|
|
1758
|
-
else {
|
|
1759
|
-
this.currentTime = totalDuration;
|
|
1760
|
-
}
|
|
1732
|
+
this.currentTime = totalDuration;
|
|
1761
1733
|
}
|
|
1762
1734
|
let elapsed = this.currentTime;
|
|
1763
1735
|
let frameGenerator = generator;
|
|
@@ -1881,8 +1853,7 @@
|
|
|
1881
1853
|
play() {
|
|
1882
1854
|
if (this.isStopped)
|
|
1883
1855
|
return;
|
|
1884
|
-
const { startTime } = this.options;
|
|
1885
|
-
const driver = this.options.driver ?? frameloopDriver;
|
|
1856
|
+
const { driver = frameloopDriver, startTime } = this.options;
|
|
1886
1857
|
if (!this.driver) {
|
|
1887
1858
|
this.driver = driver((timestamp) => this.tick(timestamp));
|
|
1888
1859
|
}
|
|
@@ -1923,9 +1894,7 @@
|
|
|
1923
1894
|
}
|
|
1924
1895
|
finish() {
|
|
1925
1896
|
this.notifyFinished();
|
|
1926
|
-
|
|
1927
|
-
this.teardown();
|
|
1928
|
-
}
|
|
1897
|
+
this.teardown();
|
|
1929
1898
|
this.state = "finished";
|
|
1930
1899
|
this.options.onComplete?.();
|
|
1931
1900
|
}
|
|
@@ -2705,8 +2674,7 @@
|
|
|
2705
2674
|
return false;
|
|
2706
2675
|
}
|
|
2707
2676
|
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
|
2708
|
-
return (
|
|
2709
|
-
supportsWaapi() &&
|
|
2677
|
+
return (supportsWaapi() &&
|
|
2710
2678
|
name &&
|
|
2711
2679
|
acceleratedValues$1.has(name) &&
|
|
2712
2680
|
(name !== "transform" || !transformTemplate) &&
|
|
@@ -5645,26 +5613,6 @@
|
|
|
5645
5613
|
y: createAxis(),
|
|
5646
5614
|
});
|
|
5647
5615
|
|
|
5648
|
-
// Does this device prefer reduced motion? Returns `null` server-side.
|
|
5649
|
-
const prefersReducedMotion = { current: null };
|
|
5650
|
-
const hasReducedMotionListener = { current: false };
|
|
5651
|
-
|
|
5652
|
-
const isBrowser = typeof window !== "undefined";
|
|
5653
|
-
function initPrefersReducedMotion() {
|
|
5654
|
-
hasReducedMotionListener.current = true;
|
|
5655
|
-
if (!isBrowser)
|
|
5656
|
-
return;
|
|
5657
|
-
if (window.matchMedia) {
|
|
5658
|
-
const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
|
|
5659
|
-
const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);
|
|
5660
|
-
motionMediaQuery.addEventListener("change", setReducedMotionPreferences);
|
|
5661
|
-
setReducedMotionPreferences();
|
|
5662
|
-
}
|
|
5663
|
-
else {
|
|
5664
|
-
prefersReducedMotion.current = false;
|
|
5665
|
-
}
|
|
5666
|
-
}
|
|
5667
|
-
|
|
5668
5616
|
const visualElementStore = new WeakMap();
|
|
5669
5617
|
|
|
5670
5618
|
function isAnimationControls(v) {
|
|
@@ -5750,6 +5698,26 @@
|
|
|
5750
5698
|
return next;
|
|
5751
5699
|
}
|
|
5752
5700
|
|
|
5701
|
+
// Does this device prefer reduced motion? Returns `null` server-side.
|
|
5702
|
+
const prefersReducedMotion = { current: null };
|
|
5703
|
+
const hasReducedMotionListener = { current: false };
|
|
5704
|
+
|
|
5705
|
+
const isBrowser = typeof window !== "undefined";
|
|
5706
|
+
function initPrefersReducedMotion() {
|
|
5707
|
+
hasReducedMotionListener.current = true;
|
|
5708
|
+
if (!isBrowser)
|
|
5709
|
+
return;
|
|
5710
|
+
if (window.matchMedia) {
|
|
5711
|
+
const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
|
|
5712
|
+
const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);
|
|
5713
|
+
motionMediaQuery.addEventListener("change", setReducedMotionPreferences);
|
|
5714
|
+
setReducedMotionPreferences();
|
|
5715
|
+
}
|
|
5716
|
+
else {
|
|
5717
|
+
prefersReducedMotion.current = false;
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
|
|
5753
5721
|
const propEventHandlers = [
|
|
5754
5722
|
"AnimationStart",
|
|
5755
5723
|
"AnimationComplete",
|
|
@@ -5990,6 +5958,25 @@
|
|
|
5990
5958
|
if (this.valueSubscriptions.has(key)) {
|
|
5991
5959
|
this.valueSubscriptions.get(key)();
|
|
5992
5960
|
}
|
|
5961
|
+
if (value.accelerate &&
|
|
5962
|
+
acceleratedValues.has(key) &&
|
|
5963
|
+
this.current instanceof HTMLElement) {
|
|
5964
|
+
const { factory, keyframes, times, ease, duration } = value.accelerate;
|
|
5965
|
+
const animation = new NativeAnimation({
|
|
5966
|
+
element: this.current,
|
|
5967
|
+
name: key,
|
|
5968
|
+
keyframes,
|
|
5969
|
+
times,
|
|
5970
|
+
ease,
|
|
5971
|
+
duration: secondsToMilliseconds(duration),
|
|
5972
|
+
});
|
|
5973
|
+
const cleanup = factory(animation);
|
|
5974
|
+
this.valueSubscriptions.set(key, () => {
|
|
5975
|
+
cleanup();
|
|
5976
|
+
animation.cancel();
|
|
5977
|
+
});
|
|
5978
|
+
return;
|
|
5979
|
+
}
|
|
5993
5980
|
const valueIsTransform = transformProps.has(key);
|
|
5994
5981
|
if (valueIsTransform && this.onBindTransform) {
|
|
5995
5982
|
this.onBindTransform();
|
|
@@ -6003,7 +5990,8 @@
|
|
|
6003
5990
|
this.scheduleRender();
|
|
6004
5991
|
});
|
|
6005
5992
|
let removeSyncCheck;
|
|
6006
|
-
if (typeof window !== "undefined" &&
|
|
5993
|
+
if (typeof window !== "undefined" &&
|
|
5994
|
+
window.MotionCheckAppearSync) {
|
|
6007
5995
|
removeSyncCheck = window.MotionCheckAppearSync(this, key, value);
|
|
6008
5996
|
}
|
|
6009
5997
|
this.valueSubscriptions.set(key, () => {
|
|
@@ -7750,6 +7738,15 @@
|
|
|
7750
7738
|
}
|
|
7751
7739
|
add(node) {
|
|
7752
7740
|
addUniqueItem(this.members, node);
|
|
7741
|
+
for (let i = this.members.length - 1; i >= 0; i--) {
|
|
7742
|
+
const m = this.members[i];
|
|
7743
|
+
if (m === node || m === this.lead || m === this.prevLead)
|
|
7744
|
+
continue;
|
|
7745
|
+
const inst = m.instance;
|
|
7746
|
+
if (inst && inst.isConnected === false && m.isPresent !== false && !m.snapshot) {
|
|
7747
|
+
removeItem(this.members, m);
|
|
7748
|
+
}
|
|
7749
|
+
}
|
|
7753
7750
|
node.scheduleRender();
|
|
7754
7751
|
}
|
|
7755
7752
|
remove(node) {
|
|
@@ -7774,7 +7771,8 @@
|
|
|
7774
7771
|
let prevLead;
|
|
7775
7772
|
for (let i = indexOfNode; i >= 0; i--) {
|
|
7776
7773
|
const member = this.members[i];
|
|
7777
|
-
|
|
7774
|
+
const inst = member.instance;
|
|
7775
|
+
if (member.isPresent !== false && (!inst || inst.isConnected !== false)) {
|
|
7778
7776
|
prevLead = member;
|
|
7779
7777
|
break;
|
|
7780
7778
|
}
|
|
@@ -7809,17 +7807,21 @@
|
|
|
7809
7807
|
nextDep !== undefined &&
|
|
7810
7808
|
prevDep === nextDep;
|
|
7811
7809
|
if (!dependencyMatches) {
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7810
|
+
const prevInstance = prevLead.instance;
|
|
7811
|
+
const isStale = prevInstance && prevInstance.isConnected === false && !prevLead.snapshot;
|
|
7812
|
+
if (!isStale) {
|
|
7813
|
+
node.resumeFrom = prevLead;
|
|
7814
|
+
if (preserveFollowOpacity) {
|
|
7815
|
+
node.resumeFrom.preserveOpacity = true;
|
|
7816
|
+
}
|
|
7817
|
+
if (prevLead.snapshot) {
|
|
7818
|
+
node.snapshot = prevLead.snapshot;
|
|
7819
|
+
node.snapshot.latestValues =
|
|
7820
|
+
prevLead.animationValues || prevLead.latestValues;
|
|
7821
|
+
}
|
|
7822
|
+
if (node.root && node.root.isUpdating) {
|
|
7823
|
+
node.isLayoutDirty = true;
|
|
7824
|
+
}
|
|
7823
7825
|
}
|
|
7824
7826
|
}
|
|
7825
7827
|
const { crossfade } = node.options;
|
|
@@ -9798,48 +9800,6 @@
|
|
|
9798
9800
|
return acc;
|
|
9799
9801
|
}, {});
|
|
9800
9802
|
|
|
9801
|
-
/**
|
|
9802
|
-
* Manually render a single animation frame.
|
|
9803
|
-
*
|
|
9804
|
-
* Temporarily enables `useManualTiming` mode during frame processing
|
|
9805
|
-
* to prevent requestAnimationFrame from auto-advancing animations.
|
|
9806
|
-
*
|
|
9807
|
-
* @example
|
|
9808
|
-
* renderFrame({ timestamp: 1000 }) // Render at 1 second
|
|
9809
|
-
*
|
|
9810
|
-
* @example
|
|
9811
|
-
* // Using frame number
|
|
9812
|
-
* renderFrame({ frame: 30, fps: 30 }) // Render at frame 30 (1 second at 30fps)
|
|
9813
|
-
*/
|
|
9814
|
-
function renderFrame(options = {}) {
|
|
9815
|
-
const { timestamp, frame, fps = 30, delta } = options;
|
|
9816
|
-
let frameTimestamp;
|
|
9817
|
-
let frameDelta;
|
|
9818
|
-
if (timestamp !== undefined) {
|
|
9819
|
-
frameTimestamp = timestamp;
|
|
9820
|
-
frameDelta = delta !== undefined ? delta : 1000 / 60;
|
|
9821
|
-
}
|
|
9822
|
-
else if (frame !== undefined) {
|
|
9823
|
-
// Convert frame number to milliseconds
|
|
9824
|
-
frameTimestamp = (frame / fps) * 1000;
|
|
9825
|
-
frameDelta = delta !== undefined ? delta : 1000 / fps;
|
|
9826
|
-
}
|
|
9827
|
-
else {
|
|
9828
|
-
// Use current frameData timestamp + default delta if no timing info provided
|
|
9829
|
-
frameDelta = delta !== undefined ? delta : 1000 / 60;
|
|
9830
|
-
frameTimestamp = frameData.timestamp + frameDelta;
|
|
9831
|
-
}
|
|
9832
|
-
// Temporarily enable manual timing mode during frame processing
|
|
9833
|
-
const previousManualTiming = MotionGlobalConfig.useManualTiming;
|
|
9834
|
-
MotionGlobalConfig.useManualTiming = true;
|
|
9835
|
-
// Set the synchronized time
|
|
9836
|
-
time.set(frameTimestamp);
|
|
9837
|
-
// Process the frame - this runs all registered callbacks
|
|
9838
|
-
processFrame(frameTimestamp, frameDelta);
|
|
9839
|
-
// Restore previous manual timing setting
|
|
9840
|
-
MotionGlobalConfig.useManualTiming = previousManualTiming;
|
|
9841
|
-
}
|
|
9842
|
-
|
|
9843
9803
|
function isDOMKeyframes(keyframes) {
|
|
9844
9804
|
return typeof keyframes === "object" && !Array.isArray(keyframes);
|
|
9845
9805
|
}
|
|
@@ -11207,7 +11167,6 @@
|
|
|
11207
11167
|
exports.positionalKeys = positionalKeys;
|
|
11208
11168
|
exports.prefersReducedMotion = prefersReducedMotion;
|
|
11209
11169
|
exports.press = press;
|
|
11210
|
-
exports.processFrame = processFrame;
|
|
11211
11170
|
exports.progress = progress;
|
|
11212
11171
|
exports.progressPercentage = progressPercentage;
|
|
11213
11172
|
exports.propEffect = propEffect;
|
|
@@ -11220,7 +11179,6 @@
|
|
|
11220
11179
|
exports.removeBoxTransforms = removeBoxTransforms;
|
|
11221
11180
|
exports.removeItem = removeItem;
|
|
11222
11181
|
exports.removePointDelta = removePointDelta;
|
|
11223
|
-
exports.renderFrame = renderFrame;
|
|
11224
11182
|
exports.renderHTML = renderHTML;
|
|
11225
11183
|
exports.renderSVG = renderSVG;
|
|
11226
11184
|
exports.resize = resize;
|
package/dist/motion.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";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;function s(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class m{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,g=t=>t/1e3;function y(t,e){return e?t*(1e3/e):0}const v=new Set;const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},T=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function w(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=T(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:T(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=w(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),R=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const j=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return j(t)?t[x(0,t.length,e)]:t}const F=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:u,easeIn:R,easeInOut:C,easeOut:B,circIn:M,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(F(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return w(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==O[e],`Invalid easing type '${e}'`,"invalid-easing-type"),O[e]):e},W=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function U(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=W.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&N.value&&N.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(r,e?n:void 0),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=o.useManualTiming?s.timestamp:performance.now();n=!1,o.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&!o.useManualTiming&&(i=!1,t(g))};return{schedule:W.reduce((r,l)=>{const c=a[l];return r[l]=(r,a=!1,l=!1)=>(n||(n=!0,i=!0,s.isProcessing||o.useManualTiming&&e||t(g)),c.schedule(r,a,l)),r},{}),cancel:t=>{for(let e=0;e<W.length;e++)a[W[e]].cancel(t)},state:s,steps:a,processFrame:(t,e)=>{n=!1,s.delta=void 0!==e?e:1e3/60,s.timestamp=t,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1}}}const{schedule:$,cancel:z,state:K,steps:Y,processFrame:X}=U("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let H;function G(){H=void 0}const q={now:()=>(void 0===H&&q.set(K.isProcessing||o.useManualTiming?K.timestamp:performance.now()),H),set:t=>{H=t,queueMicrotask(G)}},Z={layout:0,mainThread:0,waapi:0},_=t=>e=>"string"==typeof e&&e.startsWith(t),J=_("--"),Q=_("var(--"),tt=t=>!!Q(t)&&et.test(t.split("/*")[0].trim()),et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const it={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},st={...it,transform:t=>i(0,1,t)},ot={...it,default:1},rt=t=>Math.round(1e5*t)/1e5,at=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const lt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ct=(t,e)=>n=>Boolean("string"==typeof n&<.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ut=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(at);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},ht={...it,transform:t=>Math.round((t=>i(0,255,t))(t))},dt={test:ct("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ht.transform(t)+", "+ht.transform(e)+", "+ht.transform(n)+", "+rt(st.transform(i))+")"};const pt={test:ct("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:dt.transform},mt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ft=mt("deg"),gt=mt("%"),yt=mt("px"),vt=mt("vh"),xt=mt("vw"),Tt=(()=>({...gt,parse:t=>gt.parse(t)/100,transform:t=>gt.transform(100*t)}))(),wt={test:ct("hsl","hue"),parse:ut("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+gt.transform(rt(e))+", "+gt.transform(rt(n))+", "+rt(st.transform(i))+")"},bt={test:t=>dt.test(t)||pt.test(t)||wt.test(t),parse:t=>dt.test(t)?dt.parse(t):wt.test(t)?wt.parse(t):pt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?dt.transform(t):wt.transform(t),getAnimatableNone:t=>{const e=bt.parse(t);return e.alpha=0,bt.transform(e)}},St=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const At="number",Vt="color",Pt=/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 Et(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Pt,t=>(bt.test(t)?(i.color.push(o),s.push(Vt),n.push(bt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(At),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Mt(t){return Et(t).values}function kt(t){const{split:e,types:n}=Et(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===At?rt(t[o]):e===Vt?bt.transform(t[o]):t[o]}return s}}const Dt=t=>"number"==typeof t?0:bt.test(t)?bt.getAnimatableNone(t):t;const Rt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(at)?.length||0)+(t.match(St)?.length||0)>0},parse:Mt,createTransformer:kt,getAnimatableNone:function(t){const e=Mt(t);return kt(t)(e.map(Dt))}};function Bt(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 Ct({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Bt(a,i,t+1/3),o=Bt(a,i,t),r=Bt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function jt(t,e){return n=>n>0?e:t}const Lt=(t,e,n)=>t+(e-t)*n,Ft=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ot=[pt,dt,wt];function It(e){const n=(i=e,Ot.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===wt&&(s=Ct(s)),s}const Wt=(t,e)=>{const n=It(t),i=It(e);if(!n||!i)return jt(t,e);const s={...n};return t=>(s.red=Ft(n.red,i.red,t),s.green=Ft(n.green,i.green,t),s.blue=Ft(n.blue,i.blue,t),s.alpha=Lt(n.alpha,i.alpha,t),dt.transform(s))},Nt=new Set(["none","hidden"]);function Ut(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function $t(t,e){return n=>Lt(t,e,n)}function zt(t){return"number"==typeof t?$t:"string"==typeof t?tt(t)?jt:bt.test(t)?Wt:Xt:Array.isArray(t)?Kt:"object"==typeof t?bt.test(t)?Wt:Yt:jt}function Kt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>zt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Yt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=zt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Xt=(e,n)=>{const i=Rt.createTransformer(n),s=Et(e),o=Et(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Nt.has(e)&&!o.values.length||Nt.has(n)&&!s.values.length?Ut(e,n):d(Kt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),jt(e,n))};function Ht(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Lt(t,e,n);return zt(t)(t,e)}const Gt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>z(e),now:()=>K.isProcessing?K.timestamp:q.now()}},qt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Zt=2e4;function _t(t){let e=0;let n=t.next(e);for(;!n.done&&e<Zt;)e+=50,n=t.next(e);return e>=Zt?1/0:e}function Jt(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(_t(i),Zt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:g(s)}}function Qt(t,e,n){const i=Math.max(e-5,0);return y(n-t(i),e-i)}const te=100,ee=10,ne=1,ie=0,se=800,oe=.3,re=.3,ae={granular:.01,default:2},le={granular:.005,default:.5},ce=.01,ue=10,he=.05,de=1,pe=.001;function me({duration:e=se,bounce:n=oe,velocity:s=ie,mass:o=ne}){let r,a;t.warning(e<=f(ue),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(he,de,l),e=i(ce,ue,g(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=ge(t,l),a=Math.exp(-i);return pe-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=ge(Math.pow(t,2),l);return(-r(t)+pe>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<fe;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=f(e),isNaN(c))return{stiffness:te,damping:ee,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}const fe=12;function ge(t,e){return t*Math.sqrt(1-e*e)}const ye=["duration","bounce"],ve=["stiffness","damping","mass"];function xe(t,e){return e.some(e=>void 0!==t[e])}function Te(t=re,e=oe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ie,stiffness:te,damping:ee,mass:ne,isResolvedFromDuration:!1,...t};if(!xe(t,ve)&&xe(t,ye))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),o=s*s,r=2*i(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:ne,stiffness:o,damping:r}}else{const n=me(t);e={...e,...n,mass:ne},e.isResolvedFromDuration=!0}return e}({...n,velocity:-g(n.velocity||0)}),y=p||0,v=u/(2*Math.sqrt(c*h)),x=a-r,T=g(Math.sqrt(c/h)),w=Math.abs(x)<5;let b;if(s||(s=w?ae.granular:ae.default),o||(o=w?le.granular:le.default),v<1){const t=ge(T,v);b=e=>{const n=Math.exp(-v*T*e);return a-n*((y+v*T*x)/t*Math.sin(t*e)+x*Math.cos(t*e))}}else if(1===v)b=t=>a-Math.exp(-T*t)*(x+(y+T*x)*t);else{const t=T*Math.sqrt(v*v-1);b=e=>{const n=Math.exp(-v*T*e),i=Math.min(t*e,300);return a-n*((y+v*T*x)*Math.sinh(i)+t*x*Math.cosh(i))/t}}const S={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)l.done=t>=d;else{let n=0===t?y:0;v<1&&(n=0===t?f(y):Qt(b,t,e));const i=Math.abs(n)<=s,r=Math.abs(a-e)<=o;l.done=i&&r}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(_t(S),Zt),e=qt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function we({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=Te({keyframes:[d.value,p(d.value)],velocity:Qt(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function be(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const i=[],s=n||o.mix||Ht,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=d(t,o)}i.push(o)}return i}(n,r,a),m=h.length,f=t=>{if(c&&t<e[0])return n[0];let i=0;if(m>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=p(e[i],e[i+1],t);return h[i](s)};return s?t=>f(i(e[0],e[l-1],t)):f}function Se(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=p(0,e,i);t.push(Lt(n,1,s))}}function Ae(t){const e=[0];return Se(e,t.length-1),e}function Ve(t,e){return t.map(t=>t*e)}function Pe(t,e){return t.map(()=>e||C).splice(0,t.length-1)}function Ee({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=j(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=be(Ve(n&&n.length===e.length?n:Ae(e),t),e,{ease:Array.isArray(s)?s:Pe(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}Te.applyToOptions=t=>{const e=Jt(t,100,Te);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};const Me=t=>null!==t;function ke(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Me),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const De={decay:we,inertia:we,tween:Ee,keyframes:Ee,spring:Te};function Re(t){"string"==typeof t.type&&(t.type=De[t.type])}class Be{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ce=t=>t/100;class je extends Be{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==q.now()&&this.tick(q.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Z.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Re(t);const{type:e=Ee,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ee;a!==Ee&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Ce,Ht(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:h,repeat:d,repeatType:p,repeatDelay:m,type:f,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(o.useManualTiming&&this.currentTime<s?this.state="running":this.currentTime=s);let T=this.currentTime,w=n;if(d){const t=Math.min(this.currentTime,s)/l;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,m&&(n-=m/l)):"mirror"===p&&(w=a)),T=i(0,1,n)*l}const b=x?{done:!1,value:h[0]}:w.next(T);r&&(b.value=r(b.value));let{done:S}=b;x||null===c||(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return A&&f!==we&&(b.value=ke(h,this.options,y,this.speed)),g&&g(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return g(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(q.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;const{startTime:t}=this.options,e=this.options.driver??Gt;this.driver||(this.driver=e(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(q.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),o.useManualTiming||this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Z.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Le(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Fe=t=>180*t/Math.PI,Oe=t=>{const e=Fe(Math.atan2(t[1],t[0]));return We(e)},Ie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Fe(Math.atan(t[1])),skewY:t=>Fe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},We=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ue=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),$e={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ne,scaleY:Ue,scale:t=>(Ne(t)+Ue(t))/2,rotateX:t=>We(Fe(Math.atan2(t[6],t[5]))),rotateY:t=>We(Fe(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Fe(Math.atan(t[4])),skewY:t=>Fe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ze(t){return t.includes("scale")?1:0}function Ke(t,e){if(!t||"none"===t)return ze(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=$e,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Ie,s=e}if(!s)return ze(e);const o=i[e],r=s[1].split(",").map(Xe);return"function"==typeof o?o(r):r[o]}const Ye=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)};function Xe(t){return parseFloat(t.trim())}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=(()=>new Set(He))(),qe=t=>t===it||t===yt,Ze=new Set(["x","y","z"]),_e=He.filter(t=>!Ze.has(t));const Je={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:(t,{transform:e})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};Je.translateX=Je.x,Je.translateY=Je.y;const Qe=new Set;let tn=!1,en=!1,nn=!1;function sn(){if(en){const t=Array.from(Qe).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 _e.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.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])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}en=!1,tn=!1,Qe.forEach(t=>t.complete(nn)),Qe.clear()}function on(){Qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(en=!0)})}function rn(){nn=!0,on(),sn(),nn=!1}class an{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Qe.add(this),tn||(tn=!0,$.read(on),$.resolveKeyframes(sn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}Le(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Qe.delete(this)}cancel(){"scheduled"===this.state&&(Qe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ln=t=>t.startsWith("--");function cn(t,e,n){ln(e)?t.style.setProperty(e,n):t.style[e]=n}const un=c(()=>void 0!==window.ScrollTimeline),hn={};function dn(t,e){const n=c(t);return()=>hn[e]??n()}const pn=dn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),mn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function gn(t,e){return t?"function"==typeof t?pn()?qt(t,e):"ease-out":F(t)?mn(t):Array.isArray(t)?t.map(t=>gn(t,e)||fn.easeOut):fn[t]:void 0}function yn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=gn(a,s);Array.isArray(h)&&(u.easing=h),N.value&&Z.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return N.value&&p.finished.finally(()=>{Z.waapi--}),p}function vn(t){return"function"==typeof t&&"applyToOptions"in t}function xn({type:t,...e}){return vn(t)&&pn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Tn extends Be{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=xn(e);this.animation=yn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=ke(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):cn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return g(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&un()?(this.animation.timeline=t,u):e(this)}}const wn={anticipate:E,backInOut:P,circInOut:D};function bn(t){"string"==typeof t.ease&&t.ease in wn&&(t.ease=wn[t.ease])}class Sn extends Tn{constructor(t){bn(t),Re(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new je({...r,autoplay:!1}),l=Math.max(10,q.now()-this.startTime),c=i(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const An=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Rt.test(t)&&"0"!==t||t.startsWith("url(")));function Vn(t){t.duration=0,t.type="keyframes"}const Pn=new Set(["opacity","clipPath","filter","transform"]),En=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Mn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return!o.useManualTiming&&En()&&n&&Pn.has(n)&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==r&&"inertia"!==a}class kn extends Be{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=q.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||an;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=q.now(),function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=An(o,n),l=An(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(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}(e)||("spring"===i||vn(i))&&s)}(e,r,a,l)||(!o.instantAnimations&&c||d?.(ke(e,i,n)),e[0]=e[e.length-1],Vn(i),i.repeat=0);const p={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!h&&Mn(p),f=p.motionValue?.owner?.current,g=m?new Sn({...p,element:f}):new je(p);g.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),rn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Dn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Rn(this.animations,"duration")}get iterationDuration(){return Rn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Rn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Bn extends Dn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Cn extends Tn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const jn=new WeakMap,Ln=(t,e="")=>`${t}:${e}`;function Fn(t){const e=jn.get(t)||new Map;return jn.set(t,e),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const In=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wn(t){const e=In.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Nn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Wn(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return tt(o)?Nn(o,n,i+1):o}const Un={type:"spring",stiffness:500,damping:25,restSpeed:10},$n={type:"keyframes",duration:.8},zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?$n:Ge.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Un:zn,Yn=t=>null!==t;function Xn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Yn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function Hn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Gn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Hn(n,t):n}function qn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Zn=(t,e,n,i={},s,r)=>a=>{const l=Gn(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};qn(l)||Object.assign(h,Kn(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Vn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations)&&(d=!0,Vn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Xn(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new je(h):new kn(h)};function _n(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Jn(t,e,n,i){if("function"==typeof e){const[s,o]=_n(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=_n(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Qn(t,e,n){const i=t.getProps();return Jn(i,e,void 0!==n?n:i.custom,t)}const ti=new Set(["width","height","top","left","right","bottom",...He]),ei={current:void 0};class ni{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=q.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=q.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 m);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ei.current&&ei.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=q.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ii(t,e){return new ni(t,e)}const si=t=>Array.isArray(t);function oi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ii(n))}function ri(t){return si(t)?t[t.length-1]||0:t}function ai(t,e){const n=Qn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){oi(t,e,ri(o[e]))}}const li=t=>Boolean(t&&t.getVelocity);function ci(t){return Boolean(li(t)&&t.add)}function ui(t,e){const n=t.getValue("willChange");if(ci(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function hi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const di="framerAppearId",pi="data-"+hi(di);function mi(t){return t.props[pi]}function fi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Hn(o,l):l;const c=o?.reduceMotion;i&&(o=i);const u=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&fi(h,e))continue;const r={delay:n,...Gn(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(s)&&s===l&&!r.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=mi(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(r.startTime=t,d=!0)}}ui(t,e);const p=c??t.shouldReduceMotion;i.start(Zn(e,i,s,p&&ti.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&u.push(m)}if(r){const e=()=>$.update(()=>{r&&ai(t,r)});u.length?Promise.all(u).then(e):e()}return u}function yi(t,e,n={}){const i=Qn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(gi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(yi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function vi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>yi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=yi(t,e,n);else{const s="function"==typeof e?Qn(t,e,n.custom):e;i=Promise.all(gi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const xi=t=>e=>e.test(t),Ti=[it,yt,gt,ft,xt,vt,{test:t=>"auto"===t,parse:t=>t}],wi=t=>Ti.find(xi(t));function bi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Si=new Set(["brightness","contrast","saturate","opacity"]);function Ai(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(at)||[];if(!i)return t;const s=n.replace(i,"");let o=Si.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Vi=/\b([a-z-]*)\(.*?\)/gu,Pi={...Rt,getAnimatableNone:t=>{const e=t.match(Vi);return e?e.map(Ai).join(" "):t}},Ei={...it,transform:Math.round},Mi={rotate:ft,rotateX:ft,rotateY:ft,rotateZ:ft,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:ft,skewX:ft,skewY:ft,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:st,originX:Tt,originY:Tt,originZ:yt},ki={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,inset:yt,insetBlock:yt,insetBlockStart:yt,insetBlockEnd:yt,insetInline:yt,insetInlineStart:yt,insetInlineEnd:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,paddingBlock:yt,paddingBlockStart:yt,paddingBlockEnd:yt,paddingInline:yt,paddingInlineStart:yt,paddingInlineEnd:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,marginBlock:yt,marginBlockStart:yt,marginBlockEnd:yt,marginInline:yt,marginInlineStart:yt,marginInlineEnd:yt,fontSize:yt,backgroundPositionX:yt,backgroundPositionY:yt,...Mi,zIndex:Ei,fillOpacity:st,strokeOpacity:st,numOctaves:Ei},Di={...ki,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Pi,WebkitFilter:Pi},Ri=t=>Di[t];function Bi(t,e){let n=Ri(t);return n!==Pi&&(n=Rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ci=new Set(["auto","none","0"]);class ji extends an{constructor(t,e,n,i,s){super(t,e,n,i,s,!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 i=t[n];if("string"==typeof i&&(i=i.trim(),tt(i))){const s=Nn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ti.has(n)||2!==t.length)return;const[i,s]=t,o=wi(i),r=wi(s);if(nt(i)!==nt(s)&&Je[n])this.needsMeasurement=!0;else if(o!==r)if(qe(o)&&qe(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Je[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||bi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ci.has(e)&&Et(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Bi(n,i)}(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=Je[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=Je[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Li=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Fi(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Li.has(e)&&(t[n]=t[n]+"px")}const Oi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Ii=new Set(["opacity","clipPath","filter","transform"]);function Wi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ni(t){return(e,n)=>{const i=Wi(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Ui=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class $i{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?Ui(i,ki[t]):i,n&&$.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&z(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function zi(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new $i;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const Ki=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?hi(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Yi=Ni(zi(Ki)),Xi=zi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Hi(t){return a(t)&&"offsetHeight"in t}const Gi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const qi=new Set(["originX","originY","originZ"]),Zi=(t,e,n,i)=>{let s,o;return Ge.has(n)?(e.get("transform")||(Hi(t)||e.get("transformBox")||Zi(t,e,"transformBox",new ni("fill-box")),e.set("transform",new ni("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<He.length;i++){const s=He[i],o=t.latest[s];if(void 0===o)continue;let r=!0;if("number"==typeof o)r=o===(s.startsWith("scale")?1:0);else{const t=parseFloat(o);r=s.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${Gi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):qi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ni(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=ln(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},_i=Ni(zi(Zi));const Ji=Ni(zi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ni("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ki(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Zi:Ki)(t,e,n,i)}));const{schedule:Qi,cancel:ts}=U(queueMicrotask,!1),es={x:!1,y:!1};function ns(){return es.x||es.y}function is(t,e){const n=Wi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const ss=(t,e)=>!!e&&(t===e||ss(t,e.parentElement)),os=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,rs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function as(t){return rs.has(t.tagName)||!0===t.isContentEditable}const ls=new Set(["INPUT","SELECT","TEXTAREA"]);const cs=new WeakSet;function us(t){return e=>{"Enter"===e.key&&t(e)}}function hs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ds(t){return os(t)&&!ns()}const ps=new WeakSet;function ms(t,e){const n=window.getComputedStyle(t);return ln(e)?n.getPropertyValue(e):n[e]}function fs(t){return a(t)&&"ownerSVGElement"in t}const gs=new WeakMap;let ys;const vs=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:fs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],xs=vs("inline","width","offsetWidth"),Ts=vs("block","height","offsetHeight");function ws({target:t,borderBoxSize:e}){gs.get(t)?.forEach(n=>{n(t,{get width(){return xs(t,e)},get height(){return Ts(t,e)}})})}function bs(t){t.forEach(ws)}function Ss(t,e){ys||"undefined"!=typeof ResizeObserver&&(ys=new ResizeObserver(bs));const n=Wi(t);return n.forEach(t=>{let n=gs.get(t);n||(n=new Set,gs.set(t,n)),n.add(e),ys?.observe(t)}),()=>{n.forEach(t=>{const n=gs.get(t);n?.delete(e),n?.size||ys?.unobserve(t)})}}const As=new Set;let Vs;function Ps(t){return As.add(t),Vs||(Vs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};As.forEach(e=>e(t))},window.addEventListener("resize",Vs)),()=>{As.delete(t),As.size||"function"!=typeof Vs||(window.removeEventListener("resize",Vs),Vs=void 0)}}function Es(t,e){return"function"==typeof t?Ps(t):Ss(t,e)}function Ms(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return $.preUpdate(i,!0),()=>z(i)}function ks(){const{value:t}=N;null!==t?(t.frameloop.rate.push(K.delta),t.animations.mainThread.push(Z.mainThread),t.animations.waapi.push(Z.waapi),t.animations.layout.push(Z.layout)):z(ks)}function Ds(t){return t.reduce((t,e)=>t+e,0)/t.length}function Rs(t,e=Ds){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Bs=t=>Math.round(1e3/t);function Cs(){N.value=null,N.addProjectionMetrics=null}function js(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");Cs(),z(ks);const e={frameloop:{setup:Rs(t.frameloop.setup),rate:Rs(t.frameloop.rate),read:Rs(t.frameloop.read),resolveKeyframes:Rs(t.frameloop.resolveKeyframes),preUpdate:Rs(t.frameloop.preUpdate),update:Rs(t.frameloop.update),preRender:Rs(t.frameloop.preRender),render:Rs(t.frameloop.render),postRender:Rs(t.frameloop.postRender)},animations:{mainThread:Rs(t.animations.mainThread),waapi:Rs(t.animations.waapi),layout:Rs(t.animations.layout)},layoutProjection:{nodes:Rs(t.layoutProjection.nodes),calculatedTargetDeltas:Rs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Rs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Bs(n.min),n.max=Bs(n.max),n.avg=Bs(n.avg),[n.min,n.max]=[n.max,n.min],e}function Ls(t){return fs(t)&&"svg"===t.tagName}function Fs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Os(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=be(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Is(t,e){const n=ii(li(t)?t.get():t);return Ws(n,t,e),n}function Ws(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null)};if(t.attach((e,i)=>{r=e,s=t=>i(Ns(t,a)),$.postRender(()=>{(()=>{l();const e=Us(t.get()),i=Us(r);e!==i&&(o=new je({keyframes:[e,i],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}))})(),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),li(e)){const n=e.on("change",e=>t.set(Ns(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Ns(t,e){return e?t+e:t}function Us(t){return"number"==typeof t?t:parseFloat(t)}function $s(t){const e=[];ei.current=e;const n=t();ei.current=void 0;const i=ii(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>$.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),z(i)})}(e,i,t),i}const zs=[...Ti,bt,Rt],Ks=t=>zs.find(xi(t));function Ys(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Xs={},Hs=null;const Gs=(t,e)=>{Xs[t]=e},qs=()=>{Hs||(Hs=document.createElement("style"),Hs.id="motion-view");let t="";for(const e in Xs){const n=Xs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Hs.textContent=t,document.head.appendChild(Hs),Xs={}},Zs=()=>{Hs&&Hs.parentElement&&Hs.parentElement.removeChild(Hs)};function _s(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Js(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Qs(){return document.getAnimations().filter(Js)}const to=["layout","enter","exit","new","old"];function eo(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Dn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Gs(":root",{"view-transition-name":"none"}),Gs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),qs();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{Zs()}),new Promise(t=>{s.ready.then(()=>{const e=Qs(),s=[];n.forEach((t,e)=>{for(const n of to){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Gn(i,t),...Gn(r,t)},l=Ys(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const c=new Tn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=_s(o);if(!r)continue;const a=n.get(r.layer);if(a)no(a,"enter")&&no(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Cn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Gn(i,n)};o.duration&&(o.duration=f(o.duration)),o=xn(o);const a=gn(o.ease,o.duration);e.updateTiming({delay:f(o.delay??0),duration:o.duration,easing:a}),s.push(new Cn(t))}}t(new Dn(s))})})}function no(t,e){return t?.[e]?.keyframes.opacity}let io=[],so=null;function oo(){so=null;const[t]=io;var e;t&&(n(io,e=t),so=e,eo(e).then(t=>{e.notifyReady(t),t.finished.finally(oo)}))}function ro(){for(let t=io.length-1;t>=0;t--){const e=io[t],{interrupt:n}=e.options;if("immediate"===n){const n=io.slice(0,t+1).map(t=>t.update),i=io.slice(t+1);e.update=()=>{n.forEach(t=>t())},io=[e,...i];break}}so&&"immediate"!==io[0]?.options.interrupt||oo()}class ao{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=u,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,io.push(n),Qi.render(ro)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const lo=()=>({translate:0,scale:1,origin:0,originPoint:0}),co=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),uo=()=>({min:0,max:0}),ho=()=>({x:{min:0,max:0},y:{min:0,max:0}}),po={current:null},mo={current:!1},fo="undefined"!=typeof window;function go(){if(mo.current=!0,fo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>po.current=t.matches;t.addEventListener("change",e),e()}else po.current=!1}const yo=new WeakMap;function vo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function xo(t){return"string"==typeof t||Array.isArray(t)}const To=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wo=["initial",...To];function bo(t){return vo(t.animate)||wo.some(e=>xo(t[e]))}function So(t){return Boolean(bo(t)||t.variants)}function Ao(t,e,n){for(const i in e){const s=e[i],o=n[i];if(li(s))t.addValue(i,s);else if(li(o))t.addValue(i,ii(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ii(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Vo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Po={};class Eo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=an,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=q.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=bo(e),this.isVariantNode=So(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&li(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,yo.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(mo.current||go(),this.shouldReduceMotion=po.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ge.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 Po){const e=Po[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(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<Vo.length;e++){const n=Vo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Ao(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}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=ii(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Ks(n)&&Rt.test(e)&&(n=Bi(t,e)),this.setBaseTarget(t,li(n)?n.get():n)),li(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Jn(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||li(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new m),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Qi.render(this.render)}}class Mo extends Eo{constructor(){super(...arguments),this.KeyframeResolver=ji}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;li(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function ko({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Do(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Ro(t){return void 0===t||1===t}function Bo({scale:t,scaleX:e,scaleY:n}){return!Ro(t)||!Ro(e)||!Ro(n)}function Co(t){return Bo(t)||jo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function jo(t){return Lo(t.x)||Lo(t.y)}function Lo(t){return t&&"0%"!==t}function Fo(t,e,n){return n+e*(t-n)}function Oo(t,e,n,i,s){return void 0!==s&&(t=Fo(t,s,i)),Fo(t,n,i)+e}function Io(t,e=0,n=1,i,s){t.min=Oo(t.min,e,n,i,s),t.max=Oo(t.max,e,n,i,s)}function Wo(t,{x:e,y:n}){Io(t.x,e.translate,e.scale,e.originPoint),Io(t.y,n.translate,n.scale,n.originPoint)}const No=.999999999999,Uo=1.0000000000001;function $o(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Yo(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Wo(t,r)),i&&Co(o.latestValues)&&Yo(t,o.latestValues))}e.x<Uo&&e.x>No&&(e.x=1),e.y<Uo&&e.y>No&&(e.y=1)}function zo(t,e){t.min=t.min+e,t.max=t.max+e}function Ko(t,e,n,i,s=.5){Io(t,e,n,Lt(t.min,t.max,s),i)}function Yo(t,e){Ko(t.x,e.x,e.scaleX,e.scale,e.originX),Ko(t.y,e.y,e.scaleY,e.scale,e.originY)}function Xo(t,e){return ko(Do(t.getBoundingClientRect(),e))}const Ho={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Go=He.length;function qo(t,e,n){let i="",s=!0;for(let o=0;o<Go;o++){const r=He[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=Ui(a,ki[r]);if(!l){s=!1;i+=`${Ho[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Zo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Ge.has(t))r=!0;else if(J(t))s[t]=n;else{const e=Ui(n,ki[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=qo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function _o(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function Jo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${Jo(t,e.target.x)}% ${Jo(t,e.target.y)}%`}},tr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Rt.parse(t);if(s.length>5)return i;const o=Rt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Lt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},er={borderRadius:{...Qo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qo,borderTopRightRadius:Qo,borderBottomLeftRadius:Qo,borderBottomRightRadius:Qo,boxShadow:tr};function nr(t,{layout:e,layoutId:n}){return Ge.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!er[t]||"opacity"===t)}function ir(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(li(i[e])||s&&li(s[e])||nr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class sr extends Mo{constructor(){super(...arguments),this.type="html",this.renderInstance=_o}readValueFromInstance(t,e){if(Ge.has(e))return this.projection?.isProjecting?ze(e):Ye(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(J(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Xo(t,e)}build(t,e,n){Zo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ir(t,e,n)}}class or extends Eo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const rr={offset:"stroke-dashoffset",array:"stroke-dasharray"},ar={offset:"strokeDashoffset",array:"strokeDasharray"};function lr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?rr:ar;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const cr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ur(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Zo(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of cr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&lr(h,s,o,r,!1)}const hr=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"]),dr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function pr(t,e,n,i){_o(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(hr.has(n)?n:hi(n),e.attrs[n])}function mr(t,e,n){const i=ir(t,e,n);for(const n in t)if(li(t[n])||li(e[n])){i[-1!==He.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class fr extends Mo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ho}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ge.has(e)){const t=Ri(e);return t&&t.default||0}return e=hr.has(e)?e:hi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return mr(t,e,n)}build(t,e,n){ur(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){pr(t,e,0,i)}mount(t){this.isSVGTag=dr(t.tagName),super.mount(t)}}const gr=wo.length;function yr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&yr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<gr;n++){const i=wo[n],s=t.props[i];(xo(s)||!1===s)&&(e[i]=s)}return e}function vr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const xr=[...To].reverse(),Tr=To.length;function wr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!vr(e,t)}function br(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sr(){return{animate:br(!0),whileInView:br(),whileHover:br(),whileTap:br(),whileDrag:br(),whileFocus:br(),exit:br()}}function Ar(t,e){t.min=e.min,t.max=e.max}function Vr(t,e){Ar(t.x,e.x),Ar(t.y,e.y)}function Pr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Er(t){return t.max-t.min}function Mr(t,e,n){return Math.abs(t-e)<=n}function kr(t,e,n,i=.5){t.origin=i,t.originPoint=Lt(e.min,e.max,t.origin),t.scale=Er(n)/Er(e),t.translate=Lt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Dr(t,e,n,i){kr(t.x,e.x,n.x,i?i.originX:void 0),kr(t.y,e.y,n.y,i?i.originY:void 0)}function Rr(t,e,n){t.min=n.min+e.min,t.max=t.min+Er(e)}function Br(t,e,n){Rr(t.x,e.x,n.x),Rr(t.y,e.y,n.y)}function Cr(t,e,n){t.min=e.min-n.min,t.max=t.min+Er(e)}function jr(t,e,n){Cr(t.x,e.x,n.x),Cr(t.y,e.y,n.y)}function Lr(t,e,n,i,s){return t=Fo(t-=e,1/n,i),void 0!==s&&(t=Fo(t,1/s,i)),t}function Fr(t,e=0,n=1,i=.5,s,o=t,r=t){if(gt.test(e)){e=parseFloat(e);e=Lt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Lt(o.min,o.max,i);t===o&&(a-=e),t.min=Lr(t.min,e,n,a,s),t.max=Lr(t.max,e,n,a,s)}function Or(t,e,[n,i,s],o,r){Fr(t,e[n],e[i],e[s],e.scale,o,r)}const Ir=["x","scaleX","originX"],Wr=["y","scaleY","originY"];function Nr(t,e,n,i){Or(t.x,e,Ir,n?n.x:void 0,i?i.x:void 0),Or(t.y,e,Wr,n?n.y:void 0,i?i.y:void 0)}function Ur(t){return 0===t.translate&&1===t.scale}function $r(t){return Ur(t.x)&&Ur(t.y)}function zr(t,e){return t.min===e.min&&t.max===e.max}function Kr(t,e){return zr(t.x,e.x)&&zr(t.y,e.y)}function Yr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Xr(t,e){return Yr(t.x,e.x)&&Yr(t.y,e.y)}function Hr(t){return Er(t.x)/Er(t.y)}function Gr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function qr(t){return[t("x"),t("y")]}function Zr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const _r=["TopLeft","TopRight","BottomLeft","BottomRight"],Jr=_r.length,Qr=t=>"string"==typeof t?parseFloat(t):t,ta=t=>"number"==typeof t||yt.test(t);function ea(t,e,n,i,s,o){s?(t.opacity=Lt(0,n.opacity??1,ia(i)),t.opacityExit=Lt(e.opacity??1,0,sa(i))):o&&(t.opacity=Lt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Jr;s++){const o=`border${_r[s]}Radius`;let r=na(e,o),a=na(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ta(r)===ta(a)?(t[o]=Math.max(Lt(Qr(r),Qr(a),i),0),(gt.test(a)||gt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Lt(e.rotate||0,n.rotate||0,i))}function na(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ia=oa(0,.5,k),sa=oa(.5,.95,u);function oa(t,e,n){return i=>i<t?0:i>e?1:n(p(t,e,i))}function ra(t,e,n){const i=li(t)?t:ii(t);return i.start(Zn("",i,e,n)),i.animation}function aa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const la=(t,e)=>t.depth-e.depth;class ca{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(la),this.isDirty=!1,this.children.forEach(t)}}function ua(t,e){const n=q.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(z(i),t(o-e))};return $.setup(i,!0),()=>z(i)}function ha(t,e){return ua(t,f(e))}function da(t){return li(t)?t.get():t}class pa{constructor(){this.members=[]}add(t){e(this.members,t),t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const i=n.options.layoutDependency,s=t.options.layoutDependency;void 0!==i&&void 0!==s&&i===s||(t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:o}=t.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ma={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ga=["","X","Y","Z"];let ya=0;function va(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function xa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=mi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&xa(i)}function Ta({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=ya++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,N.value&&(fa.nodes=fa.calculatedTargetDeltas=fa.calculatedProjections=0),this.nodes.forEach(Sa),this.nodes.forEach(Da),this.nodes.forEach(Ra),this.nodes.forEach(Aa),N.addProjectionMetrics&&N.addProjectionMetrics(fa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ca)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new m),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=fs(e)&&!Ls(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;$.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=ua(s,250),ma.hasAnimatedSinceResize&&(ma.hasAnimatedSinceResize=!1,this.nodes.forEach(ka)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Oa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Xr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Gn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||ka(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ba),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Pa);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ea);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ma),this.nodes.forEach(wa),this.nodes.forEach(ba)):this.nodes.forEach(Ea),this.clearAllSnapshots();const t=q.now();K.delta=i(0,1e3/60,t-K.timestamp),K.timestamp=t,K.isProcessing=!0,Y.update.process(K),Y.preRender.process(K),Y.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Va),this.sharedNodes.forEach(Ca)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Er(this.snapshot.measuredBox.x)||Er(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!$r(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Co(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Na((i=n).x),Na(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some($a))){const{scroll:t}=this.root;t&&(zo(e.x,t.offset.x),zo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Vr(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Vr(e,t),zo(e.x,s.offset.x),zo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Vr(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Yo(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Co(i.latestValues)&&Yo(n,i.latestValues)}return Co(this.latestValues)&&Yo(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Vr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Co(n.latestValues))continue;Bo(n.latestValues)&&n.updateSnapshot();const i=ho();Vr(i,n.measurePageBox()),Nr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Co(this.latestValues)&&Nr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=K.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Br(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Vr(this.target,this.layout.layoutBox),Wo(this.target,this.targetDelta)):Vr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),N.value&&fa.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Bo(this.parent.latestValues)&&!jo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},jr(this.relativeTargetOrigin,e,n),Vr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===K.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Vr(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;$o(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Pr(this.prevProjectionDelta.x,this.projectionDelta.x),Pr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Dr(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Gr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Gr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),N.value&&fa.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Fa));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;ja(o.x,t.x,n),ja(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,La(l.x,d.x,p.x,m),La(l.y,d.y,p.y,m),h&&Kr(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Vr(h,this.relativeTarget)),a&&(this.animationValues=s,ea(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{ma.hasAnimatedSinceResize=!0,Z.layout++,this.motionValue||(this.motionValue=ii(0)),this.currentAnimation=ra(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{Z.layout--},onComplete:()=>{Z.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ua(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Er(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Er(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Vr(e,n),Yo(e,s),Dr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new pa);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&va("z",t,i,this.animationValues);for(let e=0;e<ga.length;e++)va(`rotate${ga[e]}`,t,i,this.animationValues),va(`skew${ga[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=da(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=da(e?.pointerEvents)||""),void(this.hasProjected&&!Co(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Zr(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in er){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=er[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?da(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Pa),this.root.sharedNodes.clear()}}}function wa(t){t.updateLayout()}function ba(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?qr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Er(i);i.min=n[t].min,i.max=i.min+s}):Ua(s,e.layoutBox,n)&&qr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Er(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Dr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Dr(a,t.applyTransform(i,!0),e.measuredBox):Dr(a,n,e.layoutBox);const l=!$r(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};jr(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};jr(a,n,o.layoutBox),Xr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Sa(t){N.value&&fa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Aa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Va(t){t.clearSnapshot()}function Pa(t){t.clearMeasurements()}function Ea(t){t.isLayoutDirty=!1}function Ma(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ka(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Da(t){t.resolveTargetDelta()}function Ra(t){t.calcProjection()}function Ba(t){t.resetSkewAndRotation()}function Ca(t){t.removeLeadSnapshot()}function ja(t,e,n){t.translate=Lt(e.translate,0,n),t.scale=Lt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function La(t,e,n,i){t.min=Lt(e.min,n.min,i),t.max=Lt(e.max,n.max,i)}function Fa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Oa={duration:.45,ease:[.4,0,.1,1]},Ia=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Wa=Ia("applewebkit/")&&!Ia("chrome/")?Math.round:u;function Na(t){t.min=Wa(t.min),t.max=Wa(t.max)}function Ua(t,e,n){return"position"===t||"preserve-aspect"===t&&!Mr(Hr(e),Hr(n),.2)}function $a(t){return t!==t.root&&t.scroll?.wasRoot}const za=Ta({attachResizeListener:(t,e)=>aa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ka=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Ya={current:void 0},Xa=Ta({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ya.current){const t=new za({});t.mount(window),t.setOptions({layoutScroll:!0}),Ya.current=t}return Ya.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ha="[data-layout], [data-layout-id]",Ga=()=>{};function qa(t){const e=Array.from(t.querySelectorAll(Ha));return t instanceof Element&&t.matches(Ha)&&(e.includes(t)||e.unshift(t)),e}function Za(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function _a(t,e,n){const i=yo.get(t),s=i??new sr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Xa(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||yo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function Ja(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Qa=$,tl=W.reduce((t,e)=>(t[e]=t=>z(t),t),{});function el(t){return"object"==typeof t&&!Array.isArray(t)}function nl(t,e,n,i){return null==t?[]:"string"==typeof t&&el(e)?Wi(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function il(t,e,n){return t*(e+1)}function sl(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function ol(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Lt(o,r,s[n]),easing:L(i,n)})}function rl(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function al(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ll(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function cl(t,e){return e[t]||(e[t]=[]),e[t]}function ul(t){return Array.isArray(t)?t:[t]}function hl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const dl=t=>"number"==typeof t,pl=t=>t.every(dl);function ml(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=fs(t)&&!Ls(t)?new fr(e):new sr(e);n.mount(t),yo.set(t,n)}function fl(t){const e=new or({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),yo.set(t,e)}function gl(e,n,i,s){const o=[];if(function(t,e){return li(t)||"number"==typeof t||"string"==typeof t&&!el(e)}(e,n))o.push(ra(e,el(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=nl(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?ml:fl;yo.has(e)||s(e);const l=yo.get(e),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(t,a)),o.push(...gi(l,{...n,transition:c},{}))}}return o}function yl(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,d=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,d);continue}if(!Array.isArray(a)){u.set(a.name,sl(d,a.at,h,u));continue}let[p,g,y={}]=a;void 0!==y.at&&(d=sl(d,y.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=ul(e),{delay:u=0,times:h=Ae(c),type:p=n.type||"keyframes",repeat:g,repeatType:y,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:b}=i;const S="function"==typeof u?u(a,l):u,A=c.length,V=vn(p)?p:o?.[p||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&pl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...T};void 0!==b&&(e.duration=f(b));const i=Jt(e,t,V);w=i.ease,b=i.duration}b??(b=r);const P=d+S;1===h.length&&0===h[0]&&(h[1]=1);const E=h.length-c.length;if(E>0&&Se(h,E),1===c.length&&c.unshift(null),g){t.invariant(g<20,"Repeat count too high, must be less than 20","repeat-count-high"),b=il(b,g);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<g;t++){c.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":L(i,s-1))}rl(h,g)}const M=P+b;ol(s,c,w,h,P,M),v=Math.max(S+b,v),m=Math.max(M,m)};if(li(p))x(g,y,cl("default",ll(p,l)));else{const t=nl(p,g,s,c),e=t.length;for(let n=0;n<e;n++){const i=ll(t[n],l);for(const t in g)x(g[t],hl(y,t),cl(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(al);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(p(0,m,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...d}=n;u.transition[s]={...d,duration:m,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=ii(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:Te});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...gl(n,t,e))}),s}function vl(t={}){const{scope:e,reduceMotion:i}=t;return function(t,s,o){let r,a=[];if(l=t,Array.isArray(l)&&l.some(Array.isArray))a=yl(t,void 0!==i?{reduceMotion:i,...s}:s,e);else{const{onComplete:n,...l}=o||{};"function"==typeof n&&(r=n),a=gl(t,s,void 0!==i?{reduceMotion:i,...l}:l,e)}var l;const c=new Bn(a);return r&&c.finished.then(r),e&&(e.animations.push(c),c.finished.then(()=>{n(e.animations,c)})),c}}const xl=vl();const Tl=e=>function(n,i,s){return new Bn(function(e,n,i,s){if(null==e)return[];const o=Wi(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const o={...Gn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=Fn(e),l=Ln(t,o.pseudoElement||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=ms(i,s)),Le(e),Fi(e,s),!o&&e.length<2&&e.unshift(ms(i,s)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],s=new Tn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},wl=Tl(),bl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Sl(t,e,n,i){const s=n[e],{length:o,position:r}=bl[e],a=s.current,l=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=p(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:y(s.current-a,c)}const Al={start:0,center:.5,end:1};function Vl(t,e,n=0){let i=0;if(t in Al&&(t=Al[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Pl=[0,0];function El(t,e,n,i){let s=Array.isArray(t)?t:Pl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Al[t]?t:"0"]),o=Vl(s[0],n,i),r=Vl(s[1],e),o-r}const Ml={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},kl={x:0,y:0};function Dl(t,e,n){const{offset:s=Ml.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Hi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):kl,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t<d;t++){const n=El(s[t],u[a],c[a],l[r]);h||n===e[r].interpolatorOffsets[t]||(h=!0),e[r].offset[t]=n}h&&(e[r].interpolate=be(e[r].offset,Ae(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=i(0,1,e[r].interpolate(e[r].current))}function Rl(t,e,n,i={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),function(t,e,n){Sl(t,"x",e,n),Sl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Dl(t,n,i)},notify:()=>e(n)}}const Bl=new WeakMap,Cl=new WeakMap,jl=new WeakMap,Ll=new WeakMap,Fl=new WeakMap,Ol=t=>t===document.scrollingElement?window:t;function Il(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=jl.get(e);s||(s=new Set,jl.set(e,s));const o=Rl(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}},i);if(s.add(o),!Bl.has(e)){const t=()=>{for(const t of s)t.measure(K.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>$.read(t);Bl.set(e,i);const o=Ol(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&Cl.set(e,Es(e,i)),o.addEventListener("scroll",i,{passive:!0}),i()}if(n&&!Fl.has(e)){const t=Bl.get(e),n={width:e.scrollWidth,height:e.scrollHeight};Ll.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=$.read(i,!0);Fl.set(e,s)}const r=Bl.get(e);return $.read(r,!1,!0),()=>{z(r);const t=jl.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Bl.get(e);Bl.delete(e),n&&(Ol(e).removeEventListener("scroll",n),Cl.get(e)?.(),window.removeEventListener("resize",n));const i=Fl.get(e);i&&(z(i),Fl.delete(e)),Ll.delete(e)}}const Wl=new Map;function Nl({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Wl.get(e)??new Map;Wl.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&un()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Il(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Ul={some:0,all:1};const $l=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=ji,t.DOMVisualElement=Mo,t.DocumentProjectionNode=za,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=ca,t.GroupAnimation=Dn,t.GroupAnimationWithThen=Bn,t.HTMLProjectionNode=Xa,t.HTMLVisualElement=sr,t.JSAnimation=je,t.KeyframeResolver=an,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Ga,this.rejectReady=Ga,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),$.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=qa(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Vr(n,e),Vr(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=qa(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{$.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new Dn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=Ja(i,n,this.scope),{layout:s,layoutId:o}=Za(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=_a(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),yo.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionGlobalConfig=o,t.MotionValue=ni,t.NativeAnimation=Tn,t.NativeAnimationExtended=Sn,t.NativeAnimationWrapper=Cn,t.NodeStack=pa,t.ObjectVisualElement=or,t.SVGVisualElement=fr,t.SubscriptionManager=m,t.ViewTransitionBuilder=ao,t.VisualElement=Eo,t.acceleratedValues=Ii,t.activeAnimations=Z,t.addAttrValue=Ki,t.addDomEvent=aa,t.addScaleCorrector=function(t){for(const e in t)er[e]=t[e],J(e)&&(er[e].isCSSVariable=!0)},t.addStyleValue=Zi,t.addUniqueItem=e,t.addValueToWillChange=ui,t.alpha=st,t.analyseComplexValue=Et,t.animate=xl,t.animateMini=wl,t.animateMotionValue=Zn,t.animateSingleValue=ra,t.animateTarget=gi,t.animateValue=function(t){return new je(t)},t.animateVariant=yi,t.animateView=function(t,e={}){return new ao(t,e)},t.animateVisualElement=vi,t.animationMapKey=Ln,t.anticipate=E,t.applyAxisDelta=Io,t.applyBoxDelta=Wo,t.applyGeneratorOptions=xn,t.applyPointDelta=Oo,t.applyPxDefaults=Fi,t.applyTreeDeltas=$o,t.aspectRatio=Hr,t.attachFollow=Ws,t.attachSpring=function(t,e,n){return Ws(t,e,{type:"spring",...n})},t.attrEffect=Yi,t.axisDeltaEquals=Gr,t.axisEquals=zr,t.axisEqualsRounded=Yr,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Kr,t.boxEqualsRounded=Xr,t.buildHTMLStyles=Zo,t.buildProjectionTransform=Zr,t.buildSVGAttrs=ur,t.buildSVGPath=lr,t.buildTransform=qo,t.calcAxisDelta=kr,t.calcBoxDelta=Dr,t.calcChildStagger=On,t.calcGeneratorDuration=_t,t.calcLength=Er,t.calcRelativeAxis=Rr,t.calcRelativeAxisPosition=Cr,t.calcRelativeBox=Br,t.calcRelativePosition=jr,t.camelCaseAttributes=hr,t.camelToDash=hi,t.cancelFrame=z,t.cancelMicrotask=ts,t.cancelSync=tl,t.checkVariantsDidChange=wr,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Aa,t.collectMotionValues=ei,t.color=bt,t.compareByDepth=la,t.complex=Rt,t.containsCSSVariable=nt,t.convertBoundingBoxToBox=ko,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Ve,t.copyAxisDeltaInto=Pr,t.copyAxisInto=Ar,t.copyBoxInto=Vr,t.correctBorderRadius=Qo,t.correctBoxShadow=tr,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>vi(t,e,n)))}(t),n=Sr(),i=!0;const s=e=>(n,i)=>{const s=Qn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=yr(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;e<Tr;e++){const d=xr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=xo(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...u},!p.isActive&&null===g||!m&&!p.prevProp||vo(m)||"boolean"==typeof m)continue;if("exit"===d&&p.isActive&&!0!==g){p.prevResolvedValues&&(u={...u,...p.prevResolvedValues});continue}const v=wr(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===g&&(b={});const{prevResolvedValues:S={}}=p,A={...S,...b},V=e=>{x=!0,c.has(e)&&(T=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=b[t],n=S[t];if(u.hasOwnProperty(t))continue;let i=!1;i=si(e)&&si(n)?!vr(e,n):e!==n,i?null!=e?V(t):c.add(t):void 0!==e&&c.has(t)?V(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(u={...u,...b}),i&&t.blockInitialAnimation&&(x=!1);const P=y&&v;x&&(!P||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!P&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Qn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=Qn(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Sr()}}},t.createAxis=uo,t.createAxisDelta=lo,t.createBox=ho,t.createDelta=co,t.createGeneratorEasing=Jt,t.createProjectionNode=Ta,t.createRenderBatcher=U,t.createScopedAnimate=vl,t.cubicBezier=w,t.cubicBezierAsString=mn,t.defaultEasing=Pe,t.defaultOffset=Ae,t.defaultTransformValue=ze,t.defaultValueTypes=Di,t.degrees=ft,t.delay=ha,t.delayInSeconds=ha,t.dimensionValueTypes=Ti,t.distance=$l,t.distance2D=function(t,e){const n=$l(t.x,e.x),i=$l(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=qr,t.easeIn=R,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=Se,t.fillWildcards=Le,t.findDimensionValueType=wi,t.findValueType=Ks,t.flushKeyframeResolvers=rn,t.followValue=Is,t.frame=$,t.frameData=K,t.frameSteps=Y,t.generateLinearEasing=qt,t.getAnimatableNone=Bi,t.getAnimationMap=Fn,t.getComputedStyle=ms,t.getDefaultTransition=Kn,t.getDefaultValueType=Ri,t.getEasingForSegment=L,t.getFeatureDefinitions=function(){return Po},t.getFinalKeyframe=Xn,t.getMixer=zt,t.getOptimisedAppearId=mi,t.getOriginIndex=Fs,t.getValueAsType=Ui,t.getValueTransition=Gn,t.getVariableValue=Nn,t.getVariantContext=yr,t.getViewAnimationLayerInfo=_s,t.getViewAnimations=Qs,t.globalProjectionState=ma,t.has2DTranslate=jo,t.hasReducedMotionListener=mo,t.hasScale=Bo,t.hasTransform=Co,t.hasWarned=function(t){return v.has(t)},t.hex=pt,t.hover=function(t,e,n={}){const[i,s,o]=is(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ns())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=wt,t.hslaToRgba=Ct,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Wi(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Ul[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=we,t.initPrefersReducedMotion=go,t.interpolate=be,t.invisibleValues=Nt,t.isAnimationControls=vo,t.isBezierDefinition=F,t.isCSSVariableName=J,t.isCSSVariableToken=tt,t.isControllingVariants=bo,t.isDeltaZero=$r,t.isDragActive=ns,t.isDragging=es,t.isEasingArray=j,t.isElementKeyboardAccessible=as,t.isElementTextInput=function(t){return ls.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=nr,t.isGenerator=vn,t.isHTMLElement=Hi,t.isKeyframesTarget=si,t.isMotionValue=li,t.isNear=Mr,t.isNodeOrChild=ss,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=os,t.isSVGElement=fs,t.isSVGSVGElement=Ls,t.isSVGTag=dr,t.isTransitionDefined=qn,t.isVariantLabel=xo,t.isVariantNode=So,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&pn()||!e||"string"==typeof e&&(e in fn||pn())||F(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ci,t.isZeroValueString=l,t.keyframes=Ee,t.makeAnimationInstant=Vn,t.mapEasingToNativeEasing=gn,t.mapValue=function(t,e,n,i){const s=Os(e,n,i);return $s(()=>s(t.get()))},t.maxGeneratorDuration=Zt,t.measurePageBox=function(t,e,n){const i=Xo(t,n),{scroll:s}=e;return s&&(zo(i.x,s.offset.x),zo(i.y,s.offset.y)),i},t.measureViewportBox=Xo,t.memo=c,t.microtask=Qi,t.millisecondsToSeconds=g,t.mirrorEasing=b,t.mix=Ht,t.mixArray=Kt,t.mixColor=Wt,t.mixComplex=Xt,t.mixImmediate=jt,t.mixLinearColor=Ft,t.mixNumber=Lt,t.mixObject=Yt,t.mixValues=ea,t.mixVisibility=Ut,t.motionValue=ii,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Ka);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=it,t.numberValueTypes=ki,t.observeTimeline=Ms,t.optimizedAppearDataAttribute=pi,t.optimizedAppearDataId=di,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Wi(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=Wn,t.parseValueFromTransform=Ke,t.percent=gt,t.pipe=d,t.pixelsToPercent=Jo,t.positionalKeys=ti,t.prefersReducedMotion=po,t.press=function(t,e,n={}){const[i,s,o]=is(t,n),r=t=>{const i=t.currentTarget;if(!ds(t))return;if(ps.has(t))return;cs.add(i),n.stopPropagation&&ps.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),cs.has(i)&&cs.delete(i),ds(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ss(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Hi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=us(()=>{if(cs.has(n))return;hs(n,"down");const t=us(()=>{hs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>hs(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),as(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=X,t.progress=p,t.progressPercentage=Tt,t.propEffect=Xi,t.propagateDirtyNodes=Sa,t.px=yt,t.readTransformValue=Ye,t.recordStats=function(){if(N.value)throw Cs(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(ks,!0),js},t.removeAxisDelta=Fr,t.removeAxisTransforms=Or,t.removeBoxTransforms=Nr,t.removeItem=n,t.removePointDelta=Lr,t.renderFrame=function(t={}){const{timestamp:e,frame:n,fps:i=30,delta:s}=t;let r,a;void 0!==e?(r=e,a=void 0!==s?s:1e3/60):void 0!==n?(r=n/i*1e3,a=void 0!==s?s:1e3/i):(a=void 0!==s?s:1e3/60,r=K.timestamp+a);const l=o.useManualTiming;o.useManualTiming=!0,q.set(r),X(r,a),o.useManualTiming=l},t.renderHTML=_o,t.renderSVG=pr,t.resize=Es,t.resolveElements=Wi,t.resolveMotionValue=da,t.resolveTransition=Hn,t.resolveVariant=Qn,t.resolveVariantFromProps=Jn,t.reverseEasing=S,t.rgbUnit=ht,t.rgba=dt,t.rootProjectionNode=Ya,t.scale=ot,t.scaleCorrectors=er,t.scalePoint=Fo,t.scrapeHTMLMotionValuesFromProps=ir,t.scrapeSVGMotionValuesFromProps=mr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Il(n=>{t(n[e.axis].progress,n)},e):Ms(t,Nl(e))}(t,s):function(t,e){const n=Nl(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Ms(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Il,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?es[t]?null:(es[t]=!0,()=>{es[t]=!1}):es.x||es.y?null:(es.x=es.y=!0,()=>{es.x=es.y=!1})},t.setFeatureDefinitions=function(t){Po=t},t.setStyle=cn,t.setTarget=ai,t.spring=Te,t.springValue=function(t,e){return Is(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Fs(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=yn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=_i,t.supportedWaapiEasing=fn,t.supportsBrowserAnimation=Mn,t.supportsFlags=hn,t.supportsLinearEasing=pn,t.supportsPartialKeyframes=Oi,t.supportsScrollTimeline=un,t.svgEffect=Ji,t.sync=Qa,t.testValueType=xi,t.time=q,t.transform=Os,t.transformAxis=Ko,t.transformBox=Yo,t.transformBoxPoints=Do,t.transformPropOrder=He,t.transformProps=Ge,t.transformValue=$s,t.transformValueTypes=Mi,t.translateAxis=zo,t.updateMotionValuesFromProps=Ao,t.variantPriorityOrder=To,t.variantProps=wo,t.velocityPerSecond=y,t.vh=vt,t.visualElementStore=yo,t.vw=xt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(s(e,n)),v.add(e))},t.wrap=x});
|
|
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";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;function s(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class m{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,y=t=>t/1e3;function g(t,e){return e?t*(1e3/e):0}const v=new Set;const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},T=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function w(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=T(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:T(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=w(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),R=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const j=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return j(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:R,easeInOut:C,easeOut:B,circIn:M,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return w(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},W=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function U(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=W.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&N.value&&N.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(r,e?n:void 0),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming?s.timestamp:performance.now();n=!1,o.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:W.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<W.length;e++)a[W[e]].cancel(t)},state:s,steps:a}}const{schedule:$,cancel:z,state:K,steps:Y}=U("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(K.isProcessing||o.useManualTiming?K.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},q={layout:0,mainThread:0,waapi:0},Z=t=>e=>"string"==typeof e&&e.startsWith(t),_=Z("--"),J=Z("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function et(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it={...nt,transform:t=>i(0,1,t)},st={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(t,e)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ct=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(rt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},ut={...nt,transform:t=>Math.round((t=>i(0,255,t))(t))},ht={test:lt("rgb","red"),parse:ct("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+ot(it.transform(i))+")"};const dt={test:lt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ht.transform},pt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mt=pt("deg"),ft=pt("%"),yt=pt("px"),gt=pt("vh"),vt=pt("vw"),xt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),Tt={test:lt("hsl","hue"),parse:ct("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ft.transform(ot(e))+", "+ft.transform(ot(n))+", "+ot(it.transform(i))+")"},wt={test:t=>ht.test(t)||dt.test(t)||Tt.test(t),parse:t=>ht.test(t)?ht.parse(t):Tt.test(t)?Tt.parse(t):dt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ht.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=wt.parse(t);return e.alpha=0,wt.transform(e)}},bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const St="number",At="color",Vt=/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 Pt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Vt,t=>(wt.test(t)?(i.color.push(o),s.push(At),n.push(wt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(St),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Et(t){return Pt(t).values}function Mt(t){const{split:e,types:n}=Pt(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===St?ot(t[o]):e===At?wt.transform(t[o]):t[o]}return s}}const kt=t=>"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Dt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:Mt,getAnimatableNone:function(t){const e=Et(t);return Mt(t)(e.map(kt))}};function Rt(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 Bt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Rt(a,i,t+1/3),o=Rt(a,i,t),r=Rt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Ct(t,e){return n=>n>0?e:t}const jt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ot=[dt,ht,Tt];function Ft(e){const n=(i=e,Ot.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===Tt&&(s=Bt(s)),s}const It=(t,e)=>{const n=Ft(t),i=Ft(e);if(!n||!i)return Ct(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=jt(n.alpha,i.alpha,t),ht.transform(s))},Wt=new Set(["none","hidden"]);function Nt(t,e){return Wt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ut(t,e){return n=>jt(t,e,n)}function $t(t){return"number"==typeof t?Ut:"string"==typeof t?Q(t)?Ct:wt.test(t)?It:Yt:Array.isArray(t)?zt:"object"==typeof t?wt.test(t)?It:Kt:Ct}function zt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Kt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=$t(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Yt=(e,n)=>{const i=Dt.createTransformer(n),s=Pt(e),o=Pt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Wt.has(e)&&!o.values.length||Wt.has(n)&&!s.values.length?Nt(e,n):d(zt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ct(e,n))};function Xt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return jt(t,e,n);return $t(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>z(e),now:()=>K.isProcessing?K.timestamp:G.now()}},Gt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<qt;)e+=50,n=t.next(e);return e>=qt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}function Jt(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}const Qt=100,te=10,ee=1,ne=0,ie=800,se=.3,oe=.3,re={granular:.01,default:2},ae={granular:.005,default:.5},le=.01,ce=10,ue=.05,he=1,de=.001;function pe({duration:e=ie,bounce:n=se,velocity:s=ne,mass:o=ee}){let r,a;t.warning(e<=f(ce),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ue,he,l),e=i(le,ce,y(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=fe(t,l),a=Math.exp(-i);return de-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=fe(Math.pow(t,2),l);return(-r(t)+de>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<me;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=f(e),isNaN(c))return{stiffness:Qt,damping:te,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}const me=12;function fe(t,e){return t*Math.sqrt(1-e*e)}const ye=["duration","bounce"],ge=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function xe(t=oe,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ne,stiffness:Qt,damping:te,mass:ee,isResolvedFromDuration:!1,...t};if(!ve(t,ge)&&ve(t,ye))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),o=s*s,r=2*i(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:ee,stiffness:o,damping:r}}else{const n=pe(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=p||0,v=u/(2*Math.sqrt(c*h)),x=a-r,T=y(Math.sqrt(c/h)),w=Math.abs(x)<5;let b;if(s||(s=w?re.granular:re.default),o||(o=w?ae.granular:ae.default),v<1){const t=fe(T,v);b=e=>{const n=Math.exp(-v*T*e);return a-n*((g+v*T*x)/t*Math.sin(t*e)+x*Math.cos(t*e))}}else if(1===v)b=t=>a-Math.exp(-T*t)*(x+(g+T*x)*t);else{const t=T*Math.sqrt(v*v-1);b=e=>{const n=Math.exp(-v*T*e),i=Math.min(t*e,300);return a-n*((g+v*T*x)*Math.sinh(i)+t*x*Math.cosh(i))/t}}const S={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)l.done=t>=d;else{let n=0===t?g:0;v<1&&(n=0===t?f(g):Jt(b,t,e));const i=Math.abs(n)<=s,r=Math.abs(a-e)<=o;l.done=i&&r}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(S),qt),e=Gt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){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 m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=xe({keyframes:[d.value,p(d.value)],velocity:Jt(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function we(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const i=[],s=n||o.mix||Xt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=d(t,o)}i.push(o)}return i}(n,r,a),m=h.length,f=t=>{if(c&&t<e[0])return n[0];let i=0;if(m>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=p(e[i],e[i+1],t);return h[i](s)};return s?t=>f(i(e[0],e[l-1],t)):f}function be(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=p(0,e,i);t.push(jt(n,1,s))}}function Se(t){const e=[0];return be(e,t.length-1),e}function Ae(t,e){return t.map(t=>t*e)}function Ve(t,e){return t.map(()=>e||C).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=j(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=we(Ae(n&&n.length===e.length?n:Se(e),t),e,{ease:Array.isArray(s)?s:Ve(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}xe.applyToOptions=t=>{const e=_t(t,100,xe);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};const Ee=t=>null!==t;function Me(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ee),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:Te,inertia:Te,tween:Pe,keyframes:Pe,spring:xe};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}class Re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Be=t=>t/100;class Ce extends Re{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;De(t);const{type:e=Pe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Pe;a!==Pe&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Be,Xt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),x=i(0,1,n)*a}const w=v?{done:!1,value:u[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Te&&(w.value=Me(u,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function je(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Le=t=>180*t/Math.PI,Oe=t=>{const e=Le(Math.atan2(t[1],t[0]));return Ie(e)},Fe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Le(Math.atan(t[1])),skewY:t=>Le(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),We=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ne=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ue={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:We,scaleY:Ne,scale:t=>(We(t)+Ne(t))/2,rotateX:t=>Ie(Le(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(Le(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Le(Math.atan(t[4])),skewY:t=>Le(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function ze(t,e){if(!t||"none"===t)return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ue,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Fe,s=e}if(!s)return $e(e);const o=i[e],r=s[1].split(",").map(Ye);return"function"==typeof o?o(r):r[o]}const Ke=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ze(n,e)};function Ye(t){return parseFloat(t.trim())}const Xe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Xe))(),Ge=t=>t===nt||t===yt,qe=new Set(["x","y","z"]),Ze=Xe.filter(t=>!qe.has(t));const _e={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:(t,{transform:e})=>ze(e,"x"),y:(t,{transform:e})=>ze(e,"y")};_e.translateX=_e.x,_e.translateY=_e.y;const Je=new Set;let Qe=!1,tn=!1,en=!1;function nn(){if(tn){const t=Array.from(Je).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 Ze.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.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])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tn=!1,Qe=!1,Je.forEach(t=>t.complete(en)),Je.clear()}function sn(){Je.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tn=!0)})}function on(){en=!0,sn(),nn(),en=!1}class rn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Je.add(this),Qe||(Qe=!0,$.read(sn),$.resolveKeyframes(nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}je(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Je.delete(this)}cancel(){"scheduled"===this.state&&(Je.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const an=t=>t.startsWith("--");function ln(t,e,n){an(e)?t.style.setProperty(e,n):t.style[e]=n}const cn=c(()=>void 0!==window.ScrollTimeline),un={};function hn(t,e){const n=c(t);return()=>un[e]??n()}const dn=hn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?dn()?Gt(t,e):"ease-out":O(t)?pn(t):Array.isArray(t)?t.map(t=>fn(t,e)||mn.easeOut):mn[t]:void 0}function yn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=fn(a,s);Array.isArray(h)&&(u.easing=h),N.value&&q.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return N.value&&p.finished.finally(()=>{q.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function vn({type:t,...e}){return gn(t)&&dn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends Re{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=vn(e);this.animation=yn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Me(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ln(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return y(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&cn()?(this.animation.timeline=t,u):e(this)}}const Tn={anticipate:E,backInOut:P,circInOut:D};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(t),De(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ce({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),c=i(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Vn=new Set(["opacity","clipPath","filter","transform"]),Pn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function En(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Pn()&&n&&Vn.has(n)&&("transform"!==n||!c)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Mn extends Re{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||rn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now(),function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Sn(o,n),l=Sn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(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}(e)||("spring"===i||gn(i))&&s)}(e,r,a,l)||(!o.instantAnimations&&c||d?.(Me(e,i,n)),e[0]=e[e.length-1],An(i),i.repeat=0);const p={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!h&&En(p),f=p.motionValue?.owner?.current,y=m?new bn({...p,element:f}):new Ce(p);y.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),on()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}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=>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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends xn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){const e=Cn.get(t)||new Map;return Cn.set(t,e),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Wn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=In(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return Q(o)?Wn(o,n,i+1):o}const Nn={type:"spring",stiffness:500,damping:25,restSpeed:10},Un={type:"keyframes",duration:.8},$n={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zn=(t,{keyframes:e})=>e.length>2?Un:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Nn:$n,Kn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Kn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function Xn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Hn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Xn(n,t):n}function Gn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const qn=(t,e,n,i={},s,r)=>a=>{const l=Hn(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Gn(l)||Object.assign(h,zn(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(An(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations)&&(d=!0,An(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Yn(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ce(h):new Mn(h)};function Zn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function _n(t,e,n,i){if("function"==typeof e){const[s,o]=Zn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Zn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Jn(t,e,n){const i=t.getProps();return _n(i,e,void 0!==n?n:i.custom,t)}const Qn=new Set(["width","height","top","left","right","bottom",...Xe]),ti={current:void 0};class ei{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.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 m);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ti.current&&ti.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ni(t,e){return new ei(t,e)}const ii=t=>Array.isArray(t);function si(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ni(n))}function oi(t){return ii(t)?t[t.length-1]||0:t}function ri(t,e){const n=Jn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){si(t,e,oi(o[e]))}}const ai=t=>Boolean(t&&t.getVelocity);function li(t){return Boolean(ai(t)&&t.add)}function ci(t,e){const n=t.getValue("willChange");if(li(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function ui(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hi="framerAppearId",di="data-"+ui(hi);function pi(t){return t.props[di]}function mi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function fi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Xn(o,l):l;const c=o?.reduceMotion;i&&(o=i);const u=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&mi(h,e))continue;const r={delay:n,...Hn(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(s)&&s===l&&!r.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=pi(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(r.startTime=t,d=!0)}}ci(t,e);const p=c??t.shouldReduceMotion;i.start(qn(e,i,s,p&&Qn.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&u.push(m)}if(r){const e=()=>$.update(()=>{r&&ri(t,r)});u.length?Promise.all(u).then(e):e()}return u}function yi(t,e,n={}){const i=Jn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(fi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(yi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function gi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>yi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=yi(t,e,n);else{const s="function"==typeof e?Jn(t,e,n.custom):e;i=Promise.all(fi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const vi=t=>e=>e.test(t),xi=[nt,yt,ft,mt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],Ti=t=>xi.find(vi(t));function wi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const bi=new Set(["brightness","contrast","saturate","opacity"]);function Si(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(rt)||[];if(!i)return t;const s=n.replace(i,"");let o=bi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ai=/\b([a-z-]*)\(.*?\)/gu,Vi={...Dt,getAnimatableNone:t=>{const e=t.match(Ai);return e?e.map(Si).join(" "):t}},Pi={...nt,transform:Math.round},Ei={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:mt,skewX:mt,skewY:mt,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:it,originX:xt,originY:xt,originZ:yt},Mi={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,inset:yt,insetBlock:yt,insetBlockStart:yt,insetBlockEnd:yt,insetInline:yt,insetInlineStart:yt,insetInlineEnd:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,paddingBlock:yt,paddingBlockStart:yt,paddingBlockEnd:yt,paddingInline:yt,paddingInlineStart:yt,paddingInlineEnd:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,marginBlock:yt,marginBlockStart:yt,marginBlockEnd:yt,marginInline:yt,marginInlineStart:yt,marginInlineEnd:yt,fontSize:yt,backgroundPositionX:yt,backgroundPositionY:yt,...Ei,zIndex:Pi,fillOpacity:it,strokeOpacity:it,numOctaves:Pi},ki={...Mi,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Vi,WebkitFilter:Vi},Di=t=>ki[t];function Ri(t,e){let n=Di(t);return n!==Vi&&(n=Dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Bi=new Set(["auto","none","0"]);class Ci extends rn{constructor(t,e,n,i,s){super(t,e,n,i,s,!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 i=t[n];if("string"==typeof i&&(i=i.trim(),Q(i))){const s=Wn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Qn.has(n)||2!==t.length)return;const[i,s]=t,o=Ti(i),r=Ti(s);if(et(i)!==et(s)&&_e[n])this.needsMeasurement=!0;else if(o!==r)if(Ge(o)&&Ge(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||wi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Bi.has(e)&&Pt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ri(n,i)}(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=_e[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=_e[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const ji=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Li(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ji.has(e)&&(t[n]=t[n]+"px")}const Oi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Fi=new Set(["opacity","clipPath","filter","transform"]);function Ii(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Wi(t){return(e,n)=>{const i=Ii(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Ni=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ui{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?Ni(i,Mi[t]):i,n&&$.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&z(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function $i(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new Ui;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const zi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?ui(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Ki=Wi($i(zi)),Yi=$i((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Xi(t){return a(t)&&"offsetHeight"in t}const Hi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Gi=new Set(["originX","originY","originZ"]),qi=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(Xi(t)||e.get("transformBox")||qi(t,e,"transformBox",new ei("fill-box")),e.set("transform",new ei("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Xe.length;i++){const s=Xe[i],o=t.latest[s];if(void 0===o)continue;let r=!0;if("number"==typeof o)r=o===(s.startsWith("scale")?1:0);else{const t=parseFloat(o);r=s.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${Hi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):Gi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ei(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=an(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Zi=Wi($i(qi));const _i=Wi($i((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ei("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return zi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?qi:zi)(t,e,n,i)}));const{schedule:Ji,cancel:Qi}=U(queueMicrotask,!1),ts={x:!1,y:!1};function es(){return ts.x||ts.y}function ns(t,e){const n=Ii(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const is=(t,e)=>!!e&&(t===e||is(t,e.parentElement)),ss=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,os=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rs(t){return os.has(t.tagName)||!0===t.isContentEditable}const as=new Set(["INPUT","SELECT","TEXTAREA"]);const ls=new WeakSet;function cs(t){return e=>{"Enter"===e.key&&t(e)}}function us(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function hs(t){return ss(t)&&!es()}const ds=new WeakSet;function ps(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function ms(t){return a(t)&&"ownerSVGElement"in t}const fs=new WeakMap;let ys;const gs=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ms(i)&&"getBBox"in i?i.getBBox()[e]:i[n],vs=gs("inline","width","offsetWidth"),xs=gs("block","height","offsetHeight");function Ts({target:t,borderBoxSize:e}){fs.get(t)?.forEach(n=>{n(t,{get width(){return vs(t,e)},get height(){return xs(t,e)}})})}function ws(t){t.forEach(Ts)}function bs(t,e){ys||"undefined"!=typeof ResizeObserver&&(ys=new ResizeObserver(ws));const n=Ii(t);return n.forEach(t=>{let n=fs.get(t);n||(n=new Set,fs.set(t,n)),n.add(e),ys?.observe(t)}),()=>{n.forEach(t=>{const n=fs.get(t);n?.delete(e),n?.size||ys?.unobserve(t)})}}const Ss=new Set;let As;function Vs(t){return Ss.add(t),As||(As=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ss.forEach(e=>e(t))},window.addEventListener("resize",As)),()=>{Ss.delete(t),Ss.size||"function"!=typeof As||(window.removeEventListener("resize",As),As=void 0)}}function Ps(t,e){return"function"==typeof t?Vs(t):bs(t,e)}function Es(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return $.preUpdate(i,!0),()=>z(i)}function Ms(){const{value:t}=N;null!==t?(t.frameloop.rate.push(K.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):z(Ms)}function ks(t){return t.reduce((t,e)=>t+e,0)/t.length}function Ds(t,e=ks){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Rs=t=>Math.round(1e3/t);function Bs(){N.value=null,N.addProjectionMetrics=null}function Cs(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");Bs(),z(Ms);const e={frameloop:{setup:Ds(t.frameloop.setup),rate:Ds(t.frameloop.rate),read:Ds(t.frameloop.read),resolveKeyframes:Ds(t.frameloop.resolveKeyframes),preUpdate:Ds(t.frameloop.preUpdate),update:Ds(t.frameloop.update),preRender:Ds(t.frameloop.preRender),render:Ds(t.frameloop.render),postRender:Ds(t.frameloop.postRender)},animations:{mainThread:Ds(t.animations.mainThread),waapi:Ds(t.animations.waapi),layout:Ds(t.animations.layout)},layoutProjection:{nodes:Ds(t.layoutProjection.nodes),calculatedTargetDeltas:Ds(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ds(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Rs(n.min),n.max=Rs(n.max),n.avg=Rs(n.avg),[n.min,n.max]=[n.max,n.min],e}function js(t){return ms(t)&&"svg"===t.tagName}function Ls(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Os(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=we(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Fs(t,e){const n=ni(ai(t)?t.get():t);return Is(n,t,e),n}function Is(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null)};if(t.attach((e,i)=>{r=e,s=t=>i(Ws(t,a)),$.postRender(()=>{(()=>{l();const e=Ns(t.get()),i=Ns(r);e!==i&&(o=new Ce({keyframes:[e,i],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}))})(),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),ai(e)){const n=e.on("change",e=>t.set(Ws(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Ws(t,e){return e?t+e:t}function Ns(t){return"number"==typeof t?t:parseFloat(t)}function Us(t){const e=[];ti.current=e;const n=t();ti.current=void 0;const i=ni(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>$.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),z(i)})}(e,i,t),i}const $s=[...xi,wt,Dt],zs=t=>$s.find(vi(t));function Ks(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Ys={},Xs=null;const Hs=(t,e)=>{Ys[t]=e},Gs=()=>{Xs||(Xs=document.createElement("style"),Xs.id="motion-view");let t="";for(const e in Ys){const n=Ys[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Xs.textContent=t,document.head.appendChild(Xs),Ys={}},qs=()=>{Xs&&Xs.parentElement&&Xs.parentElement.removeChild(Xs)};function Zs(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function _s(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Js(){return document.getAnimations().filter(_s)}const Qs=["layout","enter","exit","new","old"];function to(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Hs(":root",{"view-transition-name":"none"}),Hs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Gs();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{qs()}),new Promise(t=>{s.ready.then(()=>{const e=Js(),s=[];n.forEach((t,e)=>{for(const n of Qs){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Hn(i,t),...Hn(r,t)},l=Ks(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const c=new xn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=Zs(o);if(!r)continue;const a=n.get(r.layer);if(a)eo(a,"enter")&&eo(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Hn(i,n)};o.duration&&(o.duration=f(o.duration)),o=vn(o);const a=fn(o.ease,o.duration);e.updateTiming({delay:f(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function eo(t,e){return t?.[e]?.keyframes.opacity}let no=[],io=null;function so(){io=null;const[t]=no;var e;t&&(n(no,e=t),io=e,to(e).then(t=>{e.notifyReady(t),t.finished.finally(so)}))}function oo(){for(let t=no.length-1;t>=0;t--){const e=no[t],{interrupt:n}=e.options;if("immediate"===n){const n=no.slice(0,t+1).map(t=>t.update),i=no.slice(t+1);e.update=()=>{n.forEach(t=>t())},no=[e,...i];break}}io&&"immediate"!==no[0]?.options.interrupt||so()}class ro{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=u,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,no.push(n),Ji.render(oo)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const ao=()=>({translate:0,scale:1,origin:0,originPoint:0}),lo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),co=()=>({min:0,max:0}),uo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ho=new WeakMap;function po(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function mo(t){return"string"==typeof t||Array.isArray(t)}const fo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yo=["initial",...fo];function go(t){return po(t.animate)||yo.some(e=>mo(t[e]))}function vo(t){return Boolean(go(t)||t.variants)}function xo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ai(s))t.addValue(i,s);else if(ai(o))t.addValue(i,ni(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ni(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const To={current:null},wo={current:!1},bo="undefined"!=typeof window;function So(){if(wo.current=!0,bo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>To.current=t.matches;t.addEventListener("change",e),e()}else To.current=!1}const Ao=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Vo={};class Po{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=go(e),this.isVariantNode=vo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&ai(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,ho.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(wo.current||So(),this.shouldReduceMotion=To.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Fi.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new xn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 Vo){const e=Vo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(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<Ao.length;e++){const n=Ao[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=xo(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}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=ni(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!zs(n)&&Dt.test(e)&&(n=Ri(t,e)),this.setBaseTarget(t,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=_n(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||ai(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new m),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ji.render(this.render)}}class Eo extends Po{constructor(){super(...arguments),this.KeyframeResolver=Ci}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Mo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ko(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Do(t){return void 0===t||1===t}function Ro({scale:t,scaleX:e,scaleY:n}){return!Do(t)||!Do(e)||!Do(n)}function Bo(t){return Ro(t)||Co(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Co(t){return jo(t.x)||jo(t.y)}function jo(t){return t&&"0%"!==t}function Lo(t,e,n){return n+e*(t-n)}function Oo(t,e,n,i,s){return void 0!==s&&(t=Lo(t,s,i)),Lo(t,n,i)+e}function Fo(t,e=0,n=1,i,s){t.min=Oo(t.min,e,n,i,s),t.max=Oo(t.max,e,n,i,s)}function Io(t,{x:e,y:n}){Fo(t.x,e.translate,e.scale,e.originPoint),Fo(t.y,n.translate,n.scale,n.originPoint)}const Wo=.999999999999,No=1.0000000000001;function Uo(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ko(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Io(t,r)),i&&Bo(o.latestValues)&&Ko(t,o.latestValues))}e.x<No&&e.x>Wo&&(e.x=1),e.y<No&&e.y>Wo&&(e.y=1)}function $o(t,e){t.min=t.min+e,t.max=t.max+e}function zo(t,e,n,i,s=.5){Fo(t,e,n,jt(t.min,t.max,s),i)}function Ko(t,e){zo(t.x,e.x,e.scaleX,e.scale,e.originX),zo(t.y,e.y,e.scaleY,e.scale,e.originY)}function Yo(t,e){return Mo(ko(t.getBoundingClientRect(),e))}const Xo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ho=Xe.length;function Go(t,e,n){let i="",s=!0;for(let o=0;o<Ho;o++){const r=Xe[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=Ni(a,Mi[r]);if(!l){s=!1;i+=`${Xo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function qo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(He.has(t))r=!0;else if(_(t))s[t]=n;else{const e=Ni(n,Mi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Go(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Zo(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function _o(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Jo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${_o(t,e.target.x)}% ${_o(t,e.target.y)}%`}},Qo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Dt.parse(t);if(s.length>5)return i;const o=Dt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=jt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},tr={borderRadius:{...Jo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jo,borderTopRightRadius:Jo,borderBottomLeftRadius:Jo,borderBottomRightRadius:Jo,boxShadow:Qo};function er(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!tr[t]||"opacity"===t)}function nr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ai(i[e])||s&&ai(s[e])||er(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ir extends Eo{constructor(){super(...arguments),this.type="html",this.renderInstance=Zo}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?$e(e):Ke(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(_(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Yo(t,e)}build(t,e,n){qo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return nr(t,e,n)}}class sr extends Po{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const or={offset:"stroke-dashoffset",array:"stroke-dasharray"},rr={offset:"strokeDashoffset",array:"strokeDasharray"};function ar(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?or:rr;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const lr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function cr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(qo(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of lr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&ar(h,s,o,r,!1)}const ur=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"]),hr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function dr(t,e,n,i){Zo(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(ur.has(n)?n:ui(n),e.attrs[n])}function pr(t,e,n){const i=nr(t,e,n);for(const n in t)if(ai(t[n])||ai(e[n])){i[-1!==Xe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class mr extends Eo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=uo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=Di(e);return t&&t.default||0}return e=ur.has(e)?e:ui(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return pr(t,e,n)}build(t,e,n){cr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){dr(t,e,0,i)}mount(t){this.isSVGTag=hr(t.tagName),super.mount(t)}}const fr=yo.length;function yr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&yr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<fr;n++){const i=yo[n],s=t.props[i];(mo(s)||!1===s)&&(e[i]=s)}return e}function gr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const vr=[...fo].reverse(),xr=fo.length;function Tr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!gr(e,t)}function wr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function br(){return{animate:wr(!0),whileInView:wr(),whileHover:wr(),whileTap:wr(),whileDrag:wr(),whileFocus:wr(),exit:wr()}}function Sr(t,e){t.min=e.min,t.max=e.max}function Ar(t,e){Sr(t.x,e.x),Sr(t.y,e.y)}function Vr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Pr(t){return t.max-t.min}function Er(t,e,n){return Math.abs(t-e)<=n}function Mr(t,e,n,i=.5){t.origin=i,t.originPoint=jt(e.min,e.max,t.origin),t.scale=Pr(n)/Pr(e),t.translate=jt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function kr(t,e,n,i){Mr(t.x,e.x,n.x,i?i.originX:void 0),Mr(t.y,e.y,n.y,i?i.originY:void 0)}function Dr(t,e,n){t.min=n.min+e.min,t.max=t.min+Pr(e)}function Rr(t,e,n){Dr(t.x,e.x,n.x),Dr(t.y,e.y,n.y)}function Br(t,e,n){t.min=e.min-n.min,t.max=t.min+Pr(e)}function Cr(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function jr(t,e,n,i,s){return t=Lo(t-=e,1/n,i),void 0!==s&&(t=Lo(t,1/s,i)),t}function Lr(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.test(e)){e=parseFloat(e);e=jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=jt(o.min,o.max,i);t===o&&(a-=e),t.min=jr(t.min,e,n,a,s),t.max=jr(t.max,e,n,a,s)}function Or(t,e,[n,i,s],o,r){Lr(t,e[n],e[i],e[s],e.scale,o,r)}const Fr=["x","scaleX","originX"],Ir=["y","scaleY","originY"];function Wr(t,e,n,i){Or(t.x,e,Fr,n?n.x:void 0,i?i.x:void 0),Or(t.y,e,Ir,n?n.y:void 0,i?i.y:void 0)}function Nr(t){return 0===t.translate&&1===t.scale}function Ur(t){return Nr(t.x)&&Nr(t.y)}function $r(t,e){return t.min===e.min&&t.max===e.max}function zr(t,e){return $r(t.x,e.x)&&$r(t.y,e.y)}function Kr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Yr(t,e){return Kr(t.x,e.x)&&Kr(t.y,e.y)}function Xr(t){return Pr(t.x)/Pr(t.y)}function Hr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Gr(t){return[t("x"),t("y")]}function qr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Zr=["TopLeft","TopRight","BottomLeft","BottomRight"],_r=Zr.length,Jr=t=>"string"==typeof t?parseFloat(t):t,Qr=t=>"number"==typeof t||yt.test(t);function ta(t,e,n,i,s,o){s?(t.opacity=jt(0,n.opacity??1,na(i)),t.opacityExit=jt(e.opacity??1,0,ia(i))):o&&(t.opacity=jt(e.opacity??1,n.opacity??1,i));for(let s=0;s<_r;s++){const o=`border${Zr[s]}Radius`;let r=ea(e,o),a=ea(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Qr(r)===Qr(a)?(t[o]=Math.max(jt(Jr(r),Jr(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=jt(e.rotate||0,n.rotate||0,i))}function ea(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const na=sa(0,.5,k),ia=sa(.5,.95,u);function sa(t,e,n){return i=>i<t?0:i>e?1:n(p(t,e,i))}function oa(t,e,n){const i=ai(t)?t:ni(t);return i.start(qn("",i,e,n)),i.animation}function ra(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const aa=(t,e)=>t.depth-e.depth;class la{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(aa),this.isDirty=!1,this.children.forEach(t)}}function ca(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(z(i),t(o-e))};return $.setup(i,!0),()=>z(i)}function ua(t,e){return ca(t,f(e))}function ha(t){return ai(t)?t.get():t}class da{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1===s.isConnected&&!1!==i.isPresent&&!i.snapshot&&n(this.members,i)}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t],i=e.instance;if(!1!==e.isPresent&&(!i||!1!==i.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const i=n.options.layoutDependency,s=t.options.layoutDependency;if(!(void 0!==i&&void 0!==s&&i===s)){const i=n.instance;i&&!1===i.isConnected&&!n.snapshot||(t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:o}=t.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const pa={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ma={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},fa=["","X","Y","Z"];let ya=0;function ga(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function va(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=pi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&va(i)}function xa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=ya++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,N.value&&(ma.nodes=ma.calculatedTargetDeltas=ma.calculatedProjections=0),this.nodes.forEach(ba),this.nodes.forEach(ka),this.nodes.forEach(Da),this.nodes.forEach(Sa),N.addProjectionMetrics&&N.addProjectionMetrics(ma)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new la)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new m),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ms(e)&&!js(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;$.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=ca(s,250),pa.hasAnimatedSinceResize&&(pa.hasAnimatedSinceResize=!1,this.nodes.forEach(Ma)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Oa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Yr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Hn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ra),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&va(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Va);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Pa);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ea),this.nodes.forEach(Ta),this.nodes.forEach(wa)):this.nodes.forEach(Pa),this.clearAllSnapshots();const t=G.now();K.delta=i(0,1e3/60,t-K.timestamp),K.timestamp=t,K.isProcessing=!0,Y.update.process(K),Y.preRender.process(K),Y.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ji.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Aa),this.sharedNodes.forEach(Ba)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Pr(this.snapshot.measuredBox.x)||Pr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Ur(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Bo(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Wa((i=n).x),Wa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ua))){const{scroll:t}=this.root;t&&($o(e.x,t.offset.x),$o(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ar(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ar(e,t),$o(e.x,s.offset.x),$o(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ar(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ko(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Bo(i.latestValues)&&Ko(n,i.latestValues)}return Bo(this.latestValues)&&Ko(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ar(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Bo(n.latestValues))continue;Ro(n.latestValues)&&n.updateSnapshot();const i=uo();Ar(i,n.measurePageBox()),Wr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Bo(this.latestValues)&&Wr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=K.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Rr(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ar(this.target,this.layout.layoutBox),Io(this.target,this.targetDelta)):Ar(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),N.value&&ma.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Ro(this.parent.latestValues)&&!Co(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Cr(this.relativeTargetOrigin,e,n),Ar(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===K.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Ar(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;Uo(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Vr(this.prevProjectionDelta.x,this.projectionDelta.x),Vr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),kr(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Hr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Hr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),N.value&&ma.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(La));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ca(o.x,t.x,n),Ca(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,ja(l.x,d.x,p.x,m),ja(l.y,d.y,p.y,m),h&&zr(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ar(h,this.relativeTarget)),a&&(this.animationValues=s,ta(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{pa.hasAnimatedSinceResize=!0,q.layout++,this.motionValue||(this.motionValue=ni(0)),this.currentAnimation=oa(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{q.layout--},onComplete:()=>{q.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Na(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Pr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Pr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ar(e,n),Ko(e,s),kr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new da);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ga("z",t,i,this.animationValues);for(let e=0;e<fa.length;e++)ga(`rotate${fa[e]}`,t,i,this.animationValues),ga(`skew${fa[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=ha(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ha(e?.pointerEvents)||""),void(this.hasProjected&&!Bo(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=qr(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in tr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=tr[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?ha(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Va),this.root.sharedNodes.clear()}}}function Ta(t){t.updateLayout()}function wa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Gr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Pr(i);i.min=n[t].min,i.max=i.min+s}):Na(s,e.layoutBox,n)&&Gr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Pr(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};kr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?kr(a,t.applyTransform(i,!0),e.measuredBox):kr(a,n,e.layoutBox);const l=!Ur(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Cr(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Cr(a,n,o.layoutBox),Yr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ba(t){N.value&&ma.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Sa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Aa(t){t.clearSnapshot()}function Va(t){t.clearMeasurements()}function Pa(t){t.isLayoutDirty=!1}function Ea(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ka(t){t.resolveTargetDelta()}function Da(t){t.calcProjection()}function Ra(t){t.resetSkewAndRotation()}function Ba(t){t.removeLeadSnapshot()}function Ca(t,e,n){t.translate=jt(e.translate,0,n),t.scale=jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ja(t,e,n,i){t.min=jt(e.min,n.min,i),t.max=jt(e.max,n.max,i)}function La(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Oa={duration:.45,ease:[.4,0,.1,1]},Fa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ia=Fa("applewebkit/")&&!Fa("chrome/")?Math.round:u;function Wa(t){t.min=Ia(t.min),t.max=Ia(t.max)}function Na(t,e,n){return"position"===t||"preserve-aspect"===t&&!Er(Xr(e),Xr(n),.2)}function Ua(t){return t!==t.root&&t.scroll?.wasRoot}const $a=xa({attachResizeListener:(t,e)=>ra(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),za=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Ka={current:void 0},Ya=xa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ka.current){const t=new $a({});t.mount(window),t.setOptions({layoutScroll:!0}),Ka.current=t}return Ka.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Xa="[data-layout], [data-layout-id]",Ha=()=>{};function Ga(t){const e=Array.from(t.querySelectorAll(Xa));return t instanceof Element&&t.matches(Xa)&&(e.includes(t)||e.unshift(t)),e}function qa(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Za(t,e,n){const i=ho.get(t),s=i??new ir({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Ya(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||ho.set(t,s),{element:t,visualElement:s,projection:s.projection}}function _a(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Ja=$,Qa=W.reduce((t,e)=>(t[e]=t=>z(t),t),{});function tl(t){return"object"==typeof t&&!Array.isArray(t)}function el(t,e,n,i){return null==t?[]:"string"==typeof t&&tl(e)?Ii(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function nl(t,e,n){return t*(e+1)}function il(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function sl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:jt(o,r,s[n]),easing:L(i,n)})}function ol(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function rl(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function al(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ll(t,e){return e[t]||(e[t]=[]),e[t]}function cl(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const hl=t=>"number"==typeof t,dl=t=>t.every(hl);function pl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ms(t)&&!js(t)?new mr(e):new ir(e);n.mount(t),ho.set(t,n)}function ml(t){const e=new sr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),ho.set(t,e)}function fl(e,n,i,s){const o=[];if(function(t,e){return ai(t)||"number"==typeof t||"string"==typeof t&&!tl(e)}(e,n))o.push(oa(e,tl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=el(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?pl:ml;ho.has(e)||s(e);const l=ho.get(e),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(t,a)),o.push(...fi(l,{...n,transition:c},{}))}}return o}function yl(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,d=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,d);continue}if(!Array.isArray(a)){u.set(a.name,il(d,a.at,h,u));continue}let[p,y,g={}]=a;void 0!==g.at&&(d=il(d,g.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=cl(e),{delay:u=0,times:h=Se(c),type:p=n.type||"keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:b}=i;const S="function"==typeof u?u(a,l):u,A=c.length,V=gn(p)?p:o?.[p||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&dl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...T};void 0!==b&&(e.duration=f(b));const i=_t(e,t,V);w=i.ease,b=i.duration}b??(b=r);const P=d+S;1===h.length&&0===h[0]&&(h[1]=1);const E=h.length-c.length;if(E>0&&be(h,E),1===c.length&&c.unshift(null),y){t.invariant(y<20,"Repeat count too high, must be less than 20","repeat-count-high"),b=nl(b,y);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<y;t++){c.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":L(i,s-1))}ol(h,y)}const M=P+b;sl(s,c,w,h,P,M),v=Math.max(S+b,v),m=Math.max(M,m)};if(ai(p))x(y,g,ll("default",al(p,l)));else{const t=el(p,y,s,c),e=t.length;for(let n=0;n<e;n++){const i=al(t[n],l);for(const t in y)x(y[t],ul(g,t),ll(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(rl);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(p(0,m,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...d}=n;u.transition[s]={...d,duration:m,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=ni(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...fl(n,t,e))}),s}function gl(t={}){const{scope:e,reduceMotion:i}=t;return function(t,s,o){let r,a=[];if(l=t,Array.isArray(l)&&l.some(Array.isArray))a=yl(t,void 0!==i?{reduceMotion:i,...s}:s,e);else{const{onComplete:n,...l}=o||{};"function"==typeof n&&(r=n),a=fl(t,s,void 0!==i?{reduceMotion:i,...l}:l,e)}var l;const c=new Rn(a);return r&&c.finished.then(r),e&&(e.animations.push(c),c.finished.then(()=>{n(e.animations,c)})),c}}const vl=gl();const xl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Ii(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const o={...Hn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=Ln(e),l=jn(t,o.pseudoElement||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=ps(i,s)),je(e),Li(e,s),!o&&e.length<2&&e.unshift(ps(i,s)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],s=new xn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},Tl=xl(),wl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function bl(t,e,n,i){const s=n[e],{length:o,position:r}=wl[e],a=s.current,l=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=p(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const Sl={start:0,center:.5,end:1};function Al(t,e,n=0){let i=0;if(t in Sl&&(t=Sl[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Vl=[0,0];function Pl(t,e,n,i){let s=Array.isArray(t)?t:Vl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Sl[t]?t:"0"]),o=Al(s[0],n,i),r=Al(s[1],e),o-r}const El={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ml={x:0,y:0};function kl(t,e,n){const{offset:s=El.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Xi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):Ml,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t<d;t++){const n=Pl(s[t],u[a],c[a],l[r]);h||n===e[r].interpolatorOffsets[t]||(h=!0),e[r].offset[t]=n}h&&(e[r].interpolate=we(e[r].offset,Se(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=i(0,1,e[r].interpolate(e[r].current))}function Dl(t,e,n,i={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),function(t,e,n){bl(t,"x",e,n),bl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&kl(t,n,i)},notify:()=>e(n)}}const Rl=new WeakMap,Bl=new WeakMap,Cl=new WeakMap,jl=new WeakMap,Ll=new WeakMap,Ol=t=>t===document.scrollingElement?window:t;function Fl(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Cl.get(e);s||(s=new Set,Cl.set(e,s));const o=Dl(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}},i);if(s.add(o),!Rl.has(e)){const t=()=>{for(const t of s)t.measure(K.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>$.read(t);Rl.set(e,i);const o=Ol(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&Bl.set(e,Ps(e,i)),o.addEventListener("scroll",i,{passive:!0}),i()}if(n&&!Ll.has(e)){const t=Rl.get(e),n={width:e.scrollWidth,height:e.scrollHeight};jl.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=$.read(i,!0);Ll.set(e,s)}const r=Rl.get(e);return $.read(r,!1,!0),()=>{z(r);const t=Cl.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Rl.get(e);Rl.delete(e),n&&(Ol(e).removeEventListener("scroll",n),Bl.get(e)?.(),window.removeEventListener("resize",n));const i=Ll.get(e);i&&(z(i),Ll.delete(e)),jl.delete(e)}}const Il=new Map;function Wl({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Il.get(e)??new Map;Il.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&cn()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Fl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Nl={some:0,all:1};const Ul=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Ci,t.DOMVisualElement=Eo,t.DocumentProjectionNode=$a,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=la,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=Ya,t.HTMLVisualElement=ir,t.JSAnimation=Ce,t.KeyframeResolver=rn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Ha,this.rejectReady=Ha,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),$.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Ga(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Ar(n,e),Ar(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=Ga(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{$.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new kn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=_a(i,n,this.scope),{layout:s,layoutId:o}=qa(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=Za(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),ho.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionGlobalConfig=o,t.MotionValue=ei,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=da,t.ObjectVisualElement=sr,t.SVGVisualElement=mr,t.SubscriptionManager=m,t.ViewTransitionBuilder=ro,t.VisualElement=Po,t.acceleratedValues=Fi,t.activeAnimations=q,t.addAttrValue=zi,t.addDomEvent=ra,t.addScaleCorrector=function(t){for(const e in t)tr[e]=t[e],_(e)&&(tr[e].isCSSVariable=!0)},t.addStyleValue=qi,t.addUniqueItem=e,t.addValueToWillChange=ci,t.alpha=it,t.analyseComplexValue=Pt,t.animate=vl,t.animateMini=Tl,t.animateMotionValue=qn,t.animateSingleValue=oa,t.animateTarget=fi,t.animateValue=function(t){return new Ce(t)},t.animateVariant=yi,t.animateView=function(t,e={}){return new ro(t,e)},t.animateVisualElement=gi,t.animationMapKey=jn,t.anticipate=E,t.applyAxisDelta=Fo,t.applyBoxDelta=Io,t.applyGeneratorOptions=vn,t.applyPointDelta=Oo,t.applyPxDefaults=Li,t.applyTreeDeltas=Uo,t.aspectRatio=Xr,t.attachFollow=Is,t.attachSpring=function(t,e,n){return Is(t,e,{type:"spring",...n})},t.attrEffect=Ki,t.axisDeltaEquals=Hr,t.axisEquals=$r,t.axisEqualsRounded=Kr,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=zr,t.boxEqualsRounded=Yr,t.buildHTMLStyles=qo,t.buildProjectionTransform=qr,t.buildSVGAttrs=cr,t.buildSVGPath=ar,t.buildTransform=Go,t.calcAxisDelta=Mr,t.calcBoxDelta=kr,t.calcChildStagger=On,t.calcGeneratorDuration=Zt,t.calcLength=Pr,t.calcRelativeAxis=Dr,t.calcRelativeAxisPosition=Br,t.calcRelativeBox=Rr,t.calcRelativePosition=Cr,t.camelCaseAttributes=ur,t.camelToDash=ui,t.cancelFrame=z,t.cancelMicrotask=Qi,t.cancelSync=Qa,t.checkVariantsDidChange=Tr,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Sa,t.collectMotionValues=ti,t.color=wt,t.compareByDepth=aa,t.complex=Dt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=Mo,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Ae,t.copyAxisDeltaInto=Vr,t.copyAxisInto=Sr,t.copyBoxInto=Ar,t.correctBorderRadius=Jo,t.correctBoxShadow=Qo,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>gi(t,e,n)))}(t),n=br(),i=!0;const s=e=>(n,i)=>{const s=Jn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=yr(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;e<xr;e++){const d=vr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=mo(m),y=d===o?p.isActive:null;!1===y&&(h=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!m&&!p.prevProp||po(m)||"boolean"==typeof m)continue;if("exit"===d&&p.isActive&&!0!==y){p.prevResolvedValues&&(u={...u,...p.prevResolvedValues});continue}const v=Tr(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,A={...S,...b},V=e=>{x=!0,c.has(e)&&(T=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=b[t],n=S[t];if(u.hasOwnProperty(t))continue;let i=!1;i=ii(e)&&ii(n)?!gr(e,n):e!==n,i?null!=e?V(t):c.add(t):void 0!==e&&c.has(t)?V(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(u={...u,...b}),i&&t.blockInitialAnimation&&(x=!1);const P=g&&v;x&&(!P||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!P&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Jn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=Jn(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=br()}}},t.createAxis=co,t.createAxisDelta=ao,t.createBox=uo,t.createDelta=lo,t.createGeneratorEasing=_t,t.createProjectionNode=xa,t.createRenderBatcher=U,t.createScopedAnimate=gl,t.cubicBezier=w,t.cubicBezierAsString=pn,t.defaultEasing=Ve,t.defaultOffset=Se,t.defaultTransformValue=$e,t.defaultValueTypes=ki,t.degrees=mt,t.delay=ua,t.delayInSeconds=ua,t.dimensionValueTypes=xi,t.distance=Ul,t.distance2D=function(t,e){const n=Ul(t.x,e.x),i=Ul(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Gr,t.easeIn=R,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=je,t.findDimensionValueType=Ti,t.findValueType=zs,t.flushKeyframeResolvers=on,t.followValue=Fs,t.frame=$,t.frameData=K,t.frameSteps=Y,t.generateLinearEasing=Gt,t.getAnimatableNone=Ri,t.getAnimationMap=Ln,t.getComputedStyle=ps,t.getDefaultTransition=zn,t.getDefaultValueType=Di,t.getEasingForSegment=L,t.getFeatureDefinitions=function(){return Vo},t.getFinalKeyframe=Yn,t.getMixer=$t,t.getOptimisedAppearId=pi,t.getOriginIndex=Ls,t.getValueAsType=Ni,t.getValueTransition=Hn,t.getVariableValue=Wn,t.getVariantContext=yr,t.getViewAnimationLayerInfo=Zs,t.getViewAnimations=Js,t.globalProjectionState=pa,t.has2DTranslate=Co,t.hasReducedMotionListener=wo,t.hasScale=Ro,t.hasTransform=Bo,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=ns(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||es())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=Tt,t.hslaToRgba=Bt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ii(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Nl[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initPrefersReducedMotion=So,t.interpolate=we,t.invisibleValues=Wt,t.isAnimationControls=po,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isControllingVariants=go,t.isDeltaZero=Ur,t.isDragActive=es,t.isDragging=ts,t.isEasingArray=j,t.isElementKeyboardAccessible=rs,t.isElementTextInput=function(t){return as.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=er,t.isGenerator=gn,t.isHTMLElement=Xi,t.isKeyframesTarget=ii,t.isMotionValue=ai,t.isNear=Er,t.isNodeOrChild=is,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=ss,t.isSVGElement=ms,t.isSVGSVGElement=js,t.isSVGTag=hr,t.isTransitionDefined=Gn,t.isVariantLabel=mo,t.isVariantNode=vo,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in mn||dn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=li,t.isZeroValueString=l,t.keyframes=Pe,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=Os(e,n,i);return Us(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Yo(t,n),{scroll:s}=e;return s&&($o(i.x,s.offset.x),$o(i.y,s.offset.y)),i},t.measureViewportBox=Yo,t.memo=c,t.microtask=Ji,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Xt,t.mixArray=zt,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Ct,t.mixLinearColor=Lt,t.mixNumber=jt,t.mixObject=Kt,t.mixValues=ta,t.mixVisibility=Nt,t.motionValue=ni,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(za);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=nt,t.numberValueTypes=Mi,t.observeTimeline=Es,t.optimizedAppearDataAttribute=di,t.optimizedAppearDataId=hi,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Ii(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=In,t.parseValueFromTransform=ze,t.percent=ft,t.pipe=d,t.pixelsToPercent=_o,t.positionalKeys=Qn,t.prefersReducedMotion=To,t.press=function(t,e,n={}){const[i,s,o]=ns(t,n),r=t=>{const i=t.currentTarget;if(!hs(t))return;if(ds.has(t))return;ls.add(i),n.stopPropagation&&ds.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ls.has(i)&&ls.delete(i),hs(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||is(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Xi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=cs(()=>{if(ls.has(n))return;us(n,"down");const t=cs(()=>{us(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>us(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),rs(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=p,t.progressPercentage=xt,t.propEffect=Yi,t.propagateDirtyNodes=ba,t.px=yt,t.readTransformValue=Ke,t.recordStats=function(){if(N.value)throw Bs(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(Ms,!0),Cs},t.removeAxisDelta=Lr,t.removeAxisTransforms=Or,t.removeBoxTransforms=Wr,t.removeItem=n,t.removePointDelta=jr,t.renderHTML=Zo,t.renderSVG=dr,t.resize=Ps,t.resolveElements=Ii,t.resolveMotionValue=ha,t.resolveTransition=Xn,t.resolveVariant=Jn,t.resolveVariantFromProps=_n,t.reverseEasing=S,t.rgbUnit=ut,t.rgba=ht,t.rootProjectionNode=Ka,t.scale=st,t.scaleCorrectors=tr,t.scalePoint=Lo,t.scrapeHTMLMotionValuesFromProps=nr,t.scrapeSVGMotionValuesFromProps=pr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Fl(n=>{t(n[e.axis].progress,n)},e):Es(t,Wl(e))}(t,s):function(t,e){const n=Wl(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Es(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Fl,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?ts[t]?null:(ts[t]=!0,()=>{ts[t]=!1}):ts.x||ts.y?null:(ts.x=ts.y=!0,()=>{ts.x=ts.y=!1})},t.setFeatureDefinitions=function(t){Vo=t},t.setStyle=ln,t.setTarget=ri,t.spring=xe,t.springValue=function(t,e){return Fs(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Ls(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=yn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=Zi,t.supportedWaapiEasing=mn,t.supportsBrowserAnimation=En,t.supportsFlags=un,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=Oi,t.supportsScrollTimeline=cn,t.svgEffect=_i,t.sync=Ja,t.testValueType=vi,t.time=G,t.transform=Os,t.transformAxis=zo,t.transformBox=Ko,t.transformBoxPoints=ko,t.transformPropOrder=Xe,t.transformProps=He,t.transformValue=Us,t.transformValueTypes=Ei,t.translateAxis=$o,t.updateMotionValuesFromProps=xo,t.variantPriorityOrder=fo,t.variantProps=yo,t.velocityPerSecond=g,t.vh=gt,t.visualElementStore=ho,t.vw=vt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(s(e,n)),v.add(e))},t.wrap=x});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion",
|
|
3
|
-
"version": "12.34.0
|
|
3
|
+
"version": "12.34.0",
|
|
4
4
|
"description": "An animation library for JavaScript and React.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"postpublish": "git push --tags"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"framer-motion": "^12.34.0
|
|
79
|
+
"framer-motion": "^12.34.0",
|
|
80
80
|
"tslib": "^2.4.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"optional": true
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "5adbf49c451ba1b8e91e6e17847cad520cafdc45"
|
|
99
99
|
}
|