morpheus-cli 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/ui/assets/Chat-Cx2OgATp.js +38 -0
  2. package/dist/ui/assets/Chronos--mut48fM.js +1 -0
  3. package/dist/ui/assets/ConfirmationModal-MyIaIK_Z.js +1 -0
  4. package/dist/ui/assets/Dashboard-C52jjru9.js +1 -0
  5. package/dist/ui/assets/DeleteConfirmationModal-B0nDocEK.js +1 -0
  6. package/dist/ui/assets/Logs-fDrGC9Lq.js +1 -0
  7. package/dist/ui/assets/MCPManager-CtRQzwM8.js +1 -0
  8. package/dist/ui/assets/ModelPricing-d4EYrGko.js +1 -0
  9. package/dist/ui/assets/Notifications-Dkqug57C.js +1 -0
  10. package/dist/ui/assets/SatiMemories-DykYVHgi.js +1 -0
  11. package/dist/ui/assets/SelectInput-KVLsnfra.js +1 -0
  12. package/dist/ui/assets/SessionAudit-Bk0-DpW0.js +9 -0
  13. package/dist/ui/assets/Settings-Cgd4dJdc.js +39 -0
  14. package/dist/ui/assets/Skills-DSi313oC.js +7 -0
  15. package/dist/ui/assets/Smiths-DLys0BWT.js +1 -0
  16. package/dist/ui/assets/Tasks-B1MbPNUQ.js +1 -0
  17. package/dist/ui/assets/TrinityDatabases-B5SeHOLt.js +1 -0
  18. package/dist/ui/assets/UsageStats-EEwfbJ6C.js +1 -0
  19. package/dist/ui/assets/WebhookManager-CyVUcscY.js +4 -0
  20. package/dist/ui/assets/chronos-BVRpP__j.js +1 -0
  21. package/dist/ui/assets/config-cslLZS3q.js +1 -0
  22. package/dist/ui/assets/index-CpVvCthh.js +10 -0
  23. package/dist/ui/assets/mcp-M0iDC0mj.js +1 -0
  24. package/dist/ui/assets/skills-BvaaqiOT.js +1 -0
  25. package/dist/ui/assets/stats-DALk3GOj.js +1 -0
  26. package/dist/ui/assets/vendor-icons-DLvvGkeN.js +1 -0
  27. package/dist/ui/assets/vendor-markdown-BN_Np5Ta.js +29 -0
  28. package/dist/ui/assets/vendor-motion-C3CZ8ZlO.js +9 -0
  29. package/dist/ui/assets/vendor-react-DikRIOlj.js +3 -0
  30. package/dist/ui/assets/vendor-utils-D4NnWbOU.js +39 -0
  31. package/dist/ui/index.html +5 -1
  32. package/dist/ui/sw.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/ui/assets/index-BgSiRONc.js +0 -177
@@ -0,0 +1,9 @@
1
+ import{r as x}from"./vendor-react-DikRIOlj.js";var ne={exports:{}},xt={};var wn;function wr(){if(wn)return xt;wn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return xt.Fragment=e,xt.jsx=n,xt.jsxs=n,xt}var An;function Ar(){return An||(An=1,ne.exports=wr()),ne.exports}var X=Ar();const Ke=x.createContext({});function $e(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Us=typeof window<"u",Ws=Us?x.useLayoutEffect:x.useEffect,Zt=x.createContext(null);function Ge(t,e){t.indexOf(e)===-1&&t.push(e)}function _e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const z=(t,e,n)=>n>e?e:n<t?t:n;let He=()=>{};const q={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function $s(t){return typeof t=="object"&&t!==null}const Gs=t=>/^0[^.\s]+$/u.test(t);function ze(t){let e;return()=>(e===void 0&&(e=t()),e)}const K=t=>t,br=(t,e)=>n=>e(t(n)),Lt=(...t)=>t.reduce(br),Ct=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Xe{constructor(){this.subscriptions=[]}add(e){return Ge(this.subscriptions,e),()=>_e(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Y=t=>t*1e3,W=t=>t/1e3;function _s(t,e){return e?t*(1e3/e):0}const Hs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Vr=1e-7,Cr=12;function Mr(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Hs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Vr&&++a<Cr);return r}function kt(t,e,n,s){if(t===e&&n===s)return K;const i=o=>Mr(o,0,1,t,n);return o=>o===0||o===1?o:Hs(i(o),e,s)}const zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Xs=t=>e=>1-t(1-e),Ys=kt(.33,1.53,.69,.99),Ye=Xs(Ys),qs=zs(Ye),Zs=t=>(t*=2)<1?.5*Ye(t):.5*(2-Math.pow(2,-10*(t-1))),qe=t=>1-Math.sin(Math.acos(t)),Js=Xs(qe),Qs=zs(qe),Dr=kt(.42,0,1,1),Rr=kt(0,0,.58,1),ti=kt(.42,0,.58,1),Er=t=>Array.isArray(t)&&typeof t[0]!="number",ei=t=>Array.isArray(t)&&typeof t[0]=="number",Lr={linear:K,easeIn:Dr,easeInOut:ti,easeOut:Rr,circIn:qe,circInOut:Qs,circOut:Js,backIn:Ye,backInOut:qs,backOut:Ys,anticipate:Zs},kr=t=>typeof t=="string",bn=t=>{if(ei(t)){He(t.length===4);const[e,n,s,i]=t;return kt(e,n,s,i)}else if(kr(t))return Lr[t];return t},Bt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fr(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const Ir=40;function ni(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Bt.reduce((m,w)=>(m[w]=Fr(o),m),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:p}=r,g=()=>{const m=q.useManualTiming?i.timestamp:performance.now();n=!1,q.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Ir),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},y=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Bt.reduce((m,w)=>{const S=r[w];return m[w]=(V,R=!1,A=!1)=>(n||y(),S.schedule(V,R,A)),m},{}),cancel:m=>{for(let w=0;w<Bt.length;w++)r[Bt[w]].cancel(m)},state:i,steps:r}}const{schedule:C,cancel:Q,state:I,steps:se}=ni(typeof requestAnimationFrame<"u"?requestAnimationFrame:K,!0);let Ut;function Br(){Ut=void 0}const j={now:()=>(Ut===void 0&&j.set(I.isProcessing||q.useManualTiming?I.timestamp:performance.now()),Ut),set:t=>{Ut=t,queueMicrotask(Br)}},si=t=>e=>typeof e=="string"&&e.startsWith(t),ii=si("--"),jr=si("var(--"),Ze=t=>jr(t)?Or.test(t.split("/*")[0].trim()):!1,Or=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Vn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mt={...mt,transform:t=>z(0,1,t)},jt={...mt,default:1},wt=t=>Math.round(t*1e5)/1e5,Je=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nr(t){return t==null}const Ur=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qe=(t,e)=>n=>!!(typeof n=="string"&&Ur.test(n)&&n.startsWith(t)||e&&!Nr(n)&&Object.prototype.hasOwnProperty.call(n,e)),ri=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Je);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Wr=t=>z(0,255,t),ie={...mt,transform:t=>Math.round(Wr(t))},rt={test:Qe("rgb","red"),parse:ri("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ie.transform(t)+", "+ie.transform(e)+", "+ie.transform(n)+", "+wt(Mt.transform(s))+")"};function Kr(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 xe={test:Qe("#"),parse:Kr,transform:rt.transform},Ft=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Z=Ft("deg"),H=Ft("%"),T=Ft("px"),$r=Ft("vh"),Gr=Ft("vw"),Cn={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(t*100)},ut={test:Qe("hsl","hue"),parse:ri("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+H.transform(wt(e))+", "+H.transform(wt(n))+", "+wt(Mt.transform(s))+")"},E={test:t=>rt.test(t)||xe.test(t)||ut.test(t),parse:t=>rt.test(t)?rt.parse(t):ut.test(t)?ut.parse(t):xe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?rt.transform(t):ut.transform(t),getAnimatableNone:t=>{const e=E.parse(t);return e.alpha=0,E.transform(e)}},_r=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hr(t){return isNaN(t)&&typeof t=="string"&&(t.match(Je)?.length||0)+(t.match(_r)?.length||0)>0}const oi="number",ai="color",zr="var",Xr="var(",Mn="${}",Yr=/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 Dt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Yr,l=>(E.test(l)?(s.color.push(o),i.push(ai),n.push(E.parse(l))):l.startsWith(Xr)?(s.var.push(o),i.push(zr),n.push(l)):(s.number.push(o),i.push(oi),n.push(parseFloat(l))),++o,Mn)).split(Mn);return{values:n,split:a,indexes:s,types:i}}function li(t){return Dt(t).values}function ui(t){const{split:e,types:n}=Dt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===oi?o+=wt(i[r]):a===ai?o+=E.transform(i[r]):o+=i[r]}return o}}const qr=t=>typeof t=="number"?0:E.test(t)?E.getAnimatableNone(t):t;function Zr(t){const e=li(t);return ui(t)(e.map(qr))}const tt={test:Hr,parse:li,createTransformer:ui,getAnimatableNone:Zr};function re(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 Jr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=re(l,a,t+1/3),o=re(l,a,t),r=re(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Gt(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,oe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Qr=[xe,rt,ut],to=t=>Qr.find(e=>e.test(t));function Dn(t){const e=to(t);if(!e)return!1;let n=e.parse(t);return e===ut&&(n=Jr(n)),n}const Rn=(t,e)=>{const n=Dn(t),s=Dn(e);if(!n||!s)return Gt(t,e);const i={...n};return o=>(i.red=oe(n.red,s.red,o),i.green=oe(n.green,s.green,o),i.blue=oe(n.blue,s.blue,o),i.alpha=M(n.alpha,s.alpha,o),rt.transform(i))},Te=new Set(["none","hidden"]);function eo(t,e){return Te.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function no(t,e){return n=>M(t,e,n)}function tn(t){return typeof t=="number"?no:typeof t=="string"?Ze(t)?Gt:E.test(t)?Rn:ro:Array.isArray(t)?ci:typeof t=="object"?E.test(t)?Rn:so:Gt}function ci(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>tn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function so(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=tn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function io(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ro=(t,e)=>{const n=tt.createTransformer(e),s=Dt(t),i=Dt(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?Te.has(t)&&!i.values.length||Te.has(e)&&!s.values.length?eo(t,e):Lt(ci(io(s,i),i.values),n):Gt(t,e)};function hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):tn(t)(t,e)}const oo=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>C.update(e,n),stop:()=>Q(e),now:()=>I.isProcessing?I.timestamp:j.now()}},fi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},_t=2e4;function en(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<_t;)e+=n,s=t.next(e);return e>=_t?1/0:e}function ao(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(en(s),_t);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:W(i)}}const lo=5;function di(t,e,n){const s=Math.max(e-lo,0);return _s(n-t(s),e-s)}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ae=.001;function uo({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o,r=1-e;r=z(D.minDamping,D.maxDamping,r),t=z(D.minDuration,D.maxDuration,W(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=Pe(c,r),p=Math.exp(-h);return ae-f/d*p},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),g=Pe(Math.pow(c,2),r);return(-i(c)+ae>0?-1:1)*((f-d)*p)/g}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ae+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=ho(i,o,a);if(t=Y(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const co=12;function ho(t,e,n){let s=n;for(let i=1;i<co;i++)s=s-t(s)/e(s);return s}function Pe(t,e){return t*Math.sqrt(1-e*e)}const fo=["duration","bounce"],po=["stiffness","damping","mass"];function En(t,e){return e.some(n=>t[n]!==void 0)}function mo(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!En(t,po)&&En(t,fo))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*z(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=uo(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Ht(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=mo({...n,velocity:-W(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),y=r-o,v=W(Math.sqrt(l/u)),P=Math.abs(y)<5;s||(s=P?D.restSpeed.granular:D.restSpeed.default),i||(i=P?D.restDelta.granular:D.restDelta.default);let m;if(g<1){const S=Pe(v,g);m=V=>{const R=Math.exp(-g*v*V);return r-R*((p+g*v*y)/S*Math.sin(S*V)+y*Math.cos(S*V))}}else if(g===1)m=S=>r-Math.exp(-v*S)*(y+(p+v*y)*S);else{const S=v*Math.sqrt(g*g-1);m=V=>{const R=Math.exp(-g*v*V),A=Math.min(S*V,300);return r-R*((p+g*v*y)*Math.sinh(A)+S*y*Math.cosh(A))/S}}const w={calculatedDuration:d&&h||null,next:S=>{const V=m(S);if(d)a.done=S>=h;else{let R=S===0?p:0;g<1&&(R=S===0?Y(p):di(m,S,V));const A=Math.abs(R)<=s,b=Math.abs(r-V)<=i;a.done=A&&b}return a.value=a.done?r:V,a},toString:()=>{const S=Math.min(en(w),_t),V=fi(R=>w.next(S*R).value,S,30);return S+"ms "+V},toTransition:()=>{}};return w}Ht.applyToOptions=t=>{const e=ao(t,100,Ht);return t.ease=e.ease,t.duration=Y(e.duration),t.type="keyframes",t};function Se({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const y=h+g,v=r===void 0?y:r(y);v!==y&&(g=v-h);const P=A=>-g*Math.exp(-A/s),m=A=>v+P(A),w=A=>{const b=P(A),L=m(A);f.done=Math.abs(b)<=c,f.value=f.done?v:L};let S,V;const R=A=>{d(f.value)&&(S=A,V=Ht({keyframes:[f.value,p(f.value)],velocity:di(m,A,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:A=>{let b=!1;return!V&&S===void 0&&(b=!0,w(A),R(A)),S!==void 0&&A>=S?V.next(A-S):(!b&&w(A),f)}}}function go(t,e,n){const s=[],i=n||q.mix||hi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||K:e;a=Lt(l,a)}s.push(a)}return s}function yo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(He(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=go(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Ct(t[h],t[h+1],u);return a[h](f)};return n?u=>c(z(t[0],t[o-1],u)):c}function vo(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ct(0,e,s);t.push(M(n,1,i))}}function xo(t){const e=[0];return vo(e,t.length-1),e}function To(t,e){return t.map(n=>n*e)}function Po(t,e){return t.map(()=>e||ti).splice(0,t.length-1)}function At({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Er(s)?s.map(bn):bn(s),o={done:!1,value:e[0]},r=To(n&&n.length===e.length?n:xo(e),t),a=yo(r,e,{ease:Array.isArray(i)?i:Po(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const So=t=>t!==null;function nn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(So),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const wo={decay:Se,inertia:Se,tween:At,keyframes:At,spring:Ht};function pi(t){typeof t.type=="string"&&(t.type=wo[t.type])}class sn{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 Ao=t=>t/100;class rn extends sn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;pi(e);const{type:n=At,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||At;l!==At&&typeof a[0]!="number"&&(this.mixKeyframes=Lt(Ao,hi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=en(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+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:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,w=s;if(h){const A=Math.min(this.currentTime,i)/a;let b=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&b--,b=Math.min(b,h+1),b%2&&(f==="reverse"?(L=1-L,d&&(L-=d/a)):f==="mirror"&&(w=r)),m=z(0,1,L)*a}const S=P?{done:!1,value:u[0]}:w.next(m);o&&(S.value=o(S.value));let{done:V}=S;!P&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return R&&p!==Se&&(S.value=nn(u,this.options,y,this.speed)),g&&g(S.value),R&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(this.currentTime)}set time(e){e=Y(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(j.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=W(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=oo,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function bo(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ot=t=>t*180/Math.PI,we=t=>{const e=ot(Math.atan2(t[1],t[0]));return Ae(e)},Vo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:we,rotateZ:we,skewX:t=>ot(Math.atan(t[1])),skewY:t=>ot(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ae=t=>(t=t%360,t<0&&(t+=360),t),Ln=we,kn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Co={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kn,scaleY:Fn,scale:t=>(kn(t)+Fn(t))/2,rotateX:t=>Ae(ot(Math.atan2(t[6],t[5]))),rotateY:t=>Ae(ot(Math.atan2(-t[2],t[0]))),rotateZ:Ln,rotate:Ln,skewX:t=>ot(Math.atan(t[4])),skewY:t=>ot(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function be(t){return t.includes("scale")?1:0}function Ve(t,e){if(!t||t==="none")return be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Co,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Vo,i=a}if(!i)return be(e);const o=s[e],r=i[1].split(",").map(Do);return typeof o=="function"?o(r):r[o]}const Mo=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ve(n,e)};function Do(t){return parseFloat(t.trim())}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set(gt),In=t=>t===mt||t===T,Ro=new Set(["x","y","z"]),Eo=gt.filter(t=>!Ro.has(t));function Lo(t){const e=[];return Eo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const J={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ve(e,"x"),y:(t,{transform:e})=>Ve(e,"y")};J.translateX=J.x;J.translateY=J.y;const at=new Set;let Ce=!1,Me=!1,De=!1;function mi(){if(Me){const t=Array.from(at).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Lo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Me=!1,Ce=!1,at.forEach(t=>t.complete(De)),at.clear()}function gi(){at.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Me=!0)})}function ko(){De=!0,gi(),mi(),De=!1}class on{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),Ce||(Ce=!0,C.read(gi),C.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}bo(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fo=t=>t.startsWith("--");function Io(t,e,n){Fo(e)?t.style.setProperty(e,n):t.style[e]=n}const Bo=ze(()=>window.ScrollTimeline!==void 0),jo={};function Oo(t,e){const n=ze(t);return()=>jo[e]??n()}const yi=Oo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Bn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pt([0,.65,.55,1]),circOut:Pt([.55,0,1,.45]),backIn:Pt([.31,.01,.66,-.59]),backOut:Pt([.33,1.53,.69,.99])};function vi(t,e){if(t)return typeof t=="function"?yi()?fi(t,e):"ease-out":ei(t)?Pt(t):Array.isArray(t)?t.map(n=>vi(n,e)||Bn.easeOut):Bn[t]}function No(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=vi(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function xi(t){return typeof t=="function"&&"applyToOptions"in t}function Uo({type:t,...e}){return xi(t)&&yi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Wo extends sn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,He(typeof e.type!="string");const c=Uo(e);this.animation=No(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=nn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Io(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return W(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Y(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Bo()?(this.animation.timeline=e,K):n(this)}}const Ti={anticipate:Zs,backInOut:qs,circInOut:Qs};function Ko(t){return t in Ti}function $o(t){typeof t.ease=="string"&&Ko(t.ease)&&(t.ease=Ti[t.ease])}const le=10;class Go extends Wo{constructor(e){$o(e),pi(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new rn({...r,autoplay:!1}),l=Math.max(le,j.now()-this.startTime),c=z(0,le,l-le);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(tt.test(t)||t==="0")&&!t.startsWith("url("));function _o(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 Ho(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=jn(i,e),a=jn(o,e);return!r||!a?!1:_o(t)||(n==="spring"||xi(n))&&s}function Re(t){t.duration=0,t.type="keyframes"}const zo=new Set(["opacity","clipPath","filter","transform"]),Xo=ze(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Yo(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Xo()&&n&&zo.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const qo=40;class Zo extends sn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||on;this.keyframeResolver=new d(a,(p,g,y)=>this.onKeyframesResolved(p,g,f,!y),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=j.now(),Ho(e,o,r,a)||((q.instantAnimations||!l)&&u?.(nn(e,s,n)),e[0]=e[e.length-1],Re(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>qo?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!c&&Yo(f),p=f.motionValue?.owner?.current,g=d?new Go({...f,element:p}):new rn(f);g.finished.then(()=>{this.notifyFinished()}).catch(K),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(),ko()),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 Pi(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const Jo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qo(t){const e=Jo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Si(t,e,n=1){const[s,i]=Qo(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ks(r)?parseFloat(r):r}return Ze(i)?Si(i,e,n+1):i}const ta={type:"spring",stiffness:500,damping:25,restSpeed:10},ea=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),na={type:"keyframes",duration:.8},sa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ia=(t,{keyframes:e})=>e.length>2?na:yt.has(t)?t.startsWith("scale")?ea(e[1]):ta:sa,ra=t=>t!==null;function oa(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ra),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}function an(t,e){return t?.[e]??t?.default??t}function aa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ln=(t,e,n,s={},i,o)=>r=>{const a=an(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Y(l);const u={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:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};aa(a)||Object.assign(u,ia(t,u)),u.duration&&(u.duration=Y(u.duration)),u.repeatDelay&&(u.repeatDelay=Y(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Re(u),u.delay===0&&(h=!0)),(q.instantAnimations||q.skipAnimations)&&(h=!0,Re(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=oa(u.keyframes,a);if(f!==void 0){C.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new rn(u):new Zo(u)};function On(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function un(t,e,n,s){if(typeof e=="function"){const[i,o]=On(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=On(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function dt(t,e,n){const s=t.getProps();return un(s,e,n!==void 0?n:s.custom,t)}const wi=new Set(["width","height","top","left","right","bottom",...gt]),Nn=30,la=t=>!isNaN(parseFloat(t));class ua{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=la(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xe);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.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=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return _s(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 pt(t,e){return new ua(t,e)}const Ee=t=>Array.isArray(t);function ca(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pt(n))}function ha(t){return Ee(t)?t[t.length-1]||0:t}function fa(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=ha(o[r]);ca(t,r,a)}}const B=t=>!!(t&&t.getVelocity);function da(t){return!!(B(t)&&t.add)}function Le(t,e){const n=t.getValue("willChange");if(da(n))return n.add(e);if(!n&&q.WillChange){const s=new q.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function cn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const pa="framerAppearId",Ai="data-"+cn(pa);function bi(t){return t.props[Ai]}function ma({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;const l=o?.reduceMotion;s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h,t.latestValues[h]??null),d=a[h];if(d===void 0||u&&ma(u,h))continue;const p={delay:n,...an(o||{},h)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!p.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const m=bi(t);if(m){const w=window.MotionHandoffAnimation(m,h,C);w!==null&&(p.startTime=w,y=!0)}}Le(t,h);const v=l??t.shouldReduceMotion;f.start(ln(h,f,d,v&&wi.has(h)?{type:!1}:p,t,y));const P=f.animation;P&&c.push(P)}return r&&Promise.all(c).then(()=>{C.update(()=>{r&&fa(t,r)})}),c}function ke(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vi(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return ga(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function ga(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(ke(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Pi(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ya(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ke(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ke(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Vi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const va={test:t=>t==="auto",parse:t=>t},Ci=t=>e=>e.test(t),Mi=[mt,T,H,Z,Gr,$r,va],Un=t=>Mi.find(Ci(t));function xa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gs(t):!0}const Ta=new Set(["brightness","contrast","saturate","opacity"]);function Pa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Je)||[];if(!s)return t;const i=n.replace(s,"");let o=Ta.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Sa=/\b([a-z-]*)\(.*?\)/gu,Fe={...tt,getAnimatableNone:t=>{const e=t.match(Sa);return e?e.map(Pa).join(" "):t}},Wn={...mt,transform:Math.round},wa={rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:jt,scaleX:jt,scaleY:jt,scaleZ:jt,skew:Z,skewX:Z,skewY:Z,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Mt,originX:Cn,originY:Cn,originZ:T},hn={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...wa,zIndex:Wn,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:Wn},Aa={...hn,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:Fe,WebkitFilter:Fe},Di=t=>Aa[t];function Ri(t,e){let n=Di(t);return n!==Fe&&(n=tt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ba=new Set(["auto","none","0"]);function Va(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!ba.has(o)&&Dt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ri(n,i)}class Ca extends on{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Ze(h))){const f=Si(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!wi.has(s)||e.length!==2)return;const[i,o]=e,r=Un(i),a=Un(o),l=Vn(i),c=Vn(o);if(l!==c&&J[s]){this.needsMeasurement=!0;return}if(r!==a)if(In(r)&&In(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else J[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||xa(e[i]))&&s.push(i);s.length&&Va(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=J[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=J[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ma(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 Ei=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ie(t){return $s(t)&&"offsetHeight"in t}const{schedule:fn}=ni(queueMicrotask,!1),G={x:!1,y:!1};function Li(){return G.x||G.y}function Da(t){return t==="x"||t==="y"?G[t]?null:(G[t]=!0,()=>{G[t]=!1}):G.x||G.y?null:(G.x=G.y=!0,()=>{G.x=G.y=!1})}function ki(t,e){const n=Ma(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Kn(t){return!(t.pointerType==="touch"||Li())}function Ra(t,e,n={}){const[s,i,o]=ki(t,n),r=a=>{if(!Kn(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{Kn(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Fi=(t,e)=>e?t===e?!0:Fi(t,e.parentElement):!1,dn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ea=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ii(t){return Ea.has(t.tagName)||t.isContentEditable===!0}const Wt=new WeakSet;function $n(t){return e=>{e.key==="Enter"&&t(e)}}function ue(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const La=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=$n(()=>{if(Wt.has(n))return;ue(n,"down");const i=$n(()=>{ue(n,"up")}),o=()=>ue(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Gn(t){return dn(t)&&!Li()}function ka(t,e,n={}){const[s,i,o]=ki(t,n),r=a=>{const l=a.currentTarget;if(!Gn(a))return;Wt.add(l);const c=e(l,a),u=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Wt.has(l)&&Wt.delete(l),Gn(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||Fi(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Ie(a)&&(a.addEventListener("focus",c=>La(c,i)),!Ii(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Bi(t){return $s(t)&&"ownerSVGElement"in t}function Fa(t){return Bi(t)&&t.tagName==="svg"}const Ia=[...Mi,E,tt],Ba=t=>Ia.find(Ci(t)),_n=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:_n(),y:_n()}),Hn=()=>({min:0,max:0}),k=()=>({x:Hn(),y:Hn()}),Be={current:null},ji={current:!1},ja=typeof window<"u";function Oa(){if(ji.current=!0,!!ja)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Be.current=t.matches;t.addEventListener("change",e),e()}else Be.current=!1}const Na=new WeakMap;function Jt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Rt(t){return typeof t=="string"||Array.isArray(t)}const pn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mn=["initial",...pn];function Qt(t){return Jt(t.animate)||mn.some(e=>Rt(t[e]))}function Oi(t){return!!(Qt(t)||t.variants)}function Ua(t,e,n){for(const s in e){const i=e[s],o=n[s];if(B(i))t.addValue(s,i);else if(B(o))t.addValue(s,pt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,pt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zt={};function Ni(t){zt=t}function Wa(){return zt}class Ka{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=on,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=j.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,C.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Qt(n),this.isVariantNode=Oi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&B(d)&&d.set(l[f])}}mount(e){this.current=e,Na.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:(ji.current||Oa(),this.shouldReduceMotion=Be.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(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){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in zt){const n=zt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<zn.length;s++){const i=zn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ua(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=pt(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"&&(Ks(s)||Gs(s))?s=parseFloat(s):!Ba(s)&&tt.test(n)&&(s=Ri(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=un(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(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 Xe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){fn.render(this.render)}}class Ui extends Ka{constructor(){super(...arguments),this.KeyframeResolver=Ca}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;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class et{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Wi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function $a({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ga(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 ce(t){return t===void 0||t===1}function je({scale:t,scaleX:e,scaleY:n}){return!ce(t)||!ce(e)||!ce(n)}function it(t){return je(t)||Ki(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ki(t){return Xn(t.x)||Xn(t.y)}function Xn(t){return t&&t!=="0%"}function Xt(t,e,n){const s=t-n,i=e*s;return n+i}function Yn(t,e,n,s,i){return i!==void 0&&(t=Xt(t,i,s)),Xt(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=Yn(t.min,e,n,s,i),t.max=Yn(t.max,e,n,s,i)}function $i(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}const qn=.999999999999,Zn=1.0000000000001;function _a(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ft(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,$i(t,r)),s&&it(o.latestValues)&&ft(t,o.latestValues))}e.x<Zn&&e.x>qn&&(e.x=1),e.y<Zn&&e.y>qn&&(e.y=1)}function ht(t,e){t.min=t.min+e,t.max=t.max+e}function Jn(t,e,n,s,i=.5){const o=M(t.min,t.max,i);Oe(t,e,n,o,s)}function ft(t,e){Jn(t.x,e.x,e.scaleX,e.scale,e.originX),Jn(t.y,e.y,e.scaleY,e.scale,e.originY)}function Gi(t,e){return Wi(Ga(t.getBoundingClientRect(),e))}function Ha(t,e,n){const s=Gi(t,n),{scroll:i}=e;return i&&(ht(s.x,i.offset.x),ht(s.y,i.offset.y)),s}const za={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xa=gt.length;function Ya(t,e,n){let s="",i=!0;for(let o=0;o<Xa;o++){const r=gt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(r.startsWith("scale")?1:0);else{const c=parseFloat(a);l=r.startsWith("scale")?c===1:c===0}if(!l||n){const c=Ei(a,hn[r]);if(!l){i=!1;const u=za[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function gn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(yt.has(l)){r=!0;continue}else if(ii(l)){i[l]=c;continue}else{const u=Ei(c,hn[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=Ya(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}function _i(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Qn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Tt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=Qn(t,e.target.x),s=Qn(t,e.target.y);return`${n}% ${s}%`}},qa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=tt.parse(t);if(i.length>5)return s;const o=tt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=M(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},Ne={borderRadius:{...Tt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tt,borderTopRightRadius:Tt,borderBottomLeftRadius:Tt,borderBottomRightRadius:Tt,boxShadow:qa};function Hi(t,{layout:e,layoutId:n}){return yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ne[t]||t==="opacity")}function yn(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(B(s[r])||i&&B(i[r])||Hi(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function Za(t){return window.getComputedStyle(t)}class Ja extends Ui{constructor(){super(...arguments),this.type="html",this.renderInstance=_i}readValueFromInstance(e,n){if(yt.has(n))return this.projection?.isProjecting?be(n):Mo(e,n);{const s=Za(e),i=(ii(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Gi(e,n)}build(e,n,s){gn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return yn(e,n,s)}}const Qa={offset:"stroke-dashoffset",array:"stroke-dasharray"},tl={offset:"strokeDashoffset",array:"strokeDasharray"};function el(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Qa:tl;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const nl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(gn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of nl)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&&el(h,i,o,r,!1)}const Xi=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"]),Yi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function sl(t,e,n,s){_i(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Xi.has(i)?i:cn(i),e.attrs[i])}function qi(t,e,n){const s=yn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const o=gt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class il extends Ui{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(yt.has(n)){const s=Di(n);return s&&s.default||0}return n=Xi.has(n)?n:cn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return qi(e,n,s)}build(e,n,s){zi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){sl(e,n,s,i)}mount(e){this.isSVGTag=Yi(e.tagName),super.mount(e)}}const rl=mn.length;function Zi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Zi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<rl;n++){const s=mn[n],i=t.props[s];(Rt(i)||i===!1)&&(e[s]=i)}return e}function Ji(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 ol=[...pn].reverse(),al=pn.length;function ll(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ya(t,n,s)))}function ul(t){let e=ll(t),n=ts(),s=!0;const i=l=>(c,u)=>{const h=dt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...p}=h;c={...c,...p,...d}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Zi(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<al;y++){const v=ol[y],P=n[v],m=c[v]!==void 0?c[v]:u[v],w=Rt(m),S=v===l?P.isActive:null;S===!1&&(p=y);let V=m===u[v]&&m!==c[v]&&w;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),P.protectedKeys={...d},!P.isActive&&S===null||!m&&!P.prevProp||Jt(m)||typeof m=="boolean")continue;const R=cl(P.prevProp,m);let A=R||v===l&&P.isActive&&!V&&w||y>p&&w,b=!1;const L=Array.isArray(m)?m:[m];let _=L.reduce(i(v),{});S===!1&&(_={});const{prevResolvedValues:vt={}}=P,ee={...vt,..._},Pn=F=>{A=!0,f.has(F)&&(b=!0,f.delete(F)),P.needsAnimating[F]=!0;const N=t.getValue(F);N&&(N.liveStyle=!1)};for(const F in ee){const N=_[F],nt=vt[F];if(d.hasOwnProperty(F))continue;let lt=!1;Ee(N)&&Ee(nt)?lt=!Ji(N,nt):lt=N!==nt,lt?N!=null?Pn(F):f.add(F):N!==void 0&&f.has(F)?Pn(F):P.protectedKeys[F]=!0}P.prevProp=m,P.prevResolvedValues=_,P.isActive&&(d={...d,..._}),s&&t.blockInitialAnimation&&(A=!1);const Sn=V&&R;A&&(!Sn||b)&&h.push(...L.map(F=>{const N={type:v};if(typeof F=="string"&&s&&!Sn&&t.manuallyAnimateOnMount&&t.parent){const{parent:nt}=t,lt=dt(nt,F);if(nt.enteringChildren&&lt){const{delayChildren:Sr}=lt.transition||{};N.delay=Pi(nt.enteringChildren,t,Sr)}}return{animation:F,options:N}}))}if(f.size){const y={};if(typeof c.initial!="boolean"){const v=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const P=t.getBaseTarget(v),m=t.getValue(v);m&&(m.liveStyle=!0),y[v]=P??null}),h.push({animation:y})}let g=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ts()}}}function cl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ji(e,t):!1}function st(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ts(){return{animate:st(!0),whileInView:st(),whileHover:st(),whileTap:st(),whileDrag:st(),whileFocus:st(),exit:st()}}function es(t,e){t.min=e.min,t.max=e.max}function $(t,e){es(t.x,e.x),es(t.y,e.y)}function ns(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Qi=1e-4,hl=1-Qi,fl=1+Qi,tr=.01,dl=0-tr,pl=0+tr;function O(t){return t.max-t.min}function ml(t,e,n){return Math.abs(t-e)<=n}function ss(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=hl&&t.scale<=fl||isNaN(t.scale))&&(t.scale=1),(t.translate>=dl&&t.translate<=pl||isNaN(t.translate))&&(t.translate=0)}function bt(t,e,n,s){ss(t.x,e.x,n.x,s?s.originX:void 0),ss(t.y,e.y,n.y,s?s.originY:void 0)}function is(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function gl(t,e,n){is(t.x,e.x,n.x),is(t.y,e.y,n.y)}function rs(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Yt(t,e,n){rs(t.x,e.x,n.x),rs(t.y,e.y,n.y)}function os(t,e,n,s,i){return t-=e,t=Xt(t,1/n,s),i!==void 0&&(t=Xt(t,1/i,s)),t}function yl(t,e=0,n=1,s=.5,i,o=t,r=t){if(H.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=M(o.min,o.max,s);t===o&&(a-=e),t.min=os(t.min,e,n,a,i),t.max=os(t.max,e,n,a,i)}function as(t,e,[n,s,i],o,r){yl(t,e[n],e[s],e[i],e.scale,o,r)}const vl=["x","scaleX","originX"],xl=["y","scaleY","originY"];function ls(t,e,n,s){as(t.x,e,vl,n?n.x:void 0,s?s.x:void 0),as(t.y,e,xl,n?n.y:void 0,s?s.y:void 0)}function us(t){return t.translate===0&&t.scale===1}function er(t){return us(t.x)&&us(t.y)}function cs(t,e){return t.min===e.min&&t.max===e.max}function Tl(t,e){return cs(t.x,e.x)&&cs(t.y,e.y)}function hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function nr(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t){return O(t.x)/O(t.y)}function ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function U(t){return[t("x"),t("y")]}function Pl(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const sr=["TopLeft","TopRight","BottomLeft","BottomRight"],Sl=sr.length,ps=t=>typeof t=="string"?parseFloat(t):t,ms=t=>typeof t=="number"||T.test(t);function wl(t,e,n,s,i,o){i?(t.opacity=M(0,n.opacity??1,Al(s)),t.opacityExit=M(e.opacity??1,0,bl(s))):o&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let r=0;r<Sl;r++){const a=`border${sr[r]}Radius`;let l=gs(e,a),c=gs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ms(l)===ms(c)?(t[a]=Math.max(M(ps(l),ps(c),s),0),(H.test(c)||H.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function gs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Al=ir(0,.5,Js),bl=ir(.5,.95,K);function ir(t,e,n){return s=>s<t?0:s>e?1:n(Ct(t,e,s))}function Vl(t,e,n){const s=B(t)?t:pt(t);return s.start(ln("",s,e,n)),s.animation}function Et(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Cl=(t,e)=>t.depth-e.depth;class Ml{constructor(){this.children=[],this.isDirty=!1}add(e){Ge(this.children,e),this.isDirty=!0}remove(e){_e(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Cl),this.isDirty=!1,this.children.forEach(e)}}function Dl(t,e){const n=j.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Q(s),t(o-e))};return C.setup(s,!0),()=>Q(s)}function Kt(t){return B(t)?t.get():t}class Rl{constructor(){this.members=[]}add(e){Ge(this.members,e),e.scheduleRender()}remove(e){if(_e(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender();const i=s.options.layoutDependency,o=e.options.layoutDependency;i!==void 0&&o!==void 0&&i===o||(e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const $t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},he=["","X","Y","Z"],El=1e3;let Ll=0;function fe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function rr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=bi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&rr(s)}function or({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Ll++,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(Il),this.nodes.forEach(Nl),this.nodes.forEach(Ul),this.nodes.forEach(Bl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ml)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Xe),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Bi(r)&&!Fa(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;C.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=Dl(f,250),$t.hasAnimatedSinceResize&&($t.hasAnimatedSinceResize=!1,this.nodes.forEach(xs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,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()||_l,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),v=!this.targetLayout||!nr(this.targetLayout,d),P=!h&&f;if(this.options.layoutRoot||this.resumeFrom||P||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const m={...an(p,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(m.delay=0,m.type=!1),this.startAnimation(m),this.setAnimationOrigin(u,P)}else h||xs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ys);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ol),this.nodes.forEach(kl),this.nodes.forEach(Fl)):this.nodes.forEach(vs),this.clearAllSnapshots();const a=j.now();I.delta=z(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,se.update.process(I),se.preRender.process(I),se.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jl),this.sharedNodes.forEach(Kl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=k(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!er(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||it(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Hl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return k();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zl))){const{scroll:c}=this.root;c&&(ht(a.x,c.offset.x),ht(a.y,c.offset.y))}return a}removeElementScroll(r){const a=k();if($(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&$(a,r),ht(a.x,u.offset.x),ht(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=k();$(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ft(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),it(u.latestValues)&&ft(l,u.latestValues)}return it(this.latestValues)&&ft(l,this.latestValues),l}removeTransform(r){const a=k();$(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!it(c.latestValues))continue;je(c.latestValues)&&c.updateSnapshot();const u=k(),h=c.measurePageBox();$(u,h),ls(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return it(this.latestValues)&&ls(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),$i(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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||je(this.parent.latestValues)||Ki(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),Yt(this.relativeTargetOrigin,a,l),$(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===I.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;$(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;_a(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=k());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ns(this.prevProjectionDelta.x,this.projectionDelta.x),ns(this.prevProjectionDelta.y,this.projectionDelta.y)),bt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ct(),this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=k(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,y=this.getStack(),v=!y||y.members.length<=1,P=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(Gl));this.animationProgress=0;let m;this.mixTargetDelta=w=>{const S=w/1e3;Ts(h.x,r.x,S),Ts(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$l(this.relativeTarget,this.relativeTargetOrigin,f,S),m&&Tl(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=k()),$(m,this.relativeTarget)),g&&(this.animationValues=u,wl(u,c,this.latestValues,S,P,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{$t.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pt(0)),this.currentAnimation=Vl(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(El),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&ar(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||k();const h=O(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}$(a,l),ft(a,u),bt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Rl),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&fe("z",r,c,this.animationValues);for(let u=0;u<he.length;u++)fe(`rotate${he[u]}`,r,c,this.animationValues),fe(`skew${he[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Kt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Kt(a?.pointerEvents)||""),this.hasProjected&&!it(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Pl(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Ne){if(u[p]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:v}=Ne[p],P=h==="none"?u[p]:g(u[p],c);if(y){const m=y.length;for(let w=0;w<m;w++)r[y[w]]=P}else v?this.options.visualElement.renderState.vars[p]=P:r[p]=P}this.options.layoutId&&(r.pointerEvents=c===this?Kt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(ys),this.root.sharedNodes.clear()}}}function kl(t){t.updateLayout()}function Fl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?U(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=O(h);h.min=n[u].min,h.max=h.min+f}):ar(i,e.layoutBox,n)&&U(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=O(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=ct();bt(r,n,e.layoutBox);const a=ct();o?bt(a,t.applyTransform(s,!0),e.measuredBox):bt(a,n,e.layoutBox);const l=!er(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=k();Yt(d,e.layoutBox,h.layoutBox);const p=k();Yt(p,n,f.layoutBox),nr(d,p)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Il(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 Bl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jl(t){t.clearSnapshot()}function ys(t){t.clearMeasurements()}function vs(t){t.isLayoutDirty=!1}function Ol(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Nl(t){t.resolveTargetDelta()}function Ul(t){t.calcProjection()}function Wl(t){t.resetSkewAndRotation()}function Kl(t){t.removeLeadSnapshot()}function Ts(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ps(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function $l(t,e,n,s){Ps(t.x,e.x,n.x,s),Ps(t.y,e.y,n.y,s)}function Gl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const _l={duration:.45,ease:[.4,0,.1,1]},Ss=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ws=Ss("applewebkit/")&&!Ss("chrome/")?Math.round:K;function As(t){t.min=ws(t.min),t.max=ws(t.max)}function Hl(t){As(t.x),As(t.y)}function ar(t,e,n){return t==="position"||t==="preserve-aspect"&&!ml(fs(e),fs(n),.2)}function zl(t){return t!==t.root&&t.scroll?.wasRoot}const Xl=or({attachResizeListener:(t,e)=>Et(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),de={current:void 0},lr=or({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!de.current){const t=new Xl({});t.mount(window),t.setOptions({layoutScroll:!0}),de.current=t}return de.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),vn=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function bs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Yl(...t){return e=>{let n=!1;const s=t.map(i=>{const o=bs(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():bs(t[i],null)}}}}function ql(...t){return x.useCallback(Yl(...t),t)}class Zl extends x.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Ie(s)&&s.offsetWidth||0,o=Ie(s)&&s.offsetHeight||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left,r.bottom=o-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Jl({children:t,isPresent:e,anchorX:n,anchorY:s,root:i}){const o=x.useId(),r=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=x.useContext(vn),c=t.props?.ref??t?.ref,u=ql(r,c);return x.useInsertionEffect(()=>{const{width:h,height:f,top:d,left:p,right:g,bottom:y}=a.current;if(e||!r.current||!h||!f)return;const v=n==="left"?`left: ${p}`:`right: ${g}`,P=s==="bottom"?`bottom: ${y}`:`top: ${d}`;r.current.dataset.motionPopId=o;const m=document.createElement("style");l&&(m.nonce=l);const w=i??document.head;return w.appendChild(m),m.sheet&&m.sheet.insertRule(`
2
+ [data-motion-pop-id="${o}"] {
3
+ position: absolute !important;
4
+ width: ${h}px !important;
5
+ height: ${f}px !important;
6
+ ${v}px !important;
7
+ ${P}px !important;
8
+ }
9
+ `),()=>{w.contains(m)&&w.removeChild(m)}},[e]),X.jsx(Zl,{isPresent:e,childRef:r,sizeRef:a,children:x.cloneElement(t,{ref:u})})}const Ql=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,anchorY:l,root:c})=>{const u=$e(tu),h=x.useId();let f=!0,d=x.useMemo(()=>(f=!1,{id:h,initial:e,isPresent:n,custom:i,onExitComplete:p=>{u.set(p,!0);for(const g of u.values())if(!g)return;s&&s()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[n,u,s]);return o&&f&&(d={...d}),x.useMemo(()=>{u.forEach((p,g)=>u.set(g,!1))},[n]),x.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=X.jsx(Jl,{isPresent:n,anchorX:a,anchorY:l,root:c,children:t})),X.jsx(Zt.Provider,{value:d,children:t})};function tu(){return new Map}function ur(t=!0){const e=x.useContext(Zt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=x.useId();x.useEffect(()=>{if(t)return i(o)},[t]);const r=x.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Ot=t=>t.key||"";function Vs(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const cc=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,h]=ur(r),f=x.useMemo(()=>Vs(t),[t]),d=r&&!u?[]:f.map(Ot),p=x.useRef(!0),g=x.useRef(f),y=$e(()=>new Map),v=x.useRef(new Set),[P,m]=x.useState(f),[w,S]=x.useState(f);Ws(()=>{p.current=!1,g.current=f;for(let A=0;A<w.length;A++){const b=Ot(w[A]);d.includes(b)?(y.delete(b),v.current.delete(b)):y.get(b)!==!0&&y.set(b,!1)}},[w,d.length,d.join("-")]);const V=[];if(f!==P){let A=[...f];for(let b=0;b<w.length;b++){const L=w[b],_=Ot(L);d.includes(_)||(A.splice(b,0,L),V.push(L))}return o==="wait"&&V.length&&(A=V),S(Vs(A)),m(f),null}const{forceRender:R}=x.useContext(Ke);return X.jsx(X.Fragment,{children:w.map(A=>{const b=Ot(A),L=r&&!u?!1:f===w||d.includes(b),_=()=>{if(v.current.has(b))return;if(v.current.add(b),y.has(b))y.set(b,!0);else return;let vt=!0;y.forEach(ee=>{ee||(vt=!1)}),vt&&(R?.(),S(g.current),r&&h?.(),s&&s())};return X.jsx(Ql,{isPresent:L,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:L?void 0:_,anchorX:a,anchorY:l,children:A},b)})})},cr=x.createContext({strict:!1}),Cs={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 Ms=!1;function eu(){if(Ms)return;const t={};for(const e in Cs)t[e]={isEnabled:n=>Cs[e].some(s=>!!n[s])};Ni(t),Ms=!0}function hr(){return eu(),Wa()}function nu(t){const e=hr();for(const n in t)e[n]={...e[n],...t[n]};Ni(e)}const su=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function qt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||su.has(t)}let fr=t=>!qt(t);function iu(t){typeof t=="function"&&(fr=e=>e.startsWith("on")?!qt(e):t(e))}try{iu(require("@emotion/is-prop-valid").default)}catch{}function ru(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(fr(i)||n===!0&&qt(i)||!e&&!qt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const te=x.createContext({});function ou(t,e){if(Qt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Rt(n)?n:void 0,animate:Rt(s)?s:void 0}}return t.inherit!==!1?e:{}}function au(t){const{initial:e,animate:n}=ou(t,x.useContext(te));return x.useMemo(()=>({initial:e,animate:n}),[Ds(e),Ds(n)])}function Ds(t){return Array.isArray(t)?t.join(" "):t}const xn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dr(t,e,n){for(const s in e)!B(e[s])&&!Hi(s,n)&&(t[s]=e[s])}function lu({transformTemplate:t},e){return x.useMemo(()=>{const n=xn();return gn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function uu(t,e){const n=t.style||{},s={};return dr(s,n,t),Object.assign(s,lu(t,e)),s}function cu(t,e){const n={},s=uu(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 pr=()=>({...xn(),attrs:{}});function hu(t,e,n,s){const i=x.useMemo(()=>{const o=pr();return zi(o,e,Yi(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};dr(o,t.style,t),i.style={...o,...i.style}}return i}const fu=["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 Tn(t){return typeof t!="string"||t.includes("-")?!1:!!(fu.indexOf(t)>-1||/[A-Z]/u.test(t))}function du(t,e,n,{latestValues:s},i,o=!1,r){const l=(r??Tn(t)?hu:cu)(e,s,i,t),c=ru(e,typeof t=="string",o),u=t!==x.Fragment?{...c,...l,ref:n}:{},{children:h}=e,f=x.useMemo(()=>B(h)?h.get():h,[h]);return x.createElement(t,{...u,children:f})}function pu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:mu(n,s,i,t),renderState:e()}}function mu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Kt(o[f]);let{initial:r,animate:a}=t;const l=Qt(t),c=Oi(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;if(h&&typeof h!="boolean"&&!Jt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=un(t,f[d]);if(p){const{transitionEnd:g,transition:y,...v}=p;for(const P in v){let m=v[P];if(Array.isArray(m)){const w=u?m.length-1:0;m=m[w]}m!==null&&(i[P]=m)}for(const P in g)i[P]=g[P]}}}return i}const mr=t=>(e,n)=>{const s=x.useContext(te),i=x.useContext(Zt),o=()=>pu(t,e,s,i);return n?o():$e(o)},gu=mr({scrapeMotionValuesFromProps:yn,createRenderState:xn}),yu=mr({scrapeMotionValuesFromProps:qi,createRenderState:pr}),vu=Symbol.for("motionComponentSymbol");function xu(t,e,n){const s=x.useRef(n);x.useInsertionEffect(()=>{s.current=n});const i=x.useRef(null);return x.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const a=r(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const gr=x.createContext({});function St(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Tu(t,e,n,s,i,o){const{visualElement:r}=x.useContext(te),a=x.useContext(cr),l=x.useContext(Zt),c=x.useContext(vn).reducedMotion,u=x.useRef(null),h=x.useRef(!1);s=s||a.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:r,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:o}),h.current&&u.current&&(u.current.manuallyAnimateOnMount=!0));const f=u.current,d=x.useContext(gr);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Pu(u.current,n,i,d);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,l)});const g=n[Ai],y=x.useRef(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Ws(()=>{h.current=!0,f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),f.enteringChildren=void 0)}),f}function Pu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:yr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&St(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function yr(t){if(t)return t.options.allowProjection!==!1?t.projection:yr(t.parent)}function pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&nu(s);const o=n?n==="svg":Tn(t),r=o?yu:gu;function a(c,u){let h;const f={...x.useContext(vn),...c,layoutId:Su(c)},{isStatic:d}=f,p=au(c),g=r(c,d);if(!d&&Us){wu();const y=Au(f);h=y.MeasureLayout,p.visualElement=Tu(t,g,f,i,y.ProjectionNode,o)}return X.jsxs(te.Provider,{value:p,children:[h&&p.visualElement?X.jsx(h,{visualElement:p.visualElement,...f}):null,du(t,c,xu(g,p.visualElement,u),g,d,e,o)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=x.forwardRef(a);return l[vu]=t,l}function Su({layoutId:t}){const e=x.useContext(Ke).id;return e&&t!==void 0?e+"-"+t:t}function wu(t,e){x.useContext(cr).strict}function Au(t){const e=hr(),{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 bu(t,e){if(typeof Proxy>"u")return pe;const n=new Map,s=(o,r)=>pe(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,pe(r,void 0,t,e)),n.get(r))})}const Vu=(t,e)=>e.isSVG??Tn(t)?new il(e):new Ja(e,{allowProjection:t!==x.Fragment});class Cu extends et{constructor(e){super(e),e.animationState||(e.animationState=ul(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Jt(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 Mu=0;class Du extends et{constructor(){super(...arguments),this.id=Mu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ru={animation:{Feature:Cu},exit:{Feature:Du}};function It(t){return{point:{x:t.pageX,y:t.pageY}}}const Eu=t=>e=>dn(e)&&t(e,It(e));function Vt(t,e,n,s){return Et(t,e,Eu(n),s)}const vr=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function Lu(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Es=new Set(["auto","scroll"]);class xr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.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;const d=ge(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=Lu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;const{point:y}=d,{timestamp:v}=I;this.history.push({...y,timestamp:v});const{onStart:P,onMove:m}=this.handlers;p||(P&&P(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=me(p,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=ge(d.type==="pointercancel"?this.lastMoveEventInfo:me(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,P),y&&y(d,P)},!dn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const l=It(e),c=me(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=I;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,ge(c,this.history)),this.removeListeners=Lt(Vt(this.contextWindow,"pointermove",this.handlePointerMove),Vt(this.contextWindow,"pointerup",this.handlePointerUp),Vt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Es.has(s.overflowX)||Es.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,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),C.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Q(this.updatePoint)}}function me(t,e){return e?{point:e(t.point)}:t}function Ls(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ge({point:t},e){return{point:t,delta:Ls(t,Tr(e)),offset:Ls(t,ku(e)),velocity:Fu(e,.1)}}function ku(t){return t[0]}function Tr(t){return t[t.length-1]}function Fu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Tr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Y(e)));)n--;if(!s)return{x:0,y:0};const o=W(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Iu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function ks(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 Bu(t,{top:e,left:n,bottom:s,right:i}){return{x:ks(t.x,n,i),y:ks(t.y,e,s)}}function Fs(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 ju(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Ou(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=Ct(e.min,e.max-s,t.min):s>i&&(n=Ct(t.min,t.max-i,e.min)),z(0,1,n)}function Nu(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 Ue=.35;function Uu(t=Ue){return t===!1?t=0:t===!0&&(t=Ue),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Bs(t,e),max:Bs(t,n)}}function Bs(t,e){return typeof t=="number"?t:t[e]||0}const Wu=new WeakMap;class Ku{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{n?(this.stopAnimation(),this.snapToCursor(It(h).point)):this.pauseAnimation()},r=(h,f)=>{this.stopAnimation();const{drag:d,dragPropagation:p,onDragStart:g}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Da(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),U(v=>{let P=this.getAxisMotionValue(v).get()||0;if(H.test(P)){const{projection:m}=this.visualElement;if(m&&m.layout){const w=m.layout.layoutBox[v];w&&(P=O(w)*(parseFloat(P)/100))}}this.originPoint[v]=P}),g&&C.postRender(()=>g(h,f)),Le(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:g,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=$u(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>U(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new xr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:vr(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&C.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||!Nt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Iu(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&St(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Bu(s.layoutBox,e):this.constraints=!1,this.elastic=Uu(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&U(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Nu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!St(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ha(s,i.root,this.visualElement.getTransformPagePoint());let r=ju(i.layout.layoutBox,o);if(n){const a=n($a(r));this.hasMutatedConstraints=!!a,a&&(r=Wi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=U(u=>{if(!Nt(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Le(this.visualElement,e),s.start(ln(e,s,0,n,this.visualElement,!1))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Nt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n],l=o.get()||0;o.set(e[n]-M(r,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!St(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Ou({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(r=>{if(!Nt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(M(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Wu.set(this.visualElement,this);const e=this.visualElement.current,n=Vt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),h=l.target,f=h!==e&&Ii(h);c&&u&&!f&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();St(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),C.read(s);const r=Et(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(U(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ue,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Nt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function $u(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Gu extends et{constructor(e){super(e),this.removeGroupControls=K,this.removeListeners=K,this.controls=new Ku(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}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 js=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class _u extends et{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(e){this.session=new xr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:js(e),onStart:js(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&C.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Vt(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 ye=!1;class Hu extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),ye&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$t.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),ye=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||C.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),fn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;ye=!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 Pr(t){const[e,n]=ur(),s=x.useContext(Ke);return X.jsx(Hu,{...t,layoutGroup:s,switchLayoutGroup:x.useContext(gr),isPresent:e,safeToRemove:n})}const zu={pan:{Feature:_u},drag:{Feature:Gu,ProjectionNode:lr,MeasureLayout:Pr}};function Os(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&C.postRender(()=>o(e,It(e)))}class Xu extends et{mount(){const{current:e}=this.node;e&&(this.unmount=Ra(e,(n,s)=>(Os(this.node,s,"Start"),i=>Os(this.node,i,"End"))))}unmount(){}}class Yu extends et{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=Lt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ns(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&C.postRender(()=>o(e,It(e)))}class qu extends et{mount(){const{current:e}=this.node;e&&(this.unmount=ka(e,(n,s)=>(Ns(this.node,s,"Start"),(i,{success:o})=>Ns(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const We=new WeakMap,ve=new WeakMap,Zu=t=>{const e=We.get(t.target);e&&e(t)},Ju=t=>{t.forEach(Zu)};function Qu({root:t,...e}){const n=t||document;ve.has(n)||ve.set(n,{});const s=ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Ju,{root:t,...e})),s[i]}function tc(t,e,n){const s=Qu(e);return We.set(t,n),s.observe(t),()=>{We.delete(t),s.unobserve(t)}}const ec={some:0,all:1};class nc extends et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:ec[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return tc(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(sc(e,n))&&this.startObserver()}unmount(){}}function sc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const ic={inView:{Feature:nc},tap:{Feature:qu},focus:{Feature:Yu},hover:{Feature:Xu}},rc={layout:{ProjectionNode:lr,MeasureLayout:Pr}},oc={...Ru,...ic,...zu,...rc},hc=bu(oc,Vu);export{cc as A,X as j,hc as m};
@@ -0,0 +1,3 @@
1
+ function it(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se={exports:{}},w={};var xe;function ut(){if(xe)return w;xe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),o=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function v(a){return a===null||typeof a!="object"?null:(a=y&&a[y]||a["@@iterator"],typeof a=="function"?a:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,g={};function E(a,h,_){this.props=a,this.context=h,this.refs=g,this.updater=_||x}E.prototype.isReactComponent={},E.prototype.setState=function(a,h){if(typeof a!="object"&&typeof a!="function"&&a!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,h,"setState")},E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function m(){}m.prototype=E.prototype;function S(a,h,_){this.props=a,this.context=h,this.refs=g,this.updater=_||x}var k=S.prototype=new m;k.constructor=S,R(k,E.prototype),k.isPureReactComponent=!0;var $=Array.isArray;function I(){}var b={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function U(a,h,_){var C=_.ref;return{$$typeof:e,type:a,key:h,ref:C!==void 0?C:null,props:_}}function z(a,h){return U(a.type,h,a.props)}function ue(a){return typeof a=="object"&&a!==null&&a.$$typeof===e}function tt(a){var h={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(_){return h[_]})}var _e=/\/+/g;function le(a,h){return typeof a=="object"&&a!==null&&a.key!=null?tt(""+a.key):h.toString(36)}function rt(a){switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:switch(typeof a.status=="string"?a.then(I,I):(a.status="pending",a.then(function(h){a.status==="pending"&&(a.status="fulfilled",a.value=h)},function(h){a.status==="pending"&&(a.status="rejected",a.reason=h)})),a.status){case"fulfilled":return a.value;case"rejected":throw a.reason}}throw a}function q(a,h,_,C,P){var T=typeof a;(T==="undefined"||T==="boolean")&&(a=null);var L=!1;if(a===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(a.$$typeof){case e:case t:L=!0;break;case d:return L=a._init,q(L(a._payload),h,_,C,P)}}if(L)return P=P(a),L=C===""?"."+le(a,0):C,$(P)?(_="",L!=null&&(_=L.replace(_e,"$&/")+"/"),q(P,h,_,"",function(at){return at})):P!=null&&(ue(P)&&(P=z(P,_+(P.key==null||a&&a.key===P.key?"":(""+P.key).replace(_e,"$&/")+"/")+L)),h.push(P)),1;L=0;var F=C===""?".":C+":";if($(a))for(var N=0;N<a.length;N++)C=a[N],T=F+le(C,N),L+=q(C,h,_,T,P);else if(N=v(a),typeof N=="function")for(a=N.call(a),N=0;!(C=a.next()).done;)C=C.value,T=F+le(C,N++),L+=q(C,h,_,T,P);else if(T==="object"){if(typeof a.then=="function")return q(rt(a),h,_,C,P);throw h=String(a),Error("Objects are not valid as a React child (found: "+(h==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":h)+"). If you meant to render a collection of children, use an array instead.")}return L}function ee(a,h,_){if(a==null)return a;var C=[],P=0;return q(a,C,"","",function(T){return h.call(_,T,P++)}),C}function nt(a){if(a._status===-1){var h=a._result;h=h(),h.then(function(_){(a._status===0||a._status===-1)&&(a._status=1,a._result=_)},function(_){(a._status===0||a._status===-1)&&(a._status=2,a._result=_)}),a._status===-1&&(a._status=0,a._result=h)}if(a._status===1)return a._result.default;throw a._result}var Se=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},ot={map:ee,forEach:function(a,h,_){ee(a,function(){h.apply(this,arguments)},_)},count:function(a){var h=0;return ee(a,function(){h++}),h},toArray:function(a){return ee(a,function(h){return h})||[]},only:function(a){if(!ue(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};return w.Activity=p,w.Children=ot,w.Component=E,w.Fragment=r,w.Profiler=i,w.PureComponent=S,w.StrictMode=n,w.Suspense=s,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,w.__COMPILER_RUNTIME={__proto__:null,c:function(a){return b.H.useMemoCache(a)}},w.cache=function(a){return function(){return a.apply(null,arguments)}},w.cacheSignal=function(){return null},w.cloneElement=function(a,h,_){if(a==null)throw Error("The argument must be a React element, but you passed "+a+".");var C=R({},a.props),P=a.key;if(h!=null)for(T in h.key!==void 0&&(P=""+h.key),h)!B.call(h,T)||T==="key"||T==="__self"||T==="__source"||T==="ref"&&h.ref===void 0||(C[T]=h[T]);var T=arguments.length-2;if(T===1)C.children=_;else if(1<T){for(var L=Array(T),F=0;F<T;F++)L[F]=arguments[F+2];C.children=L}return U(a.type,P,C)},w.createContext=function(a){return a={$$typeof:l,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null},a.Provider=a,a.Consumer={$$typeof:u,_context:a},a},w.createElement=function(a,h,_){var C,P={},T=null;if(h!=null)for(C in h.key!==void 0&&(T=""+h.key),h)B.call(h,C)&&C!=="key"&&C!=="__self"&&C!=="__source"&&(P[C]=h[C]);var L=arguments.length-2;if(L===1)P.children=_;else if(1<L){for(var F=Array(L),N=0;N<L;N++)F[N]=arguments[N+2];P.children=F}if(a&&a.defaultProps)for(C in L=a.defaultProps,L)P[C]===void 0&&(P[C]=L[C]);return U(a,T,P)},w.createRef=function(){return{current:null}},w.forwardRef=function(a){return{$$typeof:f,render:a}},w.isValidElement=ue,w.lazy=function(a){return{$$typeof:d,_payload:{_status:-1,_result:a},_init:nt}},w.memo=function(a,h){return{$$typeof:o,type:a,compare:h===void 0?null:h}},w.startTransition=function(a){var h=b.T,_={};b.T=_;try{var C=a(),P=b.S;P!==null&&P(_,C),typeof C=="object"&&C!==null&&typeof C.then=="function"&&C.then(I,Se)}catch(T){Se(T)}finally{h!==null&&_.types!==null&&(h.types=_.types),b.T=h}},w.unstable_useCacheRefresh=function(){return b.H.useCacheRefresh()},w.use=function(a){return b.H.use(a)},w.useActionState=function(a,h,_){return b.H.useActionState(a,h,_)},w.useCallback=function(a,h){return b.H.useCallback(a,h)},w.useContext=function(a){return b.H.useContext(a)},w.useDebugValue=function(){},w.useDeferredValue=function(a,h){return b.H.useDeferredValue(a,h)},w.useEffect=function(a,h){return b.H.useEffect(a,h)},w.useEffectEvent=function(a){return b.H.useEffectEvent(a)},w.useId=function(){return b.H.useId()},w.useImperativeHandle=function(a,h,_){return b.H.useImperativeHandle(a,h,_)},w.useInsertionEffect=function(a,h){return b.H.useInsertionEffect(a,h)},w.useLayoutEffect=function(a,h){return b.H.useLayoutEffect(a,h)},w.useMemo=function(a,h){return b.H.useMemo(a,h)},w.useOptimistic=function(a,h){return b.H.useOptimistic(a,h)},w.useReducer=function(a,h,_){return b.H.useReducer(a,h,_)},w.useRef=function(a){return b.H.useRef(a)},w.useState=function(a){return b.H.useState(a)},w.useSyncExternalStore=function(a,h,_){return b.H.useSyncExternalStore(a,h,_)},w.useTransition=function(){return b.H.useTransition()},w.version="19.2.4",w}var be;function De(){return be||(be=1,se.exports=ut()),se.exports}var c=De();const Hr=it(c);var ce={exports:{}},A={};var Pe;function lt(){if(Pe)return A;Pe=1;var e=De();function t(s){var o="https://react.dev/errors/"+s;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)o+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function u(s,o,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:s,containerInfo:o,implementation:d}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(s,o){if(s==="font")return"";if(typeof o=="string")return o==="use-credentials"?o:""}return A.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,A.createPortal=function(s,o){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)throw Error(t(299));return u(s,o,null,d)},A.flushSync=function(s){var o=l.T,d=n.p;try{if(l.T=null,n.p=2,s)return s()}finally{l.T=o,n.p=d,n.d.f()}},A.preconnect=function(s,o){typeof s=="string"&&(o?(o=o.crossOrigin,o=typeof o=="string"?o==="use-credentials"?o:"":void 0):o=null,n.d.C(s,o))},A.prefetchDNS=function(s){typeof s=="string"&&n.d.D(s)},A.preinit=function(s,o){if(typeof s=="string"&&o&&typeof o.as=="string"){var d=o.as,p=f(d,o.crossOrigin),y=typeof o.integrity=="string"?o.integrity:void 0,v=typeof o.fetchPriority=="string"?o.fetchPriority:void 0;d==="style"?n.d.S(s,typeof o.precedence=="string"?o.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:v}):d==="script"&&n.d.X(s,{crossOrigin:p,integrity:y,fetchPriority:v,nonce:typeof o.nonce=="string"?o.nonce:void 0})}},A.preinitModule=function(s,o){if(typeof s=="string")if(typeof o=="object"&&o!==null){if(o.as==null||o.as==="script"){var d=f(o.as,o.crossOrigin);n.d.M(s,{crossOrigin:d,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0})}}else o==null&&n.d.M(s)},A.preload=function(s,o){if(typeof s=="string"&&typeof o=="object"&&o!==null&&typeof o.as=="string"){var d=o.as,p=f(d,o.crossOrigin);n.d.L(s,d,{crossOrigin:p,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0,type:typeof o.type=="string"?o.type:void 0,fetchPriority:typeof o.fetchPriority=="string"?o.fetchPriority:void 0,referrerPolicy:typeof o.referrerPolicy=="string"?o.referrerPolicy:void 0,imageSrcSet:typeof o.imageSrcSet=="string"?o.imageSrcSet:void 0,imageSizes:typeof o.imageSizes=="string"?o.imageSizes:void 0,media:typeof o.media=="string"?o.media:void 0})}},A.preloadModule=function(s,o){if(typeof s=="string")if(o){var d=f(o.as,o.crossOrigin);n.d.m(s,{as:typeof o.as=="string"&&o.as!=="script"?o.as:void 0,crossOrigin:d,integrity:typeof o.integrity=="string"?o.integrity:void 0})}else n.d.m(s)},A.requestFormReset=function(s){n.d.r(s)},A.unstable_batchedUpdates=function(s,o){return s(o)},A.useFormState=function(s,o,d){return l.H.useFormState(s,o,d)},A.useFormStatus=function(){return l.H.useHostTransitionStatus()},A.version="19.2.4",A}var Te;function Ur(){if(Te)return ce.exports;Te=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ce.exports=lt(),ce.exports}var Le="popstate";function st(e={}){function t(n,i){let{pathname:u,search:l,hash:f}=n.location;return he("",{pathname:u,search:l,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:X(i)}return ft(t,r,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ct(){return Math.random().toString(36).substring(2,10)}function Oe(e,t){return{usr:e.state,key:e.key,idx:t}}function he(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?K(t):t,state:r,key:t&&t.key||n||ct()}}function X({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function K(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ft(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:u=!1}=n,l=i.history,f="POP",s=null,o=d();o==null&&(o=0,l.replaceState({...l.state,idx:o},""));function d(){return(l.state||{idx:null}).idx}function p(){f="POP";let g=d(),E=g==null?null:g-o;o=g,s&&s({action:f,location:R.location,delta:E})}function y(g,E){f="PUSH";let m=he(R.location,g,E);o=d()+1;let S=Oe(m,o),k=R.createHref(m);try{l.pushState(S,"",k)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;i.location.assign(k)}u&&s&&s({action:f,location:R.location,delta:1})}function v(g,E){f="REPLACE";let m=he(R.location,g,E);o=d();let S=Oe(m,o),k=R.createHref(m);l.replaceState(S,"",k),u&&s&&s({action:f,location:R.location,delta:0})}function x(g){return dt(g)}let R={get action(){return f},get location(){return e(i,l)},listen(g){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(Le,p),s=g,()=>{i.removeEventListener(Le,p),s=null}},createHref(g){return t(i,g)},createURL:x,encodeLocation(g){let E=x(g);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:y,replace:v,go(g){return l.go(g)}};return R}function dt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),O(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:X(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Ie(e,t,r="/"){return pt(e,t,r,!1)}function pt(e,t,r,n){let i=typeof t=="string"?K(t):t,u=W(i.pathname||"/",r);if(u==null)return null;let l=Me(e);ht(l);let f=null;for(let s=0;f==null&&s<l.length;++s){let o=xt(u);f=_t(l[s],o,n)}return f}function Me(e,t=[],r=[],n="",i=!1){let u=(l,f,s=i,o)=>{let d={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:f,route:l};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&s)return;O(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let p=j([n,d.relativePath]),y=r.concat(d);l.children&&l.children.length>0&&(O(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Me(l.children,t,y,p,s)),!(l.path==null&&!l.index)&&t.push({path:p,score:wt(p,l.index),routesMeta:y})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))u(l,f);else for(let s of He(l.path))u(l,f,!0,s)}),t}function He(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return i?[u,""]:[u];let l=He(n.join("/")),f=[];return f.push(...l.map(s=>s===""?u:[u,s].join("/"))),i&&f.push(...l),f.map(s=>e.startsWith("/")&&s===""?"/":s)}function ht(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ct(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var mt=/^:[\w-]+$/,yt=3,gt=2,vt=1,Et=10,Rt=-2,$e=e=>e==="*";function wt(e,t){let r=e.split("/"),n=r.length;return r.some($e)&&(n+=Rt),t&&(n+=gt),r.filter(i=>!$e(i)).reduce((i,u)=>i+(mt.test(u)?yt:u===""?vt:Et),n)}function Ct(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,r=!1){let{routesMeta:n}=e,i={},u="/",l=[];for(let f=0;f<n.length;++f){let s=n[f],o=f===n.length-1,d=u==="/"?t:t.slice(u.length)||"/",p=oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:o},d),y=s.route;if(!p&&o&&r&&!n[n.length-1].route.index&&(p=oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!p)return null;Object.assign(i,p.params),l.push({params:i,pathname:j([u,p.pathname]),pathnameBase:Lt(j([u,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(u=j([u,p.pathnameBase]))}return l}function oe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=St(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let u=i[0],l=u.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:n.reduce((o,{paramName:d,isOptional:p},y)=>{if(d==="*"){let x=f[y]||"";l=u.slice(0,u.length-x.length).replace(/(.)\/+$/,"$1")}const v=f[y];return p&&!v?o[d]=void 0:o[d]=(v||"").replace(/%2F/g,"/"),o},{}),pathname:u,pathnameBase:l,pattern:e}}function St(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,s)=>(n.push({paramName:f,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function xt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function W(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var bt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Pt(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?K(e):e,u;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?u=ke(r.substring(1),"/"):u=ke(r,t)):u=t,{pathname:u,search:Ot(n),hash:$t(i)}}function ke(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function fe(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Tt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ye(e){let t=Tt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ge(e,t,r,n=!1){let i;typeof e=="string"?i=K(e):(i={...e},O(!i.pathname||!i.pathname.includes("?"),fe("?","pathname","search",i)),O(!i.pathname||!i.pathname.includes("#"),fe("#","pathname","hash",i)),O(!i.search||!i.search.includes("#"),fe("#","search","hash",i)));let u=e===""||i.pathname==="",l=u?"/":i.pathname,f;if(l==null)f=r;else{let p=t.length-1;if(!n&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),p-=1;i.pathname=y.join("/")}f=p>=0?t[p]:"/"}let s=Pt(i,f),o=l&&l!=="/"&&l.endsWith("/"),d=(u||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(o||d)&&(s.pathname+="/"),s}var j=e=>e.join("/").replace(/\/\/+/g,"/"),Lt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ot=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$t=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,kt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function At(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Nt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fe(e,t){let r=e;if(typeof r!="string"||!bt.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(Ue)try{let u=new URL(window.location.href),l=r.startsWith("//")?new URL(u.protocol+r):new URL(r),f=W(l.pathname,t);l.origin===u.origin&&f!=null?r=f+l.search+l.hash:i=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Be=["POST","PUT","PATCH","DELETE"];new Set(Be);var Dt=["GET",...Be];new Set(Dt);var G=c.createContext(null);G.displayName="DataRouter";var ae=c.createContext(null);ae.displayName="DataRouterState";var It=c.createContext(!1),je=c.createContext({isTransitioning:!1});je.displayName="ViewTransition";var Mt=c.createContext(new Map);Mt.displayName="Fetchers";var Ht=c.createContext(null);Ht.displayName="Await";var D=c.createContext(null);D.displayName="Navigation";var Q=c.createContext(null);Q.displayName="Location";var H=c.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName="Route";var ve=c.createContext(null);ve.displayName="RouteError";var We="REACT_ROUTER_ERROR",Ut="REDIRECT",Ft="ROUTE_ERROR_RESPONSE";function Bt(e){if(e.startsWith(`${We}:${Ut}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function jt(e){if(e.startsWith(`${We}:${Ft}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new kt(t.status,t.statusText,t.data)}catch{}}function Wt(e,{relative:t}={}){O(V(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=c.useContext(D),{hash:i,pathname:u,search:l}=Z(e,{relative:t}),f=u;return r!=="/"&&(f=u==="/"?r:j([r,u])),n.createHref({pathname:f,search:l,hash:i})}function V(){return c.useContext(Q)!=null}function Y(){return O(V(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Q).location}var Ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ze(e){c.useContext(D).static||c.useLayoutEffect(e)}function qe(){let{isDataRoute:e}=c.useContext(H);return e?rr():Yt()}function Yt(){O(V(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(D),{matches:n}=c.useContext(H),{pathname:i}=Y(),u=JSON.stringify(ye(n)),l=c.useRef(!1);return ze(()=>{l.current=!0}),c.useCallback((s,o={})=>{if(M(l.current,Ye),!l.current)return;if(typeof s=="number"){r.go(s);return}let d=ge(s,JSON.parse(u),i,o.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:j([t,d.pathname])),(o.replace?r.replace:r.push)(d,o.state,o)},[t,r,u,i,e])}c.createContext(null);function Fr(){let{matches:e}=c.useContext(H),t=e[e.length-1];return t?t.params:{}}function Z(e,{relative:t}={}){let{matches:r}=c.useContext(H),{pathname:n}=Y(),i=JSON.stringify(ye(r));return c.useMemo(()=>ge(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function zt(e,t){return Ke(e,t)}function Ke(e,t,r,n,i){O(V(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=c.useContext(D),{matches:l}=c.useContext(H),f=l[l.length-1],s=f?f.params:{},o=f?f.pathname:"/",d=f?f.pathnameBase:"/",p=f&&f.route;{let m=p&&p.path||"";Ve(o,!p||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
+
3
+ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let y=Y(),v;if(t){let m=typeof t=="string"?K(t):t;O(d==="/"||m.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${m.pathname}" was given in the \`location\` prop.`),v=m}else v=y;let x=v.pathname||"/",R=x;if(d!=="/"){let m=d.replace(/^\//,"").split("/");R="/"+x.replace(/^\//,"").split("/").slice(m.length).join("/")}let g=Ie(e,{pathname:R});M(p||g!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),M(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=Jt(g&&g.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:j([d,u.encodeLocation?u.encodeLocation(m.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?d:j([d,u.encodeLocation?u.encodeLocation(m.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),l,r,n,i);return t&&E?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},E):E}function qt(){let e=tr(),t=At(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:i},r):null,l)}var Kt=c.createElement(qt,null),Ge=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=jt(e.digest);r&&(e=r)}let t=e!==void 0?c.createElement(H.Provider,{value:this.props.routeContext},c.createElement(ve.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(Gt,{error:e},t):t}};Ge.contextType=It;var de=new WeakMap;function Gt({children:e,error:t}){let{basename:r}=c.useContext(D);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=Bt(t.digest);if(n){let i=de.get(t);if(i)throw i;let u=Fe(n.location,r);if(Ue&&!de.get(t))if(u.isExternal||n.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:n.replace}));throw de.set(t,l),l}return c.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function Vt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(H.Provider,{value:e},r)}function Jt(e,t=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,l=r?.errors;if(l!=null){let d=u.findIndex(p=>p.route.id&&l?.[p.route.id]!==void 0);O(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),u=u.slice(0,Math.min(u.length,d+1))}let f=!1,s=-1;if(r)for(let d=0;d<u.length;d++){let p=u[d];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(s=d),p.route.id){let{loaderData:y,errors:v}=r,x=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||x){f=!0,s>=0?u=u.slice(0,s+1):u=[u[0]];break}}}let o=r&&n?(d,p)=>{n(d,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Nt(r.matches),errorInfo:p})}:void 0;return u.reduceRight((d,p,y)=>{let v,x=!1,R=null,g=null;r&&(v=l&&p.route.id?l[p.route.id]:void 0,R=p.route.errorElement||Kt,f&&(s<0&&y===0?(Ve("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,g=null):s===y&&(x=!0,g=p.route.hydrateFallbackElement||null)));let E=t.concat(u.slice(0,y+1)),m=()=>{let S;return v?S=R:x?S=g:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=d,c.createElement(Vt,{match:p,routeContext:{outlet:d,matches:E,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?c.createElement(Ge,{location:r.location,revalidation:r.revalidation,component:R,error:v,children:m(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:o}):m()},null)}function Ee(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xt(e){let t=c.useContext(G);return O(t,Ee(e)),t}function Qt(e){let t=c.useContext(ae);return O(t,Ee(e)),t}function Zt(e){let t=c.useContext(H);return O(t,Ee(e)),t}function Re(e){let t=Zt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function er(){return Re("useRouteId")}function tr(){let e=c.useContext(ve),t=Qt("useRouteError"),r=Re("useRouteError");return e!==void 0?e:t.errors?.[r]}function rr(){let{router:e}=Xt("useNavigate"),t=Re("useNavigate"),r=c.useRef(!1);return ze(()=>{r.current=!0}),c.useCallback(async(i,u={})=>{M(r.current,Ye),r.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...u}))},[e,t])}var Ae={};function Ve(e,t,r){!t&&!Ae[e]&&(Ae[e]=!0,M(!1,r))}c.memo(nr);function nr({routes:e,future:t,state:r,onError:n}){return Ke(e,void 0,r,n,t)}function Br({to:e,replace:t,state:r,relative:n}){O(V(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=c.useContext(D);M(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=c.useContext(H),{pathname:l}=Y(),f=qe(),s=ge(e,ye(u),l,n==="path"),o=JSON.stringify(s);return c.useEffect(()=>{f(JSON.parse(o),{replace:t,state:r,relative:n})},[f,o,n,t,r]),null}function or(e){O(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ar({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:u=!1,unstable_useTransitions:l}){O(!V(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),s=c.useMemo(()=>({basename:f,navigator:i,static:u,unstable_useTransitions:l,future:{}}),[f,i,u,l]);typeof r=="string"&&(r=K(r));let{pathname:o="/",search:d="",hash:p="",state:y=null,key:v="default"}=r,x=c.useMemo(()=>{let R=W(o,f);return R==null?null:{location:{pathname:R,search:d,hash:p,state:y,key:v},navigationType:n}},[f,o,d,p,y,v,n]);return M(x!=null,`<Router basename="${f}"> is not able to match the URL "${o}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:c.createElement(D.Provider,{value:s},c.createElement(Q.Provider,{children:t,value:x}))}function jr({children:e,location:t}){return zt(me(e),t)}function me(e,t=[]){let r=[];return c.Children.forEach(e,(n,i)=>{if(!c.isValidElement(n))return;let u=[...t,i];if(n.type===c.Fragment){r.push.apply(r,me(n.props.children,u));return}O(n.type===or,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=me(n.props.children,u)),r.push(l)}),r}var re="get",ne="application/x-www-form-urlencoded";function ie(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ir(e){return ie(e)&&e.tagName.toLowerCase()==="button"}function ur(e){return ie(e)&&e.tagName.toLowerCase()==="form"}function lr(e){return ie(e)&&e.tagName.toLowerCase()==="input"}function sr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cr(e,t){return e.button===0&&(!t||t==="_self")&&!sr(e)}var te=null;function fr(){if(te===null)try{new FormData(document.createElement("form"),0),te=!1}catch{te=!0}return te}var dr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!dr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ne}"`),null):e}function pr(e,t){let r,n,i,u,l;if(ur(e)){let f=e.getAttribute("action");n=f?W(f,t):null,r=e.getAttribute("method")||re,i=pe(e.getAttribute("enctype"))||ne,u=new FormData(e)}else if(ir(e)||lr(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||f.getAttribute("action");if(n=s?W(s,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||re,i=pe(e.getAttribute("formenctype"))||pe(f.getAttribute("enctype"))||ne,u=new FormData(f,e),!fr()){let{name:o,type:d,value:p}=e;if(d==="image"){let y=o?`${o}.`:"";u.append(`${y}x`,"0"),u.append(`${y}y`,"0")}else o&&u.append(o,p)}}else{if(ie(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=re,n=null,i=ne,l=e}return u&&i==="text/plain"&&(l=u,u=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hr(e,t,r,n){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:t&&W(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function mr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gr(e,t,r){let n=await Promise.all(e.map(async i=>{let u=t.routes[i.route.id];if(u){let l=await mr(u,r);return l.links?l.links():[]}return[]}));return wr(n.flat(1).filter(yr).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Ne(e,t,r,n,i,u){let l=(s,o)=>r[o]?s.route.id!==r[o].route.id:!0,f=(s,o)=>r[o].pathname!==s.pathname||r[o].route.path?.endsWith("*")&&r[o].params["*"]!==s.params["*"];return u==="assets"?t.filter((s,o)=>l(s,o)||f(s,o)):u==="data"?t.filter((s,o)=>{let d=n.routes[s.route.id];if(!d||!d.hasLoader)return!1;if(l(s,o)||f(s,o))return!0;if(s.route.shouldRevalidate){let p=s.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function vr(e,t,{includeHydrateFallback:r}={}){return Er(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let u=[i.module];return i.clientActionModule&&(u=u.concat(i.clientActionModule)),i.clientLoaderModule&&(u=u.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(u=u.concat(i.hydrateFallbackModule)),i.imports&&(u=u.concat(i.imports)),u}).flat(1))}function Er(e){return[...new Set(e)]}function Rr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function wr(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let u=JSON.stringify(Rr(i));return r.has(u)||(r.add(u),n.push({key:u,link:i})),n},[])}function Je(){let e=c.useContext(G);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Cr(){let e=c.useContext(ae);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ce=c.createContext(void 0);Ce.displayName="FrameworkContext";function Xe(){let e=c.useContext(Ce);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function _r(e,t){let r=c.useContext(Ce),[n,i]=c.useState(!1),[u,l]=c.useState(!1),{onFocus:f,onBlur:s,onMouseEnter:o,onMouseLeave:d,onTouchStart:p}=t,y=c.useRef(null);c.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let R=E=>{E.forEach(m=>{l(m.isIntersecting)})},g=new IntersectionObserver(R,{threshold:.5});return y.current&&g.observe(y.current),()=>{g.disconnect()}}},[e]),c.useEffect(()=>{if(n){let R=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(R)}}},[n]);let v=()=>{i(!0)},x=()=>{i(!1),l(!1)};return r?e!=="intent"?[u,y,{}]:[u,y,{onFocus:J(f,v),onBlur:J(s,x),onMouseEnter:J(o,v),onMouseLeave:J(d,x),onTouchStart:J(p,v)}]:[!1,y,{}]}function J(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Sr({page:e,...t}){let{router:r}=Je(),n=c.useMemo(()=>Ie(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(br,{page:e,matches:n,...t}):null}function xr(e){let{manifest:t,routeModules:r}=Xe(),[n,i]=c.useState([]);return c.useEffect(()=>{let u=!1;return gr(e,t,r).then(l=>{u||i(l)}),()=>{u=!0}},[e,t,r]),n}function br({page:e,matches:t,...r}){let n=Y(),{future:i,manifest:u,routeModules:l}=Xe(),{basename:f}=Je(),{loaderData:s,matches:o}=Cr(),d=c.useMemo(()=>Ne(e,t,o,u,n,"data"),[e,t,o,u,n]),p=c.useMemo(()=>Ne(e,t,o,u,n,"assets"),[e,t,o,u,n]),y=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let R=new Set,g=!1;if(t.forEach(m=>{let S=u.routes[m.route.id];!S||!S.hasLoader||(!d.some(k=>k.route.id===m.route.id)&&m.route.id in s&&l[m.route.id]?.shouldRevalidate||S.hasClientLoader?g=!0:R.add(m.route.id))}),R.size===0)return[];let E=hr(e,f,i.unstable_trailingSlashAwareDataRequests,"data");return g&&R.size>0&&E.searchParams.set("_routes",t.filter(m=>R.has(m.route.id)).map(m=>m.route.id).join(",")),[E.pathname+E.search]},[f,i.unstable_trailingSlashAwareDataRequests,s,n,u,d,t,e,l]),v=c.useMemo(()=>vr(p,u),[p,u]),x=xr(p);return c.createElement(c.Fragment,null,y.map(R=>c.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...r})),v.map(R=>c.createElement("link",{key:R,rel:"modulepreload",href:R,...r})),x.map(({key:R,link:g})=>c.createElement("link",{key:R,nonce:r.nonce,...g,crossOrigin:g.crossOrigin??r.crossOrigin})))}function Pr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Tr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Tr&&(window.__reactRouterVersion="7.13.0")}catch{}function Wr({basename:e,children:t,unstable_useTransitions:r,window:n}){let i=c.useRef();i.current==null&&(i.current=st({window:n,v5Compat:!0}));let u=i.current,[l,f]=c.useState({action:u.action,location:u.location}),s=c.useCallback(o=>{r===!1?f(o):c.startTransition(()=>f(o))},[r]);return c.useLayoutEffect(()=>u.listen(s),[u,s]),c.createElement(ar,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:r})}var Qe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ze=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:u,replace:l,state:f,target:s,to:o,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:y,...v},x){let{basename:R,unstable_useTransitions:g}=c.useContext(D),E=typeof o=="string"&&Qe.test(o),m=Fe(o,R);o=m.to;let S=Wt(o,{relative:i}),[k,$,I]=_r(n,v),b=kr(o,{replace:l,state:f,target:s,preventScrollReset:d,relative:i,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:g});function B(z){t&&t(z),z.defaultPrevented||b(z)}let U=c.createElement("a",{...v,...I,href:m.absoluteURL||S,onClick:m.isExternal||u?t:B,ref:Pr(x,$),target:s,"data-discover":!E&&r==="render"?"true":void 0});return k&&!E?c.createElement(c.Fragment,null,U,c.createElement(Sr,{page:S})):U});Ze.displayName="Link";var Lr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:u,to:l,viewTransition:f,children:s,...o},d){let p=Z(l,{relative:o.relative}),y=Y(),v=c.useContext(ae),{navigator:x,basename:R}=c.useContext(D),g=v!=null&&Mr(p)&&f===!0,E=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,m=y.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(m=m.toLowerCase(),S=S?S.toLowerCase():null,E=E.toLowerCase()),S&&R&&(S=W(S,R)||S);const k=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let $=m===E||!i&&m.startsWith(E)&&m.charAt(k)==="/",I=S!=null&&(S===E||!i&&S.startsWith(E)&&S.charAt(E.length)==="/"),b={isActive:$,isPending:I,isTransitioning:g},B=$?t:void 0,U;typeof n=="function"?U=n(b):U=[n,$?"active":null,I?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let z=typeof u=="function"?u(b):u;return c.createElement(Ze,{...o,"aria-current":B,className:U,ref:d,style:z,to:l,viewTransition:f},typeof s=="function"?s(b):s)});Lr.displayName="NavLink";var Or=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:u,method:l=re,action:f,onSubmit:s,relative:o,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:y,...v},x)=>{let{unstable_useTransitions:R}=c.useContext(D),g=Dr(),E=Ir(f,{relative:o}),m=l.toLowerCase()==="get"?"get":"post",S=typeof f=="string"&&Qe.test(f),k=$=>{if(s&&s($),$.defaultPrevented)return;$.preventDefault();let I=$.nativeEvent.submitter,b=I?.getAttribute("formmethod")||l,B=()=>g(I||$.currentTarget,{fetcherKey:t,method:b,navigate:r,replace:i,state:u,relative:o,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:y});R&&r!==!1?c.startTransition(()=>B()):B()};return c.createElement("form",{ref:x,method:m,action:E,onSubmit:n?s:k,...v,"data-discover":!S&&e==="render"?"true":void 0})});Or.displayName="Form";function $r(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function et(e){let t=c.useContext(G);return O(t,$r(e)),t}function kr(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f,unstable_useTransitions:s}={}){let o=qe(),d=Y(),p=Z(e,{relative:u});return c.useCallback(y=>{if(cr(y,t)){y.preventDefault();let v=r!==void 0?r:X(d)===X(p),x=()=>o(e,{replace:v,state:n,preventScrollReset:i,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f});s?c.startTransition(()=>x()):x()}},[d,o,p,r,n,t,e,i,u,l,f,s])}var Ar=0,Nr=()=>`__${String(++Ar)}__`;function Dr(){let{router:e}=et("useSubmit"),{basename:t}=c.useContext(D),r=er(),n=e.fetch,i=e.navigate;return c.useCallback(async(u,l={})=>{let{action:f,method:s,encType:o,formData:d,body:p}=pr(u,t);if(l.navigate===!1){let y=l.fetcherKey||Nr();await n(y,r,l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:p,formMethod:l.method||s,formEncType:l.encType||o,flushSync:l.flushSync})}else await i(l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:p,formMethod:l.method||s,formEncType:l.encType||o,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,i,t,r])}function Ir(e,{relative:t}={}){let{basename:r}=c.useContext(D),n=c.useContext(H);O(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),u={...Z(e||".",{relative:t})},l=Y();if(e==null){u.search=l.search;let f=new URLSearchParams(u.search),s=f.getAll("index");if(s.some(d=>d==="")){f.delete("index"),s.filter(p=>p).forEach(p=>f.append("index",p));let d=f.toString();u.search=d?`?${d}`:""}}return(!e||e===".")&&i.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:j([r,u.pathname])),X(u)}function Mr(e,{relative:t}={}){let r=c.useContext(je);O(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=et("useViewTransitionState"),i=Z(e,{relative:t});if(!r.isTransitioning)return!1;let u=W(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=W(r.nextLocation.pathname,n)||r.nextLocation.pathname;return oe(i.pathname,l)!=null||oe(i.pathname,u)!=null}export{Wr as B,Ze as L,Br as N,Hr as R,De as a,Ur as b,qe as c,jr as d,or as e,Fr as f,it as g,c as r,Y as u};