@rivet-dev/agentos 0.2.21 → 0.4.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.
Files changed (38) hide show
  1. package/assets/inspector-tabs-app/assets/{agentos-hero-logo-E3fapwXM.svg → agentos-hero-logo-BL8gBiZH.svg} +1 -1
  2. package/assets/inspector-tabs-app/assets/{sed-BwsOyU9v.svg → coreutils-CQXb6ysD.svg} +1 -1
  3. package/assets/inspector-tabs-app/assets/filesystem-C9Z7HA3k.js +1 -0
  4. package/assets/inspector-tabs-app/assets/{hooks-DU8a-cwM.js → hooks-DaKa0v02.js} +1 -1
  5. package/assets/inspector-tabs-app/assets/index-BQ48yGn7.css +1 -0
  6. package/assets/inspector-tabs-app/assets/index-bwUfaXzS.js +126 -0
  7. package/assets/inspector-tabs-app/assets/processes-CZ6M0f6m.js +4 -0
  8. package/assets/inspector-tabs-app/assets/scroll-area-BN1MPKEE.js +1 -0
  9. package/assets/inspector-tabs-app/assets/system-CXd1uvC-.js +1 -0
  10. package/assets/inspector-tabs-app/assets/terminal-yincB5PP.js +13 -0
  11. package/assets/inspector-tabs-app/assets/useMutation-CmlocRNE.js +1 -0
  12. package/assets/inspector-tabs-app/assets/vm-status-badges-C7eIpgyG.js +1 -0
  13. package/assets/inspector-tabs-app/index.html +2 -2
  14. package/dist/index.d.ts +2861 -448
  15. package/dist/index.js +33 -1924
  16. package/dist/index.js.map +1 -1
  17. package/package.json +60 -114
  18. package/assets/inspector-tabs-app/assets/filesystem-C-x0K5sy.js +0 -1
  19. package/assets/inspector-tabs-app/assets/index-7G_DbdZ6.js +0 -110
  20. package/assets/inspector-tabs-app/assets/index-DG_s1YoH.css +0 -1
  21. package/assets/inspector-tabs-app/assets/scroll-area-kPbv4IGy.js +0 -1
  22. package/assets/inspector-tabs-app/assets/system-D98yBhMj.js +0 -2
  23. package/assets/inspector-tabs-app/assets/terminal-Bv9GKv4q.js +0 -13
  24. package/assets/inspector-tabs-app/assets/transcript-kMbm_tF8.js +0 -1
  25. package/assets/inspector-tabs-app/assets/useSuspenseQuery-ChN8rnBd.js +0 -1
  26. package/assets/inspector-tabs-app/assets/vm-boot-gate-rpuO0b5W.js +0 -1
  27. package/assets/inspector-tabs-app/assets/vm-status-badges-09qyfN_A.js +0 -5
  28. package/dist/chunk-V6TY7KAL.js +0 -8
  29. package/dist/chunk-V6TY7KAL.js.map +0 -1
  30. package/dist/client.d.ts +0 -2
  31. package/dist/client.js +0 -3
  32. package/dist/client.js.map +0 -1
  33. package/dist/node.d.ts +0 -67
  34. package/dist/node.js +0 -275
  35. package/dist/node.js.map +0 -1
  36. package/dist/react.d.ts +0 -1
  37. package/dist/react.js +0 -3
  38. package/dist/react.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ var Q=Object.defineProperty;var D=(s,t,n)=>t in s?Q(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n;var S=(s,t,n)=>D(s,typeof t!="symbol"?t+"":t,n);import{u as M,r as b,w as $,j as e,x as _,C as L,d as P,y as K,g as F,a as I}from"./index-bwUfaXzS.js";import{k as V,Q as H,i as z,P as A,l as G,a as y,V as X}from"./vm-status-badges-C7eIpgyG.js";import{b as Y}from"./hooks-DaKa0v02.js";function O(s,t){return V({...s,enabled:!0,suspense:!0,throwOnError:z,placeholderData:void 0},H)}function g(s){return s.process?`${s.process.generation}:tracked:${s.process.pid}`:`${s.generation}:guest:${s.pid}`}const U=8;async function J(s,t,n,o){const l=[];let a=n,c=!1,x=!1,v;for(let j=0;j<U;j++){o==null||o.throwIfAborted();const i=await s(a);if(o==null||o.throwIfAborted(),BigInt(i.generation)!==BigInt(t))throw new Error("Process replay returned a different VM generation");if(i.events.length>A.maxEvents)throw new Error("Process replay exceeded the requested event page limit");let u=a,r=0;const d=[];for(const h of i.events){if(h.sequence<0||typeof h.sequence=="number"&&!Number.isSafeInteger(h.sequence)||u!==void 0&&h.sequence<=u)throw new Error("Process replay returned out-of-order sequences");x||(x=BigInt(h.sequence)>BigInt(u??-1)+1n),u=h.sequence;const N=G(h.data);if(r+=N.byteLength,r>A.maxBytes)throw new Error("Process replay exceeded the requested byte page limit");d.push({...h,data:N})}const m=i.nextCursor??void 0;if(m!==void 0&&(m<0||typeof m=="number"&&!Number.isSafeInteger(m))||i.hasMore&&i.events.length===0||i.events.length>0&&m===void 0||m!==void 0&&BigInt(m)!==BigInt(u??-1)&&!(i.truncated&&!i.hasMore&&BigInt(m)>BigInt(u??-1)))throw new Error("Process replay did not advance its cursor");if(l.push(...d),a=m??a,x||(x=i.truncated),v=i.end??v,c=i.hasMore,!c)break}return{events:l,nextCursor:a,hasMore:c,truncated:x,end:v}}class W{constructor(){S(this,"streams",{stdout:new TextDecoder,stderr:new TextDecoder});S(this,"sequence")}decode(t){return this.sequence!==void 0&&BigInt(t.sequence)!==BigInt(this.sequence)+1n&&this.reset(),this.sequence=t.sequence,this.streams[t.stream].decode(t.data,{stream:!0})}reset(){this.streams={stdout:new TextDecoder,stderr:new TextDecoder},this.sequence=void 0}finish(){return this.streams.stdout.decode()+this.streams.stderr.decode()}}function R(s){return s?new Date(s).toLocaleTimeString():"—"}function T(s,t=0,n=[]){const o=[...s].sort((l,a)=>+(a.status==="running")-+(l.status==="running")||a.startTime-l.startTime);for(const l of o){const{children:a,...c}=l;n.push({...c,args:c.args??[],depth:t}),T(a??[],t+1,n)}return n}function B(s){if(!s.process)throw new Error("This guest process has no actor process handle");return s.process}const Z=64e3;function ee(s,t){const n=t==null?void 0:t.generation,o=t==null?void 0:t.pid,[l,a]=b.useState(""),[c,x]=b.useState(null),[v,j]=b.useState(!1);return b.useEffect(()=>{if(n===void 0||o===void 0)return;let i=!1,u=!1,r,d=!1;const m=new AbortController,h=new W,N=async()=>{if(!(u||i)){u=!0;try{const f=await J(y.processOutputReader(n,o),n,r,m.signal);if(i)return;f.truncated&&j(!0),r=f.nextCursor??r;let E=f.events.map(C=>h.decode(C)).join("");const q=f.truncated?`
2
+ [earlier output was truncated]
3
+ `:"",w=!f.hasMore&&f.end&&!d?`
4
+ [exited ${f.end.exitCode}]`:"";w&&(E+=h.finish()),w&&(d=!0),(E||q||w)&&a(C=>(C+q+E+w).slice(-Z)),x(null)}catch(f){i||x(f)}finally{u=!1}}};N();const k=window.setInterval(()=>void N(),2e3);return()=>{i=!0,m.abort(),window.clearInterval(k)}},[s,n,o]),{output:l,error:c,historyTruncated:v}}function p({label:s,value:t}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-muted-foreground/70",children:s}),e.jsx("div",{className:"truncate font-mono",title:t,children:t})]})}function te({actorId:s,p:t,onStop:n,onKill:o,actionError:l}){const a=ee(s,t.process),{armed:c,confirm:x}=Y({resetKey:g(t)});return e.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 text-xs",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 sm:grid-cols-4",children:[e.jsx(p,{label:"ppid",value:t.ppid?String(t.ppid):"—"}),e.jsx(p,{label:"cwd",value:t.cwd||"—"}),e.jsx(p,{label:"driver",value:t.driver||"—"}),e.jsx(p,{label:"exit code",value:t.exitCode==null?"—":String(t.exitCode)}),e.jsx(p,{label:"args",value:t.args.join(" ")||"—"}),e.jsx(p,{label:"first seen",value:R(t.startTime)}),e.jsx(p,{label:"exit observed",value:t.exitTime==null?"—":F(t.exitTime)}),e.jsx(p,{label:"group / session",value:`${t.pgid} / ${t.sid}`})]}),t.status==="running"&&t.process?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>x("stop",n),className:"rounded border px-2 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c==="stop"?"Confirm stop?":"Stop"}),e.jsx("button",{type:"button",onClick:()=>x("kill",o),className:"rounded border border-destructive/40 px-2 py-0.5 text-destructive transition-colors hover:bg-destructive/10",children:c==="kill"?"Confirm kill?":"Kill"})]}):null,t.process?null:e.jsx("div",{className:"text-muted-foreground/60",children:"Control and output replay are available only for processes started through this actor."}),l?e.jsx(I,{error:l,className:"p-0"}):null,a.error?e.jsx(I,{error:a.error,className:"p-0"}):null,a.historyTruncated?e.jsx("div",{className:"text-muted-foreground",children:"Some earlier output is no longer available."}):null,a.output?e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-muted-foreground/70",children:"Output (replay, latest 64,000 characters)"}),e.jsx("pre",{className:"max-h-48 overflow-y-auto whitespace-pre-wrap break-words rounded bg-muted/50 p-2 font-mono text-[11px] leading-relaxed",children:a.output})]}):t.process?e.jsx("div",{className:"text-muted-foreground/60",children:"No captured output for this process."}):null]})}function ie(s){const{data:t}=O(y.processTreeQueryOptions(s)),n=T(t);return{running:n.filter(o=>o.status==="running").length,total:n.length}}function se({actorId:s}){const{data:t}=O(y.processTreeQueryOptions(s)),n=M(),[o,l]=b.useState(null),[a,c]=b.useState(null),x=T(t),j=$().useEvent;j("processExit",r=>{const d=r;!d||typeof d.pid!="number"||n.invalidateQueries({queryKey:y.processTreeQueryOptions(s).queryKey})});const i=()=>n.invalidateQueries({queryKey:y.processTreeQueryOptions(s).queryKey}),u=async r=>{c(null);try{await r(),await i()}catch(d){c(d)}};return x.length===0?e.jsx("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:"No processes in the VM."}):e.jsx("div",{className:"max-h-96 overflow-y-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"sticky top-0 bg-secondary text-[11px] text-muted-foreground",children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"w-8 px-3 py-2","aria-label":"Expand"}),e.jsx("th",{className:"w-16 px-2 py-2 text-left font-medium",children:"PID"}),e.jsx("th",{className:"px-2 py-2 text-left font-medium",children:"Command"}),e.jsx("th",{className:"w-28 px-2 py-2 text-left font-medium",children:"First seen"}),e.jsx("th",{className:"w-28 px-2 py-2 text-left font-medium",children:"Status"})]})}),e.jsx("tbody",{children:x.map(r=>e.jsxs(_.Fragment,{children:[e.jsxs("tr",{onClick:()=>l(d=>d===g(r)?null:g(r)),className:P("cursor-pointer border-b border-foreground/[0.06] hover:bg-muted/50",o===g(r)&&"bg-muted/40",r.status==="exited"&&"opacity-50"),children:[e.jsx("td",{className:"px-3 py-1.5",children:e.jsx(L,{className:P("size-3 text-muted-foreground/60 transition-transform",o===g(r)&&"rotate-90")})}),e.jsx("td",{className:"px-2 py-1.5 font-mono",children:r.pid}),e.jsx("td",{className:"px-2 py-1.5 font-mono text-xs",children:e.jsxs("span",{style:{paddingLeft:`${r.depth*14}px`},children:[r.depth>0?e.jsx("span",{className:"text-muted-foreground/40",children:"└ "}):null,r.command,r.args.length>0?e.jsxs("span",{className:"text-muted-foreground/60",children:[" ",r.args.join(" ")]}):null]})}),e.jsx("td",{className:"px-2 py-1.5 font-mono text-xs text-muted-foreground",children:R(r.startTime)}),e.jsx("td",{className:"px-2 py-1.5",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs",children:[e.jsx(K,{color:r.status==="running"?"green":"muted"}),r.status]})})]}),o===g(r)?e.jsx("tr",{className:"border-b border-foreground/[0.06] bg-muted/20",children:e.jsx("td",{colSpan:5,children:e.jsx(te,{actorId:s,p:r,onStop:()=>void u(()=>{const d=B(r);return y.stopProcess(d.generation,d.pid)}),onKill:()=>void u(()=>{const d=B(r);return y.killProcess(d.generation,d.pid)}),actionError:a},`${s}:${g(r)}`)})}):null]},g(r)))})]})})}function de({actorId:s}){return e.jsxs("div",{className:"relative h-full min-h-0 overflow-auto p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx("h1",{className:"text-sm font-semibold",children:"Processes"}),e.jsx("span",{className:"ml-auto"}),e.jsx(X,{actorId:s})]}),e.jsx("div",{className:"overflow-hidden rounded-lg border bg-secondary",children:e.jsx(se,{actorId:s})})]})}export{se as ProcessTable,de as ProcessesTabConnected,ie as useProcessCounts};
@@ -0,0 +1 @@
1
+ import{r as i,o as Le,j as S,v as je,d as Me}from"./index-bwUfaXzS.js";var Ie=Object.defineProperty,re=(t,e)=>Ie(t,"name",{value:e,configurable:!0});function Z(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}re(Z,"setRef");function ie(...t){return e=>{let r=!1;const o=t.map(n=>{const c=Z(n,e);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let n=0;n<o.length;n++){const c=o[n];typeof c=="function"?c():Z(t[n],null)}}}}re(ie,"composeRefs");function O(...t){return i.useCallback(ie(...t),t)}re(O,"useComposedRefs");var We=Object.defineProperty,E=(t,e)=>We(t,"name",{value:e,configurable:!0});function ae(t){const e=i.forwardRef((r,o)=>{let{children:n,...c}=r,l=null,a=!1;const s=[];G(n)&&typeof X=="function"&&(n=X(n._payload)),i.Children.forEach(n,m=>{var h;if(fe(m)){a=!0;const p=m;let v="child"in p.props?p.props.child:p.props.children;G(v)&&typeof X=="function"&&(v=X(v._payload)),l=Ue(p,v),s.push((h=l==null?void 0:l.props)==null?void 0:h.children)}else s.push(m)}),l?l=i.cloneElement(l,void 0,s):!a&&i.Children.count(n)===1&&i.isValidElement(n)&&(l=n);const u=l?de(l):void 0,f=O(o,u);if(!l){if(n||n===0)throw new Error(a?Fe(t):ze(t));return n}const d=ue(c,l.props??{});return l.type!==i.Fragment&&(d.ref=o?f:u),i.cloneElement(l,d)});return e.displayName=`${t}.Slot`,e}E(ae,"createSlot");var se=Symbol.for("radix.slottable");function $e(t){const e=E(r=>"child"in r?r.children(r.child):r.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=se,e}E($e,"createSlottable");var Ue=E((t,e)=>{if("child"in t.props){const r=t.props.child;return i.isValidElement(r)?i.cloneElement(r,void 0,t.props.children(r.props.children)):null}return i.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function ue(t,e){const r={...e};for(const o in e){const n=t[o],c=e[o];/^on[A-Z]/.test(o)?n&&c?r[o]=(...a)=>{const s=c(...a);return n(...a),s}:n&&(r[o]=n):o==="style"?r[o]={...n,...c}:o==="className"&&(r[o]=[n,c].filter(Boolean).join(" "))}return{...t,...r}}E(ue,"mergeProps");function de(t){var o,n;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}E(de,"getElementRef");function fe(t){return i.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===se}E(fe,"isSlottable");var Ve=Symbol.for("react.lazy");function G(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Ve&&"_payload"in t&&he(t._payload)}E(G,"isLazyComponent");function he(t){return typeof t=="object"&&t!==null&&"then"in t}E(he,"isPromiseLike");var ze=E(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Fe=E(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),X=Le[" use ".trim().toString()],He=Object.defineProperty,Ye=(t,e)=>He(t,"name",{value:e,configurable:!0}),ke=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=ke.reduce((t,e)=>{const r=ae(`Primitive.${e}`),o=i.forwardRef((n,c)=>{const{asChild:l,...a}=n,s=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(s,{...a,ref:c})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function Xe(t,e){t&&je.flushSync(()=>t.dispatchEvent(e))}Ye(Xe,"dispatchDiscreteCustomEvent");var J=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Be=Object.defineProperty,R=(t,e)=>Be(t,"name",{value:e,configurable:!0});function pe(t,e){return i.useReducer((r,o)=>e[r][o]??r,t)}R(pe,"useStateMachine");var B=R(t=>{const{present:e,children:r}=t,o=me(e),n=typeof r=="function"?r({present:o.isPresent}):i.Children.only(r),c=Se(o.ref,be(n));return typeof r=="function"||o.isPresent?i.cloneElement(n,{ref:c}):null},"Presence");function me(t){const[e,r]=i.useState(),o=i.useRef(null),n=i.useRef(t),c=i.useRef("none"),l=i.useRef(void 0),a=t?"mounted":"unmounted",[s,u]=pe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{s==="mounted"?(c.current=l.current??L(o.current),l.current=void 0):c.current="none"},[s]),J(()=>{const f=o.current,d=n.current;if(d!==t){const h=c.current,p=L(f);t?(l.current=p,u("MOUNT")):p==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,u]),J(()=>{if(e){let f;const d=e.ownerDocument.defaultView??window,m=R(p=>{const g=L(o.current).includes(CSS.escape(p.animationName));if(p.target===e&&g&&(u("ANIMATION_END"),!n.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",f=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},"handleAnimationEnd"),h=R(p=>{p.target===e&&(c.current=L(o.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{d.clearTimeout(f),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(f=>{if(f){const d=getComputedStyle(f);o.current=d,l.current=L(d)}else o.current=null;r(f)},[])}}R(me,"usePresence");function K(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}R(K,"setRef");function Se(...t){const e=i.useRef(t);return e.current=t,i.useCallback(r=>{const o=e.current;let n=!1;const c=o.map(l=>{const a=K(l,r);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let l=0;l<c.length;l++){const a=c[l];typeof a=="function"?a():K(o[l],null)}}},[])}R(Se,"useStableComposedRefs");function L(t){return(t==null?void 0:t.animationName)||"none"}R(L,"getAnimationName");function be(t){var o,n;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}R(be,"getElementRef");var qe=Object.defineProperty,P=(t,e)=>qe(t,"name",{value:e,configurable:!0});function Ze(t,e){const r=i.createContext(e);r.displayName=t+"Context";const o=P(c=>{const{children:l,...a}=c,s=i.useMemo(()=>a,Object.values(a));return S.jsx(r.Provider,{value:s,children:l})},"Provider");o.displayName=t+"Provider";function n(c,l={}){const{optional:a=!1}=l,s=i.useContext(r);if(s)return s;if(e!==void 0)return e;if(!a)throw new Error(`\`${c}\` must be used within \`${t}\``)}return P(n,"useContext"),[o,n]}P(Ze,"createContext");function ve(t,e=[]){let r=[];function o(c,l){const a=i.createContext(l);a.displayName=c+"Context";const s=r.length;r=[...r,l];const u=P(d=>{var x;const{scope:m,children:h,...p}=d,v=((x=m==null?void 0:m[t])==null?void 0:x[s])||a,g=i.useMemo(()=>p,Object.values(p));return S.jsx(v.Provider,{value:g,children:h})},"Provider");u.displayName=c+"Provider";function f(d,m,h={}){var x;const{optional:p=!1}=h,v=((x=m==null?void 0:m[t])==null?void 0:x[s])||a,g=i.useContext(v);if(g)return g;if(l!==void 0)return l;if(!p)throw new Error(`\`${d}\` must be used within \`${c}\``)}return P(f,"useContext"),[u,f]}P(o,"createContext");const n=P(()=>{const c=r.map(l=>i.createContext(l));return P(function(a){const s=(a==null?void 0:a[t])||c;return i.useMemo(()=>({[`__scope${t}`]:{...a,[t]:s}}),[a,s])},"useScope")},"createScope");return n.scopeName=t,[o,we(n,...e)]}P(ve,"createContextScope");function we(...t){const e=t[0];if(t.length===1)return e;const r=P(()=>{const o=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return P(function(c){const l=o.reduce((a,{useScope:s,scopeName:u})=>{const d=s(c)[`__scope${u}`];return{...a,...d}},{});return i.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return r.scopeName=e.scopeName,r}P(we,"composeContextScopes");var Ge=Object.defineProperty,Je=(t,e)=>Ge(t,"name",{value:e,configurable:!0});function _(t){const e=i.useRef(t);return i.useEffect(()=>{e.current=t}),i.useMemo(()=>(...r)=>{var o;return(o=e.current)==null?void 0:o.call(e,...r)},[])}Je(_,"useCallbackRef");var Ke=Object.defineProperty,Qe=(t,e)=>Ke(t,"name",{value:e,configurable:!0}),et=i.createContext(void 0);function ge(t){const e=i.useContext(et);return t||e||"ltr"}Qe(ge,"useDirection");var tt=Object.defineProperty,rt=(t,e)=>tt(t,"name",{value:e,configurable:!0});function Pe(t,[e,r]){return Math.min(r,Math.max(e,t))}rt(Pe,"clamp");var ot=Object.defineProperty,j=(t,e)=>ot(t,"name",{value:e,configurable:!0}),Ce=!!(typeof window<"u"&&window.document&&window.document.createElement);function T(t,e,{checkForDefaultPrevented:r=!0}={}){return j(function(n){if(t==null||t(n),r===!1||!n||!n.defaultPrevented)return e==null?void 0:e(n)},"handleEvent")}j(T,"composeEventHandlers");function nt(t){var e;if(!Ce)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}j(nt,"getOwnerWindow");function Q(t){if(!Ce)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}j(Q,"getOwnerDocument");function xe(t,e=!1){const{activeElement:r}=Q(t);if(!(r!=null&&r.nodeName))return null;if(Ae(r)&&r.contentDocument)return xe(r.contentDocument.body,e);if(e){const o=r.getAttribute("aria-activedescendant");if(o){const n=Q(r).getElementById(o);if(n)return n}}return r}j(xe,"getActiveElement");function Ae(t){return t.tagName==="IFRAME"}j(Ae,"isFrame");var lt=Object.defineProperty,b=(t,e)=>lt(t,"name",{value:e,configurable:!0});function Ee(t,e){return i.useReducer((r,o)=>e[r][o]??r,t)}b(Ee,"useStateMachine");var Re="ScrollArea",[ye,_t]=ve(Re),[ct,C]=ye(Re),it=i.forwardRef(b(function(e,r){const{__scopeScrollArea:o,type:n="hover",dir:c,scrollHideDelay:l=600,...a}=e,[s,u]=i.useState(null),[f,d]=i.useState(null),[m,h]=i.useState(null),[p,v]=i.useState(null),[g,x]=i.useState(null),[N,z]=i.useState(0),[q,F]=i.useState(0),[H,M]=i.useState(!1),[Y,I]=i.useState(!1),w=O(r,u),A=ge(c);return S.jsx(ct,{scope:o,type:n,dir:A,scrollHideDelay:l,scrollArea:s,viewport:f,onViewportChange:d,content:m,onContentChange:h,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:H,onScrollbarXEnabledChange:M,scrollbarY:g,onScrollbarYChange:x,scrollbarYEnabled:Y,onScrollbarYEnabledChange:I,onCornerWidthChange:z,onCornerHeightChange:F,children:S.jsx($.div,{dir:A,...a,ref:w,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":q+"px",...e.style}})})},"ScrollArea")),at="ScrollAreaViewport",st=i.forwardRef(b(function(e,r){const{__scopeScrollArea:o,children:n,nonce:c,...l}=e,a=C(at,o),s=i.useRef(null),u=O(r,s,a.onViewportChange);return S.jsxs(S.Fragment,{children:[S.jsx(ut,{nonce:c}),S.jsx($.div,{"data-radix-scroll-area-viewport":"",...l,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:S.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})},"ScrollAreaViewport")),ut=i.memo(b(function({nonce:e}){return S.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(t,e)=>t.nonce===e.nonce),y="ScrollAreaScrollbar",dt=i.forwardRef(b(function(e,r){const{forceMount:o,...n}=e,c=C(y,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=c,s=e.orientation==="horizontal";return i.useEffect(()=>(s?l(!0):a(!0),()=>{s?l(!1):a(!1)}),[s,l,a]),c.type==="hover"?S.jsx(ft,{...n,ref:r,forceMount:o}):c.type==="scroll"?S.jsx(ht,{...n,ref:r,forceMount:o}):c.type==="auto"?S.jsx(_e,{...n,ref:r,forceMount:o}):c.type==="always"?S.jsx(oe,{...n,ref:r,"data-state":"visible"}):null},"ScrollAreaScrollbar")),ft=i.forwardRef(b(function(e,r){const{forceMount:o,...n}=e,c=C(y,e.__scopeScrollArea),[l,a]=i.useState(!1);return i.useEffect(()=>{const s=c.scrollArea;let u=0;if(s){const f=b(()=>{window.clearTimeout(u),a(!0)},"handlePointerEnter"),d=b(()=>{u=window.setTimeout(()=>a(!1),c.scrollHideDelay)},"handlePointerLeave");return s.addEventListener("pointerenter",f),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",f),s.removeEventListener("pointerleave",d)}}},[c.scrollArea,c.scrollHideDelay]),S.jsx(B,{present:o||l,children:S.jsx(_e,{"data-state":l?"visible":"hidden",...n,ref:r})})},"ScrollAreaScrollbarHover")),ht=i.forwardRef(b(function(e,r){const{forceMount:o,...n}=e,c=C(y,e.__scopeScrollArea),l=e.orientation==="horizontal",a=V(()=>u("SCROLL_END"),100),[s,u]=Ee("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(s==="idle"){const f=window.setTimeout(()=>u("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(f)}},[s,c.scrollHideDelay,u]),i.useEffect(()=>{const f=c.viewport,d=l?"scrollLeft":"scrollTop";if(f){let m=f[d];const h=b(()=>{const p=f[d];m!==p&&(u("SCROLL"),a()),m=p},"handleScroll");return f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[c.viewport,l,u,a]),S.jsx(B,{present:o||s!=="hidden",children:S.jsx(oe,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:r,onPointerEnter:T(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:T(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),_e=i.forwardRef(b(function(e,r){const o=C(y,e.__scopeScrollArea),{forceMount:n,...c}=e,[l,a]=i.useState(!1),s=e.orientation==="horizontal",u=V(()=>{if(o.viewport){const f=o.viewport.offsetWidth<o.viewport.scrollWidth,d=o.viewport.offsetHeight<o.viewport.scrollHeight;a(s?f:d)}},10);return D(o.viewport,u),D(o.content,u),S.jsx(B,{present:n||l,children:S.jsx(oe,{"data-state":l?"visible":"hidden",...c,ref:r})})},"ScrollAreaScrollbarAuto")),oe=i.forwardRef(b(function(e,r){const{orientation:o="vertical",...n}=e,c=C(y,e.__scopeScrollArea),l=i.useRef(null),a=i.useRef(0),[s,u]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=ne(s.viewport,s.content),d={...n,sizes:s,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:b(h=>l.current=h,"onThumbChange"),onThumbPointerUp:b(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:b(h=>a.current=h,"onThumbPointerDown")};function m(h,p){return De(h,a.current,s,p)}return b(m,"getScrollPosition"),o==="horizontal"?S.jsx(pt,{...d,ref:r,onThumbPositionChange:()=>{if(c.viewport&&l.current){const h=c.viewport.scrollLeft,p=te(h,s,c.dir);l.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{c.viewport&&(c.viewport.scrollLeft=h)},onDragScroll:h=>{c.viewport&&(c.viewport.scrollLeft=m(h,c.dir))}}):o==="vertical"?S.jsx(mt,{...d,ref:r,onThumbPositionChange:()=>{if(c.viewport&&l.current){const h=c.viewport.scrollTop,p=te(h,s);l.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{c.viewport&&(c.viewport.scrollTop=h)},onDragScroll:h=>{c.viewport&&(c.viewport.scrollTop=m(h))}}):null},"ScrollAreaScrollbarVisible")),pt=i.forwardRef(b(function(e,r){const{sizes:o,onSizesChange:n,...c}=e,l=C(y,e.__scopeScrollArea),[a,s]=i.useState(),u=i.useRef(null),f=O(r,u,l.onScrollbarXChange);return i.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),S.jsx(Oe,{"data-orientation":"horizontal",...c,ref:f,sizes:o,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":U(o)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,m)=>{if(l.viewport){const h=l.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),ce(h,m)&&d.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&n({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:W(a.paddingLeft),paddingEnd:W(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),mt=i.forwardRef(b(function(e,r){const{sizes:o,onSizesChange:n,...c}=e,l=C(y,e.__scopeScrollArea),[a,s]=i.useState(),u=i.useRef(null),f=O(r,u,l.onScrollbarYChange);return i.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),S.jsx(Oe,{"data-orientation":"vertical",...c,ref:f,sizes:o,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":U(o)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,m)=>{if(l.viewport){const h=l.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),ce(h,m)&&d.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&n({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:W(a.paddingTop),paddingEnd:W(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[St,Te]=ye(y),Oe=i.forwardRef(b(function(e,r){const{__scopeScrollArea:o,sizes:n,hasThumb:c,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:d,onResize:m,...h}=e,p=C(y,o),[v,g]=i.useState(null),x=O(r,g),N=i.useRef(null),z=i.useRef(""),q=p.viewport,F=n.content-n.viewport,H=_(d),M=_(u),Y=V(m,10);function I(w){if(N.current){const A=w.clientX-N.current.left,k=w.clientY-N.current.top;f({x:A,y:k})}}return b(I,"handleDragScroll"),i.useEffect(()=>{const w=b(A=>{const k=A.target;(v==null?void 0:v.contains(k))&&H(A,F)},"handleWheel");return document.addEventListener("wheel",w,{passive:!1}),()=>document.removeEventListener("wheel",w,{passive:!1})},[q,v,F,H]),i.useEffect(M,[n,M]),D(v,Y),D(p.content,Y),S.jsx(St,{scope:o,scrollbar:v,hasThumb:c,onThumbChange:_(l),onThumbPointerUp:_(a),onThumbPositionChange:M,onThumbPointerDown:_(s),children:S.jsx($.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:T(e.onPointerDown,w=>{w.button===0&&(w.target.setPointerCapture(w.pointerId),N.current=v.getBoundingClientRect(),z.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(w))}),onPointerMove:T(e.onPointerMove,I),onPointerUp:T(e.onPointerUp,w=>{const A=w.target;A.hasPointerCapture(w.pointerId)&&A.releasePointerCapture(w.pointerId),document.body.style.webkitUserSelect=z.current,p.viewport&&(p.viewport.style.scrollBehavior=""),N.current=null})})})},"ScrollAreaScrollbarImpl")),ee="ScrollAreaThumb",bt=i.forwardRef(b(function(e,r){const{forceMount:o,...n}=e,c=Te(ee,e.__scopeScrollArea);return S.jsx(B,{present:o||c.hasThumb,children:S.jsx(vt,{ref:r,...n})})},"ScrollAreaThumb")),vt=i.forwardRef(b(function(e,r){const{__scopeScrollArea:o,style:n,...c}=e,l=C(ee,o),a=Te(ee,o),{onThumbPositionChange:s}=a,u=O(r,a.onThumbChange),f=i.useRef(void 0),d=V(()=>{f.current&&(f.current(),f.current=void 0)},100);return i.useEffect(()=>{const m=l.viewport;if(m){const h=b(()=>{if(d(),!f.current){const p=Pt(m,s);f.current=p,s()}},"handleScroll");return s(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[l.viewport,d,s]),S.jsx($.div,{"data-state":a.hasThumb?"visible":"hidden",...c,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:T(e.onPointerDownCapture,m=>{const p=m.target.getBoundingClientRect(),v=m.clientX-p.left,g=m.clientY-p.top;a.onThumbPointerDown({x:v,y:g})}),onPointerUp:T(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Ne="ScrollAreaCorner",wt=i.forwardRef(b(function(e,r){const o=C(Ne,e.__scopeScrollArea),n=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&n?S.jsx(gt,{...e,ref:r}):null},"ScrollAreaCorner")),gt=i.forwardRef(b(function(e,r){const{__scopeScrollArea:o,...n}=e,c=C(Ne,o),[l,a]=i.useState(0),[s,u]=i.useState(0),f=!!(l&&s),{onCornerWidthChange:d,onCornerHeightChange:m}=c;return D(c.scrollbarX,()=>{var p;const h=((p=c.scrollbarX)==null?void 0:p.offsetHeight)||0;c.onCornerHeightChange(h),u(h)}),D(c.scrollbarY,()=>{var p;const h=((p=c.scrollbarY)==null?void 0:p.offsetWidth)||0;c.onCornerWidthChange(h),a(h)}),i.useEffect(()=>()=>{d(0),m(0)},[d,m]),f?S.jsx($.div,{...n,ref:r,style:{width:l,height:s,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function W(t){return t?parseInt(t,10):0}b(W,"toInt");function ne(t,e){const r=t/e;return isNaN(r)?0:r}b(ne,"getThumbRatio");function U(t){const e=ne(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=(t.scrollbar.size-r)*e;return Math.max(o,18)}b(U,"getThumbSize");function De(t,e,r,o="ltr"){const n=U(r),c=n/2,l=e||c,a=n-l,s=r.scrollbar.paddingStart+l,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=o==="ltr"?[0,f]:[f*-1,0];return le([s,u],d)(t)}b(De,"getScrollPositionFromPointer");function te(t,e,r="ltr"){const o=U(e),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,c=e.scrollbar.size-n,l=e.content-e.viewport,a=c-o,s=r==="ltr"?[0,l]:[l*-1,0],u=Pe(t,s);return le([0,l],[0,a])(u)}b(te,"getThumbOffsetFromScroll");function le(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const o=(e[1]-e[0])/(t[1]-t[0]);return e[0]+o*(r-t[0])}}b(le,"linearScale");function ce(t,e){return t>0&&t<e}b(ce,"isScrollingWithinScrollbarBounds");var Pt=b((t,e=()=>{})=>{let r={left:t.scrollLeft,top:t.scrollTop},o=0;return b(function n(){const c={left:t.scrollLeft,top:t.scrollTop},l=r.left!==c.left,a=r.top!==c.top;(l||a)&&e(),r=c,o=window.requestAnimationFrame(n)},"loop")(),()=>window.cancelAnimationFrame(o)},"addUnlinkedScrollListener");function V(t,e){const r=_(t),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,e)},[r,e])}b(V,"useDebounceCallback");function D(t,e){const r=_(e);J(()=>{let o=0;if(t){const n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(t),()=>{window.cancelAnimationFrame(o),n.unobserve(t)}}},[t,r])}b(D,"useResizeObserver");var Ct=it,xt=st,At=wt;const Et=i.forwardRef(({className:t,children:e,...r},o)=>S.jsxs(Ct,{ref:o,className:Me("relative overflow-hidden",t),type:"auto",...r,children:[S.jsx(xt,{className:"h-full w-full rounded-[inherit] [&>div]:!block",children:e}),S.jsx(dt,{orientation:"vertical",className:"flex h-full w-2.5 touch-none select-none border-l border-l-transparent p-[1px] transition-colors",children:S.jsx(bt,{className:"relative flex-1 rounded-full bg-border"})}),S.jsx(At,{})]}));Et.displayName="ScrollArea";export{$ as P,Et as S,B as a,O as b,T as c,ve as d,J as u};
@@ -0,0 +1 @@
1
+ var oe=s=>{throw TypeError(s)};var I=(s,e,t)=>e.has(s)||oe("Cannot "+t);var f=(s,e,t)=>(I(s,e,"read from private field"),t?t.call(s):e.get(s)),N=(s,e,t)=>e.has(s)?oe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),C=(s,e,t,n)=>(I(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),S=(s,e,t)=>(I(s,e,"access private method"),t);import{S as Oe,n as U,s as Ee,i as ke,u as ge,k as Pe,r as h,l as _e,m as Me,j as r,d as G,o as F,p as Ve,a as z,q as ae,C as Qe,t as Ae}from"./index-bwUfaXzS.js";import{Q as xe,c as Te,e as Be,d as qe,f as Le,s as ie,g as ze,h as He,i as Fe,u as K,j as ve,a as H,V as $e}from"./vm-status-badges-C7eIpgyG.js";import{u as Z}from"./useMutation-CmlocRNE.js";import{u as $,P as te,c as De,a as Ie,b as Ue,d as Ge,S as Ke}from"./scroll-area-BN1MPKEE.js";import{useProcessCounts as Ze,ProcessTable as We}from"./processes-CZ6M0f6m.js";import"./hooks-DaKa0v02.js";function le(s,e){const t=new Set(e);return s.filter(n=>!t.has(n))}var _,w,M,k,j,P,Q,A,T,B,v,W,J,be,X,Y,ee,pe,Je=(pe=class extends Oe{constructor(e,t,n){super();N(this,v);N(this,_);N(this,w);N(this,M);N(this,k);N(this,j);N(this,P);N(this,Q);N(this,A);N(this,T);N(this,B,[]);C(this,_,e),C(this,k,n),C(this,M,[]),C(this,j,[]),C(this,w,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&f(this,j).forEach(e=>{e.subscribe(t=>{S(this,v,Y).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,j).forEach(e=>{e.destroy()})}setQueries(e,t){C(this,M,e),C(this,k,t),U.batch(()=>{const n=f(this,j),o=S(this,v,X).call(this,f(this,M));o.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const a=o.map(u=>u.observer),l=a.map(u=>u.getCurrentResult()),i=n.length!==a.length,c=a.some((u,p)=>u!==n[p]),d=i||c,m=d?!0:l.some((u,p)=>{const b=f(this,w)[p];return!b||!Ee(u,b)});!d&&!m||(d&&(C(this,B,o),C(this,j,a)),C(this,w,l),this.hasListeners()&&(d&&(le(n,a).forEach(u=>{u.destroy()}),le(a,n).forEach(u=>{u.subscribe(p=>{S(this,v,Y).call(this,u,p)})})),S(this,v,ee).call(this)))})}getCurrentResult(){return f(this,w)}getQueries(){return f(this,j).map(e=>e.getCurrentQuery())}getObservers(){return f(this,j)}getOptimisticResult(e,t){const n=S(this,v,X).call(this,e),o=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),a=n.map(l=>l.defaultedQueryOptions.queryHash);return[o,l=>S(this,v,J).call(this,l??o,t,a),()=>S(this,v,W).call(this,o,n)]}},_=new WeakMap,w=new WeakMap,M=new WeakMap,k=new WeakMap,j=new WeakMap,P=new WeakMap,Q=new WeakMap,A=new WeakMap,T=new WeakMap,B=new WeakMap,v=new WeakSet,W=function(e,t){const n=new Set;return t.map((o,a)=>{const l=e[a];return o.defaultedQueryOptions.notifyOnChangeProps?l:o.observer.trackResult(l,i=>{n.has(i)||(n.add(i),t.forEach(c=>{c.observer.trackProp(i)}))})})},J=function(e,t,n){if(t){const o=f(this,T),a=n!==void 0&&o!==void 0&&(o.length!==n.length||n.some((l,i)=>l!==o[i]));return(f(this,w)!==f(this,A)||a||t!==f(this,Q))&&(C(this,Q,t),C(this,A,f(this,w)),n!==void 0&&C(this,T,n),C(this,P,ke(f(this,P),t(e)))),f(this,P)}return e},be=function(){var e;return!((e=f(this,k))!=null&&e.combine)||f(this,j).some((t,n)=>{var o;return t.options.suspense&&((o=f(this,w)[n])==null?void 0:o.data)===void 0})},X=function(e){const t=new Map;f(this,j).forEach(o=>{const a=o.options.queryHash;if(!a)return;const l=t.get(a);l?l.push(o):t.set(a,[o])});const n=[];return e.forEach(o=>{var i;const a=f(this,_).defaultQueryOptions(o),l=((i=t.get(a.queryHash))==null?void 0:i.shift())??new xe(f(this,_),a);n.push({defaultedQueryOptions:a,observer:l})}),n},Y=function(e,t){const n=f(this,j).indexOf(e);n!==-1&&(C(this,w,f(this,w).slice()),f(this,w)[n]=t,S(this,v,ee).call(this))},ee=function(){var e;if(this.hasListeners()){const t=S(this,v,be).call(this),n=f(this,P),o=t?n:S(this,v,J).call(this,S(this,v,W).call(this,f(this,w),f(this,B)),(e=f(this,k))==null?void 0:e.combine);(t||n!==o)&&U.batch(()=>{this.listeners.forEach(a=>{a(f(this,w))})})}},pe);function Xe({queries:s,...e},t){const n=ge(),o=Te(),a=Pe(),l=e.subscribed!==!1,i=h.useMemo(()=>s.map(x=>{const g=n.defaultQueryOptions(x);return g._optimisticResults=o?"isRestoring":l?"optimistic":void 0,g}),[s,n,o,l]);i.forEach(x=>{Be(x);const g=n.getQueryCache().get(x.queryHash);qe(x,a,g)}),Le(a);const[c]=h.useState(()=>new Je(n,i,e)),[d,m,u]=c.getOptimisticResult(i,e.combine),p=!o&&l;h.useSyncExternalStore(h.useCallback(x=>p?c.subscribe(U.batchCalls(x)):_e,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h.useEffect(()=>{c.setQueries(i,e)},[i,e,c]);const b=d.some((x,g)=>ie(i[g],x))?d.flatMap((x,g)=>{const y=i[g];if(y&&ie(y,x)){const O=new xe(n,y);return ze(y,O,a)}return[]}):[];if(b.length>0)throw Promise.all(b);const R=d.find((x,g)=>{const y=i[g];return y&&He({result:x,errorResetBoundary:a,throwOnError:y.throwOnError,query:n.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(R)throw R.error;return m(u())}function Ye(s,e){return Xe({...s,queries:s.queries.map(t=>({...t,suspense:!0,throwOnError:Fe,enabled:!0,placeholderData:void 0}))})}const ce=s=>typeof s=="boolean"?`${s}`:s===0?"0":s,ue=Me,e0=(s,e)=>t=>{var n;if((e==null?void 0:e.variants)==null)return ue(s,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:a}=e,l=Object.keys(o).map(d=>{const m=t==null?void 0:t[d],u=a==null?void 0:a[d];if(m===null)return null;const p=ce(m)||ce(u);return o[d][p]}),i=t&&Object.entries(t).reduce((d,m)=>{let[u,p]=m;return p===void 0||(d[u]=p),d},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((d,m)=>{let{class:u,className:p,...b}=m;return Object.entries(b).every(R=>{let[x,g]=R;return Array.isArray(g)?g.includes({...a,...i}[x]):{...a,...i}[x]===g})?[...d,u,p]:d},[]);return ue(s,l,c,t==null?void 0:t.class,t==null?void 0:t.className)},t0=e0("inline-flex items-center tracking-normal rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap max-w-full overflow-hidden truncate",{variants:{variant:{secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground"}},defaultVariants:{variant:"secondary"}});function ye({className:s,variant:e,...t}){return r.jsx("div",{className:G(t0({variant:e}),s),...t})}var s0=Object.defineProperty,r0=(s,e)=>s0(s,"name",{value:e,configurable:!0}),de=F[" useEffectEvent ".trim().toString()],he=F[" useInsertionEffect ".trim().toString()];function Ce(s){if(typeof de=="function")return de(s);const e=h.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof he=="function"?he(()=>{e.current=s}):$(()=>{e.current=s}),h.useMemo(()=>(...t)=>{var n;return(n=e.current)==null?void 0:n.call(e,...t)},[])}r0(Ce,"useEffectEvent");var n0=Object.defineProperty,q=(s,e)=>n0(s,"name",{value:e,configurable:!0}),o0=F[" useInsertionEffect ".trim().toString()]||$;function we({prop:s,defaultProp:e,onChange:t=q(()=>{},"onChange"),caller:n}){const[o,a,l]=je({defaultProp:e,onChange:t}),i=s!==void 0,c=i?s:o,d=h.useCallback(m=>{var u;if(i){const p=Ne(m)?m(s):m;p!==s&&((u=l.current)==null||u.call(l,p))}else a(m)},[i,s,a,l]);return[c,d]}q(we,"useControllableState");function je({defaultProp:s,onChange:e}){const[t,n]=h.useState(s),o=h.useRef(t),a=h.useRef(e);return o0(()=>{a.current=e},[e]),h.useEffect(()=>{var l;o.current!==t&&((l=a.current)==null||l.call(a,t),o.current=t)},[t,o]),[t,n,a]}q(je,"useUncontrolledState");function Ne(s){return typeof s=="function"}q(Ne,"isFunction");var fe=Symbol("RADIX:SYNC_STATE");function a0(s,e,t,n){const{prop:o,defaultProp:a,onChange:l,caller:i}=e,c=o!==void 0,d=Ce(l),m=[{...t,state:a}];n&&m.push(n);const[u,p]=h.useReducer((g,y)=>{if(y.type===fe)return{...g,state:y.state};const O=s(g,y);return c&&!Object.is(O.state,g.state)&&d(O.state),O},...m),b=u.state,R=h.useRef(b);h.useEffect(()=>{R.current!==b&&(R.current=b,c||d(b))},[b,R,c]);const x=h.useMemo(()=>o!==void 0?{...u,state:o}:u,[u,o]);return h.useEffect(()=>{c&&!Object.is(o,u.state)&&p({type:fe,state:o})},[o,u.state,c]),[x,p]}q(a0,"useControllableStateReducer");var i0=Object.defineProperty,l0=(s,e)=>i0(s,"name",{value:e,configurable:!0}),c0=F[" useId ".trim().toString()]||(()=>{}),u0=0;function Se(s){const[e,t]=h.useState(c0());return $(()=>{s||t(n=>n??String(u0++))},[s]),s||(e?`radix-${e}`:"")}l0(Se,"useId");var d0=Object.defineProperty,L=(s,e)=>d0(s,"name",{value:e,configurable:!0}),se="Collapsible",[h0,U0]=Ge(se),[f0,re]=h0(se),m0=h.forwardRef(L(function(e,t){const{__scopeCollapsible:n,open:o,defaultOpen:a,disabled:l,onOpenChange:i,...c}=e,[d,m]=we({prop:o,defaultProp:a??!1,onChange:i,caller:se});return r.jsx(f0,{scope:n,disabled:l,contentId:Se(),open:d,onOpenToggle:h.useCallback(()=>m(u=>!u),[m]),children:r.jsx(te.div,{"data-state":D(d),"data-disabled":l?"":void 0,...c,ref:t})})},"Collapsible")),p0="CollapsibleTrigger",g0=h.forwardRef(L(function(e,t){const{__scopeCollapsible:n,...o}=e,a=re(p0,n);return r.jsx(te.button,{type:"button","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":D(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:t,onClick:De(e.onClick,a.onOpenToggle)})},"CollapsibleTrigger")),Re="CollapsibleContent",x0=h.forwardRef(L(function(e,t){const{forceMount:n,...o}=e,a=re(Re,e.__scopeCollapsible);return r.jsx(Ie,{present:n||a.open,children:({present:l})=>r.jsx(v0,{...o,ref:t,present:l})})},"CollapsibleContent")),v0=h.forwardRef(L(function(e,t){const{__scopeCollapsible:n,present:o,children:a,...l}=e,i=re(Re,n),[c,d]=h.useState(o),m=h.useRef(null),u=Ue(t,m),p=h.useRef(0),b=p.current,R=h.useRef(0),x=R.current,g=i.open||c,y=h.useRef(g),O=h.useRef(void 0);return h.useEffect(()=>{const E=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(E)},[]),$(()=>{const E=m.current;if(E){O.current=O.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const ne=E.getBoundingClientRect();p.current=ne.height,R.current=ne.width,y.current||(E.style.transitionDuration=O.current.transitionDuration,E.style.animationName=O.current.animationName),d(o)}},[i.open,o]),r.jsx(te.div,{"data-state":D(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...l,ref:u,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&a})},"CollapsibleContentImpl"));function D(s){return s?"open":"closed"}L(D,"getState");var b0=m0;const y0=b0,C0=g0,w0=x0,j0="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20viewBox='0%200%20100%20100'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2212_248)'%3e%3cpath%20d='M0%200H100V100H0V0Z'%20fill='%23F03603'/%3e%3cpath%20d='M36%2072.2222V27.7778H51.2381C57.5873%2027.7778%2062.6667%2032.8571%2062.6667%2039.2063V41.746C62.6667%2044.6667%2061.5873%2047.3968%2059.7461%2049.3651C62.2858%2051.4603%2063.9366%2054.6349%2063.9366%2058.254V60.7936C63.9366%2067.1428%2058.8572%2072.2222%2052.508%2072.2222H36ZM42.3493%2065.873H52.508C55.3651%2065.873%2057.5873%2063.6508%2057.5873%2060.7936V58.254C57.5873%2055.3968%2055.3651%2053.1746%2052.508%2053.1746H42.3493V65.873ZM42.3493%2046.8254H51.2381C54.0953%2046.8254%2056.3175%2044.6032%2056.3175%2041.746V39.2063C56.3175%2036.3492%2054.0953%2034.127%2051.2381%2034.127H42.3493V46.8254Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2212_248'%3e%3crect%20width='100'%20height='100'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",N0=""+new URL("coreutils-CQXb6ysD.svg",import.meta.url).href,S0="data:image/svg+xml,%3csvg%20fill='%23073551'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ecurl%3c/title%3e%3cpath%20d='M.803%2014.8169c0-.5342.433-.9665.9665-.9665.5335%200%20.9665.4323.9665.9665%200%20.5335-.433.9657-.9665.9657-.5335%200-.9666-.4322-.9666-.9657m2.736%200c0-.1963-.0532-.376-.1119-.5525-.2344-.7024-.876-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0708C.6149%2013.2865%200%2013.9646%200%2014.817c0%20.9764.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.793%201.7694-1.7694m-1.7694-7.149c.5335%200%20.9665.433.9665.9665%200%20.5335-.433.9665-.9665.9665-.5343%200-.9666-.433-.9666-.9665%200-.5335.4323-.9665.9666-.9665m0%202.7359c.9772%200%201.7694-.7923%201.7694-1.7694%200-.1956-.0532-.376-.1119-.5525-.2344-.7024-.8767-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0716C.6149%207.104%200%207.782%200%208.6344c0%20.9771.7923%201.7694%201.7695%201.7694m13.221-5.694c-.5342%200-.9665-.433-.9665-.9664a.966.966%200%2001.9666-.9665c.5335%200%20.9658.4322.9658.9665%200%20.5334-.4323.9664-.9658.9664m-9.6%2016.5133c-.5335%200-.9666-.433-.9666-.9665%200-.5342.433-.9665.9666-.9665a.966.966%200%2001.9665.9665c0%20.5335-.4323.9665-.9665.9665m9.6-19.2491c-.978%200-1.7695.7922-1.7695%201.7694%200%20.2085.0525.4025.1187.5882L5.039%2018.5581c-.803.1681-1.4179.8462-1.4179%201.6985%200%20.9772.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.7922%201.7694-1.7694%200-.1963-.0525-.3759-.111-.5525l8.3427-14.2728c.7778-.1865%201.3683-.8531%201.3683-1.688%200-.977-.793-1.7693-1.7694-1.7693m7.24%202.7359c-.5343%200-.9666-.433-.9666-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9666.4322.9666.9665%200%20.5334-.433.9665-.9666.9665M12.6313%2021.223c-.5343%200-.9665-.433-.9665-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9658.4323.9658.9665%200%20.5335-.4323.9665-.9658.9665M22.2305%201.974c-.9772%200-1.7694.7922-1.7694%201.7694%200%20.2085.0525.4025.1187.5882l-8.3009%2014.2265c-.8021.1681-1.417.8462-1.417%201.6985%200%20.9772.7922%201.7694%201.7694%201.7694.9764%200%201.7687-.7922%201.7687-1.7694%200-.1963-.0525-.3759-.1111-.5525l8.3427-14.2728C23.4094%205.2448%2024%204.5782%2024%203.7433c0-.977-.7923-1.7693-1.7695-1.7693'/%3e%3c/svg%3e",R0="data:image/svg+xml,%3csvg%20fill='%23FFF000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDuckDB%3c/title%3e%3cpath%20d='M12%200C5.363%200%200%205.363%200%2012s5.363%2012%2012%2012%2012-5.363%2012-12S18.637%200%2012%200zM9.502%207.03a4.974%204.974%200%200%201%204.97%204.97%204.974%204.974%200%200%201-4.97%204.97A4.974%204.974%200%200%201%204.532%2012a4.974%204.974%200%200%201%204.97-4.97zm6.563%203.183h2.351c.98%200%201.787.782%201.787%201.762s-.807%201.789-1.787%201.789h-2.351v-3.551z'/%3e%3c/svg%3e",O0="data:image/svg+xml,%3csvg%20fill='%23F03C2E'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGit%3c/title%3e%3cpath%20d='M13.09%2023.549a1.54%201.54%200%200%201-2.18%200L.451%2013.089a1.54%201.54%200%200%201%200-2.179l7.191-7.19%202.733%202.733a1.85%201.85%200%200%200%20.964%202.326v6.66a1.849%201.849%200%201%200%201.54%200V8.957l2.508%202.508a1.85%201.85%200%201%200%201.09-1.09l-2.634-2.634a1.85%201.85%200%200%200-2.378-2.377L8.73%202.63%2010.91.451a1.54%201.54%200%200%201%202.179%200l10.459%2010.46a1.54%201.54%200%200%201%200%202.179z'/%3e%3c/svg%3e",E0="data:image/svg+xml,%3csvg%20width='400'%20height='220'%20version='1.0'%20viewBox='0%200%20400%20220'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e@media%20(prefers-color-scheme:dark){g[fill]{filter:invert(1);stroke:none}}%3c/style%3e%3cg%20transform='scale(.1)'%20stroke='%23fff'%20stroke-width='10'%3e%3cg%20fill='%23444'%3e%3ccircle%20cx='220'%20cy='1570'%20r='190'/%3e%3cpath%20d='m1330%20312c-30%2041-698%201492-710%201528s25%2066%20100%20101c77%2036%20102%2034%20124%203s701-1477%20716-1525c15-47-20-73-84-104s-116-44-146-3z'/%3e%3c/g%3e%3cg%20fill='%23111'%3e%3ccircle%20cx='2410'%20cy='200'%20r='190'/%3e%3cpath%20d='m1830%20655c0%20129%200%20130%2070%20130h360v423c0%20246-5%20474-10%20506-19%20112-88%20176-190%20176-59%200-120-27-147-66-51-73-65-84-99-84-31%200-40%208-104%2093-84%20111-86%20129-32%20189%20227%20252%20692%20187%20836-118%2053-112%2056-153%2056-795v-514c0-64-30-100-100-100h-490c-149%200-150%200-150%20160zM2867%201233c30%20302%20250%20499%20438%20527%20144%2019%20244%200%20375-90v410c0%2081%200%20100%20150%20100%20136%200%20150-20%20150-150v-1420c0-99-19-100-150-100s-139%2015-139%2082c-103-89-351-149-523-49s-342%20278-301%20690zm803-107c0%20292-105%20356-237%20356-178%200-249-147-273-296-27-168%2025-420%20262-420%20171%200%20248%2089%20248%20360z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",me="data:image/svg+xml,%3csvg%20fill='%235FA04E'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eNode.js%3c/title%3e%3cpath%20d='M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383%20c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076%20c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0%20L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392%20c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021%20c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921%20c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603%20v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z%20M19.099,13.993%20c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233%20c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081%20c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833%20c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402%20c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253%20c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z'/%3e%3c/svg%3e",k0="data:image/svg+xml,%3csvg%20fill='%233776AB'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ePython%3c/title%3e%3cpath%20d='M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02%201.27.05zm-6.3%201.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09%203.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14%201.04.05%201.23-.06%201.23-.16%201.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01%202.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47%2014.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z'/%3e%3c/svg%3e",P0="data:image/svg+xml,%3csvg%20fill='%23003B57'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSQLite%3c/title%3e%3cpath%20d='M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71%208.71%200%200%200-.547.535c-2.109%202.237-4.066%206.38-4.674%209.544.237.48.422%201.093.544%201.561a13.044%2013.044%200%200%201%20.164.703s-.019-.071-.096-.296l-.05-.146a1.689%201.689%200%200%200-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376%201.176.484.884.778%202.4.778%202.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304%201.346-.226%201.478.152.256.296.698.422%201.186.286%201.1.485%202.44.485%202.44l.017.224a22.41%2022.41%200%200%200%20.056%202.748c.095%201.146.273%202.13.5%202.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29%201.661-8.304%201.723-4.55%204.113-8.201%206.3-9.945-1.993%201.8-4.692%207.63-5.5%209.788-.904%202.416-1.545%204.684-1.931%206.857.666-2.037%202.821-2.912%202.821-2.912s1.057-1.304%202.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184%203.613-1.72C21.695%207.9%2024.195%202.767%2021.678.521m-18.573.543A1.842%201.842%200%200%200%201.27%202.9v16.608a1.84%201.84%200%200%200%201.835%201.834h9.418a22.953%2022.953%200%200%201-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01%2027.01%200%200%200-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432%200-.12.015-.245.037-.386a9.98%209.98%200%200%201%20.234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8%2032.8%200%200%201%20.382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28%202.587-7.443%204.8-9.791.066-.069.133-.128.198-.194Z'/%3e%3c/svg%3e",_0={coreutils:"dark:brightness-[1.8]",curl:"dark:brightness-[2.6]",sqlite3:"dark:brightness-[2.6]",duckdb:"dark:invert",jq:"dark:invert"},M0={browserbase:j0,coreutils:N0,curl:S0,duckdb:R0,git:O0,jq:E0,node:me,nodejs:me,python:k0,sqlite3:P0};function V0({bundle:s}){const[e,t]=h.useState(!1),n=s.binaries.length>0,o=M0[s.slug];return r.jsxs(y0,{open:e,onOpenChange:t,className:"border-none",children:[r.jsxs(C0,{className:"flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50",disabled:!n,children:[r.jsx(Qe,{className:G("size-3 shrink-0 text-muted-foreground transition-transform",e&&"rotate-90",!n&&"opacity-0")}),r.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded border bg-white/90 dark:bg-muted/60",children:o?r.jsx("img",{src:o,alt:"",className:G("size-4",_0[s.slug])}):r.jsx("span",{className:"text-[11px] font-medium text-black/60 dark:text-muted-foreground",children:s.slug.charAt(0)})}),r.jsx("span",{className:"flex-1 truncate font-mono text-sm",children:s.name}),n?r.jsxs("span",{className:"text-[11px] tabular-nums text-muted-foreground/70",children:[s.binaries.length," cmd",s.binaries.length===1?"":"s"]}):null,r.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:s.version}),r.jsx(ye,{variant:s.source==="user"?"outline":"secondary",children:s.source})]}),n?r.jsx(w0,{children:r.jsx("div",{className:"flex flex-wrap gap-1.5 px-4 pb-3 pl-9",children:s.binaries.map(a=>r.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:a},a))})}):null]})}const Q0=s=>typeof s>"u"||s===null||Object.keys(s).length===0;function A0({mounts:s}){return r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{className:"text-[11px] text-muted-foreground",children:r.jsxs("tr",{className:"border-b",children:[r.jsx("th",{className:"px-4 py-2 text-left font-medium",children:"Path"}),r.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Kind"}),r.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Access"}),r.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Config"})]})}),r.jsx("tbody",{children:s.map(e=>r.jsxs("tr",{className:"border-b border-foreground/[0.06] align-top last:border-0 hover:bg-muted/50",children:[r.jsx("td",{className:"px-4 py-2 font-mono text-xs",children:e.path}),r.jsx("td",{className:"px-3 py-2",children:r.jsx(ye,{variant:"secondary",className:"font-mono",children:e.kind})}),r.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:e.readOnly?"read-only":"read-write"}),r.jsx("td",{className:"px-3 py-2",children:Q0(e.config)?r.jsx("span",{className:"text-muted-foreground/60",children:"—"}):r.jsxs("div",{className:"group relative max-w-[20rem]",children:[r.jsx("code",{className:"block overflow-x-auto whitespace-nowrap rounded bg-muted/30 py-1.5 pl-2 pr-7 font-mono text-xs text-muted-foreground",children:JSON.stringify(e.config)}),r.jsx(Ae,{value:JSON.stringify(e.config,null,2),className:"absolute right-1 top-1 bg-background/70 backdrop-blur-sm"})]})})]},e.path))})]})}function T0(){const[s,e]=h.useState("3000"),[t,n]=h.useState([]),o=Z({mutationFn:async i=>{const c=Number.parseInt(i,10);if(!Number.isInteger(c)||c<1||c>65535)throw new Error(`Not a valid port: ${i}`);return H.createSignedPreviewUrl(c,900)},onSuccess:i=>n(c=>[...c.filter(d=>d.token!==i.token),i])}),a=Z({mutationFn:async i=>(await H.expireSignedPreviewUrl(i.token),i),onSuccess:i=>n(c=>c.filter(d=>d.token!==i.token))}),l=o.error??a.error;return r.jsxs("div",{className:"text-xs",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("label",{className:"text-muted-foreground",htmlFor:"agentos-preview-port",children:"Port"}),r.jsx("input",{id:"agentos-preview-port",value:s,onChange:i=>e(i.target.value),onKeyDown:i=>i.key==="Enter"&&o.mutate(s),inputMode:"numeric",className:"w-20 rounded border bg-background px-2 py-1 font-mono focus:outline-none"}),r.jsx("button",{type:"button",disabled:o.isPending,onClick:()=>o.mutate(s),className:"rounded-md border px-2.5 py-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40",children:o.isPending?"Creating…":"Create preview link"}),r.jsx("span",{className:"text-muted-foreground/60",children:"Signed URL to an HTTP server on that port, valid 15 minutes. Boots the VM if asleep."})]}),l?r.jsx(z,{error:l,className:"py-2"}):null,t.length>0?r.jsx("div",{className:"mt-2 flex flex-col gap-1",children:t.map(i=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("a",{href:i.path,target:"_blank",rel:"noreferrer",className:"truncate font-mono text-primary hover:underline",children:["port ",i.port,": ",i.path]}),r.jsxs("span",{className:"text-muted-foreground/60",children:["expires ",new Date(i.expiresAt).toLocaleTimeString()]}),r.jsx("button",{type:"button",onClick:()=>a.mutate(i),className:"rounded border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:"Revoke"})]},i.token))}):null]})}function V({title:s,right:e,children:t}){return r.jsxs("section",{className:"rounded-xl border bg-secondary p-4",children:[r.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[r.jsx("span",{className:"text-sm font-semibold",children:s}),r.jsx("span",{className:"ml-auto"}),e]}),t]})}function G0({actorId:s}){var t;const e=K(ve(s));return r.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[r.jsx("div",{className:"mx-auto w-full max-w-4xl shrink-0 px-4 pt-4",children:r.jsx(q0,{actorId:s})}),r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(Ve,{children:r.jsx(B0,{actorId:s})},String((t=e.data)==null?void 0:t.generation))})]})}function B0({actorId:s}){const[e,t]=Ye({queries:[H.softwareQueryOptions(s),H.mountsQueryOptions(s)]}),n=Ze(s),o=a=>r.jsx("span",{className:"text-xs text-muted-foreground",children:a});return r.jsxs("div",{className:"relative h-full min-h-0",children:[r.jsx("div",{className:"absolute right-3 top-2 z-10",children:r.jsx($e,{actorId:s})}),r.jsx(Ke,{className:"h-full min-h-0",children:r.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-4 px-4 py-4",children:[r.jsx(V,{title:"Processes",right:o(`${n.running} of ${n.total} running`),children:r.jsx("div",{className:"overflow-hidden rounded-lg border",children:r.jsx(We,{actorId:s})})}),r.jsx(V,{title:"Software",right:o(String(e.data.length)),children:e.data.length===0?r.jsx("div",{className:"text-sm text-muted-foreground",children:"No software bundles installed."}):r.jsx("div",{className:"divide-y overflow-hidden rounded-lg border",children:e.data.map(a=>r.jsx(V0,{bundle:a},a.name))})}),r.jsx(V,{title:"Mounts",right:o(String(t.data.length)),children:t.data.length===0?r.jsx("div",{className:"text-sm text-muted-foreground",children:"No mounts configured on this actor."}):r.jsx("div",{className:"overflow-hidden rounded-lg border",children:r.jsx(A0,{mounts:t.data})})}),r.jsx(V,{title:"Preview links",children:r.jsx(T0,{})})]})})]})}function q0({actorId:s}){const e=ge(),t=K(ve(s)),n=K({queryKey:["agentOS",s,"config"],queryFn:()=>ae("v1.config.get",l=>l.v1.config.get({})),refetchInterval:5e3}),o=Z({mutationFn:()=>ae("v1.vm.restart",l=>l.v1.vm.restart({})),onSuccess:()=>e.invalidateQueries({queryKey:["agentOS",s]})}),a=l=>JSON.stringify(l,(i,c)=>typeof c=="bigint"?c.toString():c,2);return r.jsxs(V,{title:"VM status and configuration",right:r.jsx("button",{type:"button",className:"rounded border px-2 py-1 text-xs hover:bg-muted disabled:opacity-50",disabled:o.isPending,onClick:()=>o.mutate(),children:o.isPending?"Restarting…":"Restart VM"}),children:[t.error?r.jsx(z,{error:t.error}):null,n.error?r.jsx(z,{error:n.error}):null,o.error?r.jsx(z,{error:o.error}):null,t.data?r.jsxs("div",{className:"mb-3 text-xs",children:[r.jsx("span",{className:"font-medium",children:t.data.lifecycle}),r.jsxs("span",{className:"ml-2 text-muted-foreground",children:["Generation ",String(t.data.generation)," · Config ",t.data.configState]}),t.data.issues.map((l,i)=>r.jsxs("p",{className:"mt-1 text-destructive",children:[l.code,": ",l.message]},`${l.code}-${i}`))]}):null,n.data?r.jsxs("details",{children:[r.jsxs("summary",{className:"cursor-pointer text-xs",children:["Desired config, revision ",String(n.data.revision)]}),r.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded bg-muted p-3 text-xs",children:a(n.data.desired)})]}):null]})}export{G0 as SystemTabConnected};