PageSourceSearch

https://io.google/2026/puzzle/assets/DateRevealSlash-CGmZjgFe.js

js io.google collected 2026-09-24 08:29:57 UTC 5,458 bytes, 1 lines download raw bytes

1import{r,j as a}from"./vendor-core-BfsIZGLM.js";import{p as _}from"./main-Cznl0eY3.js";import"./vendor-animation-C5u8yPkK.js";import"./vendor-three-DWQGnPeS.js";const H=["#4285F4","#4285F4","#4285F4","#4285F4","#34A853","#B9D84C","#FBBC04","#EA4335","#BB55A1"],f=140,b=24,z={name:"Liquid Slide",description:"Thick, viscous paint that skids across the floor.",viscosity:.992,gravity:.004,spread:1.4},O=["Cosmic","Neon","Hyper","Fluid","Dreamy","Electric","Velvet","Liquid","Chromatic","Glitch","Sonic","Vapor"],G=["Slide","Burst","Splash","Drift","Flow","Pulse","Wave","Storm","Cascade","Ripples","Tide","Flux"];function Y(){return{name:`${O[Math.floor(Math.random()*O.length)]} ${G[Math.floor(Math.random()*G.length)]}`,description:"A procedurally generated fluid physics theme.",viscosity:.95+Math.random()*.045,gravity:.001+Math.random()*.009,spread:.5+Math.random()*1.5}}const X=({onExplodeStart:p,onExplodeEnd:E,manualTrigger:d})=>{const u=r.useRef(null),[m,P]=r.useState(z),M=r.useRef(!1),x=r.useRef({x:0,y:0}),C=r.useRef(null),F=r.useRef([]),k=r.useRef([]),w=r.useRef(void 0),D=r.useRef(d);r.useEffect(()=>{const n=u.current;if(!n)return;const s=()=>{n.parentElement&&(n.width=n.parentElement.clientWidth,n.height=n.parentElement.clientHeight)},t=new ResizeObserver(s);return n.parentElement&&t.observe(n.parentElement),s(),()=>t.disconnect()},[]);const R=r.useCallback(()=>{const n=Y();P(n),p(n.name);const s=u.current;if(!s)return;const t=s.width,o=s.height,i=800+Math.random()*800,c=[];for(let h=0;h<i;h++){const v=H[Math.floor(Math.random()*H.length)],y=Math.random()*Math.PI*2,g=(Math.random()<.1?1+Math.random()*5:10+Math.random()*70)*(n.spread||1.3),T=t/2+(Math.random()-.5)*40,A=o/2+(Math.random()-.5)*40;c.push({x:T,y:A,vx:Math.cos(y)*g,vy:Math.sin(y)*g,radius:Math.random()<.05?30+Math.random()*60:4+Math.random()*25,color:v,life:0,maxLife:500+Math.random()*1e3})}F.current=[...F.current,...c],setTimeout(()=>{E()},2e3)},[p,E]);r.useEffect(()=>{d!==void 0&&d!==D.current&&(R(),D.current=d)},[d,R]),r.useEffect(()=>{const n=()=>{const s=u.current;if(!s)return;const t=s.getContext("2d");if(!t)return;const o=x.current,i=C.current,c=M.current;let h=0,v=0,y=0;c&&i&&(h=o.x-i.x,v=o.y-i.y,y=Math.sqrt(h*h+v*v),y>2&&Math.random()>.4&&k.current.push({x:o.x,y:o.y,radius:5,maxRadius:40+y*2,opacity:.4,color:"rgba(255, 255, 255, 0.1)"})),t.clearRect(0,0,s.width,s.height);const S=k.current;for(let l=S.length-1;l>=0;l--){const e=S[l];if(e.radius+=2.5,e.opacity-=.02,e.opacity<=0||e.radius>=e.maxRadius){S.splice(l,1);continue}t.beginPath(),t.strokeStyle=`rgba(255, 255, 255, ${e.opacity})`,t.lineWidth=1.2,t.arc(e.x,e.y,e.radius,0,Math.PI*2),t.stroke()}const g=F.current,T=15e-5;for(let l=g.length-1;l>=0;l--){const e=g[l];if(c&&i){const j=e.x-o.x,B=e.y-o.y;if(Math.sqrt(j*j+B*B)<f*.6){e.vx+=h*.8,e.vy+=v*.8;const q=Math.atan2(B,j);e.x+=Math.cos(q)*5,e.y+=Math.sin(q)*5}}e.vx*=m.viscosity,e.vy*=m.viscosity;const W=(e.vx*e.vx+e.vy*e.vy)*T,N=Math.max(.85,1-W);e.vx*=N,e.vy*=N,e.vy+=m.gravity,e.x+=e.vx,e.y+=e.vy,e.life++,e.x<e.radius?(e.x=e.radius,e.vx*=-.45):e.x>s.width-e.radius&&(e.x=s.width-e.radius,e.vx*=-.45),e.y<e.radius?(e.y=e.radius,e.vy*=-.45):e.y>s.height-e.radius&&(e.y=s.height-e.radius,e.vy*=-.45),t.beginPath(),t.fillStyle=e.color,t.arc(e.x,e.y,e.radius,0,Math.PI*2),t.fill(),e.life>e.maxLife&&g.splice(l,1)}const A=c&&i?Math.atan2(o.y-i.y,o.x-i.x):0;t.save(),t.translate(o.x,o.y),t.rotate(A+Math.PI/2);const L=c?1.05:1;t.scale(L,L),t.shadowBlur=c?30:15,t.shadowColor="rgba(255,255,255,0.1)",t.shadowOffsetY=2,t.fillStyle="#f0f0f0",t.fillRect(-f/2,-b/2,f,b),t.fillStyle=c?"#888":"#bbb",t.fillRect(-f/2,b/2-2,f,8),t.shadowBlur=0,t.fillStyle="rgba(0, 0, 0, 0.05)",t.fillRect(-f/2,-b/2,f,3),t.restore(),w.current=requestAnimationFrame(n)};return w.current=requestAnimationFrame(n),()=>{w.current&&cancelAnimationFrame(w.current)}},[m]),r.useEffect(()=>{const n=s=>{s.key==="/"&&R()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[R]);const U=n=>{M.current=!0;const s=n.currentTarget.getBoundingClientRect(),t=n.clientX-s.left,o=n.clientY-s.top;x.current={x:t,y:o},C.current={x:t,y:o},u.current?.setPointerCapture(n.pointerId)},V=n=>{const s=n.currentTarget.getBoundingClientRect(),t=n.clientX-s.left,o=n.clientY-s.top;C.current={...x.current},x.current={x:t,y:o}},I=n=>{M.current=!1,u.current?.releasePointerCapture(n.pointerId)};return a.jsx("div",{className:"relative w-full h-full cursor-none overflow-hidden touch-none",children:a.jsx("canvas",{ref:u,onPointerDown:U,onPointerMove:V,onPointerUp:I,onPointerLeave:I,className:"touch-none"})})},te=()=>{const[p,E]=r.useState(!1),[d,u]=r.useState(0),m=r.useCallback(()=>{E(!0)},[]),P=r.useCallback(()=>{E(!1)},[]),M=()=>{u(x=>x+1)};return r.useEffect(()=>{M(),_("Slash")},[]),a.jsxs("div",{className:"relative w-full h-full bg-transparent font-sans text-white overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 z-0 bg-transparent"}
1),a.jsx(X,{onExplodeStart:m,onExplodeEnd:P,manualTrigger:d}),a.jsx("div",{className:"absolute inset-0 pointer-events-none z-10 flex flex-col items-center justify-end bottom-[136px]",children:!p&&a.jsx(a.Fragment,{children:a.jsx("div",{className:"text-[18px] text-[#9BA0A6] font-medium pointer-events-none mb-10 lg:mb-0",children:"Click and drag to wipe away confetti"})})}),p&&a.jsx("div",{className:"absolute inset-0 pointer-events-none bg-white/5 animate-pulse z-20"})]})};export{te 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.