vendor: 29,361 bytes, line 1
1import{r as P,j as U}from"./index-buBksnUc.js";const fi=P.createContext({});function St(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const oo=typeof window<"u",un=oo?P.useLayoutEffect:P.useEffect,hn=P.createContext(null);function fn(t,e){t.indexOf(e)===-1&&t.push(e)}function ie(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Z=(t,e,n)=>n>e?e:n<t?t:n;let dn=()=>{};const ot={},di=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),mi=t=>typeof t=="object"&&t!==null,pi=t=>/^0[^.\s]+$/u.test(t);function gi(t){let e;return()=>(e===void 0&&(e=t()),e)}const $=t=>t,Ut=(...t)=>t.reduce((e,n)=>s=>n(e(s))),bt=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class mn{constructor(){this.subscriptions=[]}add(e){return fn(this.subscriptions,e),()=>ie(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const z=t=>t*1e3,K=t=>t/1e3,pn=(t,e)=>e?t*(1e3/e):0,yi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ao=1e-7,lo=12;function co(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=yi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ao&&++a<lo);return r}function $t(t,e,n,s){if(t===e&&n===s)return $;const i=o=>co(o,0,1,t,n);return o=>o===0||o===1?o:yi(i(o),e,s)}const vi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xi=t=>e=>1-t(1-e),Ti=$t(.33,1.53,.69,.99),gn=xi(Ti),wi=vi(gn),Pi=t=>t>=1?1:(t*=2)<1?.5*gn(t):.5*(2-Math.pow(2,-10*(t-1))),yn=t=>1-Math.sin(Math.acos(t)),Si=xi(yn),bi=vi(yn),uo=$t(.42,0,1,1),ho=$t(0,0,.58,1),Ai=$t(.42,0,.58,1),fo=t=>Array.isArray(t)&&typeof t[0]!="number",Vi=t=>Array.isArray(t)&&typeof t[0]=="number",mo={linear:$,easeIn:uo,easeInOut:Ai,easeOut:ho,circIn:yn,circInOut:bi,circOut:Si,backIn:gn,backInOut:wi,backOut:Ti,anticipate:Pi},po=t=>typeof t=="string",$n=t=>{if(Vi(t)){dn(t.length===4);const[e,n,s,i]=t;return $t(e,n,s,i)}else if(po(t))return mo[t];return t},Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function go(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&r.add(c),m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const yo=40;function Ci(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Kt.reduce((x,w)=>(x[w]=go(o),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=r,p=()=>{const x=ot.useManualTiming,w=x?i.timestamp:performance.now();n=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,yo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},g=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:Kt.reduce((x,w)=>{const A=r[w];return x[w]=(E,C=!1,b=!1)=>(n||g(),A.schedule(E,C,b)),x},{}),cancel:x=>{for(let w=0;w<Kt.length;w++)r[Kt[w]].cancel(x)},state:i,steps:r}}const{schedule:V,cancel:G,state:B,steps:xe}=Ci(typeof requestAnimationFrame<"u"?requestAnimationFrame:$,!0);let qt;function vo(){qt=void 0}const j={now:()=>(qt===void 0&&j.set(B.isProcessing||ot.useManualTiming?B.timestamp:performance.now()),qt),set:t=>{qt=t,queueMicrotask(vo)}},Mi=t=>e=>typeof e=="string"&&e.startsWith(t),Ei=Mi("--"),xo=Mi("var(--"),vn=t=>xo(t)?To.test(t.split("/*")[0].trim()):!1,To=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ct={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},jt={...Ct,transform:t=>Z(0,1,t)},Gt={...Ct,default:1},kt=t=>Math.round(t*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wo(t){return t==null}const Po=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tn=(t,e)=>n=>!!(typeof n=="string"&&Po.test(n)&&n.startsWith(t)||e&&!wo(n)&&Object.prototype.hasOwnProperty.call(n,e)),Di=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(xn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},So=t=>Z(0,255,t),Te={...Ct,transform:t=>Math.round(So(t))},ft={test:Tn("rgb","red"),parse:Di("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Te.transform(t)+", "+Te.transform(e)+", "+Te.transform(n)+", "+kt(jt.transform(s))+")"};function bo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Fe={test:Tn("#"),parse:bo,transform:ft.transform},zt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),it=zt("deg"),nt=zt("%"),T=zt("px"),Ao=zt("vh"),Vo=zt("vw"),Hn={...nt,parse:t=>nt.parse(t)/100,transform:t=>nt.transform(t*100)},xt={test:Tn("hsl","hue"),parse:Di("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+nt.transform(kt(e))+", "+nt.transform(kt(n))+", "+kt(jt.transform(s))+")"},L={test:t=>ft.test(t)||Fe.test(t)||xt.test(t),parse:t=>ft.test(t)?ft.parse(t):xt.test(t)?xt.parse(t):Fe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ft.transform(t):xt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},Co=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Mo(t){return isNaN(t)&&typeof t=="string"&&(t.match(xn)?.length||0)+(t.match(Co)?.length||0)>0}const Ri="number",Li="color",Eo="var",Do="var(",Kn="${}",Ro=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function At(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Ro,l=>(L.test(l)?(s.color.push(o),i.push(Li),n.push(L.parse(l))):l.startsWith(Do)?(s.var.push(o),i.push(Eo),n.push(l)):(s.number.push(o),i.push(Ri),n.push(parseFloat(l))),++o,Kn)).split(Kn);return{values:n,split:a,indexes:s,types:i}}function Lo(t){return At(t).values}function ki({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===Ri?i+=kt(s[o]):r===Li?i+=L.transform(s[o]):i+=s[o]}return i}}function ko(t){return ki(At(t))}const Bo=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,Io=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Bo(t);function Fo(t){const e=At(t);return ki(e)(e.values.map((s,i)=>Io(s,e.split[i])))}const q={test:Mo,parse:Lo,createTransformer:ko,getAnimatableNone:Fo};function we(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Oo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=we(l,a,t+1/3),o=we(l,a,t),r=we(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function re(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,Pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},jo=[Fe,ft,xt],No=t=>jo.find(e=>e.test(t));function Gn(t){const e=No(t);if(!e)return!1;let n=e.parse(t);return e===xt&&(n=Oo(n)),n}const _n=(t,e)=>{const n=Gn(t),s=Gn(e);if(!n||!s)return re(t,e);const i={...n};return o=>(i.red=Pe(n.red,s.red,o),i.green=Pe(n.green,s.green,o),i.blue=Pe(n.blue,s.blue,o),i.alpha=M(n.alpha,s.alpha,o),ft.transform(i))},Oe=new Set(["none","hidden"]);function Wo(t,e){return Oe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Uo(t,e){return n=>M(t,e,n)}function wn(t){return typeof t=="number"?Uo:typeof t=="string"?vn(t)?re:L.test(t)?_n:Ho:Array.isArray(t)?Bi:typeof t=="object"?L.test(t)?_n:$o:re}function Bi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>wn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function $o(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=wn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function zo(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Ho=(t,e)=>{const n=q.createTransformer(e),s=At(t),i=At(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Oe.has(t)&&!i.values.length||Oe.has(e)&&!s.values.length?Wo(t,e):Ut(Bi(zo(s,i),i.values),n):re(t,e)};function Ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):wn(t)(t,e)}const Ko=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>G(e),now:()=>B.isProcessing?B.timestamp:j.now()}},Fi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},oe=2e4;function Pn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<oe;)e+=n,s=t.next(e);return e>=oe?1/0:e}function Go(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Pn(s),oe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:K(i)}}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function je(t,e){return t*Math.sqrt(1-e*e)}const _o=12;function Xo(t,e,n){let s=n;for(let i=1;i<_o;i++)s=s-t(s)/e(s);return s}const Se=.001;function Yo({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o,r=1-e;r=Z(D.minDamping,D.maxDamping,r),t=Z(D.minDuration,D.maxDuration,K(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=je(u,r),m=Math.exp(-h);return Se-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=je(Math.pow(u,2),r);return(-i(u)+Se>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Se+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Xo(i,o,a);if(t=z(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const qo=["duration","bounce"],Zo=["stiffness","damping","mass"];function Xn(t,e){return e.some(n=>t[n]!==void 0)}function Jo(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!Xn(t,Zo)&&Xn(t,qo))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*Z(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=Yo({...t,velocity:0});e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function ae(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Jo({...n,velocity:-K(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),g=r-o,y=K(Math.sqrt(l/c)),v=Math.abs(g)<5;s||(s=v?D.restSpeed.granular:D.restSpeed.default),i||(i=v?D.restDelta.granular:D.restDelta.default);let x,w,A,E,C,b;if(p<1)A=je(y,p),E=(m+p*y*g)/A,x=S=>{const R=Math.exp(-p*y*S);return r-R*(E*Math.sin(A*S)+g*Math.cos(A*S))},C=p*y*E+g*A,b=p*y*g-E*A,w=S=>Math.exp(-p*y*S)*(C*Math.sin(A*S)+b*Math.cos(A*S));else if(p===1){x=R=>r-Math.exp(-y*R)*(g+(m+y*g)*R);const S=m+y*g;w=R=>Math.exp(-y*R)*(y*S*R-m)}else{const S=y*Math.sqrt(p*p-1);x=J=>{const st=Math.exp(-p*y*J),Q=Math.min(S*J,300);return r-st*((m+p*y*g)*Math.sinh(Q)+S*g*Math.cosh(Q))/S};const R=(m+p*y*g)/S,W=p*y*R-g*S,lt=p*y*g-R*S;w=J=>{const st=Math.exp(-p*y*J),Q=Math.min(S*J,300);return st*(W*Math.sinh(Q)+lt*Math.cosh(Q))}}const I={calculatedDuration:d&&h||null,velocity:S=>z(w(S)),next:S=>{if(!d&&p<1){const W=Math.exp(-p*y*S),lt=Math.sin(A*S),J=Math.cos(A*S),st=r-W*(E*lt+g*J),Q=z(W*(C*lt+b*J));return a.done=Math.abs(Q)<=s&&Math.abs(r-st)<=i,a.value=a.done?r:st,a}const R=x(S);if(d)a.done=S>=h;else{const W=z(w(S));a.done=Math.abs(W)<=s&&Math.abs(r-R)<=i}return a.value=a.done?r:R,a},toString:()=>{const S=Math.min(Pn(I),oe),R=Fi(W=>I.next(S*W).value,S,30);return S+"ms "+R},toTransition:()=>{}};return I}ae.applyToOptions=t=>{const e=Go(t,100,ae);return t.ease=e.ease,t.duration=z(e.duration),t.type="keyframes",t};const Qo=5;function Oi(t,e,n){const s=Math.max(e-Qo,0);return pn(n-t(s),e-s)}function Ne({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*e;const g=h+p,y=r===void 0?g:r(g);y!==g&&(p=y-h);const v=b=>-p*Math.exp(-b/s),x=b=>y+v(b),w=b=>{const I=v(b),S=x(b);f.done=Math.abs(I)<=u,f.value=f.done?y:S};let A,E;const C=b=>{d(f.value)&&(A=b,E=ae({keyframes:[f.value,m(f.value)],velocity:Oi(x,b,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:b=>{let I=!1;return!E&&A===void 0&&(I=!0,w(b),C(b)),A!==void 0&&b>=A?E.next(b-A):(!I&&w(b),f)}}}function ta(t,e,n){const s=[],i=n||ot.mix||Ii,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||$:e;a=Ut(l,a)}s.push(a)}return s}function Sn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(dn(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ta(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=bt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(Z(t[0],t[o-1],c)):u}function ea(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bt(0,e,s);t.push(M(n,1,i))}}function ji(t){const e=[0];return ea(e,t.length-1),e}function na(t,e){return t.map(n=>n*e)}function sa(t,e){return t.map(()=>e||Ai).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=fo(s)?s.map($n):$n(s),o={done:!1,value:e[0]},r=na(n&&n.length===e.length?n:ji(e),t),a=Sn(r,e,{ease:Array.isArray(i)?i:sa(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const ia=t=>t!==null;function pe(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(ia),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const ra={decay:Ne,inertia:Ne,tween:Bt,keyframes:Bt,spring:ae};function Ni(t){typeof t.type=="string"&&(t.type=ra[t.type])}class bn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const oa=t=>t/100;class le extends bn{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=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ni(e);const{type:n=Bt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Bt;l!==Bt&&typeof a[0]!="number"&&(this.mixKeyframes=Ut(oa,Ii(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Pn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let I=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&I--,I=Math.min(I,h+1),I%2&&(f==="reverse"?(S=1-S,d&&(S-=d/a)):f==="mirror"&&(w=r)),x=Z(0,1,S)*a}let A;v?(this.delayState.value=c[0],A=this.delayState):A=w.next(x),o&&!v&&(A.value=o(A.value));let{done:E}=A;!v&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&m!==Ne&&(A.value=pe(c,this.options,g,this.speed)),p&&p(A.value),C&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(this.currentTime)}set time(e){e=z(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(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Oi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Ko,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(j.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(),this.driver=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)}}function aa(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const dt=t=>t*180/Math.PI,We=t=>{const e=dt(Math.atan2(t[1],t[0]));return Ue(e)},la={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:We,rotateZ:We,skewX:t=>dt(Math.atan(t[1])),skewY:t=>dt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ue=t=>(t=t%360,t<0&&(t+=360),t),Yn=We,qn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Zn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ca={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qn,scaleY:Zn,scale:t=>(qn(t)+Zn(t))/2,rotateX:t=>Ue(dt(Math.atan2(t[6],t[5]))),rotateY:t=>Ue(dt(Math.atan2(-t[2],t[0]))),rotateZ:Yn,rotate:Yn,skewX:t=>dt(Math.atan(t[4])),skewY:t=>dt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function ze(t,e){if(!t||t==="none")return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=ca,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=la,i=a}if(!i)return $e(e);const o=s[e],r=i[1].split(",").map(ha);return typeof o=="function"?o(r):r[o]}const ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ze(n,e)};function ha(t){return parseFloat(t.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Et=new Set([...Mt,"pathRotation"]),Jn=t=>t===Ct||t===T,fa=new Set(["x","y","z"]),da=Mt.filter(t=>!fa.has(t));function ma(t){const e=[];return da.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const rt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ze(e,"x"),y:(t,{transform:e})=>ze(e,"y")};rt.translateX=rt.x;rt.translateY=rt.y;const mt=new Set;let He=!1,Ke=!1,Ge=!1;function Wi(){if(Ke){const t=Array.from(mt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ma(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ke=!1,He=!1,mt.forEach(t=>t.complete(Ge)),mt.clear()}function Ui(){mt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ke=!0)})}function pa(){Ge=!0,Ui(),Wi(),Ge=!1}class An{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(mt.add(this),He||(He=!0,V.read(Ui),V.resolveKeyframes(Wi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}aa(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),mt.delete(this)}cancel(){this.state==="scheduled"&&(mt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ga=t=>t.startsWith("--");function $i(t,e,n){ga(e)?t.style.setProperty(e,n):t.style[e]=n}const ya={};function Vn(t,e){const n=gi(t);return()=>ya[e]??n()}const Cn=Vn(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),zi=Vn(()=>window.ViewTimeline!==void 0,"viewTimeline"),Hi=Vn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rt([0,.65,.55,1]),circOut:Rt([.55,0,1,.45]),backIn:Rt([.31,.01,.66,-.59]),backOut:Rt([.33,1.53,.69,.99])};function Ki(t,e){if(t)return typeof t=="function"?Hi()?Fi(t,e):"ease-out":Vi(t)?Rt(t):Array.isArray(t)?t.map(n=>Ki(n,e)||Qn.easeOut):Qn[t]}function va(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ki(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Gi(t){return typeof t=="function"&&"applyToOptions"in t}function xa({type:t,...e}){return Gi(t)&&Hi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class _i extends bn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,dn(typeof e.type!="string");const u=xa(e);this.animation=va(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=pe(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),$i(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}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;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=z(e),n&&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?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Cn()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),$):i(this)}}const Xi={anticipate:Pi,backInOut:wi,circInOut:bi};function Ta(t){return t in Xi}function wa(t){typeof t.ease=="string"&&Ta(t.ease)&&(t.ease=Xi[t.ease])}const be=10;class Pa extends _i{constructor(e){wa(e),Ni(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new le({...r,autoplay:!1}),l=Math.max(be,j.now()-this.startTime),u=Z(0,be,l-be),c=a.sample(l).value,{name:h}=this.options;o&&h&&$i(o,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const ts=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(q.test(t)||t==="0")&&!t.startsWith("url("));function Sa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ba(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=ts(i,e),a=ts(o,e);return!r||!a?!1:Sa(t)||(n==="spring"||Gi(n))&&s}function _e(t){t.duration=0,t.type="keyframes"}const Yi=new Set(["opacity","clipPath","filter","transform"]),Aa=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Va(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Aa.test(t[e]))return!0;return!1}const Ca=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ma=gi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ea(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=e.owner.getProps();return Ma()&&n&&(Yi.has(n)||Ca.has(n)&&Va(a))&&(n!=="transform"||!c)&&!u&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Da=40;class Ra extends bn{constructor({autoplay:e=!0,delay:n=0,type:s="
1keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||An;this.keyframeResolver=new d(a,(m,p,g)=>this.onKeyframesResolved(m,p,f,!g),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;ba(e,o,r,a)||(h=!1,(ot.instantAnimations||!l)&&c?.(pe(e,s,n)),e[0]=e[e.length-1],_e(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Da?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!u&&Ea(d),p=d.motionValue?.owner?.current;let g;if(m)try{g=new Pa({...d,element:p})}catch{g=new le(d)}else g=new le(d);g.finished.then(()=>{this.notifyFinished()}).catch($),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),pa()),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()}}function qi(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const es=30,La=t=>!isNaN(parseFloat(t)),It={current:void 0};class ka{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=La(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new mn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return It.current&&It.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>es)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,es);return pn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Y(t,e){return new ka(t,e)}function Zi(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Mn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Zi(n,t):n}const Ba={type:"spring",stiffness:500,damping:25,restSpeed:10},Ia=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Fa={type:"keyframes",duration:.8},Oa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ja=(t,{keyframes:e})=>e.length>2?Fa:Et.has(t)?t.startsWith("scale")?Ia(e[1]):Ba:Oa,Na=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Wa(t){for(const e in t)if(!Na.has(e))return!0;return!1}const En=(t,e,n,s={},i,o)=>r=>{const a=Mn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-z(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Wa(a)||Object.assign(c,ja(t,c)),c.duration&&(c.duration=z(c.duration)),c.repeatDelay&&(c.repeatDelay=z(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(_e(c),c.delay===0&&(h=!0)),(ot.instantAnimations||ot.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,_e(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=pe(c.keyframes,a);if(f!==void 0){V.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new le(c):new Ra(c)},Ua=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $a(t){const e=Ua.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ji(t,e,n=1){const[s,i]=$a(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return di(r)?parseFloat(r):r}return vn(i)?Ji(i,e,n+1):i}function ns(t){const e=[{},{}];
vendor: 81,587 bytes, line 1
1return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Dn(t,e,n,s){if(typeof e=="function"){const[i,o]=ns(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=ns(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function pt(t,e,n){const s=t.getProps();return Dn(s,e,n!==void 0?n:s.custom,t)}const Qi=new Set(["width","height","top","left","right","bottom",...Mt]),Xe=t=>Array.isArray(t);function za(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Y(n))}function Ha(t){return Xe(t)?t[t.length-1]||0:t}function Ka(t,e){const n=pt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Ha(o[r]);za(t,r,a)}}const O=t=>!!(t&&t.getVelocity);function Ga(t){return!!(O(t)&&t.add)}function Ye(t,e){const n=t.getValue("willChange");if(Ga(n))return n.add(e);if(!n&&ot.WillChange){const s=new ot.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Rn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const _a="framerAppearId",tr="data-"+Rn(_a);function er(t){return t.props[tr]}function Xa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function nr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Zi(o,l):l;const u=o?.reduceMotion,c=o?.skipAnimations;s&&(o=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=o?.path;d&&d.animateVisualElement(t,a,o,n,h);for(const m in a){const p=t.getValue(m,t.latestValues[m]??null),g=a[m];if(g===void 0||f&&Xa(f,m))continue;const y={delay:n,...Mn(o||{},m)};c&&(y.skipAnimations=!0);const v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===v&&!y.velocity){V.update(()=>p.set(g));continue}let x=!1;if(window.MotionHandoffAnimation){const E=er(t);if(E){const C=window.MotionHandoffAnimation(E,m,V);C!==null&&(y.startTime=C,x=!0)}}Ye(t,m);const w=u??t.shouldReduceMotion;p.start(En(m,p,g,w&&Qi.has(m)?{type:!1}:y,t,x));const A=p.animation;A&&h.push(A)}if(r){const m=()=>V.update(()=>{r&&Ka(t,r)});h.length?Promise.all(h).then(m):m()}return h}function qe(t,e,n={}){const s=pt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(nr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Ya(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Ya(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(qe(l,e,{...r,delay:n+(typeof s=="function"?0:s)+qi(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function qa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>qe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=qe(t,e,n);else{const i=typeof e=="function"?pt(t,e,n.custom):e;s=Promise.all(nr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Za={test:t=>t==="auto",parse:t=>t},sr=t=>e=>e.test(t),ir=[Ct,T,nt,it,Vo,Ao,Za],ss=t=>ir.find(sr(t));function Ja(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||pi(t):!0}const Qa=new Set(["brightness","contrast","saturate","opacity"]);function tl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(xn)||[];if(!s)return t;const i=n.replace(s,"");let o=Qa.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const el=/\b([a-z-]*)\(.*?\)/gu,Ze={...q,getAnimatableNone:t=>{const e=t.match(el);return e?e.map(tl).join(" "):t}},Je={...q,getAnimatableNone:t=>{const e=q.parse(t);return q.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},is={...Ct,transform:Math.round},nl={rotate:it,pathRotation:it,rotateX:it,rotateY:it,rotateZ:it,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:it,skewX:it,skewY:it,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:jt,originX:Hn,originY:Hn,originZ:T},ce={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...nl,zIndex:is,fillOpacity:jt,strokeOpacity:jt,numOctaves:is},sl={...ce,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:Ze,WebkitFilter:Ze,mask:Je,WebkitMask:Je},rr=t=>sl[t],il=new Set([Ze,Je]);function or(t,e){let n=rr(t);return il.has(n)||(n=q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const rl=new Set(["auto","none","0"]);function ol(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!rl.has(o)&&At(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=or(n,i)}class al extends An{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),vn(h))){const f=Ji(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Qi.has(s)||e.length!==2)return;const[i,o]=e,r=ss(i),a=ss(o),l=zn(i),u=zn(o);if(l!==u&&rt[s]){this.needsMeasurement=!0;return}if(r!==a)if(Jn(r)&&Jn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else rt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ja(e[i]))&&s.push(i);s.length&&ol(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=rt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function ar(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Qe=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function lr(t){return mi(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Vt,cancel:cr}=Ci(queueMicrotask,!1),X={x:!1,y:!1};function ur(){return X.x||X.y}function ll(t){return t==="x"||t==="y"?X[t]?null:(X[t]=!0,()=>{X[t]=!1}):X.x||X.y?null:(X.x=X.y=!0,()=>{X.x=X.y=!1})}function hr(t,e){const n=ar(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function cl(t){return!(t.pointerType==="touch"||ur())}function ul(t,e,n={}){const[s,i,o]=hr(t,n);return s.forEach(r=>{let a=!1,l=!1,u;const c=()=>{r.removeEventListener("pointerleave",m)},h=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},p=g=>{if(!cl(g))return;l=!1;const y=e(r,g);typeof y=="function"&&(u=y,r.addEventListener("pointerleave",m,i))};r.addEventListener("pointerenter",p,i),r.addEventListener("pointerdown",d,i)}),o}const fr=(t,e)=>e?t===e?!0:fr(t,e.parentElement):!1,Ln=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,hl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fl(t){return hl.has(t.tagName)||t.isContentEditable===!0}const dl=new Set(["INPUT","SELECT","TEXTAREA"]);function ml(t){return dl.has(t.tagName)||t.isContentEditable===!0}const Zt=new WeakSet;function rs(t){return e=>{e.key==="Enter"&&t(e)}}function Ae(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const pl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=rs(()=>{if(Zt.has(n))return;Ae(n,"down");const i=rs(()=>{Ae(n,"up")}),o=()=>Ae(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function os(t){return Ln(t)&&!ur()}const as=new WeakSet;function gl(t,e,n={}){const[s,i,o]=hr(t,n),r=a=>{const l=a.currentTarget;if(!os(a)||as.has(a))return;Zt.add(l),n.stopPropagation&&as.add(a);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Zt.has(l)&&Zt.delete(l),os(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||fr(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),lr(a)&&(a.addEventListener("focus",u=>pl(u,i)),!fl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function kn(t){return mi(t)&&"ownerSVGElement"in t}const Jt=new WeakMap;let Qt;const dr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:kn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],yl=dr("inline","width","offsetWidth"),vl=dr("block","height","offsetHeight");function xl({target:t,borderBoxSize:e}){Jt.get(t)?.forEach(n=>{n(t,{get width(){return yl(t,e)},get height(){return vl(t,e)}})})}function Tl(t){t.forEach(xl)}function wl(){typeof ResizeObserver>"u"||(Qt=new ResizeObserver(Tl))}function Pl(t,e){Qt||wl();const n=ar(t);return n.forEach(s=>{let i=Jt.get(s);i||(i=new Set,Jt.set(s,i)),i.add(e),Qt?.observe(s)}),()=>{n.forEach(s=>{const i=Jt.get(s);i?.delete(e),i?.size||Qt?.unobserve(s)})}}const te=new Set;let Tt;function Sl(){Tt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};te.forEach(e=>e(t))},window.addEventListener("resize",Tt)}function bl(t){return te.add(t),Tt||Sl(),()=>{te.delete(t),!te.size&&typeof Tt=="function"&&(window.removeEventListener("resize",Tt),Tt=void 0)}}function tn(t,e){return typeof t=="function"?bl(t):Pl(t,e)}function mr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return V.preUpdate(s,!0),()=>G(s)}function Al(t){return kn(t)&&t.tagName==="svg"}function Vl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=Sn(i,o,r);return e?a(s):a}const Cl=[...ir,L,q],Ml=t=>Cl.find(sr(t)),ls=()=>({translate:0,scale:1,origin:0,originPoint:0}),wt=()=>({x:ls(),y:ls()}),cs=()=>({min:0,max:0}),k=()=>({x:cs(),y:cs()}),El=new WeakMap;function ge(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Nt(t){return typeof t=="string"||Array.isArray(t)}const Bn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],In=["initial",...Bn];function ye(t){return ge(t.animate)||In.some(e=>Nt(t[e]))}function pr(t){return!!(ye(t)||t.variants)}function Dl(t,e,n){for(const s in e){const i=e[s],o=n[s];if(O(i))t.addValue(s,i);else if(O(o))t.addValue(s,Y(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Y(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const en={current:null},gr={current:!1},Rl=typeof window<"u";function Ll(){if(gr.current=!0,!!Rl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>en.current=t.matches;t.addEventListener("change",e),e()}else en.current=!1}const us=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ue={};function yr(t){ue=t}function kl(){return ue}class Bl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=j.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=ye(n),this.isVariantNode=pr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&O(m)&&m.set(u[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,El.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gr.current||Ll(),this.shouldReduceMotion=en.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(),G(this.notifyUpdate),G(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Yi.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new _i({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:z(c)}),f=r(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Et.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ue){const n=ue[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<us.length;s++){const i=us[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Dl(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Y(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(di(s)||pi(s))?s=parseFloat(s):!Ml(s)&&q.test(n)&&(s=or(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Dn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new mn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Vt.render(this.render)}}class vr extends Bl{constructor(){super(...arguments),this.KeyframeResolver=al}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function xr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Il({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Fl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ve(t){return t===void 0||t===1}function nn({scale:t,scaleX:e,scaleY:n}){return!Ve(t)||!Ve(e)||!Ve(n)}function ht(t){return nn(t)||Tr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tr(t){return hs(t.x)||hs(t.y)}function hs(t){return t&&t!=="0%"}function he(t,e,n){const s=t-n,i=e*s;return n+i}function fs(t,e,n,s,i){return i!==void 0&&(t=he(t,i,s)),he(t,n,s)+e}function sn(t,e=0,n=1,s,i){t.min=fs(t.min,e,n,s,i),t.max=fs(t.max,e,n,s,i)}function wr(t,{x:e,y:n}){sn(t.x,e.translate,e.scale,e.originPoint),sn(t.y,n.translate,n.scale,n.originPoint)}const ds=.999999999999,ms=1.0000000000001;function Ol(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(et(t.x,-o.scroll.offset.x),et(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,wr(t,r)),s&&ht(o.latestValues)&&ee(t,o.latestValues,o.layout?.layoutBox))}e.x<ms&&e.x>ds&&(e.x=1),e.y<ms&&e.y>ds&&(e.y=1)}function et(t,e){t.min+=e,t.max+=e}function ps(t,e,n,s,i=.5){const o=M(t.min,t.max,i);sn(t,e,n,o,s)}function gs(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ee(t,e,n){const s=n??t;ps(t.x,gs(e.x,s.x),e.scaleX,e.scale,e.originX),ps(t.y,gs(e.y,s.y),e.scaleY,e.scale,e.originY)}function Pr(t,e){return xr(Fl(t.getBoundingClientRect(),e))}function jl(t,e,n){const s=Pr(t,n),{scroll:i}=e;return i&&(et(s.x,i.offset.x),et(s.y,i.offset.y)),s}const Nl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wl=Mt.length;function Ul(t,e,n){let s="",i=!0;for(let r=0;r<Wl;r++){const a=Mt[r],l=t[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=Qe(l,ce[a]);if(!u){i=!1;const h=Nl[a]||a;s+=`${h}(${c}) `}n&&(e[a]=c)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${Qe(o,ce.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Fn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Et.has(l)){r=!0;continue}else if(Ei(l)){i[l]=u;continue}else{const c=Qe(u,ce[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Ul(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}function Sr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function ys(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Dt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ys(t,e.target.x),s=ys(t,e.target.y);return`${n}% ${s}%`}},$l={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=q.parse(t);if(i.length>5)return s;const o=q.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=M(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},rn={borderRadius:{...Dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomLeftRadius:Dt,borderBottomRightRadius:Dt,boxShadow:$l};function br(t,{layout:e,layoutId:n}){return Et.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!rn[t]||t==="opacity")}function On(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(O(s[r])||i&&O(i[r])||br(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function zl(t){return window.getComputedStyle(t)}class Hl extends vr{constructor(){super(...arguments),this.type="html",this.renderInstance=Sr}readValueFromInstance(e,n){if(Et.has(n))return this.projection?.isProjecting?$e(n):ua(e,n);{const s=zl(e),i=(Ei(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Pr(e,n)}build(e,n,s){Fn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return On(e,n,s)}}const Kl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gl={offset:"strokeDashoffset",array:"strokeDasharray"};function _l(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Kl:Gl;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const Xl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ar(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Fn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const d of Xl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&_l(h,i,o,r,!1)}const Vr=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"]),Cr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Yl(t,e,n,s){Sr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Vr.has(i)?i:Rn(i),e.attrs[i])}function Mr(t,e,n){const s=On(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const o=Mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class ql extends vr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Et.has(n)){const s=rr(n);return s&&s.default||0}return n=Vr.has(n)?n:Rn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Mr(e,n,s)}build(e,n,s){Ar(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Yl(e,n,s,i)}mount(e){this.isSVGTag=Cr(e.tagName),super.mount(e)}}const Zl=In.length;function Er(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Er(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Zl;n++){const s=In[n],i=t.props[s];(Nt(i)||i===!1)&&(e[s]=i)}return e}function Dr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Jl=[...Bn].reverse(),Ql=Bn.length;function tc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>qa(t,n,s)))}function ec(t){let e=tc(t),n=vs(),s=!0,i=!1;const o=u=>(c,h)=>{const f=pt(t,h,u==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;c={...c,...p,...m}}return c};function r(u){e=u(t)}function a(u){const{props:c}=t,h=Er(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let y=0;y<Ql;y++){const v=Jl[y],x=n[v],w=c[v]!==void 0?c[v]:h[v],A=Nt(w),E=v===u?x.isActive:null;E===!1&&(p=y);let C=w===h[v]&&w!==c[v]&&A;if(C&&(s||i)&&t.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...m},!x.isActive&&E===null||!w&&!x.prevProp||ge(w)||typeof w=="boolean")continue;if(v==="exit"&&x.isActive&&E!==!0){x.prevResolvedValues&&(m={...m,...x.prevResolvedValues});continue}const b=nc(x.prevProp,w);let I=b||v===u&&x.isActive&&!C&&A||y>p&&A,S=!1;const R=Array.isArray(w)?w:[w];let W=R.reduce(o(v),{});E===!1&&(W={});const{prevResolvedValues:lt={}}=x,J={...lt,...W},st=F=>{I=!0,d.has(F)&&(S=!0,d.delete(F)),x.needsAnimating[F]=!0;const H=t.getValue(F);H&&(H.liveStyle=!1)};for(const F in J){const H=W[F],ct=lt[F];if(m.hasOwnProperty(F))continue;let gt=!1;Xe(H)&&Xe(ct)?gt=!Dr(H,ct)||b:gt=H!==ct,gt?H!=null?st(F):d.add(F):H!==void 0&&d.has(F)?st(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=W,x.isActive&&(m={...m,...W}),(s||i)&&t.blockInitialAnimation&&(I=!1);const Q=C&&b;I&&(!Q||S)&&f.push(...R.map(F=>{const H={type:v};if(typeof F=="string"&&(s||i)&&!Q&&t.manuallyAnimateOnMount&&t.parent){const{parent:ct}=t,gt=pt(ct,F);if(ct.enteringChildren&>){const{delayChildren:ro}=gt.transition||{};H.delay=qi(ct.enteringChildren,t,ro)}}return{animation:F,options:H}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const v=pt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function l(u,c){if(n[u].isActive===c)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(u,c)),n[u].isActive=c;const h=a(u);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:r,getState:()=>n,reset:()=>{n=vs(),i=!0}}}function nc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Dr(e,t):!1}function ut(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vs(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}function on(t,e){t.min=e.min,t.max=e.max}function _(t,e){on(t.x,e.x),on(t.y,e.y)}function xs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Rr=1e-4,sc=1-Rr,ic=1+Rr,Lr=.01,rc=0-Lr,oc=0+Lr;function N(t){return t.max-t.min}function ac(t,e,n){return Math.abs(t-e)<=n}function Ts(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=sc&&t.scale<=ic||isNaN(t.scale))&&(t.scale=1),(t.translate>=rc&&t.translate<=oc||isNaN(t.translate))&&(t.translate=0)}function Ft(t,e,n,s){Ts(t.x,e.x,n.x,s?s.originX:void 0),Ts(t.y,e.y,n.y,s?s.originY:void 0)}function ws(t,e,n,s=0){const i=s?M(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function lc(t,e,n,s){ws(t.x,e.x,n.x,s?.x),ws(t.y,e.y,n.y,s?.y)}function Ps(t,e,n,s=0){const i=s?M(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function fe(t,e,n,s){Ps(t.x,e.x,n.x,s?.x),Ps(t.y,e.y,n.y,s?.y)}function Ss(t,e,n,s,i){return t-=e,t=he(t,1/n,s),i!==void 0&&(t=he(t,1/i,s)),t}function cc(t,e=0,n=1,s=.5,i,o=t,r=t){if(nt.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=M(o.min,o.max,s);t===o&&(a-=e),t.min=Ss(t.min,e,n,a,i),t.max=Ss(t.max,e,n,a,i)}function bs(t,e,[n,s,i],o,r){cc(t,e[n],e[s],e[i],e.scale,o,r)}const uc=["x","scaleX","originX"],hc=["y","scaleY","originY"];function As(t,e,n,s){bs(t.x,e,uc,n?n.x:void 0,s?s.x:void 0),bs(t.y,e,hc,n?n.y:void 0,s?s.y:void 0)}function Vs(t){return t.translate===0&&t.scale===1}function kr(t){return Vs(t.x)&&Vs(t.y)}function Cs(t,e){return t.min===e.min&&t.max===e.max}function fc(t,e){return Cs(t.x,e.x)&&Cs(t.y,e.y)}function Ms(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Br(t,e){return Ms(t.x,e.x)&&Ms(t.y,e.y)}function Es(t){return N(t.x)/N(t.y)}function Ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function tt(t){return[t("x"),t("y")]}function dc(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:h,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ir=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],mc=Ir.length,Rs=t=>typeof t=="string"?parseFloat(t):t,Ls=t=>typeof t=="number"||T.test(t);function pc(t,e,n,s,i,o){i?(t.opacity=M(0,n.opacity??1,gc(s)),t.opacityExit=M(e.opacity??1,0,yc(s))):o&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let r=0;r<mc;r++){const a=Ir[r];let l=ks(e,a),u=ks(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ls(l)===Ls(u)?(t[a]=Math.max(M(Rs(l),Rs(u),s),0),(nt.test(u)||nt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function ks(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const gc=Fr(0,.5,Si),yc=Fr(.5,.95,$);function Fr(t,e,n){return s=>s<t?0:s>e?1:n(bt(t,e,s))}function vc(t,e,n){const s=O(t)?t:Y(t);return s.start(En("",s,e,n)),s.animation}function Wt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const xc=(t,e)=>t.depth-e.depth;class Tc{constructor(){this.children=[],this.isDirty=!1}add(e){fn(this.children,e),this.isDirty=!0}remove(e){ie(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(xc),this.isDirty=!1,this.children.forEach(e)}}function wc(t,e){const n=j.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(G(s),t(o-e))};return V.setup(s,!0),()=>G(s)}function ne(t){return O(t)?t.get():t}class Pc{constructor(){this.members=[]}add(e){fn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ie(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(ie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.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)}}const se={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ce=["","X","Y","Z"],Sc=1e3;let bc=0;function Me(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Or(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=er(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Or(s)}function jr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=bc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Cc),this.nodes.forEach(kc),this.nodes.forEach(Bc),this.nodes.forEach(Mc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new mn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=kn(r)&&!Al(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=wc(f,250),se.hasAnimatedSinceResize&&(se.hasAnimatedSinceResize=!1,this.nodes.forEach(Fs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Nc,{onLayoutAnimationStart:p,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!Br(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Mn(m,"layout"),onPlay:p,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,v,x.path)}else h||Fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),G(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ic),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Or(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(Dc),this.nodes.forEach(Bs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Is);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rc),this.nodes.forEach(Lc),this.nodes.forEach(Ac),this.nodes.forEach(Vc)):this.nodes.forEach(Is),this.clearAllSnapshots();const a=j.now();B.delta=Z(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,xe.update.process(B),xe.preRender.process(B),xe.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ec),this.sharedNodes.forEach(Fc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!kr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||ht(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Wc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return k();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Uc))){const{scroll:u}=this.root;u&&(et(a.x,u.offset.x),et(a.y,u.offset.y))}return a}removeElementScroll(r){const a=k();if(_(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&_(a,r),et(a.x,c.offset.x),et(a.y,c.offset.y))}return a}applyTransform(r,a=!1,l){const u=l||k();_(u,r);for(let c=0;c<this.path.length;c++){const h=this.path[c];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(et(u.x,-h.scroll.offset.x),et(u.y,-h.scroll.offset.y)),ht(h.latestValues)&&ee(u,h.latestValues,h.layout?.layoutBox)}return ht(this.latestValues)&&ee(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(r){const a=k();_(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!ht(u.latestValues))continue;let c;u.instance&&(nn(u.latestValues)&&u.updateSnapshot(),c=k(),_(c,u.measurePageBox())),As(a,u.latestValues,u.snapshot?.layoutBox,c)}return ht(this.latestValues)&&As(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=B.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):_(this.target,this.layout.layoutBox),wr(this.target,this.targetDelta)):_(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||nn(this.parent.latestValues)||Tr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),fe(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),_(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===B.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;_(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Ol(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=k());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xs(this.prevProjectionDelta.x,this.projectionDelta.x),xs(this.prevProjectionDelta.y,this.projectionDelta.y)),Ft(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wt(),this.projectionDelta=wt(),this.projectionDeltaWithTransform=wt()}setAnimationOrigin(r,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},h={...this.latestValues},f=wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=k(),m=u?u.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,y=this.getStack(),v=!y||y.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(jc));this.animationProgress=0;let w;const A=l?.interpolateProjection(r);this.mixTargetDelta=E=>{const C=E/1e3,b=A?.(C);b?(f.x.translate=b.x,f.x.scale=M(r.x.scale,1,C),f.x.origin=r.x.origin,f.x.originPoint=r.x.originPoint,f.y.translate=b.y,f.y.scale=M(r.y.scale,1,C),f.y.origin=r.y.origin,f.y.originPoint=r.y.originPoint):(Os(f.x,r.x,C),Os(f.y,r.y,C)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fe(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Oc(this.relativeTarget,this.relativeTargetOrigin,d,C),w&&fc(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),_(w,this.relativeTarget)),g&&(this.animationValues=h,pc(h,c,this.latestValues,C,x,v)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(G(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{se.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Y(0)),this.motionValue.jump(0,!1),this.currentAnimation=vc(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Nr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||k();const h=N(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}_(a,l),ee(a,c),Ft(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Pc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Me("z",r,u,this.animationValues);for(let c=0;c<Ce.length;c++)Me(`rotate${Ce[c]}`,r,u,this.animationValues),Me(`skew${Ce[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ne(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ne(a?.pointerEvents)||""),this.hasProjected&&!ht(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=dc(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in rn){if(c[m]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:y}=rn[m],v=h==="none"?c[m]:p(c[m],u);if(g){const x=g.length;for(let w=0;w<x;w++)r[g[w]]=v}else y?this.options.visualElement.renderState.vars[m]=v:r[m]=v}this.options.layoutId&&(r.pointerEvents=u===this?ne(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Bs),this.root.sharedNodes.clear()}}}function Ac(t){t.updateLayout()}function Vc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")tt(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=N(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";on(o?e.measuredBox[c]:e.layoutBox[c],n[c])}else Nr(i,e.layoutBox,n)&&tt(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=N(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const r=wt();Ft(r,n,e.layoutBox);const a=wt();o?Ft(a,t.applyTransform(s,!0),e.measuredBox):Ft(a,n,e.layoutBox);const l=!kr(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=t.options.layoutAnchor||void 0,m=k();fe(m,e.layoutBox,h.layoutBox,d);const p=k();fe(p,n,f.layoutBox,d),Br(m,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Cc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Mc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ec(t){t.clearSnapshot()}function Bs(t){t.clearMeasurements()}function Dc(t){t.isLayoutDirty=!0,t.updateLayout()}function Is(t){t.isLayoutDirty=!1}function Rc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Lc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function kc(t){t.resolveTargetDelta()}function Bc(t){t.calcProjection()}function Ic(t){t.resetSkewAndRotation()}function Fc(t){t.removeLeadSnapshot()}function Os(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function js(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function Oc(t,e,n,s){js(t.x,e.x,n.x,s),js(t.y,e.y,n.y,s)}function jc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Nc={duration:.45,ease:[.4,0,.1,1]},Ns=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ws=Ns("applewebkit/")&&!Ns("chrome/")?Math.round:$;function Us(t){t.min=Ws(t.min),t.max=Ws(t.max)}function Wc(t){Us(t.x),Us(t.y)}function Nr(t,e,n){return t==="position"||t==="preserve-aspect"&&!ac(Es(e),Es(n),.2)}function Uc(t){return t!==t.root&&t.scroll?.wasRoot}const $c=jr({attachResizeListener:(t,e)=>Wt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ee={current:void 0},Wr=jr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ee.current){const t=new $c({});t.mount(window),t.setOptions({layoutScroll:!0}),Ee.current=t}return Ee.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),jn=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function zc(t=!0){const e=P.useContext(hn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=P.useId();P.useEffect(()=>{if(t)return i(o)},[t]);const r=P.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Ur=P.createContext({strict:!1}),$s={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"]};let zs=!1;function Hc(){if(zs)return;const t={};for(const e in $s)t[e]={isEnabled:n=>$s[e].some(s=>!!n[s])};yr(t),zs=!0}function $r(){return Hc(),kl()}function Kc(t){const e=$r();for(const n in t)e[n]={...e[n],...t[n]};yr(e)}const Gc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function de(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Gc.has(t)}let zr=t=>!de(t);function _c(t){typeof t=="function"&&(zr=e=>e.startsWith("on")?!de(e):t(e))}try{_c(require("@emotion/is-prop-valid").default)}catch{}function Xc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(zr(i)||n===!0&&de(i)||!e&&!de(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ve=P.createContext({});function Yc(t,e){if(ye(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Nt(n)?n:void 0,animate:Nt(s)?s:void 0}}return t.inherit!==!1?e:{}}function qc(t){const{initial:e,animate:n}=Yc(t,P.useContext(ve));return P.useMemo(()=>({initial:e,animate:n}),[Hs(e),Hs(n)])}function Hs(t){return Array.isArray(t)?t.join(" "):t}const Nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hr(t,e,n){for(const s in e)!O(e[s])&&!br(s,n)&&(t[s]=e[s])}function Zc({transformTemplate:t},e){return P.useMemo(()=>{const n=Nn();return Fn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Jc(t,e){const n=t.style||{},s={};return Hr(s,n,t),Object.assign(s,Zc(t,e)),s}function Qc(t,e){const n={},s=Jc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Kr=()=>({...Nn(),attrs:{}});function tu(t,e,n,s){const i=P.useMemo(()=>{const o=Kr();return Ar(o,e,Cr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Hr(o,t.style,t),i.style={...o,...i.style}}return i}const eu=["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"];function Wn(t){return typeof t!="string"||t.includes("-")?!1:!!(eu.indexOf(t)>-1||/[A-Z]/u.test(t))}function nu(t,e,n,{latestValues:s},i,o=!1,r){const l=(r??Wn(t)?tu:Qc)(e,s,i,t),u=Xc(e,typeof t=="string",o),c=t!==P.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...c,children:f})}function su({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:iu(n,s,i,t),renderState:e()}}function iu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=ne(o[f]);let{initial:r,animate:a}=t;const l=ye(t),u=pr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!ge(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Dn(t,f[d]);if(m){const{transitionEnd:p,transition:g,...y}=m;for(const v in y){let x=y[v];if(Array.isArray(x)){const w=c?x.length-1:0;x=x[w]}x!==null&&(i[v]=x)}for(const v in p)i[v]=p[v]}}}return i}const Gr=t=>(e,n)=>{const s=P.useContext(ve),i=P.useContext(hn),o=()=>su(t,e,s,i);return n?o():St(o)},ru=Gr({scrapeMotionValuesFromProps:On,createRenderState:Nn}),ou=Gr({scrapeMotionValuesFromProps:Mr,createRenderState:Kr}),au=Symbol.for("motionComponentSymbol");function lu(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const a=r(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const _r=P.createContext({});function vt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cu(t,e,n,s,i,o){const{visualElement:r}=P.useContext(ve),a=P.useContext(Ur),l=P.useContext(hn),u=P.useContext(jn),c=u.reducedMotion,h=u.skipAnimations,f=P.useRef(null),d=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:r,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:o}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=P.useContext(_r);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&uu(f.current,n,i,p);const g=P.useRef(!1);P.useInsertionEffect(()=>{m&&g.current&&m.update(n,l)});const y=n[tr],v=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return un(()=>{d.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),P.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),m.enteringChildren=void 0)}),m}function uu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Xr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&vt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Xr(t){if(t)return t.options.allowProjection!==!1?t.projection:Xr(t.parent)}function De(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Kc(s);const o=n?n==="svg":Wn(t),r=o?ou:ru;function a(u,c){let h;const f={...P.useContext(jn),...u,layoutId:hu(u)},{isStatic:d}=f,m=qc(u),p=r(u,d);if(!d&&typeof window<"u"){fu();const g=du(f);h=g.MeasureLayout,m.visualElement=cu(t,p,f,i,g.ProjectionNode,o)}return U.jsxs(ve.Provider,{value:m,children:[h&&m.visualElement?U.jsx(h,{visualElement:m.visualElement,...f}):null,nu(t,u,lu(p,m.visualElement,c),p,d,e,o)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=P.forwardRef(a);return l[au]=t,l}function hu({layoutId:t}){const e=P.useContext(fi).id;return e&&t!==void 0?e+"-"+t:t}function fu(t,e){P.useContext(Ur).strict}function du(t){const e=$r(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function mu(t,e){if(typeof Proxy>"u")return De;const n=new Map,s=(o,r)=>De(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,De(r,void 0,t,e)),n.get(r))})}const pu=(t,e)=>e.isSVG??Wn(t)?new ql(e):new Hl(e,{allowProjection:t!==P.Fragment});class gu extends at{constructor(e){super(e),e.animationState||(e.animationState=ec(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ge(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let yu=0;class vu extends at{constructor(){super(...arguments),this.id=yu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const a=pt(this.node,o,r);if(a){const{transition:l,transitionEnd:u,...c}=a;for(const h in c)this.node.getValue(h)?.jump(c[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const xu={animation:{Feature:gu},exit:{Feature:vu}};function Ht(t){return{point:{x:t.pageX,y:t.pageY}}}const Tu=t=>e=>Ln(e)&&t(e,Ht(e));function Ot(t,e,n,s){return Wt(t,e,Tu(n),s)}const Yr=({current:t})=>t?t.ownerDocument.defaultView:null,Ks=(t,e)=>Math.abs(t-e);function wu(t,e){const n=Ks(t.x,e.x),s=Ks(t.y,e.y);return Math.sqrt(n**2+s**2)}const Gs=new Set(["auto","scroll"]);class qr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=_t(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Re(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=wu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:g}=d,{timestamp:y}=B;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=_t(m,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Re(d.type==="pointercancel"?this.lastMoveEventInfo:_t(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,v),g&&g(d,v)},!Ln(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const l=Ht(e),u=_t(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=B;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Re(u,this.history)),this.removeListeners=Ut(Ot(this.contextWindow,"pointermove",this.handlePointerMove),Ot(this.contextWindow,"pointerup",this.handlePointerUp),Ot(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Gs.has(s.overflowX)||Gs.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),G(this.updatePoint)}}function _t(t,e){return e?{point:e(t.point)}:t}function _s(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Re({point:t},e){return{point:t,delta:_s(t,Zr(e)),offset:_s(t,Pu(e)),velocity:Su(e,.1)}}function Pu(t){return t[0]}function Zr(t){return t[t.length-1]}function Su(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Zr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>z(e)*2&&(s=t[1]);const o=K(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function bu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Xs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Au(t,{top:e,left:n,bottom:s,right:i}){return{x:Xs(t.x,n,i),y:Xs(t.y,e,s)}}function Ys(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Vu(t,e){return{x:Ys(t.x,e.x),y:Ys(t.y,e.y)}}function Cu(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=bt(e.min,e.max-s,t.min):s>i&&(n=bt(t.min,t.max-i,e.min)),Z(0,1,n)}function Mu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const an=.35;function Eu(t=an){return t===!1?t=0:t===!0&&(t=an),{x:qs(t,"left","right"),y:qs(t,"top","bottom")}}function qs(t,e,n){return{min:Zs(t,e),max:Zs(t,n)}}function Zs(t,e){return typeof t=="number"?t:t[e]||0}const Du=new WeakMap;class Ru{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=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(Ht(h).point),this.stopAnimation()},r=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ll(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(nt.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[y];w&&(v=N(w)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&V.update(()=>p(h,f),!1,!0),Ye(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=ku(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&V.update(()=>g(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new qr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Yr(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&V.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Xt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=bu(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&vt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Au(s.layoutBox,e):this.constraints=!1,this.elastic=Eu(n),i!==this.constraints&&!vt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Mu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=jl(s,i.root,this.visualElement.getTransformPagePoint());let r=Vu(i.layout.layoutBox,o);if(n){const a=n(Il(r));this.hasMutatedConstraints=!!a,a&&(r=xr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tt(c=>{if(!Xt(c,n,this.currentDirection))return;let h=l&&l[c]||{};(r===!0||r===c)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ye(this.visualElement,e),s.start(En(e,s,0,n,this.visualElement,!1))}stopAnimation(){tt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){tt(n=>{const{drag:s}=this.getProps();if(!Xt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n],l=o.get()||0;o.set(e[n]-M(r,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!vt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Cu({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),tt(r=>{if(!Xt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(M(l,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Du.set(this.visualElement,this);const e=this.visualElement.current,n=Ot(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&ml(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();vt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Lu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),V.read(i);const a=Wt(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(tt(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),r(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=an,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Lu(t,e,n){const s=tn(t,Js(n)),i=tn(e,Js(n));return()=>{s(),i()}}function Xt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ku(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Bu extends at{constructor(e){super(e),this.removeGroupControls=$,this.removeListeners=$,this.controls=new Ru(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Le=t=>
1(e,n)=>{t&&V.update(()=>t(e,n),!1,!0)};class Iu extends at{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(e){this.session=new qr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Le(e),onStart:Le(n),onMove:Le(s),onEnd:(o,r)=>{delete this.session,i&&V.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ot(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ke=!1;class Fu extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),ke&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),se.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),ke=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Vt.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;ke=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Jr(t){const[e,n]=zc(),s=P.useContext(fi);return U.jsx(Fu,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(_r),isPresent:e,safeToRemove:n})}const Ou={pan:{Feature:Iu},drag:{Feature:Bu,ProjectionNode:Wr,MeasureLayout:Jr}};function Qs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&V.postRender(()=>o(e,Ht(e)))}class ju extends at{mount(){const{current:e}=this.node;e&&(this.unmount=ul(e,(n,s)=>(Qs(this.node,s,"Start"),i=>Qs(this.node,i,"End"))))}unmount(){}}class Nu extends at{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=Ut(Wt(this.node.current,"focus",()=>this.onFocus()),Wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ti(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&V.postRender(()=>o(e,Ht(e)))}class Wu extends at{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=gl(e,(i,o)=>(ti(this.node,o,"Start"),(r,{success:a})=>ti(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const ln=new WeakMap,Be=new WeakMap,Uu=t=>{const e=ln.get(t.target);e&&e(t)},$u=t=>{t.forEach(Uu)};function zu({root:t,...e}){const n=t||document;Be.has(n)||Be.set(n,{});const s=Be.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver($u,{root:t,...e})),s[i]}function Hu(t,e,n){const s=zu(e);return ln.set(t,n),s.observe(t),()=>{ln.delete(t),s.unobserve(t)}}const Ku={some:0,all:1};class Gu extends at{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Ku[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};this.stopObserver=Hu(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(_u(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function _u({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Xu={inView:{Feature:Gu},tap:{Feature:Wu},focus:{Feature:Nu},hover:{Feature:ju}},Yu={layout:{ProjectionNode:Wr,MeasureLayout:Jr}},qu={...xu,...Xu,...Ou,...Yu},Qr=mu(qu,pu);function me(t){return typeof window>"u"?!1:t?zi():Cn()}const Zu=50,ei=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Ju=()=>({time:0,x:ei(),y:ei()}),Qu={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ni(t,e,n,s){const i=n[e],{length:o,position:r}=Qu[e],a=i.current,l=n.time;i.current=Math.abs(t[`scroll${r}`]),i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=bt(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>Zu?0:pn(i.current-a,u)}function th(t,e,n){ni(t,"x",e,n),ni(t,"y",e,n),e.time=n}function eh(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(lr(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const cn={start:0,center:.5,end:1};function si(t,e,n=0){let s=0;if(t in cn&&(t=cn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const nh=[0,0];function sh(t,e,n,s){let i=Array.isArray(t)?t:nh,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,cn[t]?t:"0"]),o=si(i[0],n,s),r=si(i[1],e),o-r}const Lt={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ih={x:0,y:0};function rh(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function oh(t,e,n){const{offset:s=Lt.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?eh(i,t):ih,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:rh(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=s.length;for(let f=0;f<h;f++){const d=sh(s[f],u[r],l[r],a[o]);
1!c&&d!==e[o].interpolatorOffsets[f]&&(c=!0),e[o].offset[f]=d}c&&(e[o].interpolate=Sn(e[o].offset,ji(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=Z(0,1,e[o].interpolate(e[o].current))}function ah(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function lh(t,e,n,s={}){return{measure:i=>{ah(t,s.target,n),th(t,n,i),(s.offset||s.target)&&oh(t,n,s)},notify:()=>e(n)}}const yt=new WeakMap,ii=new WeakMap,Ie=new WeakMap,ri=new WeakMap,Yt=new WeakMap,oi=t=>t===document.scrollingElement?window:t;function to(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...s}={}){if(!e)return $;let i=Ie.get(e);i||(i=new Set,Ie.set(e,i));const o=Ju(),r=lh(e,t,o,s);if(i.add(r),!yt.has(e)){const l=()=>{for(const f of i)f.measure(B.timestamp);V.preUpdate(u)},u=()=>{for(const f of i)f.notify()},c=()=>V.read(l);yt.set(e,c);const h=oi(e);window.addEventListener("resize",c),e!==document.documentElement&&ii.set(e,tn(e,c)),h.addEventListener("scroll",c),c()}
1if(n&&!Yt.has(e)){const l=yt.get(e),u={width:e.scrollWidth,height:e.scrollHeight};ri.set(e,u);const c=()=>{const f=e.scrollWidth,d=e.scrollHeight;(u.width!==f||u.height!==d)&&(l(),u.width=f,u.height=d)},h=V.read(c,!0);Yt.set(e,h)}const a=yt.get(e);return V.read(a,!1,!0),()=>{G(a);const l=Ie.get(e);if(!l||(l.delete(r),l.size))return;const u=yt.get(e);yt.delete(e),u&&(oi(e).removeEventListener("scroll",u),ii.get(e)?.(),window.removeEventListener("resize",u));const c=Yt.get(e);c&&(G(c),Yt.delete(e)),ri.delete(e)}}const ch=[[Lt.Enter,"entry"],[Lt.Exit,"exit"],[Lt.Any,"cover"],[Lt.All,"contain"]],ai={start:0,end:1};function uh(t){const e=t.trim().split(/\s+/);if(e.length!==2)return;const n=ai[e[0]],s=ai[e[1]];if(!(n===void 0||s===void 0))return[n,s]}function hh(t){if(t.length!==2)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else if(typeof n=="string"){const s=uh(n);if(!s)return;e.push(s)}else return;return e}function fh(t,e){const n=hh(t);if(!n)return!1;for(let s=0;s<2;s++){const i=n[s],o=e[s];if(i[0]!==o[0]||i[1]!==o[1])return!1}return!0}function Un(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of ch)if(fh(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const li=new Map;function ci(t){const e={value:0},n=to(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function eo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);let i=li.get(e);i||(i=new Map,li.set(e,i));const o=n.target??"self";let r=i.get(o);r||(r={},i.set(o,r));const a=s+(n.offset??[]).join(",");return r[a]||(n.target&&me(n.target)?Un(n.offset)?r[a]=new ViewTimeline({subject:n.target,axis:s}):r[a]=ci({container:e,...n}):me()?r[a]=new ScrollTimeline({source:e,axis:s}):r[a]=ci({container:e,...n})),r[a]}function dh(t,e){const n=eo(e),s=e.target?Un(e.offset):void 0,i=e.target?me(e.target)&&!!s:me();return t.attachTimeline({timeline:i?n:void 0,...s&&i&&{rangeStart:s.rangeStart,rangeEnd:s.rangeEnd},observe:o=>(o.pause(),mr(r=>{o.time=o.iterationDuration*r},n))})}function mh(t){return t&&(t.target||t.offset)}function ph(t){return t.length===2}function gh(t,e){return ph(t)||mh(e)?to(n=>{t(n[e.axis].progress,n)},e):mr(t,eo(e))}function no(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return $;const i={axis:e,container:n,...s};return typeof t=="function"?gh(t,i):dh(t,i)}const yh=()=>({scrollX:Y(0),scrollY:Y(0),scrollXProgress:Y(0),scrollYProgress:Y(0)}),Pt=t=>t?!t.current:!1;function ui(t,e,n,s){return{factory:i=>{let o;const r=()=>{if(Pt(n)||Pt(s)){Vt.read(r);return}o=no(i,{...e,axis:t,container:n?.current||void 0,target:s?.current||void 0})};return Vt.read(r),()=>{cr(r),o?.()}},times:[0,1],keyframes:[0,1],ease:i=>i,duration:1}}function vh(t,e){return typeof window>"u"?!1:t?zi()&&!!Un(e):Cn()}function xh({container:t,target:e,...n}={}){const s=St(yh);vh(e,n.offset)&&(s.scrollXProgress.accelerate=ui("x",n,t,e),s.scrollYProgress.accelerate=ui("y",n,t,e));const i=P.useRef(null),o=P.useRef(!1),r=P.useCallback(()=>(i.current=no((a,{x:l,y:u})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(u.current),s.scrollYProgress.set(u.progress)},{...n,container:t?.current||void 0,target:e?.current||void 0}),()=>{i.current?.()}),[t,e,JSON.stringify(n.offset)]);return un(()=>{if(o.current=!1,Pt(t)||Pt(e)){o.current=!0;return}else return r()},[r]),P.useEffect(()=>{if(!o.current)return;let a;const l=()=>{const u=Pt(t),c=Pt(e);!u&&!c&&(a=r())};return Vt.read(l),()=>{cr(l),a?.()}},[r]),s}function Th(t){const e=St(()=>Y(t)),{isStatic:n}=P.useContext(jn);if(n){const[,s]=P.useState(t);P.useEffect(()=>e.on("change",s),[])}return e}function so(t,e){const n=Th(e()),s=()=>n.set(e());return s(),un(()=>{const i=()=>V.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),G(s)}}),n}function wh(t){It.current=[],t();const e=so(It.current,t);return It.current=void 0,e}function io(t,e,n,s){if(typeof t=="function")return wh(t);if(n!==void 0&&!Array.isArray(n)&&typeof e!="function")return Ph(t,e,n,s);const r=typeof e=="function"?e:Vl(e,n,s),a=Array.isArray(t)?hi(t,r):hi([t],([u])=>r(u)),l=Array.isArray(t)?void 0:t.accelerate;return l&&!l.isTransformed&&typeof e!="function"&&Array.isArray(n)&&s?.clamp!==!1&&(a.accelerate={...l,times:e,keyframes:n,isTransformed:!0}),a}function hi(t,e){const n=St(()=>[]);return so(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Ph(t,e,n,s){const i=St(()=>Object.keys(n)),o=St(()=>({}));for(const r of i)o[r]=io(t,e,n[r],s);return o}function Vh({className:t="",variant:e="bronze"}
1){return U.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute -z-10 rounded-full blur-3xl ${e==="bronze"?"glow-bronze":"glow-petrol"} ${t}`})}function Ch({className:t=""}){return U.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 -z-10 bg-dots opacity-40 [mask-image:radial-gradient(ellipse_at_center,black,transparent_75%)] ${t}`})}function Mh({className:t=""}){return U.jsx("div",{"aria-hidden":!0,className:`rule-gradient w-full ${t}`})}function Eh({children:t,delay:e=0,className:n=""}){return U.jsx(Qr.div,{initial:{opacity:0,y:28},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6,ease:"easeOut",delay:e},className:n,children:t})}function Dh({count:t=18,className:e=""}){const n=Array.from({length:t},(s,i)=>{const o=2+i%4;return{left:`${i*53%100}%`,bottom:`${i*17%40}%`,size:o,delay:`${i%7*.9}s`,dur:`${7+i%6}s`,op:.25+i%4*.12}});return U.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 -z-10 overflow-hidden ${e}`,children:n.map((s,i)=>U.jsx("span",{className:"absolute rounded-full bg-accent",style:{left:s.left,bottom:s.bottom,width:s.size,height:s.size,"--p-op":s.op,animation:`drift-up ${s.dur} linear ${s.delay} infinite`}},i))})}function Rh({src:t,alt:e,className:n="",imgClassName:s=""}){const i=P.useRef(null),{scrollYProgress:o}=xh({target:i,offset:["start end","end start"]}),r=io(o,[0,1],["-8%","8%"]);return U.jsx("div",{ref:i,className:`overflow-hidden ${n}`,children:U.jsx(Qr.img,{src:t,alt:e,style:{y:r},className:`h-[116%] w-full object-cover ${s}`})})}function Lh({children:t,className:e=""}){const n=P.useRef(null),s=i=>{const o=n.current;if(!o)return;const r=o.getBoundingClientRect();o.style.setProperty("--mx",`${i.clientX-r.left}px`),o.style.setProperty("--my",`${i.clientY-r.top}px`)};return U.jsxs("div",{ref:n,onMouseMove:s,className:`group relative overflow-hidden transition-all duration-300 hover:-translate-y-1.5 ${e}`,children:[U.jsx("div",{className:"radial-spot pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100"}),U.jsx("div",{className:"relative",children:t})]})}export{Ch as D,Dh as F,Vh as G,Rh as P,Eh as R,Lh as S,Mh as a,Qr as m};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.