import{t as e}from"./rolldown-runtime.Bi-D_2cA.mjs";import{A as t,C as n,E as r,F as i,I as a,L as o,M as s,O as c,P as l,R as u,T as d,_ as f,b as p,c as m,d as h,f as g,j as _,l as v,m as y,o as b,p as x,s as S,u as C,w as ee,y as w}from"./react.Dxe_2v0O.mjs";function T(e){let t=p(null);return t.current===null&&(t.current=e()),t.current}function te(e,t){e.indexOf(t)===-1&&e.push(t)}function E(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}/*#__NO_SIDE_EFFECTS__*/ function ne(e){let t;return()=>(t===void 0&&(t=e()),t)}/*#__NO_SIDE_EFFECTS__*/ function re(e,t,n,r){return e===t&&n===r?F:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=ds(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(ds(s+1e-7,e,n)-i-r)}return ds(s,t,r)}}/*#__NO_SIDE_EFFECTS__*/ function ie(e,t){return/* @__PURE__ */ ws(e)?e[us(0,e.length,t)]:e}function ae(){ks=void 0}function oe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}function se(e){return e==null}function ce(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}function le(e){return isNaN(e)&&typeof e==`string`&&(ec.test(e)||tc.test(e))}function ue(e){let t=e.toString();return ec.test(t)||tc.test(t)}function de(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(sc,e=>(H.test(e)?(r.color.push(a),i.push(rc),n.push(H.parse(e))):e.startsWith(ac)?(r.var.push(a),i.push(ic),n.push(e)):(r.number.push(a),i.push(nc),n.push(parseFloat(e))),++a,oc)).split(oc),indexes:r,types:i}}function fe(e){return de(e).values}function pe({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;alc(e,t.split[n])))}function ge(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _e({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ge(s,r,e+1/3),a=ge(s,r,e),o=ge(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ve(e,t){return n=>n>0?t:e}function ye(e){let t=fc(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===Qs&&(n=_e(n)),n}function be(e,t){return mc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xe(e,t){return n=>W(e,t,n)}function Se(e){return typeof e==`number`?xe:typeof e==`string`?Ps(e)?ve:H.test(e)?pc:hc:Array.isArray(e)?Ce:typeof e==`object`?H.test(e)?pc:we:ve}function Ce(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Se(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function Te(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;iAs(W(a,o,e))+i}function De(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return W(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Ee(e,t);if(n)return n}return Se(e)(e,t)}function Oe(e){let t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set,r=!1,i=!1,a=/* @__PURE__ */ new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}function ke(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=_c.reduce((e,t)=>(e[t]=Oe(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=P.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,vc),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:_c.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<_c.length;t++)o[_c[t]].cancel(e)},state:n,steps:o}}function Ae(e,t=50,n=Sc,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i=n?1/0:i}function je(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(Ae(o),Sc);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:/* @__PURE__ */ L(s)}}function Me(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Pe(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Ne(e,t){return e*Math.sqrt(1-t*t)}function Pe(e,t,n){let r=n;for(let n=1;n{let n=t*i,r=n*e,a=Ne(t,i),o=Math.exp(-r);return Tc-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Ne(t*t,i);return(-n(t)+Tc>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Pe(n,r,a),s=o*Me(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:/* @__PURE__ */ I(e)}}function Ie(e,t){if(Ec(e,t))return e}function Le(e){let t=Ie(e.stiffness),n=Ie(e.damping,!0),r=Ie(e.mass),i={...e,stiffness:t??q.stiffness,damping:n??q.damping,mass:r??q.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Cc(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Me(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Fe(i)),i.isResolvedFromDuration=!0;(!Ec(i.stiffness)||!Ec(i.damping,!0))&&(i.stiffness=q.stiffness,i.damping=q.damping)}return i}function Re(e=q.visualDuration,t=q.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Le({...n}),f=e=>d?0:-/* @__PURE__ */ L(e),p=s/(2*Math.sqrt(o*c)),m=/* @__PURE__ */ L(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?q.restSpeed.granular:q.restSpeed.default),g.restDelta=n.restDelta||(e?q.restDelta.granular:q.restDelta.default)};_();let v,y,b;if(p<1){let e=Ne(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>/* @__PURE__ */ I(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=/* @__PURE__ */ I(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Ae(S),Sc),t=xc(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}function ze({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>ec,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=Re({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Be(e,t,n){let r=[],i=n||P.mix||De,a=e.length-1;for(let n=0;nt[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Be(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(N(e[0],e[a-1],t)):l}function He(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=/* @__PURE__ */ ss(0,t,r);e.push(W(n,1,i))}}function Ue(e){let t=[0];return He(t,e.length-1),t}function We(e,t){return e.map(e=>e*t)}function Ge(e,t){return e.map(()=>t||Cs).splice(0,e.length-1)}function Ke({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=/* @__PURE__ */ ws(r)?r.map(Os):Os(r)||Cs,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(P.mix||De)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?N(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Ve(We(n&&n.length===t.length?n:Ue(t),e),t,{ease:Array.isArray(i)?i:Ge(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}function qe(e,t,n){let r=Math.max(t-Dc,0);return/* @__PURE__ */ ls(n-e(r),t-r)}function Je(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):qe(t=>e.next(t).value,t,e.next(t).value)}function Ye(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Oc),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}function Xe(e){typeof e.type==`string`&&(e.type=kc[e.type])}function Ze(e,t){return{kind:e,animation:t,timestamp:z.now(),frameTimestamp:R.timestamp,frameIsProcessing:R.isProcessing}}function Qe(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Ze(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function $e(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Ze(`layout-animation-start`,e),node:t})}catch{}}function et(e){return new Pc(e)}function tt(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(zs)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Fc.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}function nt(e,t){let n=Hc(e);return Uc.has(n)||(n=U),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function rt(e){for(let t=1;t{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}function ct(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}function lt(){if(sl){let e=[],t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set;al.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),rl.has(r.name)&&n.add(r.element))});let r=/* @__PURE__ */ new Map;n.forEach(e=>{let t=st(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&u.scrollTo(0,e.suspendedScrollY)})}sl=!1,ol=!1,al.forEach(e=>e.complete(cl)),al.clear()}function ut(){al.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sl=!0)})}function dt(){cl=!0,ut(),lt(),cl=!1}function ft(e,t,n){if(typeof e==`string`){if(rs(e)||as(e))return parseFloat(e);if(!U.test(e)&&U.test(n))return nt(t,n)}return e??void 0}function pt(e,t,n){ul(t)?e.style.setProperty(t,n):e.style[t]=n}function mt(e,t){let n=/* @__PURE__ */ ne(e);return()=>dl[t]??n()}function ht(e,t){if(e)return typeof e==`function`?ml()?xc(e,t):`ease-out`:/* @__PURE__ */ Ts(e)?hl(e):Array.isArray(e)?e.map(e=>ht(e,t)||gl.easeOut):gl[e]}function gt(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=ht(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function _t(e){return typeof e==`function`&&`applyToOptions`in e}function vt({type:e,...t}){return _t(e)&&ml()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}function yt(e){return e in vl}function bt(e){typeof e.ease==`string`&&yt(e.ease)&&(e.ease=vl[e.ease])}function xt(e){let t=e[0];if(e.length===1)return!0;for(let n=0;nn&&(n=i)}return n}function Dt(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function D(e,t){return new Ml(e,t)}function Ot(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function kt(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Ot(n,e)}function At(e){for(let t in e)if(!Rl.has(t))return!0;return!1}function jt(e){let t=Bl.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Mt(e,t,n=1){`${e}`;let[r,i]=jt(e);if(!r)return;let a=u.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return rs(e)?parseFloat(e):e}return Ps(i)?Mt(i,t,n+1):i}function Nt(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pt(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Nt(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Ft(e,t,n){return Pt(e.getProps(),t,n,e)}function It(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,D(n))}function Lt(e){return Ul(e)?e[e.length-1]||0:e}function Rt(e,t){let{transitionEnd:n={},transition:r={},...i}=Ft(e,t)||{};i={...i,...n};for(let t in i)It(e,t,Lt(i[t]))}function zt(e){return!!(X(e)&&e.add)}function Bt(e,t){let n=e.getValue(`willChange`);if(zt(n))return n.add(t);if(!n&&P.WillChange){let n=new P.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Vt(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Ht(e){return e.props[Gl]}function Ut({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Wt(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Ot(a,c):c;let l=a?.reduceMotion,d=a?.skipAnimations;r&&(a=r);let f=[],p=i&&e.animationState?.getState()[i],m=a?.path;m&&m.animateVisualElement(e,s,a,n,f);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||p&&Ut(p,t))continue;let o={delay:n,...kt(a||{},t)};d&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){G.update(()=>r.set(i));continue}let m=!1;if(Kl&&u.MotionHandoffAnimation){let n=Ht(e);if(n){let e=u.MotionHandoffAnimation(n,t,G);e!==null&&(o.startTime=e,m=!0)}}Bt(e,t);let h=l??e.shouldReduceMotion;r.start(zl(t,r,i,h&&Hl.has(t)?{type:!1}:o,e,m));let g=r.animation;g&&f.push(g)}if(o){let t=()=>G.update(()=>{o&&Rt(e,o)});f.length?Promise.all(f).then(t):t()}return f}function Gt(e,t,n={}){let r=Ft(e,t,Vl(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Wt(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Gt(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Dt(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Kt(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Gt(e,t,n))):typeof t==`string`?Gt(e,t,n):Promise.all(Wt(e,Ft(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}function qt(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||as(e)}function Jt(e,t,n){let r=0,i;for(;rt.test(e))}function Qt(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a?G.update(()=>l.set(c)):(l.start(zl(s,l,c,o&&Hl.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation))}let{transitionEnd:s}=t;if(s){let t=()=>G.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function $t(e,t,n,r,i){return Qt(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=en(i)??e.read(t,r,i),`${r}`}a=D(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function en(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function tn(e){return is(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function nn(e){return is(e)&&`ownerSVGElement`in e}function rn(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function an(e,{step:t,...n}={}){let r=/* @__PURE__ */ new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new nu(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}function on(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;ee.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new Ml(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}function pn(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function mn({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hn({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gn(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _n(e){return e===void 0||e===1}function vn({scale:e,scaleX:t,scaleY:n}){return!_n(e)||!_n(t)||!_n(n)}function yn(e){return vn(e)||bn(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bn(e){return xn(e.x)||xn(e.y)}function xn(e){return e&&e!==`0%`}function Sn(e,t,n){return n+t*(e-n)}function Cn(e,t,n,r,i){return i!==void 0&&(e=Sn(e,i,r)),Sn(e,n,r)+t}function wn(e,t=0,n=1,r,i){e.min=Cn(e.min,t,n,r,i),e.max=Cn(e.max,t,n,r,i)}function Tn(e,{x:t,y:n}){wn(e.x,t.translate,t.scale,t.originPoint),wn(e.y,n.translate,n.scale,n.originPoint)}function En(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sbu&&(t.x=1),t.ybu&&(t.y=1)}function O(e,t){e.min+=t,e.max+=t}function Dn(e,t,n,r,i=.5){wn(e,t,n,W(e.min,e.max,i),r)}function On(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function kn(e,t,n){let r=n??e;Dn(e.x,On(t.x,r.x),t.scaleX,t.scale,t.originX),Dn(e.y,On(t.y,r.y),t.scaleY,t.scale,t.originY)}function An(e,t){return mn(gn(e.getBoundingClientRect(),t))}function jn(e,t,n){let r=An(e,n),{scroll:i}=t;return i&&(O(r.x,i.offset.x),O(r.y,i.offset.y)),r}function Mn(e,t,n,r){if(r)return Qt(e=>r.getValue(e,null),t,n,r);let i=Cu(e);return $t(i,e,t,n,new wu(i,e))}function Nn(){return Z.x||Z.y}function Pn(e){return e===`x`||e===`y`?Z[e]?null:(Z[e]=!0,()=>{Z[e]=!1}):Z.x||Z.y?null:(Z.x=Z.y=!0,()=>{Z.x=Z.y=!1})}function Fn(e,t){let n=rn(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function In(e){return!(e.pointerType===`touch`||Nn())}function Ln(e,t,n={}){let[r,i,a]=Fn(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,d)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,u.removeEventListener(`pointerup`,c),u.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,u.addEventListener(`pointerup`,c,i),u.addEventListener(`pointercancel`,c,i)},d=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!In(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,d,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}function Rn(e){return Au.has(e.tagName)||e.isContentEditable===!0}function zn(e){return ju.has(e.tagName)||e.isContentEditable===!0}function Bn(e){return t=>{t.key===`Enter`&&e(t)}}function Vn(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}function Hn(e){return ku(e)&&!Nn()}function Un(e,t,n={}){let[r,i,a]=Fn(e,n),o=e=>{let r=e.currentTarget;if(!Hn(e)||Pu.has(e))return;Mu.add(r),n.stopPropagation&&Pu.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{u.removeEventListener(`pointerup`,c,o),u.removeEventListener(`pointercancel`,l,o),Mu.has(r)&&Mu.delete(r),Hn(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===u||r===document||n.useGlobalTarget||Ou(r,e.target))},l=e=>{s(e,!1)};u.addEventListener(`pointerup`,c,o),u.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?u:e).addEventListener(`pointerdown`,o,i),tn(e)&&(e.addEventListener(`focus`,e=>Nu(e,i)),!Rn(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Wn({target:e,borderBoxSize:t}){Fu.get(e)?.forEach(n=>{n(e,{get width(){return Ru(e,t)},get height(){return zu(e,t)}})})}function Gn(e){e.forEach(Wn)}function Kn(){typeof ResizeObserver<`u`&&(Iu=new ResizeObserver(Gn))}function qn(e,t){Iu||Kn();let n=rn(e);return n.forEach(e=>{let n=Fu.get(e);n||(n=/* @__PURE__ */ new Set,Fu.set(e,n)),n.add(t),Iu?.observe(e)}),()=>{n.forEach(e=>{let n=Fu.get(e);n?.delete(t),n?.size||Iu?.unobserve(e)})}}function Jn(){Vu=()=>{let e={get width(){return u.innerWidth},get height(){return u.innerHeight}};Bu.forEach(t=>t(e))},u.addEventListener(`resize`,Vu)}function Yn(e){return Bu.add(e),Vu||Jn(),()=>{Bu.delete(e),!Bu.size&&typeof Vu==`function`&&(u.removeEventListener(`resize`,Vu),Vu=void 0)}}function Xn(e,t){return typeof e==`function`?Yn(e):qn(e,t)}function Zn(e){return nn(e)&&e.tagName===`svg`}function Qn(e,t){if(e===`first`)return 0;{let n=t-1;return e===`last`?n:n/2}}function $n(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(i,a)=>{let o=typeof n==`number`?n:Qn(n,a),s=e*Math.abs(o-i);if(r){let t=a*e;s=Os(r)(s/t)*t}return t+s}}function er(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Ve(i,a,o);return t?s(r):s}function tr(e,t,n){let r=e.get(),i=null,a,o=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,s=e=>a(o?e+o:e),c=()=>e.events.animationStart?.notify(),l=()=>{i&&=(i.stop(),null),e.animation=void 0};if(e.attach((t,r)=>{a=r;let o=Ku(t);if(i?.state===`running`){i.setTarget(o,n.velocity);return}let u=Ku(e.get()),d=i?i.getGeneratorVelocity():e.getVelocity();if(l(),u===o)return;let f=i=new Gu({keyframes:[u,o],velocity:d,restDelta:.001,restSpeed:.01,...n,onUpdate:s,onPlay:c});e.animation=f,f.then(()=>{i===f&&(i=null,e.animation=void 0,e.events.animationComplete?.notify())})},l),X(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(nr(t,o),!1)):e.set(nr(t,o))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return l}function nr(e,t){return t?e+t:e}function rr(e,t,n){let r=()=>t.set(n()),i=()=>G.preRender(r,!1,!0),a=e.map(e=>e.on(`change`,i));t.on(`destroy`,()=>{a.forEach(e=>e()),K(r)})}function ir(e){let t=[];jl.current=t;let n=e();jl.current=void 0;let r=D(n);return rr(t,r,e),r}function ar(e,t,n){return tr(e,t,{...n,type:Re})}function or(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function sr(e){return typeof e==`string`||Array.isArray(e)}function cr(e){if(or(e.animate))return!0;for(let t=0;t$u.current=e.matches;e.addEventListener(`change`,t),t()}else $u.current=!1}}function fr(e){rd=e}function pr(){return rd}function mr(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function hr(e){for(let t in e)sd[t]=e[t],Ms(t)&&(sd[t].isCSSVariable=!0)}function gr(e,{layout:t,layoutId:n}){return Y.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!sd[e]||e===`opacity`)}function _r(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(X(r[t])||i&&X(i[t])||gr(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function vr(e){return u.getComputedStyle(e)}function yr(e,t,n,r){mr(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ld.has(n)?n:Vt(n),t.attrs[n])}function br(e,t,n){let r=_r(e,t,n);for(let n in e)if(X(e[n])||X(t[n])){let t=$c.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function xr(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:t,options:n})=>Kt(e,t,n))),n=wr(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=/* @__PURE__ */ new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(fd.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?sr(g)||g===!1?g:void 0:h,v=sr(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||or(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=Cr(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,ee=Array.isArray(_)?_:[_],w={};if(y!==!1)for(let n of ee){let{transition:r,transitionEnd:i,...a}=Ft(e,n,Vl(e,t))||{};w={...w,...a,...i}}let{prevResolvedValues:T}=i;for(let t in{...T,...w}){if(t in f)continue;let n=w[t],r=T[t],a=Array.isArray(n)&&Array.isArray(r)?!xr(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=w,i.isActive&&(f={...f,...w}),S&&(!(b&&x)||C))for(let n of ee){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Ft(s,n)?.transition?.delayChildren;r.delay=Dt(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Ft(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!X(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=wr(),i=!0}}}function Cr(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!xr(t,e):!1}function wr(){let e={};for(let t of Zu)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Tr(e,t){e.min=t.min,e.max=t.max}function k(e,t){Tr(e.x,t.x),Tr(e.y,t.y)}function Er(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function A(e){return e.max-e.min}function Dr(e,t,n){return Math.abs(e-t)<=n}function Or(e,t,n,r=.5){e.origin=r,e.originPoint=W(t.min,t.max,e.origin),e.scale=A(n)/A(t),e.translate=W(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pd&&e.scale<=md||isNaN(e.scale))&&(e.scale=1),(e.translate>=hd&&e.translate<=gd||isNaN(e.translate))&&(e.translate=0)}function kr(e,t,n,r){Or(e.x,t.x,n.x,r?r.originX:void 0),Or(e.y,t.y,n.y,r?r.originY:void 0)}function Ar(e,t,n,r=0){e.min=(r?W(n.min,n.max,r):n.min)+t.min,e.max=e.min+A(t)}function jr(e,t,n,r){Ar(e.x,t.x,n.x,r?.x),Ar(e.y,t.y,n.y,r?.y)}function Mr(e,t,n,r=0){let i=r?W(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+A(t)}function Nr(e,t,n,r){Mr(e.x,t.x,n.x,r?.x),Mr(e.y,t.y,n.y,r?.y)}function Pr(e,t,n,r,i){return e-=t,e=Sn(e,1/n,r),i!==void 0&&(e=Sn(e,1/i,r)),e}function Fr(e,t=0,n=1,r=.5,i,a=e,o=e){if(B.test(t)&&(t=parseFloat(t),t=W(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=W(a.min,a.max,r);e===a&&(s-=t),e.min=Pr(e.min,t,n,s,i),e.max=Pr(e.max,t,n,s,i)}function Ir(e,t,[n,r,i],a,o){Fr(e,t[n],t[r],t[i],t.scale,a,o)}function Lr(e,t,n,r){Ir(e.x,t,_d,n?n.x:void 0,r?r.x:void 0),Ir(e.y,t,vd,n?n.y:void 0,r?r.y:void 0)}function Rr(e){return e.translate===0&&e.scale===1}function zr(e){return Rr(e.x)&&Rr(e.y)}function Br(e,t){return e.min===t.min&&e.max===t.max}function Vr(e,t){return Br(e.x,t.x)&&Br(e.y,t.y)}function Hr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ur(e,t){return Hr(e.x,t.x)&&Hr(e.y,t.y)}function Wr(e){return A(e.x)/A(e.y)}function Gr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function j(e){return[e(`x`),e(`y`)]}function Kr(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}function qr(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function Jr(e,t,n,r,i,a){i?(e.opacity=W(0,n.opacity??1,Cd(r)),e.opacityExit=W(t.opacity??1,0,wd(r))):a&&(e.opacity=W(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(/* @__PURE__ */ ss(e,t,r))}function Zr(e,t,n){let r=X(e)?e:D(e);return r.start(zl(``,r,t,n)),r.animation}function Qr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function $r(e,t){let n=z.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(K(r),e(a-t))};return G.setup(r,!0),()=>K(r)}function ei(e){return X(e)?e.get():e}function ti(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ni(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ht(t);if(u.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;u.MotionCancelOptimisedAnimation(n,`transform`,G,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ni(r)}function ri({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Nd++,this.animationId=0,this.animationCommitId=0,this.children=/* @__PURE__ */ 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=/* @__PURE__ */ new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Hu.value&&(Ad.nodes=Ad.calculatedTargetDeltas=Ad.calculatedProjections=0),this.nodes.forEach(oi),this.nodes.forEach(_i),this.nodes.forEach(vi),this.nodes.forEach(si),Hu.addProjectionMetrics&&Hu.addProjectionMetrics(Ad)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=/* @__PURE__ */ new Map,this.latestValues=e,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 e=0;ethis.root.updateBlockedByResize=!1;G.read(()=>{r=u.innerWidth}),e(t,()=>{let e=u.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=$r(i,250),kd.hasAnimatedSinceResize&&(kd.hasAnimatedSinceResize=!1,this.nodes.forEach(gi)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Pd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ur(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...kt(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||gi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),K(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yi),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(u.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ni(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!A(this.snapshot.measuredBox.x)&&!A(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=W(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=W(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(xi(o.x,e.x,n),xi(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nr(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ci(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Vr(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Q(),k(f,this.relativeTarget)),c&&(this.animationValues=a,Jr(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(K(this.pendingAnimation),void 0),this.pendingAnimation=G.update(()=>{kd.hasAnimatedSinceResize=!0,this.motionValue||=D(0),this.motionValue.jump(0,!1),this.currentAnimation=Zr(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),$e(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Md),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Di(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Q();let t=A(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=A(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}k(t,i),kn(t,r),kr(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Dd),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&ti(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(li),this.root.sharedNodes.clear()}}}function ii(e){e.updateLayout(),fi(e)}function ai(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)j(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=A(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Tr(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Di(i,t.layoutBox,n)&&j(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=A(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ju();kr(o,n,t.layoutBox);let s=Ju();a?kr(s,e.applyTransform(r,!0),t.measuredBox):kr(s,n,t.layoutBox);let c=!zr(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Q();Nr(s,t.layoutBox,i.layoutBox,o);let c=Q();Nr(c,n,a.layoutBox,o),Ur(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function oi(e){Hu.value&&Ad.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function si(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ci(e){e.clearSnapshot()}function li(e){e.clearMeasurements()}function ui(e){e.isLayoutDirty=!0,e.updateLayout()}function di(e){e.isLayoutDirty=!1}function fi(e){let{snapshot:t,dragAncestor:n}=e,r=n?.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;j(e=>O(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function pi(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function mi(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function hi(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function gi(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _i(e){e.resolveTargetDelta()}function vi(e){e.calcProjection()}function yi(e){e.resetSkewAndRotation()}function bi(e){e.removeLeadSnapshot()}function xi(e,t,n){e.translate=W(t.translate,0,n),e.scale=W(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Si(e,t,n,r){e.min=W(t.min,n.min,r),e.max=W(t.max,n.max,r)}function Ci(e,t,n,r){Si(e.x,t.x,n.x,r),Si(e.y,t.y,n.y,r)}function wi(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function Ti(e){e.min=Id(e.min),e.max=Id(e.max)}function Ei(e){Ti(e.x),Ti(e.y)}function Di(e,t,n){return e===`position`||e===`preserve-aspect`&&!Dr(Wr(t),Wr(n),.2)}function Oi(e){return e!==e.root&&e.scroll?.wasRoot}function ki(){let e=/* @__PURE__ */ new Set,t=/* @__PURE__ */ new WeakMap,n=()=>e.forEach(Rd);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}function Ai(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ji(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ai(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:t,top:n,left:i,right:s,bottom:p,direction:h}=f.current;if(r||l===!1||!d.current||!e||!t)return;let g=h===`rtl`,_=a===`left`?g?`right: ${s}`:`left: ${i}`:g?`left: ${i}`:`right: ${s}`,v=o===`bottom`?`bottom: ${p}`:`top: ${n}`,y=d.current;y.dataset.motionPopId=u;let b=y.ownerDocument,x=b.createElement(`style`);m&&(x.nonce=m);let S=c??b.head;return S.appendChild(x),x.sheet&&x.sheet.insertRule(` [data-motion-pop-id="${u}"] { position: absolute !important; width: ${e}px !important; height: ${t}px !important; ${_}px !important; ${v}px !important; } `),()=>{d.current?.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[r]),b(Vd,{isPresent:r,childRef:d,sizeRef:f,pop:l,children:l===!1?e:i(e,{ref:h})})}function Pi(){return/* @__PURE__ */ new Map}function Fi(e=!0){let r=t(ns);if(r===null)return[!0,null];let{isPresent:i,onExitComplete:a,register:o}=r,s=n();w(()=>{if(e)return o(s)},[e]);let l=c(()=>e&&a&&a(s),[s,a,e]);return!i&&a?[!1,l]:[!0]}function Ii(e){let t=[];return d.forEach(e,e=>{y(e)&&t.push(e)}),t}function Li(){let e=p(!1);return M(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ri(){let e=Li(),[t,n]=f(0),r=c(()=>{e.current&&n(t+1)},[t]);return[c(()=>G.postRender(r),[r]),t]}function zi(){if(Zd)return;let e={};for(let t in Xd)e[t]={isEnabled:e=>Xd[t].some(t=>!!e[t])};fr(e),Zd=!0}function Bi(){return zi(),pr()}function Vi(e){let t=Bi();for(let n in e)t[n]={...t[n],...e[n]};fr(t)}function Hi({children:e,...n}){let r=t($);n={...r,...n},n.transition=Ot(n.transition,r.transition),n.isStatic=T(()=>n.isStatic);let i=_(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations,n.isValidProp]);return b($.Provider,{value:i,children:e})}function Ui(e,t){if(cr(e)){let{initial:t,animate:n}=e;return{initial:t===!1||sr(t)?t:void 0,animate:sr(n)?n:void 0}}return e.inherit===!1?{}:t}function Wi(e){let{initial:n,animate:r}=Ui(e,t(Qd));return _(()=>({initial:n,animate:r}),[Gi(n),Gi(r)])}function Gi(e){return Array.isArray(e)?e.join(` `):e}function Ki(e,t,n){for(let r in t)!X(t[r])&&!gr(r,n)&&(e[r]=t[r])}function qi({transformTemplate:e},t){return _(()=>{let n=$d();return cn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ji(e,t){let n=e.style||{},r={};return Ki(r,n,e),Object.assign(r,qi(e,t)),r}function Yi(e,t){let n={},r=Ji(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function Xi(e,t,n,r){let i=_(()=>{let n=ef();return un(n,t,ud(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ki(t,e.style,e),i.style={...t,...i.style}}return i}function Zi(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||tf.has(e)}function Qi(e,t){return e.startsWith(`on`)?!Zi(e):t?.(e)??!Zi(e)}function $i(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(X(e[a])||(Qi(a,r)||n===!0&&Zi(a)||!t&&!Zi(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}function ea(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(nf.indexOf(e)>-1||/[A-Z]/u.test(e))}function ta(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??ea(e)?Xi:Yi)(t,r,i,e),u=$i(t,typeof e==`string`,a,s),d=e===l?{}:{...u,...c,ref:n},{children:f}=t,p=_(()=>X(f)?f.get():f,[f]);return h(e,{...d,children:p})}function na({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:ra(n,r,i,e),renderState:t()}}function ra(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=ei(a[e]);let{initial:o,animate:s}=e,c=cr(e),l=lr(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!or(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n{r.current=n});let i=p(null);return c(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}function aa(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function oa(e,n,r,i,a,o){let{visualElement:c}=t(Qd),l=t(Yd),d=t(ns),f=t($),m=f.reducedMotion,h=f.skipAnimations,g=p(null),_=p(!1);i||=l.renderer,!g.current&&i&&(g.current=i(e,{visualState:n,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:h,isSVG:o}),_.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));let v=g.current,y=t(cf);v&&!v.projection&&a&&(v.type===`html`||v.type===`svg`)&&sa(g.current,r,a,y);let b=p(!1);s(()=>{v&&b.current&&v.update(r,d)});let x=r[Gl],S=p(!!x&&u!==void 0&&!u.MotionHandoffIsComplete?.(x)&&u.MotionHasOptimisedAnimation?.(x));return M(()=>{_.current&&v&&(v.animationState?.animateChanges(),v.enteringChildren=void 0)},[]),M(()=>{_.current=!0,v&&(b.current=!0,u.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),w(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{u.MotionHandoffMarkAsComplete?.(x)}),!1),v.enteringChildren=void 0)}),v}function sa(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:ca(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&aa(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function ca(e){if(e)return e.options.allowProjection===!1?ca(e.parent):e.projection}function la(e,{forwardMotionProps:n=!1,type:r}={},i,a){i&&Vi(i);let o=r?r===`svg`:ea(e),s=o?of:af;function c(r,c){let l,d={...t($),...r,layoutId:ua(r)},{isStatic:f,isValidProp:p}=d,m=Wi(r),h=s(r,f);if(!f&&u!==void 0){da(d,i);let t=fa(d);l=t.MeasureLayout,m.visualElement=oa(e,h,d,a,t.ProjectionNode,o)}return v(Qd.Provider,{value:m,children:[l&&m.visualElement?b(l,{visualElement:m.visualElement,...d}):null,ta(e,r,ia(h,m.visualElement,c),h,f,n,o,p)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=x(c);return l[sf]=e,l}function ua({layoutId:e}){let n=t(es).id;return n&&e!==void 0?n+`-`+e:e}function da(e,n){t(Yd).strict}function fa(e){let{drag:t,layout:n}=Bi();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function pa(e,t){if(typeof Proxy>`u`)return la;let n=/* @__PURE__ */ new Map,r=(n,r)=>la(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,la(a,void 0,e,t)),n.get(a))})}function ma(e){return{point:{x:e.pageX,y:e.pageY}}}function ha(e,t,n,r){return Qr(e,t,mf(n),r)}function ga(e,t){let n=gf(e.x,t.x),r=gf(e.y,t.y);return Math.sqrt(n**2+r**2)}function _a(e,t){return t?{point:t(e.point)}:e}function va(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ya({point:e},t){return{point:e,delta:va(e,xa(t)),offset:va(e,ba(t)),velocity:Sa(t,.1)}}function ba(e){return e[0]}function xa(e){return e[e.length-1]}function Sa(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=xa(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>/* @__PURE__ */ I(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>/* @__PURE__ */ I(t)*2&&(r=e[1]);let a=/* @__PURE__ */ L(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ca(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?W(n,e,r.max):Math.min(e,n)),e}function wa(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Ta(e,{top:t,left:n,bottom:r,right:i}){return{x:wa(e.x,n,i),y:wa(e.y,t,r)}}function Ea(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=/* @__PURE__ */ ss(t.min,t.max-r,e.min):r>i&&(n=/* @__PURE__ */ ss(e.min,e.max-i,t.min)),N(0,1,n)}function ka(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}function Aa(e=yf){return e===!1?e=0:e===!0&&(e=yf),{x:ja(e,`left`,`right`),y:ja(e,`top`,`bottom`)}}function ja(e,t,n){return{min:Ma(e,t),max:Ma(e,n)}}function Ma(e,t){return typeof e==`number`?e:e[t]||0}function Na(e){let t=!0;return()=>{t?t=!1:e()}}function Pa(e,t,n){let r=Xn(e,Na(n)),i=Xn(t,Na(n));return()=>{r(),i()}}function Fa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ia(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function La(e){let[n,r]=Fi(),i=t(es);return b(Ef,{...e,layoutGroup:i,switchLayoutGroup:t(cf),isPresent:n,safeToRemove:r})}function Ra(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&G.postRender(()=>i(t,ma(t)))}function za(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&G.postRender(()=>i(t,ma(t)))}function Ba({root:e,...t}){let n=e||document;Mf.has(n)||Mf.set(n,{});let r=Mf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Pf,{root:e,...t})),r[i]}function Va(e,t,n){let r=Ba(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}function Ha({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}function Ua(e,t,n){s(()=>e.on(t,n),[e,t,n])}function Wa(e,t){let n=e===document.scrollingElement,r=n&&document.body||e,i=Gf.get(r);i||Gf.set(r,i=getComputedStyle(r));let{writingMode:a,flexDirection:o}=i,s=t===`x`!==/^[vs]/.test(a);return(s?i.direction===`rtl`!=(a===`sideways-lr`):a.endsWith(`rl`))!==(!n&&i.display.includes(`flex`)&&(s===(o[0]===`c`)?i.flexWrap:o).endsWith(`reverse`))}function Ga(e,t,n,r){let i=n[t],{length:a,position:o}=Wf[t],s=i.current,c=n.time,l=e[`scroll${o}`];i.current=Wa(e,t)?-l||0:l,i.containerLength=e[`client${a}`],i.targetLength=e[`scroll${a}`],i.scrollLength=i.targetLength-i.containerLength,i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=N(0,1,/* @__PURE__ */ ss(0,i.scrollLength,i.current));let u=r-c;i.velocity=u>Vf?0:/* @__PURE__ */ ls(i.current-s,u)}function Ka(e,t,n){for(let r in Wf)Ga(e,r,t,n);t.time=n}function qa(e,t,n=0){let r=0;if(e in Kf&&(e=Kf[e]),typeof e==`string`){let t=parseFloat(e);e.endsWith(`px`)?r=t:e.endsWith(`%`)?e=t/100:e.endsWith(`vw`)?r=t/100*document.documentElement.clientWidth:e.endsWith(`vh`)?r=t/100*document.documentElement.clientHeight:e=t}return typeof e==`number`&&(r=t*e),n+r}function Ja(e,t,n,r){let i=Array.isArray(e)?e:qf,a=0,o=0;return typeof e==`number`?i=[e,e]:typeof e==`string`&&(e=e.trim(),i=e.includes(` `)?e.split(` `):[e,Kf[e]?e:`0`]),a=qa(i[0],n,r),o=qa(i[1],t),a-o}function Ya(e,t){let n=e.length-1;if(n<1)return 0;let r=e[0]>e[n],i=t=>e[r?n-t:t];if(e[0]===e[1]&&t=i(a+1);)a++;let o=(a+/* @__PURE__ */ ss(i(a),i(a+1),t))/n;return r?1-o:o}function Xa(e,t){let{offset:n=Jf.All,axis:r=`y`}=t,i=e[r];i.offset.length=0;let a=n.length;for(let e=0;e{if(a){n.time=t.time;for(let e in Wf){let r=e,{offset:i}=n[r];Object.assign(n[r],t[r]),n[r].offset=i}if(i&&i!==e){let t=Za(i,e),r=Qa(i);n.x.targetOffset=t.x,n.y.targetOffset=t.y,n.x.targetLength=r.width,n.y.targetLength=r.height}Xa(n,r)}},notify:e=>t(a?n:e)}}function eo(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return F;let i=Zf.get(t);i||(i=/* @__PURE__ */ new Set,Zf.set(t,i));let a=$a(t,e,Uf(),r);if(i.add(a),!Yf.has(t)){let e=Uf(),n=()=>{Ka(t,e,R.timestamp);for(let t of i)t.measure(e);G.preUpdate(r)},r=()=>{for(let t of i)t.notify(e)},a=()=>G.read(n);Yf.set(t,a);let o=$f(t);u.addEventListener(`resize`,a),t!==document.documentElement&&Xf.set(t,Xn(t,a)),o.addEventListener(`scroll`,a),a()}if(n&&!Qf.has(t)){let e=Yf.get(t),n={width:t.scrollWidth,height:t.scrollHeight},r=G.read(()=>{let r=t.scrollWidth,i=t.scrollHeight;(n.width!==r||n.height!==i)&&(e(),n.width=r,n.height=i)},!0);Qf.set(t,r)}let o=Yf.get(t);return G.read(o,!1,!0),()=>{K(o);let e=Zf.get(t);if(!e||(e.delete(a),e.size))return;Zf.delete(t);let n=Yf.get(t);Yf.delete(t),n&&($f(t).removeEventListener(`scroll`,n),Xf.get(t)?.(),u.removeEventListener(`resize`,n));let r=Qf.get(t);r&&(K(r),Qf.delete(t))}}function to(e){return u===void 0?!1:e?pl():fl()}function no({container:e,target:t,axis:n}){let r=ep.get(e);r||(r=/* @__PURE__ */ new Map,ep.set(e,r));let i=t??`self`,a=r.get(i);return a||(a={},r.set(i,a)),a[n]||(a[n]=t?new ViewTimeline({subject:t,axis:n}):new ScrollTimeline({source:e,axis:n}))}function ro(e=Jf.All){if(e.length!==2)return;let[t,n]=e.map(tp),r=[np(t),np(n)],i=n[0]-t[0],a=t[1]-n[1];if(r[0]&&r[1]&&(i||a))return{points:r,a:i,b:a,cover:!t[0]&&i===1&&a===1}}function io(e,t){let{target:n,container:r,axis:i}=t,a=n&&ro(t.offset),o=to(n)&&(n?!!a:!t.offset),s=/* @__PURE__ */ new Map,c=/* @__PURE__ */ new Set,l,u=!1,d=(e,t)=>{let[n,r]=a.points;t.effect.updateTiming({direction:u?e===`normal`?`reverse`:`alternate-reverse`:e}),Object.assign(t,{rangeStart:u?r:n,rangeEnd:u?n:r}),t.play()},f=[e.attachTimeline({get timeline(){return o?no(t):void 0},onAttach:a&&(e=>{let t=e.effect.getTiming().direction;s.set(e,t),d(t,e)}),observe:e=>(e.pause(),c.add(e),l||=eo(e=>{c.forEach(t=>{t.time=t.iterationDuration*e[i].progress})},t),()=>c.delete(e))})];if(o&&a){let{a:e,b:t}=a,o=i===`y`?`clientHeight`:`clientWidth`,c=()=>{u!==(u=e*n[o]+t*r[o]<0)&&s.forEach(d)};c(),e*t<0&&f.push(Xn(c),Xn([n,r],c))}return()=>{f.forEach(e=>e()),l?.()}}function ao(e,{axis:t=`y`,source:n,container:r=document.scrollingElement,...i}={}){if(!r)return F;let a={axis:t,container:n||r,...i};return typeof e==`function`?eo(n=>e(n[t].progress,n),a):io(e,a)}function oo(e,t,n,r){return{factory:i=>{let a,o=()=>{ip(n)||ip(r)?Eu.read(o):a=ao(i,{...t,axis:e,container:n?.current||void 0,target:r?.current||void 0})};return Eu.read(o),()=>{Du(o),a?.()}},times:[0,1],keyframes:[0,1],ease:e=>e,duration:1}}function so(e,t){return u===void 0?!1:e?pl()&&!!ro(t):fl()&&!t}function co({container:e,target:t,...n}={}){let r=T(rp);so(t,n.offset)&&(r.scrollXProgress.accelerate=oo(`x`,n,e,t),r.scrollYProgress.accelerate=oo(`y`,n,e,t));let i=p(null),a=p(!1),o=c(()=>(i.current=ao((e,{x:t,y:n})=>{r.scrollX.set(t.current),r.scrollXProgress.set(t.progress),r.scrollY.set(n.current),r.scrollYProgress.set(n.progress)},{...n,container:e?.current||void 0,target:t?.current||void 0}),()=>{i.current?.()}),[e,t,JSON.stringify(n.offset)]);return M(()=>{if(a.current=!1,ip(e)||ip(t))a.current=!0;else return o()},[o]),w(()=>{if(!a.current)return;let n,r=()=>{let r=ip(e),i=ip(t);!r&&!i&&(n=o())};return Eu.read(r),()=>{Du(r),n?.()}},[o]),r}function lo(e){let n=T(()=>D(e)),{isStatic:r}=t($);if(r){let[,t]=f(e);w(()=>n.on(`change`,t),[])}return n}function uo(e,t){let n=lo(t()),r=()=>n.set(t());return r(),M(()=>{let t=()=>G.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),K(r)}}),n}function fo(e){jl.current=[],e();let t=uo(jl.current,e);return jl.current=void 0,t}function po(e,t,n,r){if(typeof e==`function`)return fo(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return ho(e,t,n,r);let i=typeof t==`function`?t:er(t,n,r),a=Array.isArray(e)?mo(e,i):mo([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function mo(e,t){let n=T(()=>[]);return uo(e,()=>{n.length=0;let r=e.length;for(let t=0;tObject.keys(n)),a=T(()=>({}));for(let o of i)a[o]=po(e,t,n[o],r);return a}function go(e,n,r){let{isStatic:i}=t($),a=()=>X(e)?e.get():e;if(i)return po(a);let o=lo(a());return s(()=>r(o,e,n),[o,JSON.stringify(n)]),o}function _o(e,t={}){return go(e,t,ar)}function vo(e){let n=p(0),{isStatic:r}=t($);w(()=>{if(r)return;let t=({timestamp:t,delta:r})=>{n.current||=t,e(t-n.current,r)};return G.update(t,!0),()=>K(t)},[e])}function yo(){!ed.current&&dr();let[e]=f($u.current);return e}function bo(){let e=yo(),{reducedMotion:n}=t($);return n===`never`?!1:n===`always`||e}function xo(e){e.values.forEach(e=>e.stop())}function So(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Rt(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{So(e,t)})})}function Co(e,t){if(Array.isArray(t))return So(e,t);if(typeof t==`string`)return So(e,[t]);Rt(e,t)}function wo(){let e=/* @__PURE__ */ new Set,t={subscribe(t){return e.add(t),()=>void e.delete(t)},start(t,n){let r=[];return e.forEach(e=>{r.push(Kt(e,t,{transitionOverride:n}))}),Promise.all(r)},set(t){return e.forEach(e=>{Co(e,t)})},stop(){e.forEach(e=>{xo(e)})},mount(){return()=>{t.stop()}}};return t}function To(e){return typeof e==`object`&&!Array.isArray(e)}function Eo(e,t,n,r){return e==null?[]:typeof e==`string`&&To(t)?rn(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Do(e,t,n){return e*(t+1)+n*t}function Oo(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function ko(e,t,n){for(let r=0;rt&&i.at{let c=Io(e),{delay:l=0,times:u=Ue(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=_t(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&lp(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=/* @__PURE__ */ I(b));let r=je(n,e,C);y=r.ease,b=r.duration}b??=a;let ee=d+x;u.length===1&&u[0]===0&&(u[1]=1);let w=u.length-c.length;if(w>0&&He(u,w),c.length===1&&c.unshift(null),m&&`${m}`,m&&m0?_/b:0;b=Do(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?/* @__PURE__ */ ps(e):e)));for(let s=0;s0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e{for(let i in e){let a=e[i];a.sort(Mo);let s=[],c=[],l=[];for(let e=0;e{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=D(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Re}).forEach(({keyframes:e,transition:t},n)=>{r.push(...zo(n,e,t))}),r}function Vo(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ho(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),Vo(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Bo(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=zo(e,i,{...c,...r},t)}let l=new Ol(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{E(t.animations,l)})),l}return i}function Uo(){let e=T(wo);return M(e.mount,[]),e}function Wo(e){return typeof e==`object`&&!!e&&sf in e}function Go(e){if(Wo(e))return e[sf]}function Ko(){return qo}function qo(e){zd.current&&(zd.current.isUpdating=!1,zd.current.blockUpdate(),e&&e())}function Jo(){return c(()=>{let e=zd.current;e&&e.resetTree()},[])}function Yo(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=rn(e),o=/* @__PURE__ */ new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n){if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))}})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:fp[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function Xo(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,s]=f(a);return w(()=>{if(!e.current||i&&o)return;let a=()=>(s(!0),i?void 0:()=>s(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return Yo(e.current,a,c)},[t,e,n,i,r]),o}function Zo(){let[e,t]=Ri(),n=Ko(),r=p(-1);return w(()=>{G.postRender(()=>G.postRender(()=>{t===r.current&&(P.instantAnimations=!1)}))},[t]),i=>{n(()=>{P.instantAnimations=!0,e(),i(),r.current=t+1})}}function Qo(){let[e,t]=f(!0);return w(()=>{let e=()=>t(!document.hidden);return document.hidden&&e(),document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e)}},[]),e}var $o,es,ts,M,ns,N,P,rs,is,as,F,os,ss,cs,I,L,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,R,ks,z,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,B,V,Ys,Xs,Zs,Qs,H,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,U,W,uc,dc,fc,pc,mc,hc,gc,_c,vc,G,K,yc,bc,xc,Sc,q,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,J,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,Y,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,X,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Z,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Q,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,$,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp;function mp(){return(mp=e((()=>{a(),ee(),S(),$o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),es=C({}),ts=u!==void 0,M=ts?r:w,ns=/* @__PURE__ */ C(null),N=(e,t,n)=>n>t?t:n/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),is=e=>typeof e==`object`&&!!e,as=e=>/^0[^.\s]+$/u.test(e),F=/* @__NO_SIDE_EFFECTS__ */ e=>e,os=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ss=/* @__NO_SIDE_EFFECTS__ */ (e,t,n)=>{let r=t-e;return r?(n-e)/r:1},cs=class{constructor(){this.subscriptions=[]}add(e){return te(this.subscriptions,e),()=>this.remove(e)}remove(e){E(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;ie*1e3,L=/* @__NO_SIDE_EFFECTS__ */ e=>e/1e3,ls=/* @__NO_SIDE_EFFECTS__ */ (e,t)=>t?1e3/t*e:0,us=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ds=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e),fs=/* @__NO_SIDE_EFFECTS__ */ e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ps=/* @__NO_SIDE_EFFECTS__ */ e=>t=>1-e(1-t),ms=/*@__PURE__*/ re(.33,1.53,.69,.99),hs=/*@__PURE__*/ ps(ms),gs=/*@__PURE__*/ fs(hs),_s=e=>e>=1?1:(e*=2)<1?.5*hs(e):.5*(2-2**(-10*(e-1))),vs=e=>1-Math.sin(Math.acos(e)),ys=/* @__PURE__ */ ps(vs),bs=/* @__PURE__ */ fs(vs),xs=/*@__PURE__*/ re(.42,0,1,1),Ss=/*@__PURE__*/ re(0,0,.58,1),Cs=/*@__PURE__*/ re(.42,0,.58,1),ws=/* @__NO_SIDE_EFFECTS__ */ e=>Array.isArray(e)&&typeof e[0]!=`number`,Ts=/* @__NO_SIDE_EFFECTS__ */ e=>Array.isArray(e)&&typeof e[0]==`number`,Es={linear:F,easeIn:xs,easeInOut:Cs,easeOut:Ss,circIn:vs,circInOut:bs,circOut:ys,backIn:hs,backInOut:gs,backOut:ms,anticipate:_s},Ds=e=>typeof e==`string`,Os=e=>{if(/* @__PURE__ */ Ts(e)){e.length;let[t,n,r,i]=e;return/* @__PURE__ */ re(t,n,r,i)}return Ds(e)?(Es[e],`${e}`,Es[e]):e},R={delta:0,timestamp:0,isProcessing:!1},z={now:()=>(ks===void 0&&z.set(R.isProcessing||P.useManualTiming?R.timestamp:performance.now()),ks),set:e=>{ks=e,queueMicrotask(ae)}},As=e=>Math.round(e*1e5)/1e5,js=e=>t=>typeof t==`string`&&t.startsWith(e),Ms=/*@__PURE__*/ js(`--`),Ns=/*@__PURE__*/ js(`var(--`),Ps=e=>Ns(e)?Fs.test(e.split(`/*`)[0].trim()):!1,Fs=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Is={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ls={...Is,transform:e=>N(0,1,e)},Rs={...Is,default:1},zs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Bs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vs=(e,t)=>n=>!!(typeof n==`string`&&Bs.test(n)&&n.startsWith(e)||t&&!se(n)&&Object.prototype.hasOwnProperty.call(n,t)),Hs=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(zs);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Us=e=>N(0,255,e),Ws={...Is,transform:e=>Math.round(Us(e))},Gs={test:/*@__PURE__*/ Vs(`rgb`,`red`),parse:/*@__PURE__*/ Hs(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ws.transform(e)+`, `+Ws.transform(t)+`, `+Ws.transform(n)+`, `+As(Ls.transform(r))+`)`},Ks={test:/*@__PURE__*/ Vs(`#`),parse:ce,transform:Gs.transform},qs=/* @__NO_SIDE_EFFECTS__ */ e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Js=/*@__PURE__*/ qs(`deg`),B=/*@__PURE__*/ qs(`%`),V=/*@__PURE__*/ qs(`px`),Ys=/*@__PURE__*/ qs(`vh`),Xs=/*@__PURE__*/ qs(`vw`),Zs={...B,parse:e=>B.parse(e)/100,transform:e=>B.transform(e*100)},Qs={test:/*@__PURE__*/ Vs(`hsl`,`hue`),parse:/*@__PURE__*/ Hs(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+B.transform(As(t))+`, `+B.transform(As(n))+`, `+As(Ls.transform(r))+`)`},H={test:e=>Gs.test(e)||Ks.test(e)||Qs.test(e),parse:e=>Gs.test(e)?Gs.parse(e):Qs.test(e)?Qs.parse(e):Ks.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Gs.transform(e):Qs.transform(e),getAnimatableNone:e=>{let t=H.parse(e);return t.alpha=0,H.transform(t)}},$s=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ec=/*@__PURE__*/ new RegExp(zs.source),tc=/*@__PURE__*/ new RegExp($s.source,`i`),nc=`number`,rc=`color`,ic=`var`,ac=`var(`,oc="${}",sc=/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,cc=e=>typeof e==`number`?0:H.test(e)?H.getAnimatableNone(e):e,lc=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:cc(e),U={test:le,parse:fe,createTransformer:me,getAnimatableNone:he},W=(e,t,n)=>e+(t-e)*n,uc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dc=[Ks,Gs,Qs],fc=e=>dc.find(t=>t.test(e)),pc=(e,t)=>{let n=ye(e),r=ye(t);if(!n||!r)return ve(e,t);let i={...n};return e=>(i.red=uc(n.red,r.red,e),i.green=uc(n.green,r.green,e),i.blue=uc(n.blue,r.blue,e),i.alpha=W(n.alpha,r.alpha,e),Gs.transform(i))},mc=/* @__PURE__ */ new Set([`none`,`hidden`]),hc=(e,t)=>{let n=U.createTransformer(t),r=de(e),i=de(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?mc.has(e)&&!i.values.length||mc.has(t)&&!r.values.length?be(e,t):os(Ce(Te(r,i),i.values),n):(`${e}${t}`,ve(e,t))},gc=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu,_c=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],vc=40,{schedule:G,cancel:K,steps:yc}=/* @__PURE__ */ ke(typeof requestAnimationFrame<`u`?requestAnimationFrame:F,!0,R),bc=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>G.update(t,e),stop:()=>K(t),now:()=>R.isProcessing?R.timestamp:z.now()}},xc=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;te<0?1/Math.max(1+e,q.minDamping):Math.max(1-e,q.minDamping),wc=12,Tc=.001,Ec=(e,t)=>(t?e>=0:e>0)&&e<1/0,Re.applyToOptions=e=>{let t=je(e,100,Re);return e.ease=t.ease,e.duration=/* @__PURE__ */ I(t.duration),e.type=`keyframes`,e},Dc=5,Oc=e=>e!==null,kc={decay:ze,inertia:ze,tween:Ke,keyframes:Ke,spring:Re},Ac=40,jc=(e,t)=>t-e>Ac&&!P.useManualTiming?t:e,Mc=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Nc=e=>e/100,Pc=class extends Mc{constructor(e){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=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Qe(this,this.options)}initAnimation(){let{options:e}=this;Xe(e);let{type:t=Ke,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ke;s!==Ke&&typeof o[0]!=`number`&&(this.mixKeyframes=os(Nc,De(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ae(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=jc(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=N(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==ze&&(b.value=Ye(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return/* @__PURE__ */ L(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+/* @__PURE__ */ L(e)}get time(){return/* @__PURE__ */ L(this.currentTime)}set time(e){e=/* @__PURE__ */ I(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Je(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=/* @__PURE__ */ L(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=bc,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(z.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&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}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Fc=/* @__PURE__ */ new Set([`brightness`,`contrast`,`saturate`,`opacity`]),Ic=/\b([a-z-]*)\(.*?\)/gu,Lc={...U,getAnimatableNone:e=>{let t=e.match(Ic);return t?t.map(tt).join(` `):e}},Rc={...U,getAnimatableNone:e=>{let t=U.parse(e);return U.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},zc={...Is,transform:Math.round},Bc={rotate:Js,pathRotation:Js,rotateX:Js,rotateY:Js,rotateZ:Js,scale:Rs,scaleX:Rs,scaleY:Rs,scaleZ:Rs,skew:Js,skewX:Js,skewY:Js,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Ls,originX:Zs,originY:Zs,originZ:V},J={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Bc,zIndex:zc,fillOpacity:Ls,strokeOpacity:Ls,numOctaves:zc},Vc={...J,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:Lc,WebkitFilter:Lc,mask:Rc,WebkitMask:Rc},Hc=e=>Vc[e],Uc=/*@__PURE__*/ new Set([Lc,Rc]),Wc=e=>e*180/Math.PI,Gc=e=>{let t=Wc(Math.atan2(e[1],e[0]));return qc(t)},Kc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gc,rotateZ:Gc,skewX:e=>Wc(Math.atan(e[1])),skewY:e=>Wc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qc=e=>(e%=360,e<0&&(e+=360),e),Jc=Gc,Yc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Zc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yc,scaleY:Xc,scale:e=>(Yc(e)+Xc(e))/2,rotateX:e=>qc(Wc(Math.atan2(e[6],e[5]))),rotateY:e=>qc(Wc(Math.atan2(-e[2],e[0]))),rotateZ:Jc,rotate:Jc,skewX:e=>Wc(Math.atan(e[4])),skewY:e=>Wc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2},Qc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return at(n,t)},$c=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Y=/* @__PURE__ */ new Set([...$c,`pathRotation`]),el=e=>e===Is||e===V,tl=/* @__PURE__ */ new Set([`x`,`y`,`z`]),nl=$c.filter(e=>!tl.has(e)),rl=/* @__PURE__ */ new Set([`bottom`,`right`]),il={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>ct(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>ct(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>at(e,`x`),y:({transform:e})=>at(e,`y`)},il.translateX=il.x,il.translateY=il.y,al=/* @__PURE__ */ new Set,ol=!1,sl=!1,cl=!1,ll=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(al.add(this),ol||(ol=!0,G.read(ut),G.resolveKeyframes(lt))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=ft(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}rt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),al.delete(this)}cancel(){this.state===`scheduled`&&(al.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},ul=e=>e.startsWith(`--`),dl={},fl=/* @__PURE__ */ mt(()=>u.ScrollTimeline!==void 0,`scrollTimeline`),pl=/* @__PURE__ */ mt(()=>u.ViewTimeline!==void 0,`viewTimeline`),ml=/*@__PURE__*/ mt(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),hl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gl={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:/*@__PURE__*/ hl([0,.65,.55,1]),circOut:/*@__PURE__*/ hl([.55,0,1,.45]),backIn:/*@__PURE__*/ hl([.31,.01,.66,-.59]),backOut:/*@__PURE__*/ hl([.33,1.53,.69,.99])},_l=class extends Mc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=vt(e);this.animation=gt(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ye(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),pt(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Qe(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return/* @__PURE__ */ L(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+/* @__PURE__ */ L(e)}get time(){return/* @__PURE__ */ L(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=/* @__PURE__ */ I(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&fl()?(this.animation.timeline=e,t?.(this.animation),F):n(this)}},vl={anticipate:_s,backInOut:gs,circInOut:bs},yl=10,bl=class extends _l{constructor(e){bt(e),Xe(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Pc({...a,autoplay:!1}),s=Math.max(yl,z.now()-this.startTime),c=N(0,yl,s-yl),l=o.sample(s).value,{name:u}=this.options;i&&u&&pt(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},xl=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(U.test(e)||e===`0`)&&!e.startsWith(`url(`)),Sl=/* @__PURE__ */ new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Cl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,wl=/* @__PURE__ */ new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Tl=/*@__PURE__*/ ne(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),El=class extends Mc{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=z.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||ll;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=z.now();let u=!0;St(e,i,a,o)||(u=!1,(P.instantAnimations||!s)&&l?.(Ye(e,n,t)),e[0]=e[e.length-1],Ct(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Tt(n);r&&(f||this.resolvedAt!==this.createdAt)&&(n.startTime??=jc(this.createdAt,this.resolvedAt));let p;if(f){n.element=n.motionValue?.owner?.current;try{p=new bl(n)}catch{p=new Pc(n)}}else p=new Pc(n);this.pendingTimeline&&=(this.stopTimeline=p.attachTimeline(this.pendingTimeline),void 0),this._animation=p}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dt()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Dl=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;nt.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Et(this.animations,`duration`)}get iterationDuration(){return Et(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},Ol=class extends Dl{then(e,t){return this.finished.finally(e).then(()=>{})}},kl=30,Al=e=>!isNaN(parseFloat(e)),jl={current:void 0},Ml=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=z.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Al(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new cs)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new cs,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){G.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=/* @__PURE__ */ new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return jl.current&&jl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kl)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,kl);return/* @__PURE__ */ ls(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}},Nl={type:`spring`,stiffness:500,damping:25,restSpeed:10},Pl=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fl={type:`keyframes`,duration:.8},Il={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ll=(e,{keyframes:t})=>t.length>2?Fl:Y.has(e)?e.startsWith(`scale`)?Pl(t[1]):Nl:Il,Rl=/* @__PURE__ */ new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]),zl=(e,t,n,r={},i,a)=>o=>{let s=kt(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=/* @__PURE__ */ I(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};At(s)||Object.assign(u,Ll(e,u)),u.duration&&=/* @__PURE__ */ I(u.duration),u.repeatDelay&&=/* @__PURE__ */ I(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ct(u),u.delay===0&&(d=!0)),(P.instantAnimations||P.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Ct(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ye(u.keyframes,s);if(e!==void 0){G.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Pc(u):new El(u)},Bl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,Vl=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Hl=/* @__PURE__ */ new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...$c]),Ul=e=>Array.isArray(e),X=e=>!!(e&&e.getVelocity),Wl=`framerAppearId`,Gl=`data-`+Vt(Wl),Kl=u!==void 0,ql={test:e=>e===`auto`,parse:e=>e},Jl=e=>t=>t.test(e),Yl=[Is,V,B,Js,Xs,Ys,ql],Xl=e=>Yl.find(Jl(e)),Zl=/* @__PURE__ */ new Set([`auto`,`none`,`0`]),Ql=class extends ll{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;ne.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=u.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},$l=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],[...$l],eu=[],tu=(e,t)=>t&&typeof e==`number`?t.transform(e):e,nu=class{constructor(e=G.render){this.step=e,this.values=/* @__PURE__ */ new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;nn&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=/* @__PURE__ */ new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;rtu(e.get(t)?.get(),J[t]),su=(e,t,n,r)=>{let i,a;if(Y.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>$c.indexOf(e)-$c.indexOf(t)))}t.get(`transform`)||(!tn(e)&&!t.get(`transformBox`)&&su(e,t,`transformBox`,new Ml(`fill-box`)),t.set(`transform`,new Ml(`none`),()=>{e.style.transform=on(t)})),a=t.get(`transform`)}else au.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new Ml(``),()=>{let n=ou(t,`originX`)??`50%`,r=ou(t,`originY`)??`50%`,i=ou(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=ul(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=tu(r.get(),J[n])};return t.set(n,r,i,a)},cu=e=>tn(e)||nn(e),lu=(e,t)=>{if(Y.has(t))return Qc(e,t);let n=getComputedStyle(e),r=ul(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},uu=/*@__PURE__*/ an(su,{test:cu,read:lu}),du={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},fu=$c.length,pu={offset:`stroke-dashoffset`,array:`stroke-dasharray`},mu={offset:`strokeDashoffset`,array:`strokeDasharray`},hu=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`],gu=(e,t,n,r,i=n)=>{let a=dn(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Vt(i));let o=J[n]||J[i],s=a?()=>{e[i]=tu(r.get(),J[n])}:()=>{let t=tu(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)},_u=(e,t,n,r)=>n.startsWith(`path`)?fn(e,t,n,r):n.startsWith(`attr`)?gu(e,t,n,r,pn(n)):(Y.has(n)||au.has(n)||ul(n)||n in e.style?su:gu)(e,t,n,r),vu=(e,t)=>Y.has(t)?J[t]?.default||0:ul(t)||hu.includes(t)?lu(e,t)||e.getAttribute(Vt(t))||0:(t=pn(t),e.getAttribute(Vt(t))??e.getAttribute(t)??void 0),yu=/*@__PURE__*/ an(_u,{test:nn,read:vu}),bu=.999999999999,xu=1.0000000000001,Su={},Cu=e=>nn(e)?yu:uu,wu=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=Ql}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return An(this.current)}getProps(){return Su}},Tu=/*@__PURE__*/ an((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>is(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:Eu,cancel:Du}=/* @__PURE__ */ ke(queueMicrotask,!1),Z={x:!1,y:!1},Ou=(e,t)=>t?e===t||Ou(e,t.parentElement):!1,ku=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Au=/* @__PURE__ */ new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]),ju=/* @__PURE__ */ new Set([`INPUT`,`SELECT`,`TEXTAREA`]),Mu=/* @__PURE__ */ new WeakSet,Nu=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Bn(()=>{if(Mu.has(n))return;Vn(n,`down`);let e=Bn(()=>{Vn(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Vn(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)},Pu=/* @__PURE__ */ new WeakSet,Fu=/* @__PURE__ */ new WeakMap,Lu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:nn(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ru=/*@__PURE__*/ Lu(`inline`,`width`,`offsetWidth`),zu=/*@__PURE__*/ Lu(`block`,`height`,`offsetHeight`),Bu=/* @__PURE__ */ new Set,Hu={value:null,addProjectionMetrics:null},Uu=/* @__PURE__ */ new Set,Wu=({timestamp:e})=>{Uu.forEach(t=>t.tick(e))},Gu=class extends Mc{constructor(e){super(),this.state=`idle`,this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.factory=e.type,this.generator=this.factory(e);let{driver:t}=e;t&&(this.driver=t(e=>this.tick(e))),this.startTime=this.now(),this.state=`running`,this.driver?this.driver.start():(Uu.size||G.update(Wu,!0),Uu.add(this))}setTarget(e,t){this.nextTarget=e,this.nextVelocity=t,this.hasNextTarget=!0}retarget(e,t){let{options:n,generator:r}=this;n.keyframes=e,n.velocity=t,this.startTime=this.now(),this.currentTime=0,r.retarget?r.retarget(e,t):this.generator=this.factory(n)}tick(e){let{options:t,hasNextTarget:n}=this,{delay:r=0,onUpdate:i,onPlay:a}=t;this.started||(this.startTime=jc(this.startTime,e));let o=Math.round(e-this.startTime)-r,s=this.currentTime=Math.max(0,o),c=this.generator.next(s),l=o<0?t.keyframes[0]:c.value;if(n){this.hasNextTarget=!1;let{keyframes:e}=t;e[0]=l,e[1]=this.nextTarget,this.retarget(e,this.nextVelocity??this.getGeneratorVelocity())}(n||!this.started)&&(this.started=!0,a?.()),this.state===`running`&&(i?.(l),c.done&&o>=0&&!n&&!this.hasNextTarget&&this.state===`running`&&(this.notifyFinished(),this.teardown(),this.state=`finished`,t.onComplete?.()))}getGeneratorVelocity(){return Je(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():z.now()}teardown(){this.state=`idle`,this.driver?this.driver.stop():(Uu.delete(this),Uu.size||K(Wu))}},Ku=e=>typeof e==`number`?e:parseFloat(e),[...Yl],qu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ju=()=>({x:qu(),y:qu()}),Yu=()=>({min:0,max:0}),Q=()=>({x:Yu(),y:Yu()}),Xu=/* @__PURE__ */ new WeakMap,Zu=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Qu=[`initial`,...Zu],$u={current:null},ed={current:!1},td=u!==void 0,nd=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],rd={},id=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=/* @__PURE__ */ new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=/* @__PURE__ */ new Map,this.KeyframeResolver=ll,this.features={},this.valueSubscriptions=/* @__PURE__ */ 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=()=>{let e=z.now();this.renderScheduledAtt.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ed.current||dr(),this.shouldReduceMotion=$u.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(),K(this.notifyUpdate),K(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=/* @__PURE__ */ new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Sl.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new _l({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:/* @__PURE__ */ I(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Y.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&G.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;u!==void 0&&u.MotionCheckAppearSync&&(i=u.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in rd){let t=rd[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t{this.current&&(this.current.textContent=`${e}`)}))}},od=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},sd={},cd=class extends ad{constructor(){super(...arguments),this.type=`html`,this.renderInstance=mr}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Y.has(t))return this.projection?.isProjecting?it(t):Qc(e,t);{let n=vr(e),r=(Ms(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return An(e,t)}build(e,t,n){cn(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _r(e,t,n)}},ld=/* @__PURE__ */ 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`]),ud=e=>typeof e==`string`&&e.toLowerCase()===`svg`,dd=class extends ad{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Q}getBaseTargetFromProps(e,t){return Y.has(t)?super.getBaseTargetFromProps(e,t)??it(t):e[t]}getDefaultValue(e){return Y.has(e)?this.latestValues[e]??it(e):void 0}readValueFromInstance(e,t){if(Y.has(t)){let e=Hc(t);return e&&e.default||0}if(hu.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=ld.has(t)?t:Vt(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return br(e,t,n)}build(e,t,n){un(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){yr(e,t,n,r)}mount(e){this.isSVGTag=ud(e.tagName),super.mount(e)}},fd=[...Zu].reverse(),Qu.length,pd=.9999,md=1.0001,hd=-.01,gd=.01,_d=[`x`,`scaleX`,`originX`],vd=[`y`,`scaleY`,`originY`],yd={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(V.test(e))e=parseFloat(e);else return e}return`${Kr(e,t.target.x)}% ${Kr(e,t.target.y)}%`}},bd={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=U.parse(e);if(i.length>5)return r;let a=U.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=W(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},xd=$l.length,Sd=e=>typeof e==`number`||V.test(e),Cd=/*@__PURE__*/ Xr(0,.5,ys),wd=/*@__PURE__*/ Xr(.5,.95,F),Td=(e,t)=>e.depth-t.depth,Ed=class{constructor(){this.children=[],this.isDirty=!1}add(e){te(this.children,e),this.isDirty=!0}remove(e){E(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Td),this.isDirty=!1,this.children.forEach(e)}},Dd=class{constructor(){this.members=[]}add(e){te(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(E(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(E(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Od={borderRadius:{...yd,applyTo:[...$l]},borderTopLeftRadius:yd,borderTopRightRadius:yd,borderBottomLeftRadius:yd,borderBottomRightRadius:yd,boxShadow:bd},kd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Object.assign(sd,{...Od,...sd}),Ad={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},jd=[``,`X`,`Y`,`Z`],Md=1e3,Nd=0,Pd={duration:.45,ease:[.4,0,.1,1]},Fd=e=>o!==void 0&&o.userAgent&&o.userAgent.toLowerCase().includes(e),Id=Fd(`applewebkit/`)&&!Fd(`chrome/`)?Math.round:F,Ld=ri({attachResizeListener:(e,t)=>Qr(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Rd=e=>!e.isLayoutDirty&&e.willUpdate(!1),zd={current:void 0},Bd=ri({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zd.current){let e=new Ld({});e.mount(u),e.setOptions({layoutScroll:!0}),zd.current=e}return zd.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>u.getComputedStyle(e).position===`fixed`}),_c.reduce((e,t)=>(e[t]=e=>K(e),e),{}),$=C({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),Vd=class extends g{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(tn(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=tn(e)&&e.offsetWidth||0,r=tn(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}},Hd=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=T(Pi),f=n(),m=p(r),h=p(i);M(()=>{m.current=r,h.current=i});let g=!0,v=_(()=>(g=!1,{id:f,initial:t,isPresent:r,custom:a,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;i&&i()},register:e=>(d.set(e,!1),()=>{d.delete(e),!m.current&&!d.size&&h.current?.()})}),[r,d,i]);return o&&g&&(v={...v}),_(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),w(()=>{!r&&!d.size&&i&&i()},[r]),e=b(Ni,{pop:s===`popLayout`,isPresent:r,anchorX:c,anchorY:l,root:u,children:e}),b(ns.Provider,{value:v,children:e})},Ud=e=>e.key||``,Wd=({children:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:l=`top`,root:u})=>{let[d,h]=Fi(s),g=_(()=>Ii(e),[e]),v=s&&!d?[]:g.map(Ud),y=p(!0),x=T(()=>/* @__PURE__ */ new Map),S=p(/* @__PURE__ */ new Set),[C,ee]=f(g),[w,te]=f(g);M(()=>{s&&!d&&!w.length&&h?.()},[d,s,w.length,h]),M(()=>{y.current=!1;for(let e=0;ex.get(Ud(e)))?e=g:o===`wait`&&(e=E),te(Ii(e)),ee(g),null}let{forceRender:ne}=t(es);return b(m,{children:w.map(e=>{let t=Ud(e),f=s&&!d?!1:g===w||v.includes(t);return b(Hd,{isPresent:f,initial:!y.current||r?void 0:!1,custom:n,presenceAffectsLayout:a,mode:o,root:u,onExitComplete:f?void 0:()=>{if(S.current.has(t))return;if(x.has(t))S.current.add(t),x.set(t,!0);else return;let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(ne?.(),ee([]),s&&h?.(),i&&i())},anchorX:c,anchorY:l,children:e},t)})})},Gd=C(null),Kd=e=>e===!0,qd=e=>Kd(e===!0)||e===`id`,Jd=({children:e,id:n,inherit:r=!0})=>{let i=t(es),a=t(Gd),[o,s]=Ri(),c=p(null),l=i.id||a;c.current===null&&(qd(r)&&l&&(n=n?l+`-`+n:l),c.current={id:n,group:Kd(r)&&i.group||ki()});let u=_(()=>({...c.current,forceRender:o}),[s]);return b(es.Provider,{value:u,children:e})},Yd=C({strict:!1}),Xd={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Zd=!1,Qd=/* @__PURE__ */ C({}),$d=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ef=()=>({...$d(),attrs:{}}),tf=/* @__PURE__ */ new Set(/* @__PURE__ */ `animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`)),nf=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`],rf=e=>(n,r)=>{let i=t(Qd),a=t(ns),o=()=>na(e,n,i,a);return r?o():T(o)},af=/*@__PURE__*/ rf({scrapeMotionValuesFromProps:_r,createRenderState:$d}),of=/*@__PURE__*/ rf({scrapeMotionValuesFromProps:br,createRenderState:ef}),sf=Symbol.for(`motionComponentSymbol`),cf=C({}),lf=(e,t)=>t.isSVG??ea(e)?new dd(t):new cd(t,{allowProjection:e!==l}),uf=class extends od{constructor(e){super(e),e.animationState||=Sr(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();or(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},df=0,ff=class extends od{constructor(){super(...arguments),this.id=df++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Ft(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},pf={animation:{Feature:uf},exit:{Feature:ff}},mf=e=>t=>ku(t)&&e(t,ma(t)),hf=({current:e})=>e?e.ownerDocument.defaultView:null,gf=(e,t)=>Math.abs(e-t),_f=/*#__PURE__*/ new Set([`auto`,`scroll`]),vf=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=u,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=u,this.scrollPositions=/* @__PURE__ */ new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(u)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=_a(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ya(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ga(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:z.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=_a(t,this.transformPagePoint),this.hasPendingMove=!0,G.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ya(e.type===`pointercancel`?this.lastMoveEventInfo:_a(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ku(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||u;let s=_a(ma(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=R;this.history=[{...c,timestamp:l}];let{onSessionStart:d}=t;d&&d(e,ya(s,this.history));let f={passive:!0,capture:!0};this.removeListeners=os(ha(this.contextWindow,`pointermove`,this.handlePointerMove,f),ha(this.contextWindow,`pointerup`,this.handlePointerUp,f),ha(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(_f.has(e.overflowX)||_f.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(u,{x:u.scrollX,y:u.scrollY}),u.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),u.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{u.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),u.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===u,r=n?{x:u.scrollX,y:u.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),G.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),K(this.updatePoint)}},yf=.35,bf=/* @__PURE__ */ new WeakMap,xf=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Pn(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),j(e=>{let t=this.getAxisMotionValue(e).get()||0;if(B.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=A(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&G.update(()=>i(e,t),!1,!0),Bt(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=Ia(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&G.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new vf(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:hf(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&G.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Fa(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ca(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&aa(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Ta(n.layoutBox,e):!1,this.elastic=Aa(t),r!==this.constraints&&!aa(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&j(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ka(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!aa(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=jn(n,r.root,this.visualElement.getTransformPagePoint()),a=Da(r.layout.layoutBox,i);if(t){let e=t(hn(a));this.hasMutatedConstraints=!!e,e&&(a=mn(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=j(o=>{if(!Fa(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Bt(this.visualElement,e),n.start(zl(e,n,0,t,this.visualElement,!1))}stopAnimation(){j(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();j(e=>{if(!Fa(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-W(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!aa(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};j(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Oa({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),j(t=>{let n=this.getAxisMotionValue(t);if(!Fa(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(W(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);let e=this.visualElement.current,t=ha(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&zn(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();aa(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Pa(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),G.read(r);let o=Qr(u,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(j(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=yf,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}},Sf=class extends od{constructor(e){super(e),this.removeGroupControls=F,this.removeListeners=F,this.controls=new xf(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||F}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Cf=e=>(t,n)=>{e&&G.update(()=>e(t,n),!1,!0)},wf=class extends od{constructor(){super(...arguments),this.removePointerDownListener=F}onPointerDown(e){this.session=new vf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hf(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Cf(e),onStart:Cf(t),onMove:Cf(n),onEnd:(e,t)=>{delete this.session,r&&G.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ha(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Tf=!1,Ef=class extends g{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Tf&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),kd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Tf=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||G.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Eu.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Tf=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}},Df={pan:{Feature:wf},drag:{Feature:Sf,ProjectionNode:Bd,MeasureLayout:La}},Of=class extends od{mount(){let{current:e}=this.node;e&&(this.unmount=Ln(e,(e,t)=>(Ra(this.node,t,`Start`),e=>Ra(this.node,e,`End`))))}unmount(){}},kf=class extends od{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=os(Qr(this.node.current,`focus`,()=>this.onFocus()),Qr(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},Af=class extends od{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Un(e,(e,t)=>(za(this.node,t,`Start`),(e,{success:t})=>za(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},jf=/* @__PURE__ */ new WeakMap,Mf=/* @__PURE__ */ new WeakMap,Nf=e=>{let t=jf.get(e.target);t&&t(e)},Pf=e=>{e.forEach(Nf)},Ff={some:0,all:1},If=class extends od{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Ff[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Va(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ha(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},Lf={inView:{Feature:If},tap:{Feature:Af},focus:{Feature:kf},hover:{Feature:Of}},Rf={layout:{ProjectionNode:Bd,MeasureLayout:La}},zf=/*@__PURE__*/ pa({...pf,...Lf,...Df,...Rf},lf),Bf={renderer:lf,...pf,...Lf},{...Bf,...Df,...Rf},{...pf},Vf=50,Hf=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Uf=()=>({time:0,x:Hf(),y:Hf()}),Wf={x:{length:`Width`,position:`Left`},y:{length:`Height`,position:`Top`}},Gf=/* @__PURE__ */ new WeakMap,Kf={start:0,center:.5,end:1},qf=[0,0],Jf={All:[[0,0],[1,1]]},Yf=/* @__PURE__ */ new WeakMap,Xf=/* @__PURE__ */ new WeakMap,Zf=/* @__PURE__ */ new WeakMap,Qf=/* @__PURE__ */ new WeakMap,$f=e=>e===document.scrollingElement?u:e,ep=/* @__PURE__ */ new Map,tp=e=>{if(/v/u.test(e))return[];let t=Ja(e,0,0,0);return[Ja(e,0,1,0)-t,t-Ja(e,1,0,0),t]},np=([e,t,n])=>!n&&(t===0||t===1)&&`${t?`entry`:`exit`}-crossing ${e*100}%`,rp=()=>({scrollX:D(0),scrollY:D(0),scrollXProgress:D(0),scrollYProgress:D(0)}),ip=e=>e?!e.current:!1,ap=class extends Ml{constructor(){super(...arguments),this.isEnabled=!1}add(e){(Y.has(e)||Sl.has(e))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?`transform`:`auto`)}},op=`easeInOut`,sp=20,cp=e=>typeof e==`number`,lp=e=>e.every(cp),up=Object.assign(Ho(),{addEffect:Yt,removeEffect:Xt}),dp=Uo,fp={some:0,all:1},pp=()=>({}),rf({scrapeMotionValuesFromProps:pp,createRenderState:pp}),C(null)})))()}function hp(){return(hp=e((()=>{mp(),ee(),S()})))()}export{us as $,ao as A,Ko as B,Zi as C,Gl as D,F as E,Go as F,Qo as G,M as H,dp as I,Jo as J,Fi as K,vo as L,$n as M,er as N,Xn as O,ir as P,Xu as Q,Mi as R,X as S,D as T,lo as U,Zo as V,Ua as W,_o as X,co as Y,po as Z,N as _,Hi as a,mp as b,Ml as c,ap as d,$o as f,K as g,et as h,Jd as i,Re as j,ei as k,ns as l,up as m,Wd as n,$ as o,hr as p,bo as q,Pc as r,P as s,hp as t,cf as u,G as v,zf as w,Wo as x,Yo as y,Xo as z}; //# sourceMappingURL=motion.x14TTX80.mjs.map