(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13003,e=>{"use strict";var t=e.i(18050),r=e.i(40196);e.s(["PageHead",0,function({icon:e,title:a,subtitle:n,style:i}){let l;return(0,t.jsxs)("div",{style:{background:"var(--surface-soft)",border:"1px solid var(--hairline)",borderRadius:14,padding:"20px 24px",display:"flex",alignItems:"center",gap:"var(--sp-18)",...i},children:[(0,t.jsx)("div",{style:{width:44,height:44,borderRadius:11,background:"var(--accent-soft)",color:"var(--accent-deep)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"string"==typeof e&&e in r.Icons?(l=r.Icons[e],(0,t.jsx)(l,{size:20})):e}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"var(--fs-body)",fontWeight:600,color:"var(--text)",marginBottom:"var(--sp-3)"},children:a}),(0,t.jsx)("div",{style:{fontSize:12.5,color:"var(--text-muted)",lineHeight:1.5},children:n})]})]})}])},44802,e=>{"use strict";var t=e.i(18050),r=e.i(21373),a=e.i(71645);function n(){let e=document.documentElement.getAttribute("data-theme");if("dark"===e)return!0;if("light"===e||"cool"===e)return!1;try{let e=localStorage.getItem("em001-theme");if("dark"===e)return!0;if("light"===e)return!1}catch{}return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(e,t){return 10+Math.min(e.tokens/600,10)+Math.min(1.2*t,4)}let l=`#version 300 es
in vec2 a_pos;
void main() { gl_Position = vec4(a_pos, 0.0, 1.0); }
`,o=`#version 300 es
precision highp float;
out vec4 fragColor;
uniform vec2 u_res;
uniform float u_time;
uniform float u_dark;

// Hash + noise primitives
float hash(vec2 p) {
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
  vec2 i = floor(p);
  vec2 f = fract(p);
  vec2 u = f * f * (3.0 - 2.0 * f);
  return mix(
    mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),
    mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),
    u.y
  );
}
float fbm(vec2 p) {
  float v = 0.0;
  float a = 0.5;
  for (int i = 0; i < 5; i++) {
    v += a * noise(p);
    p *= 2.02;
    a *= 0.5;
  }
  return v;
}

void main() {
  vec2 uv = (gl_FragCoord.xy - 0.5 * u_res) / min(u_res.x, u_res.y);
  float t = u_time * 0.04;

  // Domain-warped fbm for organic nebula / texture
  vec2 q = vec2(fbm(uv * 1.4 + t), fbm(uv * 1.4 - t * 0.7));
  vec2 r = vec2(
    fbm(uv * 2.0 + q + vec2(1.7, 9.2) + 0.15 * t),
    fbm(uv * 2.0 + q + vec2(8.3, 2.8) + 0.13 * t)
  );
  float f = fbm(uv * 1.7 + r);

  // Dark: deep warm brown nebula with amber highlights
  vec3 darkLow  = vec3(0.050, 0.035, 0.020);
  vec3 darkHigh = vec3(0.160, 0.095, 0.045);
  vec3 darkAccent = vec3(0.48, 0.28, 0.10) * smoothstep(0.55, 0.95, f);
  vec3 darkCol = mix(darkLow, darkHigh, clamp(f * 1.5, 0.0, 1.0)) + darkAccent * 0.38;

  // Light: warm cream paper texture (very subtle)
  vec3 lightLow  = vec3(0.961, 0.945, 0.918);
  vec3 lightHigh = vec3(0.933, 0.910, 0.870);
  vec3 lightCol = mix(lightLow, lightHigh, f * 0.45);

  // Vignette — gentle, theme-aware
  float vig = smoothstep(1.1, 0.25, length(uv));
  vec3 col = mix(lightCol, darkCol, u_dark);
  col *= mix(0.94, 1.0, vig);

  fragColor = vec4(col, 1.0);
}
`;function s({isDark:e}){let r=(0,a.useRef)(null),n=(0,a.useRef)(e);return n.current=e,(0,a.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext("webgl2",{antialias:!1,premultipliedAlpha:!1});if(!t)return;let a=(e,r)=>{let a=t.createShader(e);return t.shaderSource(a,r),t.compileShader(a),t.getShaderParameter(a,t.COMPILE_STATUS)||console.warn("shader err",t.getShaderInfoLog(a)),a},i=t.createProgram();t.attachShader(i,a(t.VERTEX_SHADER,l)),t.attachShader(i,a(t.FRAGMENT_SHADER,o)),t.linkProgram(i),t.useProgram(i);let s=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,s),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),t.STATIC_DRAW);let c=t.getAttribLocation(i,"a_pos");t.enableVertexAttribArray(c),t.vertexAttribPointer(c,2,t.FLOAT,!1,0,0);let h=t.getUniformLocation(i,"u_res"),d=t.getUniformLocation(i,"u_time"),u=t.getUniformLocation(i,"u_dark"),f=+!!n.current,p=0,g=performance.now(),m=()=>{let r=Math.min(window.devicePixelRatio||1,2),a=e.clientWidth*r,n=e.clientHeight*r;(e.width!==a||e.height!==n)&&(e.width=a,e.height=n,t.viewport(0,0,a,n))},x=new ResizeObserver(m);x.observe(e),m();let v=()=>{let r=+!!n.current;f+=(r-f)*.08;let a=(performance.now()-g)/1e3;t.uniform2f(h,e.width,e.height),t.uniform1f(d,a),t.uniform1f(u,f),t.drawArrays(t.TRIANGLE_STRIP,0,4),p=requestAnimationFrame(v)};return v(),()=>{cancelAnimationFrame(p),x.disconnect()}},[]),(0,t.jsx)("canvas",{ref:r,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block",pointerEvents:"none"}})}function c({isDark:e}){let r=(0,a.useRef)(null),n=(0,a.useRef)(e);n.current=e;let i=(0,a.useRef)([]);if(0===i.current.length){let e,t=(e=41342,()=>{let t=e=e+0x6d2b79f5>>>0;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/0x100000000});for(let e=0;e<140;e++)i.current.push({x:(t()-.5)*1200,y:(t()-.5)*1200,z:(t()-.5)*800})}return(0,a.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let a=0,l=performance.now(),o=0,s=performance.now(),c=()=>{let t=Math.min(window.devicePixelRatio||1,2),r=e.clientWidth,a=e.clientHeight,n=Math.floor(r*t),i=Math.floor(a*t);(e.width!==n||e.height!==i)&&(e.width=n,e.height=i)},h=new ResizeObserver(c);h.observe(e),c();let d=()=>{let r=Math.min(window.devicePixelRatio||1,2),c=performance.now(),h=Math.min(.05,(c-l)/1e3);l=c,o+=.05*h;let u=(c-s)/1e3,f=n.current,p=f?"rgba(232, 198, 144,":"rgba(106, 69, 40,",g=f?"rgba(245, 220, 175,":"rgba(80, 50, 28,";t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height);let m=.5*e.width,x=.5*e.height,v=Math.min(e.width,e.height)/1400,b=Math.cos(o),y=Math.sin(o),w=i.current,M=[];for(let e=0;e<w.length;e++){let t=w[e],r=8*Math.sin(.3*u+.7*e),a=8*Math.cos(.27*u+1.3*e),n=t.x+r,i=t.y+a,l=t.z,o=n*b-l*y,s=l*b+n*y,c=900/(900+s);M.push({px:m+o*c*v,py:x+i*c*v,pz:s,scale:c,idx:e})}t.lineCap="round";let k=110*r;for(let e=0;e<M.length;e++)for(let a=e+1;a<M.length;a++){let n=M[e],i=M[a],l=n.px-i.px,o=n.py-i.py,s=l*l+o*o;if(s>k*k)continue;let c=1-Math.sqrt(s)/k,h=c*c*.18*((n.scale+i.scale)*.5);h<.012||(t.strokeStyle=p+h.toFixed(3)+")",t.lineWidth=.6*r,t.beginPath(),t.moveTo(n.px,n.py),t.lineTo(i.px,i.py),t.stroke())}for(let e of M)t.fillStyle=g+(.18*e.scale).toFixed(3)+")",t.beginPath(),t.arc(e.px,e.py,1.2*e.scale*r,0,2*Math.PI),t.fill();a=requestAnimationFrame(d)};return a=requestAnimationFrame(d),()=>{cancelAnimationFrame(a),h.disconnect()}},[]),(0,t.jsx)("canvas",{ref:r,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block",pointerEvents:"none",opacity:.9}})}function h({graph:e,layout:r,state:n,isDark:i,zoom:l,hoveredNode:o,onHover:s,onClick:c}){let u=(0,a.useRef)(null),f=(0,a.useRef)(n),p=(0,a.useRef)(r),g=(0,a.useRef)(e),m=(0,a.useRef)(o),x=(0,a.useRef)(l),v=(0,a.useRef)(i);f.current=n,p.current=r,g.current=e,m.current=o,x.current=l,v.current=i;let b=(0,a.useMemo)(()=>{let e=new Map;for(let t of r)e.set(t.name,t);return e},[r]),y=(0,a.useRef)(b);y.current=b;let w=(0,a.useRef)({x:0,y:0,hasMoved:!1}),M=(0,a.useRef)(new Map),k=(0,a.useRef)([]),R=(0,a.useCallback)((e,t)=>{let r=u.current;if(!r)return null;let a=r.getBoundingClientRect(),n=Math.min(window.devicePixelRatio||1,2),i=(e-a.left)*n,l=(t-a.top)*n,o=M.current;for(let e of[...p.current].sort((e,t)=>{let r=o.get(e.name),a=o.get(t.name);return(a?.pz??0)-(r?.pz??0)})){let t=o.get(e.name);if(!t)continue;let r=t.px-i,a=t.py-l,s=(e.r+4)*t.scale*n;if(r*r+a*a<=s*s)return e.name}return null},[]);(0,a.useEffect)(()=>{let e=u.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let r=0,a=performance.now(),n=()=>{let t=Math.min(window.devicePixelRatio||1,2),r=e.clientWidth,a=e.clientHeight,n=Math.floor(r*t),i=Math.floor(a*t);(e.width!==n||e.height!==i)&&(e.width=n,e.height=i)},i=new ResizeObserver(n);i.observe(e),n();let l=performance.now(),o=0,s=0,c=0,h=()=>{let n=Math.min(window.devicePixelRatio||1,2),i=e.clientWidth,u=e.clientHeight,b=v.current,R=x.current,S=f.current,j=p.current,A=g.current,C=m.current,P=performance.now(),z=Math.min(.05,(P-l)/1e3);l=P;let I=(P-a)/1e3;o+=.15*z;let E=.5*e.width,F=.5*e.height,T=(w.current.x*n-E)/e.width*.8,_=(w.current.y*n-F)/e.height*.5;s+=(_-s)*.08,c+=(T-c)*.08;let B=o+c,W=s,L=Math.cos(B),H=Math.sin(B),q=Math.cos(W),D=Math.sin(W),$=b?{soft:"#b89880",mid:"#e8c690",deep:"#f5d8a8"}:{soft:"#C4A98A",mid:"#9E6B47",deep:"#7a4d2e"},N=b?"rgba(255, 240, 215, 1)":"rgba(60, 35, 18, 1)",O=b?"rgba(220, 200, 170, ":"rgba(80, 50, 30, ",U=b?"rgba(245, 216, 168, ":"rgba(158, 107, 71, ",Y=b?"rgba(232, 220, 200, 0.85)":"rgba(40, 30, 20, 0.75)",X=b?"rgba(252, 245, 225, 1)":"rgba(20, 15, 10, 0.98)",G=b?"rgba(0, 0, 0, 0.85)":"rgba(255, 252, 245, 0.9)";t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height);let V=M.current;V.clear();let K=Math.min(i,u)/800*R*n,J=i*n*.5,Q=u*n*.5;for(let e of j){let t=e.x*L-e.z*H,r=e.z*L+e.x*H,a=e.y*q-r*D,n=r*q+e.y*D,i=700/(700+n),l=J+t*i*K,o=Q+a*i*K;V.set(e.name,{px:l,py:o,pz:n,scale:i})}let Z=null;if(C)for(let e of(Z=new Set([C]),A.edges))e.from===C&&Z.add(e.to),e.to===C&&Z.add(e.from);let ee=[];for(let e=0;e<A.edges.length;e++){let t=A.edges[e];(S.reading.has(t.from)||S.reading.has(t.to))&&ee.push(e)}for(let e of ee)k.current.some(t=>t.edgeIdx===e)||k.current.push({edgeIdx:e,progress:0,speed:.5+.3*Math.random(),intensity:1});if(Math.random()<.7*z&&A.edges.length>0){let e=Math.floor(Math.random()*A.edges.length);k.current.push({edgeIdx:e,progress:0,speed:.4+.5*Math.random(),intensity:.7})}t.lineCap="round";for(let e=0;e<A.edges.length;e++){let r=A.edges[e],a=y.current.get(r.from),i=y.current.get(r.to);if(!a||!i)continue;let l=V.get(r.from),o=V.get(r.to);if(!l||!o)continue;let s=S.reading.has(r.from)||S.reading.has(r.to),c=!Z||Z.has(r.from)&&Z.has(r.to),h=(s?.85:.35)*((l.scale+o.scale)*.5),d=c?h:.18*h,u=(l.px+o.px)*.5,f=(l.py+o.py)*.5,p=o.px-l.px,g=o.py-l.py,m=Math.hypot(p,g)||1,x=-g/m,v=p/m,b=Math.min(40,.08*m)*n,w=u+x*b,M=f+v*b;t.strokeStyle=(s?U:O)+d.toFixed(3)+")",t.lineWidth=(s?1.6:.9)*n,t.beginPath(),t.moveTo(l.px,l.py),t.quadraticCurveTo(w,M,o.px,o.py),t.stroke()}let et=[];for(let e of k.current){let r=A.edges[e.edgeIdx];if(!r)continue;let a=V.get(r.from),i=V.get(r.to);if(!a||!i||(e.progress+=z*e.speed,e.progress>=1))continue;let l=e.progress,o=(a.px+i.px)*.5,s=(a.py+i.py)*.5,c=i.px-a.px,h=i.py-a.py,d=Math.hypot(c,h)||1,u=-h/d,f=c/d,p=Math.min(40,.08*d)*n,g=o+u*p,m=s+f*p,x=1-l,v=x*x*a.px+2*x*l*g+l*l*i.px,b=x*x*a.py+2*x*l*m+l*l*i.py,y=a.scale*(1-l)+i.scale*l;for(let r=6;r>=1;r--){let o=Math.max(0,l-.025*r),s=1-o,c=s*s*a.px+2*s*o*g+o*o*i.px,h=s*s*a.py+2*s*o*m+o*o*i.py;t.globalAlpha=(6-r)/6*e.intensity*.35,t.fillStyle=N,t.beginPath(),t.arc(c,h,2.4*y*n,0,2*Math.PI),t.fill()}t.globalAlpha=e.intensity,t.shadowBlur=14*y*n,t.shadowColor=N,t.fillStyle=N,t.beginPath(),t.arc(v,b,3.2*y*n,0,2*Math.PI),t.fill(),t.shadowBlur=0,t.globalAlpha=1,et.push(e)}for(let e of(k.current=et,[...j].sort((e,t)=>{let r=V.get(e.name)?.pz??0;return(V.get(t.name)?.pz??0)-r}))){var er,ea,en,ei;let r=V.get(e.name);if(!r)continue;let a=S.reading.has(e.name),i=S.cited.has(e.name),l=C===e.name,o=!Z||Z.has(e.name),s=(er=e,ea=S,en=b,ei=$,ea.reading.has(er.name)?ei.mid:ea.cited.has(er.name)?ei.deep:ea.recentlyTouched.has(er.name)?ei.soft:er.tags?.[0]==="scratch"?"#fde36b":er.tags?.[0]==="memory"?"#f7d04a":en?er.confidence>=.85?"#d4a574":er.confidence>=.7?"#b89070":"#9e7e64":er.confidence>=.85?"#9E6B47":er.confidence>=.7?"#B89070":"#C4A98A"),c=e.r*r.scale*n;t.globalAlpha=o?1:.22;let h=c*(a?3.4:i||l?2.6:2),u=t.createRadialGradient(r.px,r.py,.5*c,r.px,r.py,h);if(u.addColorStop(0,d(s,a?.6:.34)),u.addColorStop(1,d(s,0)),t.fillStyle=u,t.beginPath(),t.arc(r.px,r.py,h,0,2*Math.PI),t.fill(),a){let e=I%1.4/1.4;t.globalAlpha=(1-e)*.85*(o?1:.22),t.strokeStyle=$.mid,t.lineWidth=1.8*n,t.beginPath(),t.arc(r.px,r.py,c+4*n+18*e*n,0,2*Math.PI),t.stroke(),t.globalAlpha=o?1:.22}i&&!a&&(t.strokeStyle=$.deep,t.lineWidth=1.8*n,t.beginPath(),t.arc(r.px,r.py,c+4*n,0,2*Math.PI),t.stroke()),l&&(t.strokeStyle=b?"rgba(255,250,235,0.55)":"rgba(20,15,10,0.55)",t.lineWidth=1.4*n,t.beginPath(),t.arc(r.px,r.py,c+7*n,0,2*Math.PI),t.stroke()),t.shadowBlur=(a||l?22:10)*n,t.shadowColor=s,t.fillStyle=s,t.beginPath(),t.arc(r.px,r.py,c,0,2*Math.PI),t.fill(),t.shadowBlur=0}for(let e of(t.globalAlpha=1,t.textAlign="center",t.textBaseline="top",j)){let r=V.get(e.name);if(!r)continue;let a=C===e.name,i=S.reading.has(e.name),l=S.cited.has(e.name),o=!Z||Z.has(e.name),s=a||i||l,c=Math.max(0,(r.scale-.55)/.45);if(!s&&c<.1)continue;let h=Math.max(1,.65+.5*R),d=(a?13:11.5)*n*Math.max(.8,r.scale)*h,u=e.r*r.scale*n;t.globalAlpha=(o?1:.35)*(s?1:c),t.font=`${s?700:600} ${d}px "Stack Sans Notch", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`;let f=function(e){if(e.name.startsWith("scratch:")){let t=e.name.slice(8).replace(/\.md$/,"");return t.length>22?`📝 ${t.slice(0,22)}…`:`📝 ${t}`}if(e.name.startsWith("memory:")){let t=e.tags?.[1]??"memory";return t.length>26?t.slice(0,26)+"…":t}return e.name.replace(/\.md$/,"")}(e);t.lineWidth=.7*Math.max(4,.18*d),t.strokeStyle=G,t.strokeText(f,r.px,r.py+u+6*n),t.fillStyle=s?X:Y,t.fillText(f,r.px,r.py+u+6*n)}t.globalAlpha=1,r=requestAnimationFrame(h)};return r=requestAnimationFrame(h),()=>{cancelAnimationFrame(r),i.disconnect()}},[]);let S=(0,a.useCallback)(e=>{let t=u.current;if(t){let r=t.getBoundingClientRect();w.current.x=e.clientX-r.left,w.current.y=e.clientY-r.top,w.current.hasMoved=!0}let r=R(e.clientX,e.clientY);r!==m.current&&s(r)},[R,s]),j=(0,a.useCallback)(()=>{w.current.hasMoved=!1,s(null)},[s]),A=(0,a.useCallback)(e=>{let t=R(e.clientX,e.clientY);t&&c(t)},[R,c]);return(0,t.jsx)("canvas",{ref:u,onMouseMove:S,onMouseLeave:j,onClick:A,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block",cursor:o?"pointer":"default"}})}function d(e,t){if(!e.startsWith("#"))return e;let r=e.slice(1);3===r.length&&(r=r.split("").map(e=>e+e).join(""));let a=parseInt(r,16);return`rgba(${a>>16&255}, ${a>>8&255}, ${255&a}, ${t})`}function u({label:e,onClick:r}){return(0,t.jsx)("button",{onClick:r,style:{width:24,height:24,display:"grid",placeItems:"center",background:"transparent",border:"1px solid var(--hairline)",borderRadius:4,color:"var(--text-muted)",cursor:"pointer",fontSize:"var(--fs-base)",lineHeight:1,padding:0},children:e})}function f({color:e,label:a,pulse:n}){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7},className:"jsx-99c926a8ec979568",children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:e,flexShrink:0,boxShadow:`0 0 8px ${e}`,animation:n?"graph-pulse 1.4s ease-in-out infinite":void 0},className:"jsx-99c926a8ec979568"}),(0,t.jsx)("span",{className:"jsx-99c926a8ec979568",children:a}),(0,t.jsx)(r.default,{id:"99c926a8ec979568",children:"@keyframes graph-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(1.3)}}"})]})}function p({label:e,value:r}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"var(--fs-2xs)",fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--text-subtle)"},children:e}),(0,t.jsx)("div",{style:{fontSize:"var(--fs-base)",fontWeight:600,color:"var(--text)"},children:r})]})}e.s(["ObsidianGraph",0,function({graph:e,state:r,onOpenFile:l,loading:o}){let d=function(){let[e,t]=(0,a.useState)(()=>n());return(0,a.useEffect)(()=>{t(n());let e=new MutationObserver(()=>t(n()));e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let r=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>t(n());return r.addEventListener("change",a),()=>{e.disconnect(),r.removeEventListener("change",a)}},[]),e}(),[g,m]=(0,a.useState)(null),[x,v]=(0,a.useState)(1),b=(0,a.useRef)(null),y=(0,a.useMemo)(()=>e?function(e){let t=new Map;for(let r of e.edges)t.set(r.from,(t.get(r.from)??0)+1),t.set(r.to,(t.get(r.to)??0)+1);let r=[...e.nodes].sort((e,r)=>(t.get(r.name)??0)-(t.get(e.name)??0)),a=[],n=r.length;if(0===n)return a;let l=r[0];a.push({...l,x:0,y:0,z:42,degree:t.get(l.name)??0,r:1.3*i(l,t.get(l.name)??0)});let o=n-1,s=Math.PI*(3-Math.sqrt(5));for(let e=0;e<o;e++){let n=Math.acos(1-2*(1===o?.5:e/(o-1))),l=s*e,c=Math.sin(n)*Math.cos(l),h=Math.sin(n)*Math.sin(l),d=Math.cos(n),u=r[e+1],f=t.get(u.name)??0;a.push({...u,x:280*c,y:280*h,z:280*d,degree:f,r:i(u,f)})}return a}(e):[],[e]);(0,a.useEffect)(()=>{let e=e=>{let t=b.current;if(!t)return;let r=e.target;if(r?.closest?.("[data-graph-zoom-skip]"))return;let a=t.getBoundingClientRect();if(!(e.clientX>=a.left&&e.clientX<=a.right&&e.clientY>=a.top&&e.clientY<=a.bottom))return;e.preventDefault(),e.stopPropagation();let n=e.deltaY<0?1.12:.88;v(e=>Math.max(.5,Math.min(3,e*n)))};return window.addEventListener("wheel",e,{passive:!1,capture:!0}),()=>window.removeEventListener("wheel",e,{capture:!0})},[]);let w=e=>v(t=>Math.max(.5,Math.min(3,t*e)));return((0,a.useEffect)(()=>{v(1)},[e]),o)?(0,t.jsx)("div",{style:{flex:1,display:"grid",placeItems:"center",color:"var(--text-subtle)",fontSize:"var(--fs-ui)",background:"var(--bg)"},children:(0,t.jsx)("span",{style:{animation:"pulse 1.6s ease-in-out infinite"},children:"Loading memory graph…"})}):e&&0!==e.nodes.length?(0,t.jsxs)("div",{ref:b,style:{flex:"1 1 0",minHeight:0,height:"100%",position:"relative",overflow:"hidden",background:"var(--bg)"},children:[(0,t.jsx)(s,{isDark:d}),(0,t.jsx)(c,{isDark:d}),(0,t.jsx)(h,{graph:e,layout:y,state:r,isDark:d,zoom:x,hoveredNode:g,onHover:m,onClick:l}),(0,t.jsxs)("div",{style:{position:"absolute",bottom:16,left:16,display:"flex",flexDirection:"column",gap:5,padding:"9px 11px",background:"color-mix(in oklch, var(--bg-elevated) 80%, transparent)",border:"1px solid var(--hairline)",borderRadius:8,fontSize:"var(--fs-meta)",color:"var(--text-muted)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",pointerEvents:"none"},children:[(0,t.jsx)("div",{style:{fontSize:"var(--fs-2xs)",fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--text-subtle)",marginBottom:1},children:"Memory Graph"}),(0,t.jsx)(f,{color:d?"#e8c690":"#9E6B47",label:"Reading now",pulse:!0}),(0,t.jsx)(f,{color:d?"#f5d8a8":"#7a4d2e",label:"Cited in answer"}),(0,t.jsx)(f,{color:d?"#b89880":"#C4A98A",label:"Recently touched"}),(0,t.jsx)(f,{color:"#fde36b",label:"Working memory"})]}),(0,t.jsxs)("div",{style:{position:"absolute",top:16,right:16,display:"flex",alignItems:"center",gap:14,padding:"7px 13px",background:"color-mix(in oklch, var(--bg-elevated) 80%, transparent)",border:"1px solid var(--hairline)",borderRadius:8,fontSize:"var(--fs-meta)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:[(0,t.jsx)(p,{label:"Files",value:e.nodes.length}),(0,t.jsx)(p,{label:"Links",value:e.edges.length}),(0,t.jsx)("div",{style:{width:1,height:24,background:"var(--hairline)",flexShrink:0}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(u,{label:"−",onClick:()=>w(.8064516129032259)}),(0,t.jsxs)("button",{onClick:()=>v(1),title:"Reset zoom",style:{minWidth:42,padding:"3px 6px",fontSize:"var(--fs-xs)",fontVariantNumeric:"tabular-nums",background:"transparent",border:"1px solid var(--hairline)",borderRadius:4,color:"var(--text-muted)",cursor:"pointer"},children:[Math.round(100*x),"%"]}),(0,t.jsx)(u,{label:"+",onClick:()=>w(1.24)})]})]})]}):(0,t.jsx)("div",{style:{flex:1,display:"grid",placeItems:"center",color:"var(--text-subtle)",fontSize:"var(--fs-ui)",background:"var(--bg)"},children:"No profile files found."})}])},96047,e=>{e.v(t=>Promise.all(["static/chunks/0bxccmji8e-95.js","static/chunks/0lmz7n54xqs.o.js","static/chunks/0wjgj_g8tp..k.js"].map(t=>e.l(t))).then(()=>t(10602)))}]);