1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7071],{77071:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var r=n(95155),a=n(98162),o=n(6943),i=n(53004),s=n(12115),l=n(87548);let u=(0,i.b)({uProgress:0,uIntroProgress:0,uMaxRadius:1,uColor:new l.Color("#ffffff")},'\n uniform float uProgress;\n uniform float uIntroProgress;\n uniform float uMaxRadius;\n\n attribute vec2 aDirection;\n attribute float aDistance;\n attribute float aSize;\n attribute float aAlpha;\n attribute float aSeed;\n attribute float aIntroDelay;\n attribute float aEdgeBias;\n attribute float aSeed2;\n attribute float aTwist;\n\n varying float vAlpha;\n\n void main() {\n float introDuration = mix(0.05, 0.18, aSeed);\n float intro = smoothstep(\n aIntroDelay,\n min(aIntroDelay + introDuration, 1.0),\n uIntroProgress\n );\n\n // posProgress runs 0..2 over full scroll: current "end" reached at scroll 0.5,\n // particles continue further through the second half.\n float posProgress = uProgress * 1.5;\n\n float speedScale = mix(0.7, 1.4, aSeed);\n float centerLag = mix(0.95, 1.15, 1.0 - aEdgeBias);\n\n // Position activation â uses posProgress so motion is doubled.\n float scrollGate = smoothstep(0.01, 0.04, posProgress);\n float radius = max(posProgress - 0.002, 0.0) * uMaxRadius * speedScale;\n float edgeLead = aEdgeBias * (uMaxRadius * 0.34) * scrollGate;\n float activation = max(radius + edgeLead - aDistance * centerLag, 0.0);\n float localProgress = smoothstep(0.0, 22.0 * mix(0.85, 1.1, aSeed), activation);\n float dissolveStart = smoothstep(0.01, 0.05, posProgress);\n float dissolveProgress = localProgress * dissolveStart; // saturates ~scroll 0.5, drives wobble/size\n\n float wobble =\n sin((aSeed * 31.4159) + dissolveProgress * mix(8.0, 18.0, aSeed)) *\n 0.5 +\n 0.5;\n float wobble2 =\n sin((aSeed2 * 17.3) + dissolveProgress * mix(3.0, 7.0, aSeed2)) *\n 0.5 +\n 0.5;\n\n vec3 displaced = position;\n\n displaced.x += (aSeed - 0.5) * (1.0 - intro) * 42.0;\n displaced.y += ((aSeed * 2.0) - 1.0) * (1.0 - intro) * 34.0;\n displaced.z += (1.0 - intro) * (6.0 + aSeed * 18.0);\n\n // Ease-out on uncapped posProgress â fast start, continues past old endpoint.\n float motionProgress = pow(posProgress, 1.35);\n\n float spread =\n (10.0 + aSeed * 60.0 + wobble * mix(10.0, 22.0, aSeed) + wobble2 * mix(4.0, 12.0, aSeed2)) *\n motionProgress;\n\n vec2 perp = vec2(-aDirection.y, aDirection.x);\n displaced.x += aDirection.x * spread + perp.x * aTwist * spread * 0.3;\n displaced.y += aDirection.y * spread + perp.y * aTwist * spread * 0.3;\n displaced.z += motionProgress * (8.0 + aSeed * 12.0);\n\n vec4 mvPosition = modelViewMatrix * vec4(displaced, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n\n gl_PointSize =\n aSize * mix(0.7, 1.0, intro) * mix(1.0, 3.4, dissolveProgress);\n\n // Keep particles fully hidden until intro is effectively complete.\n float particleIntroVisibility = step(0.999, uIntroProgress);\n float phaseAlpha = intro * particleIntroVisibility;\n\n // Keep particles invisible until scroll begins.\n float scrollVisibility = smoothstep(0.006, 0.03, uProgress);\n\n // Lifespan based on distance traveled along each particle\'s own path.\n // posProgress currently runs to 1.5, so normalize that motion range.\n float maxMotionProgress = pow(1.5, 1.35);\n float lifeProgress = clamp(motionProgress / maxMotionProgress, 0.0, 1.0);\n\n // Start fading once particle has traveled part of its lifespan.\n float lifeStart = mix(0.18, 0.70, aSeed2);\n float lifeT = clamp((lifeProgress - lifeStart) / max(1.0 - lifeStart, 0.0001), 0.0, 1.0);\n\n // Quadratic ease-out fade: fast at start, gentle near the end.\n float lifespanFade = pow(1.0 - lifeT, 2.0);\n\n float baseAlpha = aAlpha;\n vAlpha = baseAlpha * phaseAlpha * scrollVisibility * lifespanFade;\n }\n ',"\n uniform vec3 uColor;\n\n varying float vAlpha;\n\n void main() {\n float dist = distance(gl_PointCoord, vec2(0.5));\n\n if (dist > 0.5) {\n discard;\n }\n\n float softness = smoothstep(0.5, 0.18, dist);\n gl_FragColor = vec4(uColor, softness * vAlpha);\n }\n "),c=(0,i.b)({uMap:null,uOpacity:1,uReveal:0,uBlur:0,uResolution:new l.Vector2(1,1)},"\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0
1);\n }\n ","\n uniform sampler2D uMap;\n uniform float uOpacity;\n uniform float uReveal;\n uniform float uBlur;\n uniform vec2 uResolution;\n\n varying vec2 vUv;\n\n void main() {\n vec2 blurStep = uBlur / max(uResolution, vec2(1.0));\n\n vec4 color = texture2D(uMap, vUv) * 0.28;\n color += texture2D(uMap, vUv + vec2( blurStep.x, 0.0)) * 0.18;\n color += texture2D(uMap, vUv + vec2(-blurStep.x, 0.0)) * 0.18;\n color += texture2D(uMap, vUv + vec2(0.0, blurStep.y)) * 0.18;\n color += texture2D(uMap, vUv + vec2(0.0, -blurStep.y)) * 0.18;\n\n color += texture2D(uMap, vUv + blurStep) * 0.045;\n color += texture2D(uMap, vUv - blurStep) * 0.045;\n color += texture2D(uMap, vUv + vec2( blurStep.x, -blurStep.y)) * 0.045;\n color += texture2D(uMap, vUv + vec2(-blurStep.x, blurStep.y)) * 0.045;\n\n // Bottom-up reveal mask driven by intro progress.\n float revealMask = smoothstep(vUv.y - 0.035, vUv.y + 0.035, uReveal);\n\n gl_FragColor = vec4(color.rgb, color.a * uOpacity * revealMask);\n }\n ");function p(e,t,n){let r=Math.max(0,Math.min(1,(n-e)/(t-e)));return r*r*(3-2*r)}function h(e,t,n,r,a){return r<0||r>=t||a<0||a>=n?0:e[(a*t+r)*4+3]/255}function d(e){return{x:e.headingBounds.x+e.headingBounds.width/2-e.containerSize.width/2,y:e.containerSize.height/2-(e.headingBounds.y+e.headingBounds.height/2)}}function f(e){let{width:t,height:n,progressRef:r,anchorY:o=0}=e,{camera:i}=(0,a.D)();return(0,s.useLayoutEffect)(()=>{i.left=-t/2,i.right=t/2,i.top=n/2,i.bottom=-n/2,i.near=-100,i.far=100,i.position.set(0,0,10),i.zoom=1,i.updateProjectionMatrix()},[i,t,n]),(0,a.F)(()=>{let e=p(0,.55,r.current),t=l.MathUtils.lerp(1,1.12,e);i.zoom=l.MathUtils.lerp(i.zoom,t,.14),i.updateProjectionMatrix();let n=o*(1-1/Math.max(i.zoom,1e-4));i.position.y=l.MathUtils.lerp(i.position.y,n,.14)}),null}function m(e){let{snapshot:t,progressRef:n,introProgressRef:o,onReady:i}=e,u=(0,s.useRef)(null),c=(0,s.useRef)(null),h=(0,s.useMemo)(()=>d(t),[t]),f=(0,s.useMemo)(()=>{let e=new l.CanvasTexture(t.canvas);return e.colorSpace=l.SRGBColorSpace,e.minFilter=l.LinearFilter,e.magFilter=l.LinearFilter,e.generateMipmaps=!1,e.needsUpdate=!0,e},[t]),m=(0,s.useMemo)(()=>new l.Vector2(t.canvas.width,t.canvas.height),[t]);return(0,s.useLayoutEffect)(()=>(null==i||i(),()=>{f.dispose()}),[i,f]),(0,a.F)(()=>{if(!c.current||!u.current)return;let e=p(0,1,o.current),t=p(0,.9,o.current),r=1-p(0,.075,n.current),a=10*p(0,.075,n.current);u.current.position.x=h.x,u.current.position.y=h.y,u.current.position.z=0,c.current.uOpacity=t*r*.9,c.current.uReveal=e,c.current.uBlur=a}),(0,r.jsxs)("mesh",{ref:u,position:[h.x,h.y,0],children:[(0,r.jsx)("planeGeometry",{args:[t.headingBounds.width,t.headingBounds.height]}),(0,r.jsx)("snapshotTextMaterial",{ref:c,uMap:f,uResolution:m,transparent:!0,depthWrite:!1})]})}function g(e){let{snapshot:t,color:n,progressRef:o,introProgressRef:i}
1=e,u=(0,s.useRef)(null),[c,p]=(0,s.useState)(i.current>=.995),{geometry:d,maxRadius:f}=(0,s.useMemo)(()=>(function(e){let t=new l.BufferGeometry,n=e.canvas.getContext("2d",{willReadFrequently:!0});if(!n)return{geometry:t,maxRadius:1};let{width:r,height:a}=e.canvas,{data:o}=n.getImageData(0,0,r,a),i=e.headingBounds,s=r/Math.max(i.width,1),u=a/Math.max(i.height,1),c=Math.max(i.width*i.height,1),p=e.containerSize.width<768?28e3:64e3,d=e.containerSize.width<768?56:120,f=l.MathUtils.clamp(Math.pow(c/p,.9),.75,12),m=Math.round((e.containerSize.width<768?32e3:72e3)*f),g=l.MathUtils.clamp(i.height/d,.85,e.containerSize.width<768?3.2:1.2),v=Math.max(1,Math.ceil(Math.sqrt(c/Math.max(m,1)))),x=l.MathUtils.clamp(.28*v,.35,1),M=1,b=[],S=[],w=[],y=[],P=[],A=[],B=[],D=[],R=[],z=[];for(let t=0;t<a;t+=v)for(let n=0;n<r;n+=v){let c=o[(t*r+n)*4+3]/255;if(c<.15)continue;let p=function(e,t,n,r,a){let o=h(e,t,n,r-1,a),i=h(e,t,n,r+1,a),s=h(e,t,n,r,a-1),u=h(e,t,n,r,a+1),c=i-o,p=u-s,d=Math.hypot(c,p);return d<.001?{strength:0,normalX:0,normalY:-1}:{strength:l.MathUtils.clamp(d,0,1),normalX:c/d,normalY:p/d}}(o,r,a,n,t),d=n/s,f=t/u,m=i.x+d,v=i.y+f,U=function(e,t,n,r){let a=e.letters||[],o=Math.max(e.letterCount||a.length||1,1);for(let e=0;e<a.length;e+=1){let r=a[e];if(t>=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height)return o>1?r.index/(o-1)*.65:0}return 1===o?0:.65*(Math.max(0,Math.min(r.width,t))/Math.max(r.width,1))}(e,d,f,i),F=function(e,t,n,r,a){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:10,i=[[1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]],s=o;for(let l=0;l<i.length;l+=1){let[u,c]=i[l];for(let i=1;i<=o;i+=1)if(.08>h(e,t,n,r+u*i,a+c*i)){s=Math.min(s,i);break}}return s}(o,r,a,n,t,10)/Math.max(s,u);M=Math.max(M,F);let C=d-i.width/2,j=f-i.height/2,I=Math.hypot(C,j)||1;C/=I,j/=I;let E=Math.hypot(C=C*(1-p.strength)+p.normalX*p.strength,j=j*(1-p.strength)+p.normalY*p.strength)||1,_=(Math.random()-.5)*.7,L=Math.cos(_),k=Math.sin(_),T=(C/=E)*L-(j/=E)*k,V=C*k+j*L;C=T,j=V;let G=l.MathUtils.smoothstep(p.strength,.06,.9),Y=m+p.normalX*x*G,O=v+p.normalY*x*G;b.push(Y-e.containerSize.width/2,e.containerSize.height/2-O,0),S.push(C,-j),w.push(F),y.push((.7+.9*Math.random())*g),P.push(c),A.push(Math.random()),B.push(Math.random()),D.push((Math.random()-.5)*2),R.push(U),z.push(p.strength)}return t.setAttribute("position",new l.Float32BufferAttribute(b,3)),t.setAttribute("aDirection",new l.Float32BufferAttribute(S,2)),t.setAttribute("aDistance",new l.Float32BufferAttribute(w,1)),t.setAttribute("aSize",new l.Float32BufferAttribute(y,1)),t.setAttribute("aAlpha",new l.Float32BufferAttribute(P,1)),t.setAttribute("aSeed",new l.Float32BufferAttribute(A,1)),t.setAttribute("aSeed2",new l.Float32BufferAttribute(B,1)),t.setAttribute("aTwist",new l.Float32BufferAttribute(D,1)),t.setAttribute("aIntroDelay",new l.Float32BufferAttribute(R,1)),t.setAttribute("aEdgeBias",new l.Float32BufferAttribute(z,1)),{geometry:t,maxRadius:1.05*M}})(t),[t]),m=(0,s.useMemo)(()=>new l.Color(n),[n]);return((0,s.useEffect)(()=>{u.current&&(u.current.uColor=m)},[m]),(0,s.useEffect)(()=>{p(i.current>=.995)},[t,i]),(0,a.F)(()=>{if(!c){i.current>=.995&&p(!0);return}u.current&&(u.current.uProgress=o.current,u.current.uIntroProgress=1)}),c)?(0,r.jsx)("points",{geometry:d,frustumCulled:!1,children:(0,r.jsx)("dissolvePointsMaterial",{ref:u,transparent:!0,depthWrite:!1,blending:l.NormalBlending,uColor:m,uMaxRadius:f})}):null}(0,a.e)({DissolvePointsMaterial:u,SnapshotTextMaterial:c});let v=e=>{let{snapshot:t,color:n,progressRef:a,introProgressRef:i,onReady:l}=e,u=(0,s.useMemo)(()=>d(t),[t]);return(0,r.jsxs)(o.Hl,{orthographic:!0,dpr:[1,2],frameloop:"always",gl:{alpha:!0,antialias:!0,powerPreference:"high-performance"},resize:{scroll:!1},onCreated:e=>{let{gl:t}=e;t.setClearColor(0,0)},style:{width:"100%",height:"100%"},children:[(0,r.jsx)(f,{width:t.containerSize.width,height:t.containerSize.height,progressRef:a,anchorY:u.y}),(0,r.jsx)(m,{snapshot:t,progressRef:a,introProgressRef:i,onReady:l}),(0,r.jsx)(g,{snapshot:t,color:n,progressRef:a,introProgressRef:i})]})}}}]);
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.