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