1import{r as i,j as T}from"./vendor-radix-C-iWsDp5.js";import{o as v}from"./index-Dpj7kwyk.js";const j=({children:m,className:f,delay:p=0,direction:x="up",duration:a=600,once:t=!0})=>{const[c,s]=i.useState(!1),u=i.useRef(null);i.useEffect(()=>{const n=u.current;if(!n)return;const r=new IntersectionObserver(([e])=>{e.isIntersecting?(s(!0),t&&r.disconnect()):t||s(!1)},{threshold:.1,rootMargin:"0px 0px -50px 0px"});r.observe(n);const l=()=>{s(!0),t&&r.disconnect()},o=()=>{const e=n.getBoundingClientRect();e.top<window.innerHeight&&e.bottom>0&&l()},g=requestAnimationFrame(()=>{requestAnimationFrame(o)}),w=setTimeout(o,200),h=setTimeout(o,600),b=setTimeout(()=>{const e=n.getBoundingClientRect();e.top<window.innerHeight*1.5&&e.bottom>-window.innerHeight*.5&&l()},1200);return()=>{r.disconnect(),cancelAnimationFrame(g),clearTimeout(w),clearTimeout(h),clearTimeout(b)}},[t]);const d=()=>{switch(x){case"up":return"translateY(30px)";case"down":return"translateY(-30px)";case"left":return"translateX(30px)";case"right":return"translateX(-30px)";default:return"none"}};return T.jsx("div",{ref:u,className:v(f),style:{opacity:c?1:0,transform:c?"none":d(),transition:`opacity ${a}ms ease-out, transform ${a}ms ease-out`,transitionDelay:`${p}ms`},children:m})};export{j as S};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.