1import{j as a}from"./vendor-motion-AhOO15hz.js";import{r as n}from"./vendor-react-1tPnYxug.js";const f=60,B=7e3,C=3e3,w=6e3,G=7,X=.01,Q=()=>{const l=n.useRef(null),[c,h]=n.useState({x:.5,y:.5}),[o,m]=n.useState(!1),[i,r]=n.useState({w:1200,h:700}),[g,k]=n.useState(1),[u,x]=n.useState(!1),[v,N]=n.useState([]),R=n.useRef(),E=n.useRef({x:.5,y:.5}),I=n.useRef(0),F=n.useRef(!1),L=n.useRef({x:.5,y:.5}),T=n.useRef(!1),z=n.useRef();n.useEffect(()=>{F.current=o},[o]),n.useEffect(()=>{const t=()=>{const e=window.innerHeight*.7,s=Math.max(0,1-window.scrollY/e);k(s)};return t(),window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),n.useEffect(()=>{const t=setTimeout(()=>x(!0),300);return()=>clearTimeout(t)},[]),n.useEffect(()=>{const t=l.current;if(!t)return;const e=new ResizeObserver(([s])=>{r({w:s.contentRect.width,h:s.contentRect.height})});return e.observe(t),()=>e.disconnect()},[]),n.useEffect(()=>{const t=(s,d,y)=>s+(d-s)*y,e=()=>{h(s=>({x:t(s.x,E.current.x,.08),y:t(s.y,E.current.y,.08)})),R.current=requestAnimationFrame(e)};return R.current=requestAnimationFrame(e),()=>{R.current&&cancelAnimationFrame(R.current)}},[]);const D=n.useCallback(t=>{if(!l.current)return;const e=l.current.getBoundingClientRect(),s=(t.clientX-e.left)/e.width,d=(t.clientY-e.top)/e.height;E.current={x:s,y:d};const y=Math.abs(s-L.current.x),b=Math.abs(d-L.current.y);L.current={x:s,y:d},(y>X||b>X)&&(T.current=!0,z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{T.current=!1},800))},[]);n.useEffect(()=>{const t=l.current;if(!t)return;const e=()=>m(!0),s=()=>m(!1);return t.addEventListener("mousemove",D),t.addEventListener("mouseenter",e),t.addEventListener("mouseleave",s),()=>{t.removeEventListener("mousemove",D),t.removeEventListener("mouseenter",e),t.removeEventListener("mouseleave",s)}},[D]);const A=n.useCallback((t,e)=>{const s=[],d=Math.floor(t/f),y=Math.floor(e/f);if(d<2||y<2)return s;const b=new Set;for(let p=0;p<G;p++){let M,j,$;do M=Math.round((Math.random()+Math.random())/2*(d-2))+1,j=Math.round((Math.random()+Math.random())/2*(y-2))+1,$=`${M}-${j}`;while(b.has($));b.add($),s.push({x:M*f,y:j*f})}return s},[]),_=n.useCallback(t=>{const e=[],s=Math.min(t,6),d=new Set;for(let y=0;y<s;y++){let b=Math.floor(Math.random()*t),p=Math.floor(Math.random()*t);b===p&&(p=(p+1)%t);const M=`${Math.min(b,p)}-${Math.max(b,p)}`;d.has(M)||(d.add(M),e.push([b,p]))}return e},[]);n.useEffect(()=>{let t;const e=()=>{if(F.current){const d=I.current++,y=E.current.x,b=E.current.y,p=A(i.w,i.h),M=_(p.length);N(j=>[...j,{id:d,originX:y,originY:b,startTime:Date.now(),nodes:p,connections:M}]),setTimeout(()=>{N(j=>j.filter($=>$.id!==d))},w+500)}const s=T.current?C:B;t=setTimeout(e,s)};return t=setTimeout(e,C),()=>clearTimeout(t)},[i.w,i.h,A,_]);const q=n.useMemo(()=>{const t=Math.floor(i.w/f)+1;return Array.from({length:t},(e,s)=>s*f)},[i.w]),O=n.useMemo(()=>{const t=Math.floor(i.h/f)+1;return Array.from({length:t},(e,s)=>s*f)},[i.h]),Y=n.useMemo(()=>q.filter((t,e)=>e>0&&e%3===0),[q]),V=n.useMemo(()=>O.filter((t,e)=>e>0&&e%3===0),[O]),P=c.x*100,U=c.y*100;return a.jsxs("div",{ref:l,className:"pointer-events-auto cursor-default",style:{position:"absolute",top:0,bottom:0,left:"50%",width:"100vw",transform:"translateX(-50%)",zIndex:0,overflow:"hidden",opacity:u?g:0,transition:"opacity 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)",pointerEvents:g<.05||!u?"none":"auto"},"aria-hidden":"true",children:[a.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{zIndex:50,background:"radial-gradient(ellipse 55% 70% at 50% 42%, transparent 0%, transparent 35%, hsl(0 13% 8% / 0.4) 55%, hsl(0 13% 8% / 0.75) 75%, hsl(0 13% 8%) 100%)"}}),a.jsx("div",{className:"absolute inset-y-0 left-0 pointer-events-none",style:{zIndex:51,width:"20%",background:"linear-gradient(to right, hsl(0 13% 8%) 0%, hsl(0 13% 8% / 0.7) 50%, transparent 100%)"}}),a.jsx("div",{className:"absolute inset-y-0 right-0 pointer-events-none",style:{zIndex:51,width:"12%",background:"linear-gradient(to left, hsl(0 13% 8%) 0%, hsl(0 13% 8% / 0.5) 40%, transparent 100%)"}}),a.jsxs("svg",{className:"absolute inset-0 w-full h-full transition-opacity duration-700",style:{opacity:o?.14:.06},xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"hero-grid",width:f,height:f,patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:`M ${f} 0 L 0 0 0 ${f}`,fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100%",height:"100%",fill:"url(#hero-grid)"})]}),Y.map((t,e)=>a.jsx("div",{className:"absolute top-0 w-px h-full transition-opacity duration-700",style:{left:t,opacity:o?1:.7,background:`linear-gradient(to bottom, transparent 0%, hsl(4 95% 56% / ${e%2===0?.2:.12}) 50%, transparent 100%)`}},`vc-${e}`)),V.map((t,e)=>a.jsx("div",{className:"absolute left-0 h-px w-full transition-opacity duration-700",style:{to
1p:t,opacity:o?1:.7,background:`linear-gradient(to right, transparent 0%, hsl(4 95% 56% / ${e%2===0?.16:.1}) 50%, transparent 100%)`}},`hr-${e}`)),a.jsx("div",{className:"absolute w-[800px] h-[800px] rounded-full transition-opacity duration-500 ease-out",style:{left:P+"%",top:U+"%",transform:"translate(-50%, -50%)",opacity:o?1:.7,background:"radial-gradient(circle, hsl(4 95% 56% / 0.20) 0%, hsl(4 95% 56% / 0.08) 35%, hsl(4 95% 56% / 0.02) 60%, transparent 75%)"}}),a.jsx("div",{className:"absolute w-full transition-opacity duration-400 ease-out",style:{top:U+"%",height:"1.5px",transform:"translateY(-50%)",opacity:o?.85:0,zIndex:55,background:"linear-gradient(to right, transparent 0%, hsl(4 95% 56% / 0.10) 15%, hsl(4 95% 56% / 0.45) 50%, hsl(4 95% 56% / 0.10) 85%, transparent 100%)",boxShadow:"0 0 6px hsl(4 95% 56% / 0.20), 0 0 14px hsl(4 95% 56% / 0.12)",maskImage:"linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%)",WebkitMaskImage:"linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%)"}}),a.jsx("div",{className:"absolute h-full transition-opacity duration-400 ease-out",style:{left:P+"%",width:"1.5px",transform:"translateX(-50%)",opacity:o?.85:0,zIndex:55,background:"linear-gradient(to bottom, transparent 0%, hsl(4 95% 56% / 0.10) 15%, hsl(4 95% 56% / 0.45) 50%, hsl(4 95% 56% / 0.10) 85%, transparent 100%)",boxShadow:"0 0 6px hsl(4 95% 56% / 0.20), 0 0 14px hsl(4 95% 56% / 0.12)",maskImage:"linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%)"}}),v.map(t=>a.jsx(K,{pulse:t,containerW:i.w,containerH:i.h},t.id)),a.jsx("div",{className:"absolute top-1/3 left-1/4 w-[600px] h-[600px] rounded-full bg-primary/[0.04] blur-[180px]"}),a.jsx("div",{className:"absolute bottom-1/4 right-1/3 w-[500px] h-[500px] rounded-full bg-primary/[0.03] blur-[150px]"}),a.jsx("div",{className:"absolute top-0 right-0 w-[500px] h-[500px] bg-primary/[0.05] blur-[140px] rounded-full -translate-y-1/3 translate-x-1/4"}),a.jsx("div",{className:"absolute bottom-0 left-0 w-[300px] h-[300px] bg-primary/[0.035] blur-[100px] rounded-full translate-y-1/3 -translate-x-1/4"})]})},S=(l,c,h,o)=>{const m=l/h,i=c/o,r=Math.min(m/.25,(1-m)/.2,1),g=Math.min(i/.2,(1-i)/.3,1);return Math.max(0,Math.min(1,r))*Math.max(0,Math.min(1,g))},K=({pulse:l,containerW:c,containerH:h})=>{const o=l.originX*c,m=l.originY*h,i=Math.max(c,h);return a.jsxs("div",{className:"absolute inset-0 pointer-events-none",style:{zIndex:58},children:[a.jsx("div",{className:"absolute rounded-full",style:{left:o,top:m,width:0,height:0,transform:"translate(-50%, -50%)",border:"1px solid hsl(var(--primary) / 0.15)",boxShadow:"0 0 30px hsl(var(--primary) / 0.06)",animation:`pulseExpand ${w}ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards`,"--pulse-max":`${i*2}px`}}),a.jsx("div",{className:"absolute rounded-full",style:{left:o,top:m,width:0,height:0,transform:"translate(-50%, -50%)",border:"1px solid hsl(var(--primary) / 0.08)",animation:`pulseExpand ${w}ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 400ms forwards`,"--pulse-max":`${i*2}px`}}),l.nodes.map((r,g)=>{const k=Math.sqrt((r.x-o)**2+(r.y-m)**2),u=Math.sqrt(c**2+h**2),x=k/u*w*.5,v=S(r.x,r.y,c,h);return a.jsx("div",{className:"absolute rounded-full",style:{left:r.x,top:r.y,width:12,height:12,transform:"translate(-50%, -50%)",background:`hsl(var(--primary) / ${(.7*v).toFixed(2)})`,boxShadow:`0 0 12px hsl(var(--primary) / ${(.5*v).toFixed(2)}), 0 0 30px hsl(var(--primary) / ${(.2*v).toFixed(2)})`,opacity:0,animation:`nodeAppear ${w*.55}ms ease-in-out ${x}ms forwards`,"--node-max-opacity":v.toFixed(2)}},`node-${g}`)}),a.jsxs("svg",{className:"absolute inset-0 w-full h-full",style:{overflow:"visible"},children:[l.connections.map(([r,g],k)=>{const u=l.nodes[r],x=l.nodes[g];if(!u||!x)return null;const v=Math.sqrt((u.x-o)**2+(u.y-m)**2),N=Math.sqrt((x.x-o)**2+(x.y-m)**2),R=Math.sqrt(c**2+h**2),E=Math.max(v,N)/R*w*.5,I=Math.min(S(u.x,u.y,c,h),S(x.x,x.y,c,h));return a.jsx("line",{x1:u.x,y1:u.y,x2:x.x,y2:x.y,stroke:`hsl(4 95% 56% / ${(.22*I).toFixed(2)})`,strokeWidth:"1",style:{opacity:0,animation:`connectionFade ${w*.55}ms ease-in-out ${E}ms forwards`}},`conn-${k}`)}),l.nodes.map((r,g)=>{const k=Math.sqrt((r.x-o)**2+(r.y-m)**2),u=Math.sqrt(c**2+h**2),x=k/u*w*.5,v=S(r.x,r.y,c,h);return a.jsx("line",{x1:o,y1:m,x2:r.x,y2:r.y,stroke:`hsl(4 95% 56% / ${(.08*v).toFixed(2)})`,strokeWidth:"0.5",strokeDasharray:"4 6",style:{opacity:0,animation:`connectionFade ${w*.5}ms ease-in-out ${x*.5}ms forwards`}},`origin-line-${g}`)})]})]})};export{Q as default};
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.