import{r as d,f8 as k,q as B,cX as J,f9 as M,j as N,fa as O,fb as Q,fc as j}from"./index-5768b108.js";function p(f){return`scale(${f}, ${f**2})`}const U={entering:{opacity:1,transform:p(1)},entered:{opacity:1,transform:"none"}},E=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),h=d.forwardRef(function(A,v){const{addEndListener:y,appear:D=!0,children:l,easing:x,in:R,onEnter:T,onEntered:G,onEntering:H,onExit:w,onExited:F,onExiting:L,style:g,timeout:i="auto",TransitionComponent:S=O,...$}=A,b=k(),m=d.useRef(),r=B(),u=d.useRef(null),C=J(u,M(l),v),s=t=>o=>{if(t){const n=u.current;o===void 0?t(n):t(n,o)}},P=s(H),q=s((t,o)=>{Q(t);const{duration:n,delay:c,easing:e}=j({style:g,timeout:i,easing:x},{mode:"enter"});let a;i==="auto"?(a=r.transitions.getAutoHeightDuration(t.clientHeight),m.current=a):a=n,t.style.transition=[r.transitions.create("opacity",{duration:a,delay:c}),r.transitions.create("transform",{duration:E?a:a*.666,delay:c,easing:e})].join(","),T&&T(t,o)}),z=s(G),K=s(L),W=s(t=>{const{duration:o,delay:n,easing:c}=j({style:g,timeout:i,easing:x},{mode:"exit"});let e;i==="auto"?(e=r.transitions.getAutoHeightDuration(t.clientHeight),m.current=e):e=o,t.style.transition=[r.transitions.create("opacity",{duration:e,delay:n}),r.transitions.create("transform",{duration:E?e:e*.666,delay:E?n:n||e*.333,easing:c})].join(","),t.style.opacity=0,t.style.transform=p(.75),w&&w(t)}),X=s(F),_=t=>{i==="auto"&&b.start(m.current||0,t),y&&y(u.current,t)};return N.jsx(S,{appear:D,in:R,nodeRef:u,onEnter:q,onEntered:z,onEntering:P,onExit:W,onExited:X,onExiting:K,addEndListener:_,timeout:i==="auto"?null:i,...$,children:(t,{ownerState:o,...n})=>d.cloneElement(l,{style:{opacity:0,transform:p(.75),visibility:t==="exited"&&!R?"hidden":void 0,...U[t],...g,...l.props.style},ref:C,...n})})});h&&(h.muiSupportAuto=!0);const Y=h;export{Y as G};
