1import{j as e}from"./index-CfHooNjQ.js";import{a as t,u as s,A as r,T as n,x as o,C as i}from"./react-three-fiber.esm-6q4l2Bs-.js";import{a}from"./react-vendor-QaboSCKR.js";import{I as p}from"./InlineErrorBoundary-a-oQaKmH.js";import{g as u}from"./voiceActivity-BxG3SRBR.js";import"./lenis-CYZ9w2j8.js";import"./framer-vv-CY5AZ.js";import"./gsap-CvrrfOyh.js";import"./recharts-DP36tkWn.js";const d=Object.freeze({idle:{distort:.12,distortSpeed:.6,pulseSpeed:.4,pulseAmount:.04,glow:.22,ampReactivity:0},listening:{distort:.24,distortSpeed:1.2,pulseSpeed:.9,pulseAmount:.05,glow:.4,ampReactivity:.7},transcribing:{distort:.26,distortSpeed:1.3,pulseSpeed:.95,pulseAmount:.05,glow:.42,ampReactivity:.55},speaking:{distort:.3,distortSpeed:1.8,pulseSpeed:1.5,pulseAmount:.05,glow:.55,ampReactivity:1},understanding:{distort:.4,distortSpeed:1.6,pulseSpeed:.8,pulseAmount:.05,glow:.36,ampReactivity:0},planning:{distort:.42,distortSpeed:1.7,pulseSpeed:.85,pulseAmount:.05,glow:.38,ampReactivity:0},executing:{distort:.34,distortSpeed:2,pulseSpeed:1.2,pulseAmount:.07,glow:.5,ampReactivity:0},waiting_approval:{distort:.2,distortSpeed:1,pulseSpeed:.6,pulseAmount:.05,glow:.4,ampReactivity:0},complete:{distort:.16,distortSpeed:.85,pulseSpeed:.5,pulseAmount:.04,glow:.35,ampReactivity:0},blocked:{distort:.18,distortSpeed:.8,pulseSpeed:.45,pulseAmount:.04,glow:.32,ampReactivity:0},error:{distort:.16,distortSpeed:.7,pulseSpeed:.4,pulseAmount:.035,glow:.3,ampReactivity:0}}),c=[1,203/255,1/255];function l(e){return Number.isFinite(e)?e<0?0:e>255?255:e:0}function m({state:i,color:p}){const m=a.useRef(null),f=a.useRef(null),g=a.useRef(1),b=function(e){return d[e]??d.idle}(i),[h,y,w]=function(e){if("string"!=typeof e)return c;const t=e.trim().toLowerCase(),s=t.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*[\d.]+\s*)?\)$/);if(s)return[l(Number(s[1]))/255,l(Number(s[2]))/255,l(Number(s[3]))/255];const r=t.startsWith("#")?t.slice(1):t;return/^[0-9a-f]{3}$/.test(r)?[parseInt(r[0]+r[0],16)/255,parseInt(r[1]+r[1],16)/255,parseInt(r[2]+r[2],16)/255]:/^[0-9a-f]{6}$/.test(r)?[parseInt(r.slice(0,2),16)/255,parseInt(r.slice(2,4),16)/255,parseInt(r.slice(4,6),16)/255]:c}(p),v=a.useMemo(()=>new t(h,y,w),[h,y,w]),S=a.useMemo(()=>function(e){const t=new Float32Array(7200),s=new Float32Array(7200),r=new Float32Array(7200),n=new Float32Array(e),o=Math.PI*(3-Math.sqrt(5));for(let i=0;i<e;i+=1){const a=(i+.5)/e,p=Math.acos(1-2*a),u=i*o,d=Math.sin(p)*Math.cos(u),c=Math.sin(p)*Math.sin(u),l=Math.cos(p),m=.55+.72*Math.pow(Math.random(),.65),f=3*i;s[f]=d*m,s[f+1]=c*m,s[f+2]=l*m,t[f]=s[f],t[f+1]=s[f+1],t[f+2]=s[f+2];const g=.35+.65*Math.random();r[f]=g,r[f+1]=g,r[f+2]=g,n[i]=Math.random()*Math.PI*2}return{positions:t,base:s,colors:r,seed:n}}(2400),[]),x=a.useMemo(()=>function(){if("undefined"==typeof document)return new n;const e=document.createElement("canvas");e.width=64,e.height=64;const t=e.getContext("2d");if(t){const e=t.createRadialGradient(32,32,0,32,32,32);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(.25,"rgba(255,255,255,0.55)"),e.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=e,t.fillRect(0,0,64,64)}const s=new o(e);return s.needsUpdate=!0,s}(),[]);return s(({clock:e})=>{const t=m.current;if(!t)return;const s=e.elapsedTime,r=u(),n=function(e,t){switch(e){case"listening":case"transcribing":return{base:.9,ampK:-.24,turb:.7*t.distort,spin:.0016};case"speaking":return{base:1.05,ampK:.34,turb:t.distort,spin:.0026};case"understanding":case"planning":return{base:1,ampK:0,turb:1.5*t.distort,spin:.0028};case"executing":return{base:1.08,ampK:0,turb:1.15*t.distort,spin:.0032};default:return{base:1,ampK:0,turb:.5*t.distort,spin:.0012}}}(i,b),o=n.base+r*n.ampK+Math.sin(s*b.pulseSpeed*2)*b.pulseAmount;g.current+=.12*(o-g.current);const a=g.current,p=n.turb,d=t.geometry.attributes.position.array,{base:c,seed:l}=S;for(let i=0;i<2400;i+=1){const e=3*i,t=l[i],r=a+p*(Math.sin(1.4*s+t)*Math.cos(.9*s+1.7*t))*.16;d[e]=c[e]*r,d[e+1]=c[e+1]*r,d[e+2]=c[e+2]*r}t.geometry.attributes.position.needsUpdate=!0,t.rotation.y+=n.spin,t.rotation.x+=.4*n.spin;const h=f.current;h&&(h.color.lerp(v,.08),h.opacity=.45+.45*b.glow+.2*r,h.size=.04+.03*b.glow+.025*r)}),e.jsxs("points",{ref:m,children:[e.jsxs("bufferGeometry",{children:[e.jsx("bufferAttribute",{attach:"attributes-position",args:[S.positions,3]}),e.jsx("bufferAttribute",{attach:"attributes-color",args:[S.colors,3]})]}),e.jsx("pointsMaterial",{ref:f,map:x,size:.05,sizeAttenuation:!0,transparent:!0,depthWrite:!1,blending:r,vertexColors:!0,color:v,opacity:.7})]})}function f({state:t,color:s}
1){const r=a.useRef(null),[n,o]=a.useState(!0);return a.useEffect(()=>{const e=r.current;if(!e||"undefined"==typeof IntersectionObserver)return;let t=!0;const s=()=>o(t&&!document.hidden),n=new IntersectionObserver(e=>{var r;t=(null==(r=e[0])?void 0:r.isIntersecting)??!0,s()},{rootMargin:"200px"});return n.observe(e),document.addEventListener("visibilitychange",s),()=>{n.disconnect(),document.removeEventListener("visibilitychange",s)}},[]),function(){if("undefined"==typeof document||"undefined"==typeof window)return!1;try{const e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch{return!1}}()?e.jsx(p,{section:"Joseph orb 3D",renderFallback:()=>null,children:e.jsx("div",{ref:r,style:{position:"absolute",inset:0,pointerEvents:"none"},children:e.jsx(i,{camera:{position:[0,0,2.6],fov:45},dpr:[1,2],gl:{antialias:!0,alpha:!0,powerPreference:"high-performance",toneMappingExposure:.9},frameloop:n?"always":"never",style:{position:"absolute",inset:0,borderRadius:"50%",pointerEvents:"none"},children:e.jsx(m,{state:t,color:s})})})}):null}export{f 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.