motion 12.27.0-alpha.0 → 12.27.0-alpha.1
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 +78 -22
- package/dist/motion.js +1 -1
- package/package.json +3 -3
package/dist/motion.dev.js
CHANGED
|
@@ -5104,11 +5104,7 @@
|
|
|
5104
5104
|
/**
|
|
5105
5105
|
* Selectors for elements that should participate in layout animations
|
|
5106
5106
|
*/
|
|
5107
|
-
const LAYOUT_SELECTORS = [
|
|
5108
|
-
"[data-layout]",
|
|
5109
|
-
"[data-layout-id]",
|
|
5110
|
-
"[data-animate-layout]",
|
|
5111
|
-
];
|
|
5107
|
+
const LAYOUT_SELECTORS$1 = ["[data-layout]", "[data-layout-id]"];
|
|
5112
5108
|
/**
|
|
5113
5109
|
* Execute a mutation callback while observing DOM changes.
|
|
5114
5110
|
* Returns information about elements that were added or removed.
|
|
@@ -5138,7 +5134,7 @@
|
|
|
5138
5134
|
function observeMutation(container, mutation) {
|
|
5139
5135
|
// Snapshot approach: capture layout elements before and after mutation
|
|
5140
5136
|
// MutationObserver callbacks are async microtasks, so we use direct comparison instead
|
|
5141
|
-
const selector = LAYOUT_SELECTORS.join(", ");
|
|
5137
|
+
const selector = LAYOUT_SELECTORS$1.join(", ");
|
|
5142
5138
|
// Capture elements and their bounds before mutation
|
|
5143
5139
|
const elementsBefore = new Map();
|
|
5144
5140
|
container.querySelectorAll(selector).forEach((el) => {
|
|
@@ -5427,42 +5423,102 @@
|
|
|
5427
5423
|
return new GroupAnimation(animations);
|
|
5428
5424
|
}
|
|
5429
5425
|
/**
|
|
5430
|
-
*
|
|
5426
|
+
* Selectors for elements that participate in layout animations
|
|
5427
|
+
*/
|
|
5428
|
+
const LAYOUT_SELECTORS = "[data-layout], [data-layout-id]";
|
|
5429
|
+
/**
|
|
5430
|
+
* Check if a value is a valid element or selector
|
|
5431
|
+
*/
|
|
5432
|
+
function isElementOrSelector(value) {
|
|
5433
|
+
return (value instanceof Element ||
|
|
5434
|
+
typeof value === "string" ||
|
|
5435
|
+
(Array.isArray(value) && value.length > 0 && value[0] instanceof Element) ||
|
|
5436
|
+
value instanceof NodeList);
|
|
5437
|
+
}
|
|
5438
|
+
/**
|
|
5439
|
+
* Animate layout changes for elements with data-layout or data-layout-id attributes.
|
|
5431
5440
|
* Returns a builder that resolves to a GroupAnimation implementing AnimationPlaybackControls.
|
|
5432
5441
|
*
|
|
5442
|
+
* When a selector/element is provided, it acts as a **scope** - layout elements
|
|
5443
|
+
* (those with data-layout or data-layout-id) are searched within that scope.
|
|
5444
|
+
*
|
|
5433
5445
|
* @example
|
|
5434
|
-
* //
|
|
5435
|
-
* const animation = await animateLayout(
|
|
5436
|
-
*
|
|
5446
|
+
* // Document-wide layout animation (all data-layout elements in document)
|
|
5447
|
+
* const animation = await animateLayout(() => {
|
|
5448
|
+
* updateDOM()
|
|
5449
|
+
* }, { duration: 0.3 })
|
|
5450
|
+
*
|
|
5451
|
+
* @example
|
|
5452
|
+
* // Scoped layout animation - finds data-layout elements within .container
|
|
5453
|
+
* const animation = await animateLayout(".container", () => {
|
|
5454
|
+
* // Toggle classes, the underline with data-layout-id will animate
|
|
5455
|
+
* oldTab.classList.remove("selected")
|
|
5456
|
+
* newTab.classList.add("selected")
|
|
5437
5457
|
* }, { duration: 0.3 })
|
|
5438
|
-
* animation.pause()
|
|
5439
5458
|
*
|
|
5440
5459
|
* @example
|
|
5441
5460
|
* // Builder pattern with enter/exit animations
|
|
5442
|
-
* const animation = await animateLayout(".cards", { duration: 0.3 })
|
|
5461
|
+
* const animation = await animateLayout(".cards-container", { duration: 0.3 })
|
|
5443
5462
|
* .enter({ opacity: [0, 1], scale: [0.8, 1] }, { duration: 0.2 })
|
|
5444
5463
|
* .exit({ opacity: 0, scale: 0.8 }, { duration: 0.15 })
|
|
5445
5464
|
* animation.time = 0 // Seek to start
|
|
5446
5465
|
*
|
|
5447
5466
|
* @example
|
|
5448
|
-
* //
|
|
5449
|
-
* const animation = await animateLayout(
|
|
5450
|
-
*
|
|
5467
|
+
* // Scope to specific element
|
|
5468
|
+
* const animation = await animateLayout(containerElement, () => {
|
|
5469
|
+
* containerElement.querySelector('.item').style.width = "500px"
|
|
5451
5470
|
* })
|
|
5452
5471
|
*/
|
|
5453
|
-
function animateLayout(
|
|
5472
|
+
function animateLayout(elementOrSelectorOrMutation, mutationOrOptions, options) {
|
|
5454
5473
|
// Check if factory is configured
|
|
5455
5474
|
if (!globalFactory) {
|
|
5456
5475
|
throw new Error("animateLayout: No layout node factory configured. " +
|
|
5457
5476
|
"Make sure to import from 'framer-motion' or call setLayoutNodeFactory() first.");
|
|
5458
5477
|
}
|
|
5459
5478
|
const factory = globalFactory;
|
|
5460
|
-
|
|
5461
|
-
//
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5479
|
+
// Parse overloaded arguments to support:
|
|
5480
|
+
// animateLayout(mutation, options) - document-wide
|
|
5481
|
+
// animateLayout(options) - document-wide
|
|
5482
|
+
// animateLayout(selector, mutation, options) - scoped
|
|
5483
|
+
// animateLayout(selector, options) - scoped
|
|
5484
|
+
let elements;
|
|
5485
|
+
let mutation;
|
|
5486
|
+
let opts;
|
|
5487
|
+
if (!elementOrSelectorOrMutation || !isElementOrSelector(elementOrSelectorOrMutation)) {
|
|
5488
|
+
// No selector provided - scope to entire document
|
|
5489
|
+
elements = Array.from(document.querySelectorAll(LAYOUT_SELECTORS));
|
|
5490
|
+
if (typeof elementOrSelectorOrMutation === "function") {
|
|
5491
|
+
// animateLayout(mutation, options)
|
|
5492
|
+
mutation = elementOrSelectorOrMutation;
|
|
5493
|
+
opts = mutationOrOptions ?? {};
|
|
5494
|
+
}
|
|
5495
|
+
else {
|
|
5496
|
+
// animateLayout(options) or animateLayout()
|
|
5497
|
+
mutation = typeof mutationOrOptions === "function" ? mutationOrOptions : undefined;
|
|
5498
|
+
opts = elementOrSelectorOrMutation ??
|
|
5499
|
+
(typeof mutationOrOptions === "object" ? mutationOrOptions : {});
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
else {
|
|
5503
|
+
// Selector provided - use as scope for finding layout elements
|
|
5504
|
+
const scopeElements = resolveElements(elementOrSelectorOrMutation);
|
|
5505
|
+
elements = [];
|
|
5506
|
+
for (const scope of scopeElements) {
|
|
5507
|
+
// Find layout elements within this scope
|
|
5508
|
+
const layoutElements = scope.querySelectorAll(LAYOUT_SELECTORS);
|
|
5509
|
+
elements.push(...Array.from(layoutElements));
|
|
5510
|
+
// Also include the scope element itself if it has layout attributes
|
|
5511
|
+
if (scope.matches(LAYOUT_SELECTORS)) {
|
|
5512
|
+
elements.push(scope);
|
|
5513
|
+
}
|
|
5514
|
+
}
|
|
5515
|
+
// Remove duplicates (in case nested scopes)
|
|
5516
|
+
elements = [...new Set(elements)];
|
|
5517
|
+
mutation = typeof mutationOrOptions === "function" ? mutationOrOptions : undefined;
|
|
5518
|
+
opts = typeof mutationOrOptions === "object"
|
|
5519
|
+
? mutationOrOptions
|
|
5520
|
+
: options ?? {};
|
|
5521
|
+
}
|
|
5466
5522
|
// Merge with default transition
|
|
5467
5523
|
const mergedOptions = {
|
|
5468
5524
|
...opts,
|
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),m=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class p{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),P=S(A),V=b(P),E=t=>(t*=2)<1?.5*P(t):.5*(2-Math.pow(2,-10*(t-1))),k=t=>1-Math.sin(Math.acos(t)),M=S(k),R=b(k),D=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const F=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:u,easeIn:D,easeInOut:C,easeOut:B,circIn:k,circInOut:R,circOut:M,backIn:P,backInOut:V,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},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],$={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=N.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&&$.value&&$.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:m,render:p,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),m.process(s),p.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:N.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<N.length;e++)a[N[e]].cancel(t)},state:s,steps:a}}const{schedule:W,cancel:Y,state:X,steps:z}=U("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let K;function H(){K=void 0}const q={now:()=>(void 0===K&&q.set(X.isProcessing||o.useManualTiming?X.timestamp:performance.now()),K),set:t=>{K=t,queueMicrotask(H)}},G={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},mt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=mt("deg"),ft=mt("%"),yt=mt("px"),gt=mt("vh"),vt=mt("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",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 Vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Pt,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 Vt(t).values}function kt(t){const{split:e,types:n}=Vt(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 Mt=t=>"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Rt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:kt,getAnimatableNone:function(t){const e=Et(t);return kt(t)(e.map(Mt))}};function Dt(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=Dt(a,i,t+1/3),o=Dt(a,i,t),r=Dt(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 Lt=(t,e,n)=>t+(e-t)*n,jt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ft=[dt,ht,Tt];function Ot(e){const n=(i=e,Ft.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=Ot(t),i=Ot(e);if(!n||!i)return Ct(t,e);const s={...n};return t=>(s.red=jt(n.red,i.red,t),s.green=jt(n.green,i.green,t),s.blue=jt(n.blue,i.blue,t),s.alpha=Lt(n.alpha,i.alpha,t),ht.transform(s))},Nt=new Set(["none","hidden"]);function $t(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ut(t,e){return n=>Lt(t,e,n)}function Wt(t){return"number"==typeof t?Ut:"string"==typeof t?Q(t)?Ct:wt.test(t)?It:zt:Array.isArray(t)?Yt:"object"==typeof t?wt.test(t)?It:Xt:Ct}function Yt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Wt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Xt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Wt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const zt=(e,n)=>{const i=Rt.createTransformer(n),s=Vt(e),o=Vt(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?$t(e,n):d(Yt(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 Kt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Lt(t,e,n);return Wt(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>W.update(e,t),stop:()=>Y(e),now:()=>X.isProcessing?X.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)})`},Gt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Gt;)e+=50,n=t.next(e);return e>=Gt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),Gt);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 me({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<pe;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 pe=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:m,isResolvedFromDuration:p}=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=me(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=m||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:p&&d||null,next:t=>{const e=b(t);if(p)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),Gt),e=qt(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},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,y=void 0===r?f:r(f);y!==f&&(p=y-h);const g=t=>-p*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,m(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||Kt,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),p=h.length,f=t=>{if(c&&t<e[0])return n[0];let i=0;if(p>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=m(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=m(0,e,i);t.push(Lt(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 Pe(t,e){return t.map(()=>e||C).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=L(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:Pe(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 ke(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 Me={decay:Te,inertia:Te,tween:Ve,keyframes:Ve,spring:xe};function Re(t){"string"==typeof t.type&&(t.type=Me[t.type])}class De{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 De{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?.())},G.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Re(t);const{type:e=Ve,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ve;a!==Ve&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Be,Kt(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:m,type:p,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,m&&(n-=m/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&&p!==Te&&(w.value=ke(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(q.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(q.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,G.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 je=t=>180*t/Math.PI,Fe=t=>{const e=je(Math.atan2(t[1],t[0]));return Ie(e)},Oe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Fe,rotateZ:Fe,skewX:t=>je(Math.atan(t[1])),skewY:t=>je(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),$e=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:Ne,scaleY:$e,scale:t=>(Ne(t)+$e(t))/2,rotateX:t=>Ie(je(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(je(Math.atan2(-t[2],t[0]))),rotateZ:Fe,rotate:Fe,skewX:t=>je(Math.atan(t[4])),skewY:t=>je(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function We(t){return t.includes("scale")?1:0}function Ye(t,e){if(!t||"none"===t)return We(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=Oe,s=e}if(!s)return We(e);const o=i[e],r=s[1].split(",").map(ze);return"function"==typeof o?o(r):r[o]}const Xe=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ye(n,e)};function ze(t){return parseFloat(t.trim())}const Ke=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Ke))(),qe=t=>t===nt||t===yt,Ge=new Set(["x","y","z"]),Ze=Ke.filter(t=>!Ge.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})=>Ye(e,"x"),y:(t,{transform:e})=>Ye(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,W.read(sn),W.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])}Le(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"),mn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,pn={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 fn(t,e){return t?"function"==typeof t?dn()?qt(t,e):"ease-out":F(t)?mn(t):Array.isArray(t)?t.map(t=>fn(t,e)||pn.easeOut):pn[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),$.value&&G.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 m=t.animate(u,d);return $.value&&m.finished.finally(()=>{G.waapi--}),m}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 De{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=ke(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(){this.isPseudoElement||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:V,circInOut:R};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(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 Ce({...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 Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Rt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Pn=new Set(["opacity","clipPath","filter","transform"]),Vn=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 Vn()&&n&&Pn.has(n)&&("transform"!==n||!c)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class kn extends De{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||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=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=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?.(ke(e,i,n)),e[0]=e[e.length-1],An(i),i.repeat=0);const m={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=!h&&En(m)?new bn({...m,element:m.motionValue.owner.current}):new Ce(m);p.finished.then(()=>this.notifyFinished()).catch(u),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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 Mn{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 Dn extends Mn{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,Ln=(t,e="")=>`${t}:${e}`;function jn(t){const e=Cn.get(t)||new Map;return Cn.set(t,e),e}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function On(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function In(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]=On(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)?In(o,n,i+1):o}function Nn(t,e){return t?.[e]??t?.default??t}const $n=new Set(["width","height","top","left","right","bottom",...Ke]),Un=t=>e=>e.test(t),Wn=[nt,yt,ft,pt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],Yn=t=>Wn.find(Un(t));function Xn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const zn=new Set(["brightness","contrast","saturate","opacity"]);function Kn(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=zn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Hn=/\b([a-z-]*)\(.*?\)/gu,qn={...Rt,getAnimatableNone:t=>{const e=t.match(Hn);return e?e.map(Kn).join(" "):t}},Gn={...nt,transform:Math.round},Zn={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:pt,skewX:pt,skewY:pt,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},_n={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius: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,backgroundPositionX:yt,backgroundPositionY:yt,...Zn,zIndex:Gn,fillOpacity:it,strokeOpacity:it,numOctaves:Gn},Jn={..._n,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:qn,WebkitFilter:qn},Qn=t=>Jn[t];function ti(t,e){let n=Qn(t);return n!==qn&&(n=Rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ei=new Set(["auto","none","0"]);class ni 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=In(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!$n.has(n)||2!==t.length)return;const[i,s]=t,o=Yn(i),r=Yn(s);if(et(i)!==et(s)&&_e[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 _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Xn(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&&!ei.has(e)&&Vt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ti(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 ii=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","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","backgroundPositionX","backgroundPositionY"]);function si(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ii.has(e)&&(t[n]=t[n]+"px")}const oi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),ri=new Set(["opacity","clipPath","filter","transform"]);function ai(t,e,n){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)}function li(t){return(e,n)=>{const i=ai(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const ci=(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?ci(i,_n[t]):i,n&&W.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&Y(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 hi(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 di=(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")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const 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)},mi=li(hi(di)),pi=hi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function fi(t){return a(t)&&"offsetHeight"in t}const yi={current:void 0};class gi{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 p);const n=this.events[t].add(e);return"change"===t?()=>{n(),W.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 yi.current&&yi.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 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 vi(t,e){return new gi(t,e)}const xi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Ti=new Set(["originX","originY","originZ"]),wi=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(fi(t)||e.get("transformBox")||wi(t,e,"transformBox",new gi("fill-box")),e.set("transform",new gi("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Ke.length;i++){const s=Ke[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${xi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):Ti.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new gi(""),()=>{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)},bi=li(hi(wi)),Si=yt.transform;const Ai=li(hi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return W.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Si(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new gi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Si(n)} ${Si(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return di(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?wi:di)(t,e,n,i)}));const{schedule:Pi,cancel:Vi}=U(queueMicrotask,!1),Ei={x:!1,y:!1};function ki(){return Ei.x||Ei.y}function Mi(t,e){const n=ai(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ri(t){return!("touch"===t.pointerType||ki())}const Di=(t,e)=>!!e&&(t===e||Di(t,e.parentElement)),Bi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Ci=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Li(t){return Ci.has(t.tagName)||!0===t.isContentEditable}const ji=new WeakSet;function Fi(t){return e=>{"Enter"===e.key&&t(e)}}function Oi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ii(t){return Bi(t)&&!ki()}const Ni=(t,e)=>t.depth-e.depth;function $i(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function Ui(t){return a(t)&&"ownerSVGElement"in t}const Wi=new WeakMap;let Yi;const Xi=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ui(i)&&"getBBox"in i?i.getBBox()[e]:i[n],zi=Xi("inline","width","offsetWidth"),Ki=Xi("block","height","offsetHeight");function Hi({target:t,borderBoxSize:e}){Wi.get(t)?.forEach(n=>{n(t,{get width(){return zi(t,e)},get height(){return Ki(t,e)}})})}function qi(t){t.forEach(Hi)}function Gi(t,e){Yi||"undefined"!=typeof ResizeObserver&&(Yi=new ResizeObserver(qi));const n=ai(t);return n.forEach(t=>{let n=Wi.get(t);n||(n=new Set,Wi.set(t,n)),n.add(e),Yi?.observe(t)}),()=>{n.forEach(t=>{const n=Wi.get(t);n?.delete(e),n?.size||Yi?.unobserve(t)})}}const Zi=new Set;let _i;function Ji(t){return Zi.add(t),_i||(_i=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Zi.forEach(e=>e(t))},window.addEventListener("resize",_i)),()=>{Zi.delete(t),Zi.size||"function"!=typeof _i||(window.removeEventListener("resize",_i),_i=void 0)}}function Qi(t,e){return"function"==typeof t?Ji(t):Gi(t,e)}function ts(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return W.preUpdate(i,!0),()=>Y(i)}function es(){const{value:t}=$;null!==t?(t.frameloop.rate.push(X.delta),t.animations.mainThread.push(G.mainThread),t.animations.waapi.push(G.waapi),t.animations.layout.push(G.layout)):Y(es)}function ns(t){return t.reduce((t,e)=>t+e,0)/t.length}function is(t,e=ns){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ss=t=>Math.round(1e3/t);function os(){$.value=null,$.addProjectionMetrics=null}function rs(){const{value:t}=$;if(!t)throw new Error("Stats are not being measured");os(),Y(es);const e={frameloop:{setup:is(t.frameloop.setup),rate:is(t.frameloop.rate),read:is(t.frameloop.read),resolveKeyframes:is(t.frameloop.resolveKeyframes),preUpdate:is(t.frameloop.preUpdate),update:is(t.frameloop.update),preRender:is(t.frameloop.preRender),render:is(t.frameloop.render),postRender:is(t.frameloop.postRender)},animations:{mainThread:is(t.animations.mainThread),waapi:is(t.animations.waapi),layout:is(t.animations.layout)},layoutProjection:{nodes:is(t.layoutProjection.nodes),calculatedTargetDeltas:is(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:is(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ss(n.min),n.max=ss(n.max),n.avg=ss(n.avg),[n.min,n.max]=[n.max,n.min],e}function as(t){return Ui(t)&&"svg"===t.tagName}function ls(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function cs(...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 us(t){const e=[];yi.current=e;const n=t();yi.current=void 0;const i=vi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>W.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Y(i)})}(e,i,t),i}const hs=t=>Boolean(t&&t.getVelocity);function ds(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(ms(t,a)),W.postRender(()=>{l(),o=new Ce({keyframes:[ps(t.get()),ps(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),hs(e)){const n=e.on("change",e=>t.set(ms(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function ms(t,e){return e?t+e:t}function ps(t){return"number"==typeof t?t:parseFloat(t)}const fs=[...Wn,wt,Rt],ys=t=>fs.find(Un(t));function gs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let vs={},xs=null;const Ts=(t,e)=>{vs[t]=e},ws=()=>{xs||(xs=document.createElement("style"),xs.id="motion-view");let t="";for(const e in vs){const n=vs[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),vs={}},bs=()=>{xs&&xs.parentElement&&xs.parentElement.removeChild(xs)};function Ss(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function As(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Ps(){return document.getAnimations().filter(As)}const Vs=["layout","enter","exit","new","old"];function Es(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Mn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Ts(":root",{"view-transition-name":"none"}),Ts("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ws();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{bs()}),new Promise(t=>{s.ready.then(()=>{const e=Ps(),s=[];n.forEach((t,e)=>{for(const n of Vs){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Nn(i,t),...Nn(r,t)},l=gs(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=Ss(o);if(!r)continue;const a=n.get(r.layer);if(a)ks(a,"enter")&&ks(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Nn(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 Mn(s))})})}function ks(t,e){return t?.[e]?.keyframes.opacity}let Ms=[],Rs=null;function Ds(){Rs=null;const[t]=Ms;var e;t&&(n(Ms,e=t),Rs=e,Es(e).then(t=>{e.notifyReady(t),t.finished.finally(Ds)}))}function Bs(){for(let t=Ms.length-1;t>=0;t--){const e=Ms[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ms.slice(0,t+1).map(t=>t.update),i=Ms.slice(t+1);e.update=()=>{n.forEach(t=>t())},Ms=[e,...i];break}}Rs&&"immediate"!==Ms[0]?.options.interrupt||Ds()}class Cs{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,Ms.push(n),Pi.render(Bs)}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 Ls=W,js=N.reduce((t,e)=>(t[e]=t=>Y(t),t),{}),Fs=["[data-layout]","[data-layout-id]","[data-animate-layout]"];function Os(t,e){const n=Fs.join(", "),i=new Map;t.querySelectorAll(n).forEach(t=>{i.set(t,t.getBoundingClientRect())}),e();const s=new Set(t.querySelectorAll(n)),o=[];s.forEach(t=>{!i.has(t)&&t instanceof HTMLElement&&o.push(t)});const r=[];return i.forEach((t,e)=>{!s.has(e)&&e instanceof HTMLElement&&r.push({element:e,bounds:t})}),{addedElements:o,removedElements:r}}function Is(t){if(0===t.length)return document.body;if(1===t.length)return t[0].parentElement??document.body;const e=new Set;let n=t[0];for(;n;)e.add(n),n=n.parentElement;for(let i=1;i<t.length;i++)for(n=t[i];n;){if(e.has(n)){if(t.every(t=>n===t||n?.contains(t)))return n}n=n.parentElement}return document.body}function Ns(t,e,n){const i=t.cloneNode(!0);return i.style.position="fixed",i.style.top=`${e.top}px`,i.style.left=`${e.left}px`,i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.margin="0",i.style.pointerEvents="none",i.style.zIndex="9999",i.setAttribute("data-layout-exiting","true"),n.appendChild(i),{clone:i,cleanup:()=>{i.parentNode&&i.parentNode.removeChild(i)}}}const $s={duration:.3,ease:[.4,0,.2,1]};let Us=null;function Ws(t){Us=t}const Ys=new WeakMap;function Xs(t,e,n,i){let s=Ys.get(t);return s||(s=i.createProjectionNode(t,e,n),Ys.set(t,s)),s}function zs(t,e,n){const{keyframes:i,transition:s}=e,o=s?.duration??n,r=Object.entries(i),a={},l={};for(const[t,e]of r)Array.isArray(e)?(a[t]=e[0],l[t]=e[e.length-1]):l[t]=e;for(const[e,n]of Object.entries(a))e in t.style&&(t.style[e]=n);const c=t.animate([a,l],{duration:1e3*o,easing:"string"==typeof s?.ease?s.ease:"ease-out",fill:"forwards"});return c.finished&&c.finished.then(()=>{c.commitStyles(),c.cancel()}),new Bn(c)}function Ks(t,e,n,i,s){const{keyframes:o,transition:r}=n,a=r?.duration??i,{clone:l,cleanup:c}=Ns(t,e,s),u=l.animate([{},o],{duration:1e3*a,easing:"string"==typeof r?.ease?r.ease:"ease-out",fill:"forwards"});return u.finished.then(c),new Bn(u)}async function Hs(t,e,n,i,s){const o=[];if(0===t.length&&!e)return new Mn(o);t.forEach(t=>t.willUpdate());const r=Is(t.map(t=>t.instance).filter(t=>void 0!==t));let a=[],l=[];if(e){const t=Os(r,e);a=t.addedElements,l=t.removedElements}const c=t[0]?.root;c&&c.didUpdate(),await new Promise(t=>{W.postRender(()=>t())});for(const e of t)e.currentAnimation&&o.push(e.currentAnimation);if(i&&a.length>0)for(const t of a){const e=zs(t,i,n.duration??.3);o.push(e)}if(s&&l.length>0)for(const{element:t,bounds:e}of l){const i=Ks(t,e,s,n.duration??.3,r);o.push(i)}return new Mn(o)}let qs=class{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(),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:i}=t.options;!1===i&&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 Gs=new Map;function Zs(t,e,n){Gs.has(t)||Gs.set(t,new qs);const i=Gs.get(t);i.add(e),i.promote(e,n)}function _s(t,e){const n=Gs.get(t);n&&(n.remove(e),0===n.members.length&&Gs.delete(t))}function Js(t){const{ProjectionNode:e,VisualElement:n}=t;return{createProjectionNode(t,i,s={}){const o={},r=s.layoutId??t.dataset?.layoutId??void 0,a=new n({visualState:{latestValues:o,renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},props:{}}),l=new e(o,i);if(l.setOptions({scheduleRender:()=>{a.scheduleRender&&a.scheduleRender()},visualElement:a,layout:!0,layoutId:r,transition:s.transition??{duration:s.duration??.3,ease:s.ease}}),l.mount(t),a.projection=l,r){Zs(r,l);const t=l.unmount?.bind(l);l.unmount=()=>{_s(r,l),t&&t()}}return l.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom&&(l.resumingFrom.resumingFrom=void 0)),e&&(l.setAnimationOrigin(t),l.startAnimation(s.transition??{duration:s.duration??.3,ease:s.ease}))}),l},createVisualElement:(t,e={})=>new n({visualState:{latestValues:{},renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},props:{}})}}function Qs(t){Ws(Js(t))}const to=["TopLeft","TopRight","BottomLeft","BottomRight"],eo=to.length,no=t=>"string"==typeof t?parseFloat(t):t,io=t=>"number"==typeof t||yt.test(t);function so(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const oo=ao(0,.5,M),ro=ao(.5,.95,u);function ao(t,e,n){return i=>i<t?0:i>e?1:n(m(t,e,i))}function lo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function co(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 uo(t,e){t.min=e.min,t.max=e.max}function ho(t){return void 0===t||1===t}function mo({scale:t,scaleX:e,scaleY:n}){return!ho(t)||!ho(e)||!ho(n)}function po(t){return mo(t)||fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fo(t){return yo(t.x)||yo(t.y)}function yo(t){return t&&"0%"!==t}function go(t,e,n){return n+e*(t-n)}function vo(t,e,n,i,s){return void 0!==s&&(t=go(t,s,i)),go(t,n,i)+e}function xo(t,e=0,n=1,i,s){t.min=vo(t.min,e,n,i,s),t.max=vo(t.max,e,n,i,s)}function To(t,{x:e,y:n}){xo(t.x,e.translate,e.scale,e.originPoint),xo(t.y,n.translate,n.scale,n.originPoint)}const wo=.999999999999,bo=1.0000000000001;function So(t,e){t.min=t.min+e,t.max=t.max+e}function Ao(t,e,n,i,s=.5){xo(t,e,n,Lt(t.min,t.max,s),i)}function Po(t,e){Ao(t.x,e.x,e.scaleX,e.scale,e.originX),Ao(t.y,e.y,e.scaleY,e.scale,e.originY)}function Vo(t){return t.max-t.min}function Eo(t,e,n,i=.5){t.origin=i,t.originPoint=Lt(e.min,e.max,t.origin),t.scale=Vo(n)/Vo(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 ko(t,e,n){t.min=n.min+e.min,t.max=t.min+Vo(e)}function Mo(t,e,n){t.min=e.min-n.min,t.max=t.min+Vo(e)}function Ro(t,e,n,i,s){return t=go(t-=e,1/n,i),void 0!==s&&(t=go(t,1/s,i)),t}function Do(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.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=Ro(t.min,e,n,a,s),t.max=Ro(t.max,e,n,a,s)}function Bo(t,e,[n,i,s],o,r){Do(t,e[n],e[i],e[s],e.scale,o,r)}const Co=["x","scaleX","originX"],Lo=["y","scaleY","originY"];const jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fo=()=>({min:0,max:0});function Oo(t){return 0===t.translate&&1===t.scale}function Io(t,e){return t.min===e.min&&t.max===e.max}function No(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function $o(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Uo={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)}%`}},Wo={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)}},Yo={borderRadius:{...Uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Uo,borderTopRightRadius:Uo,borderBottomLeftRadius:Uo,borderBottomRightRadius:Uo,boxShadow:Wo};function Xo(t,e){return lo(co(t.getBoundingClientRect(),e))}function zo(t){return"object"==typeof t&&!Array.isArray(t)}function Ko(t,e,n,i){return"string"==typeof t&&zo(e)?ai(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ho(t,e,n){return t*(e+1)}function qo(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 Go(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:j(i,n)})}function Zo(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function _o(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Jo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Qo(t,e){return e[t]||(e[t]=[]),e[t]}function tr(t){return Array.isArray(t)?t:[t]}function er(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const nr=t=>"number"==typeof t,ir=t=>t.every(nr),sr=new WeakMap;function or(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function rr(t,e,n,i){if("function"==typeof e){const[s,o]=or(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]=or(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function ar(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,vi(n))}function lr(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function cr(t,e){const n=function(t,e){const n=t.getProps();return rr(n,e,n.custom,t)}(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ar(t,e,lr(o[e]))}}function ur(t,e){const n=t.getValue("willChange");if(i=n,Boolean(hs(i)&&i.add))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}const hr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dr="data-"+hr("framerAppearId");function mr(t){return t.props[dr]}const pr=t=>null!==t;const fr={type:"spring",stiffness:500,damping:25,restSpeed:10},yr={type:"keyframes",duration:.8},gr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vr=(t,{keyframes:e})=>e.length>2?yr:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:fr:gr;const xr=(t,e,n,i={},s,r)=>a=>{const l=Nn(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};(function({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})(l)||Object.assign(h,vr(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)&&(d=!0,An(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(pr),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(h.keyframes,l);if(void 0!==t)return void W.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ce(h):new kn(h)};function Tr({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function wr(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=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||c&&Tr(c,e))continue;const r={delay:n,...Nn(o||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=mr(t);if(n){const t=window.MotionHandoffAnimation(n,e,W);null!==t&&(r.startTime=t,h=!0)}}ur(t,e),i.start(xr(e,i,s,t.shouldReduceMotion&&$n.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{W.update(()=>{r&&cr(t,r)})}),l}function br(t){return void 0===t||1===t}function Sr({scale:t,scaleX:e,scaleY:n}){return!br(t)||!br(e)||!br(n)}function Ar(t){return Sr(t)||Pr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pr(t){return Vr(t.x)||Vr(t.y)}function Vr(t){return t&&"0%"!==t}function Er(t,e,n){return n+e*(t-n)}function kr(t,e,n,i,s){return void 0!==s&&(t=Er(t,s,i)),Er(t,n,i)+e}function Mr(t,e=0,n=1,i,s){t.min=kr(t.min,e,n,i,s),t.max=kr(t.max,e,n,i,s)}function Rr(t,{x:e,y:n}){Mr(t.x,e.translate,e.scale,e.originPoint),Mr(t.y,n.translate,n.scale,n.originPoint)}const Dr=.999999999999,Br=1.0000000000001;function Cr(t,e){t.min=t.min+e,t.max=t.max+e}function Lr(t,e,n,i,s=.5){Mr(t,e,n,Lt(t.min,t.max,s),i)}function jr(t,e){Lr(t.x,e.x,e.scaleX,e.scale,e.originX),Lr(t.y,e.y,e.scaleY,e.scale,e.originY)}const Fr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Or={};for(const t in Fr)Or[t]={isEnabled:e=>Fr[t].some(t=>!!e[t])};const Ir=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Nr="undefined"!=typeof window,$r={current:null},Ur={current:!1};const Wr=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Yr(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Wr.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const Xr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=q.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,W.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Yr(e),this.isVariantNode=function(t){return Boolean(Yr(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&hs(e)&&e.set(a[t])}}mount(t){this.current=t,sr.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:(Ur.current||function(){if(Ur.current=!0,Nr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$r.current=t.matches;t.addEventListener("change",e),e()}else $r.current=!1}(),this.shouldReduceMotion=$r.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(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=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;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 Or){const e=Or[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<Xr.length;e++){const n=Xr[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=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(hs(s))t.addValue(i,s);else if(hs(o))t.addValue(i,vi(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,vi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}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=vi(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):!ys(n)&&Rt.test(e)&&(n=ti(t,e)),this.setBaseTarget(t,hs(n)?n.get():n)),hs(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=rr(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||hs(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 p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Pi.render(this.render)}}class Kr extends zr{constructor(){super(...arguments),this.KeyframeResolver=ni}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hs(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const Hr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qr=Ke.length;function Gr(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=ci(n,_n[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<qr;o++){const r=Ke[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=ci(a,_n[r]);l||(s=!1,i+=`${Hr[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(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 Zr(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 _r(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Jr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${_r(t,e.target.x)}% ${_r(t,e.target.y)}%`}},Qr={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)}},ta={borderRadius:{...Jr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jr,borderTopRightRadius:Jr,borderBottomLeftRadius:Jr,borderBottomRightRadius:Jr,boxShadow:Qr};function ea(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ta[t]||"opacity"===t)}function na(t,e,n){const{style:i}=t,s={};for(const o in i)(hs(i[o])||e.style&&hs(e.style[o])||ea(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class ia extends Kr{constructor(){super(...arguments),this.type="html",this.renderInstance=Zr}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?We(e):Xe(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 function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(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}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Gr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return na(t,e,n)}}class sa extends zr{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 oa={offset:"stroke-dashoffset",array:"stroke-dasharray"},ra={offset:"strokeDashoffset",array:"strokeDasharray"};const aa=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function la(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Gr(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 aa)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&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?oa:ra;t[o.offset]=yt.transform(-i);const r=yt.transform(e),a=yt.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const ca=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"]);class ua extends Kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ir}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=Qn(e);return t&&t.default||0}return e=ca.has(e)?e:hr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const i=na(t,e,n);for(const n in t)(hs(t[n])||hs(e[n]))&&(i[-1!==Ke.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return i}(t,e,n)}build(t,e,n){la(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Zr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(ca.has(n)?n:hr(n),e.attrs[n])}(t,e,0,i)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}function ha(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ui(t)&&!as(t)?new ua(e):new ia(e);n.mount(t),sr.set(t,n)}function da(t){const e=new sa({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),sr.set(t,e)}function ma(t,e,n){const i=hs(t)?t:vi(t);return i.start(xr("",i,e,n)),i.animation}function pa(e,n,i,s){const o=[];if(function(t,e){return hs(t)||"number"==typeof t||"string"==typeof t&&!zo(e)}(e,n))o.push(ma(e,zo(n)&&n.default||n,i&&i.default||i));else{const r=Ko(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){const s=r[e];t.invariant(null!==s,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const l=s instanceof Element?ha:da;sr.has(s)||l(s);const c=sr.get(s),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(e,a)),o.push(...wr(c,{...n,transition:u},{}))}}return o}function fa(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,p=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,qo(d,a.at,h,u));continue}let[m,y,g={}]=a;void 0!==g.at&&(d=qo(d,g.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=tr(e),{delay:u=0,times:h=Se(c),type:m="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,P=gn(m)?m:o?.[m||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&ir(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...T};void 0!==b&&(e.duration=f(b));const n=_t(e,t,P);w=n.ease,b=n.duration}b??(b=r);const V=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=Ho(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":j(i,s-1))}Zo(h,y)}const k=V+b;Go(s,c,w,h,V,k),v=Math.max(S+b,v),p=Math.max(k,p)};if(hs(m))x(y,g,Qo("default",Jo(m,l)));else{const t=Ko(m,y,s,c),e=t.length;for(let n=0;n<e;n++){const i=Jo(t[n],l);for(const t in y)x(y[t],er(g,t),Qo(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(_o);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(m(0,p,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,u.transition[s]={...n,duration:p,ease:c,times:l,...i}}}),a}(e,n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...pa(n,t,e))}),s}function ya(t){return function(e,i,s){let o,r=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))r=fa(e,i,t);else{const{onComplete:n,...a}=s||{};"function"==typeof n&&(o=n),r=pa(e,i,a,t)}var a;const l=new Dn(r);return o&&l.finished.then(o),t&&(t.animations.push(l),l.finished.then(()=>{n(t.animations,l)})),l}}const ga=ya();const va=e=>function(n,i,s){return new Dn(function(e,n,i,s){const o=ai(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={...Nn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=jn(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]=$i(i,s)),Le(e),si(e,s),!o&&e.length<2&&e.unshift($i(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))},xa=va(),Ta={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function wa(t,e,n,i){const s=n[e],{length:o,position:r}=Ta[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=m(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const ba={start:0,center:.5,end:1};function Sa(t,e,n=0){let i=0;if(t in ba&&(t=ba[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 Aa=[0,0];function Pa(t,e,n,i){let s=Array.isArray(t)?t:Aa,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,ba[t]?t:"0"]),o=Sa(s[0],n,i),r=Sa(s[1],e),o-r}const Va={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ea={x:0,y:0};function ka(t,e,n){const{offset:s=Va.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(fi(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):Ea,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=Pa(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 Ma(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){wa(t,"x",e,n),wa(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&ka(t,n,i)},notify:()=>e(n)}}const Ra=new WeakMap,Da=new WeakMap,Ba=new WeakMap,Ca=t=>t===document.scrollingElement?window:t;function La(t,{container:e=document.scrollingElement,...n}={}){if(!e)return u;let i=Ba.get(e);i||(i=new Set,Ba.set(e,i));const s=Ma(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!Ra.has(e)){const t=()=>{for(const t of i)t.measure(X.timestamp);W.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>W.read(t);Ra.set(e,s);const o=Ca(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&Da.set(e,Qi(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=Ra.get(e);return W.read(o,!1,!0),()=>{Y(o);const t=Ba.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=Ra.get(e);Ra.delete(e),n&&(Ca(e).removeEventListener("scroll",n),Da.get(e)?.(),window.removeEventListener("resize",n))}}const ja=new Map;function Fa({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=ja.get(e)??new Map;ja.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=La(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Oa={some:0,all:1};const Ia=(t,e)=>t.depth-e.depth;class Na{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(Ia),this.isDirty=!1,this.children.forEach(t)}}function $a(t,e){const n=q.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Y(i),t(o-e))};return W.setup(i,!0),()=>Y(i)}function Ua(t){return hs(t)?t.get():t}const Wa=["TopLeft","TopRight","BottomLeft","BottomRight"],Ya=Wa.length,Xa=t=>"string"==typeof t?parseFloat(t):t,za=t=>"number"==typeof t||yt.test(t);function Ka(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ha=Ga(0,.5,M),qa=Ga(.5,.95,u);function Ga(t,e,n){return i=>i<t?0:i>e?1:n(m(t,e,i))}function Za(t,e){t.min=e.min,t.max=e.max}function _a(t,e){Za(t.x,e.x),Za(t.y,e.y)}function Ja(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Qa(t){return t.max-t.min}function tl(t,e,n,i=.5){t.origin=i,t.originPoint=Lt(e.min,e.max,t.origin),t.scale=Qa(n)/Qa(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 el(t,e,n,i){tl(t.x,e.x,n.x,i?i.originX:void 0),tl(t.y,e.y,n.y,i?i.originY:void 0)}function nl(t,e,n){t.min=n.min+e.min,t.max=t.min+Qa(e)}function il(t,e,n){t.min=e.min-n.min,t.max=t.min+Qa(e)}function sl(t,e,n){il(t.x,e.x,n.x),il(t.y,e.y,n.y)}function ol(t,e,n,i,s){return t=Er(t-=e,1/n,i),void 0!==s&&(t=Er(t,1/s,i)),t}function rl(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){ft.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=ol(t.min,e,n,a,s),t.max=ol(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const al=["x","scaleX","originX"],ll=["y","scaleY","originY"];function cl(t,e,n,i){rl(t.x,e,al,n?n.x:void 0,i?i.x:void 0),rl(t.y,e,ll,n?n.y:void 0,i?i.y:void 0)}function ul(t){return 0===t.translate&&1===t.scale}function hl(t){return ul(t.x)&&ul(t.y)}function dl(t,e){return t.min===e.min&&t.max===e.max}function ml(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function pl(t,e){return ml(t.x,e.x)&&ml(t.y,e.y)}function fl(t){return Qa(t.x)/Qa(t.y)}function yl(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class gl{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(),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:i}=t.options;!1===i&&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)}}function vl(t){return[t("x"),t("y")]}const xl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Tl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wl=["","X","Y","Z"];let bl=0;function Sl(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Al(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=mr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Al(i)}function Pl({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=bl++,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,$.value&&(Tl.nodes=Tl.calculatedTargetDeltas=Tl.calculatedProjections=0),this.nodes.forEach(kl),this.nodes.forEach(jl),this.nodes.forEach(Fl),this.nodes.forEach(Ml),$.addProjectionMetrics&&$.addProjectionMetrics(Tl)},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 Na)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),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=Ui(e)&&!as(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;W.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=$a(s,250),xl.hasAnimatedSinceResize&&(xl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ll)))})}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()||Wl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!pl(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={...Nn(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||Ll(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(),Y(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(Ol),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&&Al(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(Dl);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Bl);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cl),this.nodes.forEach(Vl),this.nodes.forEach(El)):this.nodes.forEach(Bl),this.clearAllSnapshots();const t=q.now();X.delta=i(0,1e3/60,t-X.timestamp),X.timestamp=t,X.isProcessing=!0,z.update.process(X),z.preRender.process(X),z.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rl),this.sharedNodes.forEach(Il)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Qa(this.snapshot.measuredBox.x)||Qa(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&&!hl(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Ar(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)),zl((i=n).x),zl(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(Hl))){const{scroll:t}=this.root;t&&(Cr(e.x,t.offset.x),Cr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(_a(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&&_a(e,t),Cr(e.x,s.offset.x),Cr(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};_a(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&&jr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Ar(i.latestValues)&&jr(n,i.latestValues)}return Ar(this.latestValues)&&jr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};_a(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Ar(n.latestValues))continue;Sr(n.latestValues)&&n.updateSnapshot();const i=Ir();_a(i,n.measurePageBox()),cl(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Ar(this.latestValues)&&cl(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!==X.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=X.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,nl(r.x,a.x,l.x),nl(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):_a(this.target,this.layout.layoutBox),Rr(this.target,this.targetDelta)):_a(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),$.value&&Tl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Sr(this.parent.latestValues)&&!Pr(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}},sl(this.relativeTargetOrigin,e,n),_a(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===X.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;_a(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(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&&jr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Rr(t,r)),i&&Ar(o.latestValues)&&jr(t,o.latestValues))}e.x<Br&&e.x>Dr&&(e.x=1),e.y<Br&&e.y>Dr&&(e.y=1)}(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?(Ja(this.prevProjectionDelta.x,this.projectionDelta.x),Ja(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),el(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&yl(this.projectionDelta.x,this.prevProjectionDelta.x)&&yl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),$.value&&Tl.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(Ul));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,y;Nl(o.x,t.x,n),Nl(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sl(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,y=n,$l(m.x,p.x,f.x,y),$l(m.y,p.y,f.y,y),h&&(l=this.relativeTarget,d=h,dl(l.x,d.x)&&dl(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),_a(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Lt(0,n.opacity??1,Ha(i)),t.opacityExit=Lt(e.opacity??1,0,qa(i))):o&&(t.opacity=Lt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Ya;s++){const o=`border${Wa[s]}Radius`;let r=Ka(e,o),a=Ka(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||za(r)===za(a)?(t[o]=Math.max(Lt(Xa(r),Xa(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Lt(e.rotate||0,n.rotate||0,i))}(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&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{xl.hasAnimatedSinceResize=!0,G.layout++,this.motionValue||(this.motionValue=vi(0)),this.currentAnimation=ma(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{G.layout--},onComplete:()=>{G.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&&Kl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Qa(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Qa(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}_a(e,n),jr(e,s),el(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new gl);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&&Sl("z",t,i,this.animationValues);for(let e=0;e<wl.length;e++)Sl(`rotate${wl[e]}`,t,i,this.animationValues),Sl(`skew${wl[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=Ua(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=Ua(e?.pointerEvents)||""),void(this.hasProjected&&!Ar(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(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"}(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 ta){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=ta[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?Ua(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Dl),this.root.sharedNodes.clear()}}}function Vl(t){t.updateLayout()}function El(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?vl(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Qa(i);i.min=n[t].min,i.max=i.min+s}):Kl(s,e.layoutBox,n)&&vl(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Qa(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}};el(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?el(a,t.applyTransform(i,!0),e.measuredBox):el(a,n,e.layoutBox);const l=!hl(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}};sl(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};sl(a,n,o.layoutBox),pl(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 kl(t){$.value&&Tl.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 Ml(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Rl(t){t.clearSnapshot()}function Dl(t){t.clearMeasurements()}function Bl(t){t.isLayoutDirty=!1}function Cl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ll(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function jl(t){t.resolveTargetDelta()}function Fl(t){t.calcProjection()}function Ol(t){t.resetSkewAndRotation()}function Il(t){t.removeLeadSnapshot()}function Nl(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 $l(t,e,n,i){t.min=Lt(e.min,n.min,i),t.max=Lt(e.max,n.max,i)}function Ul(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Wl={duration:.45,ease:[.4,0,.1,1]},Yl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Xl=Yl("applewebkit/")&&!Yl("chrome/")?Math.round:u;function zl(t){t.min=Xl(t.min),t.max=Xl(t.max)}function Kl(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=fl(e),s=fl(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Hl(t){return t!==t.root&&t.scroll?.wasRoot}const ql=Pl({attachResizeListener:(t,e)=>function(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gl={current:void 0},Zl=Pl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Gl.current){const t=new ql({});t.mount(window),t.setOptions({layoutScroll:!0}),Gl.current=t}return Gl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});class _l extends ia{constructor(t){super({parent:void 0,props:t.props,presenceContext:null,reducedMotionConfig:void 0,blockInitialAnimation:!1,visualState:t.visualState},{})}}const Jl=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=ni,t.FlatTree=class{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(Ni),this.isDirty=!1,this.children.forEach(t)}},t.GroupAnimation=Mn,t.GroupAnimationWithThen=Dn,t.JSAnimation=Ce,t.KeyframeResolver=rn,t.MotionGlobalConfig=o,t.MotionValue=gi,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=qs,t.SubscriptionManager=p,t.ViewTransitionBuilder=Cs,t.acceleratedValues=ri,t.activeAnimations=G,t.addAttrValue=di,t.addScaleCorrector=function(t){for(const e in t)Yo[e]=t[e],_(e)&&(Yo[e].isCSSVariable=!0)},t.addStyleValue=wi,t.addUniqueItem=e,t.alpha=it,t.analyseComplexValue=Vt,t.animate=ga,t.animateMini=xa,t.animateValue=function(t){return new Ce(t)},t.animateView=function(t,e={}){return new Cs(t,e)},t.animationMapKey=Ln,t.anticipate=E,t.applyAxisDelta=xo,t.applyBoxDelta=To,t.applyGeneratorOptions=vn,t.applyPointDelta=vo,t.applyPxDefaults=si,t.applyTreeDeltas=function(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&&Po(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,To(t,r)),i&&po(o.latestValues)&&Po(t,o.latestValues))}e.x<bo&&e.x>wo&&(e.x=1),e.y<bo&&e.y>wo&&(e.y=1)},t.aspectRatio=function(t){return Vo(t.x)/Vo(t.y)},t.attachSpring=ds,t.attrEffect=mi,t.axisDeltaEquals=function(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint},t.axisEquals=Io,t.axisEqualsRounded=No,t.backIn=P,t.backInOut=V,t.backOut=A,t.boxEquals=function(t,e){return Io(t.x,e.x)&&Io(t.y,e.y)},t.boxEqualsRounded=function(t,e){return No(t.x,e.x)&&No(t.y,e.y)},t.buildProjectionTransform=function(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"},t.calcAxisDelta=Eo,t.calcBoxDelta=function(t,e,n,i){Eo(t.x,e.x,n.x,i?i.originX:void 0),Eo(t.y,e.y,n.y,i?i.originY:void 0)},t.calcGeneratorDuration=Zt,t.calcLength=Vo,t.calcRelativeAxis=ko,t.calcRelativeAxisPosition=Mo,t.calcRelativeBox=function(t,e,n){ko(t.x,e.x,n.x),ko(t.y,e.y,n.y)},t.calcRelativePosition=function(t,e,n){Mo(t.x,e.x,n.x),Mo(t.y,e.y,n.y)},t.cancelFrame=Y,t.cancelMicrotask=Vi,t.cancelSync=js,t.circIn=k,t.circInOut=R,t.circOut=M,t.clamp=i,t.clearSharedLayoutRegistry=function(){Gs.clear()},t.collectMotionValues=yi,t.color=wt,t.compareByDepth=Ni,t.complex=Rt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=lo,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=function(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin},t.copyAxisInto=uo,t.copyBoxInto=function(t,e){uo(t.x,e.x),uo(t.y,e.y)},t.correctBorderRadius=Uo,t.correctBoxShadow=Wo,t.createAxis=Fo,t.createAxisDelta=jo,t.createBox=()=>({x:{min:0,max:0},y:{min:0,max:0}}),t.createDelta=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),t.createGeneratorEasing=_t,t.createLayoutNodeFactory=Js,t.createRenderBatcher=U,t.createScopedAnimate=ya,t.cubicBezier=w,t.cubicBezierAsString=mn,t.defaultEasing=Pe,t.defaultOffset=Se,t.defaultTransformValue=We,t.defaultValueTypes=Jn,t.degrees=pt,t.delay=function(t,e){return $a(t,f(e))},t.delayInSeconds=function(t,e){return function(t,e){const n=q.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Y(i),t(o-e))};return W.setup(i,!0),()=>Y(i)}(t,f(e))},t.dimensionValueTypes=Wn,t.distance=Jl,t.distance2D=function(t,e){const n=Jl(t.x,e.x),i=Jl(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=function(t){return[t("x"),t("y")]},t.easeIn=D,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=Le,t.findCommonAncestor=Is,t.findDimensionValueType=Yn,t.findValueType=ys,t.flushKeyframeResolvers=on,t.frame=W,t.frameData=X,t.frameSteps=z,t.generateLinearEasing=qt,t.getAnimatableNone=ti,t.getAnimationMap=jn,t.getComputedStyle=$i,t.getDefaultValueType=Qn,t.getEasingForSegment=j,t.getLayoutNodeFactory=function(){return Us},t.getMixer=Wt,t.getOriginIndex=ls,t.getSharedLayoutLead=function(t){const e=Gs.get(t);return e?.lead},t.getSharedLayoutStack=function(t){return Gs.get(t)},t.getValueAsType=ci,t.getValueTransition=Nn,t.getVariableValue=In,t.getViewAnimationLayerInfo=Ss,t.getViewAnimations=Ps,t.globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1},t.has2DTranslate=fo,t.hasScale=mo,t.hasSharedLayoutNodes=function(t){const e=Gs.get(t);return void 0!==e&&e.members.length>0},t.hasTransform=po,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=Mi(t,n),r=t=>{if(!Ri(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ri(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o},t.hsla=Tt,t.hslaToRgba=Bt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=ai(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:Oa[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initLayoutSystem=Qs,t.initVanillaLayout=function(){Qs({ProjectionNode:Zl,VisualElement:_l})},t.interpolate=we,t.invisibleValues=Nt,t.isBezierDefinition=F,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDeltaZero=function(t){return Oo(t.x)&&Oo(t.y)},t.isDragActive=ki,t.isDragging=Ei,t.isEasingArray=L,t.isElementKeyboardAccessible=Li,t.isGenerator=gn,t.isHTMLElement=fi,t.isMotionValue=hs,t.isNear=function(t,e,n){return Math.abs(t-e)<=n},t.isNodeOrChild=Di,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=Bi,t.isSVGElement=Ui,t.isSVGSVGElement=as,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in pn||dn())||F(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=cs(e,n,i);return us(()=>s(t.get()))},t.maxGeneratorDuration=Gt,t.measurePageBox=function(t,e,n){const i=Xo(t,n),{scroll:s}=e;return s&&(So(i.x,s.offset.x),So(i.y,s.offset.y)),i},t.measureViewportBox=Xo,t.memo=c,t.microtask=Pi,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Kt,t.mixArray=Yt,t.mixColor=It,t.mixComplex=zt,t.mixImmediate=Ct,t.mixLinearColor=jt,t.mixNumber=Lt,t.mixObject=Xt,t.mixValues=function(t,e,n,i,s,o){s?(t.opacity=Lt(0,n.opacity??1,oo(i)),t.opacityExit=Lt(e.opacity??1,0,ro(i))):o&&(t.opacity=Lt(e.opacity??1,n.opacity??1,i));for(let s=0;s<eo;s++){const o=`border${to[s]}Radius`;let r=so(e,o),a=so(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||io(r)===io(a)?(t[o]=Math.max(Lt(no(r),no(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Lt(e.rotate||0,n.rotate||0,i))},t.mixVisibility=$t,t.motionValue=vi,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.noop=u,t.notifyExitAnimationComplete=function(t){const e=Gs.get(t);e&&e.exitAnimationComplete()},t.number=nt,t.numberValueTypes=_n,t.observeMutation=Os,t.observeTimeline=ts,t.parseCSSVariable=On,t.parseValueFromTransform=Ye,t.percent=ft,t.pipe=d,t.pixelsToPercent=$o,t.positionalKeys=$n,t.preserveElementForExit=Ns,t.press=function(t,e,n={}){const[i,s,o]=Mi(t,n),r=t=>{const i=t.currentTarget;if(!Ii(t))return;ji.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ji.has(i)&&ji.delete(i),Ii(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Di(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),fi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Fi(()=>{if(ji.has(n))return;Oi(n,"down");const t=Fi(()=>{Oi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Oi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Li(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=m,t.progressPercentage=xt,t.propEffect=pi,t.px=yt,t.readTransformValue=Xe,t.recordStats=function(){if($.value)throw os(),new Error("Stats are already being measured");const t=$;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)},W.postRender(es,!0),rs},t.registerSharedLayoutNode=Zs,t.removeAxisDelta=Do,t.removeAxisTransforms=Bo,t.removeBoxTransforms=function(t,e,n,i){Bo(t.x,e,Co,n?n.x:void 0,i?i.x:void 0),Bo(t.y,e,Lo,n?n.y:void 0,i?i.y:void 0)},t.removeItem=n,t.removePointDelta=Ro,t.resize=Qi,t.resolveElements=ai,t.reverseEasing=S,t.rgbUnit=ut,t.rgba=ht,t.scale=st,t.scaleCorrectors=Yo,t.scalePoint=go,t.scheduleSharedLayoutRender=function(t){const e=Gs.get(t);e&&e.scheduleRender()},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)?La(n=>{t(n[e.axis].progress,n)},e):ts(t,Fa(e))}(t,s):function(t,e){const n=Fa(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),ts(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=La,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?Ei[t]?null:(Ei[t]=!0,()=>{Ei[t]=!1}):Ei.x||Ei.y?null:(Ei.x=Ei.y=!0,()=>{Ei.x=Ei.y=!1})},t.setLayoutNodeFactory=Ws,t.setStyle=ln,t.spring=xe,t.springValue=function(t,e){const n=vi(hs(t)?t.get():t);return ds(n,t,e),n},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=$,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=bi,t.supportedWaapiEasing=pn,t.supportsBrowserAnimation=En,t.supportsFlags=un,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=oi,t.supportsScrollTimeline=cn,t.svgEffect=Ai,t.sync=Ls,t.testValueType=Un,t.time=q,t.transform=cs,t.transformAxis=Ao,t.transformBox=Po,t.transformBoxPoints=co,t.transformPropOrder=Ke,t.transformProps=He,t.transformValue=us,t.transformValueTypes=Zn,t.translateAxis=So,t.unregisterSharedLayoutNode=_s,t.unstable_animateLayout=function(t,e,n){if(!Us)throw new Error("animateLayout: No layout node factory configured. Make sure to import from 'framer-motion' or call setLayoutNodeFactory() first.");const i=Us,s=ai(t),o="function"==typeof e?e:void 0,r="object"==typeof e?e:n??{},a={...r,transition:{...$s,...r.transition,duration:r.duration??r.transition?.duration??.3,ease:r.ease??r.transition?.ease}},l=function(t,e,n){const i=[...t].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),s=[],o=new Map;for(const t of i){if(!(t instanceof HTMLElement))continue;let i,r=t.parentElement;for(;r;){const t=o.get(r);if(t){i=t;break}r=r.parentElement}const a=Xs(t,i,e,n);s.push(a),o.set(t,a)}return s}(s,a,i);let c,u,h;const d={enter:(t,e)=>(c={keyframes:t,transition:e},d),exit:(t,e)=>(u={keyframes:t,transition:e},d),then:(t,e)=>(h||(h=Hs(l,o,a,c,u)),h.then(e=>t(e)).catch(t=>{throw e&&e(t),t}))};return o&&queueMicrotask(()=>{h||(h=Hs(l,o,a,c,u))}),d},t.velocityPerSecond=g,t.vh=gt,t.vw=vt,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),m=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class p{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),P=S(A),V=b(P),E=t=>(t*=2)<1?.5*P(t):.5*(2-Math.pow(2,-10*(t-1))),k=t=>1-Math.sin(Math.acos(t)),M=S(k),R=b(k),D=w(.42,0,1,1),B=w(0,0,.58,1),L=w(.42,0,.58,1);const C=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return C(t)?t[x(0,t.length,e)]:t}const F=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:u,easeIn:D,easeInOut:L,easeOut:B,circIn:k,circInOut:R,circOut:M,backIn:P,backInOut:V,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},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],$={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=N.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&&$.value&&$.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:m,render:p,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),m.process(s),p.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:N.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<N.length;e++)a[N[e]].cancel(t)},state:s,steps:a}}const{schedule:W,cancel:Y,state:X,steps:z}=U("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let K;function H(){K=void 0}const q={now:()=>(void 0===K&&q.set(X.isProcessing||o.useManualTiming?X.timestamp:performance.now()),K),set:t=>{K=t,queueMicrotask(H)}},G={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},mt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=mt("deg"),ft=mt("%"),yt=mt("px"),gt=mt("vh"),vt=mt("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",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 Vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Pt,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 Vt(t).values}function kt(t){const{split:e,types:n}=Vt(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 Mt=t=>"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Rt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:kt,getAnimatableNone:function(t){const e=Et(t);return kt(t)(e.map(Mt))}};function Dt(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=Dt(a,i,t+1/3),o=Dt(a,i,t),r=Dt(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 Lt(t,e){return n=>n>0?e:t}const Ct=(t,e,n)=>t+(e-t)*n,jt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ft=[dt,ht,Tt];function Ot(e){const n=(i=e,Ft.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=Ot(t),i=Ot(e);if(!n||!i)return Lt(t,e);const s={...n};return t=>(s.red=jt(n.red,i.red,t),s.green=jt(n.green,i.green,t),s.blue=jt(n.blue,i.blue,t),s.alpha=Ct(n.alpha,i.alpha,t),ht.transform(s))},Nt=new Set(["none","hidden"]);function $t(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ut(t,e){return n=>Ct(t,e,n)}function Wt(t){return"number"==typeof t?Ut:"string"==typeof t?Q(t)?Lt:wt.test(t)?It:zt:Array.isArray(t)?Yt:"object"==typeof t?wt.test(t)?It:Xt:Lt}function Yt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Wt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Xt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Wt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const zt=(e,n)=>{const i=Rt.createTransformer(n),s=Vt(e),o=Vt(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?$t(e,n):d(Yt(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"),Lt(e,n))};function Kt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ct(t,e,n);return Wt(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>W.update(e,t),stop:()=>Y(e),now:()=>X.isProcessing?X.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)})`},Gt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Gt;)e+=50,n=t.next(e);return e>=Gt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),Gt);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 me({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<pe;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 pe=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:m,isResolvedFromDuration:p}=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=me(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=m||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:p&&d||null,next:t=>{const e=b(t);if(p)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),Gt),e=qt(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},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,y=void 0===r?f:r(f);y!==f&&(p=y-h);const g=t=>-p*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,m(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||Kt,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),p=h.length,f=t=>{if(c&&t<e[0])return n[0];let i=0;if(p>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=m(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=m(0,e,i);t.push(Ct(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 Pe(t,e){return t.map(()=>e||L).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=C(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:Pe(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 ke(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 Me={decay:Te,inertia:Te,tween:Ve,keyframes:Ve,spring:xe};function Re(t){"string"==typeof t.type&&(t.type=Me[t.type])}class De{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 Le extends De{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?.())},G.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Re(t);const{type:e=Ve,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ve;a!==Ve&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Be,Kt(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:m,type:p,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,m&&(n-=m/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&&p!==Te&&(w.value=ke(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(q.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(q.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,G.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 Ce(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const je=t=>180*t/Math.PI,Fe=t=>{const e=je(Math.atan2(t[1],t[0]));return Ie(e)},Oe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Fe,rotateZ:Fe,skewX:t=>je(Math.atan(t[1])),skewY:t=>je(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),$e=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:Ne,scaleY:$e,scale:t=>(Ne(t)+$e(t))/2,rotateX:t=>Ie(je(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(je(Math.atan2(-t[2],t[0]))),rotateZ:Fe,rotate:Fe,skewX:t=>je(Math.atan(t[4])),skewY:t=>je(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function We(t){return t.includes("scale")?1:0}function Ye(t,e){if(!t||"none"===t)return We(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=Oe,s=e}if(!s)return We(e);const o=i[e],r=s[1].split(",").map(ze);return"function"==typeof o?o(r):r[o]}const Xe=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ye(n,e)};function ze(t){return parseFloat(t.trim())}const Ke=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Ke))(),qe=t=>t===nt||t===yt,Ge=new Set(["x","y","z"]),Ze=Ke.filter(t=>!Ge.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})=>Ye(e,"x"),y:(t,{transform:e})=>Ye(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,W.read(sn),W.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])}Ce(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"),mn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,pn={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 fn(t,e){return t?"function"==typeof t?dn()?qt(t,e):"ease-out":F(t)?mn(t):Array.isArray(t)?t.map(t=>fn(t,e)||pn.easeOut):pn[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),$.value&&G.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 m=t.animate(u,d);return $.value&&m.finished.finally(()=>{G.waapi--}),m}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 De{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=ke(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(){this.isPseudoElement||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:V,circInOut:R};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(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 Le({...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 Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Rt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Pn=new Set(["opacity","clipPath","filter","transform"]),Vn=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 Vn()&&n&&Pn.has(n)&&("transform"!==n||!c)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class kn extends De{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||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=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=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?.(ke(e,i,n)),e[0]=e[e.length-1],An(i),i.repeat=0);const m={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=!h&&En(m)?new bn({...m,element:m.motionValue.owner.current}):new Le(m);p.finished.then(()=>this.notifyFinished()).catch(u),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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 Mn{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 Dn extends Mn{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 Ln=new WeakMap,Cn=(t,e="")=>`${t}:${e}`;function jn(t){const e=Ln.get(t)||new Map;return Ln.set(t,e),e}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function On(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function In(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]=On(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)?In(o,n,i+1):o}function Nn(t,e){return t?.[e]??t?.default??t}const $n=new Set(["width","height","top","left","right","bottom",...Ke]),Un=t=>e=>e.test(t),Wn=[nt,yt,ft,pt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],Yn=t=>Wn.find(Un(t));function Xn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const zn=new Set(["brightness","contrast","saturate","opacity"]);function Kn(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=zn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Hn=/\b([a-z-]*)\(.*?\)/gu,qn={...Rt,getAnimatableNone:t=>{const e=t.match(Hn);return e?e.map(Kn).join(" "):t}},Gn={...nt,transform:Math.round},Zn={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:pt,skewX:pt,skewY:pt,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},_n={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius: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,backgroundPositionX:yt,backgroundPositionY:yt,...Zn,zIndex:Gn,fillOpacity:it,strokeOpacity:it,numOctaves:Gn},Jn={..._n,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:qn,WebkitFilter:qn},Qn=t=>Jn[t];function ti(t,e){let n=Qn(t);return n!==qn&&(n=Rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ei=new Set(["auto","none","0"]);class ni 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=In(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!$n.has(n)||2!==t.length)return;const[i,s]=t,o=Yn(i),r=Yn(s);if(et(i)!==et(s)&&_e[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 _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Xn(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&&!ei.has(e)&&Vt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ti(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 ii=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","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","backgroundPositionX","backgroundPositionY"]);function si(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ii.has(e)&&(t[n]=t[n]+"px")}const oi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),ri=new Set(["opacity","clipPath","filter","transform"]);function ai(t,e,n){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)}function li(t){return(e,n)=>{const i=ai(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const ci=(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?ci(i,_n[t]):i,n&&W.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&Y(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 hi(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 di=(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")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const 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)},mi=li(hi(di)),pi=hi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function fi(t){return a(t)&&"offsetHeight"in t}const yi={current:void 0};class gi{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 p);const n=this.events[t].add(e);return"change"===t?()=>{n(),W.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 yi.current&&yi.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 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 vi(t,e){return new gi(t,e)}const xi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Ti=new Set(["originX","originY","originZ"]),wi=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(fi(t)||e.get("transformBox")||wi(t,e,"transformBox",new gi("fill-box")),e.set("transform",new gi("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Ke.length;i++){const s=Ke[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${xi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):Ti.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new gi(""),()=>{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)},bi=li(hi(wi)),Si=yt.transform;const Ai=li(hi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return W.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Si(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new gi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Si(n)} ${Si(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return di(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?wi:di)(t,e,n,i)}));const{schedule:Pi,cancel:Vi}=U(queueMicrotask,!1),Ei={x:!1,y:!1};function ki(){return Ei.x||Ei.y}function Mi(t,e){const n=ai(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ri(t){return!("touch"===t.pointerType||ki())}const Di=(t,e)=>!!e&&(t===e||Di(t,e.parentElement)),Bi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Li=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ci(t){return Li.has(t.tagName)||!0===t.isContentEditable}const ji=new WeakSet;function Fi(t){return e=>{"Enter"===e.key&&t(e)}}function Oi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ii(t){return Bi(t)&&!ki()}const Ni=(t,e)=>t.depth-e.depth;function $i(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function Ui(t){return a(t)&&"ownerSVGElement"in t}const Wi=new WeakMap;let Yi;const Xi=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ui(i)&&"getBBox"in i?i.getBBox()[e]:i[n],zi=Xi("inline","width","offsetWidth"),Ki=Xi("block","height","offsetHeight");function Hi({target:t,borderBoxSize:e}){Wi.get(t)?.forEach(n=>{n(t,{get width(){return zi(t,e)},get height(){return Ki(t,e)}})})}function qi(t){t.forEach(Hi)}function Gi(t,e){Yi||"undefined"!=typeof ResizeObserver&&(Yi=new ResizeObserver(qi));const n=ai(t);return n.forEach(t=>{let n=Wi.get(t);n||(n=new Set,Wi.set(t,n)),n.add(e),Yi?.observe(t)}),()=>{n.forEach(t=>{const n=Wi.get(t);n?.delete(e),n?.size||Yi?.unobserve(t)})}}const Zi=new Set;let _i;function Ji(t){return Zi.add(t),_i||(_i=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Zi.forEach(e=>e(t))},window.addEventListener("resize",_i)),()=>{Zi.delete(t),Zi.size||"function"!=typeof _i||(window.removeEventListener("resize",_i),_i=void 0)}}function Qi(t,e){return"function"==typeof t?Ji(t):Gi(t,e)}function ts(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return W.preUpdate(i,!0),()=>Y(i)}function es(){const{value:t}=$;null!==t?(t.frameloop.rate.push(X.delta),t.animations.mainThread.push(G.mainThread),t.animations.waapi.push(G.waapi),t.animations.layout.push(G.layout)):Y(es)}function ns(t){return t.reduce((t,e)=>t+e,0)/t.length}function is(t,e=ns){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ss=t=>Math.round(1e3/t);function os(){$.value=null,$.addProjectionMetrics=null}function rs(){const{value:t}=$;if(!t)throw new Error("Stats are not being measured");os(),Y(es);const e={frameloop:{setup:is(t.frameloop.setup),rate:is(t.frameloop.rate),read:is(t.frameloop.read),resolveKeyframes:is(t.frameloop.resolveKeyframes),preUpdate:is(t.frameloop.preUpdate),update:is(t.frameloop.update),preRender:is(t.frameloop.preRender),render:is(t.frameloop.render),postRender:is(t.frameloop.postRender)},animations:{mainThread:is(t.animations.mainThread),waapi:is(t.animations.waapi),layout:is(t.animations.layout)},layoutProjection:{nodes:is(t.layoutProjection.nodes),calculatedTargetDeltas:is(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:is(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ss(n.min),n.max=ss(n.max),n.avg=ss(n.avg),[n.min,n.max]=[n.max,n.min],e}function as(t){return Ui(t)&&"svg"===t.tagName}function ls(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function cs(...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 us(t){const e=[];yi.current=e;const n=t();yi.current=void 0;const i=vi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>W.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Y(i)})}(e,i,t),i}const hs=t=>Boolean(t&&t.getVelocity);function ds(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(ms(t,a)),W.postRender(()=>{l(),o=new Le({keyframes:[ps(t.get()),ps(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),hs(e)){const n=e.on("change",e=>t.set(ms(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function ms(t,e){return e?t+e:t}function ps(t){return"number"==typeof t?t:parseFloat(t)}const fs=[...Wn,wt,Rt],ys=t=>fs.find(Un(t));function gs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let vs={},xs=null;const Ts=(t,e)=>{vs[t]=e},ws=()=>{xs||(xs=document.createElement("style"),xs.id="motion-view");let t="";for(const e in vs){const n=vs[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),vs={}},bs=()=>{xs&&xs.parentElement&&xs.parentElement.removeChild(xs)};function Ss(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function As(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Ps(){return document.getAnimations().filter(As)}const Vs=["layout","enter","exit","new","old"];function Es(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Mn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Ts(":root",{"view-transition-name":"none"}),Ts("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ws();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{bs()}),new Promise(t=>{s.ready.then(()=>{const e=Ps(),s=[];n.forEach((t,e)=>{for(const n of Vs){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Nn(i,t),...Nn(r,t)},l=gs(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=Ss(o);if(!r)continue;const a=n.get(r.layer);if(a)ks(a,"enter")&&ks(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Nn(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 Mn(s))})})}function ks(t,e){return t?.[e]?.keyframes.opacity}let Ms=[],Rs=null;function Ds(){Rs=null;const[t]=Ms;var e;t&&(n(Ms,e=t),Rs=e,Es(e).then(t=>{e.notifyReady(t),t.finished.finally(Ds)}))}function Bs(){for(let t=Ms.length-1;t>=0;t--){const e=Ms[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ms.slice(0,t+1).map(t=>t.update),i=Ms.slice(t+1);e.update=()=>{n.forEach(t=>t())},Ms=[e,...i];break}}Rs&&"immediate"!==Ms[0]?.options.interrupt||Ds()}class Ls{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,Ms.push(n),Pi.render(Bs)}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 Cs=W,js=N.reduce((t,e)=>(t[e]=t=>Y(t),t),{}),Fs=["[data-layout]","[data-layout-id]"];function Os(t,e){const n=Fs.join(", "),i=new Map;t.querySelectorAll(n).forEach(t=>{i.set(t,t.getBoundingClientRect())}),e();const s=new Set(t.querySelectorAll(n)),o=[];s.forEach(t=>{!i.has(t)&&t instanceof HTMLElement&&o.push(t)});const r=[];return i.forEach((t,e)=>{!s.has(e)&&e instanceof HTMLElement&&r.push({element:e,bounds:t})}),{addedElements:o,removedElements:r}}function Is(t){if(0===t.length)return document.body;if(1===t.length)return t[0].parentElement??document.body;const e=new Set;let n=t[0];for(;n;)e.add(n),n=n.parentElement;for(let i=1;i<t.length;i++)for(n=t[i];n;){if(e.has(n)){if(t.every(t=>n===t||n?.contains(t)))return n}n=n.parentElement}return document.body}function Ns(t,e,n){const i=t.cloneNode(!0);return i.style.position="fixed",i.style.top=`${e.top}px`,i.style.left=`${e.left}px`,i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.margin="0",i.style.pointerEvents="none",i.style.zIndex="9999",i.setAttribute("data-layout-exiting","true"),n.appendChild(i),{clone:i,cleanup:()=>{i.parentNode&&i.parentNode.removeChild(i)}}}const $s={duration:.3,ease:[.4,0,.2,1]};let Us=null;function Ws(t){Us=t}const Ys=new WeakMap;function Xs(t,e,n,i){let s=Ys.get(t);return s||(s=i.createProjectionNode(t,e,n),Ys.set(t,s)),s}function zs(t,e,n){const{keyframes:i,transition:s}=e,o=s?.duration??n,r=Object.entries(i),a={},l={};for(const[t,e]of r)Array.isArray(e)?(a[t]=e[0],l[t]=e[e.length-1]):l[t]=e;for(const[e,n]of Object.entries(a))e in t.style&&(t.style[e]=n);const c=t.animate([a,l],{duration:1e3*o,easing:"string"==typeof s?.ease?s.ease:"ease-out",fill:"forwards"});return c.finished&&c.finished.then(()=>{c.commitStyles(),c.cancel()}),new Bn(c)}function Ks(t,e,n,i,s){const{keyframes:o,transition:r}=n,a=r?.duration??i,{clone:l,cleanup:c}=Ns(t,e,s),u=l.animate([{},o],{duration:1e3*a,easing:"string"==typeof r?.ease?r.ease:"ease-out",fill:"forwards"});return u.finished.then(c),new Bn(u)}async function Hs(t,e,n,i,s){const o=[];if(0===t.length&&!e)return new Mn(o);t.forEach(t=>t.willUpdate());const r=Is(t.map(t=>t.instance).filter(t=>void 0!==t));let a=[],l=[];if(e){const t=Os(r,e);a=t.addedElements,l=t.removedElements}const c=t[0]?.root;c&&c.didUpdate(),await new Promise(t=>{W.postRender(()=>t())});for(const e of t)e.currentAnimation&&o.push(e.currentAnimation);if(i&&a.length>0)for(const t of a){const e=zs(t,i,n.duration??.3);o.push(e)}if(s&&l.length>0)for(const{element:t,bounds:e}of l){const i=Ks(t,e,s,n.duration??.3,r);o.push(i)}return new Mn(o)}const qs="[data-layout], [data-layout-id]";let Gs=class{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(),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:i}=t.options;!1===i&&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 Zs=new Map;function _s(t,e,n){Zs.has(t)||Zs.set(t,new Gs);const i=Zs.get(t);i.add(e),i.promote(e,n)}function Js(t,e){const n=Zs.get(t);n&&(n.remove(e),0===n.members.length&&Zs.delete(t))}function Qs(t){const{ProjectionNode:e,VisualElement:n}=t;return{createProjectionNode(t,i,s={}){const o={},r=s.layoutId??t.dataset?.layoutId??void 0,a=new n({visualState:{latestValues:o,renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},props:{}}),l=new e(o,i);if(l.setOptions({scheduleRender:()=>{a.scheduleRender&&a.scheduleRender()},visualElement:a,layout:!0,layoutId:r,transition:s.transition??{duration:s.duration??.3,ease:s.ease}}),l.mount(t),a.projection=l,r){_s(r,l);const t=l.unmount?.bind(l);l.unmount=()=>{Js(r,l),t&&t()}}return l.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom&&(l.resumingFrom.resumingFrom=void 0)),e&&(l.setAnimationOrigin(t),l.startAnimation(s.transition??{duration:s.duration??.3,ease:s.ease}))}),l},createVisualElement:(t,e={})=>new n({visualState:{latestValues:{},renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},props:{}})}}function to(t){Ws(Qs(t))}const eo=["TopLeft","TopRight","BottomLeft","BottomRight"],no=eo.length,io=t=>"string"==typeof t?parseFloat(t):t,so=t=>"number"==typeof t||yt.test(t);function oo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ro=lo(0,.5,M),ao=lo(.5,.95,u);function lo(t,e,n){return i=>i<t?0:i>e?1:n(m(t,e,i))}function co({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function uo(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 ho(t,e){t.min=e.min,t.max=e.max}function mo(t){return void 0===t||1===t}function po({scale:t,scaleX:e,scaleY:n}){return!mo(t)||!mo(e)||!mo(n)}function fo(t){return po(t)||yo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function yo(t){return go(t.x)||go(t.y)}function go(t){return t&&"0%"!==t}function vo(t,e,n){return n+e*(t-n)}function xo(t,e,n,i,s){return void 0!==s&&(t=vo(t,s,i)),vo(t,n,i)+e}function To(t,e=0,n=1,i,s){t.min=xo(t.min,e,n,i,s),t.max=xo(t.max,e,n,i,s)}function wo(t,{x:e,y:n}){To(t.x,e.translate,e.scale,e.originPoint),To(t.y,n.translate,n.scale,n.originPoint)}const bo=.999999999999,So=1.0000000000001;function Ao(t,e){t.min=t.min+e,t.max=t.max+e}function Po(t,e,n,i,s=.5){To(t,e,n,Ct(t.min,t.max,s),i)}function Vo(t,e){Po(t.x,e.x,e.scaleX,e.scale,e.originX),Po(t.y,e.y,e.scaleY,e.scale,e.originY)}function Eo(t){return t.max-t.min}function ko(t,e,n,i=.5){t.origin=i,t.originPoint=Ct(e.min,e.max,t.origin),t.scale=Eo(n)/Eo(e),t.translate=Ct(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 Mo(t,e,n){t.min=n.min+e.min,t.max=t.min+Eo(e)}function Ro(t,e,n){t.min=e.min-n.min,t.max=t.min+Eo(e)}function Do(t,e,n,i,s){return t=vo(t-=e,1/n,i),void 0!==s&&(t=vo(t,1/s,i)),t}function Bo(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.test(e)){e=parseFloat(e);e=Ct(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ct(o.min,o.max,i);t===o&&(a-=e),t.min=Do(t.min,e,n,a,s),t.max=Do(t.max,e,n,a,s)}function Lo(t,e,[n,i,s],o,r){Bo(t,e[n],e[i],e[s],e.scale,o,r)}const Co=["x","scaleX","originX"],jo=["y","scaleY","originY"];const Fo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Oo=()=>({min:0,max:0});function Io(t){return 0===t.translate&&1===t.scale}function No(t,e){return t.min===e.min&&t.max===e.max}function $o(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Uo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${Uo(t,e.target.x)}% ${Uo(t,e.target.y)}%`}},Yo={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=Ct(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Xo={borderRadius:{...Wo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wo,borderTopRightRadius:Wo,borderBottomLeftRadius:Wo,borderBottomRightRadius:Wo,boxShadow:Yo};function zo(t,e){return co(uo(t.getBoundingClientRect(),e))}function Ko(t){return"object"==typeof t&&!Array.isArray(t)}function Ho(t,e,n,i){return"string"==typeof t&&Ko(e)?ai(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function qo(t,e,n){return t*(e+1)}function Go(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 Zo(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:Ct(o,r,s[n]),easing:j(i,n)})}function _o(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Jo(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Qo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function tr(t,e){return e[t]||(e[t]=[]),e[t]}function er(t){return Array.isArray(t)?t:[t]}function nr(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ir=t=>"number"==typeof t,sr=t=>t.every(ir),or=new WeakMap;function rr(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ar(t,e,n,i){if("function"==typeof e){const[s,o]=rr(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]=rr(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function lr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,vi(n))}function cr(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function ur(t,e){const n=function(t,e){const n=t.getProps();return ar(n,e,n.custom,t)}(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){lr(t,e,cr(o[e]))}}function hr(t,e){const n=t.getValue("willChange");if(i=n,Boolean(hs(i)&&i.add))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}const dr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mr="data-"+dr("framerAppearId");function pr(t){return t.props[mr]}const fr=t=>null!==t;const yr={type:"spring",stiffness:500,damping:25,restSpeed:10},gr={type:"keyframes",duration:.8},vr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xr=(t,{keyframes:e})=>e.length>2?gr:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:yr:vr;const Tr=(t,e,n,i={},s,r)=>a=>{const l=Nn(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};(function({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})(l)||Object.assign(h,xr(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)&&(d=!0,An(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(fr),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(h.keyframes,l);if(void 0!==t)return void W.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Le(h):new kn(h)};function wr({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function br(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=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||c&&wr(c,e))continue;const r={delay:n,...Nn(o||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=pr(t);if(n){const t=window.MotionHandoffAnimation(n,e,W);null!==t&&(r.startTime=t,h=!0)}}hr(t,e),i.start(Tr(e,i,s,t.shouldReduceMotion&&$n.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{W.update(()=>{r&&ur(t,r)})}),l}function Sr(t){return void 0===t||1===t}function Ar({scale:t,scaleX:e,scaleY:n}){return!Sr(t)||!Sr(e)||!Sr(n)}function Pr(t){return Ar(t)||Vr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Vr(t){return Er(t.x)||Er(t.y)}function Er(t){return t&&"0%"!==t}function kr(t,e,n){return n+e*(t-n)}function Mr(t,e,n,i,s){return void 0!==s&&(t=kr(t,s,i)),kr(t,n,i)+e}function Rr(t,e=0,n=1,i,s){t.min=Mr(t.min,e,n,i,s),t.max=Mr(t.max,e,n,i,s)}function Dr(t,{x:e,y:n}){Rr(t.x,e.translate,e.scale,e.originPoint),Rr(t.y,n.translate,n.scale,n.originPoint)}const Br=.999999999999,Lr=1.0000000000001;function Cr(t,e){t.min=t.min+e,t.max=t.max+e}function jr(t,e,n,i,s=.5){Rr(t,e,n,Ct(t.min,t.max,s),i)}function Fr(t,e){jr(t.x,e.x,e.scaleX,e.scale,e.originX),jr(t.y,e.y,e.scaleY,e.scale,e.originY)}const Or={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ir={};for(const t in Or)Ir[t]={isEnabled:e=>Or[t].some(t=>!!e[t])};const Nr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),$r="undefined"!=typeof window,Ur={current:null},Wr={current:!1};const Yr=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Xr(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Yr.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const zr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=q.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,W.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Xr(e),this.isVariantNode=function(t){return Boolean(Xr(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&hs(e)&&e.set(a[t])}}mount(t){this.current=t,or.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:(Wr.current||function(){if(Wr.current=!0,$r)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ur.current=t.matches;t.addEventListener("change",e),e()}else Ur.current=!1}(),this.shouldReduceMotion=Ur.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(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=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;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 Ir){const e=Ir[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<zr.length;e++){const n=zr[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=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(hs(s))t.addValue(i,s);else if(hs(o))t.addValue(i,vi(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,vi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}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=vi(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):!ys(n)&&Rt.test(e)&&(n=ti(t,e)),this.setBaseTarget(t,hs(n)?n.get():n)),hs(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=ar(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||hs(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 p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Pi.render(this.render)}}class Hr extends Kr{constructor(){super(...arguments),this.KeyframeResolver=ni}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hs(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const qr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gr=Ke.length;function Zr(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=ci(n,_n[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Gr;o++){const r=Ke[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=ci(a,_n[r]);l||(s=!1,i+=`${qr[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(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 _r(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 Jr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${Jr(t,e.target.x)}% ${Jr(t,e.target.y)}%`}},ta={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=Ct(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},ea={borderRadius:{...Qr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qr,borderTopRightRadius:Qr,borderBottomLeftRadius:Qr,borderBottomRightRadius:Qr,boxShadow:ta};function na(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ea[t]||"opacity"===t)}function ia(t,e,n){const{style:i}=t,s={};for(const o in i)(hs(i[o])||e.style&&hs(e.style[o])||na(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class sa extends Hr{constructor(){super(...arguments),this.type="html",this.renderInstance=_r}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?We(e):Xe(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 function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(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}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Zr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ia(t,e,n)}}class oa extends Kr{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 ra={offset:"stroke-dashoffset",array:"stroke-dasharray"},aa={offset:"strokeDashoffset",array:"strokeDasharray"};const la=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ca(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Zr(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 la)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&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ra:aa;t[o.offset]=yt.transform(-i);const r=yt.transform(e),a=yt.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const ua=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"]);class ha extends Hr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Nr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=Qn(e);return t&&t.default||0}return e=ua.has(e)?e:dr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const i=ia(t,e,n);for(const n in t)(hs(t[n])||hs(e[n]))&&(i[-1!==Ke.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return i}(t,e,n)}build(t,e,n){ca(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){_r(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(ua.has(n)?n:dr(n),e.attrs[n])}(t,e,0,i)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}function da(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ui(t)&&!as(t)?new ha(e):new sa(e);n.mount(t),or.set(t,n)}function ma(t){const e=new oa({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),or.set(t,e)}function pa(t,e,n){const i=hs(t)?t:vi(t);return i.start(Tr("",i,e,n)),i.animation}function fa(e,n,i,s){const o=[];if(function(t,e){return hs(t)||"number"==typeof t||"string"==typeof t&&!Ko(e)}(e,n))o.push(pa(e,Ko(n)&&n.default||n,i&&i.default||i));else{const r=Ho(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){const s=r[e];t.invariant(null!==s,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const l=s instanceof Element?da:ma;or.has(s)||l(s);const c=or.get(s),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(e,a)),o.push(...br(c,{...n,transition:u},{}))}}return o}function ya(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,p=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,Go(d,a.at,h,u));continue}let[m,y,g={}]=a;void 0!==g.at&&(d=Go(d,g.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=er(e),{delay:u=0,times:h=Se(c),type:m="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,P=gn(m)?m:o?.[m||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&sr(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...T};void 0!==b&&(e.duration=f(b));const n=_t(e,t,P);w=n.ease,b=n.duration}b??(b=r);const V=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=qo(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":j(i,s-1))}_o(h,y)}const k=V+b;Zo(s,c,w,h,V,k),v=Math.max(S+b,v),p=Math.max(k,p)};if(hs(m))x(y,g,tr("default",Qo(m,l)));else{const t=Ho(m,y,s,c),e=t.length;for(let n=0;n<e;n++){const i=Qo(t[n],l);for(const t in y)x(y[t],nr(g,t),tr(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(Jo);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(m(0,p,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,u.transition[s]={...n,duration:p,ease:c,times:l,...i}}}),a}(e,n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...fa(n,t,e))}),s}function ga(t){return function(e,i,s){let o,r=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))r=ya(e,i,t);else{const{onComplete:n,...a}=s||{};"function"==typeof n&&(o=n),r=fa(e,i,a,t)}var a;const l=new Dn(r);return o&&l.finished.then(o),t&&(t.animations.push(l),l.finished.then(()=>{n(t.animations,l)})),l}}const va=ga();const xa=e=>function(n,i,s){return new Dn(function(e,n,i,s){const o=ai(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={...Nn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=jn(e),l=Cn(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]=$i(i,s)),Ce(e),si(e,s),!o&&e.length<2&&e.unshift($i(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))},Ta=xa(),wa={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ba(t,e,n,i){const s=n[e],{length:o,position:r}=wa[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=m(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const Sa={start:0,center:.5,end:1};function Aa(t,e,n=0){let i=0;if(t in Sa&&(t=Sa[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 Pa=[0,0];function Va(t,e,n,i){let s=Array.isArray(t)?t:Pa,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Sa[t]?t:"0"]),o=Aa(s[0],n,i),r=Aa(s[1],e),o-r}const Ea={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ka={x:0,y:0};function Ma(t,e,n){const{offset:s=Ea.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(fi(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):ka,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=Va(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 Ra(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){ba(t,"x",e,n),ba(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ma(t,n,i)},notify:()=>e(n)}}const Da=new WeakMap,Ba=new WeakMap,La=new WeakMap,Ca=t=>t===document.scrollingElement?window:t;function ja(t,{container:e=document.scrollingElement,...n}={}){if(!e)return u;let i=La.get(e);i||(i=new Set,La.set(e,i));const s=Ra(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!Da.has(e)){const t=()=>{for(const t of i)t.measure(X.timestamp);W.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>W.read(t);Da.set(e,s);const o=Ca(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&Ba.set(e,Qi(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=Da.get(e);return W.read(o,!1,!0),()=>{Y(o);const t=La.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=Da.get(e);Da.delete(e),n&&(Ca(e).removeEventListener("scroll",n),Ba.get(e)?.(),window.removeEventListener("resize",n))}}const Fa=new Map;function Oa({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Fa.get(e)??new Map;Fa.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=ja(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Ia={some:0,all:1};const Na=(t,e)=>t.depth-e.depth;class $a{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(Na),this.isDirty=!1,this.children.forEach(t)}}function Ua(t,e){const n=q.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Y(i),t(o-e))};return W.setup(i,!0),()=>Y(i)}function Wa(t){return hs(t)?t.get():t}const Ya=["TopLeft","TopRight","BottomLeft","BottomRight"],Xa=Ya.length,za=t=>"string"==typeof t?parseFloat(t):t,Ka=t=>"number"==typeof t||yt.test(t);function Ha(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const qa=Za(0,.5,M),Ga=Za(.5,.95,u);function Za(t,e,n){return i=>i<t?0:i>e?1:n(m(t,e,i))}function _a(t,e){t.min=e.min,t.max=e.max}function Ja(t,e){_a(t.x,e.x),_a(t.y,e.y)}function Qa(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function tl(t){return t.max-t.min}function el(t,e,n,i=.5){t.origin=i,t.originPoint=Ct(e.min,e.max,t.origin),t.scale=tl(n)/tl(e),t.translate=Ct(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 nl(t,e,n,i){el(t.x,e.x,n.x,i?i.originX:void 0),el(t.y,e.y,n.y,i?i.originY:void 0)}function il(t,e,n){t.min=n.min+e.min,t.max=t.min+tl(e)}function sl(t,e,n){t.min=e.min-n.min,t.max=t.min+tl(e)}function ol(t,e,n){sl(t.x,e.x,n.x),sl(t.y,e.y,n.y)}function rl(t,e,n,i,s){return t=kr(t-=e,1/n,i),void 0!==s&&(t=kr(t,1/s,i)),t}function al(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){ft.test(e)&&(e=parseFloat(e),e=Ct(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Ct(o.min,o.max,i);t===o&&(a-=e),t.min=rl(t.min,e,n,a,s),t.max=rl(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ll=["x","scaleX","originX"],cl=["y","scaleY","originY"];function ul(t,e,n,i){al(t.x,e,ll,n?n.x:void 0,i?i.x:void 0),al(t.y,e,cl,n?n.y:void 0,i?i.y:void 0)}function hl(t){return 0===t.translate&&1===t.scale}function dl(t){return hl(t.x)&&hl(t.y)}function ml(t,e){return t.min===e.min&&t.max===e.max}function pl(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function fl(t,e){return pl(t.x,e.x)&&pl(t.y,e.y)}function yl(t){return tl(t.x)/tl(t.y)}function gl(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vl{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(),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:i}=t.options;!1===i&&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)}}function xl(t){return[t("x"),t("y")]}const Tl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},wl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},bl=["","X","Y","Z"];let Sl=0;function Al(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Pl(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=pr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Pl(i)}function Vl({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Sl++,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,$.value&&(wl.nodes=wl.calculatedTargetDeltas=wl.calculatedProjections=0),this.nodes.forEach(Ml),this.nodes.forEach(Fl),this.nodes.forEach(Ol),this.nodes.forEach(Rl),$.addProjectionMetrics&&$.addProjectionMetrics(wl)},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 $a)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),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=Ui(e)&&!as(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;W.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Ua(s,250),Tl.hasAnimatedSinceResize&&(Tl.hasAnimatedSinceResize=!1,this.nodes.forEach(jl)))})}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()||Yl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!fl(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={...Nn(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||jl(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(),Y(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(Il),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&&Pl(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(Bl);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ll);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cl),this.nodes.forEach(El),this.nodes.forEach(kl)):this.nodes.forEach(Ll),this.clearAllSnapshots();const t=q.now();X.delta=i(0,1e3/60,t-X.timestamp),X.timestamp=t,X.isProcessing=!0,z.update.process(X),z.preRender.process(X),z.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Dl),this.sharedNodes.forEach(Nl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||tl(this.snapshot.measuredBox.x)||tl(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&&!dl(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Pr(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)),Kl((i=n).x),Kl(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(ql))){const{scroll:t}=this.root;t&&(Cr(e.x,t.offset.x),Cr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ja(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&&Ja(e,t),Cr(e.x,s.offset.x),Cr(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ja(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&&Fr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Pr(i.latestValues)&&Fr(n,i.latestValues)}return Pr(this.latestValues)&&Fr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ja(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Pr(n.latestValues))continue;Ar(n.latestValues)&&n.updateSnapshot();const i=Nr();Ja(i,n.measurePageBox()),ul(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Pr(this.latestValues)&&ul(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!==X.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=X.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,il(r.x,a.x,l.x),il(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ja(this.target,this.layout.layoutBox),Dr(this.target,this.targetDelta)):Ja(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),$.value&&wl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Ar(this.parent.latestValues)&&!Vr(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}},ol(this.relativeTargetOrigin,e,n),Ja(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===X.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;Ja(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(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&&Fr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Dr(t,r)),i&&Pr(o.latestValues)&&Fr(t,o.latestValues))}e.x<Lr&&e.x>Br&&(e.x=1),e.y<Lr&&e.y>Br&&(e.y=1)}(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?(Qa(this.prevProjectionDelta.x,this.projectionDelta.x),Qa(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nl(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&gl(this.projectionDelta.x,this.prevProjectionDelta.x)&&gl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),$.value&&wl.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(Wl));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,y;$l(o.x,t.x,n),$l(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ol(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,y=n,Ul(m.x,p.x,f.x,y),Ul(m.y,p.y,f.y,y),h&&(l=this.relativeTarget,d=h,ml(l.x,d.x)&&ml(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ja(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ct(0,n.opacity??1,qa(i)),t.opacityExit=Ct(e.opacity??1,0,Ga(i))):o&&(t.opacity=Ct(e.opacity??1,n.opacity??1,i));for(let s=0;s<Xa;s++){const o=`border${Ya[s]}Radius`;let r=Ha(e,o),a=Ha(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Ka(r)===Ka(a)?(t[o]=Math.max(Ct(za(r),za(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Ct(e.rotate||0,n.rotate||0,i))}(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&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Tl.hasAnimatedSinceResize=!0,G.layout++,this.motionValue||(this.motionValue=vi(0)),this.currentAnimation=pa(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{G.layout--},onComplete:()=>{G.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&&Hl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=tl(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=tl(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ja(e,n),Fr(e,s),nl(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new vl);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&&Al("z",t,i,this.animationValues);for(let e=0;e<bl.length;e++)Al(`rotate${bl[e]}`,t,i,this.animationValues),Al(`skew${bl[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=Wa(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=Wa(e?.pointerEvents)||""),void(this.hasProjected&&!Pr(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(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"}(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 ea){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=ea[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?Wa(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Bl),this.root.sharedNodes.clear()}}}function El(t){t.updateLayout()}function kl(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?xl(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=tl(i);i.min=n[t].min,i.max=i.min+s}):Hl(s,e.layoutBox,n)&&xl(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=tl(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}};nl(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?nl(a,t.applyTransform(i,!0),e.measuredBox):nl(a,n,e.layoutBox);const l=!dl(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}};ol(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ol(a,n,o.layoutBox),fl(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 Ml(t){$.value&&wl.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 Rl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Dl(t){t.clearSnapshot()}function Bl(t){t.clearMeasurements()}function Ll(t){t.isLayoutDirty=!1}function Cl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function jl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Fl(t){t.resolveTargetDelta()}function Ol(t){t.calcProjection()}function Il(t){t.resetSkewAndRotation()}function Nl(t){t.removeLeadSnapshot()}function $l(t,e,n){t.translate=Ct(e.translate,0,n),t.scale=Ct(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ul(t,e,n,i){t.min=Ct(e.min,n.min,i),t.max=Ct(e.max,n.max,i)}function Wl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Yl={duration:.45,ease:[.4,0,.1,1]},Xl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),zl=Xl("applewebkit/")&&!Xl("chrome/")?Math.round:u;function Kl(t){t.min=zl(t.min),t.max=zl(t.max)}function Hl(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=yl(e),s=yl(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function ql(t){return t!==t.root&&t.scroll?.wasRoot}const Gl=Vl({attachResizeListener:(t,e)=>function(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zl={current:void 0},_l=Vl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Zl.current){const t=new Gl({});t.mount(window),t.setOptions({layoutScroll:!0}),Zl.current=t}return Zl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});class Jl extends sa{constructor(t){super({parent:void 0,props:t.props,presenceContext:null,reducedMotionConfig:void 0,blockInitialAnimation:!1,visualState:t.visualState},{})}}const Ql=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=ni,t.FlatTree=class{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(Ni),this.isDirty=!1,this.children.forEach(t)}},t.GroupAnimation=Mn,t.GroupAnimationWithThen=Dn,t.JSAnimation=Le,t.KeyframeResolver=rn,t.MotionGlobalConfig=o,t.MotionValue=gi,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=Gs,t.SubscriptionManager=p,t.ViewTransitionBuilder=Ls,t.acceleratedValues=ri,t.activeAnimations=G,t.addAttrValue=di,t.addScaleCorrector=function(t){for(const e in t)Xo[e]=t[e],_(e)&&(Xo[e].isCSSVariable=!0)},t.addStyleValue=wi,t.addUniqueItem=e,t.alpha=it,t.analyseComplexValue=Vt,t.animate=va,t.animateMini=Ta,t.animateValue=function(t){return new Le(t)},t.animateView=function(t,e={}){return new Ls(t,e)},t.animationMapKey=Cn,t.anticipate=E,t.applyAxisDelta=To,t.applyBoxDelta=wo,t.applyGeneratorOptions=vn,t.applyPointDelta=xo,t.applyPxDefaults=si,t.applyTreeDeltas=function(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&&Vo(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&&fo(o.latestValues)&&Vo(t,o.latestValues))}e.x<So&&e.x>bo&&(e.x=1),e.y<So&&e.y>bo&&(e.y=1)},t.aspectRatio=function(t){return Eo(t.x)/Eo(t.y)},t.attachSpring=ds,t.attrEffect=mi,t.axisDeltaEquals=function(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint},t.axisEquals=No,t.axisEqualsRounded=$o,t.backIn=P,t.backInOut=V,t.backOut=A,t.boxEquals=function(t,e){return No(t.x,e.x)&&No(t.y,e.y)},t.boxEqualsRounded=function(t,e){return $o(t.x,e.x)&&$o(t.y,e.y)},t.buildProjectionTransform=function(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"},t.calcAxisDelta=ko,t.calcBoxDelta=function(t,e,n,i){ko(t.x,e.x,n.x,i?i.originX:void 0),ko(t.y,e.y,n.y,i?i.originY:void 0)},t.calcGeneratorDuration=Zt,t.calcLength=Eo,t.calcRelativeAxis=Mo,t.calcRelativeAxisPosition=Ro,t.calcRelativeBox=function(t,e,n){Mo(t.x,e.x,n.x),Mo(t.y,e.y,n.y)},t.calcRelativePosition=function(t,e,n){Ro(t.x,e.x,n.x),Ro(t.y,e.y,n.y)},t.cancelFrame=Y,t.cancelMicrotask=Vi,t.cancelSync=js,t.circIn=k,t.circInOut=R,t.circOut=M,t.clamp=i,t.clearSharedLayoutRegistry=function(){Zs.clear()},t.collectMotionValues=yi,t.color=wt,t.compareByDepth=Ni,t.complex=Rt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=co,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=function(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin},t.copyAxisInto=ho,t.copyBoxInto=function(t,e){ho(t.x,e.x),ho(t.y,e.y)},t.correctBorderRadius=Wo,t.correctBoxShadow=Yo,t.createAxis=Oo,t.createAxisDelta=Fo,t.createBox=()=>({x:{min:0,max:0},y:{min:0,max:0}}),t.createDelta=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),t.createGeneratorEasing=_t,t.createLayoutNodeFactory=Qs,t.createRenderBatcher=U,t.createScopedAnimate=ga,t.cubicBezier=w,t.cubicBezierAsString=mn,t.defaultEasing=Pe,t.defaultOffset=Se,t.defaultTransformValue=We,t.defaultValueTypes=Jn,t.degrees=pt,t.delay=function(t,e){return Ua(t,f(e))},t.delayInSeconds=function(t,e){return function(t,e){const n=q.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Y(i),t(o-e))};return W.setup(i,!0),()=>Y(i)}(t,f(e))},t.dimensionValueTypes=Wn,t.distance=Ql,t.distance2D=function(t,e){const n=Ql(t.x,e.x),i=Ql(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=function(t){return[t("x"),t("y")]},t.easeIn=D,t.easeInOut=L,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=Ce,t.findCommonAncestor=Is,t.findDimensionValueType=Yn,t.findValueType=ys,t.flushKeyframeResolvers=on,t.frame=W,t.frameData=X,t.frameSteps=z,t.generateLinearEasing=qt,t.getAnimatableNone=ti,t.getAnimationMap=jn,t.getComputedStyle=$i,t.getDefaultValueType=Qn,t.getEasingForSegment=j,t.getLayoutNodeFactory=function(){return Us},t.getMixer=Wt,t.getOriginIndex=ls,t.getSharedLayoutLead=function(t){const e=Zs.get(t);return e?.lead},t.getSharedLayoutStack=function(t){return Zs.get(t)},t.getValueAsType=ci,t.getValueTransition=Nn,t.getVariableValue=In,t.getViewAnimationLayerInfo=Ss,t.getViewAnimations=Ps,t.globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1},t.has2DTranslate=yo,t.hasScale=po,t.hasSharedLayoutNodes=function(t){const e=Zs.get(t);return void 0!==e&&e.members.length>0},t.hasTransform=fo,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=Mi(t,n),r=t=>{if(!Ri(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ri(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o},t.hsla=Tt,t.hslaToRgba=Bt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=ai(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:Ia[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initLayoutSystem=to,t.initVanillaLayout=function(){to({ProjectionNode:_l,VisualElement:Jl})},t.interpolate=we,t.invisibleValues=Nt,t.isBezierDefinition=F,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDeltaZero=function(t){return Io(t.x)&&Io(t.y)},t.isDragActive=ki,t.isDragging=Ei,t.isEasingArray=C,t.isElementKeyboardAccessible=Ci,t.isGenerator=gn,t.isHTMLElement=fi,t.isMotionValue=hs,t.isNear=function(t,e,n){return Math.abs(t-e)<=n},t.isNodeOrChild=Di,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=Bi,t.isSVGElement=Ui,t.isSVGSVGElement=as,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in pn||dn())||F(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=cs(e,n,i);return us(()=>s(t.get()))},t.maxGeneratorDuration=Gt,t.measurePageBox=function(t,e,n){const i=zo(t,n),{scroll:s}=e;return s&&(Ao(i.x,s.offset.x),Ao(i.y,s.offset.y)),i},t.measureViewportBox=zo,t.memo=c,t.microtask=Pi,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Kt,t.mixArray=Yt,t.mixColor=It,t.mixComplex=zt,t.mixImmediate=Lt,t.mixLinearColor=jt,t.mixNumber=Ct,t.mixObject=Xt,t.mixValues=function(t,e,n,i,s,o){s?(t.opacity=Ct(0,n.opacity??1,ro(i)),t.opacityExit=Ct(e.opacity??1,0,ao(i))):o&&(t.opacity=Ct(e.opacity??1,n.opacity??1,i));for(let s=0;s<no;s++){const o=`border${eo[s]}Radius`;let r=oo(e,o),a=oo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||so(r)===so(a)?(t[o]=Math.max(Ct(io(r),io(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ct(e.rotate||0,n.rotate||0,i))},t.mixVisibility=$t,t.motionValue=vi,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.noop=u,t.notifyExitAnimationComplete=function(t){const e=Zs.get(t);e&&e.exitAnimationComplete()},t.number=nt,t.numberValueTypes=_n,t.observeMutation=Os,t.observeTimeline=ts,t.parseCSSVariable=On,t.parseValueFromTransform=Ye,t.percent=ft,t.pipe=d,t.pixelsToPercent=Uo,t.positionalKeys=$n,t.preserveElementForExit=Ns,t.press=function(t,e,n={}){const[i,s,o]=Mi(t,n),r=t=>{const i=t.currentTarget;if(!Ii(t))return;ji.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ji.has(i)&&ji.delete(i),Ii(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Di(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),fi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Fi(()=>{if(ji.has(n))return;Oi(n,"down");const t=Fi(()=>{Oi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Oi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Ci(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=m,t.progressPercentage=xt,t.propEffect=pi,t.px=yt,t.readTransformValue=Xe,t.recordStats=function(){if($.value)throw os(),new Error("Stats are already being measured");const t=$;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)},W.postRender(es,!0),rs},t.registerSharedLayoutNode=_s,t.removeAxisDelta=Bo,t.removeAxisTransforms=Lo,t.removeBoxTransforms=function(t,e,n,i){Lo(t.x,e,Co,n?n.x:void 0,i?i.x:void 0),Lo(t.y,e,jo,n?n.y:void 0,i?i.y:void 0)},t.removeItem=n,t.removePointDelta=Do,t.resize=Qi,t.resolveElements=ai,t.reverseEasing=S,t.rgbUnit=ut,t.rgba=ht,t.scale=st,t.scaleCorrectors=Xo,t.scalePoint=vo,t.scheduleSharedLayoutRender=function(t){const e=Zs.get(t);e&&e.scheduleRender()},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)?ja(n=>{t(n[e.axis].progress,n)},e):ts(t,Oa(e))}(t,s):function(t,e){const n=Oa(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),ts(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=ja,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?Ei[t]?null:(Ei[t]=!0,()=>{Ei[t]=!1}):Ei.x||Ei.y?null:(Ei.x=Ei.y=!0,()=>{Ei.x=Ei.y=!1})},t.setLayoutNodeFactory=Ws,t.setStyle=ln,t.spring=xe,t.springValue=function(t,e){const n=vi(hs(t)?t.get():t);return ds(n,t,e),n},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=$,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=bi,t.supportedWaapiEasing=pn,t.supportsBrowserAnimation=En,t.supportsFlags=un,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=oi,t.supportsScrollTimeline=cn,t.svgEffect=Ai,t.sync=Cs,t.testValueType=Un,t.time=q,t.transform=cs,t.transformAxis=Po,t.transformBox=Vo,t.transformBoxPoints=uo,t.transformPropOrder=Ke,t.transformProps=He,t.transformValue=us,t.transformValueTypes=Zn,t.translateAxis=Ao,t.unregisterSharedLayoutNode=Js,t.unstable_animateLayout=function(t,e,n){if(!Us)throw new Error("animateLayout: No layout node factory configured. Make sure to import from 'framer-motion' or call setLayoutNodeFactory() first.");const i=Us;let s,o,r;if(t&&((a=t)instanceof Element||"string"==typeof a||Array.isArray(a)&&a.length>0&&a[0]instanceof Element||a instanceof NodeList)){const i=ai(t);s=[];for(const t of i){const e=t.querySelectorAll(qs);s.push(...Array.from(e)),t.matches(qs)&&s.push(t)}s=[...new Set(s)],o="function"==typeof e?e:void 0,r="object"==typeof e?e:n??{}}else s=Array.from(document.querySelectorAll(qs)),"function"==typeof t?(o=t,r=e??{}):(o="function"==typeof e?e:void 0,r=t??("object"==typeof e?e:{}));var a;const l={...r,transition:{...$s,...r.transition,duration:r.duration??r.transition?.duration??.3,ease:r.ease??r.transition?.ease}},c=function(t,e,n){const i=[...t].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),s=[],o=new Map;for(const t of i){if(!(t instanceof HTMLElement))continue;let i,r=t.parentElement;for(;r;){const t=o.get(r);if(t){i=t;break}r=r.parentElement}const a=Xs(t,i,e,n);s.push(a),o.set(t,a)}return s}(s,l,i);let u,h,d;const m={enter:(t,e)=>(u={keyframes:t,transition:e},m),exit:(t,e)=>(h={keyframes:t,transition:e},m),then:(t,e)=>(d||(d=Hs(c,o,l,u,h)),d.then(e=>t(e)).catch(t=>{throw e&&e(t),t}))};return o&&queueMicrotask(()=>{d||(d=Hs(c,o,l,u,h))}),m},t.velocityPerSecond=g,t.vh=gt,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.27.0-alpha.
|
|
3
|
+
"version": "12.27.0-alpha.1",
|
|
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.27.0-alpha.
|
|
79
|
+
"framer-motion": "^12.27.0-alpha.1",
|
|
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": "31897fd922dd5263045ab67258fc1f80575b4fe6"
|
|
99
99
|
}
|