PageSourceSearch

https://www.funnudge.com/_next/static/chunks/425.d43254214f346a8c.js

js funnudge.com collected 2026-10-02 01:30:31 UTC 18,872 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[425],{98:(e,t,a)=>{a.d(t,{EB:()=>c,ER:()=>d,cC:()=>s,sD:()=>h});var n=a(7548),o=a(2006),l=a(3464),i=a(6170),r=a(6451);function s(e,t){var a,s,d,c,h;let p=new n.Z58,f=new n.ubm(null!=(a=null==t?void 0:t.fov)?a:60,4/3,.1,500),m=new n.JeP({antialias:!0});m.setPixelRatio(Math.min(window.devicePixelRatio||1,1.5)),m.setClearColor(null!=(s=null==t?void 0:t.clear)?s:657940),(null==t?void 0:t.shadows)&&(m.shadowMap.enabled=!0,m.shadowMap.type=n.Wk7);let w=m.domElement;w.style.width="100%",w.style.height="100%",w.style.display="block",e.appendChild(w);let u=null;(null==t?void 0:t.bloom)&&((u=new o.s(m)).addPass(new i.A(p,f)),u.addPass(new r.C(new n.I9Y(256,256),null!=(d=t.bloom.strength)?d:.5,null!=(c=t.bloom.radius)?c:.5,null!=(h=t.bloom.threshold)?h:.7)),u.addPass(new l.X));let x=()=>{let t=e.clientWidth||1,a=e.clientHeight||1;m.setSize(t,a,!1),u&&(u.setPixelRatio(m.getPixelRatio()),u.setSize(t,a)),f.aspect=t/a,f.updateProjectionMatrix()};x();let y=new ResizeObserver(x);return y.observe(e),{scene:p,camera:f,renderer:m,render:()=>{u?u.render():m.render(p,f)},dispose:()=>{y.disconnect(),null==u||u.dispose(),p.traverse(e=>{e.geometry&&e.geometry.dispose();let t=e.material;Array.isArray(t)?t.forEach(e=>
1e.dispose()):null==t||t.dispose()}),m.dispose(),w.parentElement===e&&e.removeChild(w)}}}function d(e,t,a){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=document.createElement("canvas");i.width=e,i.height=t,a(i.getContext("2d"),e,t);let r=new n.GOR(i);return r.colorSpace=n.er$,r.wrapS=n.GJx,r.wrapT=n.GJx,r.repeat.set(o,l),r.anisotropy=4,r}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#808080",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:26;return d(e,e,n=>{n.fillStyle=t,n.fillRect(0,0,e,e);for(let t=0;t<e*e*.35;t++){let t=128+Math.floor((Math.random()-.5)*2*a);n.fillStyle="rgb(".concat(t,",").concat(t,",").concat(t,")"),n.fillRect(Math.random()*e,Math.random()*e,1.5,1.5)}})}function h(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0xffffff,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.6,l=new Float32Array(3*e);for(let a=0;a<e;a++){let e=t*(.5+.5*Math.random()),n=Math.random()*Math.PI*2,o=(Math.random()-.5)*Math.PI;l[3*a]=Math.cos(n)*Math.cos(o)*e,l[3*a+1]=Math.sin(o)*e,l[3*a+2]=Math.sin(n)*Math.cos(o)*e}let i=new n.LoY;i.setAttribute("position",new n.THS(l,3));let r=new n.BH$({color:a,size:o,sizeAttenuation:!0,transparent:!0,opacity:.8,blending:n.EZo,depthWrite:!1});return new n.ONl(i,r)}},2773:(e,t,a)=>{a.d(t,{GL:()=>c,Gp:()=>r,Nc:()=>i,_y:()=>s,mA:()=>d});var n=a(2115);let o=null,l=new Set;function i(e){if(o!==e)for(let t of(o=e,l))t(e)}function r(e){return l.add(e),()=>l.delete(e)}let s={title:"Leave this game?",body:"You're mid-game — your progress in this round will be lost."},d={title:"Leave the match?",body:"The match is still live — leaving counts as a loss and your opponent takes the win."};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,{title:a,body:o}=t;(0,n.useEffect)(()=>e?(i({title:a,body:o}),()=>i(null)):void i(null),[e,a,o])}},2806:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});var n=a(5155),o=a(2115),l=a(7548),i=a(1175),r=a(4107),s=a(98),d=a(3557),c=a(2773);function h(){let e=(0,o.useRef)(null),[t,a]=(0,o.useState)("idle");(0,c.GL)("playing"===t);let[h,p]=(0,o.useState)(0),[f,m]=(0,o.useState)(0),[w,u]=(0,o.useState)([]),{best:x,submit:y}=(0,d.g)("mini-golf-3d"),g=(0,o.useRef)(t),M=(0,o.useRef)(0),b=(0,o.useRef)(0),v=(0,o.useRef)(()=>{}),S=(0,o.useRef)(0);g.current=t;let P=(e,t)=>{let a=++S.current;u(n=>[...n.slice(-2),{id:a,text:e,cls:t}]),window.setTimeout(()=>{u(e=>e.filter(e=>e.id!==a))},1400)},E=(0,o.useRef)(P);return E.current=P,(0,o.useEffect)(()=>{let t=e.current;if(!t)return;let n=(0,s.cC)(t,{fov:48,clear:9425132,shadows:!0}),{scene:o,camera:d}=n;o.fog=new l.jUj(0xbfe3f2,60,120);let c=new l.GOR((()=>{let e=document.createElement("canvas");e.width=8,e.height=256;let t=e.getContext("2d"),a=t.createLinearGradient(0,0,0,256);return a.addColorStop(0,"#3f7fd0"),a.addColorStop(.55,"#8fc8ec"),a.addColorStop(1,"#dff0f7"),t.fillStyle=a,t.fillRect(0,0,8,256),e})());
1c.colorSpace=l.er$,o.add(new l.eaF(new l.Gu$(150,24,16),new l.V9B({map:c,side:l.hsX,fog:!1})));let h=(0,s.ER)(128,128,(e,t,a)=>{let n=e.createRadialGradient(t/2,a/2,0,t/2,a/2,t/2);n.addColorStop(0,"rgba(255,250,235,0.95)"),n.addColorStop(.18,"rgba(255,244,210,0.7)"),n.addColorStop(.5,"rgba(255,232,180,0.2)"),n.addColorStop(1,"rgba(255,232,180,0)"),e.fillStyle=n,e.fillRect(0,0,t,a)}),f=new l.eaF(new l.bdM(40,40),new l.V9B({map:h,transparent:!0,depthWrite:!1,fog:!1}));f.position.set(28,30,-70),o.add(f),o.add(new l.dth(0xfff0e0,4880954,.95));let w=new l.ZyN(0xfff4d8,1.5);w.position.set(7,18,5),w.castShadow=!0,w.shadow.mapSize.set(1024,1024),w.shadow.camera.left=-20,w.shadow.camera.right=20,w.shadow.camera.top=22,w.shadow.camera.bottom=-22,w.shadow.camera.far=60,w.shadow.bias=-4e-4,o.add(w);let u=new l.B69;o.add(u),w.target=u;let x=(0,s.ER)(256,384,(e,t,a)=>{e.fillStyle="#3f9a3a",e.fillRect(0,0,t,a),e.globalAlpha=.1;for(let n=0;n<a;n+=24)e.fillStyle=n/24%2==0?"#ffffff":"#0a3a10",e.fillRect(0,n,t,12);e.globalAlpha=1;for(let n=0;n<9e3;n++)e.fillStyle=Math.random()>.5?"rgba(95,180,75,0.45)":"rgba(30,95,40,0.45)",e.fillRect(Math.random()*t,Math.random()*a,2,2)},26,26);x.anisotropy=8;let S=new l.eaF(new l.bdM(260,260),new l._4j({map:x,roughness:1}));S.rotation.x=-Math.PI/2,S.receiveShadow=!0,o.add(S);let P=new l._4j({color:7029795}),R=new l._4j({color:3112250,roughness:1}),j=[];for(let e=0;e<22;e++){let e=new l.YJl;j.push(e);let t=new l.eaF(new l.Ho_(.18,.26,1.5,8),P);t.position.y=.75,t.castShadow=!0,e.add(t);let a=new l.eaF(new l.qFE(1.1,2.6,9),R);a.position.y=2.4,a.castShadow=!0,e.add(a);let n=Math.random()*Math.PI*2,i=18+38*Math.random();e.position.set(Math.cos(n)*i,0,Math.sin(n)*i);let r=.8+.8*Math.random();e.scale.setScalar(r),o.add(e)}let I=new l._4j({color:0xdedede,roughness:.6,emissive:0}),k=new l.eaF(new l.O3Y(.36,.06,8,24),I);k.rotation.x=-Math.PI/2,k.position.y=.02,o.add(k);let N=new l.eaF(new l.tcD(.36,24),new l.V9B({color:328965}));N.rotation.x=-Math.PI/2,N.position.y=.015,o.add(N);let F=new l.YJl,_=new l.eaF(new l.Ho_(.028,.028,1.9,8),new l._4j({color:0xf2f2f2,roughness:.5}));_.position.y=.95,_.castShadow=!0,F.add(_);let B=new l.eaF(new l.Gu$(.05,10,10),new l._4j({color:0xd4af37,roughness:.4,metalness:.5}));B.position.y=1.92,F.add(B);let C=new l.ypk;C.moveTo(0,0),C.lineTo(0,.4),C.lineTo(.6,.2),C.closePath();let T=new l.eaF(new l.MSw(C),new l._4j({color:0xe23b3b,roughness:.75,side:l.$EB}));T.position.set(.02,1.46,0),T.castShadow=!0,F.add(T),o.add(F);let L=(0,s.ER)(64,64,(e,t,a)=>{e.fillStyle="#ffffff",e.fillRect(0,0,t,a),e.fillStyle="rgba(180,185,195,0.5)";for(let n=4;n<a;n+=8)for(let a=4;a<t;a+=8)e.beginPath(),e.arc(a,n,1.6,0,2*Math.PI),e.fill()}),z=new l.eaF(new l.Gu$(.24,28,28),new l._4j({map:L,roughness:.3,metalness:.05}));z.castShadow=!0,o.add(z);let A=(0,s.ER)(64,64,(e,t,a)=>{let n=e.createRadialGradient(t/2,a/2,1,t/2,a/2,t/2);n.addColorStop(0,"rgba(0,0,0,0.4)"),n.addColorStop(1,"rgba(0,0,0,0)"),e.fillStyle=n,e.fillRect(0,0,t,a)}),G=new l.eaF(new l.bdM(.8,.8),new l.V9B({map:A,transparent:!0,depthWrite:!1}));G.rotation.x=-Math.PI/2,G.position.y=.02,o.add(G);let Y=new l.ypk;Y.moveTo(-.09,0),Y.lineTo(.09,0),Y.lineTo(.09,.78),Y.lineTo(.2,.78),Y.lineTo(0,1),Y.lineTo(-.2,.78),Y.lineTo(-.09,.78),Y.closePath();let $=new l.MSw(Y);$.rotateX(Math.PI/2);let O=new l.Q1f,q=new l.eaF($,new l.V9B({color:8190976,transparent:!0,opacity:.5,side:l.$EB,depthWrite:!1}));q.position.y=.06,q.visible=!1,o.add(q);let W=new l.bdM(1,1);W.rotateX(-Math.PI/2);let V=new l.V9B({color:0xffe14a,transparent:!0,opacity:.5,side:l.$EB,depthWrite:!1}),D=new l.eaF(W,V);D.position.y=.045,D.visible=!1,o.add(D);let H=new l.Gu$(.06,8,6),J=new l.V9B({color:0xffffff,transparent:!0,opacity:.65,depthWrite:!1}),X=[];for(let e=0;e<10;e++){let e=new l.eaF(H,J);e.visible=!1,o.add(e),X.push(e)}let Z=new l.Gu$(.07,6,5),U=[];for(let e=0;e<8;e++){let e=new l.eaF(Z,new l.V9B({color:0xe2c68a,transparent:!0,opacity:0}));e.visible=!1,o.add(e),U.push({m:e,life:0})}let K=0,Q=new l.tcD(.14,8),ee=[0xf9a8d4,0xfef08a].map(e=>new l._4j({color:e,roughness:.8,side:l.$EB})),et=[];for(let e=0;e<2;e++){let t=new l.YJl,a=new l.eaF(Q,ee[e]);a.position.x=-.08;let n=new l.eaF(Q,ee[e]);n.position.x=.08,t.add(a,n),et.push({g:t,wl:a,wr:n,sp:.1+.08*Math.random(),off:6.28*Math.random(),r:9+5*e}),o.add(t)}let ea=new l.rKP(.12,.5,24),en=new l.V9B({color:0xcdeeff,transparent:!0,opacity:0,side:l.$EB,depthWrite:!1}),eo=new l.eaF(ea,en);eo.rotation.x=-Math.PI/2,eo.position.y=.05,eo.visible=!1,o.add(eo);let el=-1,ei=(0,s.ER)(128,128,(e,t,a)=>{e.fillStyle="#e2c68a",e.fillRect(0,0,t,a);for(let n=0;n<2600;n++)e.fillStyle=Math.random()>.5?"rgba(180,150,90,0.4)":"rgba(255,240,200,0.4)",e.fillRect(Math.random()*t,Math.random()*a,2,2)}),er=new l._4j({map:ei,roughness:1,side:l.$EB}),es=new l._4j({color:0x9f8c5e,roughness:1,side:l.$EB}),ed=(0,s.ER)(128,128,(e,t,a)=>{e.fillStyle="#2f6fb0",e.fillRect(0,0,t,a),e.strokeStyle="rgba(255,255,255,0.16)",e.lineWidth=2;for(let n=6;n<a;n+=14){e.beginPath();for(let a=0;a<=t;a+=6)e.lineTo(a,n+2.2*Math.sin(.18*a+n));e.stroke()}},3,3),ec=new l._4j({map:ed,roughness:.18,metalness:.4,transparent:!0,opacity:.9,side:l.$EB}),eh=[],ep=[],ef=[],em=()=>{for(let e of ef)o.remove(e),e.geometry.dispose();ef=[],eh=[],ep=[]},ew=(e,t,a)=>{let n=Math.random()*Math.PI*2,o=Math.random()*Math.PI*2,l=Math.random()*Math.PI*2,i=[];for(let e=0;e<30;e++){let t=e/30*Math.PI*2,r=.3*Math.sin(3*t+n)+.18*Math.sin(5*t+o)+.1*Math.sin(7*t+l);i.push(Math.max(.45*a,a*(1+r)))}return{x:e,z:t,radii:i}},eu=function(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=t-e.x,l=a-e.z;return Math.hypot(o,l)<((e,t)=>{let a=(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI)/(2*Math.PI)*30,n=Math.floor(a)%30,o=a-Math.floor(a);return e.radii[n]*(1-o)+e.radii[(n+1)%30]*o})(e,Math.atan2(l,o))+n},ex=(e,t,a,n)=>{let i=new l.ypk;for(let a=0;a<=30;a++){let n=a%30/30*Math.PI*2,o=e.radii[a%30]*t,l=Math.cos(n)*o,r=Math.sin(n)*o;0===a?i.moveTo(l,r):i.lineTo(l,r)}let r=new l.MSw(i,2);r.rotateX(Math.PI/2);let s=new l.eaF(r,a);return s.position.set(e.x,n,e.z),s.receiveShadow=!0,o.add(s),ef.push(s),s},ey=new l.I9Y(0,9),eg=new l.I9Y(0,9),eM=new l.I9Y(0,0),eb=0,ev=new l.I9Y(0,-6),eS=(e,t,a)=>Math.hypot(e-ey.x,t-ey.y)>a&&Math.hypot(e-ev.x,t-ev.y)>a,eP=()=>{em(),ev=new l.I9Y((Math.random()-.5)*13,-6-8*Math.random()),k.position.set(ev.x,.02,ev.y),N.position.set(ev.x,.015,ev.y),F.position.set(ev.x,0,ev.y);let e=2+ +(.5>Math.random());for(let t=0;t<e;t++){let e=0,t=0,a=0,n=1.7+1.3*Math.random();do e=(Math.random()-.5)*16,t=-2-12*Math.random(),a++;while(!eS(e,t,n+2)&&a<24);let o=ew(e,t,n);eh.push(o),ex(o,1,er,.012)}let t=1+ +(.6>Math.random());for(let e=0;e<t;e++){let e=0,t=0,a=0,n=1.9+1.4*Math.random();do e=(Math.random()-.5)*15,t=-1-12*Math.random(),a++;while(!eS(e,t,n+2.5)&&a<24);let o=ew(e,t,n);ep.push(o),ex(o,1.16,es,.01),ex(o,1,ec,.02)}},eE=()=>eM.lengthSq()>.04,eR=()=>eh.some(e=>eu(e,ey.x,ey.y)),ej=()=>ep.some(e=>eu(e,ey.x,ey.y,-.12));v.current=()=>{ey.set(0,9),eg.set(0,9),eM.set(0,0),eb=0,eP(),M.current=0,p(0),m(0),a("playing")};let eI=new l.tBo,ek=new l.Zcv(new l.Pq0(0,1,0),0),eN=new l.Pq0,eF=!1,e_=new l.I9Y,eB=0,eC=e=>{if(!eF)return;let a=(e=>{let a=t.getBoundingClientRect(),n=new l.I9Y((e.clientX-a.left)/a.width*2-1,-(2*((e.clientY-a.top)/a.height))+1);return(eI.setFromCamera(n,d),eI.ray.intersectPlane(ek,eN))?new l.I9Y(eN.x,eN.z):null})(e);if(!a)return;let n=ey.clone().sub(a);eB=Math.min(2.4*n.length(),27),e_=n.lengthSq()>.001?n.clone().normalize():e_;let o=eB/27,i=o>.04;if(i){let e=ey.clone(),t=e_.clone().multiplyScalar(eB),a=1/60,n=0;for(let o=0;o<110&&n<X.length;o++){let l=t.length();if(l<.3)break;let i=(eh.some(t=>eu(t,e.x,e.y))?9.2:2.3)+.05*l;t.setLength(Math.max(0,l-i*a)),e.addScaledVector(t,a),o%10==9&&(X[n].position.set(e.x,.08,e.y),X[n].visible=!0,n++)}for(;n<X.length;n++)X[n].visible=!1}
1else for(let e of X)e.visible=!1;if(q.visible=i,D.visible=i,i){O.setHSL(.33*(1-o),.65,.5),q.material.color.copy(O),q.material.opacity=.4+.25*o,q.position.set(ey.x+.39*e_.x,.06,ey.y+.39*e_.y),q.rotation.y=Math.atan2(e_.x,e_.y),q.scale.set(1,1,1.2+6*o);let e=a.x-ey.x,t=a.y-ey.y,n=Math.hypot(e,t);D.position.set((ey.x+a.x)/2,.045,(ey.y+a.y)/2),D.rotation.y=Math.atan2(e,t),D.scale.set(.09+.06*o,1,n),V.opacity=.35+.4*o}},eT=e=>{"playing"!==g.current||eE()||eb||(eF=!0,eC(e))},eL=()=>{if(eF){for(let e of(eF=!1,q.visible=!1,D.visible=!1,X))e.visible=!1;eB>.6&&(eM=e_.clone().multiplyScalar(eB),b.current+=1,m(e=>e+1),(0,i._O)("tap")),eB=0}};t.addEventListener("pointerdown",eT),window.addEventListener("pointermove",eC),window.addEventListener("pointerup",eL);let ez=new l.Pq0,eA=0,eG=performance.now(),eY=1e3/60,e$=e=>{eA=requestAnimationFrame(e$);let t=e-eG;if(t<eY-1)return;let a=Math.min(t/1e3,.033);if(eG=e,"playing"===g.current){if(eb>0){if(eb+=a,z.position.y=.24-4*eb,z.scale.setScalar(Math.max(.1,1-1.5*eb)),G.material.opacity=Math.max(0,1-2*eb),eb>.5){M.current+=1,p(M.current),y(M.current),(0,r.q7)("mini-golf-3d",M.current);let e=b.current;E.current(e<=1?"⛳ HOLE IN ONE!":2===e?"✨ GREAT PUTT!":"⛳ SUNK!",e<=1?"text-amber-300":"text-emerald-300"),(0,i._O)(e<=1?"win":"clear"),b.current=0,z.scale.setScalar(1),G.material.opacity=1,ey.set(0,9),eg.set(0,9),eM.set(0,0),eb=0,m(0),eP()}}else if(eE()){let e=eM.length(),t=(eR()?9.2:2.3)+.05*e,n=Math.max(0,e-t*a);if(eM.setLength(n),ey.addScaledVector(eM,a),ej()){var o,s;o=ey.x,s=ey.y,eo.position.set(o,.05,s),eo.scale.setScalar(1),en.opacity=.85,eo.visible=!0,el=0,ey.copy(eg),eM.set(0,0),b.current+=1,m(e=>e+1),E.current("\uD83D\uDCA6 SPLASH! +1","text-sky-300"),(0,i._O)("slice")}else eg.copy(ey);if(eR()&&e>2&&.35>Math.random()){let e=U[K++%U.length];e.m.position.set(ey.x+(Math.random()-.5)*.3,.12,ey.y+(Math.random()-.5)*.3),e.m.scale.setScalar(.7+.6*Math.random()),e.life=.35,e.m.visible=!0}.306>ey.distanceTo(ev)&&8>eM.length()&&(eb=1e-4,ey.copy(ev),eM.set(0,0),(0,i._O)("score")),eM.lengthSq()>1e-5&&(ez.set(eM.y,0,-eM.x).normalize(),z.rotateOnWorldAxis(ez,e*a/.24))}else ej()||eg.copy(ey);eb<=0&&z.position.set(ey.x,.24,ey.y),G.position.set(ey.x,.02,ey.y),u.position.set(ey.x,0,ey.y)}else z.position.set(0,.24,9),G.position.set(0,.02,9);ed.offset.x+=.03*a,ed.offset.y+=.02*a,T.rotation.y=.35*Math.sin(e/280);let c=ey.distanceTo(ev),h=l.cj9.clamp(1-c/3,0,1);I.emissive.setRGB(.1*h,.7*h,.2*h),k.scale.setScalar(1+.05*Math.sin(e/300)*(.4+h));for(let t=0;t<j.length;t++)j[t].rotation.z=.02*Math.sin(e/1400+1.7*t);for(let t of et){let a=e/1e3*t.sp+t.off;t.g.position.set(Math.cos(a)*t.r,.7+.3*Math.sin(e/600+t.off),Math.sin(a)*t.r-4),t.g.rotation.y=-a;let n=.8*Math.sin(e/60+t.off);t.wl.rotation.y=n,t.wr.rotation.y=-n}for(let e of U)!(e.life<=0)&&(e.life-=a,e.m.position.y+=.5*a,e.m.material.opacity=Math.max(0,2*e.life),e.life<=0&&(e.m.visible=!1));if(el>=0){let e=(el+=a)/.5;eo.scale.setScalar(1+3*e),en.opacity=Math.max(0,.85*(1-e)),e>=1&&(el=-1,eo.visible=!1)}let f=z.position.x,w=z.position.z,x=ev.x-f,v=ev.y-w,S=Math.hypot(x,v)||1;x/=S,v/=S,d.position.set(f-11*x,9,w-11*v),d.lookAt(f+3*x,.5,w+3*v),n.render()};eA=requestAnimationFrame(e$);let eO=()=>{cancelAnimationFrame(eA),document.hidden||(eG=performance.now(),eA=requestAnimationFrame(e$))};return document.addEventListener("visibilitychange",eO),()=>{cancelAnimationFrame(eA),document.removeEventListener("visibilitychange",eO),t.removeEventListener("pointerdown",eT),window.removeEventListener("pointermove",eC),window.removeEventListener("pointerup",eL),em(),x.dispose(),c.dispose(),h.dispose(),ei.dispose(),ed.dispose(),L.dispose(),A.dispose(),$.dispose(),W.dispose(),ea.dispose(),H.dispose(),Z.dispose(),Q.dispose(),n.dispose()}},[]),(0,n.jsxs)("div",{className:"select-none",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("div",{className:"rounded-xl bg-white/10 px-4 py-2 text-center",children:[(0,n.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-zinc-400",children:"Holes"}),(0,n.jsx)("div",{className:"text-xl font-bold text-white",children:h})]}),(0,n.jsxs)("div",{className:"rounded-xl bg-white/10 px-4 py-2 text-center",children:[(0,n.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-zinc-400",children:"Strokes"}),(0,n.jsx)("div",{className:"text-xl font-bold text-emerald-300",children:f})]}),(0,n.jsxs)("div",{className:"rounded-xl bg-white/10 px-4 py-2 text-center",children:[(0,n.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide text-zinc-400",children:"Best"}),(0,n.jsx)("div",{className:"text-xl font-bold text-amber-300",children:x})]})]}),(0,n.jsx)("button",{onClick:()=>v.current(),className:"rounded-xl bg-gradient-to-r from-emerald-500 to-green-600 px-4 py-2 font-bold text-white transition hover:scale-105",children:"playing"===t?"Restart":"Start"})]}),(0,n.jsxs)("div",{"data-board":!0,ref:e,className:"relative mx-auto aspect-square w-full touch-none overflow-hidden rounded-2xl border border-white/10 sm:aspect-[4/3]",style:{maxWidth:"min(100%, calc(82vh * 1.333))"},role:"application","aria-label":"3D Mini Golf. Drag back from the ball and release to putt toward the hole.",children:[(0,n.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-[16%] z-10 flex flex-col items-center gap-1",children:w.map(e=>(0,n.jsx)("div",{className:"animate-bounce-in text-xl font-extrabold drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] sm:text-2xl ".concat(e.cls),children:e.text},e.id))}),"playing"!==t&&(0,n.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/55 backdrop-blur-[2px]",children:[(0,n.jsx)("p",{className:"text-5xl","aria-hidden":!0,
1children:"⛳"}),(0,n.jsx)("button",{onClick:e=>{e.stopPropagation(),v.current()},className:"rounded-xl bg-gradient-to-r from-emerald-500 to-green-600 px-6 py-3 font-bold text-white transition hover:scale-105",children:"▶ Start putting"})]})]}),(0,n.jsx)("p",{className:"mt-4 text-center text-sm text-zinc-500",children:"\uD83D\uDDB1️ Drag back from the ball and release to putt \xb7 Open course — skirt the ponds (splash = +1 stroke) and slow sand \xb7 Sink it!"})]})}},3557:(e,t,a)=>{a.d(t,{g:()=>o});var n=a(2115);function o(e){let[t,a]=(0,n.useState)(0);return(0,n.useEffect)(()=>{try{let t=window.localStorage.getItem("funnudge:".concat(e));t&&a(Number(t)||0)}catch(e){}},[e]),{best:t,submit:(0,n.useCallback)(t=>{a(a=>{if(t<=a)return a;try{window.localStorage.setItem("funnudge:".concat(e),String(t))}catch(e){}return t})},[e])}}}}]);

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.