agent-runtime-map 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk-DSSKxAlM.js","./react-C8zC5XaP.js"])))=>i.map(i=>d[i]);
2
+ import{a as u,j as t,d as _n}from"./react-C8zC5XaP.js";import{g as Ln,B as Mn,E as $n,H as ae,P as ie,R as Rn,u as Tn,a as An,M as Rt,b as mt,i as On,C as zn,c as Dn}from"./xyflow-CKwy9Fyu.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function s(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(a){if(a.ep)return;a.ep=!0;const r=s(a);fetch(a.href,r)}})();const Pn="modulepreload",Fn=function(e,n){return new URL(e,n).href},gt={},Hn=function(n,s,o){let a=Promise.resolve();if(s&&s.length>0){let w=function(E){return Promise.all(E.map(I=>Promise.resolve(I).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");a=w(s.map(E=>{if(E=Fn(E,o),E in gt)return;gt[E]=!0;const I=E.endsWith(".css"),x=I?'[rel="stylesheet"]':"";if(o)for(let g=c.length-1;g>=0;g--){const S=c[g];if(S.href===E&&(!I||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${E}"]${x}`))return;const p=document.createElement("link");if(p.rel=I?"stylesheet":Pn,I||(p.as="script"),p.crossOrigin="",p.href=E,m&&p.setAttribute("nonce",m),document.head.appendChild(p),I)return new Promise((g,S)=>{p.addEventListener("load",g),p.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${E}`)))})}))}function r(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return a.then(c=>{for(const f of c||[])f.status==="rejected"&&r(f.reason);return n().catch(r)})};const Bn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tt=(...e)=>e.filter((n,s,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===s).join(" ").trim();var Vn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Un=u.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:r,iconNode:c,...f},m)=>u.createElement("svg",{ref:m,...Vn,width:n,height:n,stroke:e,strokeWidth:o?Number(s)*24/Number(n):s,className:Tt("lucide",a),...f},[...c.map(([w,E])=>u.createElement(w,E)),...Array.isArray(r)?r:[r]]));const C=(e,n)=>{const s=u.forwardRef(({className:o,...a},r)=>u.createElement(Un,{ref:r,iconNode:n,className:Tt(`lucide-${Bn(e)}`,o),...a}));return s.displayName=`${e}`,s};const Wn=C("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const At=C("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Ot=C("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const qn=C("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);const Gn=C("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const zt=C("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const yt=C("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Xe=C("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Xn=C("CircleDotDashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);const Dt=C("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);const Pt=C("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const Ft=C("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Yn=C("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);const Ht=C("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);const Bt=C("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);const Kn=C("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);const Zn=C("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);const Vt=C("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);const Jn=C("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);const Qn=C("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);const Ut=C("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const Wt=C("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const qt=C("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const es=C("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);const ts=C("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const ns=C("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);const Gt=C("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const ss=C("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);const as=C("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);const is=C("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);const Xt=C("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const Yt=C("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Ye=190,Ke=154,os={user_action:Zn,entrypoint:qt,process:Ut,workflow:is,ai_process:At,tool:Xt,model:qn,human_gate:as,decision:Ht,data:Pt,external_system:Ft,result:Xe};function rs({data:e,selected:n}){const s=e,o=os[s.nodeType],a=s.detailLevel?` blueprint-node--detail-${s.detailLevel}`:"";return t.jsxs("article",{className:`blueprint-node blueprint-node--${s.nodeType}${a}${n?" is-selected":""}${s.pending?" is-pending":""}`,"data-detail-level":s.detailLevel,children:[t.jsx(ae,{type:"target",position:ie.Left,className:"blueprint-handle"}),t.jsxs("div",{className:"blueprint-node__tile",children:[t.jsx("span",{className:"blueprint-node__type",children:s.typeLabel}),t.jsxs("span",{className:"blueprint-node__confidence",children:[Math.round(s.confidence*100),"%"]}),t.jsx("span",{className:"blueprint-node__icon",children:t.jsx(o,{size:35,strokeWidth:1.75})})]}),t.jsx("h3",{children:s.label}),t.jsx("p",{children:s.description}),t.jsx("small",{children:s.sourceText}),s.sourceDetail&&t.jsxs("div",{className:"blueprint-node__evidence",children:[t.jsx("code",{children:s.sourceDetail}),s.inferenceText&&t.jsx("span",{children:s.inferenceText})]}),s.onFocus&&t.jsx("button",{type:"button",className:"blueprint-node__focus","aria-label":s.focusLabel??`Focus ${s.label}`,title:s.focusLabel??`Focus ${s.label}`,onClick:r=>{r.stopPropagation(),s.onFocus?.()},children:t.jsx(es,{size:13,strokeWidth:2})}),t.jsx(ae,{type:"source",position:ie.Right,className:"blueprint-handle"})]})}function cs({data:e}){const n=e;return t.jsx("section",{className:`blueprint-group blueprint-group--${n.tone}${n.dashed?" is-dashed":""}`,children:t.jsxs("div",{className:"blueprint-group__label",children:[t.jsx("i",{"aria-hidden":"true"}),t.jsx("strong",{children:n.label}),n.detail&&t.jsx("span",{children:n.detail})]})})}var ls=176,ds=88,us={agent:At,database:Pt,external_api:Ft,function:Ot,route:qt,tool:Xt,workflow:Ht};function hs({data:e,selected:n}){const s=e,o=us[s.kind]??Yn;return t.jsxs("article",{className:`blueprint-code-node${n?" is-selected":""}${s.depth===2?" is-deep":""}${s.expanded?" is-expanded":""}`,children:[t.jsx(ae,{type:"target",position:ie.Top,className:"blueprint-code-handle"}),t.jsx("span",{className:"blueprint-code-node__icon",children:t.jsx(o,{size:15,strokeWidth:1.8})}),t.jsxs("span",{className:"blueprint-code-node__body",children:[t.jsx("small",{children:s.kind.replaceAll("_"," ")}),t.jsx("strong",{title:s.label,children:s.label}),t.jsx("code",{title:s.source,children:s.source})]}),s.relation&&t.jsx("i",{children:s.relation}),s.expandable&&s.onToggle&&t.jsx("button",{type:"button",className:"blueprint-code-node__toggle","aria-expanded":s.expanded??!1,"aria-label":s.toggleLabel??(s.expanded?`Collapse ${s.label}`:`Expand ${s.label}`),onClick:a=>{a.stopPropagation(),s.onToggle?.()},children:t.jsx(Gn,{size:12,strokeWidth:2})}),t.jsx(ae,{type:"source",position:ie.Bottom,className:"blueprint-code-handle"})]})}function ps(e){const n=e.data??{},s=e.targetX<e.sourceX,[o,a,r]=n.loopback&&s?fs(e):Ln({sourceX:e.sourceX,sourceY:e.sourceY,sourcePosition:e.sourcePosition,targetX:e.targetX,targetY:e.targetY,targetPosition:e.targetPosition,borderRadius:10}),c=typeof e.markerEnd=="string"?e.markerEnd:void 0;return t.jsxs(t.Fragment,{children:[t.jsx(Mn,{id:e.id,path:o,markerEnd:c,style:e.style}),e.label&&n.labelVisible!==!1&&t.jsx($n,{children:t.jsx("span",{className:"blueprint-playback-edge__label",style:{transform:`translate(-50%, -50%) translate(${a}px, ${r}px)`},children:String(e.label)})}),n.showToken&&t.jsx("circle",{className:"blueprint-playback-edge__token",r:"4",fill:n.tokenColor??"#1689cf",children:t.jsx("animateMotion",{dur:`${n.tokenDuration??.9}s`,repeatCount:"indefinite",path:o})})]})}function fs(e){const n=54+Math.min(120,Math.abs(e.sourceX-e.targetX)*.12),s=Math.min(e.sourceY,e.targetY)-n,o=(e.sourceX+e.targetX)/2;return[[`M ${e.sourceX},${e.sourceY}`,`C ${e.sourceX+40},${e.sourceY} ${e.sourceX+40},${s} ${o},${s}`,`C ${e.targetX-40},${s} ${e.targetX-40},${e.targetY} ${e.targetX},${e.targetY}`].join(" "),o,s]}var fe={overviewMax:.55,evidenceMin:1.15,hysteresis:.06,logicFadeStart:.38,logicFadeEnd:.72,evidenceFadeStart:.94,evidenceFadeEnd:1.36};function ms(e,n){if(!Number.isFinite(e))return"overview";const{overviewMax:s,evidenceMin:o,hysteresis:a}=fe;return n==="overview"&&e<s+a?"overview":n==="evidence"&&e>=o-a?"evidence":n==="logic"?e<s-a?"overview":e<o+a?"logic":"evidence":e<s?"overview":e>=o?"evidence":"logic"}function gs(e){const n=Number.isFinite(e)?e:0,s=wt(fe.logicFadeStart,fe.logicFadeEnd,n),o=wt(fe.evidenceFadeStart,fe.evidenceFadeEnd,n);return{overview:1-s,logic:s,evidence:o}}function wt(e,n,s){const o=Math.min(1,Math.max(0,(s-e)/(n-e)));return o*o*(3-2*o)}function We(e,n=42){if(!e.length)return;const s=Math.min(...e.map(c=>c.position.x)),o=Math.min(...e.map(c=>c.position.y)),a=Math.max(...e.map(c=>c.position.x+(c.width??Ye))),r=Math.max(...e.map(c=>c.position.y+(c.height??Ke)));return{x:s-n,y:o-n,width:a-s+n*2,height:r-o+n*2}}var Kt={runtime:"AGENT RUNTIME",workflows:"AGENT WORKFLOWS",systems:"DATA & SERVICES",nodeCount:e=>`${e} ${e===1?"node":"nodes"}`},ys=[{id:"runtime",types:["entrypoint","process","workflow","ai_process","tool","model","human_gate","decision","data","external_system","result"],labelKey:"runtime",tone:"amber",padding:62,minimumNodes:1},{id:"workflows",types:["process","workflow","ai_process","tool","human_gate","decision"],labelKey:"workflows",tone:"violet",dashed:!0,padding:34,minimumNodes:2},{id:"systems",types:["data","model","external_system"],labelKey:"systems",tone:"cyan",padding:30,minimumNodes:2}];function ws(e,n,s,o=Kt){const a=new Map(n.nodes.map(c=>[c.id,c.type])),r=s?e.filter(c=>s.has(c.id)):e;return ys.flatMap(c=>{const f=r.filter(w=>c.types.includes(a.get(w.id)??"user_action"));if(f.length<c.minimumNodes)return[];const m=We(f,c.padding);return m?[{id:`blueprint_group_${c.id}`,type:"blueprintGroup",position:{x:m.x,y:m.y},data:{label:o[c.labelKey],detail:o.nodeCount(f.length),tone:c.tone,dashed:c.dashed},style:{width:m.width,height:m.height,zIndex:-2},width:m.width,height:m.height,draggable:!1,selectable:!1,connectable:!1,focusable:!1,zIndex:-2}]:[]})}async function xt(e,n){const{default:s}=await Hn(async()=>{const{default:c}=await import("./elk-DSSKxAlM.js").then(f=>f.e);return{default:c}},__vite__mapDeps([0,1]),import.meta.url),a=await new s().layout({id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"RIGHT","elk.spacing.nodeNode":"88","elk.layered.spacing.nodeNodeBetweenLayers":"150","elk.spacing.edgeNode":"42","elk.spacing.edgeEdge":"22","elk.layered.spacing.edgeNodeBetweenLayers":"38","elk.layered.spacing.edgeEdgeBetweenLayers":"18","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.thoroughness":"40","elk.layered.cycleBreaking.strategy":"GREEDY","elk.layered.mergeEdges":"true","elk.edgeRouting":"ORTHOGONAL","elk.portConstraints":"FIXED_SIDE","elk.padding":"[top=90,left=90,bottom=90,right=90]"},children:e.map(c=>({id:c.id,width:c.width??Ye,height:c.height??Ke,layoutOptions:{"elk.portConstraints":"FIXED_SIDE"}})),edges:n.map(c=>({id:c.id,sources:[c.source],targets:[c.target]}))}),r=new Map((a.children??[]).map(c=>[c.id,{x:c.x??0,y:c.y??0}]));return e.map(c=>({...c,position:r.get(c.id)??c.position}))}function bt(e,n,s){if(!e||!n||!n.steps.length)return bs();const o=Math.max(-1,Math.min(s,n.steps.length-1)),a=o>0?n.steps.slice(0,o):[],r=o>=0?n.steps.slice(0,o+1):[],c=o>=0?n.steps[o]:void 0,f=e.diagnostics.filter(N=>N.severity==="error"),m=e.diagnostics.filter(N=>N.severity==="warning"),w=new Set(r.flatMap(N=>N.nodeIds)),E=new Set(r.flatMap(N=>N.incomingEdgeIds)),I=new Set(c?.nodeIds??[]),x=new Set(c?.incomingEdgeIds??[]),p=je(f,"nodeId",w),g=je(f,"edgeId",E),S=je(m,"nodeId",w),j=je(m,"edgeId",E),M=p.size>0||g.size>0,D=o===n.steps.length-1;return{stepIndex:o,completedNodeIds:new Set(a.flatMap(N=>N.nodeIds)),currentNodeIds:I,reachedNodeIds:w,reachedEdgeIds:E,currentEdgeIds:x,errorNodeIds:p,errorEdgeIds:g,warningNodeIds:S,warningEdgeIds:j,halted:M,outcome:o<0?"idle":M?"error":D?"complete":"running"}}function xs(e,n){return e?.steps.length?n>=e.steps.length-1?0:n+1:-1}function je(e,n,s){return new Set(e.flatMap(o=>{const a=o[n];return a&&s.has(a)?[a]:[]}))}function bs(){return{stepIndex:-1,completedNodeIds:new Set,currentNodeIds:new Set,reachedNodeIds:new Set,reachedEdgeIds:new Set,currentEdgeIds:new Set,errorNodeIds:new Set,errorEdgeIds:new Set,warningNodeIds:new Set,warningEdgeIds:new Set,halted:!1,outcome:"idle"}}function Zt(e,n=!1){return e==="error"?{color:"#e5484d",width:3,opacity:1,animated:!1}:e==="warning"?{color:"#d99a24",width:2.7,opacity:1,dash:n?"7 5":void 0,animated:!1}:e==="current"?{color:"#147fc1",width:3,opacity:1,animated:!0}:e==="reached"?{color:"#1f9d72",width:2.4,opacity:1,animated:!1}:e==="outside"?{color:"#a8b0ba",width:1.25,opacity:.16,dash:n?"6 7":void 0,animated:!1}:e==="path"?{color:"#1689cf",width:2,opacity:.72,dash:n?"7 6":void 0,animated:!1}:n?{color:"#626a73",width:1.55,opacity:.72,dash:"6 7",animated:!1}:{color:"#1689cf",width:1.9,opacity:.88,animated:!1}}function Jt(e){switch(e){case"conditional":return{dash:"4 5",loopback:!1,widthScale:.78};case"retry":return{dash:"9 5",color:"#d9822b",loopback:!0,widthScale:.95};case"loop":return{dash:"2 6",color:"#3b7dd8",loopback:!0,widthScale:.9};case"fallback":return{dash:"10 4 3 4",color:"#e5484d",loopback:!1,widthScale:.9};case"human_approval":return{dash:"12 4",color:"#8b5cf6",loopback:!1,widthScale:1};case"parallel":return{dash:"14 4",loopback:!1,widthScale:.9};default:return{loopback:!1,widthScale:1}}}function vs(e){return e.hovered||e.selected?!0:!!(e.playing&&e.state==="current")}function js({data:e,selected:n}){const s=e,o=s.memberCount>1;return t.jsxs("div",{className:`blueprint-overview blueprint-overview--${s.role}${n?" is-selected":""}${o?" is-aggregate":""}`,onDoubleClick:s.onOpen,children:[t.jsx(ae,{type:"target",position:ie.Left,className:"blueprint-handle"}),s.featureLabel&&t.jsx("p",{className:"blueprint-overview__feature",children:s.featureLabel}),t.jsx("p",{className:"blueprint-overview__label",children:s.label}),o&&t.jsx("p",{className:"blueprint-overview__counts",children:s.countsLabel??`${s.memberCount} steps · ${s.routeCount} routes`}),o&&s.onOpen&&t.jsx("button",{type:"button",className:"blueprint-overview__open",onClick:s.onOpen,"aria-label":s.openLabel??s.label,children:s.openLabel??"Open"}),t.jsx(ae,{type:"source",position:ie.Right,className:"blueprint-handle"})]})}var ks={entrypoint:"entry",user_action:"entry",process:"stage",workflow:"stage",ai_process:"capability",model:"capability",tool:"capability",human_gate:"stage",decision:"stage",data:"io",external_system:"io",result:"result"},vt=["entry","stage","capability","io","result"],Ns=new Set(["entry","result"]),Ss={stage:"Steps",capability:"Agents & tools",io:"Data & services",shared:"Shared"};function Es(e,n){return/[\u3400-\u9fff]/.test(e)?`${e}${n}`:`${e} ${n.toLowerCase()}`}function Cs(e,n={},s={}){const o={...Ss,...n},a=p=>s.nodeLabel?.(p)??p.label,r=new Map(e.nodes.map(p=>[p.id,p])),c=new Map;for(const p of e.features)for(const g of p.nodeIds){const S=c.get(g)??[];S.includes(p.id)||S.push(p.id),c.set(g,S)}const f=p=>{const g=ks[p.type]??"stage",S=c.get(p.id)??[];return Ns.has(g)||S.length===0?{key:`single:${p.id}`,role:g,featureId:S[0]}:S.length>1?{key:`shared:${g}`,role:g}:{key:`${S[0]}:${g}`,role:g,featureId:S[0]}},m=new Map;for(const p of e.nodes){const{key:g,role:S,featureId:j}=f(p),M=m.get(g)??{role:S,featureId:j,members:[]};M.members.push(p),m.set(g,M)}const w=new Map(e.features.map(p=>[p.id,s.featureLabel?.(p.id,p.label)??p.label])),E=[...m.entries()].map(([p,g])=>{const S=g.members.map(R=>R.id),j=[...new Set(g.members.map(R=>R.type))],M=g.members.length===1?g.members[0]:void 0,D=p.startsWith("shared:"),N=g.role==="capability"?o.capability:g.role==="io"?o.io:o.stage;return{id:p,role:g.role,featureId:g.featureId,featureLabel:g.featureId?w.get(g.featureId):void 0,singleNodeId:M?.id,label:M?a(M):D?Es(o.shared,N):N,memberIds:S,types:j,routeCount:Is(e,S)}}),I=new Map;for(const[p,g]of m)for(const S of g.members)I.set(S.id,p);const x=new Map;for(const p of e.edges){const g=I.get(p.source),S=I.get(p.target);if(!g||!S||g===S)continue;const j=`bus:${g}->${S}`,M=x.get(j),D=(M?.dataFlow??!1)||p.type==="data_flow"||r.get(p.target)?.type==="data";x.set(j,{id:j,source:g,target:S,edgeIds:[...M?.edgeIds??[],p.id],control:_s(M?.control,p.control),dataFlow:D})}return{nodes:E.sort((p,g)=>vt.indexOf(p.role)-vt.indexOf(g.role)||p.label.localeCompare(g.label)),edges:[...x.values()]}}function Is(e,n){const s=new Set(n);let o=0;for(const a of e.features)for(const r of a.variants)r.nodeIds.some(c=>s.has(c))&&(o+=1);return o}var jt=["human_approval","retry","fallback","loop","parallel","conditional","sequential"];function _s(e,n){return e?n?jt.indexOf(e)<=jt.indexOf(n)?e:n:e:n}const Ls=2;function Ms(e,n,s,o={}){const a=o.kindLabel??(y=>y),r=o.relationLabel??(y=>y),c=o.limit??9,f=o.secondLevelLimit??5,m=new Map(s.nodes.map(y=>[y.id,y])),w=e.rawNodeIds.filter(y=>m.has(y)),E=Nt(w,s,m),I=St([...w,...E]).sort((y,O)=>Ne(m.get(y))-Ne(m.get(O))).slice(0,c),x=new Set(I),p=[...o.expandedRawIds??[]].filter(y=>x.has(y)),g=St(Nt(p,s,m)).filter(y=>!x.has(y)&&m.has(y)).sort((y,O)=>Ne(m.get(y))-Ne(m.get(O))).slice(0,f),S=[...I,...g],j=new Set(S),M=y=>x.has(y)?1:2,D=Math.min(3,Math.max(1,S.length)),N=(D-1)*196/2,R=new Map;for(const y of s.edges)!j.has(y.source)||!j.has(y.target)||R.has(y.target)||R.set(y.target,r(y.kind));const A=S.flatMap((y,O)=>{const X=m.get(y);if(!X)return[];const V=O%D,K=Math.floor(O/D),oe=M(y);return[{id:Be(e.id,y),type:"codeDetail",position:{x:n.position.x+7+V*196-N,y:n.position.y+220+K*112},data:{label:X.name,kind:a(X.kind),source:Ds(X),relation:R.get(y),depth:oe,expandable:oe<Ls,expanded:o.expandedRawIds?.has(y)??!1},width:ls,height:ds,draggable:!1,connectable:!1,className:`detail-node-enter detail-node--depth-${oe}`,zIndex:3}]}),F=s.edges.flatMap(y=>!j.has(y.source)||!j.has(y.target)?[]:[{id:`detail-edge:${e.id}:${y.id}`,source:Be(e.id,y.source),target:Be(e.id,y.target),type:"smoothstep",label:r(y.kind),className:"detail-edge detail-edge-enter",style:{stroke:"#8293a2",strokeWidth:1.15,strokeDasharray:"4 5",opacity:.72},labelStyle:{fill:"#7b8794",fontSize:7}}]),ge=new Set(F.map(y=>y.target)),ee=A.filter(y=>w.includes(zs(y.id))&&!ge.has(y.id)),ye=(ee.length?ee:A.slice(0,1)).map((y,O)=>({id:`detail-anchor:${e.id}:${O}`,source:e.id,target:y.id,type:"smoothstep",className:"detail-edge detail-edge-enter",style:{stroke:"#4b9dcc",strokeWidth:1.45,strokeDasharray:"3 4",opacity:.78}}));return{nodes:A,edges:[...ye,...F]}}function $s(e,n){const s=new Map;for(const r of e){const c=s.get(r.source);c?c.push(r.target):s.set(r.source,[r.target])}const o=new Set([n]),a=[n];for(;a.length;){const r=a.shift();for(const c of s.get(r)??[])o.has(c)||(o.add(c),a.push(c))}return o}function Rs(e,n){return e.some(s=>s.source===n)}function Ts(e,n,s){const o=n.trim().toLowerCase();return o?new Set(e.filter(a=>{const r=s(a);return[r.label,r.description,a.label,...a.sources.map(f=>f.file)].join(" ").toLowerCase().includes(o)}).map(a=>a.id)):new Set(e.map(a=>a.id))}function As(e,n){return{...kt(e?.nodeIds??[],n?.nodeIds??[],"NodeIds"),...kt(e?.edgeIds??[],n?.edgeIds??[],"EdgeIds")}}function ke(e){return Object.fromEntries(e.map(n=>[n.id,{x:n.position.x,y:n.position.y}]))}function He(e,n){return n?e.map(s=>n[s.id]?{...s,position:n[s.id]}:s):e}function Os(e){if(e)try{const n=JSON.parse(e);if(!n||typeof n!="object"||Array.isArray(n))return;const s=Object.entries(n).filter(o=>{const a=o[1];return Number.isFinite(a?.x)&&Number.isFinite(a?.y)});return Object.fromEntries(s)}catch{return}}function kt(e,n,s){const o=new Set(e),a=new Set(n);return{[`entering${s}`]:new Set(n.filter(r=>!o.has(r))),[`exiting${s}`]:new Set(e.filter(r=>!a.has(r))),[`shared${s}`]:new Set(n.filter(r=>o.has(r)))}}function Nt(e,n,s){const o=new Set(e);return n.edges.flatMap(a=>{if(!o.has(a.source))return[];const r=s.get(a.target);return r&&r.kind!=="file"&&r.kind!=="entrypoint"?[a.target]:[]})}function Be(e,n){return`detail:${e}:${n}`}function Ve(e){const n=e.split(":");if(!(n[0]!=="detail"||n.length<3))return{logicId:n[1],rawId:n.slice(2).join(":")}}function zs(e){return e.split(":").slice(2).join(":")}function Ds(e){const n=e.evidence[0]?.source;return n?`${n.file}:${n.startLine}`:e.qualifiedName??e.name}function Ne(e){return e?{agent:0,workflow:1,function:2,tool:3,route:4,service:5,model:6,database:7,external_api:8,prompt:9,class:10,entrypoint:11,file:12}[e.kind]??20:30}function St(e){return[...new Set(e)]}const Qt="agent-runtime-map.locale",Ps={runtimeLogic:"Runtime logic",productLogic:"Product logic",generated:"Generated",projectMap:"PROJECT MAP",logicNodes:"logic nodes",flows:"flows",files:"files",search:"Find logic or source…",clearSearch:"Clear search",nodeTypes:"NODE TYPES",staticAnalysis:"Evidence-backed static analysis",logicGraph:"Logic graph",selectedLogic:"SELECTED LOGIC",closeEvidence:"Close evidence",confidence:"Confidence",sourceEvidence:"SOURCE EVIDENCE",selectedCode:"SELECTED CODE",focusStep:"Focus",focusHint:"Showing this step and everything below it.",exitFocus:"Back to the whole system",detailTerminal:"Deepest level shown. Use the breadcrumb to step back.",expandDetail:"Expand",collapseDetail:"Collapse",productContext:"PRODUCT CONTEXT",productMatch:"Match",productCodeOnly:"Read from code only. Nothing the project writes about itself was matched to this step.",productMatchedOn:"Matched on",lines:"Lines",rawReferences:"Raw references",loadingTitle:"Compiling the view",loadingDescription:"Loading the evidence-backed logic graph…",errorTitle:"Graph unavailable",errorHint:"Run agent-runtime-map analyze . and restart the viewer.",loadError:"Could not load graph.json",switchLanguage:"切换到中文",featureCircuits:"FEATURE CIRCUITS",featureHint:"Choose a feature to simulate its code-backed route on the full Agent graph.",wholeSystem:"Whole system",features:"features",healthy:"Healthy",warning:"Needs review",chainError:"Chain error",choosePath:"EXECUTION PATH",chainCheck:"CHAIN CHECK",play:"Play",pause:"Pause",nextStep:"Next step",replay:"Replay",speed:"Speed",ready:"Ready to inspect",running:"Checking chain",completed:"Chain verified",stopped:"Stopped at error",step:"Step",diagnostics:"DIAGNOSTICS",noDiagnostics:"No deterministic chain problems found.",recommendation:"Suggested fix",selectFeature:"Select a feature to inspect its execution route.",globalView:"All nodes and dependencies",viewMode:"How to read the map",businessView:"Business",technicalView:"Technical",pendingBadge:"Unconfirmed",nameSource:"Name derived from",technicalDetails:"Technical details",overviewHint:"Grouped view · open a group for its real steps",openAggregate:"Open",overviewStage:"Steps",overviewCapability:"Agents & tools",overviewIo:"Data & services",overviewShared:"Shared",zoomLevel:"VIEW LEVEL",semanticZoomHint:"Scroll to move between overview, logic, and source evidence.",expandDetails:"Expand code details",collapseDetails:"Collapse code details",detailHint:"Double-click a logic node to inspect its code-backed internals.",cameraFollow:"Follow execution",cameraFollowing:"Following",resumeFollow:"Resume follow",layout:"LAYOUT",undoLayout:"Undo move",resetLayout:"Reset layout",pinnedNodes:"pinned",sourceCode:"SOURCE CODE",sourceUnavailable:"Source preview is unavailable for this map.",loadingSource:"Loading source…",openSource:"Open source",searchResults:"SEARCH RESULTS",noSearchResults:"No matching logic or source found.",result:"result"},Fs={runtimeLogic:"运行逻辑",productLogic:"产品逻辑",generated:"生成于",projectMap:"项目逻辑图",logicNodes:"逻辑节点",flows:"逻辑流",files:"代码文件",search:"搜索逻辑或源文件…",clearSearch:"清除搜索",nodeTypes:"节点类型",staticAnalysis:"基于代码证据的静态分析",logicGraph:"逻辑图",selectedLogic:"当前逻辑节点",closeEvidence:"关闭证据面板",confidence:"置信度",sourceEvidence:"源码证据",selectedCode:"选中的代码",focusStep:"聚焦",focusHint:"只显示这一步及其下游。",exitFocus:"返回全局系统",detailTerminal:"已到最深一层,可用面包屑返回。",expandDetail:"展开",collapseDetail:"收起",productContext:"产品语境",productMatch:"匹配度",productCodeOnly:"仅来自代码。项目自述中没有内容与这一步匹配。",productMatchedOn:"匹配依据",lines:"代码行",rawReferences:"原始节点引用",loadingTitle:"正在编译逻辑图",loadingDescription:"正在加载基于代码证据的逻辑图…",errorTitle:"无法加载逻辑图",errorHint:"请运行 agent-runtime-map analyze . 后重新启动 Viewer。",loadError:"无法加载 graph.json",switchLanguage:"Switch to English",featureCircuits:"功能电路",featureHint:"选择一个功能,在完整 Agent 图上模拟它的代码执行路线。",wholeSystem:"全局系统",features:"个功能",healthy:"链路正常",warning:"需要确认",chainError:"链路错误",choosePath:"执行路径",chainCheck:"链路检查",play:"播放",pause:"暂停",nextStep:"下一步",replay:"重新检查",speed:"速度",ready:"等待检查",running:"正在检查链路",completed:"链路检查通过",stopped:"已在错误处停止",step:"步骤",diagnostics:"诊断结果",noDiagnostics:"未发现确定性的链路问题。",recommendation:"修复建议",selectFeature:"请选择一个功能,检查它的执行路线。",globalView:"显示全部节点与依赖",viewMode:"阅读方式",businessView:"业务",technicalView:"技术",pendingBadge:"待确认",nameSource:"名称来源",technicalDetails:"技术详情",overviewHint:"聚合视图 · 展开分组查看真实步骤",openAggregate:"展开",overviewStage:"处理步骤",overviewCapability:"智能体与工具",overviewIo:"数据与外部服务",overviewShared:"共用",zoomLevel:"查看层级",semanticZoomHint:"滚轮缩放可切换全局、逻辑与源码证据。",expandDetails:"展开代码细节",collapseDetails:"收起代码细节",detailHint:"双击逻辑节点,查看有源码证据支撑的内部调用。",cameraFollow:"跟随执行",cameraFollowing:"正在跟随",resumeFollow:"继续跟随",layout:"布局",undoLayout:"撤销移动",resetLayout:"重置布局",pinnedNodes:"已固定",sourceCode:"源代码",sourceUnavailable:"此逻辑图暂时无法读取源码预览。",loadingSource:"正在读取源码…",openSource:"打开源码",searchResults:"搜索结果",noSearchResults:"未找到匹配的逻辑或源码。",result:"条结果"},Hs={en:{user_action:"USER ACTION",entrypoint:"ENTRYPOINT",process:"PROCESS",workflow:"WORKFLOW",ai_process:"AI PROCESS",tool:"TOOL",model:"MODEL",human_gate:"HUMAN GATE",decision:"DECISION",data:"DATA",external_system:"EXTERNAL",result:"RESULT"},"zh-CN":{user_action:"用户操作",entrypoint:"系统入口",process:"处理过程",workflow:"工作流",ai_process:"AI 处理",tool:"工具",model:"模型",human_gate:"人工审批",decision:"逻辑判断",data:"数据",external_system:"外部系统",result:"运行结果"}},Et={agent:"智能体",approve:"批准",apply:"应用",analyze:"分析",billing:"计费",build:"构建",canonical:"标准",compile:"编译",content:"内容",create:"创建",data:"数据",decision:"决策",document:"文档",draft:"草稿",enqueue:"加入队列",execute:"执行",final:"最终",fast:"快速",generate:"生成",generation:"生成",handle:"处理",idea:"灵感",ideas:"灵感",import:"导入",index:"建立索引",knowledge:"知识",lock:"锁定",logic:"逻辑",map:"图",model:"模型",order:"订单",parse:"解析",plan:"计划",process:"处理",publish:"发布",publishing:"发布",quality:"高质量",production:"生产",prompt:"提示词",prompts:"提示词",protected:"受保护",provider:"供应商",record:"记录",refund:"退款",request:"请求",result:"结果",revise:"修改",review:"审核",run:"运行",save:"保存",scene:"场景",score:"评分",script:"脚本",service:"服务",specs:"规格",story:"故事",submission:"提交",submit:"提交",sync:"同步",tool:"工具",version:"版本",video:"视频",workflow:"工作流"};function Bs(e){const n=e??{search:typeof window>"u"?void 0:window.location.search,stored:typeof window>"u"?null:Vs(Qt),languages:typeof navigator>"u"?[]:navigator.languages},s=Ct(new URLSearchParams(n.search??"").get("locale"));if(s)return s;const o=Ct(n.stored??null);return o||((n.languages??[]).some(a=>a.toLowerCase().startsWith("zh"))?"zh-CN":"en")}function Vs(e){try{return window.localStorage.getItem(e)}catch{return null}}function Us(e,n){const s=typeof window>"u"?void 0:window.localStorage;try{s?.setItem(Qt,e)}catch{}}function q(e){return e==="zh-CN"?Fs:Ps}function qe(e,n){return Hs[n][e]}function Ws(e,n){return n==="zh-CN"?`${e} 处源码证据`:`${e} source${e===1?"":"s"}`}function qs(e,n){return n==="en"?e.title:`${e.project.name} ${e.graphType==="runtime_logic"?"运行逻辑":"产品逻辑"}`}function Gs(e,n){return n==="en"?e.description:e.description==="A static, evidence-backed view of how work flows through the codebase."?"基于静态代码证据,展示任务如何在项目中流转。":e.description==="A code-informed view of how user actions become product value."?"基于代码结构,展示用户操作如何形成最终产品价值。":e.description}function me(e,n,s){if(n==="en")return{label:e.label,description:e.description};const o=typeof e.metadata?.rawName=="string"?e.metadata.rawName:e.label,a=e.metadata?.rawKind,r=a==="route"||a==="external_api"?e.label:Ge(o)??e.label;if(!(e.metadata?.generatedDescription===!0))return{label:r,description:e.description};const f=Js(e.behavior,w=>{const E=s?.get(w);return E?me(E,n).label:w});if(f)return{label:r,description:f};const m={user_action:`用户发起“${r}”。`,entrypoint:`系统通过 ${r} 接收任务。`,process:`系统执行“${r}”。`,workflow:`工作流编排“${r}”。`,ai_process:`AI 工作流执行“${r}”。`,tool:`智能体调用工具“${r}”。`,model:`智能体使用模型 ${r}。`,human_gate:`人工审核或批准“${r}”。`,decision:`系统判断“${r}”。`,data:`系统读取或更新“${r}”。`,external_system:`系统与 ${r} 通信。`,result:`流程产出“${r}”。`};return{label:r,description:m[e.type]}}function Xs(e){const n=q(e);return{stage:n.overviewStage,capability:n.overviewCapability,io:n.overviewIo,shared:n.overviewShared}}function Ys(e,n,s){return e==="zh-CN"?`${n} 个步骤 · ${s} 条路线`:`${n} steps · ${s} routes`}function Ks(e){return e==="en"?Kt:{runtime:"智能体运行时",workflows:"智能体工作流",systems:"数据与外部服务",nodeCount:n=>`${n} 个节点`}}const Zs=4;function Js(e,n){if(!e)return;const s=a=>Qs(a.map(n)),o=[e.calls.length?`调用${s(e.calls)}`:void 0,e.branches.length?`按条件分支到${s(e.branches)}`:void 0,e.requests.length?`请求${s(e.requests)}`:void 0,e.data.length?`读写${s(e.data)}`:void 0,e.feeds.length?`结果流向${s(e.feeds)}`:void 0].filter(a=>!!a);return o.length?`${o.join(",")}。`:void 0}function Qs(e){const n=e.slice(0,Zs).map(o=>`“${o}”`),s=e.length-n.length;return n.join("、")+(s>0?`等 ${e.length} 项`:"")}function en(e,n){return n==="en"?e:{deterministic:"确定性分析",heuristic:"启发式分析",llm:"LLM 语义分析",mixed:"混合分析"}[e]}function ea(e,n){const s=e.matchedTerms.map(a=>`“${a}”`).join("、"),o=e.matchedTerms.map(a=>`"${a}"`).join(", ");return n==="en"?{documented_name:`the documented name ${o}`,documented_terms:`the documented terms ${o}`,entry_terms:`terms shared with this feature's entry point${o?`: ${o}`:""}`,step_terms:`terms shared with steps in this feature${o?`: ${o}`:""}`}[e.matchedOn]:{documented_name:`文档中的名称 ${s}`,documented_terms:`文档中的术语 ${s}`,entry_terms:`与该功能入口共有的术语${s?`:${s}`:""}`,step_terms:`与该功能步骤共有的术语${s?`:${s}`:""}`}[e.matchedOn]}function ta(e,n){const s={readme:"From the README",prd:"From the product spec",docs:"From project documentation",prompt:"From an Agent prompt",config:"From the project config",user:"Provided by you"};return n==="en"?s[e]:{readme:"来自 README",prd:"来自产品文档",docs:"来自项目文档",prompt:"来自 Agent 提示词",config:"来自项目配置",user:"由你提供"}[e]}function na(e,n){const s=q(n);return e==="healthy"?s.healthy:e==="warning"?s.warning:s.chainError}function sa(e,n,s){if(s==="en")return e.label;const o=e.label.match(/^(?:GET|POST|PUT|PATCH|DELETE)\s+(.+)$/i);if(o){const r=o[1].split("/").filter(Boolean).at(-1),c=r&&Ge(r);if(c)return c}const a=n.nodes.find(r=>r.label===e.label);return a?me(a,s).label:Ge(e.label)??e.label}function tn(e,n,s){const o=e.label.match(/^Path (\d+)/)?.[1],a=o&&e.resultNodeId?n.nodes.find(r=>r.id===e.resultNodeId):void 0;if(a?.semantic){const r=G(a,s).label;return s==="zh-CN"?`分支 ${o} · 至${r}`:`Path ${o} · to ${r}`}return aa(e,n,s)}function aa(e,n,s){if(s==="en")return e.label;if(e.label==="All paths")return"全部路径";if(e.label==="Default path")return"默认路径";const o=e.label.match(/^Path (\d+)(?: · (.+))?$/);if(!o)return e.label;const a=n.nodes.find(c=>c.label===o[2]),r=a?me(a,s).label:o[2];return`路径 ${o[1]}${r?` · ${r}`:""}`}function ia(e,n,s){if(s==="en")return{message:e.message,suggestion:e.suggestion};const o=e.nodeId?n.nodes.find(c=>c.id===e.nodeId):void 0,a=o?G(o,s).label:"当前步骤";return{CHAIN_BROKEN_REFERENCE:{message:`${a} 引用了逻辑图中不存在的节点。`,suggestion:"检查此处无法解析的调用、导入关系或生成的连线。"},CHAIN_CYCLE:{message:`${a} 所在链路形成循环,无法确认是否能正常退出。`,suggestion:"检查循环退出条件,或增加一个明确的结束路径。"},CHAIN_LOW_CONFIDENCE:{message:`${a} 的识别置信度为 ${Math.round(e.confidence*100)}%。`,suggestion:"确认调用关系,或使用更清晰的 workflow、agent、tool、service 命名。"},CHAIN_NO_DOWNSTREAM:{message:`${a} 没有可解析的下游执行步骤。`,suggestion:"检查入口是否调用了工作流、Agent、服务或工具。"},CHAIN_NO_RESULT:{message:"分析器没有找到这个功能的结束结果。",suggestion:"补充或暴露 return、持久化、响应或交接节点。"},CHAIN_PATH_LIMIT:{message:"功能链路超过当前可模拟的节点、分支或深度上限。",suggestion:"增强逻辑压缩,或把功能拆分成明确的工作流。"},CHAIN_EXTERNAL_NO_FALLBACK:{message:`${a} 调用了外部系统,但没有识别到降级备选路径。`,suggestion:"为外部调用增加异常处理、重试上限或降级路径。"},CHAIN_RETRY_WITHOUT_LIMIT:{message:`${a} 包含重试链路,但没有识别到明确上限。`,suggestion:"配置最大重试次数、退避策略和失败出口。"},CHAIN_AGENT_NO_OUTPUT:{message:`${a} 没有可识别的结构化输出或下游交接。`,suggestion:"声明返回类型、输出 Schema、持久化或下一个工作流步骤。"}}[e.code]}function Ct(e){if(!e)return;const n=e.toLowerCase();if(n==="en"||n.startsWith("en-"))return"en";if(n==="zh"||n.startsWith("zh-"))return"zh-CN"}function Ge(e){const n=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").trim().toLowerCase().split(/\s+/).filter(s=>s&&!["agent","controller","handler","service"].includes(s));if(!(!n.length||n.some(s=>!Et[s])))return n.map(s=>Et[s]).join("")}function nn(e,n){const s=e.labelSource?.[n];return s===void 0?e.pending===!0:s==="pending"}function G(e,n,s){const o=e.semantic;if(o){const r=n==="zh-CN"?"zh-CN":"en";return{label:o.label[r],description:o.description[r],technicalName:o.technicalName,pending:nn(o,r),confidence:o.confidence[r],source:o.labelSource?.[r]}}const a=me(e,n,s);return{label:a.label,description:a.description,technicalName:typeof e.metadata?.rawName=="string"?e.metadata.rawName:e.label,pending:!1,confidence:e.confidence}}function Se(e,n,s){const o=e.semantic;if(o){const a=s==="zh-CN"?"zh-CN":"en";return{label:o.label[a],description:o.description[a],pending:nn(o,a)}}return{label:sa(e,n,s),description:e.description,pending:!1}}function oa(e,n){const s=e.semantic;if(s)return s.label[n==="zh-CN"?"zh-CN":"en"]}function ra(e,n){return(n==="zh-CN"?{config:"项目配置指定",documented:"项目文档描述",docstring:"代码注释",route:"路由地址",vendor:"外部服务名称",identifier:"代码标识符",composed:"由链路组合",pending:"证据不足,待确认"}:{config:"Stated in project config",documented:"Documented capability",docstring:"Code docstring",route:"Route address",vendor:"Vendor name",identifier:"Read from the identifier",composed:"Composed from the chain",pending:"Not enough evidence"})[e??""]??(n==="zh-CN"?"未知来源":"Unknown")}const ca={"zh-CN":{entrypoint:"入口",file:"文件",function:"函数",class:"类",route:"路由",service:"服务",agent:"智能体",workflow:"工作流",tool:"工具",model:"模型",prompt:"提示词",human_gate:"人工确认",database:"数据存储",external_api:"外部服务"},en:{entrypoint:"entrypoint",file:"file",function:"function",class:"class",route:"route",service:"service",agent:"agent",workflow:"workflow",tool:"tool",model:"model",prompt:"prompt",human_gate:"human gate",database:"data store",external_api:"external service"}},la={"zh-CN":{contains:"包含",imports:"导入",calls:"调用",data_flow:"数据流转",handles:"处理",reads:"读取",writes:"写入",requests:"请求"},en:{contains:"contains",imports:"imports",calls:"calls",data_flow:"data flow",handles:"handles",reads:"reads",writes:"writes",requests:"requests"}};function da(e,n){return ca[n][e]??e}function ua(e,n){return la[n][e]??e}const ha={logic:rs,blueprintGroup:cs,codeDetail:hs,overview:js},It=250,_t=108,pa={playback:ps},fa="agent-runtime-map.layout.v1",Lt="agent-runtime-map.view.v1";function ma(){return t.jsx(Rn,{children:t.jsx(ga,{})})}function ga(){const[e,n]=u.useState(),[s,o]=u.useState(),[a,r]=u.useState([]),[c,f]=u.useState(),[m,w]=u.useState(),[E,I]=u.useState(),[x,p]=u.useState(),[g,S]=u.useState(!1),[j,M]=u.useState(new Set),[D,N]=u.useState(new Set),[R,A]=u.useState(),[F,ge]=u.useState(),ee=u.useRef(null),ye=u.useCallback(i=>{N(d=>{const l=new Set(d);return l.has(i)?l.delete(i):l.add(i),l})},[]),[y,O]=u.useState(-1),[X,V]=u.useState(!1),[K,oe]=u.useState(1),[Ee,te]=u.useState(!0),[re,Ze]=u.useState(""),[Je,Qe]=u.useState(),[et,on]=u.useState(),[k,rn]=u.useState(Bs),[Ce,cn]=u.useState("logic"),[ln,tt]=u.useState(!1),[Ie,_e]=u.useState(new Set),[ce,nt]=u.useState([]),[Le,st]=u.useState(),[Z,dn]=u.useState(()=>typeof window>"u"?"business":window.localStorage.getItem(Lt)==="technical"?"technical":"business"),[Me,at]=u.useState(),[it,$e]=u.useState([]),[un,hn]=u.useState(0),we=u.useRef(null),Re=u.useRef("logic"),J=u.useRef(a),Te=u.useRef(void 0),ot=u.useRef(void 0),le=u.useRef(void 0),de=u.useRef(void 0),T=u.useMemo(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),{fitView:ne,getNode:rt,setCenter:se}=Tn(),ct=An(),v=q(k),Ae=e?.features??[],$=Ae.find(i=>i.id===m),_=$?.variants.find(i=>i.id===E)??$?.variants[0],lt=$?.variants.find(i=>i.id===x),P=u.useMemo(()=>bt($,_,y),[$,_,y]),Q=u.useMemo(()=>g?As(lt,_):void 0,[g,lt,_]),Y=e?`${fa}:${e.project.root}:${e.graphType}`:void 0;u.useEffect(()=>{J.current=a},[a]),u.useEffect(()=>()=>{le.current&&window.clearTimeout(le.current),de.current&&window.clearTimeout(de.current)},[]),u.useEffect(()=>{document.documentElement.lang=k,document.title=k==="zh-CN"?"Agent Runtime Map · 智能体运行逻辑图":"Agent Runtime Map"},[k]);const xe=u.useCallback(()=>{fetch("./graph.json",{cache:"no-store"}).then(async i=>{if(!i.ok)throw new Error(`graph.json (${i.status})`);return await i.json()}).then(i=>{n(i),fetch("./raw-graph.json",{cache:"no-store"}).then(d=>d.ok?d.json():void 0).then(d=>d&&o(d)).catch(()=>{})}).catch(i=>on(i instanceof Error?i.message:String(i)))},[]);u.useEffect(()=>{const i=window;if(i.__ARM_GRAPH__){n(i.__ARM_GRAPH__),i.__ARM_RAW_GRAPH__&&o(i.__ARM_RAW_GRAPH__);return}xe()},[xe]),u.useEffect(()=>{let i=!1,d;const l=window.setInterval(()=>{fetch("./manifest.json",{cache:"no-store"}).then(async h=>{if(i)return;if(!h.ok)throw new Error("no manifest");const b=await h.json();if(b.buildId){if(d===void 0){d=b.buildId;return}b.buildId!==d&&(d=b.buildId,xe())}}).catch(()=>{window.clearInterval(l)})},2e3);return()=>{i=!0,window.clearInterval(l)}},[xe]),u.useEffect(()=>{if(!e)return;const i=new Map(e.nodes.map(h=>[h.id,h])),d=e.nodes.map(h=>ba(h,k,i,Z)),l=e.edges.map(h=>Mt(h,"global",e,k));xt(d,l).then(h=>{const b=ke(h),L=typeof window>"u"||!Y?void 0:Os(window.localStorage.getItem(Y)),z=He(h,L);Te.current=b,r(z),_e(new Set(z.filter(pe=>$t(pe,b)).map(pe=>pe.id))),hn(pe=>pe+1),window.setTimeout(()=>ne({padding:.14,duration:T?0:500}),20)})},[ne,e,Y,T]),u.useEffect(()=>{!e||m!==void 0||w(e.features.find(i=>i.health==="healthy")?.id??e.features[0]?.id??null)},[e,m]),u.useEffect(()=>{I($?.variants[0]?.id),p(void 0),S(!1),O(-1),V(!1)},[$?.id]),u.useEffect(()=>{if(!a.length||!_)return;const i=_.steps.slice(0,5).flatMap(l=>{const h=a.find(b=>b.id===l.nodeIds[0]);return h?[h]:[]});if(!i.length)return;const d=window.setTimeout(()=>ne({nodes:i,padding:.22,duration:T?0:620,minZoom:.63,maxZoom:1.08}),30);return()=>window.clearTimeout(d)},[ne,F,un,T,$?.id,_?.id]);const Oe=u.useCallback((i,d=1.12)=>{const l=rt(i);if(!l)return;const h=l.measured?.width??l.width??Ye,b=l.measured?.height??l.height??Ke;se(l.position.x+h/2,l.position.y+b/2,{zoom:d,duration:T?0:420})},[rt,T,se]);u.useEffect(()=>{if(!Ee||y<0)return;const i=[...P.currentNodeIds][0];if(!i)return;const d=window.setTimeout(()=>Oe(i,1.06),40);return()=>window.clearTimeout(d)},[Ee,Oe,P.currentNodeIds,y]),u.useEffect(()=>{if(!X||!$||!_)return;const i=window.setTimeout(()=>{const d=y+1;if(d>=_.steps.length){V(!1);return}O(d),(bt($,_,d).halted||d===_.steps.length-1)&&V(!1)},850/K);return()=>window.clearTimeout(i)},[X,$,_,K,y]);const U=u.useMemo(()=>new Map((e?.nodes??[]).map(i=>[i.id,i])),[e]),B=u.useMemo(()=>e?Cs(e,Xs(k),{nodeLabel:i=>{const d=G(i,k,U);return Z==="technical"?d.technicalName:d.label},featureLabel:(i,d)=>{const l=e.features.find(h=>h.id===i);return l?Se(l,e,k).label:d}}):void 0,[e,k,U,Z]),W=!!(B&&m===null&&!F),be=u.useMemo(()=>Ts(e?.nodes??[],re,i=>{const d=G(i,k,U);return{label:`${d.label} ${d.technicalName}`,description:d.description}}),[e,k,U,re]),ue=u.useMemo(()=>e?.nodes.filter(i=>be.has(i.id)).slice(0,7)??[],[e,be]),he=u.useMemo(()=>!s||!e||!j.size?{nodes:[],edges:[]}:e.nodes.flatMap(i=>{if(!j.has(i.id))return[];const d=a.find(h=>h.id===i.id);if(!d)return[];const l=Ms(i,d,s,{expandedRawIds:D,kindLabel:h=>da(h,k),relationLabel:h=>ua(h,k)});return[{...l,nodes:l.nodes.map(h=>{const b=Ve(h.id);return b?{...h,data:{...h.data,onToggle:()=>ye(b.rawId),toggleLabel:`${h.data.expanded?v.collapseDetail:v.expandDetail} ${h.data.label}`}}:h})}]}).reduce((i,d)=>({nodes:[...i.nodes,...d.nodes],edges:[...i.edges,...d.edges]}),{nodes:[],edges:[]}),[j,D,e,a,s,v,ye]);u.useEffect(()=>{if(!B||!W)return;const i=B.nodes.map(h=>({id:h.id,type:"overview",position:{x:0,y:0},width:It,height:_t,data:{label:h.label,role:h.role,memberCount:h.memberIds.length,routeCount:h.routeCount,types:h.types,featureLabel:h.featureLabel,singleNodeId:h.singleNodeId,countsLabel:Ys(k,h.memberIds.length,h.routeCount),openLabel:v.openAggregate}})),d=B.edges.map(h=>({id:h.id,source:h.source,target:h.target}));let l=!0;return xt(i,d).then(h=>{l&&nt(h)}),()=>{l=!1}},[k,W,B,v.openAggregate]),u.useEffect(()=>{if(!W||!ce.length||!ct)return;const i=We(ce.map(b=>({position:b.position,width:b.width??It,height:b.height??_t})),60);if(!i)return;const d=we.current?.getBoundingClientRect(),l=d&&i.width>0&&i.height>0?Math.max(.2,Math.min(1.1,Math.min(d.width/i.width,d.height/i.height))):.7,h=window.setTimeout(()=>se(i.x+i.width/2,i.y+i.height/2,{zoom:l,duration:T||document.hidden?0:360}),40);return()=>window.clearTimeout(h)},[ct,W,ce,T,se]);const dt=u.useCallback(i=>{dn(i);try{window.localStorage.setItem(Lt,i)}catch{}},[]),ve=u.useCallback(i=>{ee.current=m??null,w(null),M(new Set),N(new Set),A(void 0),ge(i)},[m]),pn=u.useCallback(()=>{const i=ee.current;ge(void 0),w(i),ee.current=null,i||window.setTimeout(()=>ne({padding:.2,duration:T?0:620}),60)},[ne,T]),H=u.useMemo(()=>F&&e?$s(e.edges,F):void 0,[F,e]),ze=u.useMemo(()=>a.map(i=>{const d=U.get(i.id);return{...i,className:wa(i.id,be,$,_,P,Q,Je,Ie,j),data:{...i.data,...d?sn(d,k,U,Z):{},onFocus:!F&&e&&Rs(e.edges,i.id)?()=>ve(i.id):void 0,focusLabel:v.focusStep}}}),[ve,j,F,P,e,k,be,a,U,Ie,$,_,Je,v.focusStep,Q,Z]),ut=u.useCallback(i=>{if(i.featureId){w(i.featureId);return}const d=i.singleNodeId??i.memberIds[0];d&&ve(d)},[ve]),fn=u.useMemo(()=>{if(W&&B){const b=new Map(B.nodes.map(L=>[L.id,L]));return ce.map(L=>{const z=b.get(L.id);return{...L,selected:L.id===c,data:{...L.data,onOpen:z?()=>ut(z):void 0}}})}if(!e)return[...ze,...he.nodes];const i=H??(_?new Set(_.nodeIds):void 0),d=H?a.filter(b=>H.has(b.id)):a,l=ws(d,e,i,Ks(k)),h=ze.map(b=>H&&!H.has(b.id)?{...b,hidden:!0}:b);return[...l,...h,...he.nodes]},[he.nodes,H,e,k,a,ut,W,B,ce,c,_,ze]),mn=u.useMemo(()=>{if(W&&B)return B.edges.map(l=>{const h=Jt(l.control),b=Zt("global",l.dataFlow),L=h.color??b.color,z=l.edgeIds.length;return{id:l.id,source:l.source,target:l.target,type:"playback",className:`chain-edge chain-edge--bus${l.control?` chain-edge--${l.control}`:""}`,label:z>1?`×${z}`:void 0,markerEnd:{type:Rt.ArrowClosed,width:16,height:16,color:L},style:{stroke:L,strokeWidth:Math.min(4.2,1.8+Math.log2(z+1)*.8)*h.widthScale,opacity:.9,strokeDasharray:h.dash??b.dash},data:{labelVisible:Le===l.id||Me===l.id,loopback:h.loopback}}});const i=e?.edges.map(l=>{let h="global";_&&(h=_.edgeIds.includes(l.id)?"path":"outside",P.reachedEdgeIds.has(l.id)&&(h="reached"),P.currentEdgeIds.has(l.id)&&(h="current"),P.warningEdgeIds.has(l.id)&&(h="warning"),(P.errorEdgeIds.has(l.id)||P.errorNodeIds.has(l.target)&&P.reachedEdgeIds.has(l.id))&&(h="error"));const b=Q?Q.enteringEdgeIds.has(l.id)?"is-branch-entering":Q.exitingEdgeIds.has(l.id)?"is-branch-exiting":Q.sharedEdgeIds.has(l.id)?"is-branch-shared":void 0:void 0,L=vs({hovered:Le===l.id,selected:Me===l.id,playing:y>=0,state:h});return Mt(l,h,e,k,b,!T&&h==="current",K,L)})??[];return[...H?i.map(l=>H.has(l.source)&&H.has(l.target)?l:{...l,hidden:!0}):i,...he.edges]},[he.edges,H,P,e,Le,k,W,B,T,Me,_,K,y,Q]);u.useEffect(()=>{if(!H||!a.length)return;const i=a.filter(L=>H.has(L.id));if(!i.length)return;const d=We(i,90),l=we.current?.getBoundingClientRect();if(!d||!l?.width||!l.height)return;const h=Math.min(1.05,Math.max(.32,Math.min(l.width/d.width,l.height/d.height))),b=window.setTimeout(()=>se(d.x+d.width/2,d.y+d.height/2,{zoom:h,duration:T?0:620}),80);return()=>window.clearTimeout(b)},[H,a,T,se]);const De=u.useCallback(i=>{typeof window<"u"&&Y&&window.localStorage.setItem(Y,JSON.stringify(i))},[Y]),Pe=u.useCallback(i=>{const d=Te.current;d&&_e(new Set(i.filter(l=>$t(l,d)).map(l=>l.id)))},[]),gn=u.useCallback(i=>{const d=l=>i.filter(h=>"id"in h&&l.some(b=>b.id===h.id));r(l=>mt(d(l),l)),nt(l=>l.length?mt(d(l),l):l)},[]),yn=u.useCallback((i,d)=>{J.current.some(l=>l.id===d.id)&&(ot.current=ke(J.current))},[]),wn=u.useCallback((i,d)=>{if(!J.current.some(h=>h.id===d.id))return;const l=ot.current;r(h=>{const b=h.map(z=>z.id===d.id?{...z,position:d.position}:z),L=ke(b);return l&&JSON.stringify(l)!==JSON.stringify(L)&&$e(z=>[...z.slice(-19),l]),De(L),Pe(b),b})},[De,Pe]),Fe=e?.nodes.find(i=>i.id===c),ht=u.useMemo(()=>R?s?.nodes.find(i=>i.id===R.rawId):void 0,[s,R]),xn=u.useCallback((i,d)=>{const l=d.type==="codeDetail"?Ve(d.id):void 0;if(l){A(l),f(l.logicId);return}A(void 0),f(d.id)},[]),bn=u.useCallback((i,d)=>{if(!s)return;const l=d.type==="codeDetail"?Ve(d.id):void 0;if(l){if(!d.data.expandable)return;N(b=>{const L=new Set(b);return L.has(l.rawId)?L.delete(l.rawId):L.add(l.rawId),L});return}d.type==="logic"&&M(h=>{const b=new Set(h);return b.has(d.id)?(b.delete(d.id),N(new Set),A(void 0)):b.add(d.id),b})},[s]),pt=i=>{w(i),te(!0)},vn=i=>{E!==i&&(le.current&&window.clearTimeout(le.current),p(E),S(!0),I(i),O(-1),V(!1),le.current=window.setTimeout(()=>{S(!1),p(void 0)},T?0:420))},ft=i=>{f(i),te(!1),Qe(i),Oe(i,1.18),de.current&&window.clearTimeout(de.current),de.current=window.setTimeout(()=>Qe(void 0),T?0:1500)},jn=()=>{_?.steps.length&&((P.outcome==="complete"||P.outcome==="error")&&O(-1),te(!0),V(!0))},kn=()=>{V(!1),te(!0),_&&O(xs(_,y))},Nn=()=>{V(!1),O(-1)},Sn=()=>{const i=it.at(-1);if(!i)return;const d=He(J.current,i);r(d),$e(l=>l.slice(0,-1)),De(i),Pe(d)},En=()=>{const i=Te.current;if(!i)return;const d=ke(J.current),l=He(J.current,i);$e(h=>[...h.slice(-19),d]),r(l),_e(new Set),typeof window<"u"&&Y&&window.localStorage.removeItem(Y)},Cn=()=>{const i=k==="zh-CN"?"en":"zh-CN";Us(i),rn(i)},In=u.useCallback(i=>{const d=gs(i),l=we.current;l?.style.setProperty("--semantic-logic-progress",d.logic.toFixed(4)),l?.style.setProperty("--semantic-evidence-progress",d.evidence.toFixed(4));const h=ms(i,Re.current);h!==Re.current&&(Re.current=h,cn(h))},[]);return et?t.jsx(Ca,{message:`${v.loadError}: ${et}`,locale:k}):e?t.jsxs("main",{className:"app-shell",children:[t.jsxs("header",{className:"topbar",children:[t.jsxs("div",{className:"brand",children:[t.jsx("span",{className:"brand__mark",children:t.jsx(Bt,{size:18})}),t.jsx("span",{children:"Agent Runtime Map"})]}),t.jsxs("div",{className:"breadcrumb",children:[t.jsx("span",{children:e.project.name}),t.jsx(yt,{size:14}),t.jsx("strong",{children:e.graphType==="runtime_logic"?v.runtimeLogic:v.productLogic})]}),t.jsxs("div",{className:"topbar__actions",children:[t.jsxs("span",{className:"topbar__meta",children:[v.generated," ",new Date(e.generatedAt).toLocaleString(k)]}),t.jsx("button",{className:"locale-switch",onClick:Cn,title:v.switchLanguage,children:k==="zh-CN"?"EN":"中文"})]})]}),t.jsxs("aside",{className:"sidebar",children:[t.jsxs("div",{className:"sidebar__intro",children:[t.jsx("span",{className:"eyebrow",children:v.projectMap}),t.jsx("h1",{children:qs(e,k)}),t.jsx("p",{children:Gs(e,k)})]}),t.jsxs("div",{className:"stats",children:[t.jsx(Ue,{value:Ae.length,label:v.features}),t.jsx(Ue,{value:e.nodes.length,label:v.logicNodes}),t.jsx(Ue,{value:e.project.filesScanned,label:v.files})]}),t.jsxs("section",{className:"feature-circuits","aria-label":v.featureCircuits,children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:v.featureCircuits}),t.jsx(Kn,{size:14})]}),t.jsx("p",{className:"section-hint",children:v.featureHint}),t.jsxs("button",{className:`feature-card feature-card--global ${m===null?"is-active":""}`,onClick:()=>pt(null),children:[t.jsx("span",{className:"feature-card__icon",children:t.jsx(Wn,{size:14})}),t.jsxs("span",{children:[t.jsx("strong",{children:v.wholeSystem}),t.jsx("small",{children:v.globalView})]})]}),t.jsx("div",{className:"feature-list",children:Ae.map(i=>t.jsxs("button",{className:`feature-card feature-card--${i.health} ${i.id===m?"is-active":""}`,"data-feature-id":i.id,"data-health":i.health,onClick:()=>pt(i.id),children:[t.jsx("span",{className:"feature-card__icon",children:t.jsx(ka,{health:i.health})}),t.jsxs("span",{children:[t.jsxs("strong",{children:[Se(i,e,k).label,Se(i,e,k).pending&&t.jsx("em",{className:"pending-flag pending-flag--inline",children:v.pendingBadge})]}),t.jsxs("small",{children:[na(i.health,k)," · ",Math.round(i.confidence*100),"%"]})]}),t.jsx(yt,{size:13})]},i.id))})]}),$&&_?t.jsx(ya,{feature:$,variant:_,graph:e,locale:k,playing:X,speed:K,frame:P,cameraFollow:Ee,onVariant:vn,onPlay:jn,onPause:()=>V(!1),onNext:kn,onReset:Nn,onSpeed:oe,onSelectNode:f,onResumeFollow:()=>te(!0)}):t.jsxs("div",{className:"feature-empty",children:[t.jsx(Xn,{size:16}),t.jsx("span",{children:v.selectFeature})]}),t.jsxs("div",{className:"search-wrap",children:[t.jsxs("label",{className:"search-box",children:[t.jsx(ts,{size:15}),t.jsx("input",{value:re,onChange:i=>Ze(i.target.value),onKeyDown:i=>{i.key==="Enter"&&ue[0]&&ft(ue[0].id)},placeholder:v.search}),re&&t.jsx("button",{onClick:()=>Ze(""),"aria-label":v.clearSearch,children:t.jsx(Yt,{size:14})})]}),re&&t.jsxs("div",{className:"search-results",children:[t.jsxs("span",{className:"eyebrow",children:[v.searchResults," · ",ue.length]}),ue.length?ue.map(i=>t.jsxs("button",{onClick:()=>ft(i.id),children:[t.jsx("strong",{children:G(i,k,U).label}),t.jsx("small",{children:i.sources[0]?.file??qe(i.type,k)})]},i.id)):t.jsx("p",{children:v.noSearchResults})]})]}),t.jsxs("div",{className:"sidebar__footer",children:[t.jsx(Ot,{size:14})," ",v.staticAnalysis]})]}),t.jsxs("section",{className:"canvas","aria-label":v.logicGraph,"data-lod":W?"overview":F?"detail":$?"feature":"overview","data-detail-level":Ce,"data-navigating":ln?"true":"false",ref:we,children:[F?t.jsxs("div",{className:"canvas-caption canvas-caption--focus",children:[t.jsxs("button",{onClick:pn,title:v.exitFocus,children:[t.jsx(zt,{size:12}),v.wholeSystem]}),t.jsx("strong",{children:G(e.nodes.find(i=>i.id===F),k,U).label}),t.jsx("small",{children:v.focusHint})]}):t.jsxs("div",{className:"canvas-caption",children:[t.jsx("span",{className:"canvas-caption__mark"}),t.jsx("strong",{children:$?Se($,e,k).label:v.wholeSystem}),t.jsx("small",{children:_?tn(_,e,k):W?v.overviewHint:v.globalView})]}),t.jsxs("div",{className:"semantic-zoom","aria-live":"polite",children:[t.jsx("span",{children:v.zoomLevel}),t.jsx("strong",{children:va(Ce,k)}),t.jsx("div",{className:"semantic-zoom__levels","aria-hidden":"true",children:["overview","logic","evidence"].map(i=>t.jsx("i",{className:i===Ce?"is-active":""},i))}),t.jsx("small",{children:v.semanticZoomHint})]}),t.jsxs("div",{className:"canvas-help",children:[t.jsx(Dt,{size:13}),t.jsx("span",{children:v.detailHint})]}),t.jsxs("div",{className:"view-toolbar","aria-label":v.viewMode,children:[t.jsx("button",{className:Z==="business"?"is-active":"",onClick:()=>dt("business"),children:v.businessView}),t.jsx("button",{className:Z==="technical"?"is-active":"",onClick:()=>dt("technical"),children:v.technicalView})]}),t.jsxs("div",{className:"layout-toolbar","aria-label":v.layout,children:[t.jsxs("span",{children:[t.jsx(Qn,{size:12})," ",Ie.size," ",v.pinnedNodes]}),t.jsx("button",{onClick:Sn,disabled:!it.length,title:v.undoLayout,children:t.jsx(ss,{size:13})}),t.jsx("button",{onClick:En,title:v.resetLayout,children:t.jsx(Wt,{size:13})})]}),t.jsxs(On,{nodes:fn,edges:mn,nodeTypes:ha,edgeTypes:pa,onNodesChange:gn,onNodeDragStart:yn,onNodeDragStop:wn,onNodeClick:xn,onNodeDoubleClick:bn,onEdgeMouseEnter:(i,d)=>st(d.id),onEdgeMouseLeave:()=>st(void 0),onEdgeClick:(i,d)=>at(d.id),onPaneClick:()=>{f(void 0),A(void 0),at(void 0)},onMoveStart:i=>{tt(!0),i&&te(!1)},onMove:(i,d)=>In(d.zoom),onMoveEnd:()=>tt(!1),nodesDraggable:!0,nodesConnectable:!1,elementsSelectable:!0,minZoom:.2,maxZoom:2.2,fitView:!0,proOptions:{hideAttribution:!0},children:[t.jsx(zn,{showInteractive:!1,position:"bottom-left"}),t.jsx(Dn,{position:"bottom-right",pannable:!0,zoomable:!0,nodeStrokeWidth:2,maskColor:"rgba(240, 244, 248, 0.7)"})]})]}),ht?t.jsx(Sa,{rawNode:ht,parent:Fe,locale:k,onParent:()=>A(void 0),onClose:()=>{A(void 0),f(void 0)}}):Fe&&t.jsx(Na,{node:Fe,locale:k,nodesById:U,onClose:()=>f(void 0)})]}):t.jsx(Ea,{locale:k})}function ya({feature:e,variant:n,graph:s,locale:o,playing:a,speed:r,frame:c,cameraFollow:f,onVariant:m,onPlay:w,onPause:E,onNext:I,onReset:x,onSpeed:p,onSelectNode:g,onResumeFollow:S}){const j=q(o),M=[...c.currentNodeIds].flatMap(N=>{const R=s.nodes.find(A=>A.id===N);return R?[G(R,o).label]:[]}),D=c.outcome==="idle"?j.ready:c.outcome==="error"?j.stopped:c.outcome==="complete"?j.completed:j.running;return t.jsxs("section",{className:"chain-inspector","data-outcome":c.outcome,children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:j.choosePath}),t.jsx("span",{children:e.variants.length})]}),t.jsx("select",{value:n.id,onChange:N=>m(N.target.value),"aria-label":j.choosePath,children:e.variants.map(N=>t.jsx("option",{value:N.id,children:tn(N,s,o)},N.id))}),t.jsxs("div",{className:`player-status player-status--${c.outcome}`,children:[t.jsx("span",{className:"player-status__pulse"}),t.jsxs("span",{children:[t.jsx("strong",{children:D}),t.jsx("small",{children:M.join(" · ")||`${j.step} 0 / ${n.steps.length}`})]}),t.jsxs("b",{children:[Math.max(0,c.stepIndex+1),"/",n.steps.length]})]}),t.jsxs("div",{className:"player-controls","aria-label":j.chainCheck,children:[t.jsx("button",{onClick:a?E:w,title:a?j.pause:j.play,"aria-label":a?j.pause:j.play,children:a?t.jsx(Jn,{size:14}):t.jsx(Ut,{size:14})}),t.jsx("button",{onClick:I,title:j.nextStep,"aria-label":j.nextStep,children:t.jsx(ns,{size:14})}),t.jsx("button",{onClick:x,title:j.replay,"aria-label":j.replay,children:t.jsx(Wt,{size:14})}),t.jsxs("div",{className:"speed-control",children:[t.jsx("span",{children:j.speed}),[.5,1,2].map(N=>t.jsxs("button",{className:r===N?"is-active":"",onClick:()=>p(N),children:[N,"×"]},N))]})]}),t.jsxs("button",{className:`camera-follow ${f?"is-active":""}`,onClick:S,children:[t.jsx(Dt,{size:12}),t.jsx("span",{children:f?j.cameraFollowing:j.resumeFollow})]}),t.jsxs("div",{className:"diagnostics",children:[t.jsxs("div",{className:"section-heading",children:[t.jsx("span",{className:"eyebrow",children:j.diagnostics}),t.jsx("span",{children:e.diagnostics.length})]}),!e.diagnostics.length&&t.jsxs("div",{className:"diagnostics__clear",children:[t.jsx(Xe,{size:13}),j.noDiagnostics]}),e.diagnostics.map(N=>{const R=ia(N,s,o);return t.jsxs("button",{className:`diagnostic diagnostic--${N.severity}`,"data-diagnostic-code":N.code,onClick:()=>N.nodeId&&s.nodes.some(A=>A.id===N.nodeId)&&g(N.nodeId),children:[t.jsx(Gt,{size:13}),t.jsxs("span",{children:[t.jsx("strong",{children:R.message}),t.jsxs("small",{children:[j.recommendation,":",R.suggestion]})]})]},N.id)})]})]})}function wa(e,n,s,o,a,r,c,f,m){const w=[];return n.has(e)||w.push("is-dimmed"),c===e&&w.push("is-search-spotlight"),f.has(e)&&w.push("is-pinned"),m.has(e)&&w.push("is-expanded"),r?.enteringNodeIds.has(e)&&w.push("is-branch-entering"),r?.exitingNodeIds.has(e)&&w.push("is-branch-exiting"),r?.sharedNodeIds.has(e)&&w.push("is-branch-shared"),!s||!o||(o.nodeIds.includes(e)?a.errorNodeIds.has(e)?w.push("is-chain-error"):a.warningNodeIds.has(e)?w.push("is-chain-warning"):a.currentNodeIds.has(e)?w.push("is-current"):a.completedNodeIds.has(e)?w.push("is-chain-complete"):w.push("is-path-pending"):w.push("is-outside-path")),w.join(" ")}function xa({product:e,locale:n}){const s=q(n);return t.jsxs("div",{className:"product-card",children:[t.jsx("span",{className:"eyebrow",children:s.productContext}),e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"product-card__claim",children:[t.jsx("strong",{children:e.label}),t.jsx("em",{children:ta(e.origin,n)})]}),t.jsxs("div",{className:"product-card__match",children:[t.jsx("span",{children:s.productMatch}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${e.match*100}%`}})}),t.jsxs("strong",{children:[Math.round(e.match*100),"%"]})]}),t.jsxs("small",{children:[s.productMatchedOn,": ",ea(e,n)]}),e.sources.map(o=>t.jsxs("code",{className:"product-card__source",children:[o.file,":",o.startLine]},`${o.file}:${o.startLine}`))]}):t.jsx("p",{className:"product-card__empty",children:s.productCodeOnly})]})}function ba(e,n,s,o="business"){return{id:e.id,type:"logic",position:{x:0,y:0},data:sn(e,n,s,o)}}function sn(e,n,s,o){const a=G(e,n,s),r=e.sources[0],c=r?`${r.file}:${r.startLine}${r.symbol?` · ${r.symbol}`:""}`:void 0,f=o==="technical";return{label:f?a.technicalName:a.label,description:f?c??qe(e.type,n):a.description,nodeType:e.type,typeLabel:qe(e.type,n),confidence:e.confidence,pending:!f&&a.pending,sourceText:Ws(e.sources.length,n),sourceDetail:f?c:void 0,inferenceText:f?en(e.inference.method,n):void 0}}function va(e,n){return n==="zh-CN"?{overview:"全局层",logic:"逻辑层",evidence:"证据层"}[e]:{overview:"Overview",logic:"Logic",evidence:"Evidence"}[e]}function Mt(e,n,s,o,a,r=!1,c=1,f=!1){const m=e.type==="data_flow",w=Zt(n,m),E=Jt(e.control),x=n==="current"||n==="reached"||n==="error"||n==="warning"?w.color:E.color??w.color;return{id:e.id,source:e.source,target:e.target,type:"playback",animated:!1,label:oa(e,o)??ja(e,s,o),className:`chain-edge chain-edge--${n}${e.control?` chain-edge--${e.control}`:""}${a?` ${a}`:""}`,markerEnd:{type:Rt.ArrowClosed,width:17,height:17,color:x},style:{stroke:x,strokeWidth:w.width*E.widthScale,opacity:w.opacity,strokeDasharray:E.dash??w.dash},data:{showToken:r,tokenColor:x,tokenDuration:.9/c,labelVisible:f,loopback:E.loopback}}}function ja(e,n,s){const o=n.nodes.find(r=>r.id===e.source),a=n.nodes.find(r=>r.id===e.target);return o?.type==="user_action"&&a?.type==="entrypoint"?"HTTPS":e.type==="data_flow"&&a?.type==="data"?s==="zh-CN"?"读 / 写":"read / write":a?.type==="external_system"?"API":a?.type==="model"?s==="zh-CN"?"模型":"model":a?.type==="tool"?s==="zh-CN"?"工具":"tool":a?.type==="human_gate"?s==="zh-CN"?"人工确认":"approve":a?.type==="workflow"||a?.type==="ai_process"?s==="zh-CN"?"调用":"invoke":a?.type==="result"?s==="zh-CN"?"返回":"return":s==="zh-CN"?"执行":"flow"}function ka({health:e}){return e==="healthy"?t.jsx(Xe,{size:14}):t.jsx(Gt,{size:14})}function an({sources:e,locale:n,heading:s}){const o=q(n),[a,r]=u.useState(0),[c,f]=u.useState(),[m,w]=u.useState(!1),E=e.map(x=>`${x.file}:${x.startLine}`).join("|"),I=e[a];return u.useEffect(()=>{r(0)},[E]),u.useEffect(()=>{if(!I)return;let x=!0;f(void 0),w(!1);const p=new URLSearchParams({file:I.file,start:String(I.startLine),end:String(I.endLine??I.startLine)});return fetch(`./source.json?${p.toString()}`,{cache:"no-store"}).then(async g=>{if(!g.ok)throw new Error(String(g.status));return await g.json()}).then(g=>x&&f(g)).catch(()=>x&&w(!0)),()=>{x=!1}},[I]),t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"evidence-list",children:[t.jsx("span",{className:"eyebrow",children:s}),e.map((x,p)=>t.jsxs("button",{className:a===p?"is-active":"",onClick:()=>r(p),children:[t.jsx("code",{children:x.file}),t.jsxs("span",{children:[o.lines," ",x.startLine,x.endLine&&x.endLine!==x.startLine?`–${x.endLine}`:""]}),x.symbol&&t.jsx("small",{children:x.symbol})]},`${x.file}:${x.startLine}`))]}),t.jsxs("section",{className:"source-preview",children:[t.jsx("span",{className:"eyebrow",children:o.sourceCode}),!I||m?t.jsx("p",{children:o.sourceUnavailable}):c?t.jsx("pre",{children:c.lines.map(x=>t.jsxs("code",{className:x.number>=c.highlightStart&&x.number<=c.highlightEnd?"is-highlighted":"",children:[t.jsx("i",{children:x.number}),t.jsx("span",{children:x.text||" "})]},x.number))}):t.jsx("p",{children:o.loadingSource})]})]})}function Na({node:e,locale:n,nodesById:s,onClose:o}){const a=q(n),r=G(e,n,s);return t.jsxs("aside",{className:"evidence-panel",children:[t.jsxs("div",{className:"evidence-panel__header",children:[t.jsxs("div",{children:[t.jsx("span",{className:"eyebrow",children:a.selectedLogic}),t.jsxs("h2",{children:[r.label,r.pending&&t.jsx("em",{className:"pending-flag",children:a.pendingBadge})]})]}),t.jsx("button",{onClick:o,"aria-label":a.closeEvidence,children:t.jsx(Vt,{size:19})})]}),t.jsx("p",{className:"evidence-panel__description",children:r.description}),t.jsxs("div",{className:"name-source",children:[t.jsx("span",{children:a.nameSource}),t.jsx("strong",{children:ra(r.source,n)}),t.jsx("code",{children:r.technicalName})]}),t.jsxs("div",{className:"confidence-card",children:[t.jsxs("div",{children:[t.jsx("span",{children:a.confidence}),t.jsxs("strong",{children:[Math.round(e.confidence*100),"%"]})]}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${e.confidence*100}%`}})}),t.jsxs("small",{children:[en(e.inference.method,n)," · ",e.inference.explanation]})]}),t.jsx(xa,{product:e.product,locale:n}),t.jsx(an,{sources:e.sources,locale:n,heading:a.sourceEvidence}),t.jsxs("div",{className:"raw-reference",children:[t.jsx("span",{children:a.rawReferences}),t.jsx("code",{children:e.rawNodeIds.join(`
3
+ `)})]})]})}function Sa({rawNode:e,parent:n,locale:s,onParent:o,onClose:a}){const r=q(s),c=e.evidence.map(m=>m.source),f=e.evidence.reduce((m,w)=>m&&m.confidence>=w.confidence?m:w,void 0);return t.jsxs("aside",{className:"evidence-panel",children:[t.jsxs("div",{className:"evidence-panel__header",children:[t.jsxs("div",{children:[t.jsx("span",{className:"eyebrow",children:r.selectedCode}),t.jsxs("nav",{className:"evidence-breadcrumb",children:[n&&t.jsxs("button",{onClick:o,children:[t.jsx(zt,{size:12}),me(n,s).label]}),t.jsx("span",{children:e.name})]})]}),t.jsx("button",{onClick:a,"aria-label":r.closeEvidence,children:t.jsx(Vt,{size:19})})]}),t.jsx("p",{className:"evidence-panel__description",children:e.description??e.qualifiedName??e.kind.replaceAll("_"," ")}),t.jsxs("div",{className:"confidence-card",children:[t.jsxs("div",{children:[t.jsx("span",{children:r.confidence}),t.jsxs("strong",{children:[Math.round((f?.confidence??0)*100),"%"]})]}),t.jsx("div",{className:"confidence-track",children:t.jsx("i",{style:{width:`${(f?.confidence??0)*100}%`}})}),t.jsxs("small",{children:[f?.method," · ",f?.detail]})]}),t.jsx(an,{sources:c,locale:s,heading:r.sourceEvidence}),t.jsxs("div",{className:"raw-reference",children:[t.jsx("span",{children:r.rawReferences}),t.jsx("code",{children:e.id})]})]})}function $t(e,n){const s=n[e.id];return!!(s&&(Math.abs(s.x-e.position.x)>1||Math.abs(s.y-e.position.y)>1))}function Ue({value:e,label:n}){return t.jsxs("div",{children:[t.jsx("strong",{children:e}),t.jsx("span",{children:n})]})}function Ea({locale:e}){const n=q(e);return t.jsxs("main",{className:"state-screen",children:[t.jsx("span",{className:"state-logo",children:t.jsx(Bt,{})}),t.jsx("h1",{children:n.loadingTitle}),t.jsx("p",{children:n.loadingDescription}),t.jsx("i",{className:"loader"})]})}function Ca({message:e,locale:n}){const s=q(n);return t.jsxs("main",{className:"state-screen state-screen--error",children:[t.jsx("span",{className:"state-logo",children:t.jsx(Yt,{})}),t.jsx("h1",{children:s.errorTitle}),t.jsx("p",{children:e}),t.jsx("code",{children:s.errorHint})]})}_n.createRoot(document.getElementById("root")).render(t.jsx(u.StrictMode,{children:t.jsx(ma,{})}));
@@ -0,0 +1 @@
1
+ .logic-map{position:relative;width:100%;height:100%;min-height:320px;background:#f8fafc}.logic-map .react-flow__attribution{display:none}.is-observed .blueprint-node__tile{box-shadow:0 0 0 2px #5a6e8480}.is-observed-completed .blueprint-node__tile{box-shadow:0 0 0 2px #1f9d72b8}.is-observed-failed .blueprint-node__tile{box-shadow:0 0 0 2px #e5484dc7}.is-observed-started .blueprint-node__tile{box-shadow:0 0 0 2px #147fc1b3}.is-observed-skipped .blueprint-node__tile{box-shadow:0 0 0 2px #8c96a273;opacity:.78}.blueprint-node{--node-accent: #596474;position:relative;display:grid;justify-items:center;width:190px;height:154px;color:#20242a;text-align:center;transition:opacity .18s ease,filter .18s ease,transform .18s ease}.blueprint-node__tile{position:relative;display:grid;place-items:center;width:88px;height:88px;border:1px solid #c8cdd3;border-radius:11px;background:#fffffff5;box-shadow:0 2px 4px #1b21290f,0 10px 26px #36414e0f,inset 0 0 0 1px #ffffffb3}.blueprint-node__tile:after{content:"";position:absolute;inset:6px;border:1px solid color-mix(in srgb,var(--node-accent) 13%,transparent);border-radius:7px;pointer-events:none}.blueprint-node__icon{display:grid;place-items:center;color:var(--node-accent)}.blueprint-node__type{position:absolute;top:7px;left:9px;color:#7c8490;font:700 6.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.11em;text-transform:uppercase;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node__confidence{position:absolute;top:7px;right:8px;color:#9299a2;font:7px/1 ui-monospace,SFMono-Regular,Menlo,monospace;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node h3{width:100%;margin:7px 0 2px;overflow:hidden;color:#202328;font-size:14px;line-height:1.18;font-weight:650;letter-spacing:-.015em;text-overflow:ellipsis;white-space:nowrap}.blueprint-node p{width:100%;margin:0;overflow:hidden;color:#707782;font:9px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node small{margin-top:3px;color:#9aa1aa;font:7px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;opacity:var(--semantic-logic-progress, 1);transition:opacity .12s linear}.blueprint-node__evidence{position:absolute;top:158px;display:grid;width:184px;gap:3px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--node-accent) 20%,#dfe4e9);border-radius:6px;background:#fffffff0;box-shadow:0 5px 14px #26303c0f;opacity:var(--semantic-evidence-progress, 0);pointer-events:none;transition:opacity .12s linear,box-shadow .18s ease}.blueprint-node__evidence code{overflow:hidden;color:color-mix(in srgb,var(--node-accent) 76%,#596474);font:7px/1.25 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.blueprint-node__evidence span{color:#929aa4;font:6.5px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.blueprint-node--detail-overview{--semantic-logic-progress: 0;--semantic-evidence-progress: 0}.blueprint-node--detail-logic{--semantic-logic-progress: 1;--semantic-evidence-progress: 0}.blueprint-node--detail-evidence{--semantic-logic-progress: 1;--semantic-evidence-progress: 1}.blueprint-node:hover .blueprint-node__tile,.blueprint-node.is-selected .blueprint-node__tile{border-color:var(--node-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--node-accent) 12%,transparent),0 12px 30px #1f2a371a}.blueprint-node--user_action{--node-accent: #3f4a5c}.blueprint-node--entrypoint{--node-accent: #148acb}.blueprint-node--process{--node-accent: #e0802e}.blueprint-node--workflow{--node-accent: #5d5bd4}.blueprint-node--ai_process{--node-accent: #7651c8}.blueprint-node--tool{--node-accent: #167c8c}.blueprint-node--model{--node-accent: #b04f9e}.blueprint-node--human_gate{--node-accent: #cf6f2f}.blueprint-node--decision{--node-accent: #d79818}.blueprint-node--data{--node-accent: #188764}.blueprint-node--external_system{--node-accent: #20272f}.blueprint-node--result{--node-accent: #258d5f}.blueprint-handle{top:44px!important;width:6px!important;height:6px!important;border:1px solid #7b8795!important;background:#fff!important;opacity:0}.blueprint-node:hover .blueprint-handle{opacity:1}.blueprint-code-node{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;width:176px;height:88px;padding:10px;border:1px solid #cfd8e2;border-radius:9px;color:#52606d;background:#fffffff7;box-shadow:0 7px 22px #27344117,inset 0 0 0 1px #ffffffb3;transition:border-color .2s ease,box-shadow .2s ease,opacity .25s ease,transform .25s cubic-bezier(.2,.8,.2,1)}.blueprint-code-node:hover,.blueprint-code-node.is-selected{border-color:#4b9dcc;box-shadow:0 0 0 3px #1689cf17,0 10px 28px #2734411f}.blueprint-code-node__icon{display:grid;place-items:center;width:28px;height:28px;border:1px solid #d9e3eb;border-radius:7px;color:#247fae;background:#f2f8fb}.blueprint-code-node__body{display:grid;min-width:0;gap:4px;text-align:left}.blueprint-code-node small{color:#87939f;font:700 6.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em;text-transform:uppercase}.blueprint-code-node strong{overflow:hidden;color:#34404c;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.blueprint-code-node code{overflow:hidden;color:#7b8794;font:7px/1.25 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.blueprint-code-node>i{position:absolute;top:-8px;right:8px;padding:2px 5px;border:1px solid #d9e2ea;border-radius:4px;color:#7f8b97;background:#fff;font: 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.blueprint-code-handle{width:6px!important;height:6px!important;border:1px solid #6e8293!important;background:#fff!important;opacity:0}.blueprint-code-node:hover .blueprint-code-handle{opacity:1}.blueprint-node__focus{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid #dbe3ea;border-radius:6px;color:#6b7a88;background:#ffffffeb;opacity:0;cursor:pointer;transition:.15s ease}.blueprint-node:hover .blueprint-node__focus,.blueprint-node__focus:focus-visible{opacity:1}.blueprint-node__focus:hover{border-color:#8ec3e2;color:#1f7fb4;background:#f1f9fd}.blueprint-code-node__toggle{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:18px;height:18px;padding:0;border:1px solid #d9e3eb;border-radius:5px;color:#5b7185;background:#fbfdfe;cursor:pointer;transition:.15s ease}.blueprint-code-node__toggle:hover{border-color:#8ec3e2;color:#1f7fb4;background:#f1f9fd}.blueprint-code-node__toggle[aria-expanded=true] svg{transform:rotate(180deg)}.blueprint-playback-edge__label{position:absolute;z-index:2;padding:2px 5px;border-radius:3px;color:#66727f;background:#f8fafceb;font:8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;pointer-events:none}.blueprint-playback-edge__token{filter:drop-shadow(0 0 4px currentColor);pointer-events:none}.blueprint-group{width:100%;height:100%;border:1.4px solid var(--group-color, #9ba5b1);border-radius:12px;background:color-mix(in srgb,var(--group-color) 2.5%,rgba(255,255,255,.2));pointer-events:none}.blueprint-group.is-dashed{border-style:dashed}.blueprint-group--amber{--group-color: #c48a35}.blueprint-group--cyan{--group-color: #3aa5bd}.blueprint-group--violet{--group-color: #8b6ac3}.blueprint-group--slate{--group-color: #87919d}.blueprint-group__label{position:absolute;top:-10px;left:25px;display:flex;align-items:center;gap:8px;min-height:20px;padding:0 9px;color:color-mix(in srgb,var(--group-color) 82%,#1f2933);background:#f8fafc;font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em;text-transform:uppercase}.blueprint-group__label i{width:8px;height:8px;border-radius:2px;background:var(--group-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--group-color) 14%,transparent)}.blueprint-group__label span{color:#9aa1aa;font-size:7px;letter-spacing:.06em}@media(prefers-reduced-motion:reduce){.blueprint-node,.blueprint-node__type,.blueprint-node__confidence,.blueprint-node p,.blueprint-node small,.blueprint-node__evidence,.blueprint-code-node{transition-duration:.01ms!important}.blueprint-playback-edge__token{display:none}}.blueprint-overview{display:flex;flex-direction:column;gap:4px;justify-content:center;min-width:250px;min-height:108px;padding:14px 18px;border:1.5px solid rgba(90,106,124,.34);border-radius:14px;background:linear-gradient(180deg,#fffffff5,#f0f5faf0);box-shadow:0 3px 14px #182a4217;transition:border-color .24s ease,box-shadow .24s ease,transform .24s ease}.blueprint-overview.is-aggregate{border-style:dashed}.blueprint-overview.is-selected{border-color:#147fc1;box-shadow:0 4px 20px #147fc138}.blueprint-overview--entry{border-color:#147fc180}.blueprint-overview--capability{border-color:#8b5cf66b}.blueprint-overview--io{border-color:#626a7366}.blueprint-overview--result{border-color:#1f9d7280}.blueprint-overview__feature{margin:0;font-size:10.5px;letter-spacing:.07em;text-transform:uppercase;color:#64748b}.blueprint-overview__label{margin:0;font-size:15px;font-weight:620;color:#14202e}.blueprint-overview__counts{margin:0;font-size:12px;color:#5b6773}.blueprint-overview__open{align-self:flex-start;margin-top:4px;padding:3px 10px;border:1px solid rgba(20,127,193,.38);border-radius:999px;background:#147fc114;color:#10618f;font-size:11.5px;cursor:pointer;transition:background .2s ease}.blueprint-overview__open:hover{background:#147fc12b}.blueprint-node.is-pending .blueprint-node__tile{border-style:dashed;border-color:#94845a8c;background:linear-gradient(180deg,#fffcf3f5,#faf6eaf0)}.blueprint-node.is-pending h3{color:#7a6a45}:root{color-scheme:light;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#20242a;background:#f8fafc;font-synthesis:none;--border: #dfe4ea;--muted: #737c88;--panel: rgba(250, 251, 252, .96);--blue: #1689cf;--healthy: #1f9d72;--warning: #d99a24;--danger: #e5484d}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;overflow:hidden}button,input,select{font:inherit}button{color:inherit}.app-shell{display:grid;grid-template:58px minmax(0,1fr) / 330px minmax(0,1fr);height:100vh;background:#f8fafc}.topbar{grid-column:1 / -1;display:grid;grid-template-columns:330px 1fr auto;align-items:center;border-bottom:1px solid var(--border);background:#ffffffeb;box-shadow:0 1px #ffffffe6;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);z-index:8}.brand{height:100%;display:flex;align-items:center;gap:10px;padding:0 19px;border-right:1px solid var(--border);color:#171b21;font-weight:760;letter-spacing:-.025em}.brand__mark{display:grid;place-items:center;width:30px;height:30px;border:1px solid #202934;border-radius:8px;color:#d9f5ff;background:#202934;box-shadow:0 4px 13px #20293429;transform:rotate(-2deg)}.breadcrumb{display:flex;align-items:center;gap:8px;min-width:0;padding-left:22px;color:#8a929d;font-size:11px}.breadcrumb span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breadcrumb strong{color:#3d4651;font-weight:620}.topbar__actions{display:flex;align-items:center;gap:12px;padding-right:16px}.topbar__meta{color:#9aa2ac;font:9px ui-monospace,SFMono-Regular,Menlo,monospace}.locale-switch{min-width:42px;padding:5px 8px;border:1px solid #d7dde4;border-radius:7px;color:#596473;background:#fff;font-size:9px;cursor:pointer;box-shadow:0 2px 5px #262d370a}.locale-switch:hover{border-color:#87bede;color:#0d76b5;background:#f4fbff}.sidebar{grid-row:2;display:flex;flex-direction:column;border-right:1px solid var(--border);background:#f8fafcf7;padding:17px 16px 13px;overflow:auto;z-index:6}.sidebar__intro h1{margin:8px 0 9px;color:#252a31;font-size:18px;line-height:1.22;letter-spacing:-.035em}.sidebar__intro p{margin:0;color:var(--muted);font-size:10px;line-height:1.55}.eyebrow{color:#87919d;font:700 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase}.stats{display:grid;grid-template-columns:repeat(3,1fr);margin:15px 0;border:1px solid var(--border);border-radius:10px;background:#fffc;box-shadow:0 3px 10px #2a333d06}.stats div{display:flex;flex-direction:column;align-items:center;padding:10px 3px 8px;border-right:1px solid var(--border)}.stats div:last-child{border:0}.stats strong{color:#2d343d;font-size:15px}.stats span{margin-top:3px;color:#969ea8;font-size:8px}.section-heading{display:flex;align-items:center;justify-content:space-between;color:#8b95a0}.section-heading>span:last-child{font:8px ui-monospace,SFMono-Regular,Menlo,monospace}.section-hint{margin:8px 0 10px;color:#848d98;font-size:9px;line-height:1.45}.feature-circuits{flex:0 0 auto}.feature-list{display:grid;gap:6px;max-height:214px;margin-top:6px;padding-right:2px;overflow:auto}.feature-card{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:45px;padding:7px 9px;border:1px solid #dfe4ea;border-radius:9px;color:#7d8793;background:#ffffffd1;text-align:left;cursor:pointer;box-shadow:0 2px 8px #27303a06;transition:.16s ease}.feature-card:hover{border-color:#b7c5d1;background:#fff;transform:translate(1px)}.feature-card.is-active{border-color:#5da9d5;background:linear-gradient(105deg,#e2f4fde6,#fff);box-shadow:inset 2px 0 var(--blue),0 5px 14px #1a79b014}.feature-card>span:nth-child(2){display:grid;min-width:0;gap:4px}.feature-card strong{overflow:hidden;color:#37404a;font-size:10px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.feature-card small{overflow:hidden;color:#929aa4;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.feature-card__icon{display:grid;place-items:center;width:28px;height:28px;border:1px solid #e0e5ea;border-radius:7px;color:#587184;background:#f5f8fa}.feature-card--healthy .feature-card__icon{color:var(--healthy);border-color:#1f9d722e;background:#1f9d720f}.feature-card--warning .feature-card__icon{color:var(--warning);border-color:#d99a2433;background:#d99a2412}.feature-card--error .feature-card__icon{color:var(--danger);border-color:#e5484d33;background:#e5484d0f}.feature-card--error.is-active{border-color:#e57c80;background:linear-gradient(105deg,#ffedeee0,#fff);box-shadow:inset 2px 0 var(--danger),0 5px 14px #cd313712}.feature-card--global{min-height:43px}.feature-empty{display:flex;align-items:center;gap:9px;min-height:58px;margin-top:12px;padding:11px;border:1px dashed #d4dae1;border-radius:9px;color:#8a939e;font-size:9px;line-height:1.4;background:#ffffff6b}.chain-inspector{flex:0 0 auto;margin-top:14px;padding-top:13px;border-top:1px solid #e1e6eb}.chain-inspector select{width:100%;height:32px;margin-top:7px;padding:0 9px;border:1px solid #d8dee5;border-radius:7px;outline:none;color:#4f5a67;background:#fff;font-size:9px}.chain-inspector select:focus{border-color:#6eb3da;box-shadow:0 0 0 2px #1689cf14}.player-status{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:9px;margin-top:8px;padding:9px 10px;border:1px solid #dfe4ea;border-radius:8px;background:#ffffffb8}.player-status__pulse{width:7px;height:7px;border-radius:50%;background:#98a1ab;box-shadow:0 0 0 3px #7f899a14}.player-status>span:nth-child(2){display:grid;gap:3px;min-width:0}.player-status strong{color:#4c5662;font-size:9px}.player-status small{overflow:hidden;color:#929aa4;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.player-status b{color:#89929d;font:8px ui-monospace,SFMono-Regular,Menlo,monospace}.player-status--running{border-color:#1689cf4d;background:#edf8fed1}.player-status--running .player-status__pulse{background:var(--blue);box-shadow:0 0 0 3px #1689cf1f,0 0 10px #1689cf4d;animation:statusPulse 1s infinite}.player-status--complete .player-status__pulse{background:var(--healthy);box-shadow:0 0 0 3px #1f9d721a}.player-status--error{border-color:#e5484d5c;background:#fff0f1e6}.player-status--error .player-status__pulse{background:var(--danger);box-shadow:0 0 0 3px #e5484d1f,0 0 10px #e5484d47}.player-status--error strong{color:#be383d}.player-controls{display:flex;align-items:center;gap:5px;margin-top:7px}.player-controls>button{display:grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid #d8dee5;border-radius:7px;color:#697583;background:#fff;cursor:pointer}.player-controls>button:first-child{border-color:#61add7;color:#0d78b5;background:#edf8fe}.player-controls>button:hover{border-color:#79b8da;color:#0e79b7}.speed-control{display:flex;align-items:center;gap:3px;margin-left:auto}.speed-control span{margin-right:2px;color:#969ea8;font-size:8px}.speed-control button{min-width:25px;height:24px;padding:0 4px;border:0;border-radius:5px;color:#8b949f;background:transparent;font-size:8px;cursor:pointer}.speed-control button.is-active{color:#0e79b7;background:#e5f4fc}.camera-follow{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:27px;margin-top:7px;border:1px dashed #d3dbe3;border-radius:7px;color:#87929e;background:#ffffffa3;font-size:8px;cursor:pointer;transition:.18s ease}.camera-follow:hover{border-color:#78b8dc;color:#197eb8;background:#f3faff}.camera-follow.is-active{border-style:solid;border-color:#2091cd52;color:#197eb8;background:#ebf8fecc}.diagnostics{margin-top:11px}.diagnostics__clear{display:flex;align-items:center;gap:7px;margin-top:7px;padding:8px 9px;border:1px solid rgba(31,157,114,.1);border-radius:7px;color:#318b6c;background:#1f9d720e;font-size:8px;line-height:1.35}.diagnostic{display:grid;grid-template-columns:14px 1fr;align-items:start;gap:7px;width:100%;margin-top:6px;padding:8px;border:1px solid rgba(217,154,36,.26);border-radius:7px;color:var(--warning);background:#fff8e8db;text-align:left;cursor:pointer}.diagnostic--error{border-color:#e5484d47;color:var(--danger);background:#ffeff0e6}.diagnostic span{display:grid;gap:5px}.diagnostic strong{color:#4c535c;font-size:8px;line-height:1.35}.diagnostic small{color:#858e99;font-size:7px;line-height:1.35}@keyframes statusPulse{50%{opacity:.45;transform:scale(.78)}}.search-box{display:flex;flex:0 0 auto;align-items:center;gap:8px;height:36px;margin-top:13px;padding:0 10px;border:1px solid #dbe1e7;border-radius:8px;color:#8a949f;background:#fff}.search-box:focus-within{border-color:#6eb3da;box-shadow:0 0 0 2px #1689cf12}.search-box input{width:100%;border:0;outline:0;color:#4a5562;background:transparent;font-size:10px}.search-box input::placeholder{color:#a0a7b0}.search-box button{display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer}.search-wrap{position:relative;flex:0 0 auto;margin-top:13px}.search-wrap .search-box{margin-top:0}.search-results{position:absolute;right:0;bottom:42px;left:0;z-index:12;display:grid;gap:4px;padding:8px;border:1px solid #d6dfe7;border-radius:9px;background:#fffffff7;box-shadow:0 12px 30px #28354324;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);animation:searchResultsIn .18s cubic-bezier(.2,.8,.2,1)}.search-results>.eyebrow{padding:1px 3px 5px}.search-results button{display:grid;gap:3px;width:100%;padding:7px 8px;border:0;border-radius:6px;color:#4a5662;background:transparent;text-align:left;cursor:pointer}.search-results button:hover{background:#eff8fc}.search-results strong{overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.search-results small{overflow:hidden;color:#8b96a1;font:7px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.search-results p{margin:4px 2px;color:#939ca6;font-size:8px}.sidebar__footer{display:flex;align-items:center;gap:7px;margin-top:auto;padding-top:13px;border-top:1px solid #e3e7ec;color:#9ba3ac;font-size:8px}.canvas{--semantic-logic-progress: 1;--semantic-evidence-progress: 0;position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;overflow:hidden;background-color:#f8fafc;background-image:linear-gradient(rgba(118,132,148,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.12) 1px,transparent 1px),linear-gradient(rgba(118,132,148,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.045) 1px,transparent 1px);background-size:40px 40px,40px 40px,8px 8px,8px 8px}.canvas:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at center,transparent 45%,rgba(236,240,244,.28) 100%);z-index:1}.canvas-caption{position:absolute;top:16px;left:18px;z-index:7;display:flex;align-items:center;gap:8px;min-height:32px;padding:0 11px;border:1px solid rgba(206,214,222,.9);border-radius:8px;color:#46515d;background:#ffffffe0;box-shadow:0 6px 18px #2f3b480f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.canvas-caption__mark{width:8px;height:8px;border:2px solid #1c95d6;border-radius:50%;box-shadow:0 0 0 3px #1c95d61a}.canvas-caption strong{font-size:9px;letter-spacing:.03em}.canvas-caption small{padding-left:8px;border-left:1px solid #e0e5ea;color:#9099a3;font:7px ui-monospace,SFMono-Regular,Menlo,monospace}.canvas-help{position:absolute;bottom:18px;left:67px;z-index:7;display:flex;align-items:center;gap:6px;max-width:260px;padding:7px 9px;border:1px solid rgba(210,218,226,.9);border-radius:7px;color:#89949f;background:#ffffffdb;box-shadow:0 6px 18px #2f3b480d;font-size:8px;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.canvas-help svg{color:#258dbe;flex:0 0 auto}.layout-toolbar{position:absolute;right:18px;bottom:16px;z-index:7;display:flex;align-items:center;gap:5px;padding:5px;border:1px solid rgba(210,218,226,.9);border-radius:8px;color:#85909c;background:#ffffffe6;box-shadow:0 6px 18px #2f3b480d;font:7px ui-monospace,SFMono-Regular,Menlo,monospace;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.layout-toolbar>span{display:flex;align-items:center;gap:4px;padding:0 4px}.layout-toolbar button{display:grid;place-items:center;width:25px;height:25px;padding:0;border:1px solid #dce3e9;border-radius:5px;color:#6e7a87;background:#fff;cursor:pointer}.layout-toolbar button:hover:not(:disabled){border-color:#7fb9d9;color:#137fb9;background:#f1f9fd}.layout-toolbar button:disabled{opacity:.38;cursor:default}.semantic-zoom{position:absolute;top:16px;right:18px;z-index:7;display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 8px;min-width:190px;padding:8px 11px;border:1px solid rgba(206,214,222,.9);border-radius:8px;color:#7d8792;background:#ffffffe0;box-shadow:0 6px 18px #2f3b480f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:border-color .2s ease,box-shadow .2s ease,transform .2s cubic-bezier(.2,.8,.2,1)}.semantic-zoom>span{font:700 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.semantic-zoom strong{justify-self:end;color:#157db8;font-size:9px;transition:color .22s ease,opacity .22s ease}.semantic-zoom__levels{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:2px 0 1px}.semantic-zoom__levels i{height:2px;border-radius:4px;background:#dfe5eb;transition:background .22s ease,box-shadow .22s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.semantic-zoom__levels i.is-active{background:#2694cf;box-shadow:0 0 0 2px #2694cf14;transform:scaleY(1.4)}.semantic-zoom small{grid-column:1 / -1;color:#9aa2ab;font-size:7px;line-height:1.3}.canvas[data-detail-level=overview] .semantic-zoom strong{color:#667383}.canvas[data-detail-level=evidence] .semantic-zoom strong{color:#7651c8}.canvas[data-navigating=true] .semantic-zoom{border-color:#57a4cf8c;box-shadow:0 8px 22px #2f65861a;transform:translateY(1px)}.canvas .react-flow__edge-text,.canvas .react-flow__edge-textbg,.canvas .blueprint-group__label span{opacity:var(--semantic-logic-progress);transition:opacity .12s linear}.react-flow{z-index:2}.react-flow__pane{cursor:grab}.react-flow__controls{overflow:hidden;border:1px solid #d7dde4;border-radius:8px;box-shadow:0 8px 22px #2e38441a}.react-flow__controls button{border:0;border-bottom:1px solid #e1e6eb;color:#64707d;background:#fffffff2}.react-flow__controls button:hover{color:#137ebc;background:#f1f9fd}.react-flow__controls button svg{fill:currentColor}.react-flow__minimap{border:1px solid #d8dee5;border-radius:8px;background:#ffffffeb;box-shadow:0 8px 22px #2e384414}.react-flow__node-blueprintGroup{z-index:-2!important;pointer-events:none!important}.react-flow__node.is-dimmed{opacity:.12;filter:grayscale(.7)}.react-flow__node.is-outside-path{opacity:.09;filter:grayscale(.8)}.react-flow__node.is-path-pending .blueprint-node__tile{border-color:#91c6e3;box-shadow:0 0 0 3px #1689cf0e,0 9px 25px #2c40520f}.react-flow__node.is-current{z-index:5!important}.react-flow__node.is-current .blueprint-node__tile{border-color:#1689cf;background:#f2faff;box-shadow:0 0 0 4px #1689cf1f,0 0 28px #1689cf38,0 14px 30px #3243521f;transform:translateY(-2px) scale(1.035);animation:nodeScan 1.1s ease-in-out infinite}.react-flow__node.is-current .blueprint-node__tile:before{content:"";position:absolute;z-index:2;top:8px;bottom:8px;width:2px;border-radius:2px;background:#1689cfb8;box-shadow:0 0 10px #1689cf99;animation:scanLine 1.1s ease-in-out infinite}.react-flow__node.is-chain-complete .blueprint-node__tile{border-color:var(--healthy);background:#f3fbf8;box-shadow:0 0 0 3px #1f9d7217,0 10px 24px #1f5f4914}.react-flow__node.is-chain-warning .blueprint-node__tile{border-color:var(--warning);background:#fffbf1;box-shadow:0 0 0 3px #d99a241a,0 0 24px #d99a2429}.react-flow__node.is-chain-error{z-index:6!important}.react-flow__node.is-chain-error .blueprint-node__tile{border-color:var(--danger);background:#fff3f4;box-shadow:0 0 0 4px #e5484d1f,0 0 30px #e5484d38,0 14px 30px #5426281a;animation:errorFlash .72s ease-in-out 2}.react-flow__node.is-chain-error .blueprint-node h3{color:#bd353a}.react-flow__node.is-search-spotlight{z-index:7!important}.react-flow__node.is-search-spotlight .blueprint-node__tile{border-color:#2d9ed8;box-shadow:0 0 0 5px #2391cf21,0 0 28px #1e8dcc40,0 12px 30px #3243521c;animation:searchSpotlight 1.45s ease-out}.react-flow__node.is-pinned .blueprint-node__tile:after{border-color:#6061ca5c}.react-flow__node.is-pinned .blueprint-node__tile{box-shadow:0 0 0 2px #5e5bd41a,0 9px 25px #2c40520f}.react-flow__node.is-expanded .blueprint-node__tile{border-color:#4b9dcc;box-shadow:0 0 0 4px #348fc81a,0 12px 29px #2c40521c}.react-flow__node.is-branch-entering{animation:branchEnter .42s cubic-bezier(.2,.8,.2,1)}.react-flow__node.is-branch-exiting{animation:branchExit .42s ease both}.react-flow__node.is-branch-shared{transition:opacity .18s ease,filter .18s ease,transform .18s ease}.react-flow__node.detail-node-enter{animation:detailEnter .28s cubic-bezier(.2,.8,.2,1) both}.chain-edge--current path{filter:drop-shadow(0 0 4px rgba(22,137,207,.55))}.chain-edge--warning path{filter:drop-shadow(0 0 4px rgba(217,154,36,.46))}.chain-edge--error path{filter:drop-shadow(0 0 5px rgba(229,72,77,.62))}.react-flow__edge.detail-edge{pointer-events:none}.react-flow__edge.is-branch-entering{animation:edgeEnter .42s ease both}.react-flow__edge.is-branch-exiting{animation:edgeExit .42s ease both}@keyframes nodeScan{50%{box-shadow:0 0 0 5px #1689cf14,0 0 36px #1689cf4d,0 14px 30px #3243521f}}@keyframes scanLine{0%,to{left:12px;opacity:.35}50%{left:72px;opacity:.95}}@keyframes errorFlash{50%{filter:brightness(1.03);transform:translateY(-1px) scale(1.035)}}@keyframes detailEnter{0%{opacity:0;transform:translateY(-10px) scale(.96)}}@keyframes branchEnter{0%{opacity:.15;transform:scale(.97)}}@keyframes branchExit{to{opacity:.11;filter:grayscale(.6)}}@keyframes edgeEnter{0%{opacity:.1}}@keyframes edgeExit{to{opacity:.1}}@keyframes searchSpotlight{0%{transform:scale(.97)}40%{transform:scale(1.035)}to{transform:scale(1)}}@keyframes searchResultsIn{0%{opacity:0;transform:translateY(5px)}}.evidence-panel{position:fixed;top:58px;right:0;bottom:0;z-index:12;width:344px;padding:23px 20px;border-left:1px solid #d9dfe5;background:#fbfcfdf7;box-shadow:-18px 0 40px #2d37421f;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);overflow:auto;animation:evidencePanelIn .24s cubic-bezier(.2,.8,.2,1)}.evidence-panel__header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.evidence-panel__header h2{margin:7px 0 0;color:#2b3139;font-size:19px;letter-spacing:-.035em}.evidence-panel__header button{display:grid;place-items:center;padding:6px;border:0;border-radius:6px;color:#7f8995;background:transparent;cursor:pointer}.evidence-panel__header button:hover{color:#287da9;background:#edf6fb}.evidence-panel__description{margin:12px 0 20px;color:#757f8b;font-size:11px;line-height:1.6}.confidence-card{padding:14px;border:1px solid #dfe4ea;border-radius:10px;background:#fffc}.confidence-card>div:first-child{display:flex;justify-content:space-between;color:#78828e;font-size:10px}.confidence-card strong{color:#167fb9;font-size:13px}.confidence-track{height:4px;margin:10px 0;border-radius:8px;background:#e4e8ed;overflow:hidden}.confidence-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1689cf,#5bb8df)}.confidence-card small{display:block;color:#858f9a;font-size:9px;line-height:1.45}.canvas-caption--focus{display:flex;align-items:baseline;gap:9px}.canvas-caption--focus button{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;color:#3d8fc4;background:none;font:inherit;font-size:10px;cursor:pointer}.canvas-caption--focus button:hover{text-decoration:underline}.canvas-caption--focus button:after{content:"›";margin-left:5px;color:#a7b1bb}.evidence-breadcrumb{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.evidence-breadcrumb button{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;color:#3d8fc4;background:none;font:inherit;font-size:11px;cursor:pointer}.evidence-breadcrumb button:hover{text-decoration:underline}.evidence-breadcrumb button:after{content:"›";margin-left:4px;color:#a7b1bb}.evidence-breadcrumb>span{color:#33404c;font-size:14px;font-weight:600;overflow-wrap:anywhere}.detail-node--depth-2 .blueprint-code-node{border-style:dashed;opacity:.92}.blueprint-code-node.is-expanded{border-color:#7fb6d8;box-shadow:0 3px 10px #207ab117}.product-card{display:grid;gap:8px;margin-top:14px;padding:13px;border:1px dashed #d8e0e6;border-radius:10px;background:#f7fafcd9}.product-card .eyebrow{margin:0}.product-card__empty{margin:0;color:#8b96a1;font-size:9px;line-height:1.5}.product-card__claim{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.product-card__claim strong{color:#4a5560;font-size:11px}.product-card__claim em{flex:none;color:#7c8792;font-size:9px;font-style:normal}.product-card__match{display:flex;align-items:center;gap:9px}.product-card__match span{color:#8b959f;font-size:9px}.product-card__match .confidence-track{flex:1;margin:0}.product-card__match strong{color:#5f83a0;font-size:10px}.product-card small{color:#8b959f;font-size:9px;line-height:1.45}.product-card__source{color:#7d8994;font:8px ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere}.evidence-list{display:flex;flex-direction:column;gap:9px;margin-top:23px}.evidence-list .eyebrow{margin-bottom:2px}.evidence-list article,.evidence-list button{display:grid;gap:5px;width:100%;padding:11px;border:1px solid #dfe4e9;border-radius:8px;color:inherit;background:#ffffffbf;text-align:left;cursor:pointer;transition:.16s ease}.evidence-list button:hover,.evidence-list button.is-active{border-color:#86bddd;background:#f4fbfe;box-shadow:0 4px 12px #207ab10f}.evidence-list code{overflow:hidden;color:#247ca9;font:9px ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.evidence-list span,.evidence-list small{color:#8a949f;font-size:8px}.source-preview{display:grid;gap:8px;margin-top:22px}.source-preview>p{margin:0;padding:10px;border:1px dashed #d7dfe6;border-radius:7px;color:#8b96a1;font-size:8px}.source-preview pre{max-height:330px;margin:0;overflow:auto;border:1px solid #dfe5eb;border-radius:8px;color:#4e5965;background:#f7f9fb}.source-preview pre code{display:grid;grid-template-columns:34px minmax(0,1fr);min-width:max-content;padding:2px 7px 2px 0;font:8px/1.52 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre}.source-preview pre code i{padding-right:7px;color:#a2abb4;font-style:normal;text-align:right;-webkit-user-select:none;user-select:none}.source-preview pre code span{color:#58636f}.source-preview pre code.is-highlighted{border-left:2px solid #3c9ed4;padding-left:0;background:#eaf7fd}.raw-reference{display:grid;gap:7px;margin-top:22px;padding-top:17px;border-top:1px solid #e0e5ea}.raw-reference span{color:#8d96a1;font-size:9px}.raw-reference code{color:#77818d;font:8px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap}.state-screen{display:grid;place-items:center;align-content:center;min-height:100vh;padding:30px;text-align:center;background-color:#f8fafc;background-image:linear-gradient(rgba(118,132,148,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(118,132,148,.1) 1px,transparent 1px);background-size:40px 40px}.state-logo{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;color:#e7f8ff;background:#26313e;box-shadow:0 10px 30px #26313e2e}.state-screen h1{margin:17px 0 5px;color:#2c333b;font-size:22px}.state-screen p{color:#7f8995;font-size:12px}.state-screen code{margin-top:15px;color:#237eac;font-size:10px}.state-screen--error .state-logo{background:var(--danger)}.loader{width:96px;height:2px;margin-top:20px;background:linear-gradient(90deg,transparent,#1689cf,transparent);animation:pulse 1.1s infinite}@keyframes pulse{50%{opacity:.3;transform:scaleX(.7)}}@keyframes evidencePanelIn{0%{opacity:0;transform:translate(18px)}}@media(prefers-reduced-motion:reduce){.semantic-zoom,.semantic-zoom strong,.semantic-zoom__levels i,.canvas .react-flow__edge-text,.canvas .react-flow__edge-textbg,.canvas .blueprint-group__label span{transition-duration:.01ms!important}.evidence-panel,.react-flow__node.is-current .blueprint-node__tile,.react-flow__node.is-current .blueprint-node__tile:before,.react-flow__node.is-chain-error .blueprint-node__tile,.react-flow__node.is-branch-entering,.react-flow__node.is-branch-exiting,.react-flow__node.detail-node-enter,.react-flow__node.is-search-spotlight,.react-flow__edge.is-branch-entering,.react-flow__edge.is-branch-exiting,.search-results{animation:none!important}}@media(max-width:820px){.app-shell{grid-template:52px minmax(0,1fr) / 1fr}.topbar{grid-template-columns:auto 1fr}.brand{border:0}.breadcrumb,.topbar__meta,.sidebar{display:none}.topbar__actions{margin-left:auto}.canvas{grid-column:1}.canvas-caption{top:12px;left:12px}.semantic-zoom{top:12px;right:12px;min-width:0}.semantic-zoom small,.canvas-help{display:none}.layout-toolbar{right:12px;bottom:58px}.evidence-panel{top:52px;width:min(344px,90vw)}}.canvas[data-lod=feature] .react-flow__node.is-outside-path{opacity:.11;filter:grayscale(.85)}.canvas[data-lod=feature] .react-flow__node:not(.is-outside-path),.canvas[data-lod=feature] .react-flow__edge:not(.chain-edge--outside){transition:opacity .32s ease,transform .32s ease}.canvas .react-flow__node{transition:transform .32s ease,opacity .32s ease}.canvas .react-flow__edge path{transition:stroke .26s ease,stroke-width .26s ease,opacity .26s ease}@media(prefers-reduced-motion:reduce){.canvas .react-flow__node,.canvas .react-flow__edge path{transition:none}}.chain-edge--retry path{stroke-linecap:round}.chain-edge--loop path{stroke-linecap:round}.chain-edge--bus path{stroke-linejoin:round}.view-toolbar{position:absolute;top:14px;right:300px;z-index:6;display:inline-flex;gap:2px;padding:3px;border:1px solid #d8dee5;border-radius:999px;background:#fffffff0;box-shadow:0 6px 18px #2e384414}.view-toolbar button{padding:4px 13px;border:0;border-radius:999px;background:transparent;color:#5b6773;font-size:12px;cursor:pointer;transition:background .18s ease,color .18s ease}.view-toolbar button.is-active{background:#147fc1;color:#fff}.view-toolbar button:not(.is-active):hover{background:#eef4f9;color:#14202e}.name-source{display:flex;gap:6px;align-items:baseline;margin:6px 0 0;font-size:12px;color:#5b6773}.name-source code{font-size:11.5px;color:#14202e}.pending-flag{margin-left:8px;padding:2px 8px;border-radius:999px;background:#94845a24;color:#7a6a45;font-size:11.5px;font-style:normal;font-weight:600}.pending-flag--inline{margin-left:6px;padding:1px 6px;font-size:10.5px}