openlearn-next 0.2.7 → 0.2.9

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 (60) hide show
  1. package/dist/assets/{AdminDirectoryView-Cai0cQqi.js → AdminDirectoryView-CD7tW4mc.js} +1 -1
  2. package/dist/assets/BatchPickerModal-9BhmNM2R.js +1 -0
  3. package/dist/assets/{ClassesView-Cxgfcrx1.js → ClassesView-DKScQDos.js} +2 -2
  4. package/dist/assets/CloudDriveModal-cPtTMriS.js +1 -0
  5. package/dist/assets/{ComputerLabView-CUCO2VIV.js → ComputerLabView-B6-twB0u.js} +1 -1
  6. package/dist/assets/CourseManagement-AoauIULq.js +1 -0
  7. package/dist/assets/CourseWizardModal-BOgLpLz7.js +3 -0
  8. package/dist/assets/{CoursewareHubPanel-CAaf22Qm.js → CoursewareHubPanel-Cb1mAqHS.js} +1 -1
  9. package/dist/assets/{Dashboard-vSYAYoji.js → Dashboard-BPxkmnvI.js} +2 -2
  10. package/dist/assets/ExportWeightModal-DSzySeqh.js +1 -0
  11. package/dist/assets/{HelpTour-ZgEkRnin.js → HelpTour-DwM9UBiA.js} +1 -1
  12. package/dist/assets/{HelpView-D3WIxMoB.js → HelpView-CuNDka5n.js} +4 -4
  13. package/dist/assets/ImportLessonsModal-Bwy2r-96.js +1 -0
  14. package/dist/assets/{ImportModal-mkWuDoAN.js → ImportModal-CmUt1YeX.js} +1 -1
  15. package/dist/assets/InteractiveCoursewareViewer-DWnzq20c.js +1 -0
  16. package/dist/assets/InteractiveWhiteboard-C7JMplbp.js +62 -0
  17. package/dist/assets/{LazyCourseware-Bcxn_20f.js → LazyCourseware-g7b8EXR_.js} +1 -1
  18. package/dist/assets/{LazyWhiteboard-CJA7aRIM.js → LazyWhiteboard-BIepzrv9.js} +1 -1
  19. package/dist/assets/LessonEditorView-C-mvYRUd.js +1 -0
  20. package/dist/assets/LiveClassroomView-CqRbWNis.js +1 -0
  21. package/dist/assets/NotificationDetailModal-Bk1g_prI.js +1 -0
  22. package/dist/assets/{PluginView-B3ZolNGQ.js → PluginView-C6s7Ltcy.js} +1 -1
  23. package/dist/assets/{ProcessLogsModal-8mVp07ic.js → ProcessLogsModal-B-PY780w.js} +1 -1
  24. package/dist/assets/QuizGeneratorModal-DWH1zP0X.js +1 -0
  25. package/dist/assets/StudentAssignmentView-CfTjeoAp.js +1 -0
  26. package/dist/assets/StudentLessonView-D2XvNGnW.js +1 -0
  27. package/dist/assets/StudentPreviewModal-BwXG6Cis.js +1 -0
  28. package/dist/assets/StudentView-DT-373QP.js +2 -0
  29. package/dist/assets/SystemResourceLibraryModal-BTL8rB0g.js +1 -0
  30. package/dist/assets/TeacherView-XdD-y67J.js +2 -0
  31. package/dist/assets/{TimetableView-zce3okQn.js → TimetableView-BMsjwi-s.js} +3 -3
  32. package/dist/assets/index-C5FKWIUq.js +190 -0
  33. package/dist/assets/{index-CDTw8wSY.js → index-wdWIWwbg.js} +1 -1
  34. package/dist/assets/{vendor-icons-BvCtGbt1.js → vendor-icons-_c3xpwjZ.js} +1 -1
  35. package/dist/assets/vendor-motion-DjY2czvL.js +1 -0
  36. package/dist/assets/{vendor-pptx-B0hlo0eh.js → vendor-pptx-B_NheIKl.js} +5 -5
  37. package/dist/index.html +1 -1
  38. package/dist/server.cjs +164 -21
  39. package/package.json +1 -1
  40. package/dist/assets/BatchPickerModal-CKQyeY6R.js +0 -1
  41. package/dist/assets/CloudDriveModal-TFWlPh8x.js +0 -1
  42. package/dist/assets/CourseManagement-DSCOjuIC.js +0 -1
  43. package/dist/assets/CourseWizardModal-B3QnFxvj.js +0 -3
  44. package/dist/assets/ExportWeightModal-BlS2auLs.js +0 -1
  45. package/dist/assets/ImportLessonsModal-BZZRDBRU.js +0 -1
  46. package/dist/assets/InteractiveCoursewareViewer-01PS40_x.js +0 -1
  47. package/dist/assets/InteractiveWhiteboard-bmT1LKD6.js +0 -102
  48. package/dist/assets/LessonEditorView-hdJblhmb.js +0 -1
  49. package/dist/assets/LiveClassroomView-ByyIOLJC.js +0 -1
  50. package/dist/assets/NotificationDetailModal-dndFrE7p.js +0 -1
  51. package/dist/assets/QuizGeneratorModal-DpTFYbVJ.js +0 -1
  52. package/dist/assets/StudentAssignmentView-DDY7C092.js +0 -1
  53. package/dist/assets/StudentLessonView-BcQ7q4QF.js +0 -1
  54. package/dist/assets/StudentPreviewModal-ETJBF1Vc.js +0 -1
  55. package/dist/assets/StudentView-BOqPntx-.js +0 -1
  56. package/dist/assets/SystemResourceLibraryModal-tg8xnblT.js +0 -1
  57. package/dist/assets/TeacherView-CrbllHIm.js +0 -2
  58. package/dist/assets/index-BrEBeWAQ.js +0 -14
  59. package/dist/assets/index-eXp-qZdm.js +0 -129
  60. package/dist/assets/vendor-motion-Dz5URUo4.js +0 -9
@@ -1,9 +0,0 @@
1
- import{r as w,j as lt}from"./vendor-react-0Lg0vA-4.js";const bi=w.createContext({});function Vi(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const Zh=typeof window<"u",vl=Zh?w.useLayoutEffect:w.useEffect,Un=w.createContext(null);function Ci(t,e){t.indexOf(e)===-1&&t.push(e)}function ae(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const At=(t,e,n)=>n>e?e:n<t?t:n;let Mi=()=>{};const Et={},xl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Tl=t=>typeof t=="object"&&t!==null,wl=t=>/^0[^.\s]+$/u.test(t);function Pl(t){let e;return()=>(e===void 0&&(e=t()),e)}const ut=t=>t,Ue=(...t)=>t.reduce((e,n)=>s=>n(e(s))),le=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};let $i=class{constructor(){this.subscriptions=[]}add(e){return Ci(this.subscriptions,e),()=>ae(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const it=t=>t*1e3,rt=t=>t/1e3,Sl=(t,e)=>e?t*(1e3/e):0,Jh=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Al=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Qh=1e-7,tf=12;function ef(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Al(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Qh&&++a<tf);return o}function We(t,e,n,s){if(t===e&&n===s)return ut;const i=r=>ef(r,0,1,t,n);return r=>r===0||r===1?r:Al(i(r),e,s)}const bl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Di=t=>e=>1-t(1-e),Vl=We(.33,1.53,.69,.99),Ei=Di(Vl),Cl=bl(Ei),Ml=t=>t>=1?1:(t*=2)<1?.5*Ei(t):.5*(2-Math.pow(2,-10*(t-1))),Ri=t=>1-Math.sin(Math.acos(t)),$l=Di(Ri),Dl=bl(Ri),nf=We(.42,0,1,1),sf=We(0,0,.58,1),El=We(.42,0,.58,1),Rl=t=>Array.isArray(t)&&typeof t[0]!="number";function Ll(t,e){return Rl(t)?t[Jh(0,t.length,e)]:t}const kl=t=>Array.isArray(t)&&typeof t[0]=="number",of={linear:ut,easeIn:nf,easeInOut:El,easeOut:sf,circIn:Ri,circInOut:Dl,circOut:$l,backIn:Ei,backInOut:Cl,backOut:Vl,anticipate:Ml},rf=t=>typeof t=="string",Oo=t=>{if(kl(t)){Mi(t.length===4);const[e,n,s,i]=t;return We(e,n,s,i)}else if(rf(t))return of[t];return t},qe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function af(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(l){o.has(l)&&(c.schedule(l),t()),l(a)}const c={schedule:(l,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(l),p.add(l),l},cancel:l=>{s.delete(l),o.delete(l)},process:l=>{if(a=l,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(u),n.clear(),i=!1,r&&(r=!1,c.process(l))}};return c}const lf=40;function Bl(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=qe.reduce((x,T)=>(x[T]=af(r),x),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:l,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const x=Et.useManualTiming,T=x?i.timestamp:performance.now();n=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,lf),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),u.process(i),c.process(i),l.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:qe.reduce((x,T)=>{const A=o[T];return x[T]=(C,V=!1,P=!1)=>(n||g(),A.schedule(C,V,P)),x},{}),cancel:x=>{for(let T=0;T<qe.length;T++)o[qe[T]].cancel(x)},state:i,steps:o}}const{schedule:I,cancel:Rt,state:q,steps:Zn}=Bl(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let rn;function uf(){rn=void 0}const tt={now:()=>(rn===void 0&&tt.set(q.isProcessing||Et.useManualTiming?q.timestamp:performance.now()),rn),set:t=>{rn=t,queueMicrotask(uf)}},Il=t=>e=>typeof e=="string"&&e.startsWith(t),Fl=Il("--"),cf=Il("var(--"),Li=t=>cf(t)?hf.test(t.split("/*")[0].trim()):!1,hf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function jo(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const fe={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Re={...fe,transform:t=>At(0,1,t)},Ze={...fe,default:1},Ae=t=>Math.round(t*1e5)/1e5,ki=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ff(t){return t==null}const df=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bi=(t,e)=>n=>!!(typeof n=="string"&&df.test(n)&&n.startsWith(t)||e&&!ff(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ol=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ki);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},pf=t=>At(0,255,t),Jn={...fe,transform:t=>Math.round(pf(t))},Ut={test:Bi("rgb","red"),parse:Ol("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Jn.transform(t)+", "+Jn.transform(e)+", "+Jn.transform(n)+", "+Ae(Re.transform(s))+")"};function mf(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 $s={test:Bi("#"),parse:mf,transform:Ut.transform},Ke=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Vt=Ke("deg"),Pt=Ke("%"),M=Ke("px"),gf=Ke("vh"),yf=Ke("vw"),No={...Pt,parse:t=>Pt.parse(t)/100,transform:t=>Pt.transform(t*100)},ee={test:Bi("hsl","hue"),parse:Ol("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Pt.transform(Ae(e))+", "+Pt.transform(Ae(n))+", "+Ae(Re.transform(s))+")"},H={test:t=>Ut.test(t)||$s.test(t)||ee.test(t),parse:t=>Ut.test(t)?Ut.parse(t):ee.test(t)?ee.parse(t):$s.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ut.transform(t):ee.transform(t),getAnimatableNone:t=>{const e=H.parse(t);return e.alpha=0,H.transform(e)}},vf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xf(t){return isNaN(t)&&typeof t=="string"&&(t.match(ki)?.length||0)+(t.match(vf)?.length||0)>0}const jl="number",Nl="color",Tf="var",wf="var(",Uo="${}",Pf=/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 ue(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Pf,u=>(H.test(u)?(s.color.push(r),i.push(Nl),n.push(H.parse(u))):u.startsWith(wf)?(s.var.push(r),i.push(Tf),n.push(u)):(s.number.push(r),i.push(jl),n.push(parseFloat(u))),++r,Uo)).split(Uo);return{values:n,split:a,indexes:s,types:i}}function Sf(t){return ue(t).values}function Ul({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===jl?i+=Ae(s[r]):o===Nl?i+=H.transform(s[r]):i+=s[r]}return i}}function Af(t){return Ul(ue(t))}const bf=t=>typeof t=="number"?0:H.test(t)?H.getAnimatableNone(t):t,Vf=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:bf(t);function Cf(t){const e=ue(t);return Ul(e)(e.values.map((s,i)=>Vf(s,e.split[i])))}const gt={test:xf,parse:Sf,createTransformer:Af,getAnimatableNone:Cf};function Qn(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 Mf({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=Qn(u,a,t+1/3),r=Qn(u,a,t),o=Qn(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Sn(t,e){return n=>n>0?e:t}const k=(t,e,n)=>t+(e-t)*n,ts=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},$f=[$s,Ut,ee],Df=t=>$f.find(e=>e.test(t));function Wo(t){const e=Df(t);if(!e)return!1;let n=e.parse(t);return e===ee&&(n=Mf(n)),n}const Ko=(t,e)=>{const n=Wo(t),s=Wo(e);if(!n||!s)return Sn(t,e);const i={...n};return r=>(i.red=ts(n.red,s.red,r),i.green=ts(n.green,s.green,r),i.blue=ts(n.blue,s.blue,r),i.alpha=k(n.alpha,s.alpha,r),Ut.transform(i))},Ds=new Set(["none","hidden"]);function Ef(t,e){return Ds.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Rf(t,e){return n=>k(t,e,n)}function Ii(t){return typeof t=="number"?Rf:typeof t=="string"?Li(t)?Sn:H.test(t)?Ko:Bf:Array.isArray(t)?Wl:typeof t=="object"?H.test(t)?Ko:Lf:Sn}function Wl(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Ii(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Lf(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ii(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function kf(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const Bf=(t,e)=>{const n=gt.createTransformer(e),s=ue(t),i=ue(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?Ds.has(t)&&!i.values.length||Ds.has(e)&&!s.values.length?Ef(t,e):Ue(Wl(kf(s,i),i.values),n):Sn(t,e)};function Kl(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?k(t,e,n):Ii(t)(t,e)}const If=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>I.update(e,n),stop:()=>Rt(e),now:()=>q.isProcessing?q.timestamp:tt.now()}},Gl=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},An=2e4;function Fi(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<An;)e+=n,s=t.next(e);return e>=An?1/0:e}function Hl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Fi(s),An);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:rt(i)}}const W={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Es(t,e){return t*Math.sqrt(1-e*e)}const Ff=12;function Of(t,e,n){let s=n;for(let i=1;i<Ff;i++)s=s-t(s)/e(s);return s}const es=.001;function jf({duration:t=W.duration,bounce:e=W.bounce,velocity:n=W.velocity,mass:s=W.mass}){let i,r,o=1-e;o=At(W.minDamping,W.maxDamping,o),t=At(W.minDuration,W.maxDuration,rt(t)),o<1?(i=c=>{const l=c*o,h=l*t,f=l-n,d=Es(c,o),p=Math.exp(-h);return es-f/d*p},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=Es(Math.pow(c,2),o);return(-i(c)+es>0?-1:1)*((f-d)*p)/m}):(i=c=>{const l=Math.exp(-c*t),h=(c-n)*t+1;return-es+l*h},r=c=>{const l=Math.exp(-c*t),h=(n-c)*(t*t);return l*h});const a=5/t,u=Of(i,r,a);if(t=it(t),isNaN(u))return{stiffness:W.stiffness,damping:W.damping,duration:t};{const c=Math.pow(u,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const Nf=["duration","bounce"],Uf=["stiffness","damping","mass"];function Go(t,e){return e.some(n=>t[n]!==void 0)}function Wf(t){let e={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...t};if(!Go(t,Uf)&&Go(t,Nf))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*At(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:W.mass,stiffness:i,damping:r}}else{const n=jf({...t,velocity:0});e={...e,...n,mass:W.mass},e.isResolvedFromDuration=!0}return e}function Le(t=W.visualDuration,e=W.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:c,mass:l,duration:h,velocity:f,isResolvedFromDuration:d}=Wf({...n,velocity:-rt(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(u*l)),g=o-r,y=rt(Math.sqrt(u/l)),v=Math.abs(g)<5;s||(s=v?W.restSpeed.granular:W.restSpeed.default),i||(i=v?W.restDelta.granular:W.restDelta.default);let x,T,A,C,V,P;if(m<1)A=Es(y,m),C=(p+m*y*g)/A,x=S=>{const D=Math.exp(-m*y*S);return o-D*(C*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*C+g*A,P=m*y*g-C*A,T=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+P*Math.cos(A*S));else if(m===1){x=D=>o-Math.exp(-y*D)*(g+(p+y*g)*D);const S=p+y*g;T=D=>Math.exp(-y*D)*(y*S*D-p)}else{const S=y*Math.sqrt(m*m-1);x=O=>{const U=Math.exp(-m*y*O),N=Math.min(S*O,300);return o-U*((p+m*y*g)*Math.sinh(N)+S*g*Math.cosh(N))/S};const D=(p+m*y*g)/S,R=m*y*D-g*S,j=m*y*g-D*S;T=O=>{const U=Math.exp(-m*y*O),N=Math.min(S*O,300);return U*(R*Math.sinh(N)+j*Math.cosh(N))}}const b={calculatedDuration:d&&h||null,velocity:S=>it(T(S)),next:S=>{if(!d&&m<1){const R=Math.exp(-m*y*S),j=Math.sin(A*S),O=Math.cos(A*S),U=o-R*(C*j+g*O),N=it(R*(V*j+P*O));return a.done=Math.abs(N)<=s&&Math.abs(o-U)<=i,a.value=a.done?o:U,a}const D=x(S);if(d)a.done=S>=h;else{const R=it(T(S));a.done=Math.abs(R)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const S=Math.min(Fi(b),An),D=Gl(R=>b.next(S*R).value,S,30);return S+"ms "+D},toTransition:()=>{}};return b}Le.applyToOptions=t=>{const e=Hl(t,100,Le);return t.ease=e.ease,t.duration=it(e.duration),t.type="keyframes",t};const Kf=5;function zl(t,e,n){const s=Math.max(e-Kf,0);return Sl(n-t(s),e-s)}function Rs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:c=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},d=P=>a!==void 0&&P<a||u!==void 0&&P>u,p=P=>a===void 0?u:u===void 0||Math.abs(a-P)<Math.abs(u-P)?a:u;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const v=P=>-m*Math.exp(-P/s),x=P=>y+v(P),T=P=>{const b=v(P),S=x(P);f.done=Math.abs(b)<=c,f.value=f.done?y:S};let A,C;const V=P=>{d(f.value)&&(A=P,C=Le({keyframes:[f.value,p(f.value)],velocity:zl(x,P,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:l}))};return V(0),{calculatedDuration:null,next:P=>{let b=!1;return!C&&A===void 0&&(b=!0,T(P),V(P)),A!==void 0&&P>=A?C.next(P-A):(!b&&T(P),f)}}}function Gf(t,e,n){const s=[],i=n||Et.mix||Kl,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||ut:e;a=Ue(u,a)}s.push(a)}return s}function Hf(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Mi(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Gf(e,s,i),u=a.length,c=l=>{if(o&&l<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(l<t[h+1]);h++);const f=le(t[h],t[h+1],l);return a[h](f)};return n?l=>c(At(t[0],t[r-1],l)):c}function _l(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=le(0,e,s);t.push(k(n,1,i))}}function Xl(t){const e=[0];return _l(e,t.length-1),e}function zf(t,e){return t.map(n=>n*e)}function _f(t,e){return t.map(()=>e||El).splice(0,t.length-1)}function be({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Rl(s)?s.map(Oo):Oo(s),r={done:!1,value:e[0]},o=zf(n&&n.length===e.length?n:Xl(e),t),a=Hf(o,e,{ease:Array.isArray(i)?i:_f(e,i)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const Xf=t=>t!==null;function Wn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Xf),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Yf={decay:Rs,inertia:Rs,tween:be,keyframes:be,spring:Le};function Yl(t){typeof t.type=="string"&&(t.type=Yf[t.type])}let Oi=class{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 qf=t=>t/100;let bn=class extends Oi{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Yl(e);const{type:n=be,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||be;u!==be&&typeof a[0]!="number"&&(this.mixKeyframes=Ue(qf,Kl(a[0],a[1])),a=[0,100]);const c=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Fi(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}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:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:l,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,T=s;if(h){const P=Math.min(this.currentTime,i)/a;let b=Math.floor(P),S=P%1;!S&&P>=1&&(S=1),S===1&&b--,b=Math.min(b,h+1),!!(b%2)&&(f==="reverse"?(S=1-S,d&&(S-=d/a)):f==="mirror"&&(T=o)),x=At(0,1,S)*a}let A;v?(this.delayState.value=l[0],A=this.delayState):A=T.next(x),r&&!v&&(A.value=r(A.value));let{done:C}=A;!v&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return V&&p!==Rs&&(A.value=Wn(l,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return rt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(this.currentTime)}set time(e){e=it(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return zl(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(tt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=rt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=If,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Zf(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Wt=t=>t*180/Math.PI,Ls=t=>{const e=Wt(Math.atan2(t[1],t[0]));return ks(e)},Jf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ls,rotateZ:Ls,skewX:t=>Wt(Math.atan(t[1])),skewY:t=>Wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ks=t=>(t=t%360,t<0&&(t+=360),t),Ho=Ls,zo=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),_o=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Qf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zo,scaleY:_o,scale:t=>(zo(t)+_o(t))/2,rotateX:t=>ks(Wt(Math.atan2(t[6],t[5]))),rotateY:t=>ks(Wt(Math.atan2(-t[2],t[0]))),rotateZ:Ho,rotate:Ho,skewX:t=>Wt(Math.atan(t[4])),skewY:t=>Wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Bs(t){return t.includes("scale")?1:0}function Is(t,e){if(!t||t==="none")return Bs(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Qf,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Jf,i=a}if(!i)return Bs(e);const r=s[e],o=i[1].split(",").map(ed);return typeof r=="function"?r(o):o[r]}const td=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Is(n,e)};function ed(t){return parseFloat(t.trim())}const de=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pe=new Set([...de,"pathRotation"]),Xo=t=>t===fe||t===M,nd=new Set(["x","y","z"]),sd=de.filter(t=>!nd.has(t));function id(t){const e=[];return sd.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const $t={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Is(e,"x"),y:(t,{transform:e})=>Is(e,"y")};$t.translateX=$t.x;$t.translateY=$t.y;const Ht=new Set;let Fs=!1,Os=!1,js=!1;function ql(){if(Os){const t=Array.from(Ht).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=id(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(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Os=!1,Fs=!1,Ht.forEach(t=>t.complete(js)),Ht.clear()}function Zl(){Ht.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Os=!0)})}function od(){js=!0,Zl(),ql(),js=!1}let ji=class{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ht.add(this),Fs||(Fs=!0,I.read(Zl),I.resolveKeyframes(ql))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Zf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ht.delete(this)}cancel(){this.state==="scheduled"&&(Ht.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};const rd=t=>t.startsWith("--");function Jl(t,e,n){rd(e)?t.style.setProperty(e,n):t.style[e]=n}const ad={};function Ql(t,e){const n=Pl(t);return()=>ad[e]??n()}const ld=Ql(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),tu=Ql(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Yo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pe([0,.65,.55,1]),circOut:Pe([.55,0,1,.45]),backIn:Pe([.31,.01,.66,-.59]),backOut:Pe([.33,1.53,.69,.99])};function eu(t,e){if(t)return typeof t=="function"?tu()?Gl(t,e):"ease-out":kl(t)?Pe(t):Array.isArray(t)?t.map(n=>eu(n,e)||Yo.easeOut):Yo[t]}function ud(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},c=void 0){const l={[e]:n};u&&(l.offset=u);const h=eu(a,i);Array.isArray(h)&&(l.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(l,f)}function Ni(t){return typeof t=="function"&&"applyToOptions"in t}function cd({type:t,...e}){return Ni(t)&&tu()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}let nu=class extends Oi{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Mi(typeof e.type!="string");const c=cd(e);this.animation=ud(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=Wn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Jl(n,s,l),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return rt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=it(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ld()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),ut):i(this)}};const su={anticipate:Ml,backInOut:Cl,circInOut:Dl};function hd(t){return t in su}function fd(t){typeof t.ease=="string"&&hd(t.ease)&&(t.ease=su[t.ease])}const ns=10;let dd=class extends nu{constructor(e){fd(e),Yl(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new bn({...o,autoplay:!1}),u=Math.max(ns,tt.now()-this.startTime),c=At(0,ns,u-ns),l=a.sample(u).value,{name:h}=this.options;r&&h&&Jl(r,h,l),n.setWithVelocity(a.sample(Math.max(0,u-c)).value,l,c),a.stop()}};const qo=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(gt.test(t)||t==="0")&&!t.startsWith("url("));function pd(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 md(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=qo(i,e),a=qo(r,e);return!o||!a?!1:pd(t)||(n==="spring"||Ni(n))&&s}function Ns(t){t.duration=0,t.type="keyframes"}const iu=new Set(["opacity","clipPath","filter","transform"]),gd=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function yd(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&gd.test(t[e]))return!0;return!1}const vd=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),xd=Pl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Td(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return xd()&&n&&(iu.has(n)||vd.has(n)&&yd(a))&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const wd=40;let Pd=class extends Oi{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:c,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:u,motionValue:c,element:l,...h},d=l?.KeyframeResolver||ji;this.keyframeResolver=new d(a,(p,m,g)=>this.onKeyframesResolved(p,m,f,!g),u,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:c,onUpdate:l}=s;this.resolvedAt=tt.now();let h=!0;md(e,r,o,a)||(h=!1,(Et.instantAnimations||!u)&&l?.(Wn(e,s,n)),e[0]=e[e.length-1],Ns(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>wd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=h&&!c&&Td(d),m=d.motionValue?.owner?.current;let g;if(p)try{g=new dd({...d,element:m})}catch{g=new bn(d)}else g=new bn(d);g.finished.then(()=>{this.notifyFinished()}).catch(ut),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),od()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};class Sd{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Zo(this.animations,"duration")}get iterationDuration(){return Zo(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Zo(t,e){let n=0;for(let s=0;s<t.length;s++){const i=t[s][e];i!==null&&i>n&&(n=i)}return n}class Ad extends Sd{then(e,n){return this.finished.finally(e).then(()=>{})}}function ou(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,l)=>c.sortNodePosition(l)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Jo=30,bd=t=>!isNaN(parseFloat(t));let Vd=class{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bd(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new $i);const s=this.events[e].add(n);return e==="change"?()=>{s(),I.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Jo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jo);return Sl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Yt(t,e){return new Vd(t,e)}function ru(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Ui(t,e){const n=t?.[e]??t?.default??t;return n!==t?ru(n,t):n}const Cd={type:"spring",stiffness:500,damping:25,restSpeed:10},Md=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),$d={type:"keyframes",duration:.8},Dd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ed=(t,{keyframes:e})=>e.length>2?$d:pe.has(t)?t.startsWith("scale")?Md(e[1]):Cd:Dd,Rd=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ld(t){for(const e in t)if(!Rd.has(e))return!0;return!1}const Wi=(t,e,n,s={},i,r)=>o=>{const a=Ui(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-it(u);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Ld(a)||Object.assign(l,Ed(t,l)),l.duration&&(l.duration=it(l.duration)),l.repeatDelay&&(l.repeatDelay=it(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Ns(l),l.delay===0&&(h=!0)),(Et.instantAnimations||Et.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ns(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=Wn(l.keyframes,a);if(f!==void 0){I.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new bn(l):new Pd(l)},kd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bd(t){const e=kd.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function au(t,e,n=1){const[s,i]=Bd(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return xl(o)?parseFloat(o):o}return Li(i)?au(i,e,n+1):i}function Qo(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ki(t,e,n,s){if(typeof e=="function"){const[i,r]=Qo(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Qo(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function zt(t,e,n){const s=t.getProps();return Ki(s,e,n!==void 0?n:s.custom,t)}const lu=new Set(["width","height","top","left","right","bottom",...de]),Us=t=>Array.isArray(t);function Id(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Yt(n))}function Fd(t){return Us(t)?t[t.length-1]||0:t}function Od(t,e){const n=zt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Fd(r[o]);Id(t,o,a)}}const X=t=>!!(t&&t.getVelocity);function jd(t){return!!(X(t)&&t.add)}function Ws(t,e){const n=t.getValue("willChange");if(jd(n))return n.add(e);if(!n&&Et.WillChange){const s=new Et.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Gi(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Nd="framerAppearId",uu="data-"+Gi(Nd);function cu(t){return t.props[uu]}function Ud({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Hi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?ru(r,u):u;const c=r?.reduceMotion,l=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=r?.path;d&&d.animateVisualElement(t,a,r,n,h);for(const p in a){const m=t.getValue(p,t.latestValues[p]??null),g=a[p];if(g===void 0||f&&Ud(f,p))continue;const y={delay:n,...Ui(r||{},p)};l&&(y.skipAnimations=!0);const v=m.get();if(v!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===v&&!y.velocity){I.update(()=>m.set(g));continue}let x=!1;if(window.MotionHandoffAnimation){const C=cu(t);if(C){const V=window.MotionHandoffAnimation(C,p,I);V!==null&&(y.startTime=V,x=!0)}}Ws(t,p);const T=c??t.shouldReduceMotion;m.start(Wi(p,m,g,T&&lu.has(p)?{type:!1}:y,t,x));const A=m.animation;A&&h.push(A)}if(o){const p=()=>I.update(()=>{o&&Od(t,o)});h.length?Promise.all(h).then(p):p()}return h}function Ks(t,e,n={}){const s=zt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Hi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:l,staggerDirection:h}=i;return Wd(t,e,u,c,l,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Wd(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(Ks(u,e,{...o,delay:n+(typeof s=="function"?0:s)+ou(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function Kd(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ks(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ks(t,e,n);else{const i=typeof e=="function"?zt(t,e,n.custom):e;s=Promise.all(Hi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Gd={test:t=>t==="auto",parse:t=>t},hu=t=>e=>e.test(t),fu=[fe,M,Pt,Vt,yf,gf,Gd],tr=t=>fu.find(hu(t));function Hd(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||wl(t):!0}const zd=new Set(["brightness","contrast","saturate","opacity"]);function _d(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ki)||[];if(!s)return t;const i=n.replace(s,"");let r=zd.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Xd=/\b([a-z-]*)\(.*?\)/gu,Gs={...gt,getAnimatableNone:t=>{const e=t.match(Xd);return e?e.map(_d).join(" "):t}},Hs={...gt,getAnimatableNone:t=>{const e=gt.parse(t);return gt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},er={...fe,transform:Math.round},Yd={rotate:Vt,pathRotation:Vt,rotateX:Vt,rotateY:Vt,rotateZ:Vt,scale:Ze,scaleX:Ze,scaleY:Ze,scaleZ:Ze,skew:Vt,skewX:Vt,skewY:Vt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Re,originX:No,originY:No,originZ:M},Vn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,inset:M,insetBlock:M,insetBlockStart:M,insetBlockEnd:M,insetInline:M,insetInlineStart:M,insetInlineEnd:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,paddingBlock:M,paddingBlockStart:M,paddingBlockEnd:M,paddingInline:M,paddingInlineStart:M,paddingInlineEnd:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,marginBlock:M,marginBlockStart:M,marginBlockEnd:M,marginInline:M,marginInlineStart:M,marginInlineEnd:M,fontSize:M,backgroundPositionX:M,backgroundPositionY:M,...Yd,zIndex:er,fillOpacity:Re,strokeOpacity:Re,numOctaves:er},qd={...Vn,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:Gs,WebkitFilter:Gs,mask:Hs,WebkitMask:Hs},du=t=>qd[t],Zd=new Set([Gs,Hs]);function pu(t,e){let n=du(t);return Zd.has(n)||(n=gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Jd=new Set(["auto","none","0"]);function Qd(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Jd.has(r)&&ue(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=pu(n,i)}let tp=class extends ji{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let h=e[l];if(typeof h=="string"&&(h=h.trim(),Li(h))){const f=au(h,n.current);f!==void 0&&(e[l]=f),l===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!lu.has(s)||e.length!==2)return;const[i,r]=e,o=tr(i),a=tr(r),u=jo(i),c=jo(r);if(u!==c&&$t[s]){this.needsMeasurement=!0;return}if(o!==a)if(Xo(o)&&Xo(a))for(let l=0;l<e.length;l++){const h=e[l];typeof h=="string"&&(e[l]=parseFloat(h))}else $t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Hd(e[i]))&&s.push(i);s.length&&Qd(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=$t[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=$t[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}};function zi(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const zs=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function an(t){return Tl(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:_i}=Bl(queueMicrotask,!1),pt={x:!1,y:!1};function mu(){return pt.x||pt.y}function ep(t){return t==="x"||t==="y"?pt[t]?null:(pt[t]=!0,()=>{pt[t]=!1}):pt.x||pt.y?null:(pt.x=pt.y=!0,()=>{pt.x=pt.y=!1})}function gu(t,e){const n=zi(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function np(t){return!(t.pointerType==="touch"||mu())}function sp(t,e,n={}){const[s,i,r]=gu(t,n);return s.forEach(o=>{let a=!1,u=!1,c;const l=()=>{o.removeEventListener("pointerleave",p)},h=g=>{c&&(c(g),c=void 0),l()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},m=g=>{if(!np(g))return;u=!1;const y=e(o,g);typeof y=="function"&&(c=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const yu=(t,e)=>e?t===e?!0:yu(t,e.parentElement):!1,Xi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ip=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function op(t){return ip.has(t.tagName)||t.isContentEditable===!0}const rp=new Set(["INPUT","SELECT","TEXTAREA"]);function ap(t){return rp.has(t.tagName)||t.isContentEditable===!0}const ln=new WeakSet;function nr(t){return e=>{e.key==="Enter"&&t(e)}}function ss(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const lp=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=nr(()=>{if(ln.has(n))return;ss(n,"down");const i=nr(()=>{ss(n,"up")}),r=()=>ss(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function sr(t){return Xi(t)&&!mu()}const ir=new WeakSet;function up(t,e,n={}){const[s,i,r]=gu(t,n),o=a=>{const u=a.currentTarget;if(!sr(a)||ir.has(a))return;ln.add(u),n.stopPropagation&&ir.add(a);const c=e(u,a),l=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),ln.has(u)&&ln.delete(u),sr(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{l(d,u===window||u===document||n.useGlobalTarget||yu(u,d.target))},f=d=>{l(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),an(a)&&(a.addEventListener("focus",c=>lp(c,i)),!op(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Kn(t){return Tl(t)&&"ownerSVGElement"in t}const un=new WeakMap;let cn;const vu=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Kn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],cp=vu("inline","width","offsetWidth"),hp=vu("block","height","offsetHeight");function fp({target:t,borderBoxSize:e}){un.get(t)?.forEach(n=>{n(t,{get width(){return cp(t,e)},get height(){return hp(t,e)}})})}function dp(t){t.forEach(fp)}function pp(){typeof ResizeObserver>"u"||(cn=new ResizeObserver(dp))}function mp(t,e){cn||pp();const n=zi(t);return n.forEach(s=>{let i=un.get(s);i||(i=new Set,un.set(s,i)),i.add(e),cn?.observe(s)}),()=>{n.forEach(s=>{const i=un.get(s);i?.delete(e),i?.size||cn?.unobserve(s)})}}const hn=new Set;let ne;function gp(){ne=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};hn.forEach(e=>e(t))},window.addEventListener("resize",ne)}function yp(t){return hn.add(t),ne||gp(),()=>{hn.delete(t),!hn.size&&typeof ne=="function"&&(window.removeEventListener("resize",ne),ne=void 0)}}function or(t,e){return typeof t=="function"?yp(t):mp(t,e)}function xu(t){return Kn(t)&&t.tagName==="svg"}const vp=[...fu,H,gt],xp=t=>vp.find(hu(t)),rr=()=>({translate:0,scale:1,origin:0,originPoint:0}),se=()=>({x:rr(),y:rr()}),ar=()=>({min:0,max:0}),G=()=>({x:ar(),y:ar()}),ke=new WeakMap;function Gn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Be(t){return typeof t=="string"||Array.isArray(t)}const Yi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qi=["initial",...Yi];function Hn(t){return Gn(t.animate)||qi.some(e=>Be(t[e]))}function Tu(t){return!!(Hn(t)||t.variants)}function Tp(t,e,n){for(const s in e){const i=e[s],r=n[s];if(X(i))t.addValue(s,i);else if(X(r))t.addValue(s,Yt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Yt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const _s={current:null},wu={current:!1},wp=typeof window<"u";function Pp(){if(wu.current=!0,!!wp)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_s.current=t.matches;t.addEventListener("change",e),e()}else _s.current=!1}const lr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Cn={};function Pu(t){Cn=t}function Sp(){return Cn}let Su=class{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ji,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=tt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,I.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;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.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Hn(n),this.isVariantNode=Tu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];c[d]!==void 0&&X(p)&&p.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,ke.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(wu.current||Pp(),this.shouldReduceMotion=_s.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&iu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:l}=n.accelerate,h=new nu({element:this.current,name:e,keyframes:a,times:u,ease:c,duration:it(l)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=pe.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&I.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 Cn){const n=Cn[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}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<lr.length;s++){const i=lr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Tp(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=Yt(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"&&(xl(s)||wl(s))?s=parseFloat(s):!xp(s)&&gt.test(n)&&(s=pu(e,n)),this.setBaseTarget(e,X(s)?s.get():s)),X(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Ki(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!X(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 $i),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_i.render(this.render)}},Au=class extends Su{constructor(){super(...arguments),this.KeyframeResolver=tp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}},Bt=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function bu({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ap({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bp(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 is(t){return t===void 0||t===1}function Xs({scale:t,scaleX:e,scaleY:n}){return!is(t)||!is(e)||!is(n)}function jt(t){return Xs(t)||Vu(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Vu(t){return ur(t.x)||ur(t.y)}function ur(t){return t&&t!=="0%"}function Mn(t,e,n){const s=t-n,i=e*s;return n+i}function cr(t,e,n,s,i){return i!==void 0&&(t=Mn(t,i,s)),Mn(t,n,s)+e}function Ys(t,e=0,n=1,s,i){t.min=cr(t.min,e,n,s,i),t.max=cr(t.max,e,n,s,i)}function Cu(t,{x:e,y:n}){Ys(t.x,e.translate,e.scale,e.originPoint),Ys(t.y,n.translate,n.scale,n.originPoint)}const hr=.999999999999,fr=1.0000000000001;function Vp(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Tt(t.x,-r.scroll.offset.x),Tt(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Cu(t,o)),s&&jt(r.latestValues)&&fn(t,r.latestValues,r.layout?.layoutBox))}e.x<fr&&e.x>hr&&(e.x=1),e.y<fr&&e.y>hr&&(e.y=1)}function Tt(t,e){t.min+=e,t.max+=e}function dr(t,e,n,s,i=.5){const r=k(t.min,t.max,i);Ys(t,e,n,r,s)}function pr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function fn(t,e,n){const s=n??t;dr(t.x,pr(e.x,s.x),e.scaleX,e.scale,e.originX),dr(t.y,pr(e.y,s.y),e.scaleY,e.scale,e.originY)}function Mu(t,e){return bu(bp(t.getBoundingClientRect(),e))}function Cp(t,e,n){const s=Mu(t,n),{scroll:i}=e;return i&&(Tt(s.x,i.offset.x),Tt(s.y,i.offset.y)),s}const Mp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$p=de.length;function Dp(t,e,n){let s="",i=!0;for(let o=0;o<$p;o++){const a=de[o],u=t[a];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(a.startsWith("scale")?1:0);else{const l=parseFloat(u);c=a.startsWith("scale")?l===1:l===0}if(!c||n){const l=zs(u,Vn[a]);if(!c){i=!1;const h=Mp[a]||a;s+=`${h}(${l}) `}n&&(e[a]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${zs(r,Vn.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Zi(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const c=e[u];if(pe.has(u)){o=!0;continue}else if(Fl(u)){i[u]=c;continue}else{const l=zs(c,Vn[u]);u.startsWith("origin")?(a=!0,r[u]=l):s[u]=l}}if(e.transform||(o||n?s.transform=Dp(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:c="50%",originZ:l=0}=r;s.transformOrigin=`${u} ${c} ${l}`}}function $u(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Te={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=mr(t,e.target.x),s=mr(t,e.target.y);return`${n}% ${s}%`}},Ep={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=gt.parse(t);if(i.length>5)return s;const r=gt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=u;const c=k(a,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},qs={borderRadius:{...Te,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomLeftRadius:Te,borderBottomRightRadius:Te,boxShadow:Ep};function Du(t,{layout:e,layoutId:n}){return pe.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!qs[t]||t==="opacity")}function Ji(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(X(s[o])||i&&X(i[o])||Du(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function Rp(t){return window.getComputedStyle(t)}let Eu=class extends Au{constructor(){super(...arguments),this.type="html",this.renderInstance=$u}readValueFromInstance(e,n){if(pe.has(n))return this.projection?.isProjecting?Bs(n):td(e,n);{const s=Rp(e),i=(Fl(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Mu(e,n)}build(e,n,s){Zi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ji(e,n,s)}};function Lp(t,e){return t in e}class kp extends Su{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Lp(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return G()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}const Bp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ip={offset:"strokeDashoffset",array:"strokeDasharray"};function Fp(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Bp:Ip;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Op=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ru(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},u,c,l){if(Zi(t,a,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=l?.transformBox??"fill-box",delete h.transformBox);for(const d of Op)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Fp(h,i,r,o,!1)}const Lu=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"]),ku=t=>typeof t=="string"&&t.toLowerCase()==="svg";function jp(t,e,n,s){$u(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Lu.has(i)?i:Gi(i),e.attrs[i])}function Bu(t,e,n){const s=Ji(t,e,n);for(const i in t)if(X(t[i])||X(e[i])){const r=de.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}let Iu=class extends Au{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(pe.has(n)){const s=du(n);return s&&s.default||0}return n=Lu.has(n)?n:Gi(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Bu(e,n,s)}build(e,n,s){Ru(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){jp(e,n,s,i)}mount(e){this.isSVGTag=ku(e.tagName),super.mount(e)}};const Np=qi.length;function Fu(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Fu(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Np;n++){const s=qi[n],i=t.props[s];(Be(i)||i===!1)&&(e[s]=i)}return e}function Ou(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 Up=[...Yi].reverse(),Wp=Yi.length;function Kp(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Kd(t,n,s)))}function Gp(t){let e=Kp(t),n=gr(),s=!0,i=!1;const r=c=>(l,h)=>{const f=zt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;l={...l,...m,...p}}return l};function o(c){e=c(t)}function a(c){const{props:l}=t,h=Fu(t.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let y=0;y<Wp;y++){const v=Up[y],x=n[v],T=l[v]!==void 0?l[v]:h[v],A=Be(T),C=v===c?x.isActive:null;C===!1&&(m=y);let V=T===h[v]&&T!==l[v]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),x.protectedKeys={...p},!x.isActive&&C===null||!T&&!x.prevProp||Gn(T)||typeof T=="boolean")continue;if(v==="exit"&&x.isActive&&C!==!0){x.prevResolvedValues&&(p={...p,...x.prevResolvedValues});continue}const P=Hp(x.prevProp,T);let b=P||v===c&&x.isActive&&!V&&A||y>m&&A,S=!1;const D=Array.isArray(T)?T:[T];let R=D.reduce(r(v),{});C===!1&&(R={});const{prevResolvedValues:j={}}=x,O={...j,...R},U=E=>{b=!0,d.has(E)&&(S=!0,d.delete(E)),x.needsAnimating[E]=!0;const L=t.getValue(E);L&&(L.liveStyle=!1)};for(const E in O){const L=R[E],Y=j[E];if(p.hasOwnProperty(E))continue;let Q=!1;Us(L)&&Us(Y)?Q=!Ou(L,Y)||P:Q=L!==Y,Q?L!=null?U(E):d.add(E):L!==void 0&&d.has(E)?U(E):x.protectedKeys[E]=!0}x.prevProp=T,x.prevResolvedValues=R,x.isActive&&(p={...p,...R}),(s||i)&&t.blockInitialAnimation&&(b=!1);const N=V&&P;b&&(!N||S)&&f.push(...D.map(E=>{const L={type:v};if(typeof E=="string"&&(s||i)&&!N&&t.manuallyAnimateOnMount&&t.parent){const{parent:Y}=t,Q=zt(Y,E);if(Y.enteringChildren&&Q){const{delayChildren:qt}=Q.transition||{};L.delay=ou(Y.enteringChildren,t,qt)}}return{animation:E,options:L}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const v=zt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=t.getBaseTarget(v),T=t.getValue(v);T&&(T.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function u(c,l){if(n[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=gr(),i=!0}}}function Hp(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ou(e,t):!1}function Ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gr(){return{animate:Ft(!0),whileInView:Ft(),whileHover:Ft(),whileTap:Ft(),whileDrag:Ft(),whileFocus:Ft(),exit:Ft()}}function Zs(t,e){t.min=e.min,t.max=e.max}function ft(t,e){Zs(t.x,e.x),Zs(t.y,e.y)}function yr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const ju=1e-4,zp=1-ju,_p=1+ju,Nu=.01,Xp=0-Nu,Yp=0+Nu;function et(t){return t.max-t.min}function qp(t,e,n){return Math.abs(t-e)<=n}function vr(t,e,n,s=.5){t.origin=s,t.originPoint=k(e.min,e.max,t.origin),t.scale=et(n)/et(e),t.translate=k(n.min,n.max,t.origin)-t.originPoint,(t.scale>=zp&&t.scale<=_p||isNaN(t.scale))&&(t.scale=1),(t.translate>=Xp&&t.translate<=Yp||isNaN(t.translate))&&(t.translate=0)}function Ve(t,e,n,s){vr(t.x,e.x,n.x,s?s.originX:void 0),vr(t.y,e.y,n.y,s?s.originY:void 0)}function xr(t,e,n,s=0){const i=s?k(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+et(e)}function Zp(t,e,n,s){xr(t.x,e.x,n.x,s?.x),xr(t.y,e.y,n.y,s?.y)}function Tr(t,e,n,s=0){const i=s?k(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+et(e)}function $n(t,e,n,s){Tr(t.x,e.x,n.x,s?.x),Tr(t.y,e.y,n.y,s?.y)}function wr(t,e,n,s,i){return t-=e,t=Mn(t,1/n,s),i!==void 0&&(t=Mn(t,1/i,s)),t}function Jp(t,e=0,n=1,s=.5,i,r=t,o=t){if(Pt.test(e)&&(e=parseFloat(e),e=k(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=k(r.min,r.max,s);t===r&&(a-=e),t.min=wr(t.min,e,n,a,i),t.max=wr(t.max,e,n,a,i)}function Pr(t,e,[n,s,i],r,o){Jp(t,e[n],e[s],e[i],e.scale,r,o)}const Qp=["x","scaleX","originX"],tm=["y","scaleY","originY"];function Sr(t,e,n,s){Pr(t.x,e,Qp,n?n.x:void 0,s?s.x:void 0),Pr(t.y,e,tm,n?n.y:void 0,s?s.y:void 0)}function Ar(t){return t.translate===0&&t.scale===1}function Uu(t){return Ar(t.x)&&Ar(t.y)}function br(t,e){return t.min===e.min&&t.max===e.max}function em(t,e){return br(t.x,e.x)&&br(t.y,e.y)}function Vr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Wu(t,e){return Vr(t.x,e.x)&&Vr(t.y,e.y)}function Cr(t){return et(t.x)/et(t.y)}function Mr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function vt(t){return[t("x"),t("y")]}function nm(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:l,pathRotation:h,rotateX:f,rotateY:d,skewX:p,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),l&&(s+=`rotate(${l}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),p&&(s+=`skewX(${p}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Ku=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],sm=Ku.length,$r=t=>typeof t=="string"?parseFloat(t):t,Dr=t=>typeof t=="number"||M.test(t);function im(t,e,n,s,i,r){i?(t.opacity=k(0,n.opacity??1,om(s)),t.opacityExit=k(e.opacity??1,0,rm(s))):r&&(t.opacity=k(e.opacity??1,n.opacity??1,s));for(let o=0;o<sm;o++){const a=Ku[o];let u=Er(e,a),c=Er(n,a);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Dr(u)===Dr(c)?(t[a]=Math.max(k($r(u),$r(c),s),0),(Pt.test(c)||Pt.test(u))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=k(e.rotate||0,n.rotate||0,s))}function Er(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const om=Gu(0,.5,$l),rm=Gu(.5,.95,ut);function Gu(t,e,n){return s=>s<t?0:s>e?1:n(le(t,e,s))}function Hu(t,e,n){const s=X(t)?t:Yt(t);return s.start(Wi("",s,e,n)),s.animation}function Ie(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const am=(t,e)=>t.depth-e.depth;let lm=class{constructor(){this.children=[],this.isDirty=!1}add(e){Ci(this.children,e),this.isDirty=!0}remove(e){ae(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(am),this.isDirty=!1,this.children.forEach(e)}};function um(t,e){const n=tt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Rt(s),t(r-e))};return I.setup(s,!0),()=>Rt(s)}function dn(t){return X(t)?t.get():t}let cm=class{constructor(){this.members=[]}add(e){Ci(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ae(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(ae(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};const pn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},os=["","X","Y","Z"],hm=1e3;let fm=0;function rs(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function zu(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=cu(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&zu(s)}function _u({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=fm++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(mm),this.nodes.forEach(wm),this.nodes.forEach(Pm),this.nodes.forEach(gm)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new lm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new $i),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Kn(o)&&!xu(o),this.instance=o;const{layoutId:a,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let l,h=0;const f=()=>this.root.updateBlockedByResize=!1;I.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,l&&l(),l=um(f,250),pn.hasAnimatedSinceResize&&(pn.hasAnimatedSinceResize=!1,this.nodes.forEach(kr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Cm,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Wu(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Ui(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(l,v,x.path)}else h||kr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(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(Sm),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(vm),this.nodes.forEach(Rr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Lr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xm),this.nodes.forEach(Tm),this.nodes.forEach(dm),this.nodes.forEach(pm)):this.nodes.forEach(Lr),this.clearAllSnapshots();const a=tt.now();q.delta=At(0,1e3/60,a-q.timestamp),q.timestamp=a,q.isProcessing=!0,Zn.update.process(q),Zn.preRender.process(q),Zn.render.process(q),q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_i.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ym),this.sharedNodes.forEach(Am)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!et(this.snapshot.measuredBox.x)&&!et(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=G()),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Uu(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,l=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||jt(this.latestValues)||l)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),Mm(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return G();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some($m))){const{scroll:c}=this.root;c&&(Tt(a.x,c.offset.x),Tt(a.y,c.offset.y))}return a}removeElementScroll(o){const a=G();if(ft(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:l,options:h}=c;c!==this.root&&l&&h.layoutScroll&&(l.wasRoot&&ft(a,o),Tt(a.x,l.offset.x),Tt(a.y,l.offset.y))}return a}applyTransform(o,a=!1,u){const c=u||G();ft(c,o);for(let l=0;l<this.path.length;l++){const h=this.path[l];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Tt(c.x,-h.scroll.offset.x),Tt(c.y,-h.scroll.offset.y)),jt(h.latestValues)&&fn(c,h.latestValues,h.layout?.layoutBox)}return jt(this.latestValues)&&fn(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=G();ft(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!jt(c.latestValues))continue;let l;c.instance&&(Xs(c.latestValues)&&c.updateSnapshot(),l=G(),ft(l,c.measurePageBox())),Sr(a,c.latestValues,c.snapshot?.layoutBox,l)}return jt(this.latestValues)&&Sr(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==q.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:h}=this.options;if(!this.layout||!(l||h))return;this.resolvedRelativeTargetAt=q.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zp(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ft(this.target,this.layout.layoutBox),Cu(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Xs(this.parent.latestValues)||Vu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),$n(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),ft(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===q.timestamp&&(u=!1),u)return;const{layout:c,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||l))return;ft(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Vp(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=G());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yr(this.prevProjectionDelta.x,this.projectionDelta.x),yr(this.prevProjectionDelta.y,this.projectionDelta.y)),Ve(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Mr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=se(),this.projectionDelta=se(),this.projectionDeltaWithTransform=se()}setAnimationOrigin(o,a=!1,u){const c=this.snapshot,l=c?c.latestValues:{},h={...this.latestValues},f=se();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=G(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,y=this.getStack(),v=!y||y.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(Vm));this.animationProgress=0;let T;const A=u?.interpolateProjection(o);this.mixTargetDelta=C=>{const V=C/1e3,P=A?.(V);P?(f.x.translate=P.x,f.x.scale=k(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=P.y,f.y.scale=k(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Br(f.x,o.x,V),Br(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),bm(this.relativeTarget,this.relativeTargetOrigin,d,V),T&&em(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=G()),ft(T,this.relativeTarget)),g&&(this.animationValues=h,im(h,l,this.latestValues,V,x,v)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{pn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Yt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hu(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:l}=o;if(!(!a||!u||!c)){if(this!==o&&this.layout&&c&&Xu(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||G();const h=et(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const f=et(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}ft(a,u),fn(a,l),Ve(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new cm),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&rs("z",o,c,this.animationValues);for(let l=0;l<os.length;l++)rs(`rotate${os[l]}`,o,c,this.animationValues),rs(`skew${os[l]}`,o,c,this.animationValues);o.render();for(const l in c)o.setStaticValue(l,c[l]),this.animationValues&&(this.animationValues[l]=c[l]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=dn(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=dn(a?.pointerEvents)||""),this.hasProjected&&!jt(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const l=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=nm(this.projectionDeltaWithTransform,this.treeScale,l);u&&(h=u(l,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?o.opacity=c===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=c===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const p in qs){if(l[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=qs[p],v=h==="none"?l[p]:m(l[p],c);if(g){const x=g.length;for(let T=0;T<x;T++)o[g[T]]=v}else y?this.options.visualElement.renderState.vars[p]=v:o[p]=v}this.options.layoutId&&(o.pointerEvents=c===this?dn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Rr),this.root.sharedNodes.clear()}}}function dm(t){t.updateLayout()}function pm(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")vt(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=et(h);h.min=n[l].min,h.max=h.min+f});else if(i==="x"||i==="y"){const l=i==="x"?"y":"x";Zs(r?e.measuredBox[l]:e.layoutBox[l],n[l])}else Xu(i,e.layoutBox,n)&&vt(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=et(n[l]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+f)});const o=se();Ve(o,n,e.layoutBox);const a=se();r?Ve(a,t.applyTransform(s,!0),e.measuredBox):Ve(a,n,e.layoutBox);const u=!Uu(o);let c=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:h,layout:f}=l;if(h&&f){const d=t.options.layoutAnchor||void 0,p=G();$n(p,e.layoutBox,h.layoutBox,d);const m=G();$n(m,n,f.layoutBox,d),Wu(p,m)||(c=!0),l.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function mm(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 gm(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ym(t){t.clearSnapshot()}function Rr(t){t.clearMeasurements()}function vm(t){t.isLayoutDirty=!0,t.updateLayout()}function Lr(t){t.isLayoutDirty=!1}function xm(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Tm(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function kr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wm(t){t.resolveTargetDelta()}function Pm(t){t.calcProjection()}function Sm(t){t.resetSkewAndRotation()}function Am(t){t.removeLeadSnapshot()}function Br(t,e,n){t.translate=k(e.translate,0,n),t.scale=k(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ir(t,e,n,s){t.min=k(e.min,n.min,s),t.max=k(e.max,n.max,s)}function bm(t,e,n,s){Ir(t.x,e.x,n.x,s),Ir(t.y,e.y,n.y,s)}function Vm(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Cm={duration:.45,ease:[.4,0,.1,1]},Fr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Or=Fr("applewebkit/")&&!Fr("chrome/")?Math.round:ut;function jr(t){t.min=Or(t.min),t.max=Or(t.max)}function Mm(t){jr(t.x),jr(t.y)}function Xu(t,e,n){return t==="position"||t==="preserve-aspect"&&!qp(Cr(e),Cr(n),.2)}function $m(t){return t!==t.root&&t.scroll?.wasRoot}const Dm=_u({attachResizeListener:(t,e)=>Ie(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),as={current:void 0},Yu=_u({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!as.current){const t=new Dm({});t.mount(window),t.setOptions({layoutScroll:!0}),as.current=t}return as.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Qi=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Nr(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Em(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Nr(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Nr(t[i],null)}}}}function Rm(...t){return w.useCallback(Em(...t),t)}class Lm extends w.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(an(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=an(s)&&s.offsetWidth||0,r=an(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function km({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){const o=w.useId(),a=w.useRef(null),u=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=w.useContext(Qi),l=t.props?.ref??t?.ref,h=Rm(a,l);return w.useInsertionEffect(()=>{const{width:f,height:d,top:p,left:m,right:g,bottom:y,direction:v}=u.current;if(e||r===!1||!a.current||!f||!d)return;const x=v==="rtl",T=n==="left"?x?`right: ${g}`:`left: ${m}`:x?`left: ${m}`:`right: ${g}`,A=s==="bottom"?`bottom: ${y}`:`top: ${p}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");c&&(C.nonce=c);const V=i??document.head;return V.appendChild(C),C.sheet&&C.sheet.insertRule(`
2
- [data-motion-pop-id="${o}"] {
3
- position: absolute !important;
4
- width: ${f}px !important;
5
- height: ${d}px !important;
6
- ${T}px !important;
7
- ${A}px !important;
8
- }
9
- `),()=>{a.current?.removeAttribute("data-motion-pop-id"),V.contains(C)&&V.removeChild(C)}},[e]),lt.jsx(Lm,{isPresent:e,childRef:a,sizeRef:u,pop:r,children:r===!1?t:w.cloneElement(t,{ref:h})})}const Bm=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:u,root:c})=>{const l=Vi(Im),h=w.useId();let f=!0,d=w.useMemo(()=>(f=!1,{id:h,initial:e,isPresent:n,custom:i,onExitComplete:p=>{l.set(p,!0);for(const m of l.values())if(!m)return;s&&s()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,s]);return r&&f&&(d={...d}),w.useMemo(()=>{l.forEach((p,m)=>l.set(m,!1))},[n]),w.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),t=lt.jsx(km,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:u,root:c,children:t}),lt.jsx(Un.Provider,{value:d,children:t})};function Im(){return new Map}function qu(t=!0){const e=w.useContext(Un);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{if(t)return i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Je=t=>t.key||"";function Ur(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const wT=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:u="top",root:c})=>{const[l,h]=qu(o),f=w.useMemo(()=>Ur(t),[t]),d=o&&!l?[]:f.map(Je),p=w.useRef(!0),m=w.useRef(f),g=Vi(()=>new Map),y=w.useRef(new Set),[v,x]=w.useState(f),[T,A]=w.useState(f);vl(()=>{p.current=!1,m.current=f;for(let P=0;P<T.length;P++){const b=Je(T[P]);d.includes(b)?(g.delete(b),y.current.delete(b)):g.get(b)!==!0&&g.set(b,!1)}},[T,d.length,d.join("-")]);const C=[];if(f!==v){let P=[...f];for(let b=0;b<T.length;b++){const S=T[b],D=Je(S);d.includes(D)||(P.splice(b,0,S),C.push(S))}return r==="wait"&&C.length&&(P=C),A(Ur(P)),x(f),null}const{forceRender:V}=w.useContext(bi);return lt.jsx(lt.Fragment,{children:T.map(P=>{const b=Je(P),S=o&&!l?!1:f===T||d.includes(b),D=()=>{if(y.current.has(b))return;if(g.has(b))y.current.add(b),g.set(b,!0);else return;let R=!0;g.forEach(j=>{j||(R=!1)}),R&&(V?.(),A(m.current),o&&h?.(),s&&s())};return lt.jsx(Bm,{isPresent:S,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:c,onExitComplete:S?void 0:D,anchorX:a,anchorY:u,children:P},b)})})},Zu=w.createContext({strict:!1}),Wr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Kr=!1;function Fm(){if(Kr)return;const t={};for(const e in Wr)t[e]={isEnabled:n=>Wr[e].some(s=>!!n[s])};Pu(t),Kr=!0}function Ju(){return Fm(),Sp()}function Om(t){const e=Ju();for(const n in t)e[n]={...e[n],...t[n]};Pu(e)}const jm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Dn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||jm.has(t)}let Qu=t=>!Dn(t);function Nm(t){typeof t=="function"&&(Qu=e=>e.startsWith("on")?!Dn(e):t(e))}try{Nm(require("@emotion/is-prop-valid").default)}catch{}function Um(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||X(t[i])||(Qu(i)||n===!0&&Dn(i)||!e&&!Dn(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const zn=w.createContext({});function Wm(t,e){if(Hn(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Be(n)?n:void 0,animate:Be(s)?s:void 0}}return t.inherit!==!1?e:{}}function Km(t){const{initial:e,animate:n}=Wm(t,w.useContext(zn));return w.useMemo(()=>({initial:e,animate:n}),[Gr(e),Gr(n)])}function Gr(t){return Array.isArray(t)?t.join(" "):t}const to=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tc(t,e,n){for(const s in e)!X(e[s])&&!Du(s,n)&&(t[s]=e[s])}function Gm({transformTemplate:t},e){return w.useMemo(()=>{const n=to();return Zi(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Hm(t,e){const n=t.style||{},s={};return tc(s,n,t),Object.assign(s,Gm(t,e)),s}function zm(t,e){const n={},s=Hm(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 ec=()=>({...to(),attrs:{}});function _m(t,e,n,s){const i=w.useMemo(()=>{const r=ec();return Ru(r,e,ku(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};tc(r,t.style,t),i.style={...r,...i.style}}return i}const Xm=["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 eo(t){return typeof t!="string"||t.includes("-")?!1:!!(Xm.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ym(t,e,n,{latestValues:s},i,r=!1,o){const u=(o??eo(t)?_m:zm)(e,s,i,t),c=Um(e,typeof t=="string",r),l=t!==w.Fragment?{...c,...u,ref:n}:{},{children:h}=e,f=w.useMemo(()=>X(h)?h.get():h,[h]);return w.createElement(t,{...l,children:f})}function qm({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Zm(n,s,i,t),renderState:e()}}function Zm(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=dn(r[f]);let{initial:o,animate:a}=t;const u=Hn(t),c=Tu(t);e&&c&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||o===!1;const h=l?a:o;if(h&&typeof h!="boolean"&&!Gn(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=Ki(t,f[d]);if(p){const{transitionEnd:m,transition:g,...y}=p;for(const v in y){let x=y[v];if(Array.isArray(x)){const T=l?x.length-1:0;x=x[T]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}}}return i}const nc=t=>(e,n)=>{const s=w.useContext(zn),i=w.useContext(Un),r=()=>qm(t,e,s,i);return n?r():Vi(r)},Jm=nc({scrapeMotionValuesFromProps:Ji,createRenderState:to}),Qm=nc({scrapeMotionValuesFromProps:Bu,createRenderState:ec}),tg=Symbol.for("motionComponentSymbol");function eg(t,e,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const i=w.useRef(null);return w.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const sc=w.createContext({});function Qt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ng(t,e,n,s,i,r){const{visualElement:o}=w.useContext(zn),a=w.useContext(Zu),u=w.useContext(Un),c=w.useContext(Qi),l=c.reducedMotion,h=c.skipAnimations,f=w.useRef(null),d=w.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:l,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=w.useContext(sc);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&sg(f.current,n,i,m);const g=w.useRef(!1);w.useInsertionEffect(()=>{p&&g.current&&p.update(n,u)});const y=n[uu],v=w.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return vl(()=>{d.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),w.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}function sg(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:c,layoutAnchor:l,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ic(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Qt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:l})}function ic(t){if(t)return t.options.allowProjection!==!1?t.projection:ic(t.parent)}function ls(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Om(s);const r=n?n==="svg":eo(t),o=r?Qm:Jm;function a(c,l){let h;const f={...w.useContext(Qi),...c,layoutId:ig(c)},{isStatic:d}=f,p=Km(c),m=o(c,d);if(!d&&typeof window<"u"){og();const g=rg(f);h=g.MeasureLayout,p.visualElement=ng(t,m,f,i,g.ProjectionNode,r)}return lt.jsxs(zn.Provider,{value:p,children:[h&&p.visualElement?lt.jsx(h,{visualElement:p.visualElement,...f}):null,Ym(t,c,eg(m,p.visualElement,l),m,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=w.forwardRef(a);return u[tg]=t,u}function ig({layoutId:t}){const e=w.useContext(bi).id;return e&&t!==void 0?e+"-"+t:t}function og(t,e){w.useContext(Zu).strict}function rg(t){const e=Ju(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function ag(t,e){if(typeof Proxy>"u")return ls;const n=new Map,s=(r,o)=>ls(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,ls(o,void 0,t,e)),n.get(o))})}const lg=(t,e)=>e.isSVG??eo(t)?new Iu(e):new Eu(e,{allowProjection:t!==w.Fragment});let ug=class extends Bt{constructor(e){super(e),e.animationState||(e.animationState=Gp(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Gn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},cg=0,hg=class extends Bt{constructor(){super(...arguments),this.id=cg++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=zt(this.node,r,o);if(a){const{transition:u,transitionEnd:c,...l}=a;for(const h in l)this.node.getValue(h)?.jump(l[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}};const fg={animation:{Feature:ug},exit:{Feature:hg}};function Ge(t){return{point:{x:t.pageX,y:t.pageY}}}const dg=t=>e=>Xi(e)&&t(e,Ge(e));function Ce(t,e,n,s){return Ie(t,e,dg(n),s)}const oc=({current:t})=>t?t.ownerDocument.defaultView:null,Hr=(t,e)=>Math.abs(t-e);function pg(t,e){const n=Hr(t.x,e.x),s=Hr(t.y,e.y);return Math.sqrt(n**2+s**2)}const zr=new Set(["auto","scroll"]);let rc=class{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Qe(this.lastRawMoveEventInfo,this.transformPagePoint));const d=us(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=pg(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=d,{timestamp:y}=q;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=Qe(p,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=us(d.type==="pointercancel"?this.lastMoveEventInfo:Qe(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,v),g&&g(d,v)},!Xi(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const u=Ge(e),c=Qe(u,this.transformPagePoint),{point:l}=c,{timestamp:h}=q;this.history=[{...l,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,us(c,this.history)),this.removeListeners=Ue(Ce(this.contextWindow,"pointermove",this.handlePointerMove),Ce(this.contextWindow,"pointerup",this.handlePointerUp),Ce(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(zr.has(s.overflowX)||zr.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Rt(this.updatePoint)}};function Qe(t,e){return e?{point:e(t.point)}:t}function _r(t,e){return{x:t.x-e.x,y:t.y-e.y}}function us({point:t},e){return{point:t,delta:_r(t,ac(e)),offset:_r(t,mg(e)),velocity:gg(e,.1)}}function mg(t){return t[0]}function ac(t){return t[t.length-1]}function gg(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=ac(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>it(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>it(e)*2&&(s=t[1]);const r=rt(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function yg(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?k(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?k(n,t,s.max):Math.min(t,n)),t}function Xr(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 vg(t,{top:e,left:n,bottom:s,right:i}){return{x:Xr(t.x,n,i),y:Xr(t.y,e,s)}}function Yr(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 xg(t,e){return{x:Yr(t.x,e.x),y:Yr(t.y,e.y)}}function Tg(t,e){let n=.5;const s=et(t),i=et(e);return i>s?n=le(e.min,e.max-s,t.min):s>i&&(n=le(t.min,t.max-i,e.min)),At(0,1,n)}function wg(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 Js=.35;function Pg(t=Js){return t===!1?t=0:t===!0&&(t=Js),{x:qr(t,"left","right"),y:qr(t,"top","bottom")}}function qr(t,e,n){return{min:Zr(t,e),max:Zr(t,n)}}function Zr(t,e){return typeof t=="number"?t:t[e]||0}const Sg=new WeakMap;let Ag=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),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 r=h=>{n&&this.snapToCursor(Ge(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ep(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Pt.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(v=et(T)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&I.update(()=>m(h,f),!1,!0),Ws(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=Vg(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&I.update(()=>g(h,f),!1,!0)},u=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new rc(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:s,contextWindow:oc(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&I.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!tn(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=yg(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Qt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=vg(s.layoutBox,e):this.constraints=!1,this.elastic=Pg(n),i!==this.constraints&&!Qt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&vt(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=wg(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Qt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=Cp(s,i.root,this.visualElement.getTransformPagePoint());let o=xg(i.layout.layoutBox,r);if(n){const a=n(Ap(o));this.hasMutatedConstraints=!!a,a&&(o=bu(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=vt(l=>{if(!tn(l,n,this.currentDirection))return;let h=u&&u[l]||{};(o===!0||o===l)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(l,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ws(this.visualElement,e),s.start(Wi(e,s,0,n,this.visualElement,!1))}stopAnimation(){vt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){vt(n=>{const{drag:s}=this.getProps();if(!tn(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],u=r.get()||0;r.set(e[n]-k(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Qt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};vt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();i[o]=Tg({min:u,max:u},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),vt(o=>{if(!tn(o,e,null))return;const a=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];a.set(k(u,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Sg.set(this.visualElement,this);const e=this.visualElement.current,n=Ce(e,"pointerdown",c=>{const{drag:l,dragListener:h=!0}=this.getProps(),f=c.target,d=f!==e&&ap(f);l&&h&&!d&&this.start(c)});let s;const i=()=>{const{dragConstraints:c}=this.getProps();Qt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),s||(s=bg(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),I.read(i);const a=Ie(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(vt(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Js,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}};function Jr(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function bg(t,e,n){const s=or(t,Jr(n)),i=or(e,Jr(n));return()=>{s(),i()}}function tn(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Vg(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}let Cg=class extends Bt{constructor(e){super(e),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new Ag(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};const cs=t=>(e,n)=>{t&&I.update(()=>t(e,n),!1,!0)};let Mg=class extends Bt{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(e){this.session=new rc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:cs(e),onStart:cs(n),onMove:cs(s),onEnd:(r,o)=>{delete this.session,i&&I.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Ce(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},hs=!1,$g=class extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),hs&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),hs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||I.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),_i.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;hs=!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 lc(t){const[e,n]=qu(),s=w.useContext(bi);return lt.jsx($g,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(sc),isPresent:e,safeToRemove:n})}const Dg={pan:{Feature:Mg},drag:{Feature:Cg,ProjectionNode:Yu,MeasureLayout:lc}};function Qr(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&I.postRender(()=>r(e,Ge(e)))}let Eg=class extends Bt{mount(){const{current:e}=this.node;e&&(this.unmount=sp(e,(n,s)=>(Qr(this.node,s,"Start"),i=>Qr(this.node,i,"End"))))}unmount(){}},Rg=class extends Bt{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=Ue(Ie(this.node.current,"focus",()=>this.onFocus()),Ie(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function ta(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),r=s[i];r&&I.postRender(()=>r(e,Ge(e)))}let Lg=class extends Bt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=up(e,(i,r)=>(ta(this.node,r,"Start"),(o,{success:a})=>ta(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}};const Qs=new WeakMap,fs=new WeakMap,kg=t=>{const e=Qs.get(t.target);e&&e(t)},Bg=t=>{t.forEach(kg)};function Ig({root:t,...e}){const n=t||document;fs.has(n)||fs.set(n,{});const s=fs.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Bg,{root:t,...e})),s[i]}function Fg(t,e,n){const s=Ig(e);return Qs.set(t,n),s.observe(t),()=>{Qs.delete(t),s.unobserve(t)}}const Og={some:0,all:1};let jg=class extends Bt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Og[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:l,onViewportLeave:h}=this.node.getProps(),f=c?l:h;f&&f(u)};this.stopObserver=Fg(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Ng(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ng({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ug={inView:{Feature:jg},tap:{Feature:Lg},focus:{Feature:Rg},hover:{Feature:Eg}},Wg={layout:{ProjectionNode:Yu,MeasureLayout:lc}},Kg={...fg,...Ug,...Dg,...Wg},LT=ag(Kg,lg);function no(t){return typeof t=="object"&&!Array.isArray(t)}function uc(t,e,n,s){return t==null?[]:typeof t=="string"&&no(e)?zi(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(i=>i!=null):[t]}function Gg(t,e,n){return t*(e+1)+n*e}function ea(t,e,n,s){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Hg(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ae(t,i),s--)}}function zg(t,e,n,s,i,r){Hg(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:k(i,r,s[o]),easing:Ll(n,o)})}function _g(t,e,n=0){const s=e+1+e*n;for(let i=0;i<t.length;i++)t[i]=t[i]/s}function Xg(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const Yg="easeInOut",qg=20;function Zg(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,u={},c=new Map;let l=0,h=0,f=0;for(let d=0;d<t.length;d++){const p=t[d];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,ea(h,p.at,l,c));continue}let[m,g,y={}]=p;y.at!==void 0&&(h=ea(h,y.at,l,c));let v=0;const x=(T,A,C,V=0,P=0)=>{const b=Jg(T),{delay:S=0,times:D=Xl(b),type:R=e.type||"keyframes",repeat:j,repeatType:O,repeatDelay:U=0,...N}=A;let{ease:ht=e.ease||"easeOut",duration:E}=A;const L=typeof S=="function"?S(V,P):S,Y=b.length,Q=Ni(R)?R:i?.[R||"keyframes"];if(Y<=2&&Q){let Zt=100;if(Y===2&&ey(b)){const ve=b[1]-b[0];Zt=Math.abs(ve)}const Jt={...e,...N};E!==void 0&&(Jt.duration=it(E));const Ye=Hl(Jt,Zt,Q);ht=Ye.ease,E=Ye.duration}E??(E=r);const qt=h+L;D.length===1&&D[0]===0&&(D[1]=1);const Do=D.length-b.length;if(Do>0&&_l(D,Do),b.length===1&&b.unshift(null),j&&j<qg){const Zt=E>0?U/E:0;E=Gg(E,j,U);const Jt=[...b],Ye=[...D];ht=Array.isArray(ht)?[...ht]:[ht];const ve=[...ht],Ro=O==="reverse"||O==="mirror";let Lo=Jt,ko=ve;Ro&&(Lo=[...Jt].reverse(),O==="reverse"&&(ko=[...ve].reverse().map(Mt=>typeof Mt=="function"?Di(Mt):Mt)));for(let Mt=0;Mt<j;Mt++){const Bo=Ro&&Mt%2===0,Io=Bo?Lo:Jt,qh=Bo?ko:ve,Fo=(Mt+1)*(1+Zt);Zt>0&&(b.push(b[b.length-1]),D.push(Fo),ht.push("linear")),b.push(...Io);for(let xe=0;xe<Io.length;xe++)D.push(Ye[xe]+Fo),ht.push(xe===0?"linear":Ll(qh,xe-1))}_g(D,j,Zt)}const Eo=qt+E;zg(C,b,ht,D,qt,Eo),v=Math.max(L+E,v),f=Math.max(Eo,f)};if(X(m)){const T=na(m,a);x(g,y,sa("default",T))}else{const T=uc(m,g,s,u),A=T.length;for(let C=0;C<A;C++){g=g,y=y;const V=T[C],P=na(V,a);for(const b in g)x(g[b],Qg(y,b),sa(b,P),C,A)}}l=h,h+=v}return a.forEach((d,p)=>{for(const m in d){const g=d[m];g.sort(Xg);const y=[],v=[],x=[];for(let V=0;V<g.length;V++){const{at:P,value:b,easing:S}=g[V];y.push(b),v.push(le(0,f,P)),x.push(S||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),x.unshift(Yg)),v[v.length-1]!==1&&(v.push(1),y.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const T=o.get(p);T.keyframes[m]=y;const{type:A,...C}=e;T.transition[m]={...C,duration:f,ease:x,times:v,...n}}}),o}function na(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function sa(t,e){return e[t]||(e[t]=[]),e[t]}function Jg(t){return Array.isArray(t)?t:[t]}function Qg(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ty=t=>typeof t=="number",ey=t=>t.every(ty);function ny(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Kn(t)&&!xu(t)?new Iu(e):new Eu(e);n.mount(t),ke.set(t,n)}function sy(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new kp(e);n.mount(t),ke.set(t,n)}function iy(t,e){return X(t)||typeof t=="number"||typeof t=="string"&&!no(e)}function cc(t,e,n,s){const i=[];if(iy(t,e))i.push(Hu(t,no(e)&&e.default||e,n&&(n.default||n)));else{if(t==null)return i;const r=uc(t,e,s),o=r.length;for(let a=0;a<o;a++){const u=r[a],c=u instanceof Element?ny:sy;ke.has(u)||c(u);const l=ke.get(u),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...Hi(l,{...e,transition:h},{}))}}return i}function oy(t,e,n){const s=[],i=t.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){const a=o[0],u=Yt(0);return u.on("change",a),o.length===1?[u,[0,1]]:o.length===2?[u,[0,1],o[1]]:[u,o[1],o[2]]}return o});return Zg(i,e,n,{spring:Le}).forEach(({keyframes:o,transition:a},u)=>{s.push(...cc(u,o,a))}),s}function ry(t){return Array.isArray(t)&&t.some(Array.isArray)}function ay(t={}){const{scope:e,reduceMotion:n,skipAnimations:s}=t;function i(r,o,a){let u=[],c;const l={};if(n!==void 0&&(l.reduceMotion=n),s!==void 0&&(l.skipAnimations=s),ry(r)){const{onComplete:f,...d}=o||{};typeof f=="function"&&(c=f),u=oy(r,{...l,...d},e)}else{const{onComplete:f,...d}=a||{};typeof f=="function"&&(c=f),u=cc(r,o,{...l,...d},e)}const h=new Ad(u);return c&&h.finished.then(c),e&&(e.animations.push(h),h.finished.then(()=>{ae(e.animations,h)})),h}return i}const kT=ay(),hc=w.createContext({});function ly(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const uy=typeof window<"u",cy=uy?w.useLayoutEffect:w.useEffect,so=w.createContext(null);function io(t,e){t.indexOf(e)===-1&&t.push(e)}function En(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const bt=(t,e,n)=>n>e?e:n<t?t:n;let oo=()=>{};const Lt={},fc=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),dc=t=>typeof t=="object"&&t!==null,pc=t=>/^0[^.\s]+$/u.test(t);function mc(t){let e;return()=>(e===void 0&&(e=t()),e)}const ct=t=>t,He=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Fe=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class ro{constructor(){this.subscriptions=[]}add(e){return io(this.subscriptions,e),()=>En(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=t=>t*1e3,at=t=>t/1e3,gc=(t,e)=>e?t*(1e3/e):0,yc=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,hy=1e-7,fy=12;function dy(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=yc(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>hy&&++a<fy);return o}function ze(t,e,n,s){if(t===e&&n===s)return ct;const i=r=>dy(r,0,1,t,n);return r=>r===0||r===1?r:yc(i(r),e,s)}const vc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xc=t=>e=>1-t(1-e),Tc=ze(.33,1.53,.69,.99),ao=xc(Tc),wc=vc(ao),Pc=t=>t>=1?1:(t*=2)<1?.5*ao(t):.5*(2-Math.pow(2,-10*(t-1))),lo=t=>1-Math.sin(Math.acos(t)),Sc=xc(lo),Ac=vc(lo),py=ze(.42,0,1,1),my=ze(0,0,.58,1),bc=ze(.42,0,.58,1),gy=t=>Array.isArray(t)&&typeof t[0]!="number",Vc=t=>Array.isArray(t)&&typeof t[0]=="number",yy={linear:ct,easeIn:py,easeInOut:bc,easeOut:my,circIn:lo,circInOut:Ac,circOut:Sc,backIn:ao,backInOut:wc,backOut:Tc,anticipate:Pc},vy=t=>typeof t=="string",ia=t=>{if(Vc(t)){oo(t.length===4);const[e,n,s,i]=t;return ze(e,n,s,i)}else if(vy(t))return yy[t];return t},en=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xy(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(l){o.has(l)&&(c.schedule(l),t()),l(a)}const c={schedule:(l,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(l),p.add(l),l},cancel:l=>{s.delete(l),o.delete(l)},process:l=>{if(a=l,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(u),n.clear(),i=!1,r&&(r=!1,c.process(l))}};return c}const Ty=40;function Cc(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=en.reduce((x,T)=>(x[T]=xy(r),x),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:l,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const x=Lt.useManualTiming,T=x?i.timestamp:performance.now();n=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Ty),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),u.process(i),c.process(i),l.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:en.reduce((x,T)=>{const A=o[T];return x[T]=(C,V=!1,P=!1)=>(n||g(),A.schedule(C,V,P)),x},{}),cancel:x=>{for(let T=0;T<en.length;T++)o[en[T]].cancel(x)},state:i,steps:o}}const{schedule:F,cancel:kt,state:Z,steps:ds}=Cc(typeof requestAnimationFrame<"u"?requestAnimationFrame:ct,!0);let mn;function wy(){mn=void 0}const nt={now:()=>(mn===void 0&&nt.set(Z.isProcessing||Lt.useManualTiming?Z.timestamp:performance.now()),mn),set:t=>{mn=t,queueMicrotask(wy)}},Mc=t=>e=>typeof e=="string"&&e.startsWith(t),$c=Mc("--"),Py=Mc("var(--"),uo=t=>Py(t)?Sy.test(t.split("/*")[0].trim()):!1,Sy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function oa(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const me={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Oe={...me,transform:t=>bt(0,1,t)},nn={...me,default:1},Me=t=>Math.round(t*1e5)/1e5,co=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ay(t){return t==null}const by=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ho=(t,e)=>n=>!!(typeof n=="string"&&by.test(n)&&n.startsWith(t)||e&&!Ay(n)&&Object.prototype.hasOwnProperty.call(n,e)),Dc=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(co);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Vy=t=>bt(0,255,t),ps={...me,transform:t=>Math.round(Vy(t))},Kt={test:ho("rgb","red"),parse:Dc("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ps.transform(t)+", "+ps.transform(e)+", "+ps.transform(n)+", "+Me(Oe.transform(s))+")"};function Cy(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 ti={test:ho("#"),parse:Cy,transform:Kt.transform},_e=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ct=_e("deg"),St=_e("%"),$=_e("px"),My=_e("vh"),$y=_e("vw"),ra={...St,parse:t=>St.parse(t)/100,transform:t=>St.transform(t*100)},ie={test:ho("hsl","hue"),parse:Dc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+St.transform(Me(e))+", "+St.transform(Me(n))+", "+Me(Oe.transform(s))+")"},z={test:t=>Kt.test(t)||ti.test(t)||ie.test(t),parse:t=>Kt.test(t)?Kt.parse(t):ie.test(t)?ie.parse(t):ti.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Kt.transform(t):ie.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},Dy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ey(t){return isNaN(t)&&typeof t=="string"&&(t.match(co)?.length||0)+(t.match(Dy)?.length||0)>0}const Ec="number",Rc="color",Ry="var",Ly="var(",aa="${}",ky=/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 ce(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(ky,u=>(z.test(u)?(s.color.push(r),i.push(Rc),n.push(z.parse(u))):u.startsWith(Ly)?(s.var.push(r),i.push(Ry),n.push(u)):(s.number.push(r),i.push(Ec),n.push(parseFloat(u))),++r,aa)).split(aa);return{values:n,split:a,indexes:s,types:i}}function By(t){return ce(t).values}function Lc({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===Ec?i+=Me(s[r]):o===Rc?i+=z.transform(s[r]):i+=s[r]}return i}}function Iy(t){return Lc(ce(t))}const Fy=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t,Oy=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Fy(t);function jy(t){const e=ce(t);return Lc(e)(e.values.map((s,i)=>Oy(s,e.split[i])))}const yt={test:Ey,parse:By,createTransformer:Iy,getAnimatableNone:jy};function ms(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 Ny({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=ms(u,a,t+1/3),r=ms(u,a,t),o=ms(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Rn(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,gs=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Uy=[ti,Kt,ie],Wy=t=>Uy.find(e=>e.test(t));function la(t){const e=Wy(t);if(!e)return!1;let n=e.parse(t);return e===ie&&(n=Ny(n)),n}const ua=(t,e)=>{const n=la(t),s=la(e);if(!n||!s)return Rn(t,e);const i={...n};return r=>(i.red=gs(n.red,s.red,r),i.green=gs(n.green,s.green,r),i.blue=gs(n.blue,s.blue,r),i.alpha=B(n.alpha,s.alpha,r),Kt.transform(i))},ei=new Set(["none","hidden"]);function Ky(t,e){return ei.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Gy(t,e){return n=>B(t,e,n)}function fo(t){return typeof t=="number"?Gy:typeof t=="string"?uo(t)?Rn:z.test(t)?ua:_y:Array.isArray(t)?kc:typeof t=="object"?z.test(t)?ua:Hy:Rn}function kc(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>fo(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Hy(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=fo(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function zy(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const _y=(t,e)=>{const n=yt.createTransformer(e),s=ce(t),i=ce(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?ei.has(t)&&!i.values.length||ei.has(e)&&!s.values.length?Ky(t,e):He(kc(zy(s,i),i.values),n):Rn(t,e)};function Bc(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):fo(t)(t,e)}const Xy=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>F.update(e,n),stop:()=>kt(e),now:()=>Z.isProcessing?Z.timestamp:nt.now()}},Ic=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ln=2e4;function po(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ln;)e+=n,s=t.next(e);return e>=Ln?1/0:e}function Yy(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(po(s),Ln);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:at(i)}}const K={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ni(t,e){return t*Math.sqrt(1-e*e)}const qy=12;function Zy(t,e,n){let s=n;for(let i=1;i<qy;i++)s=s-t(s)/e(s);return s}const ys=.001;function Jy({duration:t=K.duration,bounce:e=K.bounce,velocity:n=K.velocity,mass:s=K.mass}){let i,r,o=1-e;o=bt(K.minDamping,K.maxDamping,o),t=bt(K.minDuration,K.maxDuration,at(t)),o<1?(i=c=>{const l=c*o,h=l*t,f=l-n,d=ni(c,o),p=Math.exp(-h);return ys-f/d*p},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=ni(Math.pow(c,2),o);return(-i(c)+ys>0?-1:1)*((f-d)*p)/m}):(i=c=>{const l=Math.exp(-c*t),h=(c-n)*t+1;return-ys+l*h},r=c=>{const l=Math.exp(-c*t),h=(n-c)*(t*t);return l*h});const a=5/t,u=Zy(i,r,a);if(t=ot(t),isNaN(u))return{stiffness:K.stiffness,damping:K.damping,duration:t};{const c=Math.pow(u,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const Qy=["duration","bounce"],tv=["stiffness","damping","mass"];function ca(t,e){return e.some(n=>t[n]!==void 0)}function ev(t){let e={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...t};if(!ca(t,tv)&&ca(t,Qy))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*bt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:K.mass,stiffness:i,damping:r}}else{const n=Jy({...t,velocity:0});e={...e,...n,mass:K.mass},e.isResolvedFromDuration=!0}return e}function kn(t=K.visualDuration,e=K.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:c,mass:l,duration:h,velocity:f,isResolvedFromDuration:d}=ev({...n,velocity:-at(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(u*l)),g=o-r,y=at(Math.sqrt(u/l)),v=Math.abs(g)<5;s||(s=v?K.restSpeed.granular:K.restSpeed.default),i||(i=v?K.restDelta.granular:K.restDelta.default);let x,T,A,C,V,P;if(m<1)A=ni(y,m),C=(p+m*y*g)/A,x=S=>{const D=Math.exp(-m*y*S);return o-D*(C*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*C+g*A,P=m*y*g-C*A,T=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+P*Math.cos(A*S));else if(m===1){x=D=>o-Math.exp(-y*D)*(g+(p+y*g)*D);const S=p+y*g;T=D=>Math.exp(-y*D)*(y*S*D-p)}else{const S=y*Math.sqrt(m*m-1);x=O=>{const U=Math.exp(-m*y*O),N=Math.min(S*O,300);return o-U*((p+m*y*g)*Math.sinh(N)+S*g*Math.cosh(N))/S};const D=(p+m*y*g)/S,R=m*y*D-g*S,j=m*y*g-D*S;T=O=>{const U=Math.exp(-m*y*O),N=Math.min(S*O,300);return U*(R*Math.sinh(N)+j*Math.cosh(N))}}const b={calculatedDuration:d&&h||null,velocity:S=>ot(T(S)),next:S=>{if(!d&&m<1){const R=Math.exp(-m*y*S),j=Math.sin(A*S),O=Math.cos(A*S),U=o-R*(C*j+g*O),N=ot(R*(V*j+P*O));return a.done=Math.abs(N)<=s&&Math.abs(o-U)<=i,a.value=a.done?o:U,a}const D=x(S);if(d)a.done=S>=h;else{const R=ot(T(S));a.done=Math.abs(R)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const S=Math.min(po(b),Ln),D=Ic(R=>b.next(S*R).value,S,30);return S+"ms "+D},toTransition:()=>{}};return b}kn.applyToOptions=t=>{const e=Yy(t,100,kn);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};const nv=5;function Fc(t,e,n){const s=Math.max(e-nv,0);return gc(n-t(s),e-s)}function si({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:c=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},d=P=>a!==void 0&&P<a||u!==void 0&&P>u,p=P=>a===void 0?u:u===void 0||Math.abs(a-P)<Math.abs(u-P)?a:u;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const v=P=>-m*Math.exp(-P/s),x=P=>y+v(P),T=P=>{const b=v(P),S=x(P);f.done=Math.abs(b)<=c,f.value=f.done?y:S};let A,C;const V=P=>{d(f.value)&&(A=P,C=kn({keyframes:[f.value,p(f.value)],velocity:Fc(x,P,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:l}))};return V(0),{calculatedDuration:null,next:P=>{let b=!1;return!C&&A===void 0&&(b=!0,T(P),V(P)),A!==void 0&&P>=A?C.next(P-A):(!b&&T(P),f)}}}function sv(t,e,n){const s=[],i=n||Lt.mix||Bc,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||ct:e;a=He(u,a)}s.push(a)}return s}function iv(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(oo(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=sv(e,s,i),u=a.length,c=l=>{if(o&&l<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(l<t[h+1]);h++);const f=Fe(t[h],t[h+1],l);return a[h](f)};return n?l=>c(bt(t[0],t[r-1],l)):c}function ov(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Fe(0,e,s);t.push(B(n,1,i))}}function rv(t){const e=[0];return ov(e,t.length-1),e}function av(t,e){return t.map(n=>n*e)}function lv(t,e){return t.map(()=>e||bc).splice(0,t.length-1)}function $e({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=gy(s)?s.map(ia):ia(s),r={done:!1,value:e[0]},o=av(n&&n.length===e.length?n:rv(e),t),a=iv(o,e,{ease:Array.isArray(i)?i:lv(e,i)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const uv=t=>t!==null;function _n(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(uv),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const cv={decay:si,inertia:si,tween:$e,keyframes:$e,spring:kn};function Oc(t){typeof t.type=="string"&&(t.type=cv[t.type])}class mo{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 hv=t=>t/100;class Bn extends mo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==nt.now()&&this.tick(nt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Oc(e);const{type:n=$e,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||$e;u!==$e&&typeof a[0]!="number"&&(this.mixKeyframes=He(hv,Bc(a[0],a[1])),a=[0,100]);const c=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=po(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}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:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:l,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,T=s;if(h){const P=Math.min(this.currentTime,i)/a;let b=Math.floor(P),S=P%1;!S&&P>=1&&(S=1),S===1&&b--,b=Math.min(b,h+1),!!(b%2)&&(f==="reverse"?(S=1-S,d&&(S-=d/a)):f==="mirror"&&(T=o)),x=bt(0,1,S)*a}let A;v?(this.delayState.value=l[0],A=this.delayState):A=T.next(x),r&&!v&&(A.value=r(A.value));let{done:C}=A;!v&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return V&&p!==si&&(A.value=_n(l,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return at(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(this.currentTime)}set time(e){e=ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Fc(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(nt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=at(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Xy,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(nt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function fv(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Gt=t=>t*180/Math.PI,ii=t=>{const e=Gt(Math.atan2(t[1],t[0]));return oi(e)},dv={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ii,rotateZ:ii,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},oi=t=>(t=t%360,t<0&&(t+=360),t),ha=ii,fa=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),da=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),pv={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fa,scaleY:da,scale:t=>(fa(t)+da(t))/2,rotateX:t=>oi(Gt(Math.atan2(t[6],t[5]))),rotateY:t=>oi(Gt(Math.atan2(-t[2],t[0]))),rotateZ:ha,rotate:ha,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 ri(t){return t.includes("scale")?1:0}function ai(t,e){if(!t||t==="none")return ri(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=pv,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=dv,i=a}if(!i)return ri(e);const r=s[e],o=i[1].split(",").map(gv);return typeof r=="function"?r(o):o[r]}const mv=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ai(n,e)};function gv(t){return parseFloat(t.trim())}const ge=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ye=new Set([...ge,"pathRotation"]),pa=t=>t===me||t===$,yv=new Set(["x","y","z"]),vv=ge.filter(t=>!yv.has(t));function xv(t){const e=[];return vv.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ai(e,"x"),y:(t,{transform:e})=>ai(e,"y")};Dt.translateX=Dt.x;Dt.translateY=Dt.y;const _t=new Set;let li=!1,ui=!1,ci=!1;function jc(){if(ui){const t=Array.from(_t).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=xv(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(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}ui=!1,li=!1,_t.forEach(t=>t.complete(ci)),_t.clear()}function Nc(){_t.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ui=!0)})}function Tv(){ci=!0,Nc(),jc(),ci=!1}class go{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(_t.add(this),li||(li=!0,F.read(Nc),F.resolveKeyframes(jc))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}fv(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_t.delete(this)}cancel(){this.state==="scheduled"&&(_t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wv=t=>t.startsWith("--");function Uc(t,e,n){wv(e)?t.style.setProperty(e,n):t.style[e]=n}const Pv={};function Wc(t,e){const n=mc(t);return()=>Pv[e]??n()}const Sv=Wc(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Kc=Wc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Se=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ma={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Se([0,.65,.55,1]),circOut:Se([.55,0,1,.45]),backIn:Se([.31,.01,.66,-.59]),backOut:Se([.33,1.53,.69,.99])};function Gc(t,e){if(t)return typeof t=="function"?Kc()?Ic(t,e):"ease-out":Vc(t)?Se(t):Array.isArray(t)?t.map(n=>Gc(n,e)||ma.easeOut):ma[t]}function Av(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},c=void 0){const l={[e]:n};u&&(l.offset=u);const h=Gc(a,i);Array.isArray(h)&&(l.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(l,f)}function Hc(t){return typeof t=="function"&&"applyToOptions"in t}function bv({type:t,...e}){return Hc(t)&&Kc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class zc extends mo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,oo(typeof e.type!="string");const c=bv(e);this.animation=Av(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=_n(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Uc(n,s,l),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return at(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ot(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Sv()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),ct):i(this)}}const _c={anticipate:Pc,backInOut:wc,circInOut:Ac};function Vv(t){return t in _c}function Cv(t){typeof t.ease=="string"&&Vv(t.ease)&&(t.ease=_c[t.ease])}const vs=10;class Mv extends zc{constructor(e){Cv(e),Oc(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Bn({...o,autoplay:!1}),u=Math.max(vs,nt.now()-this.startTime),c=bt(0,vs,u-vs),l=a.sample(u).value,{name:h}=this.options;r&&h&&Uc(r,h,l),n.setWithVelocity(a.sample(Math.max(0,u-c)).value,l,c),a.stop()}}const ga=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yt.test(t)||t==="0")&&!t.startsWith("url("));function $v(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 Dv(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=ga(i,e),a=ga(r,e);return!o||!a?!1:$v(t)||(n==="spring"||Hc(n))&&s}function hi(t){t.duration=0,t.type="keyframes"}const Xc=new Set(["opacity","clipPath","filter","transform"]),Ev=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rv(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ev.test(t[e]))return!0;return!1}const Lv=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),kv=mc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Bv(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return kv()&&n&&(Xc.has(n)||Lv.has(n)&&Rv(a))&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Iv=40;class Fv extends mo{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:c,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=nt.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:u,motionValue:c,element:l,...h},d=l?.KeyframeResolver||go;this.keyframeResolver=new d(a,(p,m,g)=>this.onKeyframesResolved(p,m,f,!g),u,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:c,onUpdate:l}=s;this.resolvedAt=nt.now();let h=!0;Dv(e,r,o,a)||(h=!1,(Lt.instantAnimations||!u)&&l?.(_n(e,s,n)),e[0]=e[e.length-1],hi(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Iv?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=h&&!c&&Bv(d),m=d.motionValue?.owner?.current;let g;if(p)try{g=new Mv({...d,element:m})}catch{g=new Bn(d)}else g=new Bn(d);g.finished.then(()=>{this.notifyFinished()}).catch(ct),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Tv()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Yc(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,l)=>c.sortNodePosition(l)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const ya=30,Ov=t=>!isNaN(parseFloat(t));class jv{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=nt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=nt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ov(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ro);const s=this.events[e].add(n);return e==="change"?()=>{s(),F.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ya)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ya);return gc(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function he(t,e){return new jv(t,e)}function qc(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function yo(t,e){const n=t?.[e]??t?.default??t;return n!==t?qc(n,t):n}const Nv={type:"spring",stiffness:500,damping:25,restSpeed:10},Uv=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wv={type:"keyframes",duration:.8},Kv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gv=(t,{keyframes:e})=>e.length>2?Wv:ye.has(t)?t.startsWith("scale")?Uv(e[1]):Nv:Kv,Hv=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function zv(t){for(const e in t)if(!Hv.has(e))return!0;return!1}const vo=(t,e,n,s={},i,r)=>o=>{const a=yo(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-ot(u);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};zv(a)||Object.assign(l,Gv(t,l)),l.duration&&(l.duration=ot(l.duration)),l.repeatDelay&&(l.repeatDelay=ot(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(hi(l),l.delay===0&&(h=!0)),(Lt.instantAnimations||Lt.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,hi(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=_n(l.keyframes,a);if(f!==void 0){F.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new Bn(l):new Fv(l)},_v=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xv(t){const e=_v.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Zc(t,e,n=1){const[s,i]=Xv(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return fc(o)?parseFloat(o):o}return uo(i)?Zc(i,e,n+1):i}function va(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function xo(t,e,n,s){if(typeof e=="function"){const[i,r]=va(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=va(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Xt(t,e,n){const s=t.getProps();return xo(s,e,n!==void 0?n:s.custom,t)}const Jc=new Set(["width","height","top","left","right","bottom",...ge]),fi=t=>Array.isArray(t);function Yv(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,he(n))}function qv(t){return fi(t)?t[t.length-1]||0:t}function Zv(t,e){const n=Xt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=qv(r[o]);Yv(t,o,a)}}const J=t=>!!(t&&t.getVelocity);function Jv(t){return!!(J(t)&&t.add)}function di(t,e){const n=t.getValue("willChange");if(Jv(n))return n.add(e);if(!n&&Lt.WillChange){const s=new Lt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function To(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Qv="framerAppearId",Qc="data-"+To(Qv);function th(t){return t.props[Qc]}function t0({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function eh(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?qc(r,u):u;const c=r?.reduceMotion,l=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=r?.path;d&&d.animateVisualElement(t,a,r,n,h);for(const p in a){const m=t.getValue(p,t.latestValues[p]??null),g=a[p];if(g===void 0||f&&t0(f,p))continue;const y={delay:n,...yo(r||{},p)};l&&(y.skipAnimations=!0);const v=m.get();if(v!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===v&&!y.velocity){F.update(()=>m.set(g));continue}let x=!1;if(window.MotionHandoffAnimation){const C=th(t);if(C){const V=window.MotionHandoffAnimation(C,p,F);V!==null&&(y.startTime=V,x=!0)}}di(t,p);const T=c??t.shouldReduceMotion;m.start(vo(p,m,g,T&&Jc.has(p)?{type:!1}:y,t,x));const A=m.animation;A&&h.push(A)}if(o){const p=()=>F.update(()=>{o&&Zv(t,o)});h.length?Promise.all(h).then(p):p()}return h}function pi(t,e,n={}){const s=Xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(eh(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:l,staggerDirection:h}=i;return e0(t,e,u,c,l,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function e0(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(pi(u,e,{...o,delay:n+(typeof s=="function"?0:s)+Yc(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function n0(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>pi(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=pi(t,e,n);else{const i=typeof e=="function"?Xt(t,e,n.custom):e;s=Promise.all(eh(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const s0={test:t=>t==="auto",parse:t=>t},nh=t=>e=>e.test(t),sh=[me,$,St,Ct,$y,My,s0],xa=t=>sh.find(nh(t));function i0(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||pc(t):!0}const o0=new Set(["brightness","contrast","saturate","opacity"]);function r0(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(co)||[];if(!s)return t;const i=n.replace(s,"");let r=o0.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const a0=/\b([a-z-]*)\(.*?\)/gu,mi={...yt,getAnimatableNone:t=>{const e=t.match(a0);return e?e.map(r0).join(" "):t}},gi={...yt,getAnimatableNone:t=>{const e=yt.parse(t);return yt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ta={...me,transform:Math.round},l0={rotate:Ct,pathRotation:Ct,rotateX:Ct,rotateY:Ct,rotateZ:Ct,scale:nn,scaleX:nn,scaleY:nn,scaleZ:nn,skew:Ct,skewX:Ct,skewY:Ct,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Oe,originX:ra,originY:ra,originZ:$},In={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,...l0,zIndex:Ta,fillOpacity:Oe,strokeOpacity:Oe,numOctaves:Ta},u0={...In,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:mi,WebkitFilter:mi,mask:gi,WebkitMask:gi},ih=t=>u0[t],c0=new Set([mi,gi]);function oh(t,e){let n=ih(t);return c0.has(n)||(n=yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const h0=new Set(["auto","none","0"]);function f0(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!h0.has(r)&&ce(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=oh(n,i)}class d0 extends go{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let h=e[l];if(typeof h=="string"&&(h=h.trim(),uo(h))){const f=Zc(h,n.current);f!==void 0&&(e[l]=f),l===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Jc.has(s)||e.length!==2)return;const[i,r]=e,o=xa(i),a=xa(r),u=oa(i),c=oa(r);if(u!==c&&Dt[s]){this.needsMeasurement=!0;return}if(o!==a)if(pa(o)&&pa(a))for(let l=0;l<e.length;l++){const h=e[l];typeof h=="string"&&(e[l]=parseFloat(h))}else Dt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||i0(e[i]))&&s.push(i);s.length&&f0(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=Dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Dt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function rh(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const yi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function p0(t){return dc(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:wo}=Cc(queueMicrotask,!1),mt={x:!1,y:!1};function ah(){return mt.x||mt.y}function m0(t){return t==="x"||t==="y"?mt[t]?null:(mt[t]=!0,()=>{mt[t]=!1}):mt.x||mt.y?null:(mt.x=mt.y=!0,()=>{mt.x=mt.y=!1})}function lh(t,e){const n=rh(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function g0(t){return!(t.pointerType==="touch"||ah())}function y0(t,e,n={}){const[s,i,r]=lh(t,n);return s.forEach(o=>{let a=!1,u=!1,c;const l=()=>{o.removeEventListener("pointerleave",p)},h=g=>{c&&(c(g),c=void 0),l()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},m=g=>{if(!g0(g))return;u=!1;const y=e(o,g);typeof y=="function"&&(c=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const uh=(t,e)=>e?t===e?!0:uh(t,e.parentElement):!1,Po=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,v0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function x0(t){return v0.has(t.tagName)||t.isContentEditable===!0}const T0=new Set(["INPUT","SELECT","TEXTAREA"]);function w0(t){return T0.has(t.tagName)||t.isContentEditable===!0}const gn=new WeakSet;function wa(t){return e=>{e.key==="Enter"&&t(e)}}function xs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const P0=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=wa(()=>{if(gn.has(n))return;xs(n,"down");const i=wa(()=>{xs(n,"up")}),r=()=>xs(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Pa(t){return Po(t)&&!ah()}const Sa=new WeakSet;function S0(t,e,n={}){const[s,i,r]=lh(t,n),o=a=>{const u=a.currentTarget;if(!Pa(a)||Sa.has(a))return;gn.add(u),n.stopPropagation&&Sa.add(a);const c=e(u,a),l=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),gn.has(u)&&gn.delete(u),Pa(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{l(d,u===window||u===document||n.useGlobalTarget||uh(u,d.target))},f=d=>{l(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),p0(a)&&(a.addEventListener("focus",c=>P0(c,i)),!x0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function So(t){return dc(t)&&"ownerSVGElement"in t}const yn=new WeakMap;let vn;const ch=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:So(s)&&"getBBox"in s?s.getBBox()[e]:s[n],A0=ch("inline","width","offsetWidth"),b0=ch("block","height","offsetHeight");function V0({target:t,borderBoxSize:e}){yn.get(t)?.forEach(n=>{n(t,{get width(){return A0(t,e)},get height(){return b0(t,e)}})})}function C0(t){t.forEach(V0)}function M0(){typeof ResizeObserver>"u"||(vn=new ResizeObserver(C0))}function $0(t,e){vn||M0();const n=rh(t);return n.forEach(s=>{let i=yn.get(s);i||(i=new Set,yn.set(s,i)),i.add(e),vn?.observe(s)}),()=>{n.forEach(s=>{const i=yn.get(s);i?.delete(e),i?.size||vn?.unobserve(s)})}}const xn=new Set;let oe;function D0(){oe=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};xn.forEach(e=>e(t))},window.addEventListener("resize",oe)}function E0(t){return xn.add(t),oe||D0(),()=>{xn.delete(t),!xn.size&&typeof oe=="function"&&(window.removeEventListener("resize",oe),oe=void 0)}}function Aa(t,e){return typeof t=="function"?E0(t):$0(t,e)}function R0(t){return So(t)&&t.tagName==="svg"}const L0=[...sh,z,yt],k0=t=>L0.find(nh(t)),ba=()=>({translate:0,scale:1,origin:0,originPoint:0}),re=()=>({x:ba(),y:ba()}),Va=()=>({min:0,max:0}),_=()=>({x:Va(),y:Va()}),B0=new WeakMap;function Xn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function je(t){return typeof t=="string"||Array.isArray(t)}const Ao=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bo=["initial",...Ao];function Yn(t){return Xn(t.animate)||bo.some(e=>je(t[e]))}function hh(t){return!!(Yn(t)||t.variants)}function I0(t,e,n){for(const s in e){const i=e[s],r=n[s];if(J(i))t.addValue(s,i);else if(J(r))t.addValue(s,he(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,he(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const vi={current:null},fh={current:!1},F0=typeof window<"u";function O0(){if(fh.current=!0,!!F0)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vi.current=t.matches;t.addEventListener("change",e),e()}else vi.current=!1}const Ca=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fn={};function dh(t){Fn=t}function j0(){return Fn}class N0{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=go,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=nt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,F.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;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.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Yn(n),this.isVariantNode=hh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];c[d]!==void 0&&J(p)&&p.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,B0.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(fh.current||O0(),this.shouldReduceMotion=vi.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Xc.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:l}=n.accelerate,h=new zc({element:this.current,name:e,keyframes:a,times:u,ease:c,duration:ot(l)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=ye.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&F.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 Fn){const n=Fn[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}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<Ca.length;s++){const i=Ca[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=I0(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=he(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"&&(fc(s)||pc(s))?s=parseFloat(s):!k0(s)&&yt.test(n)&&(s=oh(e,n)),this.setBaseTarget(e,J(s)?s.get():s)),J(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=xo(this.props,n,this.presenceContext?.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 ro),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){wo.render(this.render)}}class ph extends N0{constructor(){super(...arguments),this.KeyframeResolver=d0}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;J(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class It{constructor(e){this.isMounted=!1,this.node=e}update(){}}function mh({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function U0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function W0(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 Ts(t){return t===void 0||t===1}function xi({scale:t,scaleX:e,scaleY:n}){return!Ts(t)||!Ts(e)||!Ts(n)}function Nt(t){return xi(t)||gh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function gh(t){return Ma(t.x)||Ma(t.y)}function Ma(t){return t&&t!=="0%"}function On(t,e,n){const s=t-n,i=e*s;return n+i}function $a(t,e,n,s,i){return i!==void 0&&(t=On(t,i,s)),On(t,n,s)+e}function Ti(t,e=0,n=1,s,i){t.min=$a(t.min,e,n,s,i),t.max=$a(t.max,e,n,s,i)}function yh(t,{x:e,y:n}){Ti(t.x,e.translate,e.scale,e.originPoint),Ti(t.y,n.translate,n.scale,n.originPoint)}const Da=.999999999999,Ea=1.0000000000001;function K0(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(wt(t.x,-r.scroll.offset.x),wt(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,yh(t,o)),s&&Nt(r.latestValues)&&Tn(t,r.latestValues,r.layout?.layoutBox))}e.x<Ea&&e.x>Da&&(e.x=1),e.y<Ea&&e.y>Da&&(e.y=1)}function wt(t,e){t.min+=e,t.max+=e}function Ra(t,e,n,s,i=.5){const r=B(t.min,t.max,i);Ti(t,e,n,r,s)}function La(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Tn(t,e,n){const s=n??t;Ra(t.x,La(e.x,s.x),e.scaleX,e.scale,e.originX),Ra(t.y,La(e.y,s.y),e.scaleY,e.scale,e.originY)}function vh(t,e){return mh(W0(t.getBoundingClientRect(),e))}function G0(t,e,n){const s=vh(t,n),{scroll:i}=e;return i&&(wt(s.x,i.offset.x),wt(s.y,i.offset.y)),s}const H0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z0=ge.length;function _0(t,e,n){let s="",i=!0;for(let o=0;o<z0;o++){const a=ge[o],u=t[a];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(a.startsWith("scale")?1:0);else{const l=parseFloat(u);c=a.startsWith("scale")?l===1:l===0}if(!c||n){const l=yi(u,In[a]);if(!c){i=!1;const h=H0[a]||a;s+=`${h}(${l}) `}n&&(e[a]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${yi(r,In.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Vo(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const c=e[u];if(ye.has(u)){o=!0;continue}else if($c(u)){i[u]=c;continue}else{const l=yi(c,In[u]);u.startsWith("origin")?(a=!0,r[u]=l):s[u]=l}}if(e.transform||(o||n?s.transform=_0(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:c="50%",originZ:l=0}=r;s.transformOrigin=`${u} ${c} ${l}`}}function xh(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ka(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const we={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if($.test(t))t=parseFloat(t);else return t;const n=ka(t,e.target.x),s=ka(t,e.target.y);return`${n}% ${s}%`}},X0={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yt.parse(t);if(i.length>5)return s;const r=yt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=u;const c=B(a,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},wi={borderRadius:{...we,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomLeftRadius:we,borderBottomRightRadius:we,boxShadow:X0};function Th(t,{layout:e,layoutId:n}){return ye.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!wi[t]||t==="opacity")}function Co(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(J(s[o])||i&&J(i[o])||Th(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function Y0(t){return window.getComputedStyle(t)}class q0 extends ph{constructor(){super(...arguments),this.type="html",this.renderInstance=xh}readValueFromInstance(e,n){if(ye.has(n))return this.projection?.isProjecting?ri(n):mv(e,n);{const s=Y0(e),i=($c(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vh(e,n)}build(e,n,s){Vo(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Co(e,n,s)}}const Z0={offset:"stroke-dashoffset",array:"stroke-dasharray"},J0={offset:"strokeDashoffset",array:"strokeDasharray"};function Q0(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Z0:J0;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const t1=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wh(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},u,c,l){if(Vo(t,a,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=l?.transformBox??"fill-box",delete h.transformBox);for(const d of t1)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Q0(h,i,r,o,!1)}const Ph=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"]),Sh=t=>typeof t=="string"&&t.toLowerCase()==="svg";function e1(t,e,n,s){xh(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ph.has(i)?i:To(i),e.attrs[i])}function Ah(t,e,n){const s=Co(t,e,n);for(const i in t)if(J(t[i])||J(e[i])){const r=ge.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class n1 extends ph{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ye.has(n)){const s=ih(n);return s&&s.default||0}return n=Ph.has(n)?n:To(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ah(e,n,s)}build(e,n,s){wh(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){e1(e,n,s,i)}mount(e){this.isSVGTag=Sh(e.tagName),super.mount(e)}}const s1=bo.length;function bh(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?bh(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<s1;n++){const s=bo[n],i=t.props[s];(je(i)||i===!1)&&(e[s]=i)}return e}function Vh(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 i1=[...Ao].reverse(),o1=Ao.length;function r1(t){return e=>Promise.all(e.map(({animation:n,options:s})=>n0(t,n,s)))}function a1(t){let e=r1(t),n=Ba(),s=!0,i=!1;const r=c=>(l,h)=>{const f=Xt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;l={...l,...m,...p}}return l};function o(c){e=c(t)}function a(c){const{props:l}=t,h=bh(t.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let y=0;y<o1;y++){const v=i1[y],x=n[v],T=l[v]!==void 0?l[v]:h[v],A=je(T),C=v===c?x.isActive:null;C===!1&&(m=y);let V=T===h[v]&&T!==l[v]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),x.protectedKeys={...p},!x.isActive&&C===null||!T&&!x.prevProp||Xn(T)||typeof T=="boolean")continue;if(v==="exit"&&x.isActive&&C!==!0){x.prevResolvedValues&&(p={...p,...x.prevResolvedValues});continue}const P=l1(x.prevProp,T);let b=P||v===c&&x.isActive&&!V&&A||y>m&&A,S=!1;const D=Array.isArray(T)?T:[T];let R=D.reduce(r(v),{});C===!1&&(R={});const{prevResolvedValues:j={}}=x,O={...j,...R},U=E=>{b=!0,d.has(E)&&(S=!0,d.delete(E)),x.needsAnimating[E]=!0;const L=t.getValue(E);L&&(L.liveStyle=!1)};for(const E in O){const L=R[E],Y=j[E];if(p.hasOwnProperty(E))continue;let Q=!1;fi(L)&&fi(Y)?Q=!Vh(L,Y)||P:Q=L!==Y,Q?L!=null?U(E):d.add(E):L!==void 0&&d.has(E)?U(E):x.protectedKeys[E]=!0}x.prevProp=T,x.prevResolvedValues=R,x.isActive&&(p={...p,...R}),(s||i)&&t.blockInitialAnimation&&(b=!1);const N=V&&P;b&&(!N||S)&&f.push(...D.map(E=>{const L={type:v};if(typeof E=="string"&&(s||i)&&!N&&t.manuallyAnimateOnMount&&t.parent){const{parent:Y}=t,Q=Xt(Y,E);if(Y.enteringChildren&&Q){const{delayChildren:qt}=Q.transition||{};L.delay=Yc(Y.enteringChildren,t,qt)}}return{animation:E,options:L}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const v=Xt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=t.getBaseTarget(v),T=t.getValue(v);T&&(T.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function u(c,l){if(n[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ba(),i=!0}}}function l1(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vh(e,t):!1}function Ot(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ba(){return{animate:Ot(!0),whileInView:Ot(),whileHover:Ot(),whileTap:Ot(),whileDrag:Ot(),whileFocus:Ot(),exit:Ot()}}function Pi(t,e){t.min=e.min,t.max=e.max}function dt(t,e){Pi(t.x,e.x),Pi(t.y,e.y)}function Ia(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Ch=1e-4,u1=1-Ch,c1=1+Ch,Mh=.01,h1=0-Mh,f1=0+Mh;function st(t){return t.max-t.min}function d1(t,e,n){return Math.abs(t-e)<=n}function Fa(t,e,n,s=.5){t.origin=s,t.originPoint=B(e.min,e.max,t.origin),t.scale=st(n)/st(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=u1&&t.scale<=c1||isNaN(t.scale))&&(t.scale=1),(t.translate>=h1&&t.translate<=f1||isNaN(t.translate))&&(t.translate=0)}function De(t,e,n,s){Fa(t.x,e.x,n.x,s?s.originX:void 0),Fa(t.y,e.y,n.y,s?s.originY:void 0)}function Oa(t,e,n,s=0){const i=s?B(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+st(e)}function p1(t,e,n,s){Oa(t.x,e.x,n.x,s?.x),Oa(t.y,e.y,n.y,s?.y)}function ja(t,e,n,s=0){const i=s?B(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+st(e)}function jn(t,e,n,s){ja(t.x,e.x,n.x,s?.x),ja(t.y,e.y,n.y,s?.y)}function Na(t,e,n,s,i){return t-=e,t=On(t,1/n,s),i!==void 0&&(t=On(t,1/i,s)),t}function m1(t,e=0,n=1,s=.5,i,r=t,o=t){if(St.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(r.min,r.max,s);t===r&&(a-=e),t.min=Na(t.min,e,n,a,i),t.max=Na(t.max,e,n,a,i)}function Ua(t,e,[n,s,i],r,o){m1(t,e[n],e[s],e[i],e.scale,r,o)}const g1=["x","scaleX","originX"],y1=["y","scaleY","originY"];function Wa(t,e,n,s){Ua(t.x,e,g1,n?n.x:void 0,s?s.x:void 0),Ua(t.y,e,y1,n?n.y:void 0,s?s.y:void 0)}function Ka(t){return t.translate===0&&t.scale===1}function $h(t){return Ka(t.x)&&Ka(t.y)}function Ga(t,e){return t.min===e.min&&t.max===e.max}function v1(t,e){return Ga(t.x,e.x)&&Ga(t.y,e.y)}function Ha(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Dh(t,e){return Ha(t.x,e.x)&&Ha(t.y,e.y)}function za(t){return st(t.x)/st(t.y)}function _a(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function xt(t){return[t("x"),t("y")]}function x1(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:l,pathRotation:h,rotateX:f,rotateY:d,skewX:p,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),l&&(s+=`rotate(${l}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),p&&(s+=`skewX(${p}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Eh=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],T1=Eh.length,Xa=t=>typeof t=="string"?parseFloat(t):t,Ya=t=>typeof t=="number"||$.test(t);function w1(t,e,n,s,i,r){i?(t.opacity=B(0,n.opacity??1,P1(s)),t.opacityExit=B(e.opacity??1,0,S1(s))):r&&(t.opacity=B(e.opacity??1,n.opacity??1,s));for(let o=0;o<T1;o++){const a=Eh[o];let u=qa(e,a),c=qa(n,a);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Ya(u)===Ya(c)?(t[a]=Math.max(B(Xa(u),Xa(c),s),0),(St.test(c)||St.test(u))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,s))}function qa(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const P1=Rh(0,.5,Sc),S1=Rh(.5,.95,ct);function Rh(t,e,n){return s=>s<t?0:s>e?1:n(Fe(t,e,s))}function A1(t,e,n){const s=J(t)?t:he(t);return s.start(vo("",s,e,n)),s.animation}function Ne(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const b1=(t,e)=>t.depth-e.depth;class V1{constructor(){this.children=[],this.isDirty=!1}add(e){io(this.children,e),this.isDirty=!0}remove(e){En(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(b1),this.isDirty=!1,this.children.forEach(e)}}function C1(t,e){const n=nt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(kt(s),t(r-e))};return F.setup(s,!0),()=>kt(s)}function wn(t){return J(t)?t.get():t}class M1{constructor(){this.members=[]}add(e){io(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(En(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(En(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Pn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ws=["","X","Y","Z"],$1=1e3;let D1=0;function Ps(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Lh(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=th(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Lh(s)}function kh({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=D1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(L1),this.nodes.forEach(j1),this.nodes.forEach(N1),this.nodes.forEach(k1)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new V1)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ro),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=So(o)&&!R0(o),this.instance=o;const{layoutId:a,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let l,h=0;const f=()=>this.root.updateBlockedByResize=!1;F.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,l&&l(),l=C1(f,250),Pn.hasAnimatedSinceResize&&(Pn.hasAnimatedSinceResize=!1,this.nodes.forEach(Qa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||H1,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Dh(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...yo(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(l,v,x.path)}else h||Qa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),kt(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(U1),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(I1),this.nodes.forEach(Za);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ja);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(F1),this.nodes.forEach(O1),this.nodes.forEach(E1),this.nodes.forEach(R1)):this.nodes.forEach(Ja),this.clearAllSnapshots();const a=nt.now();Z.delta=bt(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,ds.update.process(Z),ds.preRender.process(Z),ds.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(B1),this.sharedNodes.forEach(W1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!st(this.snapshot.measuredBox.x)&&!st(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=_()),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!$h(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,l=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Nt(this.latestValues)||l)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),z1(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return _();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_1))){const{scroll:c}=this.root;c&&(wt(a.x,c.offset.x),wt(a.y,c.offset.y))}return a}removeElementScroll(o){const a=_();if(dt(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:l,options:h}=c;c!==this.root&&l&&h.layoutScroll&&(l.wasRoot&&dt(a,o),wt(a.x,l.offset.x),wt(a.y,l.offset.y))}return a}applyTransform(o,a=!1,u){const c=u||_();dt(c,o);for(let l=0;l<this.path.length;l++){const h=this.path[l];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(wt(c.x,-h.scroll.offset.x),wt(c.y,-h.scroll.offset.y)),Nt(h.latestValues)&&Tn(c,h.latestValues,h.layout?.layoutBox)}return Nt(this.latestValues)&&Tn(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=_();dt(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!Nt(c.latestValues))continue;let l;c.instance&&(xi(c.latestValues)&&c.updateSnapshot(),l=_(),dt(l,c.measurePageBox())),Wa(a,c.latestValues,c.snapshot?.layoutBox,l)}return Nt(this.latestValues)&&Wa(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:h}=this.options;if(!this.layout||!(l||h))return;this.resolvedRelativeTargetAt=Z.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_(),this.targetWithTransforms=_()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),p1(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):dt(this.target,this.layout.layoutBox),yh(this.target,this.targetDelta)):dt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xi(this.parent.latestValues)||gh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),jn(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),dt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Z.timestamp&&(u=!1),u)return;const{layout:c,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||l))return;dt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;K0(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=_());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ia(this.prevProjectionDelta.x,this.projectionDelta.x),Ia(this.prevProjectionDelta.y,this.projectionDelta.y)),De(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!_a(this.projectionDelta.x,this.prevProjectionDelta.x)||!_a(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=re(),this.projectionDelta=re(),this.projectionDeltaWithTransform=re()}setAnimationOrigin(o,a=!1,u){const c=this.snapshot,l=c?c.latestValues:{},h={...this.latestValues},f=re();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=_(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,y=this.getStack(),v=!y||y.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(G1));this.animationProgress=0;let T;const A=u?.interpolateProjection(o);this.mixTargetDelta=C=>{const V=C/1e3,P=A?.(V);P?(f.x.translate=P.x,f.x.scale=B(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=P.y,f.y.scale=B(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(tl(f.x,o.x,V),tl(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jn(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),K1(this.relativeTarget,this.relativeTargetOrigin,d,V),T&&v1(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=_()),dt(T,this.relativeTarget)),g&&(this.animationValues=h,w1(h,l,this.latestValues,V,x,v)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(kt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Pn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=he(0)),this.motionValue.jump(0,!1),this.currentAnimation=A1(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:l}=o;if(!(!a||!u||!c)){if(this!==o&&this.layout&&c&&Bh(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||_();const h=st(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const f=st(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}dt(a,u),Tn(a,l),De(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new M1),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&Ps("z",o,c,this.animationValues);for(let l=0;l<ws.length;l++)Ps(`rotate${ws[l]}`,o,c,this.animationValues),Ps(`skew${ws[l]}`,o,c,this.animationValues);o.render();for(const l in c)o.setStaticValue(l,c[l]),this.animationValues&&(this.animationValues[l]=c[l]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=wn(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=wn(a?.pointerEvents)||""),this.hasProjected&&!Nt(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const l=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=x1(this.projectionDeltaWithTransform,this.treeScale,l);u&&(h=u(l,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?o.opacity=c===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=c===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const p in wi){if(l[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=wi[p],v=h==="none"?l[p]:m(l[p],c);if(g){const x=g.length;for(let T=0;T<x;T++)o[g[T]]=v}else y?this.options.visualElement.renderState.vars[p]=v:o[p]=v}this.options.layoutId&&(o.pointerEvents=c===this?wn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Za),this.root.sharedNodes.clear()}}}function E1(t){t.updateLayout()}function R1(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")xt(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=st(h);h.min=n[l].min,h.max=h.min+f});else if(i==="x"||i==="y"){const l=i==="x"?"y":"x";Pi(r?e.measuredBox[l]:e.layoutBox[l],n[l])}else Bh(i,e.layoutBox,n)&&xt(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=st(n[l]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+f)});const o=re();De(o,n,e.layoutBox);const a=re();r?De(a,t.applyTransform(s,!0),e.measuredBox):De(a,n,e.layoutBox);const u=!$h(o);let c=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:h,layout:f}=l;if(h&&f){const d=t.options.layoutAnchor||void 0,p=_();jn(p,e.layoutBox,h.layoutBox,d);const m=_();jn(m,n,f.layoutBox,d),Dh(p,m)||(c=!0),l.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function L1(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 k1(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function B1(t){t.clearSnapshot()}function Za(t){t.clearMeasurements()}function I1(t){t.isLayoutDirty=!0,t.updateLayout()}function Ja(t){t.isLayoutDirty=!1}function F1(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function O1(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Qa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function j1(t){t.resolveTargetDelta()}function N1(t){t.calcProjection()}function U1(t){t.resetSkewAndRotation()}function W1(t){t.removeLeadSnapshot()}function tl(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function el(t,e,n,s){t.min=B(e.min,n.min,s),t.max=B(e.max,n.max,s)}function K1(t,e,n,s){el(t.x,e.x,n.x,s),el(t.y,e.y,n.y,s)}function G1(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const H1={duration:.45,ease:[.4,0,.1,1]},nl=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),sl=nl("applewebkit/")&&!nl("chrome/")?Math.round:ct;function il(t){t.min=sl(t.min),t.max=sl(t.max)}function z1(t){il(t.x),il(t.y)}function Bh(t,e,n){return t==="position"||t==="preserve-aspect"&&!d1(za(e),za(n),.2)}function _1(t){return t!==t.root&&t.scroll?.wasRoot}const X1=kh({attachResizeListener:(t,e)=>Ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ss={current:void 0},Ih=kh({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ss.current){const t=new X1({});t.mount(window),t.setOptions({layoutScroll:!0}),Ss.current=t}return Ss.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Fh=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Y1(t=!0){const e=w.useContext(so);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{if(t)return i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Oh=w.createContext({strict:!1}),ol={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let rl=!1;function q1(){if(rl)return;const t={};for(const e in ol)t[e]={isEnabled:n=>ol[e].some(s=>!!n[s])};dh(t),rl=!0}function jh(){return q1(),j0()}function Z1(t){const e=jh();for(const n in t)e[n]={...e[n],...t[n]};dh(e)}const J1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Nn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||J1.has(t)}let Nh=t=>!Nn(t);function Q1(t){typeof t=="function"&&(Nh=e=>e.startsWith("on")?!Nn(e):t(e))}try{Q1(require("@emotion/is-prop-valid").default)}catch{}function tx(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||J(t[i])||(Nh(i)||n===!0&&Nn(i)||!e&&!Nn(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const qn=w.createContext({});function ex(t,e){if(Yn(t)){const{initial:n,animate:s}=t;return{initial:n===!1||je(n)?n:void 0,animate:je(s)?s:void 0}}return t.inherit!==!1?e:{}}function nx(t){const{initial:e,animate:n}=ex(t,w.useContext(qn));return w.useMemo(()=>({initial:e,animate:n}),[al(e),al(n)])}function al(t){return Array.isArray(t)?t.join(" "):t}const Mo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uh(t,e,n){for(const s in e)!J(e[s])&&!Th(s,n)&&(t[s]=e[s])}function sx({transformTemplate:t},e){return w.useMemo(()=>{const n=Mo();return Vo(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ix(t,e){const n=t.style||{},s={};return Uh(s,n,t),Object.assign(s,sx(t,e)),s}function ox(t,e){const n={},s=ix(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 Wh=()=>({...Mo(),attrs:{}});function rx(t,e,n,s){const i=w.useMemo(()=>{const r=Wh();return wh(r,e,Sh(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Uh(r,t.style,t),i.style={...r,...i.style}}return i}const ax=["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 $o(t){return typeof t!="string"||t.includes("-")?!1:!!(ax.indexOf(t)>-1||/[A-Z]/u.test(t))}function lx(t,e,n,{latestValues:s},i,r=!1,o){const u=(o??$o(t)?rx:ox)(e,s,i,t),c=tx(e,typeof t=="string",r),l=t!==w.Fragment?{...c,...u,ref:n}:{},{children:h}=e,f=w.useMemo(()=>J(h)?h.get():h,[h]);return w.createElement(t,{...l,children:f})}function ux({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:cx(n,s,i,t),renderState:e()}}function cx(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=wn(r[f]);let{initial:o,animate:a}=t;const u=Yn(t),c=hh(t);e&&c&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||o===!1;const h=l?a:o;if(h&&typeof h!="boolean"&&!Xn(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=xo(t,f[d]);if(p){const{transitionEnd:m,transition:g,...y}=p;for(const v in y){let x=y[v];if(Array.isArray(x)){const T=l?x.length-1:0;x=x[T]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}}}return i}const Kh=t=>(e,n)=>{const s=w.useContext(qn),i=w.useContext(so),r=()=>ux(t,e,s,i);return n?r():ly(r)},hx=Kh({scrapeMotionValuesFromProps:Co,createRenderState:Mo}),fx=Kh({scrapeMotionValuesFromProps:Ah,createRenderState:Wh}),dx=Symbol.for("motionComponentSymbol");function px(t,e,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const i=w.useRef(null);return w.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const Gh=w.createContext({});function te(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mx(t,e,n,s,i,r){const{visualElement:o}=w.useContext(qn),a=w.useContext(Oh),u=w.useContext(so),c=w.useContext(Fh),l=c.reducedMotion,h=c.skipAnimations,f=w.useRef(null),d=w.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:l,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=w.useContext(Gh);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&gx(f.current,n,i,m);const g=w.useRef(!1);w.useInsertionEffect(()=>{p&&g.current&&p.update(n,u)});const y=n[Qc],v=w.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return cy(()=>{d.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),w.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}function gx(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:c,layoutAnchor:l,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Hh(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&te(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:l})}function Hh(t){if(t)return t.options.allowProjection!==!1?t.projection:Hh(t.parent)}function As(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Z1(s);const r=n?n==="svg":$o(t),o=r?fx:hx;function a(c,l){let h;const f={...w.useContext(Fh),...c,layoutId:yx(c)},{isStatic:d}=f,p=nx(c),m=o(c,d);if(!d&&typeof window<"u"){vx();const g=xx(f);h=g.MeasureLayout,p.visualElement=mx(t,m,f,i,g.ProjectionNode,r)}return lt.jsxs(qn.Provider,{value:p,children:[h&&p.visualElement?lt.jsx(h,{visualElement:p.visualElement,...f}):null,lx(t,c,px(m,p.visualElement,l),m,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=w.forwardRef(a);return u[dx]=t,u}function yx({layoutId:t}){const e=w.useContext(hc).id;return e&&t!==void 0?e+"-"+t:t}function vx(t,e){w.useContext(Oh).strict}function xx(t){const e=jh(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Tx(t,e){if(typeof Proxy>"u")return As;const n=new Map,s=(r,o)=>As(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,As(o,void 0,t,e)),n.get(o))})}const wx=(t,e)=>e.isSVG??$o(t)?new n1(e):new q0(e,{allowProjection:t!==w.Fragment});class Px extends It{constructor(e){super(e),e.animationState||(e.animationState=a1(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Xn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Sx=0;class Ax extends It{constructor(){super(...arguments),this.id=Sx++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=Xt(this.node,r,o);if(a){const{transition:u,transitionEnd:c,...l}=a;for(const h in l)this.node.getValue(h)?.jump(l[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const bx={animation:{Feature:Px},exit:{Feature:Ax}};function Xe(t){return{point:{x:t.pageX,y:t.pageY}}}const Vx=t=>e=>Po(e)&&t(e,Xe(e));function Ee(t,e,n,s){return Ne(t,e,Vx(n),s)}const zh=({current:t})=>t?t.ownerDocument.defaultView:null,ll=(t,e)=>Math.abs(t-e);function Cx(t,e){const n=ll(t.x,e.x),s=ll(t.y,e.y);return Math.sqrt(n**2+s**2)}const ul=new Set(["auto","scroll"]);class _h{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sn(this.lastRawMoveEventInfo,this.transformPagePoint));const d=bs(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Cx(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=d,{timestamp:y}=Z;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=sn(p,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=bs(d.type==="pointercancel"?this.lastMoveEventInfo:sn(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,v),g&&g(d,v)},!Po(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const u=Xe(e),c=sn(u,this.transformPagePoint),{point:l}=c,{timestamp:h}=Z;this.history=[{...l,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,bs(c,this.history)),this.removeListeners=He(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(ul.has(s.overflowX)||ul.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),F.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),kt(this.updatePoint)}}function sn(t,e){return e?{point:e(t.point)}:t}function cl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function bs({point:t},e){return{point:t,delta:cl(t,Xh(e)),offset:cl(t,Mx(e)),velocity:$x(e,.1)}}function Mx(t){return t[0]}function Xh(t){return t[t.length-1]}function $x(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Xh(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>ot(e)*2&&(s=t[1]);const r=at(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Dx(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?B(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?B(n,t,s.max):Math.min(t,n)),t}function hl(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 Ex(t,{top:e,left:n,bottom:s,right:i}){return{x:hl(t.x,n,i),y:hl(t.y,e,s)}}function fl(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 Rx(t,e){return{x:fl(t.x,e.x),y:fl(t.y,e.y)}}function Lx(t,e){let n=.5;const s=st(t),i=st(e);return i>s?n=Fe(e.min,e.max-s,t.min):s>i&&(n=Fe(t.min,t.max-i,e.min)),bt(0,1,n)}function kx(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 Si=.35;function Bx(t=Si){return t===!1?t=0:t===!0&&(t=Si),{x:dl(t,"left","right"),y:dl(t,"top","bottom")}}function dl(t,e,n){return{min:pl(t,e),max:pl(t,n)}}function pl(t,e){return typeof t=="number"?t:t[e]||0}const Ix=new WeakMap;class Fx{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=_(),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 r=h=>{n&&this.snapToCursor(Xe(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=m0(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(St.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(v=st(T)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&F.update(()=>m(h,f),!1,!0),di(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=jx(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&F.update(()=>g(h,f),!1,!0)},u=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new _h(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:s,contextWindow:zh(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&F.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!on(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Dx(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&te(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Ex(s.layoutBox,e):this.constraints=!1,this.elastic=Bx(n),i!==this.constraints&&!te(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&xt(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=kx(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!te(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=G0(s,i.root,this.visualElement.getTransformPagePoint());let o=Rx(i.layout.layoutBox,r);if(n){const a=n(U0(o));this.hasMutatedConstraints=!!a,a&&(o=mh(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=xt(l=>{if(!on(l,n,this.currentDirection))return;let h=u&&u[l]||{};(o===!0||o===l)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(l,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return di(this.visualElement,e),s.start(vo(e,s,0,n,this.visualElement,!1))}stopAnimation(){xt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){xt(n=>{const{drag:s}=this.getProps();if(!on(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],u=r.get()||0;r.set(e[n]-B(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!te(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};xt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();i[o]=Lx({min:u,max:u},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),xt(o=>{if(!on(o,e,null))return;const a=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];a.set(B(u,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ix.set(this.visualElement,this);const e=this.visualElement.current,n=Ee(e,"pointerdown",c=>{const{drag:l,dragListener:h=!0}=this.getProps(),f=c.target,d=f!==e&&w0(f);l&&h&&!d&&this.start(c)});let s;const i=()=>{const{dragConstraints:c}=this.getProps();te(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Ox(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),F.read(i);const a=Ne(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(xt(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Si,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ml(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Ox(t,e,n){const s=Aa(t,ml(n)),i=Aa(e,ml(n));return()=>{s(),i()}}function on(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function jx(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Nx extends It{constructor(e){super(e),this.removeGroupControls=ct,this.removeListeners=ct,this.controls=new Fx(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ct}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Vs=t=>(e,n)=>{t&&F.update(()=>t(e,n),!1,!0)};class Ux extends It{constructor(){super(...arguments),this.removePointerDownListener=ct}onPointerDown(e){this.session=new _h(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vs(e),onStart:Vs(n),onMove:Vs(s),onEnd:(r,o)=>{delete this.session,i&&F.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Cs=!1;class Wx extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Cs&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Pn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Cs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||F.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),wo.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Cs=!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 Yh(t){const[e,n]=Y1(),s=w.useContext(hc);return lt.jsx(Wx,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(Gh),isPresent:e,safeToRemove:n})}const Kx={pan:{Feature:Ux},drag:{Feature:Nx,ProjectionNode:Ih,MeasureLayout:Yh}};function gl(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&F.postRender(()=>r(e,Xe(e)))}class Gx extends It{mount(){const{current:e}=this.node;e&&(this.unmount=y0(e,(n,s)=>(gl(this.node,s,"Start"),i=>gl(this.node,i,"End"))))}unmount(){}}class Hx extends It{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=He(Ne(this.node.current,"focus",()=>this.onFocus()),Ne(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yl(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),r=s[i];r&&F.postRender(()=>r(e,Xe(e)))}class zx extends It{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=S0(e,(i,r)=>(yl(this.node,r,"Start"),(o,{success:a})=>yl(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ai=new WeakMap,Ms=new WeakMap,_x=t=>{const e=Ai.get(t.target);e&&e(t)},Xx=t=>{t.forEach(_x)};function Yx({root:t,...e}){const n=t||document;Ms.has(n)||Ms.set(n,{});const s=Ms.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Xx,{root:t,...e})),s[i]}function qx(t,e,n){const s=Yx(e);return Ai.set(t,n),s.observe(t),()=>{Ai.delete(t),s.unobserve(t)}}const Zx={some:0,all:1};class Jx extends It{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Zx[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:l,onViewportLeave:h}=this.node.getProps(),f=c?l:h;f&&f(u)};this.stopObserver=qx(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Qx(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Qx({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const tT={inView:{Feature:Jx},tap:{Feature:zx},focus:{Feature:Hx},hover:{Feature:Gx}},eT={layout:{ProjectionNode:Ih,MeasureLayout:Yh}},nT={...bx,...tT,...Kx,...eT},IT=Tx(nT,wx);export{wT as A,IT as a,kT as b,LT as m};