motion 12.27.3-alpha.0 → 12.27.3-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 +12 -1
- package/dist/motion.js +1 -1
- package/package.json +3 -3
package/dist/motion.dev.js
CHANGED
|
@@ -9309,7 +9309,7 @@
|
|
|
9309
9309
|
this.notifyReady = resolve;
|
|
9310
9310
|
this.rejectReady = reject;
|
|
9311
9311
|
});
|
|
9312
|
-
microtask.read((
|
|
9312
|
+
microtask.read(() => {
|
|
9313
9313
|
this.start().then(this.notifyReady).catch(this.rejectReady);
|
|
9314
9314
|
});
|
|
9315
9315
|
}
|
|
@@ -9325,6 +9325,7 @@
|
|
|
9325
9325
|
const beforeRecords = this.buildRecords(beforeElements);
|
|
9326
9326
|
const exitCandidates = collectExitCandidates(beforeRecords);
|
|
9327
9327
|
beforeRecords.forEach(({ projection }) => {
|
|
9328
|
+
seedProjectionSnapshot(projection);
|
|
9328
9329
|
projection.isPresent = true;
|
|
9329
9330
|
projection.willUpdate();
|
|
9330
9331
|
});
|
|
@@ -9455,6 +9456,16 @@
|
|
|
9455
9456
|
},
|
|
9456
9457
|
};
|
|
9457
9458
|
}
|
|
9459
|
+
function seedProjectionSnapshot(projection) {
|
|
9460
|
+
const projectionNode = projection;
|
|
9461
|
+
if (!projectionNode.currentAnimation && !projectionNode.pendingAnimation) {
|
|
9462
|
+
return;
|
|
9463
|
+
}
|
|
9464
|
+
const snapshot = projection.measure(false);
|
|
9465
|
+
snapshot.latestValues =
|
|
9466
|
+
projectionNode.animationValues || projection.latestValues;
|
|
9467
|
+
projection.snapshot = snapshot;
|
|
9468
|
+
}
|
|
9458
9469
|
function getOrCreateRecord(element, parentProjection, projectionOptions) {
|
|
9459
9470
|
const existing = visualElementStore.get(element);
|
|
9460
9471
|
const visualElement = existing ??
|
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 u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class m{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,y=t=>t/1e3;function g(t,e){return e?t*(1e3/e):0}const v=new Set;const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},T=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function w(t,e,n,i){if(t===e&&n===i)return c;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))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),R=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const j=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return j(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:c,easeIn:R,easeInOut:C,easeOut:B,circIn:M,circInOut:D,circOut:k,backIn:P,backInOut:V,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return w(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],U={value:null,addProjectionMetrics:null};function W(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 u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={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(u),e&&U.value&&U.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(r,e?n:void 0),t),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming?s.timestamp:performance.now();n=!1,o.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule: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:$,cancel:K,state:z,steps:Y}=W("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},q={layout:0,mainThread:0,waapi:0},Z=t=>e=>"string"==typeof e&&e.startsWith(t),_=Z("--"),J=Z("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function et(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it={...nt,transform:t=>i(0,1,t)},st={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(t,e)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ut=(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}},ct={...nt,transform:t=>Math.round((t=>i(0,255,t))(t))},ht={test:lt("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ct.transform(t)+", "+ct.transform(e)+", "+ct.transform(n)+", "+ot(it.transform(i))+")"};const dt={test:lt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ht.transform},pt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mt=pt("deg"),ft=pt("%"),yt=pt("px"),gt=pt("vh"),vt=pt("vw"),xt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),Tt={test:lt("hsl","hue"),parse:ut("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 Mt(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 kt=t=>"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Dt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:Mt,getAnimatableNone:function(t){const e=Et(t);return Mt(t)(e.map(kt))}};function Rt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Bt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Rt(a,i,t+1/3),o=Rt(a,i,t),r=Rt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Ct(t,e){return n=>n>0?e:t}const jt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ot=[dt,ht,Tt];function Ft(e){const n=(i=e,Ot.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===Tt&&(s=Bt(s)),s}const It=(t,e)=>{const n=Ft(t),i=Ft(e);if(!n||!i)return Ct(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=jt(n.alpha,i.alpha,t),ht.transform(s))},Nt=new Set(["none","hidden"]);function Ut(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wt(t,e){return n=>jt(t,e,n)}function $t(t){return"number"==typeof t?Wt:"string"==typeof t?Q(t)?Ct:wt.test(t)?It:Yt:Array.isArray(t)?Kt:"object"==typeof t?wt.test(t)?It:zt:Ct}function Kt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function zt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=$t(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Yt=(e,n)=>{const i=Dt.createTransformer(n),s=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?Ut(e,n):d(Kt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ct(e,n))};function Xt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return jt(t,e,n);return $t(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>K(e),now:()=>z.isProcessing?z.timestamp:G.now()}},Gt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<qt;)e+=50,n=t.next(e);return e>=qt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}function Jt(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}const Qt=100,te=10,ee=1,ne=0,ie=800,se=.3,oe=.3,re={granular:.01,default:2},ae={granular:.005,default:.5},le=.01,ue=10,ce=.05,he=1,de=.001;function pe({duration:e=ie,bounce:n=se,velocity:s=ne,mass:o=ee}){let r,a;t.warning(e<=f(ue),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ce,he,l),e=i(le,ue,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),u=fe(Math.pow(t,2),l);return(-r(t)+de>0?-1:1)*((i-o)*a)/u}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const u=function(t,e,n){let i=n;for(let n=1;n<me;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=f(e),isNaN(u))return{stiffness:Qt,damping:te,duration:e};{const t=Math.pow(u,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}const me=12;function fe(t,e){return t*Math.sqrt(1-e*e)}const ye=["duration","bounce"],ge=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function xe(t=oe,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ne,stiffness:Qt,damping:te,mass:ee,isResolvedFromDuration:!1,...t};if(!ve(t,ge)&&ve(t,ye))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),o=s*s,r=2*i(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:ee,stiffness:o,damping:r}}else{const n=pe(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=p||0,v=c/(2*Math.sqrt(u*h)),x=a-r,T=y(Math.sqrt(u/h)),w=Math.abs(x)<5;let b;if(s||(s=w?re.granular:re.default),o||(o=w?ae.granular:ae.default),v<1){const t=fe(T,v);b=e=>{const n=Math.exp(-v*T*e);return a-n*((g+v*T*x)/t*Math.sin(t*e)+x*Math.cos(t*e))}}else if(1===v)b=t=>a-Math.exp(-T*t)*(x+(g+T*x)*t);else{const t=T*Math.sqrt(v*v-1);b=e=>{const n=Math.exp(-v*T*e),i=Math.min(t*e,300);return a-n*((g+v*T*x)*Math.sinh(i)+t*x*Math.cosh(i))/t}}const S={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)l.done=t>=d;else{let n=0===t?g:0;v<1&&(n=0===t?f(g):Jt(b,t,e));const i=Math.abs(n)<=s,r=Math.abs(a-e)<=o;l.done=i&&r}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(S),qt),e=Gt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=xe({keyframes:[d.value,p(d.value)],velocity:Jt(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};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 u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const i=[],s=n||o.mix||Xt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;o=d(t,o)}i.push(o)}return i}(n,r,a),m=h.length,f=t=>{if(u&&t<e[0])return n[0];let i=0;if(m>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=p(e[i],e[i+1],t);return h[i](s)};return s?t=>f(i(e[0],e[l-1],t)):f}function be(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=p(0,e,i);t.push(jt(n,1,s))}}function Se(t){const e=[0];return be(e,t.length-1),e}function Ae(t,e){return t.map(t=>t*e)}function 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=j(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=we(Ae(n&&n.length===e.length?n:Se(e),t),e,{ease:Array.isArray(s)?s: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 Me(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ee),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:Te,inertia:Te,tween:Ve,keyframes:Ve,spring:xe};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}class Re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Be=t=>t/100;class Ce extends Re{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;De(t);const{type:e=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,Xt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+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:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),x=i(0,1,n)*a}const w=v?{done:!1,value:c[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Te&&(w.value=Me(c,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function je(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Le=t=>180*t/Math.PI,Oe=t=>{const e=Le(Math.atan2(t[1],t[0]));return Ie(e)},Fe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Le(Math.atan(t[1])),skewY:t=>Le(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ue=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),We={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ne,scaleY:Ue,scale:t=>(Ne(t)+Ue(t))/2,rotateX:t=>Ie(Le(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(Le(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Le(Math.atan(t[4])),skewY:t=>Le(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function Ke(t,e){if(!t||"none"===t)return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=We,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Fe,s=e}if(!s)return $e(e);const o=i[e],r=s[1].split(",").map(Ye);return"function"==typeof o?o(r):r[o]}const ze=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)};function Ye(t){return parseFloat(t.trim())}const Xe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Xe))(),Ge=t=>t===nt||t===yt,qe=new Set(["x","y","z"]),Ze=Xe.filter(t=>!qe.has(t));const _e={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};_e.translateX=_e.x,_e.translateY=_e.y;const Je=new Set;let Qe=!1,tn=!1,en=!1;function nn(){if(tn){const t=Array.from(Je).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tn=!1,Qe=!1,Je.forEach(t=>t.complete(en)),Je.clear()}function sn(){Je.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tn=!0)})}function on(){en=!0,sn(),nn(),en=!1}class rn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Je.add(this),Qe||(Qe=!0,$.read(sn),$.resolveKeyframes(nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}je(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Je.delete(this)}cancel(){"scheduled"===this.state&&(Je.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const an=t=>t.startsWith("--");function ln(t,e,n){an(e)?t.style.setProperty(e,n):t.style[e]=n}const un=u(()=>void 0!==window.ScrollTimeline),cn={};function hn(t,e){const n=u(t);return()=>cn[e]??n()}const dn=hn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?dn()?Gt(t,e):"ease-out":O(t)?pn(t):Array.isArray(t)?t.map(t=>fn(t,e)||mn.easeOut):mn[t]:void 0}function yn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=fn(a,s);Array.isArray(h)&&(c.easing=h),U.value&&q.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return U.value&&p.finished.finally(()=>{q.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function vn({type:t,...e}){return gn(t)&&dn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends Re{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=vn(e);this.animation=yn(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Me(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ln(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){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&&un()?(this.animation.timeline=t,c):e(this)}}const Tn={anticipate:E,backInOut:V,circInOut:D};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(t),De(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ce({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),u=i(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Pn=new Set(["opacity","clipPath","filter","transform"]),Vn=u(()=>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:u}=e.owner.getProps();return Vn()&&n&&Pn.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Mn extends Re{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||rn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:u,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now(),function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Sn(o,n),l=Sn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||gn(i))&&s)}(e,r,a,l)||(!o.instantAnimations&&u||d?.(Me(e,i,n)),e[0]=e[e.length-1],An(i),i.repeat=0);const p={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!h&&En(p),f=p.motionValue?.owner?.current,y=m?new bn({...p,element:f}):new Ce(p);y.finished.then(()=>{this.notifyFinished()}).catch(c),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),on()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends xn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){const e=Cn.get(t)||new Map;return Cn.set(t,e),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Nn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=In(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return Q(o)?Nn(o,n,i+1):o}const Un={type:"spring",stiffness:500,damping:25,restSpeed:10},Wn={type:"keyframes",duration:.8},$n={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?Wn:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Un:$n,zn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(zn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function Xn(t,e){return t?.[e]??t?.default??t}function Hn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Xn(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=f(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,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};Hn(l)||Object.assign(h,Kn(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(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=Yn(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ce(h):new Mn(h)};function qn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Zn(t,e,n,i){if("function"==typeof e){const[s,o]=qn(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]=qn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function _n(t,e,n){const i=t.getProps();return Zn(i,e,void 0!==n?n:i.custom,t)}const Jn=new Set(["width","height","top","left","right","bottom",...Xe]),Qn={current:void 0};class ti{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new m);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Qn.current&&Qn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ei(t,e){return new ti(t,e)}const ni=t=>Array.isArray(t);function ii(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ei(n))}function si(t){return ni(t)?t[t.length-1]||0:t}function oi(t,e){const n=_n(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ii(t,e,si(o[e]))}}const ri=t=>Boolean(t&&t.getVelocity);function ai(t){return Boolean(ri(t)&&t.add)}function li(t,e){const n=t.getValue("willChange");if(ai(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function ui(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ci="framerAppearId",hi="data-"+ui(ci);function di(t){return t.props[hi]}function pi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function mi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],u=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||u&&pi(u,e))continue;const r={delay:n,...Xn(o||{},e)},c=i.get();if(void 0!==c&&!i.isAnimating&&!Array.isArray(s)&&s===c&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=di(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(r.startTime=t,h=!0)}}li(t,e),i.start(Gn(e,i,s,t.shouldReduceMotion&&Jn.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{$.update(()=>{r&&oi(t,r)})}),l}function fi(t,e,n={}){const i=_n(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(mi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function yi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>fi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=fi(t,e,n);else{const s="function"==typeof e?_n(t,e,n.custom):e;i=Promise.all(mi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const gi=t=>e=>e.test(t),vi=[nt,yt,ft,mt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],xi=t=>vi.find(gi(t));function Ti(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const wi=new Set(["brightness","contrast","saturate","opacity"]);function bi(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=wi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Si=/\b([a-z-]*)\(.*?\)/gu,Ai={...Dt,getAnimatableNone:t=>{const e=t.match(Si);return e?e.map(bi).join(" "):t}},Pi={...nt,transform:Math.round},Vi={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:mt,skewX:mt,skewY:mt,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:it,originX:xt,originY:xt,originZ:yt},Ei={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,...Vi,zIndex:Pi,fillOpacity:it,strokeOpacity:it,numOctaves:Pi},Mi={...Ei,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Ai,WebkitFilter:Ai},ki=t=>Mi[t];function Di(t,e){let n=ki(t);return n!==Ai&&(n=Dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ri=new Set(["auto","none","0"]);class Bi 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=Nn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Jn.has(n)||2!==t.length)return;const[i,s]=t,o=xi(i),r=xi(s);if(et(i)!==et(s)&&_e[n])this.needsMeasurement=!0;else if(o!==r)if(Ge(o)&&Ge(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ti(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&&!Ri.has(e)&&Vt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Di(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 Ci=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 ji(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Ci.has(e)&&(t[n]=t[n]+"px")}const Li=u(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Oi=new Set(["opacity","clipPath","filter","transform"]);function Fi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ii(t){return(e,n)=>{const i=Fi(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Ni=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ui{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?Ni(i,Ei[t]):i,n&&$.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&K(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 Wi(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 $i=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?ui(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Ki=Ii(Wi($i)),zi=Wi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Yi(t){return a(t)&&"offsetHeight"in t}const Xi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Hi=new Set(["originX","originY","originZ"]),Gi=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(Yi(t)||e.get("transformBox")||Gi(t,e,"transformBox",new ti("fill-box")),e.set("transform",new ti("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Xe.length;i++){const s=Xe[i],o=t.latest[s];if(void 0===o)continue;let r=!0;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")):Hi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ti(""),()=>{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)},qi=Ii(Wi(Gi)),Zi=yt.transform;const _i=Ii(Wi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Zi(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ti("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Zi(n)} ${Zi(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return $i(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Gi:$i)(t,e,n,i)}));const{schedule:Ji,cancel:Qi}=W(queueMicrotask,!1),ts={x:!1,y:!1};function es(){return ts.x||ts.y}function ns(t,e){const n=Fi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function is(t){return!("touch"===t.pointerType||es())}const ss=(t,e)=>!!e&&(t===e||ss(t,e.parentElement)),os=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,rs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function as(t){return rs.has(t.tagName)||!0===t.isContentEditable}const ls=new WeakSet;function us(t){return e=>{"Enter"===e.key&&t(e)}}function cs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function hs(t){return os(t)&&!es()}function ds(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function ps(t){return a(t)&&"ownerSVGElement"in t}const ms=new WeakMap;let fs;const ys=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ps(i)&&"getBBox"in i?i.getBBox()[e]:i[n],gs=ys("inline","width","offsetWidth"),vs=ys("block","height","offsetHeight");function xs({target:t,borderBoxSize:e}){ms.get(t)?.forEach(n=>{n(t,{get width(){return gs(t,e)},get height(){return vs(t,e)}})})}function Ts(t){t.forEach(xs)}function ws(t,e){fs||"undefined"!=typeof ResizeObserver&&(fs=new ResizeObserver(Ts));const n=Fi(t);return n.forEach(t=>{let n=ms.get(t);n||(n=new Set,ms.set(t,n)),n.add(e),fs?.observe(t)}),()=>{n.forEach(t=>{const n=ms.get(t);n?.delete(e),n?.size||fs?.unobserve(t)})}}const bs=new Set;let Ss;function As(t){return bs.add(t),Ss||(Ss=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};bs.forEach(e=>e(t))},window.addEventListener("resize",Ss)),()=>{bs.delete(t),bs.size||"function"!=typeof Ss||(window.removeEventListener("resize",Ss),Ss=void 0)}}function Ps(t,e){return"function"==typeof t?As(t):ws(t,e)}function Vs(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return $.preUpdate(i,!0),()=>K(i)}function Es(){const{value:t}=U;null!==t?(t.frameloop.rate.push(z.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):K(Es)}function Ms(t){return t.reduce((t,e)=>t+e,0)/t.length}function ks(t,e=Ms){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ds=t=>Math.round(1e3/t);function Rs(){U.value=null,U.addProjectionMetrics=null}function Bs(){const{value:t}=U;if(!t)throw new Error("Stats are not being measured");Rs(),K(Es);const e={frameloop:{setup:ks(t.frameloop.setup),rate:ks(t.frameloop.rate),read:ks(t.frameloop.read),resolveKeyframes:ks(t.frameloop.resolveKeyframes),preUpdate:ks(t.frameloop.preUpdate),update:ks(t.frameloop.update),preRender:ks(t.frameloop.preRender),render:ks(t.frameloop.render),postRender:ks(t.frameloop.postRender)},animations:{mainThread:ks(t.animations.mainThread),waapi:ks(t.animations.waapi),layout:ks(t.animations.layout)},layoutProjection:{nodes:ks(t.layoutProjection.nodes),calculatedTargetDeltas:ks(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:ks(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ds(n.min),n.max=Ds(n.max),n.avg=Ds(n.avg),[n.min,n.max]=[n.max,n.min],e}function Cs(t){return ps(t)&&"svg"===t.tagName}function js(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Ls(...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 Os(t){const e=[];Qn.current=e;const n=t();Qn.current=void 0;const i=ei(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>$.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),K(i)})}(e,i,t),i}function Fs(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(Is(t,a)),$.postRender(()=>{l(),o=new Ce({keyframes:[Ns(t.get()),Ns(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),ri(e)){const n=e.on("change",e=>t.set(Is(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Is(t,e){return e?t+e:t}function Ns(t){return"number"==typeof t?t:parseFloat(t)}const Us=[...vi,wt,Dt],Ws=t=>Us.find(gi(t));function $s(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Ks={},zs=null;const Ys=(t,e)=>{Ks[t]=e},Xs=()=>{zs||(zs=document.createElement("style"),zs.id="motion-view");let t="";for(const e in Ks){const n=Ks[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}zs.textContent=t,document.head.appendChild(zs),Ks={}},Hs=()=>{zs&&zs.parentElement&&zs.parentElement.removeChild(zs)};function Gs(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function qs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Zs(){return document.getAnimations().filter(qs)}const _s=["layout","enter","exit","new","old"];function Js(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Ys(":root",{"view-transition-name":"none"}),Ys("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Xs();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{Hs()}),new Promise(t=>{s.ready.then(()=>{const e=Zs(),s=[];n.forEach((t,e)=>{for(const n of _s){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Xn(i,t),...Xn(r,t)},l=$s(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 u=new xn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(u)}}});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=Gs(o);if(!r)continue;const a=n.get(r.layer);if(a)Qs(a,"enter")&&Qs(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Xn(i,n)};o.duration&&(o.duration=f(o.duration)),o=vn(o);const a=fn(o.ease,o.duration);e.updateTiming({delay:f(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function Qs(t,e){return t?.[e]?.keyframes.opacity}let to=[],eo=null;function no(){eo=null;const[t]=to;var e;t&&(n(to,e=t),eo=e,Js(e).then(t=>{e.notifyReady(t),t.finished.finally(no)}))}function io(){for(let t=to.length-1;t>=0;t--){const e=to[t],{interrupt:n}=e.options;if("immediate"===n){const n=to.slice(0,t+1).map(t=>t.update),i=to.slice(t+1);e.update=()=>{n.forEach(t=>t())},to=[e,...i];break}}eo&&"immediate"!==to[0]?.options.interrupt||no()}class so{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,to.push(n),Ji.render(io)}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 oo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ro=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ao=()=>({min:0,max:0}),lo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),uo={current:null},co={current:!1},ho="undefined"!=typeof window;function po(){if(co.current=!0,ho)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uo.current=t.matches;t.addEventListener("change",e),e()}else uo.current=!1}const mo=new WeakMap;function fo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function yo(t){return"string"==typeof t||Array.isArray(t)}const go=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vo=["initial",...go];function xo(t){return fo(t.animate)||vo.some(e=>yo(t[e]))}function To(t){return Boolean(xo(t)||t.variants)}function wo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ri(s))t.addValue(i,s);else if(ri(o))t.addValue(i,ei(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,ei(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const bo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let So={};class Ao{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=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.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=xo(e),this.isVariantNode=To(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ri(e)&&e.set(a[t])}}mount(t){this.current=t,mo.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:(co.current||po(),this.shouldReduceMotion=uo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),K(this.notifyUpdate),K(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&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in So){const e=So[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<bo.length;e++){const n=bo[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=wo(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=ei(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):!Ws(n)&&Dt.test(e)&&(n=Di(t,e)),this.setBaseTarget(t,ri(n)?n.get():n)),ri(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=Zn(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||ri(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new m),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ji.render(this.render)}}class Po extends Ao{constructor(){super(...arguments),this.KeyframeResolver=Bi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ri(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Vo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Eo(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 Mo(t){return void 0===t||1===t}function ko({scale:t,scaleX:e,scaleY:n}){return!Mo(t)||!Mo(e)||!Mo(n)}function Do(t){return ko(t)||Ro(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ro(t){return Bo(t.x)||Bo(t.y)}function Bo(t){return t&&"0%"!==t}function Co(t,e,n){return n+e*(t-n)}function jo(t,e,n,i,s){return void 0!==s&&(t=Co(t,s,i)),Co(t,n,i)+e}function Lo(t,e=0,n=1,i,s){t.min=jo(t.min,e,n,i,s),t.max=jo(t.max,e,n,i,s)}function Oo(t,{x:e,y:n}){Lo(t.x,e.translate,e.scale,e.originPoint),Lo(t.y,n.translate,n.scale,n.originPoint)}const Fo=.999999999999,Io=1.0000000000001;function No(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&&$o(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Oo(t,r)),i&&Do(o.latestValues)&&$o(t,o.latestValues))}e.x<Io&&e.x>Fo&&(e.x=1),e.y<Io&&e.y>Fo&&(e.y=1)}function Uo(t,e){t.min=t.min+e,t.max=t.max+e}function Wo(t,e,n,i,s=.5){Lo(t,e,n,jt(t.min,t.max,s),i)}function $o(t,e){Wo(t.x,e.x,e.scaleX,e.scale,e.originX),Wo(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ko(t,e){return Vo(Eo(t.getBoundingClientRect(),e))}const zo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yo=Xe.length;function Xo(t,e,n){let i="",s=!0;for(let o=0;o<Yo;o++){const r=Xe[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=Ni(a,Ei[r]);if(!l){s=!1;i+=`${zo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Ho(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(He.has(t))r=!0;else if(_(t))s[t]=n;else{const e=Ni(n,Ei[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Xo(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 Go(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 qo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${qo(t,e.target.x)}% ${qo(t,e.target.y)}%`}},_o={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Dt.parse(t);if(s.length>5)return i;const o=Dt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=jt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},Jo={borderRadius:{...Zo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zo,borderTopRightRadius:Zo,borderBottomLeftRadius:Zo,borderBottomRightRadius:Zo,boxShadow:_o};function Qo(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Jo[t]||"opacity"===t)}function tr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ri(i[e])||s&&ri(s[e])||Qo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class er extends Po{constructor(){super(...arguments),this.type="html",this.renderInstance=Go}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?$e(e):ze(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 Ko(t,e)}build(t,e,n){Ho(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return tr(t,e,n)}}class nr extends Ao{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 ir={offset:"stroke-dashoffset",array:"stroke-dasharray"},sr={offset:"strokeDashoffset",array:"strokeDasharray"};function or(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ir:sr;t[o.offset]=yt.transform(-i);const r=yt.transform(e),a=yt.transform(n);t[o.array]=`${r} ${a}`}const rr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ar(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Ho(t,a,u),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=c?.transformBox??"fill-box",delete h.transformBox);for(const t of rr)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&&or(h,s,o,r,!1)}const lr=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"]),ur=t=>"string"==typeof t&&"svg"===t.toLowerCase();function cr(t,e,n,i){Go(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(lr.has(n)?n:ui(n),e.attrs[n])}function hr(t,e,n){const i=tr(t,e,n);for(const n in t)if(ri(t[n])||ri(e[n])){i[-1!==Xe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class dr extends Po{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=ki(e);return t&&t.default||0}return e=lr.has(e)?e:ui(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return hr(t,e,n)}build(t,e,n){ar(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){cr(t,e,0,i)}mount(t){this.isSVGTag=ur(t.tagName),super.mount(t)}}const pr=vo.length;function mr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&mr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<pr;n++){const i=vo[n],s=t.props[i];(yo(s)||!1===s)&&(e[i]=s)}return e}function fr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const yr=[...go].reverse(),gr=go.length;function vr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!fr(e,t)}function xr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tr(){return{animate:xr(!0),whileInView:xr(),whileHover:xr(),whileTap:xr(),whileDrag:xr(),whileFocus:xr(),exit:xr()}}function wr(t,e){t.min=e.min,t.max=e.max}function br(t,e){wr(t.x,e.x),wr(t.y,e.y)}function Sr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ar(t){return t.max-t.min}function Pr(t,e,n){return Math.abs(t-e)<=n}function Vr(t,e,n,i=.5){t.origin=i,t.originPoint=jt(e.min,e.max,t.origin),t.scale=Ar(n)/Ar(e),t.translate=jt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Er(t,e,n,i){Vr(t.x,e.x,n.x,i?i.originX:void 0),Vr(t.y,e.y,n.y,i?i.originY:void 0)}function Mr(t,e,n){t.min=n.min+e.min,t.max=t.min+Ar(e)}function kr(t,e,n){Mr(t.x,e.x,n.x),Mr(t.y,e.y,n.y)}function Dr(t,e,n){t.min=e.min-n.min,t.max=t.min+Ar(e)}function Rr(t,e,n){Dr(t.x,e.x,n.x),Dr(t.y,e.y,n.y)}function Br(t,e,n,i,s){return t=Co(t-=e,1/n,i),void 0!==s&&(t=Co(t,1/s,i)),t}function Cr(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.test(e)){e=parseFloat(e);e=jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=jt(o.min,o.max,i);t===o&&(a-=e),t.min=Br(t.min,e,n,a,s),t.max=Br(t.max,e,n,a,s)}function jr(t,e,[n,i,s],o,r){Cr(t,e[n],e[i],e[s],e.scale,o,r)}const Lr=["x","scaleX","originX"],Or=["y","scaleY","originY"];function Fr(t,e,n,i){jr(t.x,e,Lr,n?n.x:void 0,i?i.x:void 0),jr(t.y,e,Or,n?n.y:void 0,i?i.y:void 0)}function Ir(t){return 0===t.translate&&1===t.scale}function Nr(t){return Ir(t.x)&&Ir(t.y)}function Ur(t,e){return t.min===e.min&&t.max===e.max}function Wr(t,e){return Ur(t.x,e.x)&&Ur(t.y,e.y)}function $r(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Kr(t,e){return $r(t.x,e.x)&&$r(t.y,e.y)}function zr(t){return Ar(t.x)/Ar(t.y)}function Yr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Xr(t){return[t("x"),t("y")]}function Hr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Gr=["TopLeft","TopRight","BottomLeft","BottomRight"],qr=Gr.length,Zr=t=>"string"==typeof t?parseFloat(t):t,_r=t=>"number"==typeof t||yt.test(t);function Jr(t,e,n,i,s,o){s?(t.opacity=jt(0,n.opacity??1,ta(i)),t.opacityExit=jt(e.opacity??1,0,ea(i))):o&&(t.opacity=jt(e.opacity??1,n.opacity??1,i));for(let s=0;s<qr;s++){const o=`border${Gr[s]}Radius`;let r=Qr(e,o),a=Qr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||_r(r)===_r(a)?(t[o]=Math.max(jt(Zr(r),Zr(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=jt(e.rotate||0,n.rotate||0,i))}function Qr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ta=na(0,.5,k),ea=na(.5,.95,c);function na(t,e,n){return i=>i<t?0:i>e?1:n(p(t,e,i))}function ia(t,e,n){const i=ri(t)?t:ei(t);return i.start(Gn("",i,e,n)),i.animation}function sa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const oa=(t,e)=>t.depth-e.depth;class ra{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(oa),this.isDirty=!1,this.children.forEach(t)}}function aa(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(K(i),t(o-e))};return $.setup(i,!0),()=>K(i)}function la(t,e){return aa(t,f(e))}function ua(t){return ri(t)?t.get():t}class ca{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 ha={hasAnimatedSinceResize:!0,hasEverUpdated:!1},da={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},pa=["","X","Y","Z"];let ma=0;function fa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ya(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=di(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ya(i)}function ga({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=ma++,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,U.value&&(da.nodes=da.calculatedTargetDeltas=da.calculatedProjections=0),this.nodes.forEach(Ta),this.nodes.forEach(Ea),this.nodes.forEach(Ma),this.nodes.forEach(wa),U.addProjectionMetrics&&U.addProjectionMetrics(da)},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 ra)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new m),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ps(e)&&!Cs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;$.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=aa(s,250),ha.hasAnimatedSinceResize&&(ha.hasAnimatedSinceResize=!1,this.nodes.forEach(Va)))})}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()||ja,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Kr(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Xn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||Va(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(),K(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(ka),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&&ya(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(Sa);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Aa);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Pa),this.nodes.forEach(va),this.nodes.forEach(xa)):this.nodes.forEach(Aa),this.clearAllSnapshots();const t=G.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,Y.update.process(z),Y.preRender.process(z),Y.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ji.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ba),this.sharedNodes.forEach(Da)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ar(this.snapshot.measuredBox.x)||Ar(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&&!Nr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Do(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)),Fa((i=n).x),Fa(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(Na))){const{scroll:t}=this.root;t&&(Uo(e.x,t.offset.x),Uo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(br(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&&br(e,t),Uo(e.x,s.offset.x),Uo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};br(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&&$o(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Do(i.latestValues)&&$o(n,i.latestValues)}return Do(this.latestValues)&&$o(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};br(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Do(n.latestValues))continue;ko(n.latestValues)&&n.updateSnapshot();const i=lo();br(i,n.measurePageBox()),Fr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Do(this.latestValues)&&Fr(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!==z.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=z.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kr(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):br(this.target,this.layout.layoutBox),Oo(this.target,this.targetDelta)):br(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),U.value&&da.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!ko(this.parent.latestValues)&&!Ro(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}},Rr(this.relativeTargetOrigin,e,n),br(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===z.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;br(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;No(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?(Sr(this.prevProjectionDelta.x,this.projectionDelta.x),Sr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Er(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Yr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),U.value&&da.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(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Ca));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ra(o.x,t.x,n),Ra(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Ba(l.x,d.x,p.x,m),Ba(l.y,d.y,p.y,m),h&&Wr(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),br(h,this.relativeTarget)),a&&(this.animationValues=s,Jr(s,i,this.latestValues,n,c,u)),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&&(K(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{ha.hasAnimatedSinceResize=!0,q.layout++,this.motionValue||(this.motionValue=ei(0)),this.currentAnimation=ia(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{q.layout--},onComplete:()=>{q.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ia(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ar(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ar(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}br(e,n),$o(e,s),Er(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ca);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&&fa("z",t,i,this.animationValues);for(let e=0;e<pa.length;e++)fa(`rotate${pa[e]}`,t,i,this.animationValues),fa(`skew${pa[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&&!Do(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Hr(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 Jo){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Jo[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(Sa),this.root.sharedNodes.clear()}}}function va(t){t.updateLayout()}function xa(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?Xr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ar(i);i.min=n[t].min,i.max=i.min+s}):Ia(s,e.layoutBox,n)&&Xr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ar(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}};Er(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?Er(a,t.applyTransform(i,!0),e.measuredBox):Er(a,n,e.layoutBox);const l=!Nr(r);let u=!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}};Rr(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Rr(a,n,o.layoutBox),Kr(r,a)||(u=!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:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ta(t){U.value&&da.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 wa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ba(t){t.clearSnapshot()}function Sa(t){t.clearMeasurements()}function Aa(t){t.isLayoutDirty=!1}function Pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Va(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ea(t){t.resolveTargetDelta()}function Ma(t){t.calcProjection()}function ka(t){t.resetSkewAndRotation()}function Da(t){t.removeLeadSnapshot()}function Ra(t,e,n){t.translate=jt(e.translate,0,n),t.scale=jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ba(t,e,n,i){t.min=jt(e.min,n.min,i),t.max=jt(e.max,n.max,i)}function Ca(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ja={duration:.45,ease:[.4,0,.1,1]},La=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Oa=La("applewebkit/")&&!La("chrome/")?Math.round:c;function Fa(t){t.min=Oa(t.min),t.max=Oa(t.max)}function Ia(t,e,n){return"position"===t||"preserve-aspect"===t&&!Pr(zr(e),zr(n),.2)}function Na(t){return t!==t.root&&t.scroll?.wasRoot}const Ua=ga({attachResizeListener:(t,e)=>sa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wa=t=>!t.isLayoutDirty&&t.willUpdate(!1);const $a={current:void 0},Ka=ga({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!$a.current){const t=new Ua({});t.mount(window),t.setOptions({layoutScroll:!0}),$a.current=t}return $a.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),za="[data-layout], [data-layout-id]",Ya=()=>{};function Xa(t){const e=Array.from(t.querySelectorAll(za));return t instanceof Element&&t.matches(za)&&(e.includes(t)||e.unshift(t)),e}function Ha(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e,layoutExit:t.hasAttribute("data-layout-exit")}}function Ga(t,e,n){const i=mo.get(t),s=i??new er({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Ka(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current||s.mount(t),i||mo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function qa(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Za=$,_a=N.reduce((t,e)=>(t[e]=t=>K(t),t),{});function Ja(t){return"object"==typeof t&&!Array.isArray(t)}function Qa(t,e,n,i){return null==t?[]:"string"==typeof t&&Ja(e)?Fi(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function tl(t,e,n){return t*(e+1)}function el(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 nl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:jt(o,r,s[n]),easing:L(i,n)})}function il(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function sl(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ol(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function rl(t,e){return e[t]||(e[t]=[]),e[t]}function al(t){return Array.isArray(t)?t:[t]}function ll(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ul=t=>"number"==typeof t,cl=t=>t.every(ul);function hl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ps(t)&&!Cs(t)?new dr(e):new er(e);n.mount(t),mo.set(t,n)}function dl(t){const e=new nr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),mo.set(t,e)}function pl(e,n,i,s){const o=[];if(function(t,e){return ri(t)||"number"==typeof t||"string"==typeof t&&!Ja(e)}(e,n))o.push(ia(e,Ja(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=Qa(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?hl:dl;mo.has(e)||s(e);const l=mo.get(e),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,a)),o.push(...mi(l,{...n,transition:u},{}))}}return o}function ml(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,el(d,a.at,h,c));continue}let[p,y,g={}]=a;void 0!==g.at&&(d=el(d,g.at,h,c));let v=0;const x=(e,i,s,a=0,l=0)=>{const u=al(e),{delay:c=0,times:h=Se(u),type:p="keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:b}=i;const S="function"==typeof c?c(a,l):c,A=u.length,P=gn(p)?p:o?.[p||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&cl(u)){const e=u[1]-u[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-u.length;if(E>0&&be(h,E),1===u.length&&u.unshift(null),y){t.invariant(y<20,"Repeat count too high, must be less than 20","repeat-count-high"),b=tl(b,y);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<y;t++){u.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":L(i,s-1))}il(h,y)}const M=V+b;nl(s,u,w,h,V,M),v=Math.max(S+b,v),m=Math.max(M,m)};if(ri(p))x(y,g,rl("default",ol(p,l)));else{const t=Qa(p,y,s,u),e=t.length;for(let n=0;n<e;n++){const i=ol(t[n],l);for(const t in y)x(y[t],ll(g,t),rl(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(sl);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(p(0,m,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[s]=r,c.transition[s]={...n,duration:m,ease:u,times:l,...i}}}),a}(e,n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...pl(n,t,e))}),s}function fl(t){return function(e,i,s){let o,r=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))r=ml(e,i,t);else{const{onComplete:n,...a}=s||{};"function"==typeof n&&(o=n),r=pl(e,i,a,t)}var a;const l=new Rn(r);return o&&l.finished.then(o),t&&(t.animations.push(l),l.finished.then(()=>{n(t.animations,l)})),l}}const yl=fl();const gl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Fi(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={...Xn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=Ln(e),l=jn(t,o.pseudoElement||""),u=r.get(l);u&&u.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]=ds(i,s)),je(e),ji(e,s),!o&&e.length<2&&e.unshift(ds(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))},vl=gl(),xl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Tl(t,e,n,i){const s=n[e],{length:o,position:r}=xl[e],a=s.current,l=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=p(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:g(s.current-a,u)}const wl={start:0,center:.5,end:1};function bl(t,e,n=0){let i=0;if(t in wl&&(t=wl[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 Sl=[0,0];function Al(t,e,n,i){let s=Array.isArray(t)?t:Sl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,wl[t]?t:"0"]),o=bl(s[0],n,i),r=bl(s[1],e),o-r}const Pl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Vl={x:0,y:0};function El(t,e,n){const{offset:s=Pl.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(Yi(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):Vl,u=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),c={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=Al(s[t],c[a],u[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 Ml(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){Tl(t,"x",e,n),Tl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&El(t,n,i)},notify:()=>e(n)}}const kl=new WeakMap,Dl=new WeakMap,Rl=new WeakMap,Bl=t=>t===document.scrollingElement?window:t;function Cl(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let i=Rl.get(e);i||(i=new Set,Rl.set(e,i));const s=Ml(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),!kl.has(e)){const t=()=>{for(const t of i)t.measure(z.timestamp);$.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>$.read(t);kl.set(e,s);const o=Bl(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&Dl.set(e,Ps(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=kl.get(e);return $.read(o,!1,!0),()=>{K(o);const t=Rl.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=kl.get(e);kl.delete(e),n&&(Bl(e).removeEventListener("scroll",n),Dl.get(e)?.(),window.removeEventListener("resize",n))}}const jl=new Map;function Ll({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=jl.get(e)??new Map;jl.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&un()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Cl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Ol={some:0,all:1};const Fl=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Bi,t.DOMVisualElement=Po,t.DocumentProjectionNode=Ua,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=ra,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=Ka,t.HTMLVisualElement=er,t.JSAnimation=Ce,t.KeyframeResolver=rn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Ya,this.rejectReady=Ya,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Ji.read(t=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Xa(this.scope),e=this.buildRecords(t),n=function(t){const e=new Map;return t.forEach(t=>{const{layoutExit:n}=Ha(t.element);n&&e.set(t.element,{...t,parent:t.element.parentNode,nextSibling:t.element.nextSibling})}),e}(e);e.forEach(({projection:t})=>{t.isPresent=!0,t.willUpdate()}),await this.updateDom();const i=Xa(this.scope),s=this.buildRecords(i),o=this.handleExitingElements(e,s,n);s.forEach(({projection:t})=>{t.isPresent=!0});const r=function(t,e){const n=t[0]||e[0];return n?.projection.root}(s,e);r?.didUpdate(),await new Promise(t=>{$.postRender(()=>t())});const a=function(t,e){const n=new Set,i=t=>{const e=t.projection.currentAnimation;e&&n.add(e)};return t.forEach(i),e.forEach(i),Array.from(n)}(s,o),l=new kn(a);if(o.length){const t=()=>{o.forEach(({element:t,visualElement:e})=>{t.isConnected&&t.remove(),e.unmount(),mo.delete(t)})};l.finished.then(t,t)}return l}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=qa(i,n,this.scope),{layout:s,layoutId:o}=Ha(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=Ga(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e,n){const i=new Set(e.map(t=>t.element)),s=[];return t.forEach(t=>{if(i.has(t.element))return;const e=n.get(t.element);if(!e)return t.visualElement.unmount(),void mo.delete(t.element);e.element.isConnected||function(t){if(!t.parent)return;t.nextSibling&&t.nextSibling.parentNode===t.parent?t.parent.insertBefore(t.element,t.nextSibling):t.parent.appendChild(t.element)}(e),t.projection.isPresent=!1,t.projection.options.layoutId&&t.projection.relegate(),s.push(t)}),s}},t.MotionGlobalConfig=o,t.MotionValue=ti,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=ca,t.ObjectVisualElement=nr,t.SVGVisualElement=dr,t.SubscriptionManager=m,t.ViewTransitionBuilder=so,t.VisualElement=Ao,t.acceleratedValues=Oi,t.activeAnimations=q,t.addAttrValue=$i,t.addDomEvent=sa,t.addScaleCorrector=function(t){for(const e in t)Jo[e]=t[e],_(e)&&(Jo[e].isCSSVariable=!0)},t.addStyleValue=Gi,t.addUniqueItem=e,t.addValueToWillChange=li,t.alpha=it,t.analyseComplexValue=Vt,t.animate=yl,t.animateMini=vl,t.animateMotionValue=Gn,t.animateSingleValue=ia,t.animateTarget=mi,t.animateValue=function(t){return new Ce(t)},t.animateVariant=fi,t.animateView=function(t,e={}){return new so(t,e)},t.animateVisualElement=yi,t.animationMapKey=jn,t.anticipate=E,t.applyAxisDelta=Lo,t.applyBoxDelta=Oo,t.applyGeneratorOptions=vn,t.applyPointDelta=jo,t.applyPxDefaults=ji,t.applyTreeDeltas=No,t.aspectRatio=zr,t.attachSpring=Fs,t.attrEffect=Ki,t.axisDeltaEquals=Yr,t.axisEquals=Ur,t.axisEqualsRounded=$r,t.backIn=P,t.backInOut=V,t.backOut=A,t.boxEquals=Wr,t.boxEqualsRounded=Kr,t.buildHTMLStyles=Ho,t.buildProjectionTransform=Hr,t.buildSVGAttrs=ar,t.buildSVGPath=or,t.buildTransform=Xo,t.calcAxisDelta=Vr,t.calcBoxDelta=Er,t.calcChildStagger=On,t.calcGeneratorDuration=Zt,t.calcLength=Ar,t.calcRelativeAxis=Mr,t.calcRelativeAxisPosition=Dr,t.calcRelativeBox=kr,t.calcRelativePosition=Rr,t.camelCaseAttributes=lr,t.camelToDash=ui,t.cancelFrame=K,t.cancelMicrotask=Qi,t.cancelSync=_a,t.checkVariantsDidChange=vr,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=wa,t.collectMotionValues=Qn,t.color=wt,t.compareByDepth=oa,t.complex=Dt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=Vo,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=Sr,t.copyAxisInto=wr,t.copyBoxInto=br,t.correctBorderRadius=Zo,t.correctBoxShadow=_o,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>yi(t,e,n)))}(t),n=Tr(),i=!0;const s=e=>(n,i)=>{const s=_n(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=mr(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<gr;e++){const d=yr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=yo(m),y=d===o?p.isActive:null;!1===y&&(h=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||fo(m)||"boolean"==typeof m)continue;const v=vr(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,A={...S,...b},P=e=>{x=!0,u.has(e)&&(T=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=ni(e)&&ni(n)?!fr(e,n):e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const V=g&&v;x&&(!V||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!V&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=_n(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=_n(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Tr()}}},t.createAxis=ao,t.createAxisDelta=oo,t.createBox=lo,t.createDelta=ro,t.createGeneratorEasing=_t,t.createProjectionNode=ga,t.createRenderBatcher=W,t.createScopedAnimate=fl,t.cubicBezier=w,t.cubicBezierAsString=pn,t.defaultEasing=Pe,t.defaultOffset=Se,t.defaultTransformValue=$e,t.defaultValueTypes=Mi,t.degrees=mt,t.delay=la,t.delayInSeconds=la,t.dimensionValueTypes=vi,t.distance=Fl,t.distance2D=function(t,e){const n=Fl(t.x,e.x),i=Fl(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Xr,t.easeIn=R,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=je,t.findDimensionValueType=xi,t.findValueType=Ws,t.flushKeyframeResolvers=on,t.frame=$,t.frameData=z,t.frameSteps=Y,t.generateLinearEasing=Gt,t.getAnimatableNone=Di,t.getAnimationMap=Ln,t.getComputedStyle=ds,t.getDefaultTransition=Kn,t.getDefaultValueType=ki,t.getEasingForSegment=L,t.getFeatureDefinitions=function(){return So},t.getFinalKeyframe=Yn,t.getMixer=$t,t.getOptimisedAppearId=di,t.getOriginIndex=js,t.getValueAsType=Ni,t.getValueTransition=Xn,t.getVariableValue=Nn,t.getVariantContext=mr,t.getViewAnimationLayerInfo=Gs,t.getViewAnimations=Zs,t.globalProjectionState=ha,t.has2DTranslate=Ro,t.hasReducedMotionListener=co,t.hasScale=ko,t.hasTransform=Do,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=ns(t,n),r=t=>{if(!is(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{is(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=Fi(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:Ol[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initPrefersReducedMotion=po,t.interpolate=we,t.invisibleValues=Nt,t.isAnimationControls=fo,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isControllingVariants=xo,t.isDeltaZero=Nr,t.isDragActive=es,t.isDragging=ts,t.isEasingArray=j,t.isElementKeyboardAccessible=as,t.isForcedMotionValue=Qo,t.isGenerator=gn,t.isHTMLElement=Yi,t.isKeyframesTarget=ni,t.isMotionValue=ri,t.isNear=Pr,t.isNodeOrChild=ss,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=os,t.isSVGElement=ps,t.isSVGSVGElement=Cs,t.isSVGTag=ur,t.isTransitionDefined=Hn,t.isVariantLabel=yo,t.isVariantNode=To,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in mn||dn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ai,t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=Ls(e,n,i);return Os(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Ko(t,n),{scroll:s}=e;return s&&(Uo(i.x,s.offset.x),Uo(i.y,s.offset.y)),i},t.measureViewportBox=Ko,t.memo=u,t.microtask=Ji,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Xt,t.mixArray=Kt,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Ct,t.mixLinearColor=Lt,t.mixNumber=jt,t.mixObject=zt,t.mixValues=Jr,t.mixVisibility=Ut,t.motionValue=ei,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Wa);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=c,t.number=nt,t.numberValueTypes=Ei,t.observeTimeline=Vs,t.optimizedAppearDataAttribute=hi,t.optimizedAppearDataId=ci,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Fi(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=In,t.parseValueFromTransform=Ke,t.percent=ft,t.pipe=d,t.pixelsToPercent=qo,t.positionalKeys=Jn,t.prefersReducedMotion=uo,t.press=function(t,e,n={}){const[i,s,o]=ns(t,n),r=t=>{const i=t.currentTarget;if(!hs(t))return;ls.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ls.has(i)&&ls.delete(i),hs(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ss(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Yi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=us(()=>{if(ls.has(n))return;cs(n,"down");const t=us(()=>{cs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>cs(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),as(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=p,t.progressPercentage=xt,t.propEffect=zi,t.propagateDirtyNodes=Ta,t.px=yt,t.readTransformValue=ze,t.recordStats=function(){if(U.value)throw Rs(),new Error("Stats are already being measured");const t=U;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(Es,!0),Bs},t.removeAxisDelta=Cr,t.removeAxisTransforms=jr,t.removeBoxTransforms=Fr,t.removeItem=n,t.removePointDelta=Br,t.renderHTML=Go,t.renderSVG=cr,t.resize=Ps,t.resolveElements=Fi,t.resolveMotionValue=ua,t.resolveVariant=_n,t.resolveVariantFromProps=Zn,t.reverseEasing=S,t.rgbUnit=ct,t.rgba=ht,t.rootProjectionNode=$a,t.scale=st,t.scaleCorrectors=Jo,t.scalePoint=Co,t.scrapeHTMLMotionValuesFromProps=tr,t.scrapeSVGMotionValuesFromProps=hr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return c;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Cl(n=>{t(n[e.axis].progress,n)},e):Vs(t,Ll(e))}(t,s):function(t,e){const n=Ll(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Vs(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Cl,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?ts[t]?null:(ts[t]=!0,()=>{ts[t]=!1}):ts.x||ts.y?null:(ts.x=ts.y=!0,()=>{ts.x=ts.y=!1})},t.setFeatureDefinitions=function(t){So=t},t.setStyle=ln,t.setTarget=oi,t.spring=xe,t.springValue=function(t,e){const n=ei(ri(t)?t.get():t);return Fs(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:js(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=U,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=qi,t.supportedWaapiEasing=mn,t.supportsBrowserAnimation=En,t.supportsFlags=cn,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=Li,t.supportsScrollTimeline=un,t.svgEffect=_i,t.sync=Za,t.testValueType=gi,t.time=G,t.transform=Ls,t.transformAxis=Wo,t.transformBox=$o,t.transformBoxPoints=Eo,t.transformPropOrder=Xe,t.transformProps=He,t.transformValue=Os,t.transformValueTypes=Vi,t.translateAxis=Uo,t.updateMotionValuesFromProps=wo,t.variantPriorityOrder=go,t.variantProps=vo,t.velocityPerSecond=g,t.vh=gt,t.visualElementStore=mo,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 u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class m{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,y=t=>t/1e3;function g(t,e){return e?t*(1e3/e):0}const v=new Set;const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},T=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function w(t,e,n,i){if(t===e&&n===i)return c;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=T(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:T(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=w(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),R=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const j=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return j(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:c,easeIn:R,easeInOut:C,easeOut:B,circIn:M,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return w(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],U={value:null,addProjectionMetrics:null};function W(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 u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={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(u),e&&U.value&&U.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(r,e?n:void 0),t),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming?s.timestamp:performance.now();n=!1,o.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule: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:$,cancel:K,state:z,steps:Y}=W("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},q={layout:0,mainThread:0,waapi:0},Z=t=>e=>"string"==typeof e&&e.startsWith(t),_=Z("--"),J=Z("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function et(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it={...nt,transform:t=>i(0,1,t)},st={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(t,e)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ut=(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}},ct={...nt,transform:t=>Math.round((t=>i(0,255,t))(t))},ht={test:lt("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ct.transform(t)+", "+ct.transform(e)+", "+ct.transform(n)+", "+ot(it.transform(i))+")"};const dt={test:lt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ht.transform},pt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mt=pt("deg"),ft=pt("%"),yt=pt("px"),gt=pt("vh"),vt=pt("vw"),xt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),Tt={test:lt("hsl","hue"),parse:ut("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ft.transform(ot(e))+", "+ft.transform(ot(n))+", "+ot(it.transform(i))+")"},wt={test:t=>ht.test(t)||dt.test(t)||Tt.test(t),parse:t=>ht.test(t)?ht.parse(t):Tt.test(t)?Tt.parse(t):dt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ht.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=wt.parse(t);return e.alpha=0,wt.transform(e)}},bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const St="number",At="color",Vt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Vt,t=>(wt.test(t)?(i.color.push(o),s.push(At),n.push(wt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(St),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Et(t){return Pt(t).values}function Mt(t){const{split:e,types:n}=Pt(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===St?ot(t[o]):e===At?wt.transform(t[o]):t[o]}return s}}const kt=t=>"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Dt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:Mt,getAnimatableNone:function(t){const e=Et(t);return Mt(t)(e.map(kt))}};function Rt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Bt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Rt(a,i,t+1/3),o=Rt(a,i,t),r=Rt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Ct(t,e){return n=>n>0?e:t}const jt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ot=[dt,ht,Tt];function Ft(e){const n=(i=e,Ot.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===Tt&&(s=Bt(s)),s}const It=(t,e)=>{const n=Ft(t),i=Ft(e);if(!n||!i)return Ct(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=jt(n.alpha,i.alpha,t),ht.transform(s))},Nt=new Set(["none","hidden"]);function Ut(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wt(t,e){return n=>jt(t,e,n)}function $t(t){return"number"==typeof t?Wt:"string"==typeof t?Q(t)?Ct:wt.test(t)?It:Yt:Array.isArray(t)?Kt:"object"==typeof t?wt.test(t)?It:zt:Ct}function Kt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function zt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=$t(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Yt=(e,n)=>{const i=Dt.createTransformer(n),s=Pt(e),o=Pt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Nt.has(e)&&!o.values.length||Nt.has(n)&&!s.values.length?Ut(e,n):d(Kt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ct(e,n))};function Xt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return jt(t,e,n);return $t(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>K(e),now:()=>z.isProcessing?z.timestamp:G.now()}},Gt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<qt;)e+=50,n=t.next(e);return e>=qt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}function Jt(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}const Qt=100,te=10,ee=1,ne=0,ie=800,se=.3,oe=.3,re={granular:.01,default:2},ae={granular:.005,default:.5},le=.01,ue=10,ce=.05,he=1,de=.001;function pe({duration:e=ie,bounce:n=se,velocity:s=ne,mass:o=ee}){let r,a;t.warning(e<=f(ue),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ce,he,l),e=i(le,ue,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),u=fe(Math.pow(t,2),l);return(-r(t)+de>0?-1:1)*((i-o)*a)/u}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const u=function(t,e,n){let i=n;for(let n=1;n<me;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=f(e),isNaN(u))return{stiffness:Qt,damping:te,duration:e};{const t=Math.pow(u,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}const me=12;function fe(t,e){return t*Math.sqrt(1-e*e)}const ye=["duration","bounce"],ge=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function xe(t=oe,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ne,stiffness:Qt,damping:te,mass:ee,isResolvedFromDuration:!1,...t};if(!ve(t,ge)&&ve(t,ye))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),o=s*s,r=2*i(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:ee,stiffness:o,damping:r}}else{const n=pe(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=p||0,v=c/(2*Math.sqrt(u*h)),x=a-r,T=y(Math.sqrt(u/h)),w=Math.abs(x)<5;let b;if(s||(s=w?re.granular:re.default),o||(o=w?ae.granular:ae.default),v<1){const t=fe(T,v);b=e=>{const n=Math.exp(-v*T*e);return a-n*((g+v*T*x)/t*Math.sin(t*e)+x*Math.cos(t*e))}}else if(1===v)b=t=>a-Math.exp(-T*t)*(x+(g+T*x)*t);else{const t=T*Math.sqrt(v*v-1);b=e=>{const n=Math.exp(-v*T*e),i=Math.min(t*e,300);return a-n*((g+v*T*x)*Math.sinh(i)+t*x*Math.cosh(i))/t}}const S={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)l.done=t>=d;else{let n=0===t?g:0;v<1&&(n=0===t?f(g):Jt(b,t,e));const i=Math.abs(n)<=s,r=Math.abs(a-e)<=o;l.done=i&&r}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(S),qt),e=Gt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=xe({keyframes:[d.value,p(d.value)],velocity:Jt(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};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 u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const i=[],s=n||o.mix||Xt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;o=d(t,o)}i.push(o)}return i}(n,r,a),m=h.length,f=t=>{if(u&&t<e[0])return n[0];let i=0;if(m>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=p(e[i],e[i+1],t);return h[i](s)};return s?t=>f(i(e[0],e[l-1],t)):f}function be(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=p(0,e,i);t.push(jt(n,1,s))}}function Se(t){const e=[0];return be(e,t.length-1),e}function Ae(t,e){return t.map(t=>t*e)}function Ve(t,e){return t.map(()=>e||C).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=j(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=we(Ae(n&&n.length===e.length?n:Se(e),t),e,{ease:Array.isArray(s)?s:Ve(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}xe.applyToOptions=t=>{const e=_t(t,100,xe);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};const Ee=t=>null!==t;function Me(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ee),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:Te,inertia:Te,tween:Pe,keyframes:Pe,spring:xe};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}class Re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Be=t=>t/100;class Ce extends Re{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;De(t);const{type:e=Pe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Pe;a!==Pe&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Be,Xt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+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:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),x=i(0,1,n)*a}const w=v?{done:!1,value:c[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Te&&(w.value=Me(c,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function je(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Le=t=>180*t/Math.PI,Oe=t=>{const e=Le(Math.atan2(t[1],t[0]));return Ie(e)},Fe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Le(Math.atan(t[1])),skewY:t=>Le(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ue=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),We={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ne,scaleY:Ue,scale:t=>(Ne(t)+Ue(t))/2,rotateX:t=>Ie(Le(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(Le(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Le(Math.atan(t[4])),skewY:t=>Le(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function Ke(t,e){if(!t||"none"===t)return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=We,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Fe,s=e}if(!s)return $e(e);const o=i[e],r=s[1].split(",").map(Ye);return"function"==typeof o?o(r):r[o]}const ze=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)};function Ye(t){return parseFloat(t.trim())}const Xe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Xe))(),Ge=t=>t===nt||t===yt,qe=new Set(["x","y","z"]),Ze=Xe.filter(t=>!qe.has(t));const _e={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};_e.translateX=_e.x,_e.translateY=_e.y;const Je=new Set;let Qe=!1,tn=!1,en=!1;function nn(){if(tn){const t=Array.from(Je).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tn=!1,Qe=!1,Je.forEach(t=>t.complete(en)),Je.clear()}function sn(){Je.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tn=!0)})}function on(){en=!0,sn(),nn(),en=!1}class rn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Je.add(this),Qe||(Qe=!0,$.read(sn),$.resolveKeyframes(nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}je(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Je.delete(this)}cancel(){"scheduled"===this.state&&(Je.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const an=t=>t.startsWith("--");function ln(t,e,n){an(e)?t.style.setProperty(e,n):t.style[e]=n}const un=u(()=>void 0!==window.ScrollTimeline),cn={};function hn(t,e){const n=u(t);return()=>cn[e]??n()}const dn=hn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?dn()?Gt(t,e):"ease-out":O(t)?pn(t):Array.isArray(t)?t.map(t=>fn(t,e)||mn.easeOut):mn[t]:void 0}function yn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=fn(a,s);Array.isArray(h)&&(c.easing=h),U.value&&q.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return U.value&&p.finished.finally(()=>{q.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function vn({type:t,...e}){return gn(t)&&dn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends Re{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=vn(e);this.animation=yn(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Me(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ln(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){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&&un()?(this.animation.timeline=t,c):e(this)}}const Tn={anticipate:E,backInOut:P,circInOut:D};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(t),De(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ce({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),u=i(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Vn=new Set(["opacity","clipPath","filter","transform"]),Pn=u(()=>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:u}=e.owner.getProps();return Pn()&&n&&Vn.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Mn extends Re{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||rn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:u,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now(),function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Sn(o,n),l=Sn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||gn(i))&&s)}(e,r,a,l)||(!o.instantAnimations&&u||d?.(Me(e,i,n)),e[0]=e[e.length-1],An(i),i.repeat=0);const p={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!h&&En(p),f=p.motionValue?.owner?.current,y=m?new bn({...p,element:f}):new Ce(p);y.finished.then(()=>{this.notifyFinished()}).catch(c),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),on()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends xn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){const e=Cn.get(t)||new Map;return Cn.set(t,e),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Nn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=In(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return Q(o)?Nn(o,n,i+1):o}const Un={type:"spring",stiffness:500,damping:25,restSpeed:10},Wn={type:"keyframes",duration:.8},$n={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?Wn:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Un:$n,zn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(zn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function Xn(t,e){return t?.[e]??t?.default??t}function Hn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Xn(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=f(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,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};Hn(l)||Object.assign(h,Kn(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(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=Yn(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ce(h):new Mn(h)};function qn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Zn(t,e,n,i){if("function"==typeof e){const[s,o]=qn(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]=qn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function _n(t,e,n){const i=t.getProps();return Zn(i,e,void 0!==n?n:i.custom,t)}const Jn=new Set(["width","height","top","left","right","bottom",...Xe]),Qn={current:void 0};class ti{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new m);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Qn.current&&Qn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ei(t,e){return new ti(t,e)}const ni=t=>Array.isArray(t);function ii(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ei(n))}function si(t){return ni(t)?t[t.length-1]||0:t}function oi(t,e){const n=_n(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ii(t,e,si(o[e]))}}const ri=t=>Boolean(t&&t.getVelocity);function ai(t){return Boolean(ri(t)&&t.add)}function li(t,e){const n=t.getValue("willChange");if(ai(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function ui(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ci="framerAppearId",hi="data-"+ui(ci);function di(t){return t.props[hi]}function pi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function mi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],u=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||u&&pi(u,e))continue;const r={delay:n,...Xn(o||{},e)},c=i.get();if(void 0!==c&&!i.isAnimating&&!Array.isArray(s)&&s===c&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=di(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(r.startTime=t,h=!0)}}li(t,e),i.start(Gn(e,i,s,t.shouldReduceMotion&&Jn.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{$.update(()=>{r&&oi(t,r)})}),l}function fi(t,e,n={}){const i=_n(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(mi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(fi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function yi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>fi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=fi(t,e,n);else{const s="function"==typeof e?_n(t,e,n.custom):e;i=Promise.all(mi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const gi=t=>e=>e.test(t),vi=[nt,yt,ft,mt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],xi=t=>vi.find(gi(t));function Ti(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const wi=new Set(["brightness","contrast","saturate","opacity"]);function bi(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=wi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Si=/\b([a-z-]*)\(.*?\)/gu,Ai={...Dt,getAnimatableNone:t=>{const e=t.match(Si);return e?e.map(bi).join(" "):t}},Vi={...nt,transform:Math.round},Pi={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:mt,skewX:mt,skewY:mt,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:it,originX:xt,originY:xt,originZ:yt},Ei={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,...Pi,zIndex:Vi,fillOpacity:it,strokeOpacity:it,numOctaves:Vi},Mi={...Ei,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Ai,WebkitFilter:Ai},ki=t=>Mi[t];function Di(t,e){let n=ki(t);return n!==Ai&&(n=Dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ri=new Set(["auto","none","0"]);class Bi 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=Nn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Jn.has(n)||2!==t.length)return;const[i,s]=t,o=xi(i),r=xi(s);if(et(i)!==et(s)&&_e[n])this.needsMeasurement=!0;else if(o!==r)if(Ge(o)&&Ge(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ti(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&&!Ri.has(e)&&Pt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Di(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 Ci=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 ji(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Ci.has(e)&&(t[n]=t[n]+"px")}const Li=u(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Oi=new Set(["opacity","clipPath","filter","transform"]);function Fi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ii(t){return(e,n)=>{const i=Fi(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Ni=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ui{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?Ni(i,Ei[t]):i,n&&$.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&K(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 Wi(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 $i=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?ui(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Ki=Ii(Wi($i)),zi=Wi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Yi(t){return a(t)&&"offsetHeight"in t}const Xi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Hi=new Set(["originX","originY","originZ"]),Gi=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(Yi(t)||e.get("transformBox")||Gi(t,e,"transformBox",new ti("fill-box")),e.set("transform",new ti("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Xe.length;i++){const s=Xe[i],o=t.latest[s];if(void 0===o)continue;let r=!0;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")):Hi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ti(""),()=>{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)},qi=Ii(Wi(Gi)),Zi=yt.transform;const _i=Ii(Wi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Zi(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ti("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Zi(n)} ${Zi(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return $i(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Gi:$i)(t,e,n,i)}));const{schedule:Ji,cancel:Qi}=W(queueMicrotask,!1),ts={x:!1,y:!1};function es(){return ts.x||ts.y}function ns(t,e){const n=Fi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function is(t){return!("touch"===t.pointerType||es())}const ss=(t,e)=>!!e&&(t===e||ss(t,e.parentElement)),os=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,rs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function as(t){return rs.has(t.tagName)||!0===t.isContentEditable}const ls=new WeakSet;function us(t){return e=>{"Enter"===e.key&&t(e)}}function cs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function hs(t){return os(t)&&!es()}function ds(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function ps(t){return a(t)&&"ownerSVGElement"in t}const ms=new WeakMap;let fs;const ys=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ps(i)&&"getBBox"in i?i.getBBox()[e]:i[n],gs=ys("inline","width","offsetWidth"),vs=ys("block","height","offsetHeight");function xs({target:t,borderBoxSize:e}){ms.get(t)?.forEach(n=>{n(t,{get width(){return gs(t,e)},get height(){return vs(t,e)}})})}function Ts(t){t.forEach(xs)}function ws(t,e){fs||"undefined"!=typeof ResizeObserver&&(fs=new ResizeObserver(Ts));const n=Fi(t);return n.forEach(t=>{let n=ms.get(t);n||(n=new Set,ms.set(t,n)),n.add(e),fs?.observe(t)}),()=>{n.forEach(t=>{const n=ms.get(t);n?.delete(e),n?.size||fs?.unobserve(t)})}}const bs=new Set;let Ss;function As(t){return bs.add(t),Ss||(Ss=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};bs.forEach(e=>e(t))},window.addEventListener("resize",Ss)),()=>{bs.delete(t),bs.size||"function"!=typeof Ss||(window.removeEventListener("resize",Ss),Ss=void 0)}}function Vs(t,e){return"function"==typeof t?As(t):ws(t,e)}function Ps(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return $.preUpdate(i,!0),()=>K(i)}function Es(){const{value:t}=U;null!==t?(t.frameloop.rate.push(z.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):K(Es)}function Ms(t){return t.reduce((t,e)=>t+e,0)/t.length}function ks(t,e=Ms){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ds=t=>Math.round(1e3/t);function Rs(){U.value=null,U.addProjectionMetrics=null}function Bs(){const{value:t}=U;if(!t)throw new Error("Stats are not being measured");Rs(),K(Es);const e={frameloop:{setup:ks(t.frameloop.setup),rate:ks(t.frameloop.rate),read:ks(t.frameloop.read),resolveKeyframes:ks(t.frameloop.resolveKeyframes),preUpdate:ks(t.frameloop.preUpdate),update:ks(t.frameloop.update),preRender:ks(t.frameloop.preRender),render:ks(t.frameloop.render),postRender:ks(t.frameloop.postRender)},animations:{mainThread:ks(t.animations.mainThread),waapi:ks(t.animations.waapi),layout:ks(t.animations.layout)},layoutProjection:{nodes:ks(t.layoutProjection.nodes),calculatedTargetDeltas:ks(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:ks(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ds(n.min),n.max=Ds(n.max),n.avg=Ds(n.avg),[n.min,n.max]=[n.max,n.min],e}function Cs(t){return ps(t)&&"svg"===t.tagName}function js(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Ls(...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 Os(t){const e=[];Qn.current=e;const n=t();Qn.current=void 0;const i=ei(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>$.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),K(i)})}(e,i,t),i}function Fs(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(Is(t,a)),$.postRender(()=>{l(),o=new Ce({keyframes:[Ns(t.get()),Ns(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),ri(e)){const n=e.on("change",e=>t.set(Is(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Is(t,e){return e?t+e:t}function Ns(t){return"number"==typeof t?t:parseFloat(t)}const Us=[...vi,wt,Dt],Ws=t=>Us.find(gi(t));function $s(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Ks={},zs=null;const Ys=(t,e)=>{Ks[t]=e},Xs=()=>{zs||(zs=document.createElement("style"),zs.id="motion-view");let t="";for(const e in Ks){const n=Ks[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}zs.textContent=t,document.head.appendChild(zs),Ks={}},Hs=()=>{zs&&zs.parentElement&&zs.parentElement.removeChild(zs)};function Gs(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function qs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Zs(){return document.getAnimations().filter(qs)}const _s=["layout","enter","exit","new","old"];function Js(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Ys(":root",{"view-transition-name":"none"}),Ys("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Xs();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{Hs()}),new Promise(t=>{s.ready.then(()=>{const e=Zs(),s=[];n.forEach((t,e)=>{for(const n of _s){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Xn(i,t),...Xn(r,t)},l=$s(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 u=new xn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(u)}}});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=Gs(o);if(!r)continue;const a=n.get(r.layer);if(a)Qs(a,"enter")&&Qs(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Xn(i,n)};o.duration&&(o.duration=f(o.duration)),o=vn(o);const a=fn(o.ease,o.duration);e.updateTiming({delay:f(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function Qs(t,e){return t?.[e]?.keyframes.opacity}let to=[],eo=null;function no(){eo=null;const[t]=to;var e;t&&(n(to,e=t),eo=e,Js(e).then(t=>{e.notifyReady(t),t.finished.finally(no)}))}function io(){for(let t=to.length-1;t>=0;t--){const e=to[t],{interrupt:n}=e.options;if("immediate"===n){const n=to.slice(0,t+1).map(t=>t.update),i=to.slice(t+1);e.update=()=>{n.forEach(t=>t())},to=[e,...i];break}}eo&&"immediate"!==to[0]?.options.interrupt||no()}class so{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,to.push(n),Ji.render(io)}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 oo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ro=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ao=()=>({min:0,max:0}),lo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),uo={current:null},co={current:!1},ho="undefined"!=typeof window;function po(){if(co.current=!0,ho)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uo.current=t.matches;t.addEventListener("change",e),e()}else uo.current=!1}const mo=new WeakMap;function fo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function yo(t){return"string"==typeof t||Array.isArray(t)}const go=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vo=["initial",...go];function xo(t){return fo(t.animate)||vo.some(e=>yo(t[e]))}function To(t){return Boolean(xo(t)||t.variants)}function wo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ri(s))t.addValue(i,s);else if(ri(o))t.addValue(i,ei(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,ei(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const bo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let So={};class Ao{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=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.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=xo(e),this.isVariantNode=To(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ri(e)&&e.set(a[t])}}mount(t){this.current=t,mo.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:(co.current||po(),this.shouldReduceMotion=uo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),K(this.notifyUpdate),K(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&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in So){const e=So[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<bo.length;e++){const n=bo[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=wo(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=ei(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):!Ws(n)&&Dt.test(e)&&(n=Di(t,e)),this.setBaseTarget(t,ri(n)?n.get():n)),ri(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=Zn(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||ri(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new m),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ji.render(this.render)}}class Vo extends Ao{constructor(){super(...arguments),this.KeyframeResolver=Bi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ri(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Po({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Eo(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 Mo(t){return void 0===t||1===t}function ko({scale:t,scaleX:e,scaleY:n}){return!Mo(t)||!Mo(e)||!Mo(n)}function Do(t){return ko(t)||Ro(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ro(t){return Bo(t.x)||Bo(t.y)}function Bo(t){return t&&"0%"!==t}function Co(t,e,n){return n+e*(t-n)}function jo(t,e,n,i,s){return void 0!==s&&(t=Co(t,s,i)),Co(t,n,i)+e}function Lo(t,e=0,n=1,i,s){t.min=jo(t.min,e,n,i,s),t.max=jo(t.max,e,n,i,s)}function Oo(t,{x:e,y:n}){Lo(t.x,e.translate,e.scale,e.originPoint),Lo(t.y,n.translate,n.scale,n.originPoint)}const Fo=.999999999999,Io=1.0000000000001;function No(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&&$o(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Oo(t,r)),i&&Do(o.latestValues)&&$o(t,o.latestValues))}e.x<Io&&e.x>Fo&&(e.x=1),e.y<Io&&e.y>Fo&&(e.y=1)}function Uo(t,e){t.min=t.min+e,t.max=t.max+e}function Wo(t,e,n,i,s=.5){Lo(t,e,n,jt(t.min,t.max,s),i)}function $o(t,e){Wo(t.x,e.x,e.scaleX,e.scale,e.originX),Wo(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ko(t,e){return Po(Eo(t.getBoundingClientRect(),e))}const zo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yo=Xe.length;function Xo(t,e,n){let i="",s=!0;for(let o=0;o<Yo;o++){const r=Xe[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=Ni(a,Ei[r]);if(!l){s=!1;i+=`${zo[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Ho(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(He.has(t))r=!0;else if(_(t))s[t]=n;else{const e=Ni(n,Ei[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Xo(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 Go(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 qo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${qo(t,e.target.x)}% ${qo(t,e.target.y)}%`}},_o={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Dt.parse(t);if(s.length>5)return i;const o=Dt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=jt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},Jo={borderRadius:{...Zo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zo,borderTopRightRadius:Zo,borderBottomLeftRadius:Zo,borderBottomRightRadius:Zo,boxShadow:_o};function Qo(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Jo[t]||"opacity"===t)}function tr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ri(i[e])||s&&ri(s[e])||Qo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class er extends Vo{constructor(){super(...arguments),this.type="html",this.renderInstance=Go}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?$e(e):ze(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 Ko(t,e)}build(t,e,n){Ho(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return tr(t,e,n)}}class nr extends Ao{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 ir={offset:"stroke-dashoffset",array:"stroke-dasharray"},sr={offset:"strokeDashoffset",array:"strokeDasharray"};function or(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ir:sr;t[o.offset]=yt.transform(-i);const r=yt.transform(e),a=yt.transform(n);t[o.array]=`${r} ${a}`}const rr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ar(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Ho(t,a,u),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=c?.transformBox??"fill-box",delete h.transformBox);for(const t of rr)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&&or(h,s,o,r,!1)}const lr=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"]),ur=t=>"string"==typeof t&&"svg"===t.toLowerCase();function cr(t,e,n,i){Go(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(lr.has(n)?n:ui(n),e.attrs[n])}function hr(t,e,n){const i=tr(t,e,n);for(const n in t)if(ri(t[n])||ri(e[n])){i[-1!==Xe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class dr extends Vo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=ki(e);return t&&t.default||0}return e=lr.has(e)?e:ui(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return hr(t,e,n)}build(t,e,n){ar(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){cr(t,e,0,i)}mount(t){this.isSVGTag=ur(t.tagName),super.mount(t)}}const pr=vo.length;function mr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&mr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<pr;n++){const i=vo[n],s=t.props[i];(yo(s)||!1===s)&&(e[i]=s)}return e}function fr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const yr=[...go].reverse(),gr=go.length;function vr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!fr(e,t)}function xr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tr(){return{animate:xr(!0),whileInView:xr(),whileHover:xr(),whileTap:xr(),whileDrag:xr(),whileFocus:xr(),exit:xr()}}function wr(t,e){t.min=e.min,t.max=e.max}function br(t,e){wr(t.x,e.x),wr(t.y,e.y)}function Sr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ar(t){return t.max-t.min}function Vr(t,e,n){return Math.abs(t-e)<=n}function Pr(t,e,n,i=.5){t.origin=i,t.originPoint=jt(e.min,e.max,t.origin),t.scale=Ar(n)/Ar(e),t.translate=jt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Er(t,e,n,i){Pr(t.x,e.x,n.x,i?i.originX:void 0),Pr(t.y,e.y,n.y,i?i.originY:void 0)}function Mr(t,e,n){t.min=n.min+e.min,t.max=t.min+Ar(e)}function kr(t,e,n){Mr(t.x,e.x,n.x),Mr(t.y,e.y,n.y)}function Dr(t,e,n){t.min=e.min-n.min,t.max=t.min+Ar(e)}function Rr(t,e,n){Dr(t.x,e.x,n.x),Dr(t.y,e.y,n.y)}function Br(t,e,n,i,s){return t=Co(t-=e,1/n,i),void 0!==s&&(t=Co(t,1/s,i)),t}function Cr(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.test(e)){e=parseFloat(e);e=jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=jt(o.min,o.max,i);t===o&&(a-=e),t.min=Br(t.min,e,n,a,s),t.max=Br(t.max,e,n,a,s)}function jr(t,e,[n,i,s],o,r){Cr(t,e[n],e[i],e[s],e.scale,o,r)}const Lr=["x","scaleX","originX"],Or=["y","scaleY","originY"];function Fr(t,e,n,i){jr(t.x,e,Lr,n?n.x:void 0,i?i.x:void 0),jr(t.y,e,Or,n?n.y:void 0,i?i.y:void 0)}function Ir(t){return 0===t.translate&&1===t.scale}function Nr(t){return Ir(t.x)&&Ir(t.y)}function Ur(t,e){return t.min===e.min&&t.max===e.max}function Wr(t,e){return Ur(t.x,e.x)&&Ur(t.y,e.y)}function $r(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Kr(t,e){return $r(t.x,e.x)&&$r(t.y,e.y)}function zr(t){return Ar(t.x)/Ar(t.y)}function Yr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Xr(t){return[t("x"),t("y")]}function Hr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Gr=["TopLeft","TopRight","BottomLeft","BottomRight"],qr=Gr.length,Zr=t=>"string"==typeof t?parseFloat(t):t,_r=t=>"number"==typeof t||yt.test(t);function Jr(t,e,n,i,s,o){s?(t.opacity=jt(0,n.opacity??1,ta(i)),t.opacityExit=jt(e.opacity??1,0,ea(i))):o&&(t.opacity=jt(e.opacity??1,n.opacity??1,i));for(let s=0;s<qr;s++){const o=`border${Gr[s]}Radius`;let r=Qr(e,o),a=Qr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||_r(r)===_r(a)?(t[o]=Math.max(jt(Zr(r),Zr(a),i),0),(ft.test(a)||ft.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=jt(e.rotate||0,n.rotate||0,i))}function Qr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ta=na(0,.5,k),ea=na(.5,.95,c);function na(t,e,n){return i=>i<t?0:i>e?1:n(p(t,e,i))}function ia(t,e,n){const i=ri(t)?t:ei(t);return i.start(Gn("",i,e,n)),i.animation}function sa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const oa=(t,e)=>t.depth-e.depth;class ra{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(oa),this.isDirty=!1,this.children.forEach(t)}}function aa(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(K(i),t(o-e))};return $.setup(i,!0),()=>K(i)}function la(t,e){return aa(t,f(e))}function ua(t){return ri(t)?t.get():t}class ca{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 ha={hasAnimatedSinceResize:!0,hasEverUpdated:!1},da={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},pa=["","X","Y","Z"];let ma=0;function fa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ya(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=di(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ya(i)}function ga({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=ma++,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,U.value&&(da.nodes=da.calculatedTargetDeltas=da.calculatedProjections=0),this.nodes.forEach(Ta),this.nodes.forEach(Ea),this.nodes.forEach(Ma),this.nodes.forEach(wa),U.addProjectionMetrics&&U.addProjectionMetrics(da)},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 ra)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new m),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ps(e)&&!Cs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;$.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=aa(s,250),ha.hasAnimatedSinceResize&&(ha.hasAnimatedSinceResize=!1,this.nodes.forEach(Pa)))})}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()||ja,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Kr(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Xn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||Pa(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(),K(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(ka),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&&ya(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(Sa);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Aa);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Va),this.nodes.forEach(va),this.nodes.forEach(xa)):this.nodes.forEach(Aa),this.clearAllSnapshots();const t=G.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,Y.update.process(z),Y.preRender.process(z),Y.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ji.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ba),this.sharedNodes.forEach(Da)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ar(this.snapshot.measuredBox.x)||Ar(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&&!Nr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Do(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)),Fa((i=n).x),Fa(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(Na))){const{scroll:t}=this.root;t&&(Uo(e.x,t.offset.x),Uo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(br(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&&br(e,t),Uo(e.x,s.offset.x),Uo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};br(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&&$o(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Do(i.latestValues)&&$o(n,i.latestValues)}return Do(this.latestValues)&&$o(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};br(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Do(n.latestValues))continue;ko(n.latestValues)&&n.updateSnapshot();const i=lo();br(i,n.measurePageBox()),Fr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Do(this.latestValues)&&Fr(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!==z.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=z.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kr(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):br(this.target,this.layout.layoutBox),Oo(this.target,this.targetDelta)):br(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),U.value&&da.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!ko(this.parent.latestValues)&&!Ro(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}},Rr(this.relativeTargetOrigin,e,n),br(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===z.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;br(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;No(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?(Sr(this.prevProjectionDelta.x,this.projectionDelta.x),Sr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Er(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Yr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),U.value&&da.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(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Ca));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ra(o.x,t.x,n),Ra(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Ba(l.x,d.x,p.x,m),Ba(l.y,d.y,p.y,m),h&&Wr(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),br(h,this.relativeTarget)),a&&(this.animationValues=s,Jr(s,i,this.latestValues,n,c,u)),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&&(K(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{ha.hasAnimatedSinceResize=!0,q.layout++,this.motionValue||(this.motionValue=ei(0)),this.currentAnimation=ia(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{q.layout--},onComplete:()=>{q.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ia(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ar(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ar(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}br(e,n),$o(e,s),Er(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ca);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&&fa("z",t,i,this.animationValues);for(let e=0;e<pa.length;e++)fa(`rotate${pa[e]}`,t,i,this.animationValues),fa(`skew${pa[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&&!Do(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Hr(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 Jo){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Jo[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(Sa),this.root.sharedNodes.clear()}}}function va(t){t.updateLayout()}function xa(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?Xr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ar(i);i.min=n[t].min,i.max=i.min+s}):Ia(s,e.layoutBox,n)&&Xr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ar(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}};Er(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?Er(a,t.applyTransform(i,!0),e.measuredBox):Er(a,n,e.layoutBox);const l=!Nr(r);let u=!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}};Rr(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Rr(a,n,o.layoutBox),Kr(r,a)||(u=!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:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ta(t){U.value&&da.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 wa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ba(t){t.clearSnapshot()}function Sa(t){t.clearMeasurements()}function Aa(t){t.isLayoutDirty=!1}function Va(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ea(t){t.resolveTargetDelta()}function Ma(t){t.calcProjection()}function ka(t){t.resetSkewAndRotation()}function Da(t){t.removeLeadSnapshot()}function Ra(t,e,n){t.translate=jt(e.translate,0,n),t.scale=jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ba(t,e,n,i){t.min=jt(e.min,n.min,i),t.max=jt(e.max,n.max,i)}function Ca(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ja={duration:.45,ease:[.4,0,.1,1]},La=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Oa=La("applewebkit/")&&!La("chrome/")?Math.round:c;function Fa(t){t.min=Oa(t.min),t.max=Oa(t.max)}function Ia(t,e,n){return"position"===t||"preserve-aspect"===t&&!Vr(zr(e),zr(n),.2)}function Na(t){return t!==t.root&&t.scroll?.wasRoot}const Ua=ga({attachResizeListener:(t,e)=>sa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wa=t=>!t.isLayoutDirty&&t.willUpdate(!1);const $a={current:void 0},Ka=ga({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!$a.current){const t=new Ua({});t.mount(window),t.setOptions({layoutScroll:!0}),$a.current=t}return $a.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),za="[data-layout], [data-layout-id]",Ya=()=>{};function Xa(t){const e=Array.from(t.querySelectorAll(za));return t instanceof Element&&t.matches(za)&&(e.includes(t)||e.unshift(t)),e}function Ha(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e,layoutExit:t.hasAttribute("data-layout-exit")}}function Ga(t,e,n){const i=mo.get(t),s=i??new er({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Ka(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current||s.mount(t),i||mo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function qa(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Za=$,_a=N.reduce((t,e)=>(t[e]=t=>K(t),t),{});function Ja(t){return"object"==typeof t&&!Array.isArray(t)}function Qa(t,e,n,i){return null==t?[]:"string"==typeof t&&Ja(e)?Fi(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function tl(t,e,n){return t*(e+1)}function el(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 nl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:jt(o,r,s[n]),easing:L(i,n)})}function il(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function sl(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ol(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function rl(t,e){return e[t]||(e[t]=[]),e[t]}function al(t){return Array.isArray(t)?t:[t]}function ll(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ul=t=>"number"==typeof t,cl=t=>t.every(ul);function hl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ps(t)&&!Cs(t)?new dr(e):new er(e);n.mount(t),mo.set(t,n)}function dl(t){const e=new nr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),mo.set(t,e)}function pl(e,n,i,s){const o=[];if(function(t,e){return ri(t)||"number"==typeof t||"string"==typeof t&&!Ja(e)}(e,n))o.push(ia(e,Ja(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=Qa(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?hl:dl;mo.has(e)||s(e);const l=mo.get(e),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,a)),o.push(...mi(l,{...n,transition:u},{}))}}return o}function ml(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,el(d,a.at,h,c));continue}let[p,y,g={}]=a;void 0!==g.at&&(d=el(d,g.at,h,c));let v=0;const x=(e,i,s,a=0,l=0)=>{const u=al(e),{delay:c=0,times:h=Se(u),type:p="keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:b}=i;const S="function"==typeof c?c(a,l):c,A=u.length,V=gn(p)?p:o?.[p||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&cl(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==b&&(e.duration=f(b));const n=_t(e,t,V);w=n.ease,b=n.duration}b??(b=r);const P=d+S;1===h.length&&0===h[0]&&(h[1]=1);const E=h.length-u.length;if(E>0&&be(h,E),1===u.length&&u.unshift(null),y){t.invariant(y<20,"Repeat count too high, must be less than 20","repeat-count-high"),b=tl(b,y);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<y;t++){u.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":L(i,s-1))}il(h,y)}const M=P+b;nl(s,u,w,h,P,M),v=Math.max(S+b,v),m=Math.max(M,m)};if(ri(p))x(y,g,rl("default",ol(p,l)));else{const t=Qa(p,y,s,u),e=t.length;for(let n=0;n<e;n++){const i=ol(t[n],l);for(const t in y)x(y[t],ll(g,t),rl(t,i),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(sl);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(p(0,m,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[s]=r,c.transition[s]={...n,duration:m,ease:u,times:l,...i}}}),a}(e,n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...pl(n,t,e))}),s}function fl(t){return function(e,i,s){let o,r=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))r=ml(e,i,t);else{const{onComplete:n,...a}=s||{};"function"==typeof n&&(o=n),r=pl(e,i,a,t)}var a;const l=new Rn(r);return o&&l.finished.then(o),t&&(t.animations.push(l),l.finished.then(()=>{n(t.animations,l)})),l}}const yl=fl();const gl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Fi(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={...Xn(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=Ln(e),l=jn(t,o.pseudoElement||""),u=r.get(l);u&&u.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]=ds(i,s)),je(e),ji(e,s),!o&&e.length<2&&e.unshift(ds(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))},vl=gl(),xl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Tl(t,e,n,i){const s=n[e],{length:o,position:r}=xl[e],a=s.current,l=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=p(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:g(s.current-a,u)}const wl={start:0,center:.5,end:1};function bl(t,e,n=0){let i=0;if(t in wl&&(t=wl[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 Sl=[0,0];function Al(t,e,n,i){let s=Array.isArray(t)?t:Sl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,wl[t]?t:"0"]),o=bl(s[0],n,i),r=bl(s[1],e),o-r}const Vl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Pl={x:0,y:0};function El(t,e,n){const{offset:s=Vl.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(Yi(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):Pl,u=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),c={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=Al(s[t],c[a],u[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 Ml(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){Tl(t,"x",e,n),Tl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&El(t,n,i)},notify:()=>e(n)}}const kl=new WeakMap,Dl=new WeakMap,Rl=new WeakMap,Bl=t=>t===document.scrollingElement?window:t;function Cl(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let i=Rl.get(e);i||(i=new Set,Rl.set(e,i));const s=Ml(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),!kl.has(e)){const t=()=>{for(const t of i)t.measure(z.timestamp);$.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>$.read(t);kl.set(e,s);const o=Bl(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&Dl.set(e,Vs(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=kl.get(e);return $.read(o,!1,!0),()=>{K(o);const t=Rl.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=kl.get(e);kl.delete(e),n&&(Bl(e).removeEventListener("scroll",n),Dl.get(e)?.(),window.removeEventListener("resize",n))}}const jl=new Map;function Ll({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=jl.get(e)??new Map;jl.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&un()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Cl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}const Ol={some:0,all:1};const Fl=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Bi,t.DOMVisualElement=Vo,t.DocumentProjectionNode=Ua,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=ra,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=Ka,t.HTMLVisualElement=er,t.JSAnimation=Ce,t.KeyframeResolver=rn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Ya,this.rejectReady=Ya,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Ji.read(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Xa(this.scope),e=this.buildRecords(t),n=function(t){const e=new Map;return t.forEach(t=>{const{layoutExit:n}=Ha(t.element);n&&e.set(t.element,{...t,parent:t.element.parentNode,nextSibling:t.element.nextSibling})}),e}(e);e.forEach(({projection:t})=>{!function(t){const e=t;if(!e.currentAnimation&&!e.pendingAnimation)return;const n=t.measure(!1);n.latestValues=e.animationValues||t.latestValues,t.snapshot=n}(t),t.isPresent=!0,t.willUpdate()}),await this.updateDom();const i=Xa(this.scope),s=this.buildRecords(i),o=this.handleExitingElements(e,s,n);s.forEach(({projection:t})=>{t.isPresent=!0});const r=function(t,e){const n=t[0]||e[0];return n?.projection.root}(s,e);r?.didUpdate(),await new Promise(t=>{$.postRender(()=>t())});const a=function(t,e){const n=new Set,i=t=>{const e=t.projection.currentAnimation;e&&n.add(e)};return t.forEach(i),e.forEach(i),Array.from(n)}(s,o),l=new kn(a);if(o.length){const t=()=>{o.forEach(({element:t,visualElement:e})=>{t.isConnected&&t.remove(),e.unmount(),mo.delete(t)})};l.finished.then(t,t)}return l}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=qa(i,n,this.scope),{layout:s,layoutId:o}=Ha(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=Ga(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e,n){const i=new Set(e.map(t=>t.element)),s=[];return t.forEach(t=>{if(i.has(t.element))return;const e=n.get(t.element);if(!e)return t.visualElement.unmount(),void mo.delete(t.element);e.element.isConnected||function(t){if(!t.parent)return;t.nextSibling&&t.nextSibling.parentNode===t.parent?t.parent.insertBefore(t.element,t.nextSibling):t.parent.appendChild(t.element)}(e),t.projection.isPresent=!1,t.projection.options.layoutId&&t.projection.relegate(),s.push(t)}),s}},t.MotionGlobalConfig=o,t.MotionValue=ti,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=ca,t.ObjectVisualElement=nr,t.SVGVisualElement=dr,t.SubscriptionManager=m,t.ViewTransitionBuilder=so,t.VisualElement=Ao,t.acceleratedValues=Oi,t.activeAnimations=q,t.addAttrValue=$i,t.addDomEvent=sa,t.addScaleCorrector=function(t){for(const e in t)Jo[e]=t[e],_(e)&&(Jo[e].isCSSVariable=!0)},t.addStyleValue=Gi,t.addUniqueItem=e,t.addValueToWillChange=li,t.alpha=it,t.analyseComplexValue=Pt,t.animate=yl,t.animateMini=vl,t.animateMotionValue=Gn,t.animateSingleValue=ia,t.animateTarget=mi,t.animateValue=function(t){return new Ce(t)},t.animateVariant=fi,t.animateView=function(t,e={}){return new so(t,e)},t.animateVisualElement=yi,t.animationMapKey=jn,t.anticipate=E,t.applyAxisDelta=Lo,t.applyBoxDelta=Oo,t.applyGeneratorOptions=vn,t.applyPointDelta=jo,t.applyPxDefaults=ji,t.applyTreeDeltas=No,t.aspectRatio=zr,t.attachSpring=Fs,t.attrEffect=Ki,t.axisDeltaEquals=Yr,t.axisEquals=Ur,t.axisEqualsRounded=$r,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Wr,t.boxEqualsRounded=Kr,t.buildHTMLStyles=Ho,t.buildProjectionTransform=Hr,t.buildSVGAttrs=ar,t.buildSVGPath=or,t.buildTransform=Xo,t.calcAxisDelta=Pr,t.calcBoxDelta=Er,t.calcChildStagger=On,t.calcGeneratorDuration=Zt,t.calcLength=Ar,t.calcRelativeAxis=Mr,t.calcRelativeAxisPosition=Dr,t.calcRelativeBox=kr,t.calcRelativePosition=Rr,t.camelCaseAttributes=lr,t.camelToDash=ui,t.cancelFrame=K,t.cancelMicrotask=Qi,t.cancelSync=_a,t.checkVariantsDidChange=vr,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=wa,t.collectMotionValues=Qn,t.color=wt,t.compareByDepth=oa,t.complex=Dt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=Po,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=Sr,t.copyAxisInto=wr,t.copyBoxInto=br,t.correctBorderRadius=Zo,t.correctBoxShadow=_o,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>yi(t,e,n)))}(t),n=Tr(),i=!0;const s=e=>(n,i)=>{const s=_n(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=mr(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<gr;e++){const d=yr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=yo(m),y=d===o?p.isActive:null;!1===y&&(h=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||fo(m)||"boolean"==typeof m)continue;const v=vr(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,A={...S,...b},V=e=>{x=!0,u.has(e)&&(T=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=ni(e)&&ni(n)?!fr(e,n):e!==n,i?null!=e?V(t):u.add(t):void 0!==e&&u.has(t)?V(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const P=g&&v;x&&(!P||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!P&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=_n(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=_n(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Tr()}}},t.createAxis=ao,t.createAxisDelta=oo,t.createBox=lo,t.createDelta=ro,t.createGeneratorEasing=_t,t.createProjectionNode=ga,t.createRenderBatcher=W,t.createScopedAnimate=fl,t.cubicBezier=w,t.cubicBezierAsString=pn,t.defaultEasing=Ve,t.defaultOffset=Se,t.defaultTransformValue=$e,t.defaultValueTypes=Mi,t.degrees=mt,t.delay=la,t.delayInSeconds=la,t.dimensionValueTypes=vi,t.distance=Fl,t.distance2D=function(t,e){const n=Fl(t.x,e.x),i=Fl(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Xr,t.easeIn=R,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=je,t.findDimensionValueType=xi,t.findValueType=Ws,t.flushKeyframeResolvers=on,t.frame=$,t.frameData=z,t.frameSteps=Y,t.generateLinearEasing=Gt,t.getAnimatableNone=Di,t.getAnimationMap=Ln,t.getComputedStyle=ds,t.getDefaultTransition=Kn,t.getDefaultValueType=ki,t.getEasingForSegment=L,t.getFeatureDefinitions=function(){return So},t.getFinalKeyframe=Yn,t.getMixer=$t,t.getOptimisedAppearId=di,t.getOriginIndex=js,t.getValueAsType=Ni,t.getValueTransition=Xn,t.getVariableValue=Nn,t.getVariantContext=mr,t.getViewAnimationLayerInfo=Gs,t.getViewAnimations=Zs,t.globalProjectionState=ha,t.has2DTranslate=Ro,t.hasReducedMotionListener=co,t.hasScale=ko,t.hasTransform=Do,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=ns(t,n),r=t=>{if(!is(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{is(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=Fi(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:Ol[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initPrefersReducedMotion=po,t.interpolate=we,t.invisibleValues=Nt,t.isAnimationControls=fo,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isControllingVariants=xo,t.isDeltaZero=Nr,t.isDragActive=es,t.isDragging=ts,t.isEasingArray=j,t.isElementKeyboardAccessible=as,t.isForcedMotionValue=Qo,t.isGenerator=gn,t.isHTMLElement=Yi,t.isKeyframesTarget=ni,t.isMotionValue=ri,t.isNear=Vr,t.isNodeOrChild=ss,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=os,t.isSVGElement=ps,t.isSVGSVGElement=Cs,t.isSVGTag=ur,t.isTransitionDefined=Hn,t.isVariantLabel=yo,t.isVariantNode=To,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in mn||dn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ai,t.isZeroValueString=l,t.keyframes=Pe,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=Ls(e,n,i);return Os(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Ko(t,n),{scroll:s}=e;return s&&(Uo(i.x,s.offset.x),Uo(i.y,s.offset.y)),i},t.measureViewportBox=Ko,t.memo=u,t.microtask=Ji,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Xt,t.mixArray=Kt,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Ct,t.mixLinearColor=Lt,t.mixNumber=jt,t.mixObject=zt,t.mixValues=Jr,t.mixVisibility=Ut,t.motionValue=ei,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Wa);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=c,t.number=nt,t.numberValueTypes=Ei,t.observeTimeline=Ps,t.optimizedAppearDataAttribute=hi,t.optimizedAppearDataId=ci,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Fi(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=In,t.parseValueFromTransform=Ke,t.percent=ft,t.pipe=d,t.pixelsToPercent=qo,t.positionalKeys=Jn,t.prefersReducedMotion=uo,t.press=function(t,e,n={}){const[i,s,o]=ns(t,n),r=t=>{const i=t.currentTarget;if(!hs(t))return;ls.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ls.has(i)&&ls.delete(i),hs(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ss(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Yi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=us(()=>{if(ls.has(n))return;cs(n,"down");const t=us(()=>{cs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>cs(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),as(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=p,t.progressPercentage=xt,t.propEffect=zi,t.propagateDirtyNodes=Ta,t.px=yt,t.readTransformValue=ze,t.recordStats=function(){if(U.value)throw Rs(),new Error("Stats are already being measured");const t=U;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(Es,!0),Bs},t.removeAxisDelta=Cr,t.removeAxisTransforms=jr,t.removeBoxTransforms=Fr,t.removeItem=n,t.removePointDelta=Br,t.renderHTML=Go,t.renderSVG=cr,t.resize=Vs,t.resolveElements=Fi,t.resolveMotionValue=ua,t.resolveVariant=_n,t.resolveVariantFromProps=Zn,t.reverseEasing=S,t.rgbUnit=ct,t.rgba=ht,t.rootProjectionNode=$a,t.scale=st,t.scaleCorrectors=Jo,t.scalePoint=Co,t.scrapeHTMLMotionValuesFromProps=tr,t.scrapeSVGMotionValuesFromProps=hr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return c;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Cl(n=>{t(n[e.axis].progress,n)},e):Ps(t,Ll(e))}(t,s):function(t,e){const n=Ll(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Ps(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Cl,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?ts[t]?null:(ts[t]=!0,()=>{ts[t]=!1}):ts.x||ts.y?null:(ts.x=ts.y=!0,()=>{ts.x=ts.y=!1})},t.setFeatureDefinitions=function(t){So=t},t.setStyle=ln,t.setTarget=oi,t.spring=xe,t.springValue=function(t,e){const n=ei(ri(t)?t.get():t);return Fs(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:js(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=U,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=qi,t.supportedWaapiEasing=mn,t.supportsBrowserAnimation=En,t.supportsFlags=cn,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=Li,t.supportsScrollTimeline=un,t.svgEffect=_i,t.sync=Za,t.testValueType=gi,t.time=G,t.transform=Ls,t.transformAxis=Wo,t.transformBox=$o,t.transformBoxPoints=Eo,t.transformPropOrder=Xe,t.transformProps=He,t.transformValue=Os,t.transformValueTypes=Pi,t.translateAxis=Uo,t.updateMotionValuesFromProps=wo,t.variantPriorityOrder=go,t.variantProps=vo,t.velocityPerSecond=g,t.vh=gt,t.visualElementStore=mo,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.3-alpha.
|
|
3
|
+
"version": "12.27.3-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.3-alpha.
|
|
79
|
+
"framer-motion": "^12.27.3-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": "1196659a79b5c3056a0dfcef7e66e576897e6bf4"
|
|
99
99
|
}
|