import{r as c,F as $,d5 as q,d9 as A,j as B,dl as D,dm as G,dn as x}from"./index-952e178b.js";const H={entering:{transform:"none"},entered:{transform:"none"}},J=c.forwardRef(function(h,p){const e=$(),g={enter:e.transitions.duration.enteringScreen,exit:e.transitions.duration.leavingScreen},{addEndListener:l,appear:R=!0,children:s,easing:f,in:E,onEnter:m,onEntered:y,onEntering:T,onExit:u,onExited:w,onExiting:P,style:a,timeout:d=g,TransitionComponent:Z=D,...j}=h,i=c.useRef(null),L=q(i,A(s),p),o=n=>t=>{if(n){const r=i.current;t===void 0?n(r):n(r,t)}},k=o(T),v=o((n,t)=>{G(n);const r=x({style:a,timeout:d,easing:f},{mode:"enter"});n.style.webkitTransition=e.transitions.create("transform",r),n.style.transition=e.transitions.create("transform",r),m&&m(n,t)}),C=o(y),F=o(P),S=o(n=>{const t=x({style:a,timeout:d,easing:f},{mode:"exit"});n.style.webkitTransition=e.transitions.create("transform",t),n.style.transition=e.transitions.create("transform",t),u&&u(n)}),b=o(w),z=n=>{l&&l(i.current,n)};return B.jsx(Z,{appear:R,in:E,nodeRef:i,onEnter:v,onEntered:C,onEntering:k,onExit:S,onExited:b,onExiting:F,addEndListener:z,timeout:d,...j,children:(n,t)=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...H[n],...a,...s.props.style},ref:L,...t})})}),N=J;export{N as Z};
