@plyaz/ui 0.6.11 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/client.cjs.js +1 -1
  2. package/dist/client.es.js +3 -3
  3. package/dist/fonts/GeneralSans-Bold.woff2 +0 -0
  4. package/dist/fonts/GeneralSans-Medium.woff2 +0 -0
  5. package/dist/fonts/GeneralSans-Regular.woff2 +0 -0
  6. package/dist/fonts/GeneralSans-Semibold.woff2 +0 -0
  7. package/dist/index.cjs.js +6 -6
  8. package/dist/index.es.js +100 -100
  9. package/dist/types/App.d.ts.map +1 -1
  10. package/dist/types/components/AuroraText/AuroraText.d.ts.map +1 -1
  11. package/dist/types/components/Box/Box.d.ts +3 -3
  12. package/dist/types/components/Box/Box.d.ts.map +1 -1
  13. package/dist/types/components/Box/Box.stories.d.ts.map +1 -1
  14. package/dist/types/components/Container/Container.stories.d.ts.map +1 -1
  15. package/dist/types/components/Form/LoginForm.d.ts.map +1 -1
  16. package/dist/types/components/Form/SignupForm.d.ts.map +1 -1
  17. package/dist/types/components/FormattedDate/FormattedDate.stories.d.ts.map +1 -1
  18. package/dist/types/components/FormattedNumber/FormattedNumber.stories.d.ts.map +1 -1
  19. package/dist/types/components/Grid/Grid.stories.d.ts.map +1 -1
  20. package/dist/types/components/Heading/Heading.stories.d.ts.map +1 -1
  21. package/dist/types/components/MenuBar/Menubar.stories.d.ts.map +1 -1
  22. package/dist/types/components/Paragraph/Paragraph.stories.d.ts.map +1 -1
  23. package/dist/types/components/Section/Section.stories.d.ts.map +1 -1
  24. package/dist/types/components/Stack/Stack.stories.d.ts.map +1 -1
  25. package/dist/types/components/Text/Text.d.ts +2 -2
  26. package/dist/types/components/Text/Text.d.ts.map +1 -1
  27. package/dist/types/components/Text/Text.stories.d.ts.map +1 -1
  28. package/dist/types/components/TranslatedHtml/TranslatedHtml.stories.d.ts.map +1 -1
  29. package/dist/types/components/TranslatedText/TranslatedText.stories.d.ts.map +1 -1
  30. package/dist/ui.css +1 -1
  31. package/package.json +2 -2
  32. package/styles/animations.css +46 -0
  33. package/styles/blog.css +191 -0
  34. package/styles/main.css +155 -0
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),A=require("react"),Y=require("./constant-B-tpIxtm.cjs"),er=require("react-dom"),On=require("@radix-ui/react-slot");function nr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const p=nr(A),ja=nr(er),sr=A.createContext({});function Me(t){const e=A.useRef(null);return e.current===null&&(e.current=t()),e.current}const Nn=typeof window<"u",kn=Nn?A.useLayoutEffect:A.useEffect,In=A.createContext(null);function Fn(t,e){t.indexOf(e)===-1&&t.push(e)}function jn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const et=(t,e,n)=>n>e?e:n<t?t:n;function cn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ft=()=>{},X=()=>{};process.env.NODE_ENV!=="production"&&(Ft=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(cn(e,n))},X=(t,e,n)=>{if(!t)throw new Error(cn(e,n))});const st={},ir=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function rr(t){return typeof t=="object"&&t!==null}const or=t=>/^0[^.\s]+$/u.test(t);function Bn(t){let e;return()=>(e===void 0&&(e=t()),e)}const W=t=>t,Ba=(t,e)=>n=>e(t(n)),ne=(...t)=>t.reduce(Ba),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class _n{constructor(){this.subscriptions=[]}add(e){return Fn(this.subscriptions,e),()=>jn(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 G=t=>t*1e3,J=t=>t/1e3;function Wn(t,e){return e?t*(1e3/e):0}const ws=new Set;function Re(t,e,n){t||ws.has(e)||(console.warn(cn(e,n)),ws.add(e))}const ar=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,_a=1e-7,Wa=12;function Ua(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ar(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>_a&&++a<Wa);return r}function se(t,e,n,s){if(t===e&&n===s)return W;const i=o=>Ua(o,0,1,t,n);return o=>o===0||o===1?o:ar(i(o),e,s)}const cr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lr=t=>e=>1-t(1-e),ur=se(.33,1.53,.69,.99),Un=lr(ur),fr=cr(Un),dr=t=>(t*=2)<1?.5*Un(t):.5*(2-Math.pow(2,-10*(t-1))),$n=t=>1-Math.sin(Math.acos(t)),hr=lr($n),mr=cr($n),$a=se(.42,0,1,1),Ka=se(0,0,.58,1),pr=se(.42,0,.58,1),za=t=>Array.isArray(t)&&typeof t[0]!="number",gr=t=>Array.isArray(t)&&typeof t[0]=="number",Ss={linear:W,easeIn:$a,easeInOut:pr,easeOut:Ka,circIn:$n,circInOut:mr,circOut:hr,backIn:Un,backInOut:fr,backOut:ur,anticipate:dr},Ha=t=>typeof t=="string",As=t=>{if(gr(t)){X(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return se(e,n,s,i)}else if(Ha(t))return X(Ss[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ss[t];return t},oe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ga(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 c(u){r.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const v=d&&i?n:s;return f&&r.add(u),v.has(u)||v.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(u))}};return l}const Ya=40;function yr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=oe.reduce((x,S)=>(x[S]=Ga(o),x),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:v}=r,m=()=>{const x=st.useManualTiming?i.timestamp:performance.now();n=!1,st.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Ya),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},y=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:oe.reduce((x,S)=>{const w=r[S];return x[S]=(D,E=!1,C=!1)=>(n||y(),w.schedule(D,E,C)),x},{}),cancel:x=>{for(let S=0;S<oe.length;S++)r[oe[S]].cancel(x)},state:i,steps:r}}const{schedule:M,cancel:q,state:k,steps:Fe}=yr(typeof requestAnimationFrame<"u"?requestAnimationFrame:W,!0);let pe;function Xa(){pe=void 0}const _={now:()=>(pe===void 0&&_.set(k.isProcessing||st.useManualTiming?k.timestamp:performance.now()),pe),set:t=>{pe=t,queueMicrotask(Xa)}},vr=t=>e=>typeof e=="string"&&e.startsWith(t),Kn=vr("--"),qa=vr("var(--"),zn=t=>qa(t)?Za.test(t.split("/*")[0].trim()):!1,Za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...jt,transform:t=>et(0,1,t)},ae={...jt,default:1},Kt=t=>Math.round(t*1e5)/1e5,Hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qa(t){return t==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gn=(t,e)=>n=>!!(typeof n=="string"&&Ja.test(n)&&n.startsWith(t)||e&&!Qa(n)&&Object.prototype.hasOwnProperty.call(n,e)),xr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},tc=t=>et(0,255,t),je={...jt,transform:t=>Math.round(tc(t))},pt={test:Gn("rgb","red"),parse:xr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+Kt(Xt.transform(s))+")"};function ec(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 ln={test:Gn("#"),parse:ec,transform:pt.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),at=ie("deg"),tt=ie("%"),P=ie("px"),nc=ie("vh"),sc=ie("vw"),Ps={...tt,parse:t=>tt.parse(t)/100,transform:t=>tt.transform(t*100)},Pt={test:Gn("hsl","hue"),parse:xr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+tt.transform(Kt(e))+", "+tt.transform(Kt(n))+", "+Kt(Xt.transform(s))+")"},N={test:t=>pt.test(t)||ln.test(t)||Pt.test(t),parse:t=>pt.test(t)?pt.parse(t):Pt.test(t)?Pt.parse(t):ln.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):Pt.transform(t),getAnimatableNone:t=>{const e=N.parse(t);return e.alpha=0,N.transform(e)}},ic=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rc(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Hn))==null?void 0:e.length)||0)+(((n=t.match(ic))==null?void 0:n.length)||0)>0}const Tr="number",br="color",oc="var",ac="var(",Es="${}",cc=/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 qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(cc,c=>(N.test(c)?(s.color.push(o),i.push(br),n.push(N.parse(c))):c.startsWith(ac)?(s.var.push(o),i.push(oc),n.push(c)):(s.number.push(o),i.push(Tr),n.push(parseFloat(c))),++o,Es)).split(Es);return{values:n,split:a,indexes:s,types:i}}function wr(t){return qt(t).values}function Sr(t){const{split:e,types:n}=qt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Tr?o+=Kt(i[r]):a===br?o+=N.transform(i[r]):o+=i[r]}return o}}const lc=t=>typeof t=="number"?0:N.test(t)?N.getAnimatableNone(t):t;function uc(t){const e=wr(t);return Sr(t)(e.map(lc))}const ut={test:rc,parse:wr,createTransformer:Sr,getAnimatableNone:uc};function Be(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 fc({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,c=2*n-a;i=Be(c,a,t+1/3),o=Be(c,a,t),r=Be(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Se(t,e){return n=>n>0?e:t}const V=(t,e,n)=>t+(e-t)*n,_e=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},dc=[ln,pt,Pt],hc=t=>dc.find(e=>e.test(t));function Cs(t){const e=hc(t);if(Ft(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Pt&&(n=fc(n)),n}const Ds=(t,e)=>{const n=Cs(t),s=Cs(e);if(!n||!s)return Se(t,e);const i={...n};return o=>(i.red=_e(n.red,s.red,o),i.green=_e(n.green,s.green,o),i.blue=_e(n.blue,s.blue,o),i.alpha=V(n.alpha,s.alpha,o),pt.transform(i))},un=new Set(["none","hidden"]);function mc(t,e){return un.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function pc(t,e){return n=>V(t,e,n)}function Yn(t){return typeof t=="number"?pc:typeof t=="string"?zn(t)?Se:N.test(t)?Ds:vc:Array.isArray(t)?Ar:typeof t=="object"?N.test(t)?Ds:gc:Se}function Ar(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Yn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function gc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Yn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function yc(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 vc=(t,e)=>{const n=ut.createTransformer(e),s=qt(t),i=qt(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?un.has(t)&&!i.values.length||un.has(e)&&!s.values.length?mc(t,e):ne(Ar(yc(s,i),i.values),n):(Ft(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Se(t,e))};function Pr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Yn(t)(t,e)}const xc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>q(e),now:()=>k.isProcessing?k.timestamp:_.now()}},Er=(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)})`},Ae=2e4;function Xn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ae;)e+=n,s=t.next(e);return e>=Ae?1/0:e}function Tc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Xn(s),Ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const bc=5;function Cr(t,e,n){const s=Math.max(e-bc,0);return Wn(n-t(s),e-s)}const R={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},We=.001;function wc({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o;Ft(t<=G(R.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=et(R.minDamping,R.maxDamping,r),t=et(R.minDuration,R.maxDuration,J(t)),r<1?(i=l=>{const u=l*r,f=u*t,d=u-n,h=fn(l,r),v=Math.exp(-f);return We-d/h*v},o=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=fn(Math.pow(l,2),r);return(-i(l)+We>0?-1:1)*((d-h)*v)/m}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-We+u*f},o=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=Ac(i,o,a);if(t=G(t),isNaN(c))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const Sc=12;function Ac(t,e,n){let s=n;for(let i=1;i<Sc;i++)s=s-t(s)/e(s);return s}function fn(t,e){return t*Math.sqrt(1-e*e)}const Pc=["duration","bounce"],Ec=["stiffness","damping","mass"];function Ms(t,e){return e.some(n=>t[n]!==void 0)}function Cc(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Ms(t,Ec)&&Ms(t,Pc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*et(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=wc(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Pe(t=R.visualDuration,e=R.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:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=Cc({...n,velocity:-J(n.velocity||0)}),v=d||0,m=l/(2*Math.sqrt(c*u)),y=r-o,g=J(Math.sqrt(c/u)),T=Math.abs(y)<5;s||(s=T?R.restSpeed.granular:R.restSpeed.default),i||(i=T?R.restDelta.granular:R.restDelta.default);let x;if(m<1){const w=fn(g,m);x=D=>{const E=Math.exp(-m*g*D);return r-E*((v+m*g*y)/w*Math.sin(w*D)+y*Math.cos(w*D))}}else if(m===1)x=w=>r-Math.exp(-g*w)*(y+(v+g*y)*w);else{const w=g*Math.sqrt(m*m-1);x=D=>{const E=Math.exp(-m*g*D),C=Math.min(w*D,300);return r-E*((v+m*g*y)*Math.sinh(C)+w*y*Math.cosh(C))/w}}const S={calculatedDuration:h&&f||null,next:w=>{const D=x(w);if(h)a.done=w>=f;else{let E=w===0?v:0;m<1&&(E=w===0?G(v):Cr(x,w,D));const C=Math.abs(E)<=s,O=Math.abs(r-D)<=i;a.done=C&&O}return a.value=a.done?r:D,a},toString:()=>{const w=Math.min(Xn(S),Ae),D=Er(E=>S.next(w*E).value,w,30);return w+"ms "+D},toTransition:()=>{}};return S}Pe.applyToOptions=t=>{const e=Tc(t,100,Pe);return t.ease=e.ease,t.duration=G(e.duration),t.type="keyframes",t};function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,v=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*e;const y=f+m,g=r===void 0?y:r(y);g!==y&&(m=g-f);const T=C=>-m*Math.exp(-C/s),x=C=>g+T(C),S=C=>{const O=T(C),F=x(C);d.done=Math.abs(O)<=l,d.value=d.done?g:F};let w,D;const E=C=>{h(d.value)&&(w=C,D=Pe({keyframes:[d.value,v(d.value)],velocity:Cr(x,C,d.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return E(0),{calculatedDuration:null,next:C=>{let O=!1;return!D&&w===void 0&&(O=!0,S(C),E(C)),w!==void 0&&C>=w?D.next(C-w):(!O&&S(C),d)}}}function Dc(t,e,n){const s=[],i=n||st.mix||Pr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||W:e;a=ne(c,a)}s.push(a)}return s}function qn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(X(o===e.length,"Both input and output ranges must be the same length","range-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=Dc(e,s,i),c=a.length,l=u=>{if(r&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=kt(t[f],t[f+1],u);return a[f](d)};return n?u=>l(et(t[0],t[o-1],u)):l}function Mc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(V(n,1,i))}}function Dr(t){const e=[0];return Mc(e,t.length-1),e}function Rc(t,e){return t.map(n=>n*e)}function Vc(t,e){return t.map(()=>e||pr).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=za(s)?s.map(As):As(s),o={done:!1,value:e[0]},r=Rc(n&&n.length===e.length?n:Dr(e),t),a=qn(r,e,{ease:Array.isArray(i)?i:Vc(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Lc=t=>t!==null;function Zn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Lc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Oc={decay:dn,inertia:dn,tween:Et,keyframes:Et,spring:Pe};function Mr(t){typeof t.type=="string"&&(t.type=Oc[t.type])}class Qn{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 Nc=t=>t/100;class Jn extends Qn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Mr(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Et;process.env.NODE_ENV!=="production"&&c!==Et&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=ne(Nc,Pr(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Xn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:v,onUpdate:m,finalKeyframe:y}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,S=s;if(f){const C=Math.min(this.currentTime,i)/a;let O=Math.floor(C),F=C%1;!F&&C>=1&&(F=1),F===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(S=r)),x=et(0,1,F)*a}const w=T?{done:!1,value:u[0]}:S.next(x);o&&(w.value=o(w.value));let{done:D}=w;!T&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return E&&v!==dn&&(w.value=Zn(u,this.options,y,this.speed)),m&&m(w.value),E&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return J(this.calculatedDuration)}get time(){return J(this.currentTime)}set time(e){var n;e=G(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(_.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=xc,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);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(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function kc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const gt=t=>t*180/Math.PI,hn=t=>{const e=gt(Math.atan2(t[1],t[0]));return mn(e)},Ic={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:hn,rotateZ:hn,skewX:t=>gt(Math.atan(t[1])),skewY:t=>gt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},mn=t=>(t=t%360,t<0&&(t+=360),t),Rs=hn,Vs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ls=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Fc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vs,scaleY:Ls,scale:t=>(Vs(t)+Ls(t))/2,rotateX:t=>mn(gt(Math.atan2(t[6],t[5]))),rotateY:t=>mn(gt(Math.atan2(-t[2],t[0]))),rotateZ:Rs,rotate:Rs,skewX:t=>gt(Math.atan(t[4])),skewY:t=>gt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function pn(t){return t.includes("scale")?1:0}function gn(t,e){if(!t||t==="none")return pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Fc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ic,i=a}if(!i)return pn(e);const o=s[e],r=i[1].split(",").map(Bc);return typeof o=="function"?o(r):r[o]}const jc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return gn(n,e)};function Bc(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Os=t=>t===jt||t===P,_c=new Set(["x","y","z"]),Wc=Bt.filter(t=>!_c.has(t));function Uc(t){const e=[];return Wc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const yt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>gn(e,"x"),y:(t,{transform:e})=>gn(e,"y")};yt.translateX=yt.x;yt.translateY=yt.y;const vt=new Set;let yn=!1,vn=!1,xn=!1;function Rr(){if(vn){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Uc(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])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}vn=!1,yn=!1,vt.forEach(t=>t.complete(xn)),vt.clear()}function Vr(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function $c(){xn=!0,Vr(),Rr(),xn=!1}class ts{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?(vt.add(this),yn||(yn=!0,M.read(Vr),M.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0: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])}kc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Kc=t=>t.startsWith("--");function zc(t,e,n){Kc(e)?t.style.setProperty(e,n):t.style[e]=n}const Lr=Bn(()=>window.ScrollTimeline!==void 0),Hc={};function Gc(t,e){const n=Bn(t);return()=>Hc[e]??n()}const Or=Gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$t=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ns={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Nr(t,e){if(t)return typeof t=="function"?Or()?Er(t,e):"ease-out":gr(t)?$t(t):Array.isArray(t)?t.map(n=>Nr(n,e)||Ns.easeOut):Ns[t]}function Yc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Nr(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function kr(t){return typeof t=="function"&&"applyToOptions"in t}function Xc({type:t,...e}){return kr(t)&&Or()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class qc extends Qn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,X(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Xc(e);this.animation=Yc(n,s,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Zn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zc(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}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(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return J(Number(e))}get time(){return J(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=G(e)}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 Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Lr()?(this.animation.timeline=e,W):n(this)}}const Ir={anticipate:dr,backInOut:fr,circInOut:mr};function Zc(t){return t in Ir}function Qc(t){typeof t.ease=="string"&&Zc(t.ease)&&(t.ease=Ir[t.ease])}const ks=10;class Jc extends qc{constructor(e){Qc(e),Mr(e),super(e),e.startTime&&(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 Jn({...r,autoplay:!1}),c=G(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-ks).value,a.sample(c).value,ks),a.stop()}}const Is=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ut.test(t)||t==="0")&&!t.startsWith("url("));function tl(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 el(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=Is(i,e),a=Is(o,e);return Ft(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:tl(t)||(n==="spring"||kr(n))&&s}function Tn(t){t.duration=0,t.type}const nl=new Set(["opacity","clipPath","filter","transform"]),sl=Bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function il(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return sl()&&n&&nl.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const rl=40;class ol extends Qn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){var v;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:l,element:u,...f},h=(u==null?void 0:u.KeyframeResolver)||ts;this.keyframeResolver=new h(a,(m,y,g)=>this.onKeyframesResolved(m,y,d,!g),c,l,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=_.now(),el(e,o,r,a)||((st.instantAnimations||!c)&&(u==null||u(Zn(e,s,n))),e[0]=e[e.length-1],Tn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>rl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!l&&il(d)?new Jc({...d,element:d.motionValue.owner.current}):new Jn(d);h.finished.then(()=>this.notifyFinished()).catch(W),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$c()),this._animation}get duration(){return this.animation.duration}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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const al=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cl(t){const e=al.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const ll=4;function Fr(t,e,n=1){X(n<=ll,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=cl(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ir(r)?parseFloat(r):r}return zn(i)?Fr(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const jr=new Set(["width","height","top","left","right","bottom",...Bt]),ul={test:t=>t==="auto",parse:t=>t},Br=t=>e=>e.test(t),_r=[jt,P,tt,at,sc,nc,ul],Fs=t=>_r.find(Br(t));function fl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||or(t):!0}const dl=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Hn)||[];if(!s)return t;const i=n.replace(s,"");let o=dl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ml=/\b([a-z-]*)\(.*?\)/gu,bn={...ut,getAnimatableNone:t=>{const e=t.match(ml);return e?e.map(hl).join(" "):t}},js={...jt,transform:Math.round},pl={rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:at,skewX:at,skewY:at,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:Ps,originY:Ps,originZ:P},ns={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...pl,zIndex:js,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:js},gl={...ns,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:bn,WebkitFilter:bn},Wr=t=>gl[t];function Ur(t,e){let n=Wr(t);return n!==bn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const yl=new Set(["auto","none","0"]);function vl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!yl.has(o)&&qt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ur(n,i)}class xl extends ts{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 l=e[c];if(typeof l=="string"&&(l=l.trim(),zn(l))){const u=Fr(l,n.current);u!==void 0&&(e[c]=u),c===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(s)||e.length!==2)return;const[i,o]=e,r=Fs(i),a=Fs(o);if(r!==a)if(Os(r)&&Os(a))for(let c=0;c<e.length;c++){const l=e[c];typeof l=="string"&&(e[c]=parseFloat(l))}else yt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||fl(e[i]))&&s.push(i);s.length&&vl(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=yt[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(){var a;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]=yt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function $r(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Kr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function zr(t){return rr(t)&&"offsetHeight"in t}const Bs=30,Tl=t=>!isNaN(parseFloat(t)),zt={current:void 0};class bl{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Tl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Re(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new _n);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.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(){var e;(e=this.events.change)==null||e.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 zt.current&&zt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bs);return Wn(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function H(t,e){return new bl(t,e)}const{schedule:ss}=yr(queueMicrotask,!1),z={x:!1,y:!1};function Hr(){return z.x||z.y}function wl(t){return t==="x"||t==="y"?z[t]?null:(z[t]=!0,()=>{z[t]=!1}):z.x||z.y?null:(z.x=z.y=!0,()=>{z.x=z.y=!1})}function Gr(t,e){const n=$r(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function _s(t){return!(t.pointerType==="touch"||Hr())}function Sl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{if(!_s(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{_s(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Yr=(t,e)=>e?t===e?!0:Yr(t,e.parentElement):!1,is=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pl(t){return Al.has(t.tagName)||t.tabIndex!==-1}const ge=new WeakSet;function Ws(t){return e=>{e.key==="Enter"&&t(e)}}function Ue(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const El=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ws(()=>{if(ge.has(n))return;Ue(n,"down");const i=Ws(()=>{Ue(n,"up")}),o=()=>Ue(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 Us(t){return is(t)&&!Hr()}function Cl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{const c=a.currentTarget;if(!Us(a))return;ge.add(c);const l=e(c,a),u=(h,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ge.has(c)&&ge.delete(c),Us(h)&&typeof l=="function"&&l(h,{success:v})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||Yr(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),zr(a)&&(a.addEventListener("focus",l=>El(l,i)),!Pl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function rs(t){return rr(t)&&"ownerSVGElement"in t}const ye=new WeakMap;let ct;const Xr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:rs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Dl=Xr("inline","width","offsetWidth"),Ml=Xr("block","height","offsetHeight");function Rl({target:t,borderBoxSize:e}){var n;(n=ye.get(t))==null||n.forEach(s=>{s(t,{get width(){return Dl(t,e)},get height(){return Ml(t,e)}})})}function Vl(t){t.forEach(Rl)}function Ll(){typeof ResizeObserver>"u"||(ct=new ResizeObserver(Vl))}function Ol(t,e){ct||Ll();const n=$r(t);return n.forEach(s=>{let i=ye.get(s);i||(i=new Set,ye.set(s,i)),i.add(e),ct==null||ct.observe(s)}),()=>{n.forEach(s=>{const i=ye.get(s);i==null||i.delete(e),i!=null&&i.size||ct==null||ct.unobserve(s)})}}const ve=new Set;let Ct;function Nl(){Ct=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ve.forEach(e=>e(t))},window.addEventListener("resize",Ct)}function kl(t){return ve.add(t),Ct||Nl(),()=>{ve.delete(t),!ve.size&&typeof Ct=="function"&&(window.removeEventListener("resize",Ct),Ct=void 0)}}function Il(t,e){return typeof t=="function"?kl(t):Ol(t,e)}function qr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return M.preUpdate(s,!0),()=>q(s)}function Fl(t){return rs(t)&&t.tagName==="svg"}function jl(...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=qn(i,o,r);return e?a(s):a}const j=t=>!!(t&&t.getVelocity),Bl=[..._r,N,ut],_l=t=>Bl.find(Br(t)),os=A.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Wl(t=!0){const e=A.useContext(In);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=A.useId();A.useEffect(()=>{if(t)return i(o)},[t]);const r=A.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Zr=A.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"]},It={};for(const t in $s)It[t]={isEnabled:e=>$s[t].some(n=>!!e[n])};function Ul(t){for(const e in t)It[e]={...It[e],...t[e]}}const $l=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","ignoreStrict","viewport"]);function Ee(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$l.has(t)}let Qr=t=>!Ee(t);function Kl(t){typeof t=="function"&&(Qr=e=>e.startsWith("on")?!Ee(e):t(e))}try{Kl(require("@emotion/is-prop-valid").default)}catch{}function zl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Qr(i)||n===!0&&Ee(i)||!e&&!Ee(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ve=A.createContext({});function Le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Zt(t){return typeof t=="string"||Array.isArray(t)}const as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cs=["initial",...as];function Oe(t){return Le(t.animate)||cs.some(e=>Zt(t[e]))}function Jr(t){return!!(Oe(t)||t.variants)}function Hl(t,e){if(Oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Zt(n)?n:void 0,animate:Zt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Gl(t){const{initial:e,animate:n}=Hl(t,A.useContext(Ve));return A.useMemo(()=>({initial:e,animate:n}),[Ks(e),Ks(n)])}function Ks(t){return Array.isArray(t)?t.join(" "):t}const Qt={};function Yl(t){for(const e in t)Qt[e]=t[e],Kn(e)&&(Qt[e].isCSSVariable=!0)}function to(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const Xl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ql=Bt.length;function Zl(t,e,n){let s="",i=!0;for(let o=0;o<ql;o++){const r=Bt[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(r.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Kr(a,ns[r]);if(!c){i=!1;const u=Xl[r]||r;s+=`${u}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ls(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const l=e[c];if(_t.has(c)){r=!0;continue}else if(Kn(c)){i[c]=l;continue}else{const u=Kr(l,ns[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(e.transform||(r||n?s.transform=Zl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${l} ${u}`}}const us=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eo(t,e,n){for(const s in e)!j(e[s])&&!to(s,n)&&(t[s]=e[s])}function Ql({transformTemplate:t},e){return A.useMemo(()=>{const n=us();return ls(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Jl(t,e){const n=t.style||{},s={};return eo(s,n,t),Object.assign(s,Ql(t,e)),s}function tu(t,e){const n={},s=Jl(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 eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},nu={offset:"strokeDashoffset",array:"strokeDasharray"};function su(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?eu:nu;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function no(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,l,u){if(ls(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&su(f,i,o,r,!1)}const so=()=>({...us(),attrs:{}}),io=t=>typeof t=="string"&&t.toLowerCase()==="svg";function iu(t,e,n,s){const i=A.useMemo(()=>{const o=so();return no(o,e,io(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};eo(o,t.style,t),i.style={...o,...i.style}}return i}const ru=["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 fs(t){return typeof t!="string"||t.includes("-")?!1:!!(ru.indexOf(t)>-1||/[A-Z]/u.test(t))}function ou(t,e,n,{latestValues:s},i,o=!1){const a=(fs(t)?iu:tu)(e,s,i,t),c=zl(e,typeof t=="string",o),l=t!==A.Fragment?{...c,...a,ref:n}:{},{children:u}=e,f=A.useMemo(()=>j(u)?u.get():u,[u]);return A.createElement(t,{...l,children:f})}function zs(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ds(t,e,n,s){if(typeof e=="function"){const[i,o]=zs(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]=zs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function xe(t){return j(t)?t.get():t}function au({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:cu(n,s,i,t),renderState:e()}}function cu(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=xe(o[d]);let{initial:r,animate:a}=t;const c=Oe(t),l=Jr(t);e&&l&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const f=u?a:r;if(f&&typeof f!="boolean"&&!Le(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const v=ds(t,d[h]);if(v){const{transitionEnd:m,transition:y,...g}=v;for(const T in g){let x=g[T];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(i[T]=x)}for(const T in m)i[T]=m[T]}}}return i}const ro=t=>(e,n)=>{const s=A.useContext(Ve),i=A.useContext(In),o=()=>au(t,e,s,i);return n?o():Me(o)};function hs(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(j(s[r])||e.style&&j(e.style[r])||to(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const lu=ro({scrapeMotionValuesFromProps:hs,createRenderState:us});function oo(t,e,n){const s=hs(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const uu=ro({scrapeMotionValuesFromProps:oo,createRenderState:so}),fu=Symbol.for("motionComponentSymbol");function Dt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function du(t,e,n){return A.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Dt(n)&&(n.current=s))},[e])}const ms=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hu="framerAppearId",ao="data-"+ms(hu),co=A.createContext({});function mu(t,e,n,s,i){var m,y;const{visualElement:o}=A.useContext(Ve),r=A.useContext(Zr),a=A.useContext(In),c=A.useContext(os).reducedMotion,l=A.useRef(null);s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=A.useContext(co);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&pu(l.current,n,i,f);const d=A.useRef(!1);A.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[ao],v=A.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,h)));return kn(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),v.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!v.current&&u.animationState&&u.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,h)}),v.current=!1),u.enteringChildren=void 0)}),u}function pu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:lo(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Dt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:l})}function lo(t){if(t)return t.options.allowProjection!==!1?t.projection:lo(t.parent)}function $e(t,{forwardMotionProps:e=!1}={},n,s){n&&Ul(n);const i=fs(t)?uu:lu;function o(a,c){let l;const u={...A.useContext(os),...a,layoutId:gu(a)},{isStatic:f}=u,d=Gl(a),h=i(a,f);if(!f&&Nn){yu(u,n);const v=vu(u);l=v.MeasureLayout,d.visualElement=mu(t,h,u,s,v.ProjectionNode)}return b.jsxs(Ve.Provider,{value:d,children:[l&&d.visualElement?b.jsx(l,{visualElement:d.visualElement,...u}):null,ou(t,a,du(h,d.visualElement,c),h,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=A.forwardRef(o);return r[fu]=t,r}function gu({layoutId:t}){const e=A.useContext(sr).id;return e&&t!==void 0?e+"-"+t:t}function yu(t,e){const n=A.useContext(Zr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Ft(!1,s,"lazy-strict-mode"):X(!1,s,"lazy-strict-mode")}}function vu(t){const{drag:e,layout:n}=It;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xu(t,e){if(typeof Proxy>"u")return $e;const n=new Map,s=(o,r)=>$e(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Re(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,$e(r,void 0,t,e)),n.get(r))})}function uo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bu(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 Ke(t){return t===void 0||t===1}function wn({scale:t,scaleX:e,scaleY:n}){return!Ke(t)||!Ke(e)||!Ke(n)}function mt(t){return wn(t)||fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fo(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function Gs(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function Sn(t,e=0,n=1,s,i){t.min=Gs(t.min,e,n,s,i),t.max=Gs(t.max,e,n,s,i)}function ho(t,{x:e,y:n}){Sn(t.x,e.translate,e.scale,e.originPoint),Sn(t.y,n.translate,n.scale,n.originPoint)}const Ys=.999999999999,Xs=1.0000000000001;function wu(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:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Rt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ho(t,r)),s&&mt(o.latestValues)&&Rt(t,o.latestValues))}e.x<Xs&&e.x>Ys&&(e.x=1),e.y<Xs&&e.y>Ys&&(e.y=1)}function Mt(t,e){t.min=t.min+e,t.max=t.max+e}function qs(t,e,n,s,i=.5){const o=V(t.min,t.max,i);Sn(t,e,n,o,s)}function Rt(t,e){qs(t.x,e.x,e.scaleX,e.scale,e.originX),qs(t.y,e.y,e.scaleY,e.scale,e.originY)}function mo(t,e){return uo(bu(t.getBoundingClientRect(),e))}function Su(t,e,n){const s=mo(t,n),{scroll:i}=e;return i&&(Mt(s.x,i.offset.x),Mt(s.y,i.offset.y)),s}const Zs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vt=()=>({x:Zs(),y:Zs()}),Qs=()=>({min:0,max:0}),L=()=>({x:Qs(),y:Qs()}),An={current:null},po={current:!1};function Au(){if(po.current=!0,!!Nn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>An.current=t.matches;t.addEventListener("change",e),e()}else An.current=!1}const Pu=new WeakMap;function Eu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(j(i))t.addValue(s,i);else if(j(o))t.addValue(s,H(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,H(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ts,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=_.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Oe(n),this.isVariantNode=Jr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&j(h)&&h.set(c[d])}}mount(e){var n;this.current=e,Pu.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((s,i)=>this.bindToMotionValue(i,s)),po.current||Au(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:An.current,process.env.NODE_ENV!=="production"&&Re(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}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 It){const n=It[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):L()}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<Js.length;s++){const i=Js[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=Eu(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=H(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"&&(ir(s)||or(s))?s=parseFloat(s):!_l(s)&&ut.test(n)&&(s=Ur(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ds(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(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 _n),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ss.render(this.render)}}class go extends Cu{constructor(){super(...arguments),this.KeyframeResolver=xl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[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;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function yo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Du(t){return window.getComputedStyle(t)}class Mu extends go{constructor(){super(...arguments),this.type="html",this.renderInstance=yo}readValueFromInstance(e,n){var s;if(_t.has(n))return(s=this.projection)!=null&&s.isProjecting?pn(n):jc(e,n);{const i=Du(e),o=(Kn(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mo(e,n)}build(e,n,s){ls(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return hs(e,n,s)}}const vo=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"]);function Ru(t,e,n,s){yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(vo.has(i)?i:ms(i),e.attrs[i])}class Vu extends go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=Wr(n);return s&&s.default||0}return n=vo.has(n)?n:ms(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return oo(e,n,s)}build(e,n,s){no(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Ru(e,n,s,i)}mount(e){this.isSVGTag=io(e.tagName),super.mount(e)}}const Lu=(t,e)=>fs(t)?new Vu(e):new Mu(e,{allowProjection:t!==A.Fragment});function Lt(t,e,n){const s=t.getProps();return ds(s,e,n!==void 0?n:s.custom,t)}const Pn=t=>Array.isArray(t);function Ou(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,H(n))}function Nu(t){return Pn(t)?t[t.length-1]||0:t}function ku(t,e){const n=Lt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Nu(o[r]);Ou(t,r,a)}}function Iu(t){return!!(j(t)&&t.add)}function En(t,e){const n=t.getValue("willChange");if(Iu(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function xo(t){return t.props[ao]}const Fu=t=>t!==null;function ju(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Fu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Bu={type:"spring",stiffness:500,damping:25,restSpeed:10},_u=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wu={type:"keyframes",duration:.8},Uu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$u=(t,{keyframes:e})=>e.length>2?Wu:_t.has(t)?t.startsWith("scale")?_u(e[1]):Bu:Uu;function Ku({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ps=(t,e,n,s={},i,o)=>r=>{const a=es(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-G(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ku(a)||Object.assign(u,$u(t,u)),u.duration&&(u.duration=G(u.duration)),u.repeatDelay&&(u.repeatDelay=G(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Tn(u),u.delay===0&&(f=!0)),(st.instantAnimations||st.skipAnimations)&&(f=!0,Tn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=ju(u.keyframes,a);if(d!==void 0){M.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Jn(u):new ol(u)};function zu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function To(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const c=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const f=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||l&&zu(l,u))continue;const h={delay:n,...es(o||{},u)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===v&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const g=xo(t);if(g){const T=window.MotionHandoffAnimation(g,u,M);T!==null&&(h.startTime=T,m=!0)}}En(t,u),f.start(ps(u,f,d,t.shouldReduceMotion&&jr.has(u)?{type:!1}:h,t,m));const y=f.animation;y&&c.push(y)}return r&&Promise.all(c).then(()=>{M.update(()=>{r&&ku(t,r)})}),c}function bo(t,e,n,s=0,i=1){const o=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Cn(t,e,n={}){var c;const s=Lt(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(To(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return Hu(t,e,l,u,f,d,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 Hu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Cn(c,e,{...r,delay:n+(typeof s=="function"?0:s)+bo(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function Gu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Cn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Cn(t,e,n);else{const i=typeof e=="function"?Lt(t,e,n.custom):e;s=Promise.all(To(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function wo(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 Yu=cs.length;function So(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?So(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Yu;n++){const s=cs[n],i=t.props[s];(Zt(i)||i===!1)&&(e[s]=i)}return e}const Xu=[...as].reverse(),qu=as.length;function Zu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Gu(t,n,s)))}function Qu(t){let e=Zu(t),n=ti(),s=!0;const i=c=>(l,u)=>{var d;const f=Lt(t,u,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:v,...m}=f;l={...l,...m,...v}}return l};function o(c){e=c(t)}function r(c){const{props:l}=t,u=So(t.parent)||{},f=[],d=new Set;let h={},v=1/0;for(let y=0;y<qu;y++){const g=Xu[y],T=n[g],x=l[g]!==void 0?l[g]:u[g],S=Zt(x),w=g===c?T.isActive:null;w===!1&&(v=y);let D=x===u[g]&&x!==l[g]&&S;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&w===null||!x&&!T.prevProp||Le(x)||typeof x=="boolean")continue;const E=Ju(T.prevProp,x);let C=E||g===c&&T.isActive&&!D&&S||y>v&&S,O=!1;const F=Array.isArray(x)?x:[x];let Tt=F.reduce(i(g),{});w===!1&&(Tt={});const{prevResolvedValues:xs={}}=T,Ia={...xs,...Tt},Ts=I=>{C=!0,d.has(I)&&(O=!0,d.delete(I)),T.needsAnimating[I]=!0;const U=t.getValue(I);U&&(U.liveStyle=!1)};for(const I in Ia){const U=Tt[I],dt=xs[I];if(h.hasOwnProperty(I))continue;let bt=!1;Pn(U)&&Pn(dt)?bt=!wo(U,dt):bt=U!==dt,bt?U!=null?Ts(I):d.add(I):U!==void 0&&d.has(I)?Ts(I):T.protectedKeys[I]=!0}T.prevProp=x,T.prevResolvedValues=Tt,T.isActive&&(h={...h,...Tt}),s&&t.blockInitialAnimation&&(C=!1);const bs=D&&E;C&&(!bs||O)&&f.push(...F.map(I=>{const U={type:g};if(typeof I=="string"&&s&&!bs&&t.manuallyAnimateOnMount&&t.parent){const{parent:dt}=t,bt=Lt(dt,I);if(dt.enteringChildren&&bt){const{delayChildren:Fa}=bt.transition||{};U.delay=bo(dt.enteringChildren,t,Fa)}}return{animation:I,options:U}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const g=Lt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(y.transition=g.transition)}d.forEach(g=>{const T=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=T??null}),f.push({animation:y})}let m=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(f):Promise.resolve()}function a(c,l){var f;if(n[c].isActive===l)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=r(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ti(),s=!0}}}function Ju(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!wo(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ti(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tf extends ft{constructor(e){super(e),e.animationState||(e.animationState=Qu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Le(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ef=0;class nf extends ft{constructor(){super(...arguments),this.id=ef++}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;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const sf={animation:{Feature:tf},exit:{Feature:nf}};function Jt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function re(t){return{point:{x:t.pageX,y:t.pageY}}}const rf=t=>e=>is(e)&&t(e,re(e));function Ht(t,e,n,s){return Jt(t,e,rf(n),s)}const Ao=1e-4,of=1-Ao,af=1+Ao,Po=.01,cf=0-Po,lf=0+Po;function B(t){return t.max-t.min}function uf(t,e,n){return Math.abs(t-e)<=n}function ei(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=B(n)/B(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=of&&t.scale<=af||isNaN(t.scale))&&(t.scale=1),(t.translate>=cf&&t.translate<=lf||isNaN(t.translate))&&(t.translate=0)}function Gt(t,e,n,s){ei(t.x,e.x,n.x,s?s.originX:void 0),ei(t.y,e.y,n.y,s?s.originY:void 0)}function ni(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function ff(t,e,n){ni(t.x,e.x,n.x),ni(t.y,e.y,n.y)}function si(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function Yt(t,e,n){si(t.x,e.x,n.x),si(t.y,e.y,n.y)}function K(t){return[t("x"),t("y")]}const Eo=({current:t})=>t?t.ownerDocument.defaultView:null,ii=(t,e)=>Math.abs(t-e);function df(t,e){const n=ii(t.x,e.x),s=ii(t.y,e.y);return Math.sqrt(n**2+s**2)}class Co{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=He(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=df(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:m}=d,{timestamp:y}=k;this.history.push({...m,timestamp:y});const{onStart:g,onMove:T}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ze(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:v,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=He(d.type==="pointercancel"?this.lastMoveEventInfo:ze(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,g),m&&m(d,g)},!is(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=re(e),c=ze(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=k;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(e,He(c,this.history)),this.removeListeners=ne(Ht(this.contextWindow,"pointermove",this.handlePointerMove),Ht(this.contextWindow,"pointerup",this.handlePointerUp),Ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function ze(t,e){return e?{point:e(t.point)}:t}function ri(t,e){return{x:t.x-e.x,y:t.y-e.y}}function He({point:t},e){return{point:t,delta:ri(t,Do(e)),offset:ri(t,hf(e)),velocity:mf(e,.1)}}function hf(t){return t[0]}function Do(t){return t[t.length-1]}function mf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Do(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const o=J(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 pf(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function oi(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 gf(t,{top:e,left:n,bottom:s,right:i}){return{x:oi(t.x,n,i),y:oi(t.y,e,s)}}function ai(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 yf(t,e){return{x:ai(t.x,e.x),y:ai(t.y,e.y)}}function vf(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=kt(e.min,e.max-s,t.min):s>i&&(n=kt(t.min,t.max-i,e.min)),et(0,1,n)}function xf(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 Dn=.35;function Tf(t=Dn){return t===!1?t=0:t===!0&&(t=Dn),{x:ci(t,"left","right"),y:ci(t,"top","bottom")}}function ci(t,e,n){return{min:li(t,e),max:li(t,n)}}function li(t,e){return typeof t=="number"?t:t[e]||0}const bf=new WeakMap;class wf{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=L(),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=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(re(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wl(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(g=>{let T=this.getAxisMotionValue(g).get()||0;if(tt.test(T)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[g];S&&(T=B(S)*(parseFloat(T)/100))}}this.originPoint[g]=T}),m&&M.postRender(()=>m(f,d)),En(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=d;if(v&&this.currentDirection===null){this.currentDirection=Sf(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),y&&y(f,d)},c=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>K(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Co(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Eo(this.visualElement)})}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&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ce(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=pf(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Dt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=gf(s.layoutBox,e):this.constraints=!1,this.elastic=Tf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&K(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=xf(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Dt(e))return!1;const s=e.current;X(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Su(s,i.root,this.visualElement.getTransformPagePoint());let r=yf(i.layout.layoutBox,o);if(n){const a=n(Tu(r));this.hasMutatedConstraints=!!a,a&&(r=uo(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=K(u=>{if(!ce(u,n,this.currentDirection))return;let f=c&&c[u]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,v={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,v)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return En(this.visualElement,e),s.start(ps(e,s,0,n,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){K(n=>{const{drag:s}=this.getProps();if(!ce(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];o.set(e[n]-V(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Dt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const c=a.get();i[r]=vf({min:c,max:c},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.resolveConstraints(),K(r=>{if(!ce(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:l}=this.constraints[r];a.set(V(c,l,i[r]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const e=this.visualElement.current,n=Ht(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Dt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Jt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(K(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Dn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ce(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Af extends ft{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new wf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}unmount(){this.removeGroupControls(),this.removeListeners()}}const ui=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class Pf extends ft{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new Co(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Eo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ui(e),onStart:ui(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ht(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Te={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=fi(t,e.target.x),s=fi(t,e.target.y);return`${n}% ${s}%`}},Ef={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=V(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}};let Ge=!1;class Cf extends A.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yl(Df),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ge&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Te.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ge=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ss.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ge=!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 Mo(t){const[e,n]=Wl(),s=A.useContext(sr);return b.jsx(Cf,{...t,layoutGroup:s,switchLayoutGroup:A.useContext(co),isPresent:e,safeToRemove:n})}const Df={borderRadius:{...Wt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wt,borderTopRightRadius:Wt,borderBottomLeftRadius:Wt,borderBottomRightRadius:Wt,boxShadow:Ef};function Mf(t,e,n){const s=j(t)?t:H(t);return s.start(ps("",s,e,n)),s.animation}const Rf=(t,e)=>t.depth-e.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(e){Fn(this.children,e),this.isDirty=!0}remove(e){jn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rf),this.isDirty=!1,this.children.forEach(e)}}function Lf(t,e){const n=_.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(q(s),t(o-e))};return M.setup(s,!0),()=>q(s)}const Ro=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=Ro.length,di=t=>typeof t=="string"?parseFloat(t):t,hi=t=>typeof t=="number"||P.test(t);function Nf(t,e,n,s,i,o){i?(t.opacity=V(0,n.opacity??1,kf(s)),t.opacityExit=V(e.opacity??1,0,If(s))):o&&(t.opacity=V(e.opacity??1,n.opacity??1,s));for(let r=0;r<Of;r++){const a=`border${Ro[r]}Radius`;let c=mi(e,a),l=mi(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||hi(c)===hi(l)?(t[a]=Math.max(V(di(c),di(l),s),0),(tt.test(l)||tt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function mi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const kf=Vo(0,.5,hr),If=Vo(.5,.95,W);function Vo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function pi(t,e){t.min=e.min,t.max=e.max}function $(t,e){pi(t.x,e.x),pi(t.y,e.y)}function gi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function yi(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ff(t,e=0,n=1,s=.5,i,o=t,r=t){if(tt.test(e)&&(e=parseFloat(e),e=V(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=V(o.min,o.max,s);t===o&&(a-=e),t.min=yi(t.min,e,n,a,i),t.max=yi(t.max,e,n,a,i)}function vi(t,e,[n,s,i],o,r){Ff(t,e[n],e[s],e[i],e.scale,o,r)}const jf=["x","scaleX","originX"],Bf=["y","scaleY","originY"];function xi(t,e,n,s){vi(t.x,e,jf,n?n.x:void 0,s?s.x:void 0),vi(t.y,e,Bf,n?n.y:void 0,s?s.y:void 0)}function Ti(t){return t.translate===0&&t.scale===1}function Lo(t){return Ti(t.x)&&Ti(t.y)}function bi(t,e){return t.min===e.min&&t.max===e.max}function _f(t,e){return bi(t.x,e.x)&&bi(t.y,e.y)}function wi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Oo(t,e){return wi(t.x,e.x)&&wi(t.y,e.y)}function Si(t){return B(t.x)/B(t.y)}function Ai(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wf{constructor(){this.members=[]}add(e){Fn(this.members,e),e.scheduleRender()}remove(e){if(jn(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){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0: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:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:v}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),v&&(s+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Ye=["","X","Y","Z"],$f=1e3;let Kf=0;function Xe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function No(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=xo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&No(s)}function ko({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Kf++,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.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(Gf),this.nodes.forEach(Zf),this.nodes.forEach(Qf),this.nodes.forEach(Yf)},this.resolvedRelativeTargetAt=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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new _n),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=rs(r)&&!Fl(r),this.instance=r;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Lf(d,250),Te.hasAnimatedSinceResize&&(Te.hasAnimatedSinceResize=!1,this.nodes.forEach(Ci)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||sd,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),g=!this.targetLayout||!Oo(this.targetLayout,h),T=!f&&d;if(this.options.layoutRoot||this.resumeFrom||T||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...es(v,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T)}else f||Ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),q(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(Jf),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&&No(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ei);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qf),this.nodes.forEach(zf),this.nodes.forEach(Hf)):this.nodes.forEach(Ei),this.clearAllSnapshots();const a=_.now();k.delta=et(0,1e3/60,a-k.timestamp),k.timestamp=a,k.isProcessing=!0,Fe.update.process(k),Fe.preRender.process(k),Fe.render.process(k),k.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ss.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xf),this.sharedNodes.forEach(td)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!B(this.snapshot.measuredBox.x)&&!B(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),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 c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lo(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&this.instance&&(a||mt(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),id(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(rd))){const{scroll:u}=this.root;u&&(Mt(a.x,u.offset.x),Mt(a.y,u.offset.y))}return a}removeElementScroll(r){var c;const a=L();if($(a,r),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:d}=u;u!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&$(a,r),Mt(a.x,f.offset.x),Mt(a.y,f.offset.y))}return a}applyTransform(r,a=!1){const c=L();$(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Rt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mt(u.latestValues)&&Rt(c,u.latestValues)}return mt(this.latestValues)&&Rt(c,this.latestValues),c}removeTransform(r){const a=L();$(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!mt(l.latestValues))continue;wn(l.latestValues)&&l.updateSnapshot();const u=L(),f=l.measurePageBox();$(u,f),xi(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return mt(this.latestValues)&&xi(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!==k.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=k.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ff(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),ho(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.target,h.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||wn(this.parent.latestValues)||fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===k.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;$(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;wu(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=L());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gi(this.prevProjectionDelta.x,this.projectionDelta.x),gi(this.prevProjectionDelta.y,this.projectionDelta.y)),Gt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Ai(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ai(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Vt(),this.projectionDelta=Vt(),this.projectionDeltaWithTransform=Vt()}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),h=c?c.source:void 0,v=this.layout?this.layout.source:void 0,m=h!==v,y=this.getStack(),g=!y||y.members.length<=1,T=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(nd));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;Di(f.x,r.x,w),Di(f.y,r.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ed(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&_f(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=L()),$(x,this.relativeTarget)),m&&(this.animationValues=u,Nf(u,l,this.latestValues,w,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Te.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=H(0)),this.currentAnimation=Mf(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},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($f),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Io(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||L();const f=B(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const d=B(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+d}$(a,c),Rt(a,u),Gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Wf),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Xe("z",r,l,this.animationValues);for(let u=0;u<Ye.length;u++)Xe(`rotate${Ye[u]}`,r,l,this.animationValues),Xe(`skew${Ye[u]}`,r,l,this.animationValues);r.render();for(const u in l)r.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!mt(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Uf(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?r.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Qt){if(u[v]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=Qt[v],T=f==="none"?u[v]:m(u[v],l);if(y){const x=y.length;for(let S=0;S<x;S++)r[y[S]]=T}else g?this.options.visualElement.renderState.vars[v]=T:r[v]=T}this.options.layoutId&&(r.pointerEvents=l===this?xe(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Pi),this.root.sharedNodes.clear()}}}function zf(t){t.updateLayout()}function Hf(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(d);d.min=s[f].min,d.max=d.min+h}):Io(o,e.layoutBox,s)&&K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(s[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Vt();Gt(a,s,e.layoutBox);const c=Vt();r?Gt(c,t.applyTransform(i,!0),e.measuredBox):Gt(c,s,e.layoutBox);const l=!Lo(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const v=L();Yt(v,e.layoutBox,d.layoutBox);const m=L();Yt(m,s,h.layoutBox),Oo(v,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Gf(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 Yf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xf(t){t.clearSnapshot()}function Pi(t){t.clearMeasurements()}function Ei(t){t.isLayoutDirty=!1}function qf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zf(t){t.resolveTargetDelta()}function Qf(t){t.calcProjection()}function Jf(t){t.resetSkewAndRotation()}function td(t){t.removeLeadSnapshot()}function Di(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Mi(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function ed(t,e,n,s){Mi(t.x,e.x,n.x,s),Mi(t.y,e.y,n.y,s)}function nd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sd={duration:.45,ease:[.4,0,.1,1]},Ri=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vi=Ri("applewebkit/")&&!Ri("chrome/")?Math.round:W;function Li(t){t.min=Vi(t.min),t.max=Vi(t.max)}function id(t){Li(t.x),Li(t.y)}function Io(t,e,n){return t==="position"||t==="preserve-aspect"&&!uf(Si(e),Si(n),.2)}function rd(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const od=ko({attachResizeListener:(t,e)=>Jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qe={current:void 0},Fo=ko({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!qe.current){const t=new od({});t.mount(window),t.setOptions({layoutScroll:!0}),qe.current=t}return qe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ad={pan:{Feature:Pf},drag:{Feature:Af,ProjectionNode:Fo,MeasureLayout:Mo}};function Oi(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&&M.postRender(()=>o(e,re(e)))}class cd extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Sl(e,(n,s)=>(Oi(this.node,s,"Start"),i=>Oi(this.node,i,"End"))))}unmount(){}}class ld extends ft{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=ne(Jt(this.node.current,"focus",()=>this.onFocus()),Jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ni(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&&M.postRender(()=>o(e,re(e)))}class ud extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Cl(e,(n,s)=>(Ni(this.node,s,"Start"),(i,{success:o})=>Ni(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mn=new WeakMap,Ze=new WeakMap,fd=t=>{const e=Mn.get(t.target);e&&e(t)},dd=t=>{t.forEach(fd)};function hd({root:t,...e}){const n=t||document;Ze.has(n)||Ze.set(n,{});const s=Ze.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dd,{root:t,...e})),s[i]}function md(t,e,n){const s=hd(e);return Mn.set(t,n),s.observe(t),()=>{Mn.delete(t),s.unobserve(t)}}const pd={some:0,all:1};class gd extends ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();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:pd[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return md(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(yd(e,n))&&this.startObserver()}unmount(){}}function yd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vd={inView:{Feature:gd},tap:{Feature:ud},focus:{Feature:ld},hover:{Feature:cd}},xd={layout:{ProjectionNode:Fo,MeasureLayout:Mo}},Td={...sf,...vd,...ad,...xd},bd=xu(Td,Lu),wd=50,ki=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Sd=()=>({time:0,x:ki(),y:ki()}),Ad={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ii(t,e,n,s){const i=n[e],{length:o,position:r}=Ad[e],a=i.current,c=n.time;i.current=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=kt(0,i.scrollLength,i.current);const l=s-c;i.velocity=l>wd?0:Wn(i.current-a,l)}function Pd(t,e,n){Ii(t,"x",e,n),Ii(t,"y",e,n),e.time=n}function Ed(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(zr(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 Rn={start:0,center:.5,end:1};function Fi(t,e,n=0){let s=0;if(t in Rn&&(t=Rn[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 Cd=[0,0];function Dd(t,e,n,s){let i=Array.isArray(t)?t:Cd,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,Rn[t]?t:"0"]),o=Fi(i[0],n,s),r=Fi(i[1],e),o-r}const Md={All:[[0,0],[1,1]]},Rd={x:0,y:0};function Vd(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Ld(t,e,n){const{offset:s=Md.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?Ed(i,t):Rd,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Vd(i),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const f=s.length;for(let d=0;d<f;d++){const h=Dd(s[d],l[r],c[r],a[o]);!u&&h!==e[o].interpolatorOffsets[d]&&(u=!0),e[o].offset[d]=h}u&&(e[o].interpolate=qn(e[o].offset,Dr(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=et(0,1,e[o].interpolate(e[o].current))}function Od(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,process.env.NODE_ENV!=="production"&&t&&e&&e!==t&&Re(getComputedStyle(t).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function Nd(t,e,n,s={}){return{measure:i=>{Od(t,s.target,n),Pd(t,n,i),(s.offset||s.target)&&Ld(t,n,s)},notify:()=>e(n)}}const Ut=new WeakMap,ji=new WeakMap,Qe=new WeakMap,Bi=t=>t===document.scrollingElement?window:t;function jo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return W;let s=Qe.get(e);s||(s=new Set,Qe.set(e,s));const i=Sd(),o=Nd(e,t,i,n);if(s.add(o),!Ut.has(e)){const a=()=>{for(const f of s)f.measure(k.timestamp);M.preUpdate(c)},c=()=>{for(const f of s)f.notify()},l=()=>M.read(a);Ut.set(e,l);const u=Bi(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&ji.set(e,Il(e,l)),u.addEventListener("scroll",l,{passive:!0}),l()}const r=Ut.get(e);return M.read(r,!1,!0),()=>{var l;q(r);const a=Qe.get(e);if(!a||(a.delete(o),a.size))return;const c=Ut.get(e);Ut.delete(e),c&&(Bi(e).removeEventListener("scroll",c),(l=ji.get(e))==null||l(),window.removeEventListener("resize",c))}}const _i=new Map;function kd(t){const e={value:0},n=jo(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function Bo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=_i.get(e)??new Map;_i.set(e,i);const o=n.target??"self",r=i.get(o)??{},a=s+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Lr()?new ScrollTimeline({source:e,axis:s}):kd({container:e,...n})),r[a]}function Id(t,e){const n=Bo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:s=>(s.pause(),qr(i=>{s.time=s.duration*i},n))})}function Fd(t){return t.length===2}function jd(t,e){return Fd(t)?jo(n=>{t(n[e.axis].progress,n)},e):qr(t,Bo(e))}function Bd(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return W;const i={axis:e,container:n,...s};return typeof t=="function"?jd(t,i):Id(t,i)}const _d=()=>({scrollX:H(0),scrollY:H(0),scrollXProgress:H(0),scrollYProgress:H(0)}),le=t=>t?!t.current:!1;function Wd({container:t,target:e,...n}={}){const s=Me(_d),i=A.useRef(null),o=A.useRef(!1),r=A.useCallback(()=>(i.current=Bd((a,{x:c,y:l})=>{s.scrollX.set(c.current),s.scrollXProgress.set(c.progress),s.scrollY.set(l.current),s.scrollYProgress.set(l.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=i.current)==null||a.call(i)}),[t,e,JSON.stringify(n.offset)]);return kn(()=>{if(o.current=!1,le(t)||le(e)){o.current=!0;return}else return r()},[r]),A.useEffect(()=>{if(o.current)return X(!le(t),"Container ref is defined but not hydrated","use-scroll-ref"),X(!le(e),"Target ref is defined but not hydrated","use-scroll-ref"),r()},[r]),s}function Ud(t){const e=Me(()=>H(t)),{isStatic:n}=A.useContext(os);if(n){const[,s]=A.useState(t);A.useEffect(()=>e.on("change",s),[])}return e}function _o(t,e){const n=Ud(e()),s=()=>n.set(e());return s(),kn(()=>{const i=()=>M.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),q(s)}}),n}function $d(t){zt.current=[],t();const e=_o(zt.current,t);return zt.current=void 0,e}function Kd(t,e,n,s){if(typeof t=="function")return $d(t);const i=typeof e=="function"?e:jl(e,n,s);return Array.isArray(t)?Wi(t,i):Wi([t],([o])=>i(o))}function Wi(t,e){const n=Me(()=>[]);return _o(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const zd=({children:t,className:e})=>{const n=A.useRef(null),{scrollYProgress:s}=Wd({target:n});if(typeof t!="string")throw new Error("TextReveal: children must be a string");const i=t.split(" ");return b.jsx("div",{ref:n,className:Y.cn("z-0 relative h-[200vh]",e),children:b.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:b.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:i.map((o,r)=>{const a=r/i.length,c=a+1/i.length;return b.jsx(Hd,{progress:s,range:[a,c],children:o},r)})})})})},Hd=({children:t,progress:e,range:n})=>{const s=Kd(e,n,[0,1]);return b.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[b.jsx("span",{className:"absolute opacity-30",children:t}),b.jsx(bd.span,{style:{opacity:s},className:"text-black dark:text-white",children:t})]})};function Gd(t,e){const n=p.createContext(e),s=o=>{const{children:r,...a}=o,c=p.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:c,children:r})};s.displayName=t+"Provider";function i(o){const r=p.useContext(n);if(r)return r;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[s,i]}function Wo(t,e=[]){let n=[];function s(o,r){const a=p.createContext(r),c=n.length;n=[...n,r];const l=f=>{var g;const{scope:d,children:h,...v}=f,m=((g=d==null?void 0:d[t])==null?void 0:g[c])||a,y=p.useMemo(()=>v,Object.values(v));return b.jsx(m.Provider,{value:y,children:h})};l.displayName=o+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[c])||a,v=p.useContext(h);if(v)return v;if(r!==void 0)return r;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const i=()=>{const o=n.map(r=>p.createContext(r));return function(a){const c=(a==null?void 0:a[t])||o;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[s,Yd(i,...e)]}function Yd(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const r=s.reduce((a,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:r}),[r])}};return n.scopeName=e.scopeName,n}function Ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Xd(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ui(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Ui(t[i],null)}}}}function it(...t){return p.useCallback(Xd(...t),t)}function nt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}var te=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},qd=p[" useId ".trim().toString()]||(()=>{}),Zd=0;function Je(t){const[e,n]=p.useState(qd());return te(()=>{n(s=>s??String(Zd++))},[t]),t||(e?`radix-${e}`:"")}var Qd=p[" useInsertionEffect ".trim().toString()]||te;function Jd({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[i,o,r]=th({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:i;{const u=p.useRef(t!==void 0);p.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,s])}const l=p.useCallback(u=>{var f;if(a){const d=eh(u)?u(t):u;d!==t&&((f=r.current)==null||f.call(r,d))}else o(u)},[a,t,o,r]);return[c,l]}function th({defaultProp:t,onChange:e}){const[n,s]=p.useState(t),i=p.useRef(n),o=p.useRef(e);return Qd(()=>{o.current=e},[e]),p.useEffect(()=>{var r;i.current!==n&&((r=o.current)==null||r.call(o,n),i.current=n)},[n,i]),[n,s,o]}function eh(t){return typeof t=="function"}var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=nh.reduce((t,e)=>{const n=On.createSlot(`Primitive.${e}`),s=p.forwardRef((i,o)=>{const{asChild:r,...a}=i,c=r?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...a,ref:o})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function sh(t,e){t&&ja.flushSync(()=>t.dispatchEvent(e))}function ee(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function ih(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t);p.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var rh="DismissableLayer",Vn="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",ah="dismissableLayer.focusOutside",$i,Uo=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$o=p.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:r,onDismiss:a,...c}=t,l=p.useContext(Uo),[u,f]=p.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=p.useState({}),v=it(e,E=>f(E)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),T=u?m.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=T>=g,w=uh(E=>{const C=E.target,O=[...l.branches].some(F=>F.contains(C));!S||O||(i==null||i(E),r==null||r(E),E.defaultPrevented||a==null||a())},d),D=fh(E=>{const C=E.target;[...l.branches].some(F=>F.contains(C))||(o==null||o(E),r==null||r(E),E.defaultPrevented||a==null||a())},d);return ih(E=>{T===l.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),p.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($i=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ki(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$i)}},[u,d,n,l]),p.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ki())},[u,l]),p.useEffect(()=>{const E=()=>h({});return document.addEventListener(Vn,E),()=>document.removeEventListener(Vn,E)},[]),b.jsx(rt.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:nt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:nt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:nt(t.onPointerDownCapture,w.onPointerDownCapture)})});$o.displayName=rh;var ch="DismissableLayerBranch",lh=p.forwardRef((t,e)=>{const n=p.useContext(Uo),s=p.useRef(null),i=it(e,s);return p.useEffect(()=>{const o=s.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(rt.div,{...t,ref:i})});lh.displayName=ch;function uh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!s.current){let c=function(){Ko(oh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);s.current=!1},r=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(r),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function fh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!s.current&&Ko(ah,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Ki(){const t=new CustomEvent(Vn);document.dispatchEvent(t)}function Ko(t,e,n,{discrete:s}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),s?sh(i,o):i.dispatchEvent(o)}var tn="focusScope.autoFocusOnMount",en="focusScope.autoFocusOnUnmount",zi={bubbles:!1,cancelable:!0},dh="FocusScope",zo=p.forwardRef((t,e)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...r}=t,[a,c]=p.useState(null),l=ee(i),u=ee(o),f=p.useRef(null),d=it(e,m=>c(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(s){let m=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:lt(f.current,{select:!0})},y=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||lt(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const T=new MutationObserver(g);return a&&T.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),T.disconnect()}}},[s,a,h.paused]),p.useEffect(()=>{if(a){Gi.add(h);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(tn,zi);a.addEventListener(tn,l),a.dispatchEvent(g),g.defaultPrevented||(hh(vh(Ho(a)),{select:!0}),document.activeElement===m&&lt(a))}return()=>{a.removeEventListener(tn,l),setTimeout(()=>{const g=new CustomEvent(en,zi);a.addEventListener(en,u),a.dispatchEvent(g),g.defaultPrevented||lt(m??document.body,{select:!0}),a.removeEventListener(en,u),Gi.remove(h)},0)}}},[a,l,u,h]);const v=p.useCallback(m=>{if(!n&&!s||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const T=m.currentTarget,[x,S]=mh(T);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&&lt(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),n&&lt(S,{select:!0})):g===T&&m.preventDefault()}},[n,s,h.paused]);return b.jsx(rt.div,{tabIndex:-1,...r,ref:d,onKeyDown:v})});zo.displayName=dh;function hh(t,{select:e=!1}={}){const n=document.activeElement;for(const s of t)if(lt(s,{select:e}),document.activeElement!==n)return}function mh(t){const e=Ho(t),n=Hi(e,t),s=Hi(e.reverse(),t);return[n,s]}function Ho(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Hi(t,e){for(const n of t)if(!ph(n,{upTo:e}))return n}function ph(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function gh(t){return t instanceof HTMLInputElement&&"select"in t}function lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&gh(t)&&e&&t.select()}}var Gi=yh();function yh(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Yi(t,e),t.unshift(e)},remove(e){var n;t=Yi(t,e),(n=t[0])==null||n.resume()}}}function Yi(t,e){const n=[...t],s=n.indexOf(e);return s!==-1&&n.splice(s,1),n}function vh(t){return t.filter(e=>e.tagName!=="A")}var xh="Portal",Go=p.forwardRef((t,e)=>{var a;const{container:n,...s}=t,[i,o]=p.useState(!1);te(()=>o(!0),[]);const r=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return r?er.createPortal(b.jsx(rt.div,{...s,ref:e}),r):null});Go.displayName=xh;function Th(t,e){return p.useReducer((n,s)=>e[n][s]??n,t)}var Ne=t=>{const{present:e,children:n}=t,s=bh(e),i=typeof n=="function"?n({present:s.isPresent}):p.Children.only(n),o=it(s.ref,wh(i));return typeof n=="function"||s.isPresent?p.cloneElement(i,{ref:o}):null};Ne.displayName="Presence";function bh(t){const[e,n]=p.useState(),s=p.useRef(null),i=p.useRef(t),o=p.useRef("none"),r=t?"mounted":"unmounted",[a,c]=Th(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=ue(s.current);o.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=s.current,u=i.current;if(u!==t){const d=o.current,h=ue(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),te(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,f=h=>{const m=ue(s.current).includes(h.animationName);if(h.target===e&&m&&(c("ANIMATION_END"),!i.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=h=>{h.target===e&&(o.current=ue(s.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{s.current=l?getComputedStyle(l):null,n(l)},[])}}function ue(t){return(t==null?void 0:t.animationName)||"none"}function wh(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var nn=0;function Sh(){p.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Xi()),document.body.insertAdjacentElement("beforeend",t[1]??Xi()),nn++,()=>{nn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nn--}},[])}function Xi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Q=function(){return Q=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Q.apply(this,arguments)};function Yo(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function Ah(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,o;s<i;s++)(o||!(s in e))&&(o||(o=Array.prototype.slice.call(e,0,s)),o[s]=e[s]);return t.concat(o||Array.prototype.slice.call(e))}var be="right-scroll-bar-position",we="width-before-scroll-bar",Ph="with-scroll-bars-hidden",Eh="--removed-body-scroll-bar-size";function sn(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Ch(t,e){var n=A.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=e,n.facade}var Dh=typeof window<"u"?p.useLayoutEffect:p.useEffect,qi=new WeakMap;function Mh(t,e){var n=Ch(null,function(s){return t.forEach(function(i){return sn(i,s)})});return Dh(function(){var s=qi.get(n);if(s){var i=new Set(s),o=new Set(t),r=n.current;i.forEach(function(a){o.has(a)||sn(a,null)}),o.forEach(function(a){i.has(a)||sn(a,r)})}qi.set(n,t)},[t]),n}function Rh(t){return t}function Vh(t,e){e===void 0&&(e=Rh);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var r=e(o,s);return n.push(r),function(){n=n.filter(function(a){return a!==r})}},assignSyncMedium:function(o){for(s=!0;n.length;){var r=n;n=[],r.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){s=!0;var r=[];if(n.length){var a=n;n=[],a.forEach(o),r=n}var c=function(){var u=r;r=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){r.push(u),l()},filter:function(u){return r=r.filter(u),n}}}};return i}function Lh(t){t===void 0&&(t={});var e=Vh(null);return e.options=Q({async:!0,ssr:!1},t),e}var Xo=function(t){var e=t.sideCar,n=Yo(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return p.createElement(s,Q({},n))};Xo.isSideCarExport=!0;function Oh(t,e){return t.useMedium(e),Xo}var qo=Lh(),rn=function(){},ke=p.forwardRef(function(t,e){var n=p.useRef(null),s=p.useState({onScrollCapture:rn,onWheelCapture:rn,onTouchMoveCapture:rn}),i=s[0],o=s[1],r=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,v=t.noIsolation,m=t.inert,y=t.allowPinchZoom,g=t.as,T=g===void 0?"div":g,x=t.gapMode,S=Yo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,D=Mh([n,e]),E=Q(Q({},S),i);return p.createElement(p.Fragment,null,u&&p.createElement(w,{sideCar:qo,removeScrollBar:l,shards:f,noRelative:h,noIsolation:v,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),r?p.cloneElement(p.Children.only(a),Q(Q({},E),{ref:D})):p.createElement(T,Q({},E,{className:c,ref:D}),a))});ke.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ke.classNames={fullWidth:we,zeroRight:be};var Nh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kh(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Nh();return e&&t.setAttribute("nonce",e),t}function Ih(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fh(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jh=function(){var t=0,e=null;return{add:function(n){t==0&&(e=kh())&&(Ih(e,n),Fh(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Bh=function(){var t=jh();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Zo=function(){var t=Bh(),e=function(n){var s=n.styles,i=n.dynamic;return t(s,i),null};return e},_h={left:0,top:0,right:0,gap:0},on=function(t){return parseInt(t||"",10)||0},Wh=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],s=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[on(n),on(s),on(i)]},Uh=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _h;var e=Wh(t),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-n+e[2]-e[0])}},$h=Zo(),Ot="data-scroll-locked",Kh=function(t,e,n,s){var i=t.left,o=t.top,r=t.right,a=t.gap;return n===void 0&&(n="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),A=require("react"),Y=require("./constant-B-tpIxtm.cjs"),er=require("react-dom"),On=require("@radix-ui/react-slot");function nr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const p=nr(A),ja=nr(er),sr=A.createContext({});function Me(t){const e=A.useRef(null);return e.current===null&&(e.current=t()),e.current}const Nn=typeof window<"u",kn=Nn?A.useLayoutEffect:A.useEffect,In=A.createContext(null);function Fn(t,e){t.indexOf(e)===-1&&t.push(e)}function jn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const et=(t,e,n)=>n>e?e:n<t?t:n;function cn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ft=()=>{},X=()=>{};process.env.NODE_ENV!=="production"&&(Ft=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(cn(e,n))},X=(t,e,n)=>{if(!t)throw new Error(cn(e,n))});const st={},ir=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function rr(t){return typeof t=="object"&&t!==null}const or=t=>/^0[^.\s]+$/u.test(t);function Bn(t){let e;return()=>(e===void 0&&(e=t()),e)}const W=t=>t,Ba=(t,e)=>n=>e(t(n)),ne=(...t)=>t.reduce(Ba),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class _n{constructor(){this.subscriptions=[]}add(e){return Fn(this.subscriptions,e),()=>jn(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 G=t=>t*1e3,J=t=>t/1e3;function Wn(t,e){return e?t*(1e3/e):0}const ws=new Set;function Re(t,e,n){t||ws.has(e)||(console.warn(cn(e,n)),ws.add(e))}const ar=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,_a=1e-7,Wa=12;function Ua(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ar(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>_a&&++a<Wa);return r}function se(t,e,n,s){if(t===e&&n===s)return W;const i=o=>Ua(o,0,1,t,n);return o=>o===0||o===1?o:ar(i(o),e,s)}const cr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lr=t=>e=>1-t(1-e),ur=se(.33,1.53,.69,.99),Un=lr(ur),fr=cr(Un),dr=t=>(t*=2)<1?.5*Un(t):.5*(2-Math.pow(2,-10*(t-1))),$n=t=>1-Math.sin(Math.acos(t)),hr=lr($n),mr=cr($n),$a=se(.42,0,1,1),Ka=se(0,0,.58,1),pr=se(.42,0,.58,1),za=t=>Array.isArray(t)&&typeof t[0]!="number",gr=t=>Array.isArray(t)&&typeof t[0]=="number",Ss={linear:W,easeIn:$a,easeInOut:pr,easeOut:Ka,circIn:$n,circInOut:mr,circOut:hr,backIn:Un,backInOut:fr,backOut:ur,anticipate:dr},Ha=t=>typeof t=="string",As=t=>{if(gr(t)){X(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return se(e,n,s,i)}else if(Ha(t))return X(Ss[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ss[t];return t},oe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ga(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 c(u){r.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const v=d&&i?n:s;return f&&r.add(u),v.has(u)||v.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(u))}};return l}const Ya=40;function yr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=oe.reduce((x,S)=>(x[S]=Ga(o),x),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:v}=r,m=()=>{const x=st.useManualTiming?i.timestamp:performance.now();n=!1,st.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Ya),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},y=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:oe.reduce((x,S)=>{const w=r[S];return x[S]=(D,E=!1,C=!1)=>(n||y(),w.schedule(D,E,C)),x},{}),cancel:x=>{for(let S=0;S<oe.length;S++)r[oe[S]].cancel(x)},state:i,steps:r}}const{schedule:M,cancel:q,state:k,steps:Fe}=yr(typeof requestAnimationFrame<"u"?requestAnimationFrame:W,!0);let pe;function Xa(){pe=void 0}const _={now:()=>(pe===void 0&&_.set(k.isProcessing||st.useManualTiming?k.timestamp:performance.now()),pe),set:t=>{pe=t,queueMicrotask(Xa)}},vr=t=>e=>typeof e=="string"&&e.startsWith(t),Kn=vr("--"),qa=vr("var(--"),zn=t=>qa(t)?Za.test(t.split("/*")[0].trim()):!1,Za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...jt,transform:t=>et(0,1,t)},ae={...jt,default:1},Kt=t=>Math.round(t*1e5)/1e5,Hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qa(t){return t==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gn=(t,e)=>n=>!!(typeof n=="string"&&Ja.test(n)&&n.startsWith(t)||e&&!Qa(n)&&Object.prototype.hasOwnProperty.call(n,e)),xr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},tc=t=>et(0,255,t),je={...jt,transform:t=>Math.round(tc(t))},pt={test:Gn("rgb","red"),parse:xr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+Kt(Xt.transform(s))+")"};function ec(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 ln={test:Gn("#"),parse:ec,transform:pt.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),at=ie("deg"),tt=ie("%"),P=ie("px"),nc=ie("vh"),sc=ie("vw"),Ps={...tt,parse:t=>tt.parse(t)/100,transform:t=>tt.transform(t*100)},Pt={test:Gn("hsl","hue"),parse:xr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+tt.transform(Kt(e))+", "+tt.transform(Kt(n))+", "+Kt(Xt.transform(s))+")"},N={test:t=>pt.test(t)||ln.test(t)||Pt.test(t),parse:t=>pt.test(t)?pt.parse(t):Pt.test(t)?Pt.parse(t):ln.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):Pt.transform(t),getAnimatableNone:t=>{const e=N.parse(t);return e.alpha=0,N.transform(e)}},ic=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rc(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Hn))==null?void 0:e.length)||0)+(((n=t.match(ic))==null?void 0:n.length)||0)>0}const Tr="number",br="color",oc="var",ac="var(",Es="${}",cc=/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 qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(cc,c=>(N.test(c)?(s.color.push(o),i.push(br),n.push(N.parse(c))):c.startsWith(ac)?(s.var.push(o),i.push(oc),n.push(c)):(s.number.push(o),i.push(Tr),n.push(parseFloat(c))),++o,Es)).split(Es);return{values:n,split:a,indexes:s,types:i}}function wr(t){return qt(t).values}function Sr(t){const{split:e,types:n}=qt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Tr?o+=Kt(i[r]):a===br?o+=N.transform(i[r]):o+=i[r]}return o}}const lc=t=>typeof t=="number"?0:N.test(t)?N.getAnimatableNone(t):t;function uc(t){const e=wr(t);return Sr(t)(e.map(lc))}const ut={test:rc,parse:wr,createTransformer:Sr,getAnimatableNone:uc};function Be(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 fc({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,c=2*n-a;i=Be(c,a,t+1/3),o=Be(c,a,t),r=Be(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Se(t,e){return n=>n>0?e:t}const V=(t,e,n)=>t+(e-t)*n,_e=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},dc=[ln,pt,Pt],hc=t=>dc.find(e=>e.test(t));function Cs(t){const e=hc(t);if(Ft(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Pt&&(n=fc(n)),n}const Ds=(t,e)=>{const n=Cs(t),s=Cs(e);if(!n||!s)return Se(t,e);const i={...n};return o=>(i.red=_e(n.red,s.red,o),i.green=_e(n.green,s.green,o),i.blue=_e(n.blue,s.blue,o),i.alpha=V(n.alpha,s.alpha,o),pt.transform(i))},un=new Set(["none","hidden"]);function mc(t,e){return un.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function pc(t,e){return n=>V(t,e,n)}function Yn(t){return typeof t=="number"?pc:typeof t=="string"?zn(t)?Se:N.test(t)?Ds:vc:Array.isArray(t)?Ar:typeof t=="object"?N.test(t)?Ds:gc:Se}function Ar(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Yn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function gc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Yn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function yc(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 vc=(t,e)=>{const n=ut.createTransformer(e),s=qt(t),i=qt(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?un.has(t)&&!i.values.length||un.has(e)&&!s.values.length?mc(t,e):ne(Ar(yc(s,i),i.values),n):(Ft(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Se(t,e))};function Pr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Yn(t)(t,e)}const xc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>q(e),now:()=>k.isProcessing?k.timestamp:_.now()}},Er=(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)})`},Ae=2e4;function Xn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ae;)e+=n,s=t.next(e);return e>=Ae?1/0:e}function Tc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Xn(s),Ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const bc=5;function Cr(t,e,n){const s=Math.max(e-bc,0);return Wn(n-t(s),e-s)}const R={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},We=.001;function wc({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o;Ft(t<=G(R.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=et(R.minDamping,R.maxDamping,r),t=et(R.minDuration,R.maxDuration,J(t)),r<1?(i=l=>{const u=l*r,f=u*t,d=u-n,h=fn(l,r),v=Math.exp(-f);return We-d/h*v},o=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=fn(Math.pow(l,2),r);return(-i(l)+We>0?-1:1)*((d-h)*v)/m}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-We+u*f},o=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=Ac(i,o,a);if(t=G(t),isNaN(c))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const Sc=12;function Ac(t,e,n){let s=n;for(let i=1;i<Sc;i++)s=s-t(s)/e(s);return s}function fn(t,e){return t*Math.sqrt(1-e*e)}const Pc=["duration","bounce"],Ec=["stiffness","damping","mass"];function Ms(t,e){return e.some(n=>t[n]!==void 0)}function Cc(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Ms(t,Ec)&&Ms(t,Pc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*et(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=wc(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Pe(t=R.visualDuration,e=R.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:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=Cc({...n,velocity:-J(n.velocity||0)}),v=d||0,m=l/(2*Math.sqrt(c*u)),y=r-o,g=J(Math.sqrt(c/u)),T=Math.abs(y)<5;s||(s=T?R.restSpeed.granular:R.restSpeed.default),i||(i=T?R.restDelta.granular:R.restDelta.default);let x;if(m<1){const w=fn(g,m);x=D=>{const E=Math.exp(-m*g*D);return r-E*((v+m*g*y)/w*Math.sin(w*D)+y*Math.cos(w*D))}}else if(m===1)x=w=>r-Math.exp(-g*w)*(y+(v+g*y)*w);else{const w=g*Math.sqrt(m*m-1);x=D=>{const E=Math.exp(-m*g*D),C=Math.min(w*D,300);return r-E*((v+m*g*y)*Math.sinh(C)+w*y*Math.cosh(C))/w}}const S={calculatedDuration:h&&f||null,next:w=>{const D=x(w);if(h)a.done=w>=f;else{let E=w===0?v:0;m<1&&(E=w===0?G(v):Cr(x,w,D));const C=Math.abs(E)<=s,O=Math.abs(r-D)<=i;a.done=C&&O}return a.value=a.done?r:D,a},toString:()=>{const w=Math.min(Xn(S),Ae),D=Er(E=>S.next(w*E).value,w,30);return w+"ms "+D},toTransition:()=>{}};return S}Pe.applyToOptions=t=>{const e=Tc(t,100,Pe);return t.ease=e.ease,t.duration=G(e.duration),t.type="keyframes",t};function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,v=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*e;const y=f+m,g=r===void 0?y:r(y);g!==y&&(m=g-f);const T=C=>-m*Math.exp(-C/s),x=C=>g+T(C),S=C=>{const O=T(C),F=x(C);d.done=Math.abs(O)<=l,d.value=d.done?g:F};let w,D;const E=C=>{h(d.value)&&(w=C,D=Pe({keyframes:[d.value,v(d.value)],velocity:Cr(x,C,d.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return E(0),{calculatedDuration:null,next:C=>{let O=!1;return!D&&w===void 0&&(O=!0,S(C),E(C)),w!==void 0&&C>=w?D.next(C-w):(!O&&S(C),d)}}}function Dc(t,e,n){const s=[],i=n||st.mix||Pr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||W:e;a=ne(c,a)}s.push(a)}return s}function qn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(X(o===e.length,"Both input and output ranges must be the same length","range-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=Dc(e,s,i),c=a.length,l=u=>{if(r&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=kt(t[f],t[f+1],u);return a[f](d)};return n?u=>l(et(t[0],t[o-1],u)):l}function Mc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(V(n,1,i))}}function Dr(t){const e=[0];return Mc(e,t.length-1),e}function Rc(t,e){return t.map(n=>n*e)}function Vc(t,e){return t.map(()=>e||pr).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=za(s)?s.map(As):As(s),o={done:!1,value:e[0]},r=Rc(n&&n.length===e.length?n:Dr(e),t),a=qn(r,e,{ease:Array.isArray(i)?i:Vc(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Lc=t=>t!==null;function Zn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Lc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Oc={decay:dn,inertia:dn,tween:Et,keyframes:Et,spring:Pe};function Mr(t){typeof t.type=="string"&&(t.type=Oc[t.type])}class Qn{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 Nc=t=>t/100;class Jn extends Qn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Mr(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Et;process.env.NODE_ENV!=="production"&&c!==Et&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=ne(Nc,Pr(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Xn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:v,onUpdate:m,finalKeyframe:y}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,S=s;if(f){const C=Math.min(this.currentTime,i)/a;let O=Math.floor(C),F=C%1;!F&&C>=1&&(F=1),F===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(S=r)),x=et(0,1,F)*a}const w=T?{done:!1,value:u[0]}:S.next(x);o&&(w.value=o(w.value));let{done:D}=w;!T&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return E&&v!==dn&&(w.value=Zn(u,this.options,y,this.speed)),m&&m(w.value),E&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return J(this.calculatedDuration)}get time(){return J(this.currentTime)}set time(e){var n;e=G(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(_.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=xc,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);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(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function kc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const gt=t=>t*180/Math.PI,hn=t=>{const e=gt(Math.atan2(t[1],t[0]));return mn(e)},Ic={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:hn,rotateZ:hn,skewX:t=>gt(Math.atan(t[1])),skewY:t=>gt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},mn=t=>(t=t%360,t<0&&(t+=360),t),Rs=hn,Vs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ls=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Fc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vs,scaleY:Ls,scale:t=>(Vs(t)+Ls(t))/2,rotateX:t=>mn(gt(Math.atan2(t[6],t[5]))),rotateY:t=>mn(gt(Math.atan2(-t[2],t[0]))),rotateZ:Rs,rotate:Rs,skewX:t=>gt(Math.atan(t[4])),skewY:t=>gt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function pn(t){return t.includes("scale")?1:0}function gn(t,e){if(!t||t==="none")return pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Fc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ic,i=a}if(!i)return pn(e);const o=s[e],r=i[1].split(",").map(Bc);return typeof o=="function"?o(r):r[o]}const jc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return gn(n,e)};function Bc(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Os=t=>t===jt||t===P,_c=new Set(["x","y","z"]),Wc=Bt.filter(t=>!_c.has(t));function Uc(t){const e=[];return Wc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const yt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>gn(e,"x"),y:(t,{transform:e})=>gn(e,"y")};yt.translateX=yt.x;yt.translateY=yt.y;const vt=new Set;let yn=!1,vn=!1,xn=!1;function Rr(){if(vn){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Uc(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])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}vn=!1,yn=!1,vt.forEach(t=>t.complete(xn)),vt.clear()}function Vr(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function $c(){xn=!0,Vr(),Rr(),xn=!1}class ts{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?(vt.add(this),yn||(yn=!0,M.read(Vr),M.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0: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])}kc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Kc=t=>t.startsWith("--");function zc(t,e,n){Kc(e)?t.style.setProperty(e,n):t.style[e]=n}const Lr=Bn(()=>window.ScrollTimeline!==void 0),Hc={};function Gc(t,e){const n=Bn(t);return()=>Hc[e]??n()}const Or=Gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$t=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ns={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Nr(t,e){if(t)return typeof t=="function"?Or()?Er(t,e):"ease-out":gr(t)?$t(t):Array.isArray(t)?t.map(n=>Nr(n,e)||Ns.easeOut):Ns[t]}function Yc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Nr(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function kr(t){return typeof t=="function"&&"applyToOptions"in t}function Xc({type:t,...e}){return kr(t)&&Or()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class qc extends Qn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,X(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Xc(e);this.animation=Yc(n,s,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Zn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zc(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}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(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return J(Number(e))}get time(){return J(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=G(e)}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 Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Lr()?(this.animation.timeline=e,W):n(this)}}const Ir={anticipate:dr,backInOut:fr,circInOut:mr};function Zc(t){return t in Ir}function Qc(t){typeof t.ease=="string"&&Zc(t.ease)&&(t.ease=Ir[t.ease])}const ks=10;class Jc extends qc{constructor(e){Qc(e),Mr(e),super(e),e.startTime&&(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 Jn({...r,autoplay:!1}),c=G(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-ks).value,a.sample(c).value,ks),a.stop()}}const Is=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ut.test(t)||t==="0")&&!t.startsWith("url("));function tl(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 el(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=Is(i,e),a=Is(o,e);return Ft(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:tl(t)||(n==="spring"||kr(n))&&s}function Tn(t){t.duration=0,t.type}const nl=new Set(["opacity","clipPath","filter","transform"]),sl=Bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function il(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return sl()&&n&&nl.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const rl=40;class ol extends Qn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){var v;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:l,element:u,...f},h=(u==null?void 0:u.KeyframeResolver)||ts;this.keyframeResolver=new h(a,(m,y,g)=>this.onKeyframesResolved(m,y,d,!g),c,l,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=_.now(),el(e,o,r,a)||((st.instantAnimations||!c)&&(u==null||u(Zn(e,s,n))),e[0]=e[e.length-1],Tn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>rl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!l&&il(d)?new Jc({...d,element:d.motionValue.owner.current}):new Jn(d);h.finished.then(()=>this.notifyFinished()).catch(W),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$c()),this._animation}get duration(){return this.animation.duration}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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const al=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cl(t){const e=al.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const ll=4;function Fr(t,e,n=1){X(n<=ll,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=cl(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ir(r)?parseFloat(r):r}return zn(i)?Fr(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const jr=new Set(["width","height","top","left","right","bottom",...Bt]),ul={test:t=>t==="auto",parse:t=>t},Br=t=>e=>e.test(t),_r=[jt,P,tt,at,sc,nc,ul],Fs=t=>_r.find(Br(t));function fl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||or(t):!0}const dl=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Hn)||[];if(!s)return t;const i=n.replace(s,"");let o=dl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ml=/\b([a-z-]*)\(.*?\)/gu,bn={...ut,getAnimatableNone:t=>{const e=t.match(ml);return e?e.map(hl).join(" "):t}},js={...jt,transform:Math.round},pl={rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:at,skewX:at,skewY:at,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:Ps,originY:Ps,originZ:P},ns={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...pl,zIndex:js,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:js},gl={...ns,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:bn,WebkitFilter:bn},Wr=t=>gl[t];function Ur(t,e){let n=Wr(t);return n!==bn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const yl=new Set(["auto","none","0"]);function vl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!yl.has(o)&&qt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ur(n,i)}class xl extends ts{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 l=e[c];if(typeof l=="string"&&(l=l.trim(),zn(l))){const u=Fr(l,n.current);u!==void 0&&(e[c]=u),c===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(s)||e.length!==2)return;const[i,o]=e,r=Fs(i),a=Fs(o);if(r!==a)if(Os(r)&&Os(a))for(let c=0;c<e.length;c++){const l=e[c];typeof l=="string"&&(e[c]=parseFloat(l))}else yt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||fl(e[i]))&&s.push(i);s.length&&vl(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=yt[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(){var a;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]=yt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function $r(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Kr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function zr(t){return rr(t)&&"offsetHeight"in t}const Bs=30,Tl=t=>!isNaN(parseFloat(t)),zt={current:void 0};class bl{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Tl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Re(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new _n);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.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(){var e;(e=this.events.change)==null||e.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 zt.current&&zt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bs);return Wn(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function H(t,e){return new bl(t,e)}const{schedule:ss}=yr(queueMicrotask,!1),z={x:!1,y:!1};function Hr(){return z.x||z.y}function wl(t){return t==="x"||t==="y"?z[t]?null:(z[t]=!0,()=>{z[t]=!1}):z.x||z.y?null:(z.x=z.y=!0,()=>{z.x=z.y=!1})}function Gr(t,e){const n=$r(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function _s(t){return!(t.pointerType==="touch"||Hr())}function Sl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{if(!_s(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{_s(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Yr=(t,e)=>e?t===e?!0:Yr(t,e.parentElement):!1,is=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pl(t){return Al.has(t.tagName)||t.tabIndex!==-1}const ge=new WeakSet;function Ws(t){return e=>{e.key==="Enter"&&t(e)}}function Ue(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const El=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ws(()=>{if(ge.has(n))return;Ue(n,"down");const i=Ws(()=>{Ue(n,"up")}),o=()=>Ue(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 Us(t){return is(t)&&!Hr()}function Cl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{const c=a.currentTarget;if(!Us(a))return;ge.add(c);const l=e(c,a),u=(h,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ge.has(c)&&ge.delete(c),Us(h)&&typeof l=="function"&&l(h,{success:v})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||Yr(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),zr(a)&&(a.addEventListener("focus",l=>El(l,i)),!Pl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function rs(t){return rr(t)&&"ownerSVGElement"in t}const ye=new WeakMap;let ct;const Xr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:rs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Dl=Xr("inline","width","offsetWidth"),Ml=Xr("block","height","offsetHeight");function Rl({target:t,borderBoxSize:e}){var n;(n=ye.get(t))==null||n.forEach(s=>{s(t,{get width(){return Dl(t,e)},get height(){return Ml(t,e)}})})}function Vl(t){t.forEach(Rl)}function Ll(){typeof ResizeObserver>"u"||(ct=new ResizeObserver(Vl))}function Ol(t,e){ct||Ll();const n=$r(t);return n.forEach(s=>{let i=ye.get(s);i||(i=new Set,ye.set(s,i)),i.add(e),ct==null||ct.observe(s)}),()=>{n.forEach(s=>{const i=ye.get(s);i==null||i.delete(e),i!=null&&i.size||ct==null||ct.unobserve(s)})}}const ve=new Set;let Ct;function Nl(){Ct=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ve.forEach(e=>e(t))},window.addEventListener("resize",Ct)}function kl(t){return ve.add(t),Ct||Nl(),()=>{ve.delete(t),!ve.size&&typeof Ct=="function"&&(window.removeEventListener("resize",Ct),Ct=void 0)}}function Il(t,e){return typeof t=="function"?kl(t):Ol(t,e)}function qr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return M.preUpdate(s,!0),()=>q(s)}function Fl(t){return rs(t)&&t.tagName==="svg"}function jl(...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=qn(i,o,r);return e?a(s):a}const j=t=>!!(t&&t.getVelocity),Bl=[..._r,N,ut],_l=t=>Bl.find(Br(t)),os=A.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Wl(t=!0){const e=A.useContext(In);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=A.useId();A.useEffect(()=>{if(t)return i(o)},[t]);const r=A.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Zr=A.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"]},It={};for(const t in $s)It[t]={isEnabled:e=>$s[t].some(n=>!!e[n])};function Ul(t){for(const e in t)It[e]={...It[e],...t[e]}}const $l=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","ignoreStrict","viewport"]);function Ee(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$l.has(t)}let Qr=t=>!Ee(t);function Kl(t){typeof t=="function"&&(Qr=e=>e.startsWith("on")?!Ee(e):t(e))}try{Kl(require("@emotion/is-prop-valid").default)}catch{}function zl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Qr(i)||n===!0&&Ee(i)||!e&&!Ee(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ve=A.createContext({});function Le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Zt(t){return typeof t=="string"||Array.isArray(t)}const as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cs=["initial",...as];function Oe(t){return Le(t.animate)||cs.some(e=>Zt(t[e]))}function Jr(t){return!!(Oe(t)||t.variants)}function Hl(t,e){if(Oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Zt(n)?n:void 0,animate:Zt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Gl(t){const{initial:e,animate:n}=Hl(t,A.useContext(Ve));return A.useMemo(()=>({initial:e,animate:n}),[Ks(e),Ks(n)])}function Ks(t){return Array.isArray(t)?t.join(" "):t}const Qt={};function Yl(t){for(const e in t)Qt[e]=t[e],Kn(e)&&(Qt[e].isCSSVariable=!0)}function to(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const Xl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ql=Bt.length;function Zl(t,e,n){let s="",i=!0;for(let o=0;o<ql;o++){const r=Bt[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(r.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Kr(a,ns[r]);if(!c){i=!1;const u=Xl[r]||r;s+=`${u}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ls(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const l=e[c];if(_t.has(c)){r=!0;continue}else if(Kn(c)){i[c]=l;continue}else{const u=Kr(l,ns[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(e.transform||(r||n?s.transform=Zl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${l} ${u}`}}const us=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eo(t,e,n){for(const s in e)!j(e[s])&&!to(s,n)&&(t[s]=e[s])}function Ql({transformTemplate:t},e){return A.useMemo(()=>{const n=us();return ls(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Jl(t,e){const n=t.style||{},s={};return eo(s,n,t),Object.assign(s,Ql(t,e)),s}function tu(t,e){const n={},s=Jl(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 eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},nu={offset:"strokeDashoffset",array:"strokeDasharray"};function su(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?eu:nu;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function no(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,l,u){if(ls(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&su(f,i,o,r,!1)}const so=()=>({...us(),attrs:{}}),io=t=>typeof t=="string"&&t.toLowerCase()==="svg";function iu(t,e,n,s){const i=A.useMemo(()=>{const o=so();return no(o,e,io(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};eo(o,t.style,t),i.style={...o,...i.style}}return i}const ru=["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 fs(t){return typeof t!="string"||t.includes("-")?!1:!!(ru.indexOf(t)>-1||/[A-Z]/u.test(t))}function ou(t,e,n,{latestValues:s},i,o=!1){const a=(fs(t)?iu:tu)(e,s,i,t),c=zl(e,typeof t=="string",o),l=t!==A.Fragment?{...c,...a,ref:n}:{},{children:u}=e,f=A.useMemo(()=>j(u)?u.get():u,[u]);return A.createElement(t,{...l,children:f})}function zs(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ds(t,e,n,s){if(typeof e=="function"){const[i,o]=zs(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]=zs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function xe(t){return j(t)?t.get():t}function au({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:cu(n,s,i,t),renderState:e()}}function cu(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=xe(o[d]);let{initial:r,animate:a}=t;const c=Oe(t),l=Jr(t);e&&l&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const f=u?a:r;if(f&&typeof f!="boolean"&&!Le(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const v=ds(t,d[h]);if(v){const{transitionEnd:m,transition:y,...g}=v;for(const T in g){let x=g[T];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(i[T]=x)}for(const T in m)i[T]=m[T]}}}return i}const ro=t=>(e,n)=>{const s=A.useContext(Ve),i=A.useContext(In),o=()=>au(t,e,s,i);return n?o():Me(o)};function hs(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(j(s[r])||e.style&&j(e.style[r])||to(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const lu=ro({scrapeMotionValuesFromProps:hs,createRenderState:us});function oo(t,e,n){const s=hs(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const uu=ro({scrapeMotionValuesFromProps:oo,createRenderState:so}),fu=Symbol.for("motionComponentSymbol");function Dt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function du(t,e,n){return A.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Dt(n)&&(n.current=s))},[e])}const ms=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hu="framerAppearId",ao="data-"+ms(hu),co=A.createContext({});function mu(t,e,n,s,i){var m,y;const{visualElement:o}=A.useContext(Ve),r=A.useContext(Zr),a=A.useContext(In),c=A.useContext(os).reducedMotion,l=A.useRef(null);s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=A.useContext(co);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&pu(l.current,n,i,f);const d=A.useRef(!1);A.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[ao],v=A.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,h)));return kn(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),v.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!v.current&&u.animationState&&u.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,h)}),v.current=!1),u.enteringChildren=void 0)}),u}function pu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:lo(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Dt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:l})}function lo(t){if(t)return t.options.allowProjection!==!1?t.projection:lo(t.parent)}function $e(t,{forwardMotionProps:e=!1}={},n,s){n&&Ul(n);const i=fs(t)?uu:lu;function o(a,c){let l;const u={...A.useContext(os),...a,layoutId:gu(a)},{isStatic:f}=u,d=Gl(a),h=i(a,f);if(!f&&Nn){yu(u,n);const v=vu(u);l=v.MeasureLayout,d.visualElement=mu(t,h,u,s,v.ProjectionNode)}return b.jsxs(Ve.Provider,{value:d,children:[l&&d.visualElement?b.jsx(l,{visualElement:d.visualElement,...u}):null,ou(t,a,du(h,d.visualElement,c),h,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=A.forwardRef(o);return r[fu]=t,r}function gu({layoutId:t}){const e=A.useContext(sr).id;return e&&t!==void 0?e+"-"+t:t}function yu(t,e){const n=A.useContext(Zr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Ft(!1,s,"lazy-strict-mode"):X(!1,s,"lazy-strict-mode")}}function vu(t){const{drag:e,layout:n}=It;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xu(t,e){if(typeof Proxy>"u")return $e;const n=new Map,s=(o,r)=>$e(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Re(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,$e(r,void 0,t,e)),n.get(r))})}function uo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bu(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 Ke(t){return t===void 0||t===1}function wn({scale:t,scaleX:e,scaleY:n}){return!Ke(t)||!Ke(e)||!Ke(n)}function mt(t){return wn(t)||fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fo(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function Gs(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function Sn(t,e=0,n=1,s,i){t.min=Gs(t.min,e,n,s,i),t.max=Gs(t.max,e,n,s,i)}function ho(t,{x:e,y:n}){Sn(t.x,e.translate,e.scale,e.originPoint),Sn(t.y,n.translate,n.scale,n.originPoint)}const Ys=.999999999999,Xs=1.0000000000001;function wu(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:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Rt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ho(t,r)),s&&mt(o.latestValues)&&Rt(t,o.latestValues))}e.x<Xs&&e.x>Ys&&(e.x=1),e.y<Xs&&e.y>Ys&&(e.y=1)}function Mt(t,e){t.min=t.min+e,t.max=t.max+e}function qs(t,e,n,s,i=.5){const o=V(t.min,t.max,i);Sn(t,e,n,o,s)}function Rt(t,e){qs(t.x,e.x,e.scaleX,e.scale,e.originX),qs(t.y,e.y,e.scaleY,e.scale,e.originY)}function mo(t,e){return uo(bu(t.getBoundingClientRect(),e))}function Su(t,e,n){const s=mo(t,n),{scroll:i}=e;return i&&(Mt(s.x,i.offset.x),Mt(s.y,i.offset.y)),s}const Zs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vt=()=>({x:Zs(),y:Zs()}),Qs=()=>({min:0,max:0}),L=()=>({x:Qs(),y:Qs()}),An={current:null},po={current:!1};function Au(){if(po.current=!0,!!Nn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>An.current=t.matches;t.addEventListener("change",e),e()}else An.current=!1}const Pu=new WeakMap;function Eu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(j(i))t.addValue(s,i);else if(j(o))t.addValue(s,H(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,H(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ts,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=_.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Oe(n),this.isVariantNode=Jr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&j(h)&&h.set(c[d])}}mount(e){var n;this.current=e,Pu.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((s,i)=>this.bindToMotionValue(i,s)),po.current||Au(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:An.current,process.env.NODE_ENV!=="production"&&Re(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}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 It){const n=It[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):L()}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<Js.length;s++){const i=Js[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=Eu(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=H(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"&&(ir(s)||or(s))?s=parseFloat(s):!_l(s)&&ut.test(n)&&(s=Ur(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ds(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(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 _n),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ss.render(this.render)}}class go extends Cu{constructor(){super(...arguments),this.KeyframeResolver=xl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[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;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function yo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Du(t){return window.getComputedStyle(t)}class Mu extends go{constructor(){super(...arguments),this.type="html",this.renderInstance=yo}readValueFromInstance(e,n){var s;if(_t.has(n))return(s=this.projection)!=null&&s.isProjecting?pn(n):jc(e,n);{const i=Du(e),o=(Kn(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mo(e,n)}build(e,n,s){ls(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return hs(e,n,s)}}const vo=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"]);function Ru(t,e,n,s){yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(vo.has(i)?i:ms(i),e.attrs[i])}class Vu extends go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=Wr(n);return s&&s.default||0}return n=vo.has(n)?n:ms(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return oo(e,n,s)}build(e,n,s){no(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Ru(e,n,s,i)}mount(e){this.isSVGTag=io(e.tagName),super.mount(e)}}const Lu=(t,e)=>fs(t)?new Vu(e):new Mu(e,{allowProjection:t!==A.Fragment});function Lt(t,e,n){const s=t.getProps();return ds(s,e,n!==void 0?n:s.custom,t)}const Pn=t=>Array.isArray(t);function Ou(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,H(n))}function Nu(t){return Pn(t)?t[t.length-1]||0:t}function ku(t,e){const n=Lt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Nu(o[r]);Ou(t,r,a)}}function Iu(t){return!!(j(t)&&t.add)}function En(t,e){const n=t.getValue("willChange");if(Iu(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function xo(t){return t.props[ao]}const Fu=t=>t!==null;function ju(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Fu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Bu={type:"spring",stiffness:500,damping:25,restSpeed:10},_u=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wu={type:"keyframes",duration:.8},Uu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$u=(t,{keyframes:e})=>e.length>2?Wu:_t.has(t)?t.startsWith("scale")?_u(e[1]):Bu:Uu;function Ku({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ps=(t,e,n,s={},i,o)=>r=>{const a=es(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-G(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ku(a)||Object.assign(u,$u(t,u)),u.duration&&(u.duration=G(u.duration)),u.repeatDelay&&(u.repeatDelay=G(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Tn(u),u.delay===0&&(f=!0)),(st.instantAnimations||st.skipAnimations)&&(f=!0,Tn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=ju(u.keyframes,a);if(d!==void 0){M.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Jn(u):new ol(u)};function zu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function To(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const c=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const f=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||l&&zu(l,u))continue;const h={delay:n,...es(o||{},u)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===v&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const g=xo(t);if(g){const T=window.MotionHandoffAnimation(g,u,M);T!==null&&(h.startTime=T,m=!0)}}En(t,u),f.start(ps(u,f,d,t.shouldReduceMotion&&jr.has(u)?{type:!1}:h,t,m));const y=f.animation;y&&c.push(y)}return r&&Promise.all(c).then(()=>{M.update(()=>{r&&ku(t,r)})}),c}function bo(t,e,n,s=0,i=1){const o=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Cn(t,e,n={}){var c;const s=Lt(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(To(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return Hu(t,e,l,u,f,d,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 Hu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Cn(c,e,{...r,delay:n+(typeof s=="function"?0:s)+bo(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function Gu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Cn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Cn(t,e,n);else{const i=typeof e=="function"?Lt(t,e,n.custom):e;s=Promise.all(To(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function wo(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 Yu=cs.length;function So(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?So(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Yu;n++){const s=cs[n],i=t.props[s];(Zt(i)||i===!1)&&(e[s]=i)}return e}const Xu=[...as].reverse(),qu=as.length;function Zu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Gu(t,n,s)))}function Qu(t){let e=Zu(t),n=ti(),s=!0;const i=c=>(l,u)=>{var d;const f=Lt(t,u,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:v,...m}=f;l={...l,...m,...v}}return l};function o(c){e=c(t)}function r(c){const{props:l}=t,u=So(t.parent)||{},f=[],d=new Set;let h={},v=1/0;for(let y=0;y<qu;y++){const g=Xu[y],T=n[g],x=l[g]!==void 0?l[g]:u[g],S=Zt(x),w=g===c?T.isActive:null;w===!1&&(v=y);let D=x===u[g]&&x!==l[g]&&S;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&w===null||!x&&!T.prevProp||Le(x)||typeof x=="boolean")continue;const E=Ju(T.prevProp,x);let C=E||g===c&&T.isActive&&!D&&S||y>v&&S,O=!1;const F=Array.isArray(x)?x:[x];let Tt=F.reduce(i(g),{});w===!1&&(Tt={});const{prevResolvedValues:xs={}}=T,Ia={...xs,...Tt},Ts=I=>{C=!0,d.has(I)&&(O=!0,d.delete(I)),T.needsAnimating[I]=!0;const U=t.getValue(I);U&&(U.liveStyle=!1)};for(const I in Ia){const U=Tt[I],dt=xs[I];if(h.hasOwnProperty(I))continue;let bt=!1;Pn(U)&&Pn(dt)?bt=!wo(U,dt):bt=U!==dt,bt?U!=null?Ts(I):d.add(I):U!==void 0&&d.has(I)?Ts(I):T.protectedKeys[I]=!0}T.prevProp=x,T.prevResolvedValues=Tt,T.isActive&&(h={...h,...Tt}),s&&t.blockInitialAnimation&&(C=!1);const bs=D&&E;C&&(!bs||O)&&f.push(...F.map(I=>{const U={type:g};if(typeof I=="string"&&s&&!bs&&t.manuallyAnimateOnMount&&t.parent){const{parent:dt}=t,bt=Lt(dt,I);if(dt.enteringChildren&&bt){const{delayChildren:Fa}=bt.transition||{};U.delay=bo(dt.enteringChildren,t,Fa)}}return{animation:I,options:U}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const g=Lt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(y.transition=g.transition)}d.forEach(g=>{const T=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=T??null}),f.push({animation:y})}let m=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(f):Promise.resolve()}function a(c,l){var f;if(n[c].isActive===l)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=r(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ti(),s=!0}}}function Ju(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!wo(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ti(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tf extends ft{constructor(e){super(e),e.animationState||(e.animationState=Qu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Le(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ef=0;class nf extends ft{constructor(){super(...arguments),this.id=ef++}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;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const sf={animation:{Feature:tf},exit:{Feature:nf}};function Jt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function re(t){return{point:{x:t.pageX,y:t.pageY}}}const rf=t=>e=>is(e)&&t(e,re(e));function Ht(t,e,n,s){return Jt(t,e,rf(n),s)}const Ao=1e-4,of=1-Ao,af=1+Ao,Po=.01,cf=0-Po,lf=0+Po;function B(t){return t.max-t.min}function uf(t,e,n){return Math.abs(t-e)<=n}function ei(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=B(n)/B(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=of&&t.scale<=af||isNaN(t.scale))&&(t.scale=1),(t.translate>=cf&&t.translate<=lf||isNaN(t.translate))&&(t.translate=0)}function Gt(t,e,n,s){ei(t.x,e.x,n.x,s?s.originX:void 0),ei(t.y,e.y,n.y,s?s.originY:void 0)}function ni(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function ff(t,e,n){ni(t.x,e.x,n.x),ni(t.y,e.y,n.y)}function si(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function Yt(t,e,n){si(t.x,e.x,n.x),si(t.y,e.y,n.y)}function K(t){return[t("x"),t("y")]}const Eo=({current:t})=>t?t.ownerDocument.defaultView:null,ii=(t,e)=>Math.abs(t-e);function df(t,e){const n=ii(t.x,e.x),s=ii(t.y,e.y);return Math.sqrt(n**2+s**2)}class Co{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=He(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=df(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:m}=d,{timestamp:y}=k;this.history.push({...m,timestamp:y});const{onStart:g,onMove:T}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ze(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:v,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=He(d.type==="pointercancel"?this.lastMoveEventInfo:ze(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,g),m&&m(d,g)},!is(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=re(e),c=ze(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=k;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(e,He(c,this.history)),this.removeListeners=ne(Ht(this.contextWindow,"pointermove",this.handlePointerMove),Ht(this.contextWindow,"pointerup",this.handlePointerUp),Ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function ze(t,e){return e?{point:e(t.point)}:t}function ri(t,e){return{x:t.x-e.x,y:t.y-e.y}}function He({point:t},e){return{point:t,delta:ri(t,Do(e)),offset:ri(t,hf(e)),velocity:mf(e,.1)}}function hf(t){return t[0]}function Do(t){return t[t.length-1]}function mf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Do(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const o=J(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 pf(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function oi(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 gf(t,{top:e,left:n,bottom:s,right:i}){return{x:oi(t.x,n,i),y:oi(t.y,e,s)}}function ai(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 yf(t,e){return{x:ai(t.x,e.x),y:ai(t.y,e.y)}}function vf(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=kt(e.min,e.max-s,t.min):s>i&&(n=kt(t.min,t.max-i,e.min)),et(0,1,n)}function xf(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 Dn=.35;function Tf(t=Dn){return t===!1?t=0:t===!0&&(t=Dn),{x:ci(t,"left","right"),y:ci(t,"top","bottom")}}function ci(t,e,n){return{min:li(t,e),max:li(t,n)}}function li(t,e){return typeof t=="number"?t:t[e]||0}const bf=new WeakMap;class wf{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=L(),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=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(re(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wl(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(g=>{let T=this.getAxisMotionValue(g).get()||0;if(tt.test(T)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[g];S&&(T=B(S)*(parseFloat(T)/100))}}this.originPoint[g]=T}),m&&M.postRender(()=>m(f,d)),En(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=d;if(v&&this.currentDirection===null){this.currentDirection=Sf(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),y&&y(f,d)},c=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>K(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Co(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Eo(this.visualElement)})}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&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ce(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=pf(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Dt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=gf(s.layoutBox,e):this.constraints=!1,this.elastic=Tf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&K(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=xf(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Dt(e))return!1;const s=e.current;X(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Su(s,i.root,this.visualElement.getTransformPagePoint());let r=yf(i.layout.layoutBox,o);if(n){const a=n(Tu(r));this.hasMutatedConstraints=!!a,a&&(r=uo(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=K(u=>{if(!ce(u,n,this.currentDirection))return;let f=c&&c[u]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,v={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,v)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return En(this.visualElement,e),s.start(ps(e,s,0,n,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){K(n=>{const{drag:s}=this.getProps();if(!ce(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];o.set(e[n]-V(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Dt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const c=a.get();i[r]=vf({min:c,max:c},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.resolveConstraints(),K(r=>{if(!ce(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:l}=this.constraints[r];a.set(V(c,l,i[r]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const e=this.visualElement.current,n=Ht(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Dt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Jt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(K(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Dn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ce(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Af extends ft{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new wf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}unmount(){this.removeGroupControls(),this.removeListeners()}}const ui=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class Pf extends ft{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new Co(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Eo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ui(e),onStart:ui(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ht(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Te={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=fi(t,e.target.x),s=fi(t,e.target.y);return`${n}% ${s}%`}},Ef={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=V(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}};let Ge=!1;class Cf extends A.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yl(Df),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ge&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Te.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ge=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ss.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ge=!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 Mo(t){const[e,n]=Wl(),s=A.useContext(sr);return b.jsx(Cf,{...t,layoutGroup:s,switchLayoutGroup:A.useContext(co),isPresent:e,safeToRemove:n})}const Df={borderRadius:{...Wt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wt,borderTopRightRadius:Wt,borderBottomLeftRadius:Wt,borderBottomRightRadius:Wt,boxShadow:Ef};function Mf(t,e,n){const s=j(t)?t:H(t);return s.start(ps("",s,e,n)),s.animation}const Rf=(t,e)=>t.depth-e.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(e){Fn(this.children,e),this.isDirty=!0}remove(e){jn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rf),this.isDirty=!1,this.children.forEach(e)}}function Lf(t,e){const n=_.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(q(s),t(o-e))};return M.setup(s,!0),()=>q(s)}const Ro=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=Ro.length,di=t=>typeof t=="string"?parseFloat(t):t,hi=t=>typeof t=="number"||P.test(t);function Nf(t,e,n,s,i,o){i?(t.opacity=V(0,n.opacity??1,kf(s)),t.opacityExit=V(e.opacity??1,0,If(s))):o&&(t.opacity=V(e.opacity??1,n.opacity??1,s));for(let r=0;r<Of;r++){const a=`border${Ro[r]}Radius`;let c=mi(e,a),l=mi(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||hi(c)===hi(l)?(t[a]=Math.max(V(di(c),di(l),s),0),(tt.test(l)||tt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function mi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const kf=Vo(0,.5,hr),If=Vo(.5,.95,W);function Vo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function pi(t,e){t.min=e.min,t.max=e.max}function $(t,e){pi(t.x,e.x),pi(t.y,e.y)}function gi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function yi(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ff(t,e=0,n=1,s=.5,i,o=t,r=t){if(tt.test(e)&&(e=parseFloat(e),e=V(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=V(o.min,o.max,s);t===o&&(a-=e),t.min=yi(t.min,e,n,a,i),t.max=yi(t.max,e,n,a,i)}function vi(t,e,[n,s,i],o,r){Ff(t,e[n],e[s],e[i],e.scale,o,r)}const jf=["x","scaleX","originX"],Bf=["y","scaleY","originY"];function xi(t,e,n,s){vi(t.x,e,jf,n?n.x:void 0,s?s.x:void 0),vi(t.y,e,Bf,n?n.y:void 0,s?s.y:void 0)}function Ti(t){return t.translate===0&&t.scale===1}function Lo(t){return Ti(t.x)&&Ti(t.y)}function bi(t,e){return t.min===e.min&&t.max===e.max}function _f(t,e){return bi(t.x,e.x)&&bi(t.y,e.y)}function wi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Oo(t,e){return wi(t.x,e.x)&&wi(t.y,e.y)}function Si(t){return B(t.x)/B(t.y)}function Ai(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wf{constructor(){this.members=[]}add(e){Fn(this.members,e),e.scheduleRender()}remove(e){if(jn(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){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0: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:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:v}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),v&&(s+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Ye=["","X","Y","Z"],$f=1e3;let Kf=0;function Xe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function No(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=xo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&No(s)}function ko({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Kf++,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.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(Gf),this.nodes.forEach(Zf),this.nodes.forEach(Qf),this.nodes.forEach(Yf)},this.resolvedRelativeTargetAt=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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new _n),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=rs(r)&&!Fl(r),this.instance=r;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Lf(d,250),Te.hasAnimatedSinceResize&&(Te.hasAnimatedSinceResize=!1,this.nodes.forEach(Ci)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||sd,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),g=!this.targetLayout||!Oo(this.targetLayout,h),T=!f&&d;if(this.options.layoutRoot||this.resumeFrom||T||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...es(v,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T)}else f||Ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),q(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(Jf),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&&No(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ei);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qf),this.nodes.forEach(zf),this.nodes.forEach(Hf)):this.nodes.forEach(Ei),this.clearAllSnapshots();const a=_.now();k.delta=et(0,1e3/60,a-k.timestamp),k.timestamp=a,k.isProcessing=!0,Fe.update.process(k),Fe.preRender.process(k),Fe.render.process(k),k.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ss.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xf),this.sharedNodes.forEach(td)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!B(this.snapshot.measuredBox.x)&&!B(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),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 c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lo(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&this.instance&&(a||mt(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),id(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(rd))){const{scroll:u}=this.root;u&&(Mt(a.x,u.offset.x),Mt(a.y,u.offset.y))}return a}removeElementScroll(r){var c;const a=L();if($(a,r),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:d}=u;u!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&$(a,r),Mt(a.x,f.offset.x),Mt(a.y,f.offset.y))}return a}applyTransform(r,a=!1){const c=L();$(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Rt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mt(u.latestValues)&&Rt(c,u.latestValues)}return mt(this.latestValues)&&Rt(c,this.latestValues),c}removeTransform(r){const a=L();$(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!mt(l.latestValues))continue;wn(l.latestValues)&&l.updateSnapshot();const u=L(),f=l.measurePageBox();$(u,f),xi(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return mt(this.latestValues)&&xi(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!==k.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=k.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ff(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),ho(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.target,h.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||wn(this.parent.latestValues)||fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===k.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;$(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;wu(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=L());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gi(this.prevProjectionDelta.x,this.projectionDelta.x),gi(this.prevProjectionDelta.y,this.projectionDelta.y)),Gt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Ai(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ai(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Vt(),this.projectionDelta=Vt(),this.projectionDeltaWithTransform=Vt()}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),h=c?c.source:void 0,v=this.layout?this.layout.source:void 0,m=h!==v,y=this.getStack(),g=!y||y.members.length<=1,T=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(nd));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;Di(f.x,r.x,w),Di(f.y,r.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ed(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&_f(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=L()),$(x,this.relativeTarget)),m&&(this.animationValues=u,Nf(u,l,this.latestValues,w,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Te.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=H(0)),this.currentAnimation=Mf(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},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($f),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Io(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||L();const f=B(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const d=B(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+d}$(a,c),Rt(a,u),Gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Wf),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Xe("z",r,l,this.animationValues);for(let u=0;u<Ye.length;u++)Xe(`rotate${Ye[u]}`,r,l,this.animationValues),Xe(`skew${Ye[u]}`,r,l,this.animationValues);r.render();for(const u in l)r.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!mt(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Uf(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?r.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Qt){if(u[v]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=Qt[v],T=f==="none"?u[v]:m(u[v],l);if(y){const x=y.length;for(let S=0;S<x;S++)r[y[S]]=T}else g?this.options.visualElement.renderState.vars[v]=T:r[v]=T}this.options.layoutId&&(r.pointerEvents=l===this?xe(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Pi),this.root.sharedNodes.clear()}}}function zf(t){t.updateLayout()}function Hf(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(d);d.min=s[f].min,d.max=d.min+h}):Io(o,e.layoutBox,s)&&K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(s[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Vt();Gt(a,s,e.layoutBox);const c=Vt();r?Gt(c,t.applyTransform(i,!0),e.measuredBox):Gt(c,s,e.layoutBox);const l=!Lo(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const v=L();Yt(v,e.layoutBox,d.layoutBox);const m=L();Yt(m,s,h.layoutBox),Oo(v,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Gf(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 Yf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xf(t){t.clearSnapshot()}function Pi(t){t.clearMeasurements()}function Ei(t){t.isLayoutDirty=!1}function qf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zf(t){t.resolveTargetDelta()}function Qf(t){t.calcProjection()}function Jf(t){t.resetSkewAndRotation()}function td(t){t.removeLeadSnapshot()}function Di(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Mi(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function ed(t,e,n,s){Mi(t.x,e.x,n.x,s),Mi(t.y,e.y,n.y,s)}function nd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sd={duration:.45,ease:[.4,0,.1,1]},Ri=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vi=Ri("applewebkit/")&&!Ri("chrome/")?Math.round:W;function Li(t){t.min=Vi(t.min),t.max=Vi(t.max)}function id(t){Li(t.x),Li(t.y)}function Io(t,e,n){return t==="position"||t==="preserve-aspect"&&!uf(Si(e),Si(n),.2)}function rd(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const od=ko({attachResizeListener:(t,e)=>Jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qe={current:void 0},Fo=ko({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!qe.current){const t=new od({});t.mount(window),t.setOptions({layoutScroll:!0}),qe.current=t}return qe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ad={pan:{Feature:Pf},drag:{Feature:Af,ProjectionNode:Fo,MeasureLayout:Mo}};function Oi(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&&M.postRender(()=>o(e,re(e)))}class cd extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Sl(e,(n,s)=>(Oi(this.node,s,"Start"),i=>Oi(this.node,i,"End"))))}unmount(){}}class ld extends ft{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=ne(Jt(this.node.current,"focus",()=>this.onFocus()),Jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ni(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&&M.postRender(()=>o(e,re(e)))}class ud extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Cl(e,(n,s)=>(Ni(this.node,s,"Start"),(i,{success:o})=>Ni(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mn=new WeakMap,Ze=new WeakMap,fd=t=>{const e=Mn.get(t.target);e&&e(t)},dd=t=>{t.forEach(fd)};function hd({root:t,...e}){const n=t||document;Ze.has(n)||Ze.set(n,{});const s=Ze.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dd,{root:t,...e})),s[i]}function md(t,e,n){const s=hd(e);return Mn.set(t,n),s.observe(t),()=>{Mn.delete(t),s.unobserve(t)}}const pd={some:0,all:1};class gd extends ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();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:pd[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return md(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(yd(e,n))&&this.startObserver()}unmount(){}}function yd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vd={inView:{Feature:gd},tap:{Feature:ud},focus:{Feature:ld},hover:{Feature:cd}},xd={layout:{ProjectionNode:Fo,MeasureLayout:Mo}},Td={...sf,...vd,...ad,...xd},bd=xu(Td,Lu),wd=50,ki=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Sd=()=>({time:0,x:ki(),y:ki()}),Ad={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ii(t,e,n,s){const i=n[e],{length:o,position:r}=Ad[e],a=i.current,c=n.time;i.current=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=kt(0,i.scrollLength,i.current);const l=s-c;i.velocity=l>wd?0:Wn(i.current-a,l)}function Pd(t,e,n){Ii(t,"x",e,n),Ii(t,"y",e,n),e.time=n}function Ed(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(zr(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 Rn={start:0,center:.5,end:1};function Fi(t,e,n=0){let s=0;if(t in Rn&&(t=Rn[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 Cd=[0,0];function Dd(t,e,n,s){let i=Array.isArray(t)?t:Cd,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,Rn[t]?t:"0"]),o=Fi(i[0],n,s),r=Fi(i[1],e),o-r}const Md={All:[[0,0],[1,1]]},Rd={x:0,y:0};function Vd(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Ld(t,e,n){const{offset:s=Md.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?Ed(i,t):Rd,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Vd(i),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const f=s.length;for(let d=0;d<f;d++){const h=Dd(s[d],l[r],c[r],a[o]);!u&&h!==e[o].interpolatorOffsets[d]&&(u=!0),e[o].offset[d]=h}u&&(e[o].interpolate=qn(e[o].offset,Dr(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=et(0,1,e[o].interpolate(e[o].current))}function Od(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,process.env.NODE_ENV!=="production"&&t&&e&&e!==t&&Re(getComputedStyle(t).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function Nd(t,e,n,s={}){return{measure:i=>{Od(t,s.target,n),Pd(t,n,i),(s.offset||s.target)&&Ld(t,n,s)},notify:()=>e(n)}}const Ut=new WeakMap,ji=new WeakMap,Qe=new WeakMap,Bi=t=>t===document.scrollingElement?window:t;function jo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return W;let s=Qe.get(e);s||(s=new Set,Qe.set(e,s));const i=Sd(),o=Nd(e,t,i,n);if(s.add(o),!Ut.has(e)){const a=()=>{for(const f of s)f.measure(k.timestamp);M.preUpdate(c)},c=()=>{for(const f of s)f.notify()},l=()=>M.read(a);Ut.set(e,l);const u=Bi(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&ji.set(e,Il(e,l)),u.addEventListener("scroll",l,{passive:!0}),l()}const r=Ut.get(e);return M.read(r,!1,!0),()=>{var l;q(r);const a=Qe.get(e);if(!a||(a.delete(o),a.size))return;const c=Ut.get(e);Ut.delete(e),c&&(Bi(e).removeEventListener("scroll",c),(l=ji.get(e))==null||l(),window.removeEventListener("resize",c))}}const _i=new Map;function kd(t){const e={value:0},n=jo(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function Bo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=_i.get(e)??new Map;_i.set(e,i);const o=n.target??"self",r=i.get(o)??{},a=s+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Lr()?new ScrollTimeline({source:e,axis:s}):kd({container:e,...n})),r[a]}function Id(t,e){const n=Bo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:s=>(s.pause(),qr(i=>{s.time=s.duration*i},n))})}function Fd(t){return t.length===2}function jd(t,e){return Fd(t)?jo(n=>{t(n[e.axis].progress,n)},e):qr(t,Bo(e))}function Bd(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return W;const i={axis:e,container:n,...s};return typeof t=="function"?jd(t,i):Id(t,i)}const _d=()=>({scrollX:H(0),scrollY:H(0),scrollXProgress:H(0),scrollYProgress:H(0)}),le=t=>t?!t.current:!1;function Wd({container:t,target:e,...n}={}){const s=Me(_d),i=A.useRef(null),o=A.useRef(!1),r=A.useCallback(()=>(i.current=Bd((a,{x:c,y:l})=>{s.scrollX.set(c.current),s.scrollXProgress.set(c.progress),s.scrollY.set(l.current),s.scrollYProgress.set(l.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=i.current)==null||a.call(i)}),[t,e,JSON.stringify(n.offset)]);return kn(()=>{if(o.current=!1,le(t)||le(e)){o.current=!0;return}else return r()},[r]),A.useEffect(()=>{if(o.current)return X(!le(t),"Container ref is defined but not hydrated","use-scroll-ref"),X(!le(e),"Target ref is defined but not hydrated","use-scroll-ref"),r()},[r]),s}function Ud(t){const e=Me(()=>H(t)),{isStatic:n}=A.useContext(os);if(n){const[,s]=A.useState(t);A.useEffect(()=>e.on("change",s),[])}return e}function _o(t,e){const n=Ud(e()),s=()=>n.set(e());return s(),kn(()=>{const i=()=>M.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),q(s)}}),n}function $d(t){zt.current=[],t();const e=_o(zt.current,t);return zt.current=void 0,e}function Kd(t,e,n,s){if(typeof t=="function")return $d(t);const i=typeof e=="function"?e:jl(e,n,s);return Array.isArray(t)?Wi(t,i):Wi([t],([o])=>i(o))}function Wi(t,e){const n=Me(()=>[]);return _o(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const zd=({children:t,className:e})=>{const n=A.useRef(null),{scrollYProgress:s}=Wd({target:n});if(typeof t!="string")throw new Error("TextReveal: children must be a string");const i=t.split(" ");return b.jsx("div",{ref:n,className:Y.cn("z-0 relative h-[200vh]",e),children:b.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:b.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:i.map((o,r)=>{const a=r/i.length,c=a+1/i.length;return b.jsx(Hd,{progress:s,range:[a,c],children:o},r)})})})})},Hd=({children:t,progress:e,range:n})=>{const s=Kd(e,n,[0,1]);return b.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[b.jsx("span",{className:"absolute opacity-30",children:t}),b.jsx(bd.span,{style:{opacity:s},className:"text-black dark:text-white",children:t})]})};function Gd(t,e){const n=p.createContext(e),s=o=>{const{children:r,...a}=o,c=p.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:c,children:r})};s.displayName=t+"Provider";function i(o){const r=p.useContext(n);if(r)return r;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[s,i]}function Wo(t,e=[]){let n=[];function s(o,r){const a=p.createContext(r),c=n.length;n=[...n,r];const l=f=>{var g;const{scope:d,children:h,...v}=f,m=((g=d==null?void 0:d[t])==null?void 0:g[c])||a,y=p.useMemo(()=>v,Object.values(v));return b.jsx(m.Provider,{value:y,children:h})};l.displayName=o+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[c])||a,v=p.useContext(h);if(v)return v;if(r!==void 0)return r;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const i=()=>{const o=n.map(r=>p.createContext(r));return function(a){const c=(a==null?void 0:a[t])||o;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[s,Yd(i,...e)]}function Yd(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const r=s.reduce((a,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:r}),[r])}};return n.scopeName=e.scopeName,n}function Ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Xd(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ui(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Ui(t[i],null)}}}}function it(...t){return p.useCallback(Xd(...t),t)}function nt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}var te=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},qd=p[" useId ".trim().toString()]||(()=>{}),Zd=0;function Je(t){const[e,n]=p.useState(qd());return te(()=>{n(s=>s??String(Zd++))},[t]),t||(e?`radix-${e}`:"")}var Qd=p[" useInsertionEffect ".trim().toString()]||te;function Jd({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[i,o,r]=th({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:i;{const u=p.useRef(t!==void 0);p.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,s])}const l=p.useCallback(u=>{var f;if(a){const d=eh(u)?u(t):u;d!==t&&((f=r.current)==null||f.call(r,d))}else o(u)},[a,t,o,r]);return[c,l]}function th({defaultProp:t,onChange:e}){const[n,s]=p.useState(t),i=p.useRef(n),o=p.useRef(e);return Qd(()=>{o.current=e},[e]),p.useEffect(()=>{var r;i.current!==n&&((r=o.current)==null||r.call(o,n),i.current=n)},[n,i]),[n,s,o]}function eh(t){return typeof t=="function"}var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=nh.reduce((t,e)=>{const n=On.createSlot(`Primitive.${e}`),s=p.forwardRef((i,o)=>{const{asChild:r,...a}=i,c=r?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...a,ref:o})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function sh(t,e){t&&ja.flushSync(()=>t.dispatchEvent(e))}function ee(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function ih(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t);p.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var rh="DismissableLayer",Vn="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",ah="dismissableLayer.focusOutside",$i,Uo=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$o=p.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:r,onDismiss:a,...c}=t,l=p.useContext(Uo),[u,f]=p.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=p.useState({}),v=it(e,E=>f(E)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),T=u?m.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=T>=g,w=uh(E=>{const C=E.target,O=[...l.branches].some(F=>F.contains(C));!S||O||(i==null||i(E),r==null||r(E),E.defaultPrevented||a==null||a())},d),D=fh(E=>{const C=E.target;[...l.branches].some(F=>F.contains(C))||(o==null||o(E),r==null||r(E),E.defaultPrevented||a==null||a())},d);return ih(E=>{T===l.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),p.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($i=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ki(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$i)}},[u,d,n,l]),p.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ki())},[u,l]),p.useEffect(()=>{const E=()=>h({});return document.addEventListener(Vn,E),()=>document.removeEventListener(Vn,E)},[]),b.jsx(rt.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:nt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:nt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:nt(t.onPointerDownCapture,w.onPointerDownCapture)})});$o.displayName=rh;var ch="DismissableLayerBranch",lh=p.forwardRef((t,e)=>{const n=p.useContext(Uo),s=p.useRef(null),i=it(e,s);return p.useEffect(()=>{const o=s.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(rt.div,{...t,ref:i})});lh.displayName=ch;function uh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!s.current){let c=function(){Ko(oh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);s.current=!1},r=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(r),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function fh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!s.current&&Ko(ah,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Ki(){const t=new CustomEvent(Vn);document.dispatchEvent(t)}function Ko(t,e,n,{discrete:s}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),s?sh(i,o):i.dispatchEvent(o)}var tn="focusScope.autoFocusOnMount",en="focusScope.autoFocusOnUnmount",zi={bubbles:!1,cancelable:!0},dh="FocusScope",zo=p.forwardRef((t,e)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...r}=t,[a,c]=p.useState(null),l=ee(i),u=ee(o),f=p.useRef(null),d=it(e,m=>c(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(s){let m=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:lt(f.current,{select:!0})},y=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||lt(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const T=new MutationObserver(g);return a&&T.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),T.disconnect()}}},[s,a,h.paused]),p.useEffect(()=>{if(a){Gi.add(h);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(tn,zi);a.addEventListener(tn,l),a.dispatchEvent(g),g.defaultPrevented||(hh(vh(Ho(a)),{select:!0}),document.activeElement===m&&lt(a))}return()=>{a.removeEventListener(tn,l),setTimeout(()=>{const g=new CustomEvent(en,zi);a.addEventListener(en,u),a.dispatchEvent(g),g.defaultPrevented||lt(m??document.body,{select:!0}),a.removeEventListener(en,u),Gi.remove(h)},0)}}},[a,l,u,h]);const v=p.useCallback(m=>{if(!n&&!s||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const T=m.currentTarget,[x,S]=mh(T);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&&lt(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),n&&lt(S,{select:!0})):g===T&&m.preventDefault()}},[n,s,h.paused]);return b.jsx(rt.div,{tabIndex:-1,...r,ref:d,onKeyDown:v})});zo.displayName=dh;function hh(t,{select:e=!1}={}){const n=document.activeElement;for(const s of t)if(lt(s,{select:e}),document.activeElement!==n)return}function mh(t){const e=Ho(t),n=Hi(e,t),s=Hi(e.reverse(),t);return[n,s]}function Ho(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Hi(t,e){for(const n of t)if(!ph(n,{upTo:e}))return n}function ph(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function gh(t){return t instanceof HTMLInputElement&&"select"in t}function lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&gh(t)&&e&&t.select()}}var Gi=yh();function yh(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Yi(t,e),t.unshift(e)},remove(e){var n;t=Yi(t,e),(n=t[0])==null||n.resume()}}}function Yi(t,e){const n=[...t],s=n.indexOf(e);return s!==-1&&n.splice(s,1),n}function vh(t){return t.filter(e=>e.tagName!=="A")}var xh="Portal",Go=p.forwardRef((t,e)=>{var a;const{container:n,...s}=t,[i,o]=p.useState(!1);te(()=>o(!0),[]);const r=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return r?er.createPortal(b.jsx(rt.div,{...s,ref:e}),r):null});Go.displayName=xh;function Th(t,e){return p.useReducer((n,s)=>e[n][s]??n,t)}var Ne=t=>{const{present:e,children:n}=t,s=bh(e),i=typeof n=="function"?n({present:s.isPresent}):p.Children.only(n),o=it(s.ref,wh(i));return typeof n=="function"||s.isPresent?p.cloneElement(i,{ref:o}):null};Ne.displayName="Presence";function bh(t){const[e,n]=p.useState(),s=p.useRef(null),i=p.useRef(t),o=p.useRef("none"),r=t?"mounted":"unmounted",[a,c]=Th(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=ue(s.current);o.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=s.current,u=i.current;if(u!==t){const d=o.current,h=ue(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),te(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,f=h=>{const m=ue(s.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(c("ANIMATION_END"),!i.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=h=>{h.target===e&&(o.current=ue(s.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{s.current=l?getComputedStyle(l):null,n(l)},[])}}function ue(t){return(t==null?void 0:t.animationName)||"none"}function wh(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var nn=0;function Sh(){p.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Xi()),document.body.insertAdjacentElement("beforeend",t[1]??Xi()),nn++,()=>{nn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nn--}},[])}function Xi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Q=function(){return Q=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Q.apply(this,arguments)};function Yo(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function Ah(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,o;s<i;s++)(o||!(s in e))&&(o||(o=Array.prototype.slice.call(e,0,s)),o[s]=e[s]);return t.concat(o||Array.prototype.slice.call(e))}var be="right-scroll-bar-position",we="width-before-scroll-bar",Ph="with-scroll-bars-hidden",Eh="--removed-body-scroll-bar-size";function sn(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Ch(t,e){var n=A.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=e,n.facade}var Dh=typeof window<"u"?p.useLayoutEffect:p.useEffect,qi=new WeakMap;function Mh(t,e){var n=Ch(null,function(s){return t.forEach(function(i){return sn(i,s)})});return Dh(function(){var s=qi.get(n);if(s){var i=new Set(s),o=new Set(t),r=n.current;i.forEach(function(a){o.has(a)||sn(a,null)}),o.forEach(function(a){i.has(a)||sn(a,r)})}qi.set(n,t)},[t]),n}function Rh(t){return t}function Vh(t,e){e===void 0&&(e=Rh);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var r=e(o,s);return n.push(r),function(){n=n.filter(function(a){return a!==r})}},assignSyncMedium:function(o){for(s=!0;n.length;){var r=n;n=[],r.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){s=!0;var r=[];if(n.length){var a=n;n=[],a.forEach(o),r=n}var c=function(){var u=r;r=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){r.push(u),l()},filter:function(u){return r=r.filter(u),n}}}};return i}function Lh(t){t===void 0&&(t={});var e=Vh(null);return e.options=Q({async:!0,ssr:!1},t),e}var Xo=function(t){var e=t.sideCar,n=Yo(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return p.createElement(s,Q({},n))};Xo.isSideCarExport=!0;function Oh(t,e){return t.useMedium(e),Xo}var qo=Lh(),rn=function(){},ke=p.forwardRef(function(t,e){var n=p.useRef(null),s=p.useState({onScrollCapture:rn,onWheelCapture:rn,onTouchMoveCapture:rn}),i=s[0],o=s[1],r=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,v=t.noIsolation,m=t.inert,y=t.allowPinchZoom,g=t.as,T=g===void 0?"div":g,x=t.gapMode,S=Yo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,D=Mh([n,e]),E=Q(Q({},S),i);return p.createElement(p.Fragment,null,u&&p.createElement(w,{sideCar:qo,removeScrollBar:l,shards:f,noRelative:h,noIsolation:v,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),r?p.cloneElement(p.Children.only(a),Q(Q({},E),{ref:D})):p.createElement(T,Q({},E,{className:c,ref:D}),a))});ke.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ke.classNames={fullWidth:we,zeroRight:be};var Nh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kh(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Nh();return e&&t.setAttribute("nonce",e),t}function Ih(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fh(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jh=function(){var t=0,e=null;return{add:function(n){t==0&&(e=kh())&&(Ih(e,n),Fh(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Bh=function(){var t=jh();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Zo=function(){var t=Bh(),e=function(n){var s=n.styles,i=n.dynamic;return t(s,i),null};return e},_h={left:0,top:0,right:0,gap:0},on=function(t){return parseInt(t||"",10)||0},Wh=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],s=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[on(n),on(s),on(i)]},Uh=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _h;var e=Wh(t),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-n+e[2]-e[0])}},$h=Zo(),Ot="data-scroll-locked",Kh=function(t,e,n,s){var i=t.left,o=t.top,r=t.right,a=t.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Ph,` {
3
3
  overflow: hidden `).concat(s,`;
4
4
  padding-right: `).concat(a,"px ").concat(s,`;