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