@rivet-dev/agentos 0.2.16-rc.2 → 0.2.17

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.
@@ -1 +1 @@
1
- import{r as l,V as de,j as m,g as fe}from"./index-CvS46tYl.js";function q(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function he(...e){return t=>{let r=!1;const n=e.map(o=>{const i=q(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():q(e[o],null)}}}}function E(...e){return l.useCallback(he(...e),e)}function pe(e){const t=l.forwardRef((r,n)=>{let{children:o,...i}=r,s=null,c=!1;const a=[];Z(o)&&typeof I=="function"&&(o=I(o._payload)),l.Children.forEach(o,d=>{var p;if(we(d)){c=!0;const S=d;let v="child"in S.props?S.props.child:S.props.children;Z(v)&&typeof I=="function"&&(v=I(v._payload)),s=Se(S,v),a.push((p=s==null?void 0:s.props)==null?void 0:p.children)}else a.push(d)}),s?s=l.cloneElement(s,void 0,a):!c&&l.Children.count(o)===1&&l.isValidElement(o)&&(s=o);const u=s?ve(s):void 0,f=E(n,u);if(!s){if(o||o===0)throw new Error(c?Ce(e):Pe(e));return o}const h=be(i,s.props??{});return s.type!==l.Fragment&&(h.ref=n?f:u),l.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var me=Symbol.for("radix.slottable"),Se=(e,t)=>{if("child"in e.props){const r=e.props.child;return l.isValidElement(r)?l.cloneElement(r,void 0,e.props.children(r.props.children)):null}return l.isValidElement(t)?t:null};function be(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...c)=>{const a=i(...c);return o(...c),a}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function ve(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function we(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===me}var ge=Symbol.for("react.lazy");function Z(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ge&&"_payload"in e&&xe(e._payload)}function xe(e){return typeof e=="object"&&e!==null&&"then"in e}var Pe=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Ce=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,I=de[" use ".trim().toString()],Re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_=Re.reduce((e,t)=>{const r=pe(`Primitive.${t}`),n=l.forwardRef((o,i)=>{const{asChild:s,...c}=o,a=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...c,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),F=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function ye(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var L=e=>{const{present:t,children:r}=e,n=Ee(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),i=Ae(n.ref,Te(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:i}):null};L.displayName="Presence";function Ee(e){const[t,r]=l.useState(),n=l.useRef(null),o=l.useRef(e),i=l.useRef("none"),s=e?"mounted":"unmounted",[c,a]=ye(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=U(n.current);i.current=c==="mounted"?u:"none"},[c]),F(()=>{const u=n.current,f=o.current;if(f!==e){const d=i.current,p=U(u);e?a("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),F(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const v=U(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(a("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},d=p=>{p.target===t&&(i.current=U(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function G(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){const t=l.useRef(e);return t.current=e,l.useCallback(r=>{const n=t.current;let o=!1;const i=n.map(s=>{const c=G(s,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let s=0;s<i.length;s++){const c=i[s];typeof c=="function"?c():G(n[s],null)}}},[])}function U(e){return(e==null?void 0:e.animationName)||"none"}function Te(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ne(e,t=[]){let r=[];function n(i,s){const c=l.createContext(s);c.displayName=i+"Context";const a=r.length;r=[...r,s];const u=h=>{var x;const{scope:d,children:p,...S}=h,v=((x=d==null?void 0:d[e])==null?void 0:x[a])||c,C=l.useMemo(()=>S,Object.values(S));return m.jsx(v.Provider,{value:C,children:p})};u.displayName=i+"Provider";function f(h,d){var v;const p=((v=d==null?void 0:d[e])==null?void 0:v[a])||c,S=l.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=r.map(s=>l.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return o.scopeName=e,[n,_e(o,...t)]}function _e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((c,{useScope:a,scopeName:u})=>{const h=a(i)[`__scope${u}`];return{...c,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function R(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var Le=l.createContext(void 0);function De(e){const t=l.useContext(Le);return e||t||"ltr"}function Oe(e,[t,r]){return Math.min(r,Math.max(t,e))}function y(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function je(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var X="ScrollArea",[K]=Ne(X),[Me,w]=K(X),Q=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[c,a]=l.useState(null),[u,f]=l.useState(null),[h,d]=l.useState(null),[p,S]=l.useState(null),[v,C]=l.useState(null),[x,D]=l.useState(0),[$,O]=l.useState(0),[j,N]=l.useState(!1),[M,W]=l.useState(!1),b=E(t,A=>a(A)),g=De(o);return m.jsx(Me,{scope:r,type:n,dir:g,scrollHideDelay:i,scrollArea:c,viewport:u,onViewportChange:f,content:h,onContentChange:d,scrollbarX:p,onScrollbarXChange:S,scrollbarXEnabled:j,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:C,scrollbarYEnabled:M,onScrollbarYEnabledChange:W,onCornerWidthChange:D,onCornerHeightChange:O,children:m.jsx(_.div,{dir:g,...s,ref:b,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":$+"px",...e.style}})})});Q.displayName=X;var ee="ScrollAreaViewport",te=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=w(ee,r),c=l.useRef(null),a=E(t,c,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx(We,{nonce:o}),m.jsx(_.div,{"data-radix-scroll-area-viewport":"",...i,ref:a,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});te.displayName=ee;var We=l.memo(({nonce:e})=>m.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}),(e,t)=>e.nonce===t.nonce),P="ScrollAreaScrollbar",re=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return l.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),o.type==="hover"?m.jsx(Ie,{...n,ref:t,forceMount:r}):o.type==="scroll"?m.jsx(Ue,{...n,ref:t,forceMount:r}):o.type==="auto"?m.jsx(oe,{...n,ref:t,forceMount:r}):o.type==="always"?m.jsx(k,{...n,ref:t,"data-state":"visible"}):null});re.displayName=P;var Ie=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),[i,s]=l.useState(!1);return l.useEffect(()=>{const c=o.scrollArea;let a=0;if(c){const u=()=>{window.clearTimeout(a),s(!0)},f=()=>{a=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",f),()=>{window.clearTimeout(a),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(L,{present:r||i,children:m.jsx(oe,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Ue=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Y(()=>a("SCROLL_END"),100),[c,a]=je("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 l.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,o.scrollHideDelay,a]),l.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let h=u[f];const d=()=>{const p=u[f];h!==p&&(a("SCROLL"),s()),h=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[o.viewport,i,a,s]),m.jsx(L,{present:r||c!=="hidden",children:m.jsx(k,{"data-state":c==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:y(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:y(e.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),oe=l.forwardRef((e,t)=>{const r=w(P,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=l.useState(!1),c=e.orientation==="horizontal",a=Y(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;s(c?u:f)}},10);return T(r.viewport,a),T(r.content,a),m.jsx(L,{present:n||i,children:m.jsx(k,{"data-state":i?"visible":"hidden",...o,ref:t})})}),k=l.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=w(P,e.__scopeScrollArea),i=l.useRef(null),s=l.useRef(0),[c,a]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ce(c.viewport,c.content),f={...n,sizes:c,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:d=>s.current=d};function h(d,p){return Fe(d,s.current,c,p)}return r==="horizontal"?m.jsx(ze,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollLeft,p=J(d,c,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=h(d,o.dir))}}):r==="vertical"?m.jsx(Ve,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollTop,p=J(d,c);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=h(d))}}):null}),ze=l.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=w(P,e.__scopeScrollArea),[s,c]=l.useState(),a=l.useRef(null),u=E(t,a,i.onScrollbarXChange);return l.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),m.jsx(le,{"data-orientation":"horizontal",...o,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":H(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(d),ue(d,h)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:V(s.paddingLeft),paddingEnd:V(s.paddingRight)}})}})}),Ve=l.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=w(P,e.__scopeScrollArea),[s,c]=l.useState(),a=l.useRef(null),u=E(t,a,i.onScrollbarYChange);return l.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),m.jsx(le,{"data-orientation":"vertical",...o,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":H(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(d),ue(d,h)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:V(s.paddingTop),paddingEnd:V(s.paddingBottom)}})}})}),[He,ne]=K(P),le=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:f,onResize:h,...d}=e,p=w(P,r),[S,v]=l.useState(null),C=E(t,b=>v(b)),x=l.useRef(null),D=l.useRef(""),$=p.viewport,O=n.content-n.viewport,j=R(f),N=R(a),M=Y(h,10);function W(b){if(x.current){const g=b.clientX-x.current.left,A=b.clientY-x.current.top;u({x:g,y:A})}}return l.useEffect(()=>{const b=g=>{const A=g.target;(S==null?void 0:S.contains(A))&&j(g,O)};return document.addEventListener("wheel",b,{passive:!1}),()=>document.removeEventListener("wheel",b,{passive:!1})},[$,S,O,j]),l.useEffect(N,[n,N]),T(S,M),T(p.content,M),m.jsx(He,{scope:r,scrollbar:S,hasThumb:o,onThumbChange:R(i),onThumbPointerUp:R(s),onThumbPositionChange:N,onThumbPointerDown:R(c),children:m.jsx(_.div,{...d,ref:C,style:{position:"absolute",...d.style},onPointerDown:y(e.onPointerDown,b=>{b.button===0&&(b.target.setPointerCapture(b.pointerId),x.current=S.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),W(b))}),onPointerMove:y(e.onPointerMove,W),onPointerUp:y(e.onPointerUp,b=>{const g=b.target;g.hasPointerCapture(b.pointerId)&&g.releasePointerCapture(b.pointerId),document.body.style.webkitUserSelect=D.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),z="ScrollAreaThumb",ie=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ne(z,e.__scopeScrollArea);return m.jsx(L,{present:r||o.hasThumb,children:m.jsx(Ye,{ref:t,...n})})}),Ye=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=w(z,r),s=ne(z,r),{onThumbPositionChange:c}=s,a=E(t,h=>s.onThumbChange(h)),u=l.useRef(void 0),f=Y(()=>{u.current&&(u.current(),u.current=void 0)},100);return l.useEffect(()=>{const h=i.viewport;if(h){const d=()=>{if(f(),!u.current){const p=Xe(h,c);u.current=p,c()}};return c(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[i.viewport,f,c]),m.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:y(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),S=h.clientX-p.left,v=h.clientY-p.top;s.onThumbPointerDown({x:S,y:v})}),onPointerUp:y(e.onPointerUp,s.onThumbPointerUp)})});ie.displayName=z;var B="ScrollAreaCorner",se=l.forwardRef((e,t)=>{const r=w(B,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?m.jsx($e,{...e,ref:t}):null});se.displayName=B;var $e=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=w(B,r),[i,s]=l.useState(0),[c,a]=l.useState(0),u=!!(i&&c);return T(o.scrollbarX,()=>{var h;const f=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(f),a(f)}),T(o.scrollbarY,()=>{var h;const f=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),u?m.jsx(_.div,{...n,ref:t,style:{width:i,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function V(e){return e?parseInt(e,10):0}function ce(e,t){const r=e/t;return isNaN(r)?0:r}function H(e){const t=ce(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Fe(e,t,r,n="ltr"){const o=H(r),i=o/2,s=t||i,c=o-s,a=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-c,f=r.content-r.viewport,h=n==="ltr"?[0,f]:[f*-1,0];return ae([a,u],h)(e)}function J(e,t,r="ltr"){const n=H(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,c=i-n,a=r==="ltr"?[0,s]:[s*-1,0],u=Oe(e,a);return ae([0,s],[0,c])(u)}function ae(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ue(e,t){return e>0&&e<t}var Xe=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,c=r.top!==i.top;(s||c)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Y(e,t){const r=R(e),n=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),l.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function T(e,t){const r=R(t);F(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var ke=Q,Be=te,qe=se;const Ze=l.forwardRef(({className:e,children:t,...r},n)=>m.jsxs(ke,{ref:n,className:fe("relative overflow-hidden",e),type:"auto",...r,children:[m.jsx(Be,{className:"h-full w-full rounded-[inherit] [&>div]:!block",children:t}),m.jsx(re,{orientation:"vertical",className:"flex h-full w-2.5 touch-none select-none border-l border-l-transparent p-[1px] transition-colors",children:m.jsx(ie,{className:"relative flex-1 rounded-full bg-border"})}),m.jsx(qe,{})]}));Ze.displayName="ScrollArea";export{_ as P,Ze as S,L as a,E as b,y as c,Ne as d,F as u};
1
+ import{r as l,V as de,j as m,g as fe}from"./index-7G_DbdZ6.js";function q(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function he(...e){return t=>{let r=!1;const n=e.map(o=>{const i=q(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():q(e[o],null)}}}}function E(...e){return l.useCallback(he(...e),e)}function pe(e){const t=l.forwardRef((r,n)=>{let{children:o,...i}=r,s=null,c=!1;const a=[];Z(o)&&typeof I=="function"&&(o=I(o._payload)),l.Children.forEach(o,d=>{var p;if(we(d)){c=!0;const S=d;let v="child"in S.props?S.props.child:S.props.children;Z(v)&&typeof I=="function"&&(v=I(v._payload)),s=Se(S,v),a.push((p=s==null?void 0:s.props)==null?void 0:p.children)}else a.push(d)}),s?s=l.cloneElement(s,void 0,a):!c&&l.Children.count(o)===1&&l.isValidElement(o)&&(s=o);const u=s?ve(s):void 0,f=E(n,u);if(!s){if(o||o===0)throw new Error(c?Ce(e):Pe(e));return o}const h=be(i,s.props??{});return s.type!==l.Fragment&&(h.ref=n?f:u),l.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var me=Symbol.for("radix.slottable"),Se=(e,t)=>{if("child"in e.props){const r=e.props.child;return l.isValidElement(r)?l.cloneElement(r,void 0,e.props.children(r.props.children)):null}return l.isValidElement(t)?t:null};function be(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...c)=>{const a=i(...c);return o(...c),a}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function ve(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function we(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===me}var ge=Symbol.for("react.lazy");function Z(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ge&&"_payload"in e&&xe(e._payload)}function xe(e){return typeof e=="object"&&e!==null&&"then"in e}var Pe=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Ce=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,I=de[" use ".trim().toString()],Re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_=Re.reduce((e,t)=>{const r=pe(`Primitive.${t}`),n=l.forwardRef((o,i)=>{const{asChild:s,...c}=o,a=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...c,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),F=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function ye(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var L=e=>{const{present:t,children:r}=e,n=Ee(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),i=Ae(n.ref,Te(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:i}):null};L.displayName="Presence";function Ee(e){const[t,r]=l.useState(),n=l.useRef(null),o=l.useRef(e),i=l.useRef("none"),s=e?"mounted":"unmounted",[c,a]=ye(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=U(n.current);i.current=c==="mounted"?u:"none"},[c]),F(()=>{const u=n.current,f=o.current;if(f!==e){const d=i.current,p=U(u);e?a("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),F(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const v=U(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(a("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},d=p=>{p.target===t&&(i.current=U(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function G(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){const t=l.useRef(e);return t.current=e,l.useCallback(r=>{const n=t.current;let o=!1;const i=n.map(s=>{const c=G(s,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let s=0;s<i.length;s++){const c=i[s];typeof c=="function"?c():G(n[s],null)}}},[])}function U(e){return(e==null?void 0:e.animationName)||"none"}function Te(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ne(e,t=[]){let r=[];function n(i,s){const c=l.createContext(s);c.displayName=i+"Context";const a=r.length;r=[...r,s];const u=h=>{var x;const{scope:d,children:p,...S}=h,v=((x=d==null?void 0:d[e])==null?void 0:x[a])||c,C=l.useMemo(()=>S,Object.values(S));return m.jsx(v.Provider,{value:C,children:p})};u.displayName=i+"Provider";function f(h,d){var v;const p=((v=d==null?void 0:d[e])==null?void 0:v[a])||c,S=l.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=r.map(s=>l.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return o.scopeName=e,[n,_e(o,...t)]}function _e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((c,{useScope:a,scopeName:u})=>{const h=a(i)[`__scope${u}`];return{...c,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function R(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var Le=l.createContext(void 0);function De(e){const t=l.useContext(Le);return e||t||"ltr"}function Oe(e,[t,r]){return Math.min(r,Math.max(t,e))}function y(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function je(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var X="ScrollArea",[K]=Ne(X),[Me,w]=K(X),Q=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[c,a]=l.useState(null),[u,f]=l.useState(null),[h,d]=l.useState(null),[p,S]=l.useState(null),[v,C]=l.useState(null),[x,D]=l.useState(0),[$,O]=l.useState(0),[j,N]=l.useState(!1),[M,W]=l.useState(!1),b=E(t,A=>a(A)),g=De(o);return m.jsx(Me,{scope:r,type:n,dir:g,scrollHideDelay:i,scrollArea:c,viewport:u,onViewportChange:f,content:h,onContentChange:d,scrollbarX:p,onScrollbarXChange:S,scrollbarXEnabled:j,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:C,scrollbarYEnabled:M,onScrollbarYEnabledChange:W,onCornerWidthChange:D,onCornerHeightChange:O,children:m.jsx(_.div,{dir:g,...s,ref:b,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":$+"px",...e.style}})})});Q.displayName=X;var ee="ScrollAreaViewport",te=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=w(ee,r),c=l.useRef(null),a=E(t,c,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx(We,{nonce:o}),m.jsx(_.div,{"data-radix-scroll-area-viewport":"",...i,ref:a,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});te.displayName=ee;var We=l.memo(({nonce:e})=>m.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}),(e,t)=>e.nonce===t.nonce),P="ScrollAreaScrollbar",re=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return l.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),o.type==="hover"?m.jsx(Ie,{...n,ref:t,forceMount:r}):o.type==="scroll"?m.jsx(Ue,{...n,ref:t,forceMount:r}):o.type==="auto"?m.jsx(oe,{...n,ref:t,forceMount:r}):o.type==="always"?m.jsx(k,{...n,ref:t,"data-state":"visible"}):null});re.displayName=P;var Ie=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),[i,s]=l.useState(!1);return l.useEffect(()=>{const c=o.scrollArea;let a=0;if(c){const u=()=>{window.clearTimeout(a),s(!0)},f=()=>{a=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",f),()=>{window.clearTimeout(a),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(L,{present:r||i,children:m.jsx(oe,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Ue=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=w(P,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Y(()=>a("SCROLL_END"),100),[c,a]=je("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 l.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,o.scrollHideDelay,a]),l.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let h=u[f];const d=()=>{const p=u[f];h!==p&&(a("SCROLL"),s()),h=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[o.viewport,i,a,s]),m.jsx(L,{present:r||c!=="hidden",children:m.jsx(k,{"data-state":c==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:y(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:y(e.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),oe=l.forwardRef((e,t)=>{const r=w(P,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=l.useState(!1),c=e.orientation==="horizontal",a=Y(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;s(c?u:f)}},10);return T(r.viewport,a),T(r.content,a),m.jsx(L,{present:n||i,children:m.jsx(k,{"data-state":i?"visible":"hidden",...o,ref:t})})}),k=l.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=w(P,e.__scopeScrollArea),i=l.useRef(null),s=l.useRef(0),[c,a]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ce(c.viewport,c.content),f={...n,sizes:c,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:d=>s.current=d};function h(d,p){return Fe(d,s.current,c,p)}return r==="horizontal"?m.jsx(ze,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollLeft,p=J(d,c,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=h(d,o.dir))}}):r==="vertical"?m.jsx(Ve,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollTop,p=J(d,c);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=h(d))}}):null}),ze=l.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=w(P,e.__scopeScrollArea),[s,c]=l.useState(),a=l.useRef(null),u=E(t,a,i.onScrollbarXChange);return l.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),m.jsx(le,{"data-orientation":"horizontal",...o,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":H(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(d),ue(d,h)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:V(s.paddingLeft),paddingEnd:V(s.paddingRight)}})}})}),Ve=l.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=w(P,e.__scopeScrollArea),[s,c]=l.useState(),a=l.useRef(null),u=E(t,a,i.onScrollbarYChange);return l.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),m.jsx(le,{"data-orientation":"vertical",...o,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":H(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(d),ue(d,h)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:V(s.paddingTop),paddingEnd:V(s.paddingBottom)}})}})}),[He,ne]=K(P),le=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:f,onResize:h,...d}=e,p=w(P,r),[S,v]=l.useState(null),C=E(t,b=>v(b)),x=l.useRef(null),D=l.useRef(""),$=p.viewport,O=n.content-n.viewport,j=R(f),N=R(a),M=Y(h,10);function W(b){if(x.current){const g=b.clientX-x.current.left,A=b.clientY-x.current.top;u({x:g,y:A})}}return l.useEffect(()=>{const b=g=>{const A=g.target;(S==null?void 0:S.contains(A))&&j(g,O)};return document.addEventListener("wheel",b,{passive:!1}),()=>document.removeEventListener("wheel",b,{passive:!1})},[$,S,O,j]),l.useEffect(N,[n,N]),T(S,M),T(p.content,M),m.jsx(He,{scope:r,scrollbar:S,hasThumb:o,onThumbChange:R(i),onThumbPointerUp:R(s),onThumbPositionChange:N,onThumbPointerDown:R(c),children:m.jsx(_.div,{...d,ref:C,style:{position:"absolute",...d.style},onPointerDown:y(e.onPointerDown,b=>{b.button===0&&(b.target.setPointerCapture(b.pointerId),x.current=S.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),W(b))}),onPointerMove:y(e.onPointerMove,W),onPointerUp:y(e.onPointerUp,b=>{const g=b.target;g.hasPointerCapture(b.pointerId)&&g.releasePointerCapture(b.pointerId),document.body.style.webkitUserSelect=D.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),z="ScrollAreaThumb",ie=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ne(z,e.__scopeScrollArea);return m.jsx(L,{present:r||o.hasThumb,children:m.jsx(Ye,{ref:t,...n})})}),Ye=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=w(z,r),s=ne(z,r),{onThumbPositionChange:c}=s,a=E(t,h=>s.onThumbChange(h)),u=l.useRef(void 0),f=Y(()=>{u.current&&(u.current(),u.current=void 0)},100);return l.useEffect(()=>{const h=i.viewport;if(h){const d=()=>{if(f(),!u.current){const p=Xe(h,c);u.current=p,c()}};return c(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[i.viewport,f,c]),m.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:y(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),S=h.clientX-p.left,v=h.clientY-p.top;s.onThumbPointerDown({x:S,y:v})}),onPointerUp:y(e.onPointerUp,s.onThumbPointerUp)})});ie.displayName=z;var B="ScrollAreaCorner",se=l.forwardRef((e,t)=>{const r=w(B,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?m.jsx($e,{...e,ref:t}):null});se.displayName=B;var $e=l.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=w(B,r),[i,s]=l.useState(0),[c,a]=l.useState(0),u=!!(i&&c);return T(o.scrollbarX,()=>{var h;const f=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(f),a(f)}),T(o.scrollbarY,()=>{var h;const f=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),u?m.jsx(_.div,{...n,ref:t,style:{width:i,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function V(e){return e?parseInt(e,10):0}function ce(e,t){const r=e/t;return isNaN(r)?0:r}function H(e){const t=ce(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Fe(e,t,r,n="ltr"){const o=H(r),i=o/2,s=t||i,c=o-s,a=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-c,f=r.content-r.viewport,h=n==="ltr"?[0,f]:[f*-1,0];return ae([a,u],h)(e)}function J(e,t,r="ltr"){const n=H(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,c=i-n,a=r==="ltr"?[0,s]:[s*-1,0],u=Oe(e,a);return ae([0,s],[0,c])(u)}function ae(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ue(e,t){return e>0&&e<t}var Xe=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,c=r.top!==i.top;(s||c)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Y(e,t){const r=R(e),n=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),l.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function T(e,t){const r=R(t);F(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var ke=Q,Be=te,qe=se;const Ze=l.forwardRef(({className:e,children:t,...r},n)=>m.jsxs(ke,{ref:n,className:fe("relative overflow-hidden",e),type:"auto",...r,children:[m.jsx(Be,{className:"h-full w-full rounded-[inherit] [&>div]:!block",children:t}),m.jsx(re,{orientation:"vertical",className:"flex h-full w-2.5 touch-none select-none border-l border-l-transparent p-[1px] transition-colors",children:m.jsx(ie,{className:"relative flex-1 rounded-full bg-border"})}),m.jsx(qe,{})]}));Ze.displayName="ScrollArea";export{_ as P,Ze as S,L as a,E as b,y as c,Ne as d,F as u};
@@ -1,2 +1,2 @@
1
- var N0=Object.defineProperty;var t0=e=>{throw TypeError(e)};var C0=(e,t,r)=>t in e?N0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s0=(e,t,r)=>C0(e,typeof t!="symbol"?t+"":t,r),U=(e,t,r)=>t.has(e)||t0("Cannot "+r);var p=(e,t,r)=>(U(e,t,"read from private field"),r?r.call(e):t.get(e)),k=(e,t,r)=>t.has(e)?t0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),w=(e,t,r,n)=>(U(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),O=(e,t,r)=>(U(e,t,"access private method"),r);import{v as k0,w as F,x as O0,y as R0,Q as u0,u as h0,z as S0,B as V0,r as m,E as M0,G as E0,H as H0,J as B0,K as r0,L as P0,M as A0,N as z0,O as T0,j as s,g as B,V as m0,a as R,c as _0,W as Q0,X as U0,i as f0,e as F0,f as D0,A as p0,C as q0}from"./index-CvS46tYl.js";import{V as $0,u as n0}from"./vm-boot-gate-DG5U7SkD.js";import{u as I,P as G,c as Z0,a as K0,b as I0,d as G0,S as J0}from"./scroll-area-D0TYc2jF.js";import{V as W0}from"./vm-status-badges-CKabwPpS.js";import{u as g0}from"./useSuspenseQuery-j2bgzu1R.js";import{b as X0}from"./hooks-CdZ_23e1.js";function o0(e,t){const r=new Set(t);return e.filter(n=>!r.has(n))}function Y0(e,t,r){const n=e.slice(0);return n[t]=r,n}var E,j,H,M,N,V,P,A,z,T,L,D,q,x0,$,Z,K,d0,e2=(d0=class extends k0{constructor(t,r,n){super();k(this,L);k(this,E);k(this,j);k(this,H);k(this,M);k(this,N);k(this,V);k(this,P);k(this,A);k(this,z);k(this,T,[]);w(this,E,t),w(this,M,n),w(this,H,[]),w(this,N,[]),w(this,j,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&p(this,N).forEach(t=>{t.subscribe(r=>{O(this,L,Z).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,N).forEach(t=>{t.destroy()})}setQueries(t,r){w(this,H,t),w(this,M,r),F.batch(()=>{const n=p(this,N),o=O(this,L,$).call(this,p(this,H));o.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions));const a=o.map(c=>c.observer),i=a.map(c=>c.getCurrentResult()),l=n.length!==a.length,f=a.some((c,x)=>c!==n[x]),h=l||f,g=h?!0:i.some((c,x)=>{const y=p(this,j)[x];return!y||!O0(c,y)});!h&&!g||(h&&(w(this,T,o),w(this,N,a)),w(this,j,i),this.hasListeners()&&(h&&(o0(n,a).forEach(c=>{c.destroy()}),o0(a,n).forEach(c=>{c.subscribe(x=>{O(this,L,Z).call(this,c,x)})})),O(this,L,K).call(this)))})}getCurrentResult(){return p(this,j)}getQueries(){return p(this,N).map(t=>t.getCurrentQuery())}getObservers(){return p(this,N)}getOptimisticResult(t,r){const n=O(this,L,$).call(this,t),o=n.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions)),a=n.map(i=>i.defaultedQueryOptions.queryHash);return[o,i=>O(this,L,q).call(this,i??o,r,a),()=>O(this,L,D).call(this,o,n)]}},E=new WeakMap,j=new WeakMap,H=new WeakMap,M=new WeakMap,N=new WeakMap,V=new WeakMap,P=new WeakMap,A=new WeakMap,z=new WeakMap,T=new WeakMap,L=new WeakSet,D=function(t,r){return r.map((n,o)=>{const a=t[o];return n.defaultedQueryOptions.notifyOnChangeProps?a:n.observer.trackResult(a,i=>{r.forEach(l=>{l.observer.trackProp(i)})})})},q=function(t,r,n){if(r){const o=p(this,z),a=n!==void 0&&o!==void 0&&(o.length!==n.length||n.some((i,l)=>i!==o[l]));return(!p(this,V)||p(this,j)!==p(this,A)||a||r!==p(this,P))&&(w(this,P,r),w(this,A,p(this,j)),n!==void 0&&w(this,z,n),w(this,V,R0(p(this,V),r(t)))),p(this,V)}return t},x0=function(){var t;return((t=p(this,M))==null?void 0:t.combine)!==void 0&&p(this,N).some((r,n)=>{var o;return r.options.suspense&&((o=p(this,j)[n])==null?void 0:o.data)===void 0})},$=function(t){const r=new Map;p(this,N).forEach(o=>{const a=o.options.queryHash;if(!a)return;const i=r.get(a);i?i.push(o):r.set(a,[o])});const n=[];return t.forEach(o=>{var f;const a=p(this,E).defaultQueryOptions(o),l=((f=r.get(a.queryHash))==null?void 0:f.shift())??new u0(p(this,E),a);n.push({defaultedQueryOptions:a,observer:l})}),n},Z=function(t,r){const n=p(this,N).indexOf(t);n!==-1&&(w(this,j,Y0(p(this,j),n,r)),O(this,L,K).call(this))},K=function(){var t;if(this.hasListeners()){const r=O(this,L,D).call(this,p(this,j),p(this,T)),n=O(this,L,x0).call(this),o=p(this,V),a=n?o:O(this,L,q).call(this,r,(t=p(this,M))==null?void 0:t.combine);(n||o!==a)&&F.batch(()=>{this.listeners.forEach(i=>{i(p(this,j))})})}},d0);function t2({queries:e,...t},r){const n=h0(),o=S0(),a=V0(),i=m.useMemo(()=>e.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=o?"isRestoring":"optimistic",v}),[e,n,o]);i.forEach(u=>{M0(u);const v=n.getQueryCache().get(u.queryHash);E0(u,a,v)}),H0(a);const[l]=m.useState(()=>new e2(n,i,t)),[f,h,g]=l.getOptimisticResult(i,t.combine),c=!o&&t.subscribed!==!1;m.useSyncExternalStore(m.useCallback(u=>c?l.subscribe(F.batchCalls(u)):B0,[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setQueries(i,t)},[i,t,l]);const y=f.some((u,v)=>r0(i[v],u))?f.flatMap((u,v)=>{const b=i[v];if(b&&r0(b,u)){const C=new u0(n,b);return P0(b,C,a)}return[]}):[];if(y.length>0)throw Promise.all(y);const d=f.find((u,v)=>{const b=i[v];return b&&A0({result:u,errorResetBoundary:a,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(d!=null&&d.error)throw d.error;return h(g())}function s2(e,t){return t2({...e,queries:e.queries.map(r=>({...r,suspense:!0,throwOnError:z0,enabled:!0,placeholderData:void 0}))})}const a0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,i0=T0,r2=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return i0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(h=>{const g=r==null?void 0:r[h],c=a==null?void 0:a[h];if(g===null)return null;const x=a0(g)||a0(c);return o[h][x]}),l=r&&Object.entries(r).reduce((h,g)=>{let[c,x]=g;return x===void 0||(h[c]=x),h},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((h,g)=>{let{class:c,className:x,...y}=g;return Object.entries(y).every(d=>{let[u,v]=d;return Array.isArray(v)?v.includes({...a,...l}[u]):{...a,...l}[u]===v})?[...h,c,x]:h},[]);return i0(e,i,f,r==null?void 0:r.class,r==null?void 0:r.className)},n2=r2("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 v0({className:e,variant:t,...r}){return s.jsx("div",{className:B(n2({variant:t}),e),...r})}var o2=m0[" useInsertionEffect ".trim().toString()]||I;function a2({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=i2({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:o;{const g=m.useRef(e!==void 0);m.useEffect(()=>{const c=g.current;c!==l&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,n])}const h=m.useCallback(g=>{var c;if(l){const x=l2(g)?g(e):g;x!==e&&((c=i.current)==null||c.call(i,x))}else a(g)},[l,e,a,i]);return[f,h]}function i2({defaultProp:e,onChange:t}){const[r,n]=m.useState(e),o=m.useRef(r),a=m.useRef(t);return o2(()=>{a.current=t},[t]),m.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function l2(e){return typeof e=="function"}var c2=m0[" useId ".trim().toString()]||(()=>{}),d2=0;function u2(e){const[t,r]=m.useState(c2());return I(()=>{r(n=>n??String(d2++))},[e]),e||(t?`radix-${t}`:"")}var Q="Collapsible",[h2]=G0(Q),[m2,J]=h2(Q),L0=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[f,h]=a2({prop:n,defaultProp:o??!1,onChange:i,caller:Q});return s.jsx(m2,{scope:r,disabled:a,contentId:u2(),open:f,onOpenToggle:m.useCallback(()=>h(g=>!g),[h]),children:s.jsx(G.div,{"data-state":X(f),"data-disabled":a?"":void 0,...l,ref:t})})});L0.displayName=Q;var b0="CollapsibleTrigger",w0=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=J(b0,r);return s.jsx(G.button,{type:"button","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":X(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Z0(e.onClick,o.onOpenToggle)})});w0.displayName=b0;var W="CollapsibleContent",y0=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=J(W,e.__scopeCollapsible);return s.jsx(K0,{present:r||o.open,children:({present:a})=>s.jsx(f2,{...n,ref:t,present:a})})});y0.displayName=W;var f2=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=J(W,r),[l,f]=m.useState(n),h=m.useRef(null),g=I0(t,h),c=m.useRef(0),x=c.current,y=m.useRef(0),d=y.current,u=i.open||l,v=m.useRef(u),b=m.useRef(void 0);return m.useEffect(()=>{const C=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(C)},[]),I(()=>{const C=h.current;if(C){b.current=b.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const e0=C.getBoundingClientRect();c.current=e0.height,y.current=e0.width,v.current||(C.style.transitionDuration=b.current.transitionDuration,C.style.animationName=b.current.animationName),f(n)}},[i.open,n]),s.jsx(G.div,{"data-state":X(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!u,...a,ref:g,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":d?`${d}px`:void 0,...e.style},children:u&&o})});function X(e){return e?"open":"closed"}var p2=L0;const g2=p2,x2=w0,v2=y0,L2="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",b2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='1200'%20height='1200'%20viewBox='0%200%201200%201200'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23d97757'%20d='M%20233.959793%20800.214905%20L%20468.644287%20668.536987%20L%20472.590637%20657.100647%20L%20468.644287%20650.738403%20L%20457.208069%20650.738403%20L%20417.986633%20648.322144%20L%20283.892639%20644.69812%20L%20167.597321%20639.865845%20L%2054.926208%20633.825623%20L%2026.577238%20627.785339%20L%203.3e-05%20592.751709%20L%202.73832%20575.27533%20L%2026.577238%20559.248352%20L%2060.724873%20562.228149%20L%20136.187973%20567.382629%20L%20249.422867%20575.194763%20L%20331.570496%20580.026978%20L%20453.261841%20592.671082%20L%20472.590637%20592.671082%20L%20475.328857%20584.859009%20L%20468.724915%20580.026978%20L%20463.570557%20575.194763%20L%20346.389313%20495.785217%20L%20219.543671%20411.865906%20L%20153.100723%20363.543762%20L%20117.181267%20339.060425%20L%2099.060455%20316.107361%20L%2091.248367%20266.01355%20L%20123.865784%20230.093994%20L%20167.677887%20233.073853%20L%20178.872513%20236.053772%20L%20223.248367%20270.201477%20L%20318.040283%20343.570496%20L%20441.825592%20434.738342%20L%20459.946411%20449.798706%20L%20467.194672%20444.64447%20L%20468.080597%20441.020203%20L%20459.946411%20427.409485%20L%20392.617493%20305.718323%20L%20320.778564%20181.932983%20L%20288.80542%20130.630859%20L%20280.348999%2099.865845%20C%20277.369171%2087.221436%20275.194641%2076.590698%20275.194641%2063.624268%20L%20312.322174%2013.20813%20L%20332.8591%206.604126%20L%20382.389313%2013.20813%20L%20403.248352%2031.328979%20L%20434.013519%20101.71814%20L%20483.865753%20212.537048%20L%20561.181274%20363.221497%20L%20583.812134%20407.919434%20L%20595.892639%20449.315491%20L%20600.40271%20461.959839%20L%20608.214783%20461.959839%20L%20608.214783%20454.711609%20L%20614.577271%20369.825623%20L%20626.335632%20265.61084%20L%20637.771851%20131.516846%20L%20641.718201%2093.745117%20L%20660.402832%2048.483276%20L%20697.530334%2024.000122%20L%20726.52356%2037.852417%20L%20750.362549%2072%20L%20747.060486%2094.067139%20L%20732.886047%20186.201416%20L%20705.100708%20330.52356%20L%20686.979919%20427.167847%20L%20697.530334%20427.167847%20L%20709.61084%20415.087341%20L%20758.496704%20350.174561%20L%20840.644348%20247.490051%20L%20876.885925%20206.738342%20L%20919.167847%20161.71814%20L%20946.308838%20140.29541%20L%20997.61084%20140.29541%20L%201035.38269%20196.429626%20L%201018.469849%20254.416199%20L%20965.637634%20321.422852%20L%20921.825562%20378.201538%20L%20859.006714%20462.765259%20L%20819.785278%20530.41626%20L%20823.409424%20535.812073%20L%20832.75177%20534.92627%20L%20974.657776%20504.724915%20L%201051.328979%20490.872559%20L%201142.818848%20475.167786%20L%201184.214844%20494.496582%20L%201188.724854%20514.147644%20L%201172.456421%20554.335693%20L%201074.604126%20578.496765%20L%20959.838989%20601.449829%20L%20788.939636%20641.879272%20L%20786.845764%20643.409485%20L%20789.261841%20646.389343%20L%20866.255127%20653.637634%20L%20899.194702%20655.409424%20L%20979.812134%20655.409424%20L%201129.932861%20666.604187%20L%201169.154419%20692.537109%20L%201192.671265%20724.268677%20L%201188.724854%20748.429688%20L%201128.322144%20779.194641%20L%201046.818848%20759.865845%20L%20856.590759%20714.604126%20L%20791.355774%20698.335754%20L%20782.335693%20698.335754%20L%20782.335693%20703.731567%20L%20836.69812%20756.885986%20L%20936.322205%20846.845581%20L%201061.073975%20962.81897%20L%201067.436279%20991.490112%20L%201051.409424%201014.120911%20L%201034.496704%201011.704712%20L%20924.885986%20929.234924%20L%20882.604126%20892.107544%20L%20786.845764%20811.48999%20L%20780.483276%20811.48999%20L%20780.483276%20819.946289%20L%20802.550415%20852.241699%20L%20919.087341%201027.409424%20L%20925.127625%201081.127686%20L%20916.671204%201098.604126%20L%20886.469849%201109.154419%20L%20853.288696%201103.114136%20L%20785.073914%201007.355835%20L%20714.684631%20899.516785%20L%20657.906067%20802.872498%20L%20650.979858%20806.81897%20L%20617.476624%201167.704834%20L%20601.771851%201186.147705%20L%20565.530212%201200%20L%20535.328857%201177.046997%20L%20519.302124%201139.919556%20L%20535.328857%201066.550537%20L%20554.657776%20970.792053%20L%20570.362488%20894.68457%20L%20584.536926%20800.134277%20L%20592.993347%20768.724976%20L%20592.429626%20766.630859%20L%20585.503479%20767.516968%20L%20514.22821%20865.369263%20L%20405.825531%201011.865906%20L%20320.053711%201103.677979%20L%20299.516815%201111.812256%20L%20263.919525%201093.369263%20L%20267.221497%201060.429688%20L%20287.114136%201031.114136%20L%20405.825531%20880.107361%20L%20477.422913%20786.52356%20L%20523.651062%20732.483276%20L%20523.328918%20724.671265%20L%20520.590698%20724.671265%20L%20205.288605%20929.395935%20L%20149.154434%20936.644409%20L%20124.993355%20914.01355%20L%20127.973183%20876.885986%20L%20139.409409%20864.80542%20L%20234.201385%20799.570435%20L%20233.879227%20799.8927%20Z'/%3e%3c/svg%3e",w2="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20fill='%23412991'%20d='M22.2819%209.8211a5.9847%205.9847%200%200%200-.5157-4.9108%206.0462%206.0462%200%200%200-6.5098-2.9A6.0651%206.0651%200%200%200%204.9807%204.1818a5.9847%205.9847%200%200%200-3.9977%202.9%206.0462%206.0462%200%200%200%20.7427%207.0966%205.98%205.98%200%200%200%20.511%204.9107%206.051%206.051%200%200%200%206.5146%202.9001A5.9847%205.9847%200%200%200%2013.2599%2024a6.0557%206.0557%200%200%200%205.7718-4.2058%205.9894%205.9894%200%200%200%203.9977-2.9001%206.0557%206.0557%200%200%200-.7475-7.0729zm-9.022%2012.6081a4.4755%204.4755%200%200%201-2.8764-1.0408l.1419-.0804%204.7783-2.7582a.7948.7948%200%200%200%20.3927-.6813v-6.7369l2.02%201.1686a.071.071%200%200%201%20.038.052v5.5826a4.504%204.504%200%200%201-4.4945%204.4944zm-9.6607-4.1254a4.4708%204.4708%200%200%201-.5346-3.0137l.142.0852%204.783%202.7582a.7712.7712%200%200%200%20.7806%200l5.8428-3.3685v2.3324a.0804.0804%200%200%201-.0332.0615L9.74%2019.9502a4.4992%204.4992%200%200%201-6.1408-1.6464zM2.3408%207.8956a4.485%204.485%200%200%201%202.3655-1.9728V11.6a.7664.7664%200%200%200%20.3879.6765l5.8144%203.3543-2.0201%201.1685a.0757.0757%200%200%201-.071%200l-4.8303-2.7865A4.504%204.504%200%200%201%202.3408%207.872zm16.5963%203.8558L13.1038%208.364%2015.1192%207.2a.0757.0757%200%200%201%20.071%200l4.8303%202.7913a4.4944%204.4944%200%200%201-.6765%208.1042v-5.6772a.79.79%200%200%200-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759%200%200%200-.7854%200L9.409%209.2297V6.8974a.0662.0662%200%200%201%20.0284-.0615l4.8303-2.7866a4.4992%204.4992%200%200%201%206.6802%204.66zM8.3065%2012.863l-2.02-1.1638a.0804.0804%200%200%201-.038-.0567V6.0742a4.4992%204.4992%200%200%201%207.3757-3.4537l-.142.0805L8.704%205.459a.7948.7948%200%200%200-.3927.6813zm1.0976-2.3654l2.602-1.4998%202.6069%201.4998v2.9994l-2.5974%201.4997-2.6067-1.4997Z'/%3e%3c/svg%3e",y2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,j2="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",N2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,C2="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",k2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,O2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,R2="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",S2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,V2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,M2="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",l0="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",E2="data:image/svg+xml,%3csvg%20width='240'%20height='300'%20viewBox='0%200%20240%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1401_86283)'%3e%3cmask%20id='mask0_1401_86283'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='240'%20height='300'%3e%3cpath%20d='M240%200H0V300H240V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1401_86283)'%3e%3cpath%20d='M180%20240H60V120H180V240Z'%20fill='%23FFFFFF'/%3e%3cpath%20d='M180%2060H60V240H180V60ZM240%20300H0V0H240V300Z'%20fill='%2318181B'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1401_86283'%3e%3crect%20width='240'%20height='300'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",H2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20800%20800'%3e%3cpath%20fill='%2318181B'%20fill-rule='evenodd'%20d='M165.29%20165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65%20282.65V400H400V282.65Z'/%3e%3cpath%20fill='%2318181B'%20d='M517.36%20400H634.72V634.72H517.36Z'/%3e%3c/svg%3e",B2="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",P2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,A2="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",z2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2030%2024'%20fill='none'%3e%3cpath%20d='M29.3388%209.46767H18.448V0.00146484H14.9293V10.2725C14.9293%2011.3634%2015.36%2012.411%2016.1254%2013.183L25.018%2022.151L27.506%2019.6419L20.938%2013.0183H29.3408V9.46975L29.3388%209.46767Z'%20fill='%233B82F6'/%3e%3cpath%20d='M1.82839%204.36056L8.39633%2010.9842H-0.00646973V14.5328H10.8843V23.999H14.403V13.728C14.403%2012.637%2013.9723%2011.5894%2013.2069%2010.8175L4.31635%201.85147L1.82839%204.36056Z'%20fill='%233B82F6'/%3e%3c/svg%3e",T2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,_2="data:image/svg+xml,%3csvg%20fill='%23019733'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVim%3c/title%3e%3cpath%20d='M24%2011.986h-.027l-4.318-4.318%204.303-4.414V1.461l-.649-.648h-8.198l-.66.605v1.045L12.015.027V0L12%20.014%2011.986%200v.027l-1.29%201.291-.538-.539H2.035l-.638.692v1.885l.616.616h.72v5.31L.027%2011.987H0L.014%2012%200%2012.014h.027l2.706%202.706v6.467l.907.523h2.322l1.857-1.904%204.166%204.166V24l.015-.014.014.014v-.028l2.51-2.509h.485c.111%200%20.211-.07.25-.179l.146-.426c.028-.084.012-.172-.037-.239l1.462-1.462-.612%201.962c-.043.141.036.289.177.332.025.008.052.012.078.012h1.824c.106-.001.201-.064.243-.163l.165-.394c.025-.065.024-.138-.004-.203-.027-.065-.08-.116-.146-.142-.029-.012-.062-.019-.097-.02h-.075l.84-2.644h1.232l-1.016%203.221c-.043.141.036.289.176.332.025.008.052.012.079.012h2.002c.11%200%20.207-.066.248-.17l.164-.428c.051-.138-.021-.29-.158-.341-.029-.011-.06-.017-.091-.017h-.145l1.131-3.673c.027-.082.012-.173-.039-.24l-.375-.504-.003-.005c-.051-.064-.127-.102-.209-.102h-1.436c-.071%200-.141.03-.19.081l-.4.439h-.624l-.042-.046%204.445-4.445H24L23.986%2012l.014-.014zM9.838%2021.139l1.579-4.509h-.501l.297-.304h1.659l-1.563%204.555h.623l-.079.258H9.838zm3.695-7.516l.15.151-.269.922-.225.226h-.969l-.181-.181.311-.871.288-.247h.895zM5.59%2020.829H3.877l-.262-.15V3.091H2.379l-.1-.1V1.815l.143-.154h7.371l.213.214v1.108l-.142.173H8.785v8.688l8.807-8.688h-2.086l-.175-.188V1.805l.121-.111h7.49l.132.133v1.07L12.979%2013.25h-.373c-.015-.001-.028%200-.042.001l-.02.003c-.045.01-.086.03-.119.06l-.343.295-.004.003c-.033.031-.059.069-.073.111l-.296.83-6.119%206.276zm14.768-3.952l.474-.519h1.334l.309.415-1.265%204.107h.493l-.08.209H19.84l1.124-3.564h-2.015l-1.077%203.391h.424l-.073.174h-1.605l1.107-3.548h-2.096l-1.062%203.339h.436l-.072.209H13.27l1.514-4.46H14.198l.091-.271h1.65l.519.537h.906l.491-.554h1.061l.489.535h.953z'/%3e%3c/svg%3e",Q2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,U2={coreutils:"dark:brightness-[1.8]",diffutils:"dark:brightness-[1.8]",findutils:"dark:brightness-[1.8]",gawk:"dark:brightness-[1.8]",grep:"dark:brightness-[1.8]",gzip:"dark:brightness-[1.8]",sed:"dark:brightness-[1.8]",tar:"dark:brightness-[1.8]",wget:"dark:brightness-[1.8]",codex:"dark:brightness-[2.1]",curl:"dark:brightness-[2.6]",sqlite3:"dark:brightness-[2.6]",duckdb:"dark:invert",jq:"dark:invert",opencode:"dark:invert",pi:"dark:invert"},F2={browserbase:L2,"claude-code":b2,codex:w2,coreutils:y2,curl:j2,diffutils:N2,duckdb:C2,findutils:k2,gawk:O2,git:R2,grep:S2,gzip:V2,jq:M2,node:l0,nodejs:l0,opencode:E2,pi:H2,python:B2,sed:P2,sqlite3:A2,"super-memory":z2,tar:T2,vim:_2,wget:Q2};function j0(e){return e?new Date(e).toLocaleTimeString():"—"}function Y(e,t=0,r=[]){const n=[...e].sort((o,a)=>+(a.status==="running")-+(o.status==="running")||a.startTime-o.startTime);for(const o of n){const{children:a,...i}=o;r.push({...i,args:i.args??[],depth:t}),Y(a??[],t+1,r)}return r}const D2=32,c0=64e3;class q2{constructor(){s0(this,"buffers",new Map)}append(t,r){const n=this.buffers.get(t);if(n===void 0&&this.buffers.size>=D2){const a=this.buffers.keys().next().value;a!==void 0&&this.buffers.delete(a)}const o=(n??"")+r;this.buffers.set(t,o.length>c0?o.slice(-c0):o)}get(t){return this.buffers.get(t)}}function S({label:e,value:t}){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-muted-foreground/70",children:e}),s.jsx("div",{className:"truncate font-mono",title:t,children:t})]})}function $2({p:e,outputTail:t,onStop:r,onKill:n,actionError:o}){const{armed:a,confirm:i}=X0({resetKey:e.pid});return s.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 text-xs",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 sm:grid-cols-4",children:[s.jsx(S,{label:"ppid",value:e.ppid?String(e.ppid):"—"}),s.jsx(S,{label:"cwd",value:e.cwd||"—"}),s.jsx(S,{label:"driver",value:e.driver||"—"}),s.jsx(S,{label:"exit code",value:e.exitCode==null?"—":String(e.exitCode)}),s.jsx(S,{label:"args",value:e.args.join(" ")||"—"}),s.jsx(S,{label:"started",value:j0(e.startTime)}),s.jsx(S,{label:"exited",value:e.exitTime==null?"—":D0(e.exitTime)}),s.jsx(S,{label:"group / session",value:`${e.pgid} / ${e.sid}`})]}),e.status==="running"?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>i("stop",r),className:"rounded border px-2 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:a==="stop"?"Confirm stop?":"Stop"}),s.jsx("button",{type:"button",onClick:()=>i("kill",n),className:"rounded border border-destructive/40 px-2 py-0.5 text-destructive transition-colors hover:bg-destructive/10",children:a==="kill"?"Confirm kill?":"Kill"})]}):null,o?s.jsx(p0,{error:o,className:"p-0"}):null,t?s.jsxs("div",{children:[s.jsx("div",{className:"mb-1 text-muted-foreground/70",children:"Output (live tail)"}),s.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:t})]}):s.jsx("div",{className:"text-muted-foreground/60",children:"No live output. Only processes spawned through the SDK stream stdout/stderr here."})]})}function Z2(e){const{data:t}=g0(R.processTreeQueryOptions(e)),r=Y(t);return{running:r.filter(n=>n.status==="running").length,total:r.length}}function K2({actorId:e}){const{data:t}=g0(R.processTreeQueryOptions(e)),r=h0(),[n,o]=m.useState(null),[a,i]=m.useState(null),l=Y(t),f=m.useRef(new q2),[,h]=m.useState(0),c=_0().useEvent;c("processOutput",d=>{const u=d;if(!u||typeof u.pid!="number")return;const v=new TextDecoder("utf-8",{fatal:!1}).decode(Q0(u.data));v&&(f.current.append(u.pid,v),h(b=>b+1))}),c("processExit",d=>{const u=d;!u||typeof u.pid!="number"||(f.current.append(u.pid,`
1
+ var N0=Object.defineProperty;var t0=e=>{throw TypeError(e)};var C0=(e,t,r)=>t in e?N0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s0=(e,t,r)=>C0(e,typeof t!="symbol"?t+"":t,r),U=(e,t,r)=>t.has(e)||t0("Cannot "+r);var p=(e,t,r)=>(U(e,t,"read from private field"),r?r.call(e):t.get(e)),k=(e,t,r)=>t.has(e)?t0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),w=(e,t,r,n)=>(U(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),O=(e,t,r)=>(U(e,t,"access private method"),r);import{v as k0,w as F,x as O0,y as R0,Q as u0,u as h0,z as S0,B as V0,r as m,E as M0,G as E0,H as H0,J as B0,K as r0,L as P0,M as A0,N as z0,O as T0,j as s,g as B,V as m0,a as R,c as _0,W as Q0,X as U0,i as f0,e as F0,f as D0,A as p0,C as q0}from"./index-7G_DbdZ6.js";import{V as $0,u as n0}from"./vm-boot-gate-rpuO0b5W.js";import{u as I,P as G,c as Z0,a as K0,b as I0,d as G0,S as J0}from"./scroll-area-kPbv4IGy.js";import{V as W0}from"./vm-status-badges-09qyfN_A.js";import{u as g0}from"./useSuspenseQuery-ChN8rnBd.js";import{b as X0}from"./hooks-DU8a-cwM.js";function o0(e,t){const r=new Set(t);return e.filter(n=>!r.has(n))}function Y0(e,t,r){const n=e.slice(0);return n[t]=r,n}var E,j,H,M,N,V,P,A,z,T,L,D,q,x0,$,Z,K,d0,e2=(d0=class extends k0{constructor(t,r,n){super();k(this,L);k(this,E);k(this,j);k(this,H);k(this,M);k(this,N);k(this,V);k(this,P);k(this,A);k(this,z);k(this,T,[]);w(this,E,t),w(this,M,n),w(this,H,[]),w(this,N,[]),w(this,j,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&p(this,N).forEach(t=>{t.subscribe(r=>{O(this,L,Z).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,N).forEach(t=>{t.destroy()})}setQueries(t,r){w(this,H,t),w(this,M,r),F.batch(()=>{const n=p(this,N),o=O(this,L,$).call(this,p(this,H));o.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions));const a=o.map(c=>c.observer),i=a.map(c=>c.getCurrentResult()),l=n.length!==a.length,f=a.some((c,x)=>c!==n[x]),h=l||f,g=h?!0:i.some((c,x)=>{const y=p(this,j)[x];return!y||!O0(c,y)});!h&&!g||(h&&(w(this,T,o),w(this,N,a)),w(this,j,i),this.hasListeners()&&(h&&(o0(n,a).forEach(c=>{c.destroy()}),o0(a,n).forEach(c=>{c.subscribe(x=>{O(this,L,Z).call(this,c,x)})})),O(this,L,K).call(this)))})}getCurrentResult(){return p(this,j)}getQueries(){return p(this,N).map(t=>t.getCurrentQuery())}getObservers(){return p(this,N)}getOptimisticResult(t,r){const n=O(this,L,$).call(this,t),o=n.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions)),a=n.map(i=>i.defaultedQueryOptions.queryHash);return[o,i=>O(this,L,q).call(this,i??o,r,a),()=>O(this,L,D).call(this,o,n)]}},E=new WeakMap,j=new WeakMap,H=new WeakMap,M=new WeakMap,N=new WeakMap,V=new WeakMap,P=new WeakMap,A=new WeakMap,z=new WeakMap,T=new WeakMap,L=new WeakSet,D=function(t,r){return r.map((n,o)=>{const a=t[o];return n.defaultedQueryOptions.notifyOnChangeProps?a:n.observer.trackResult(a,i=>{r.forEach(l=>{l.observer.trackProp(i)})})})},q=function(t,r,n){if(r){const o=p(this,z),a=n!==void 0&&o!==void 0&&(o.length!==n.length||n.some((i,l)=>i!==o[l]));return(!p(this,V)||p(this,j)!==p(this,A)||a||r!==p(this,P))&&(w(this,P,r),w(this,A,p(this,j)),n!==void 0&&w(this,z,n),w(this,V,R0(p(this,V),r(t)))),p(this,V)}return t},x0=function(){var t;return((t=p(this,M))==null?void 0:t.combine)!==void 0&&p(this,N).some((r,n)=>{var o;return r.options.suspense&&((o=p(this,j)[n])==null?void 0:o.data)===void 0})},$=function(t){const r=new Map;p(this,N).forEach(o=>{const a=o.options.queryHash;if(!a)return;const i=r.get(a);i?i.push(o):r.set(a,[o])});const n=[];return t.forEach(o=>{var f;const a=p(this,E).defaultQueryOptions(o),l=((f=r.get(a.queryHash))==null?void 0:f.shift())??new u0(p(this,E),a);n.push({defaultedQueryOptions:a,observer:l})}),n},Z=function(t,r){const n=p(this,N).indexOf(t);n!==-1&&(w(this,j,Y0(p(this,j),n,r)),O(this,L,K).call(this))},K=function(){var t;if(this.hasListeners()){const r=O(this,L,D).call(this,p(this,j),p(this,T)),n=O(this,L,x0).call(this),o=p(this,V),a=n?o:O(this,L,q).call(this,r,(t=p(this,M))==null?void 0:t.combine);(n||o!==a)&&F.batch(()=>{this.listeners.forEach(i=>{i(p(this,j))})})}},d0);function t2({queries:e,...t},r){const n=h0(),o=S0(),a=V0(),i=m.useMemo(()=>e.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=o?"isRestoring":"optimistic",v}),[e,n,o]);i.forEach(u=>{M0(u);const v=n.getQueryCache().get(u.queryHash);E0(u,a,v)}),H0(a);const[l]=m.useState(()=>new e2(n,i,t)),[f,h,g]=l.getOptimisticResult(i,t.combine),c=!o&&t.subscribed!==!1;m.useSyncExternalStore(m.useCallback(u=>c?l.subscribe(F.batchCalls(u)):B0,[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setQueries(i,t)},[i,t,l]);const y=f.some((u,v)=>r0(i[v],u))?f.flatMap((u,v)=>{const b=i[v];if(b&&r0(b,u)){const C=new u0(n,b);return P0(b,C,a)}return[]}):[];if(y.length>0)throw Promise.all(y);const d=f.find((u,v)=>{const b=i[v];return b&&A0({result:u,errorResetBoundary:a,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(d!=null&&d.error)throw d.error;return h(g())}function s2(e,t){return t2({...e,queries:e.queries.map(r=>({...r,suspense:!0,throwOnError:z0,enabled:!0,placeholderData:void 0}))})}const a0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,i0=T0,r2=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return i0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(h=>{const g=r==null?void 0:r[h],c=a==null?void 0:a[h];if(g===null)return null;const x=a0(g)||a0(c);return o[h][x]}),l=r&&Object.entries(r).reduce((h,g)=>{let[c,x]=g;return x===void 0||(h[c]=x),h},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((h,g)=>{let{class:c,className:x,...y}=g;return Object.entries(y).every(d=>{let[u,v]=d;return Array.isArray(v)?v.includes({...a,...l}[u]):{...a,...l}[u]===v})?[...h,c,x]:h},[]);return i0(e,i,f,r==null?void 0:r.class,r==null?void 0:r.className)},n2=r2("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 v0({className:e,variant:t,...r}){return s.jsx("div",{className:B(n2({variant:t}),e),...r})}var o2=m0[" useInsertionEffect ".trim().toString()]||I;function a2({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=i2({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:o;{const g=m.useRef(e!==void 0);m.useEffect(()=>{const c=g.current;c!==l&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,n])}const h=m.useCallback(g=>{var c;if(l){const x=l2(g)?g(e):g;x!==e&&((c=i.current)==null||c.call(i,x))}else a(g)},[l,e,a,i]);return[f,h]}function i2({defaultProp:e,onChange:t}){const[r,n]=m.useState(e),o=m.useRef(r),a=m.useRef(t);return o2(()=>{a.current=t},[t]),m.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function l2(e){return typeof e=="function"}var c2=m0[" useId ".trim().toString()]||(()=>{}),d2=0;function u2(e){const[t,r]=m.useState(c2());return I(()=>{r(n=>n??String(d2++))},[e]),e||(t?`radix-${t}`:"")}var Q="Collapsible",[h2]=G0(Q),[m2,J]=h2(Q),L0=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[f,h]=a2({prop:n,defaultProp:o??!1,onChange:i,caller:Q});return s.jsx(m2,{scope:r,disabled:a,contentId:u2(),open:f,onOpenToggle:m.useCallback(()=>h(g=>!g),[h]),children:s.jsx(G.div,{"data-state":X(f),"data-disabled":a?"":void 0,...l,ref:t})})});L0.displayName=Q;var b0="CollapsibleTrigger",w0=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=J(b0,r);return s.jsx(G.button,{type:"button","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":X(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Z0(e.onClick,o.onOpenToggle)})});w0.displayName=b0;var W="CollapsibleContent",y0=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=J(W,e.__scopeCollapsible);return s.jsx(K0,{present:r||o.open,children:({present:a})=>s.jsx(f2,{...n,ref:t,present:a})})});y0.displayName=W;var f2=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=J(W,r),[l,f]=m.useState(n),h=m.useRef(null),g=I0(t,h),c=m.useRef(0),x=c.current,y=m.useRef(0),d=y.current,u=i.open||l,v=m.useRef(u),b=m.useRef(void 0);return m.useEffect(()=>{const C=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(C)},[]),I(()=>{const C=h.current;if(C){b.current=b.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const e0=C.getBoundingClientRect();c.current=e0.height,y.current=e0.width,v.current||(C.style.transitionDuration=b.current.transitionDuration,C.style.animationName=b.current.animationName),f(n)}},[i.open,n]),s.jsx(G.div,{"data-state":X(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!u,...a,ref:g,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":d?`${d}px`:void 0,...e.style},children:u&&o})});function X(e){return e?"open":"closed"}var p2=L0;const g2=p2,x2=w0,v2=y0,L2="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",b2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='1200'%20height='1200'%20viewBox='0%200%201200%201200'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23d97757'%20d='M%20233.959793%20800.214905%20L%20468.644287%20668.536987%20L%20472.590637%20657.100647%20L%20468.644287%20650.738403%20L%20457.208069%20650.738403%20L%20417.986633%20648.322144%20L%20283.892639%20644.69812%20L%20167.597321%20639.865845%20L%2054.926208%20633.825623%20L%2026.577238%20627.785339%20L%203.3e-05%20592.751709%20L%202.73832%20575.27533%20L%2026.577238%20559.248352%20L%2060.724873%20562.228149%20L%20136.187973%20567.382629%20L%20249.422867%20575.194763%20L%20331.570496%20580.026978%20L%20453.261841%20592.671082%20L%20472.590637%20592.671082%20L%20475.328857%20584.859009%20L%20468.724915%20580.026978%20L%20463.570557%20575.194763%20L%20346.389313%20495.785217%20L%20219.543671%20411.865906%20L%20153.100723%20363.543762%20L%20117.181267%20339.060425%20L%2099.060455%20316.107361%20L%2091.248367%20266.01355%20L%20123.865784%20230.093994%20L%20167.677887%20233.073853%20L%20178.872513%20236.053772%20L%20223.248367%20270.201477%20L%20318.040283%20343.570496%20L%20441.825592%20434.738342%20L%20459.946411%20449.798706%20L%20467.194672%20444.64447%20L%20468.080597%20441.020203%20L%20459.946411%20427.409485%20L%20392.617493%20305.718323%20L%20320.778564%20181.932983%20L%20288.80542%20130.630859%20L%20280.348999%2099.865845%20C%20277.369171%2087.221436%20275.194641%2076.590698%20275.194641%2063.624268%20L%20312.322174%2013.20813%20L%20332.8591%206.604126%20L%20382.389313%2013.20813%20L%20403.248352%2031.328979%20L%20434.013519%20101.71814%20L%20483.865753%20212.537048%20L%20561.181274%20363.221497%20L%20583.812134%20407.919434%20L%20595.892639%20449.315491%20L%20600.40271%20461.959839%20L%20608.214783%20461.959839%20L%20608.214783%20454.711609%20L%20614.577271%20369.825623%20L%20626.335632%20265.61084%20L%20637.771851%20131.516846%20L%20641.718201%2093.745117%20L%20660.402832%2048.483276%20L%20697.530334%2024.000122%20L%20726.52356%2037.852417%20L%20750.362549%2072%20L%20747.060486%2094.067139%20L%20732.886047%20186.201416%20L%20705.100708%20330.52356%20L%20686.979919%20427.167847%20L%20697.530334%20427.167847%20L%20709.61084%20415.087341%20L%20758.496704%20350.174561%20L%20840.644348%20247.490051%20L%20876.885925%20206.738342%20L%20919.167847%20161.71814%20L%20946.308838%20140.29541%20L%20997.61084%20140.29541%20L%201035.38269%20196.429626%20L%201018.469849%20254.416199%20L%20965.637634%20321.422852%20L%20921.825562%20378.201538%20L%20859.006714%20462.765259%20L%20819.785278%20530.41626%20L%20823.409424%20535.812073%20L%20832.75177%20534.92627%20L%20974.657776%20504.724915%20L%201051.328979%20490.872559%20L%201142.818848%20475.167786%20L%201184.214844%20494.496582%20L%201188.724854%20514.147644%20L%201172.456421%20554.335693%20L%201074.604126%20578.496765%20L%20959.838989%20601.449829%20L%20788.939636%20641.879272%20L%20786.845764%20643.409485%20L%20789.261841%20646.389343%20L%20866.255127%20653.637634%20L%20899.194702%20655.409424%20L%20979.812134%20655.409424%20L%201129.932861%20666.604187%20L%201169.154419%20692.537109%20L%201192.671265%20724.268677%20L%201188.724854%20748.429688%20L%201128.322144%20779.194641%20L%201046.818848%20759.865845%20L%20856.590759%20714.604126%20L%20791.355774%20698.335754%20L%20782.335693%20698.335754%20L%20782.335693%20703.731567%20L%20836.69812%20756.885986%20L%20936.322205%20846.845581%20L%201061.073975%20962.81897%20L%201067.436279%20991.490112%20L%201051.409424%201014.120911%20L%201034.496704%201011.704712%20L%20924.885986%20929.234924%20L%20882.604126%20892.107544%20L%20786.845764%20811.48999%20L%20780.483276%20811.48999%20L%20780.483276%20819.946289%20L%20802.550415%20852.241699%20L%20919.087341%201027.409424%20L%20925.127625%201081.127686%20L%20916.671204%201098.604126%20L%20886.469849%201109.154419%20L%20853.288696%201103.114136%20L%20785.073914%201007.355835%20L%20714.684631%20899.516785%20L%20657.906067%20802.872498%20L%20650.979858%20806.81897%20L%20617.476624%201167.704834%20L%20601.771851%201186.147705%20L%20565.530212%201200%20L%20535.328857%201177.046997%20L%20519.302124%201139.919556%20L%20535.328857%201066.550537%20L%20554.657776%20970.792053%20L%20570.362488%20894.68457%20L%20584.536926%20800.134277%20L%20592.993347%20768.724976%20L%20592.429626%20766.630859%20L%20585.503479%20767.516968%20L%20514.22821%20865.369263%20L%20405.825531%201011.865906%20L%20320.053711%201103.677979%20L%20299.516815%201111.812256%20L%20263.919525%201093.369263%20L%20267.221497%201060.429688%20L%20287.114136%201031.114136%20L%20405.825531%20880.107361%20L%20477.422913%20786.52356%20L%20523.651062%20732.483276%20L%20523.328918%20724.671265%20L%20520.590698%20724.671265%20L%20205.288605%20929.395935%20L%20149.154434%20936.644409%20L%20124.993355%20914.01355%20L%20127.973183%20876.885986%20L%20139.409409%20864.80542%20L%20234.201385%20799.570435%20L%20233.879227%20799.8927%20Z'/%3e%3c/svg%3e",w2="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20fill='%23412991'%20d='M22.2819%209.8211a5.9847%205.9847%200%200%200-.5157-4.9108%206.0462%206.0462%200%200%200-6.5098-2.9A6.0651%206.0651%200%200%200%204.9807%204.1818a5.9847%205.9847%200%200%200-3.9977%202.9%206.0462%206.0462%200%200%200%20.7427%207.0966%205.98%205.98%200%200%200%20.511%204.9107%206.051%206.051%200%200%200%206.5146%202.9001A5.9847%205.9847%200%200%200%2013.2599%2024a6.0557%206.0557%200%200%200%205.7718-4.2058%205.9894%205.9894%200%200%200%203.9977-2.9001%206.0557%206.0557%200%200%200-.7475-7.0729zm-9.022%2012.6081a4.4755%204.4755%200%200%201-2.8764-1.0408l.1419-.0804%204.7783-2.7582a.7948.7948%200%200%200%20.3927-.6813v-6.7369l2.02%201.1686a.071.071%200%200%201%20.038.052v5.5826a4.504%204.504%200%200%201-4.4945%204.4944zm-9.6607-4.1254a4.4708%204.4708%200%200%201-.5346-3.0137l.142.0852%204.783%202.7582a.7712.7712%200%200%200%20.7806%200l5.8428-3.3685v2.3324a.0804.0804%200%200%201-.0332.0615L9.74%2019.9502a4.4992%204.4992%200%200%201-6.1408-1.6464zM2.3408%207.8956a4.485%204.485%200%200%201%202.3655-1.9728V11.6a.7664.7664%200%200%200%20.3879.6765l5.8144%203.3543-2.0201%201.1685a.0757.0757%200%200%201-.071%200l-4.8303-2.7865A4.504%204.504%200%200%201%202.3408%207.872zm16.5963%203.8558L13.1038%208.364%2015.1192%207.2a.0757.0757%200%200%201%20.071%200l4.8303%202.7913a4.4944%204.4944%200%200%201-.6765%208.1042v-5.6772a.79.79%200%200%200-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759%200%200%200-.7854%200L9.409%209.2297V6.8974a.0662.0662%200%200%201%20.0284-.0615l4.8303-2.7866a4.4992%204.4992%200%200%201%206.6802%204.66zM8.3065%2012.863l-2.02-1.1638a.0804.0804%200%200%201-.038-.0567V6.0742a4.4992%204.4992%200%200%201%207.3757-3.4537l-.142.0805L8.704%205.459a.7948.7948%200%200%200-.3927.6813zm1.0976-2.3654l2.602-1.4998%202.6069%201.4998v2.9994l-2.5974%201.4997-2.6067-1.4997Z'/%3e%3c/svg%3e",y2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,j2="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",N2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,C2="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",k2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,O2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,R2="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",S2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,V2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,M2="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",l0="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",E2="data:image/svg+xml,%3csvg%20width='240'%20height='300'%20viewBox='0%200%20240%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1401_86283)'%3e%3cmask%20id='mask0_1401_86283'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='240'%20height='300'%3e%3cpath%20d='M240%200H0V300H240V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1401_86283)'%3e%3cpath%20d='M180%20240H60V120H180V240Z'%20fill='%23FFFFFF'/%3e%3cpath%20d='M180%2060H60V240H180V60ZM240%20300H0V0H240V300Z'%20fill='%2318181B'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1401_86283'%3e%3crect%20width='240'%20height='300'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",H2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20800%20800'%3e%3cpath%20fill='%2318181B'%20fill-rule='evenodd'%20d='M165.29%20165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65%20282.65V400H400V282.65Z'/%3e%3cpath%20fill='%2318181B'%20d='M517.36%20400H634.72V634.72H517.36Z'/%3e%3c/svg%3e",B2="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",P2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,A2="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",z2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2030%2024'%20fill='none'%3e%3cpath%20d='M29.3388%209.46767H18.448V0.00146484H14.9293V10.2725C14.9293%2011.3634%2015.36%2012.411%2016.1254%2013.183L25.018%2022.151L27.506%2019.6419L20.938%2013.0183H29.3408V9.46975L29.3388%209.46767Z'%20fill='%233B82F6'/%3e%3cpath%20d='M1.82839%204.36056L8.39633%2010.9842H-0.00646973V14.5328H10.8843V23.999H14.403V13.728C14.403%2012.637%2013.9723%2011.5894%2013.2069%2010.8175L4.31635%201.85147L1.82839%204.36056Z'%20fill='%233B82F6'/%3e%3c/svg%3e",T2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,_2="data:image/svg+xml,%3csvg%20fill='%23019733'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVim%3c/title%3e%3cpath%20d='M24%2011.986h-.027l-4.318-4.318%204.303-4.414V1.461l-.649-.648h-8.198l-.66.605v1.045L12.015.027V0L12%20.014%2011.986%200v.027l-1.29%201.291-.538-.539H2.035l-.638.692v1.885l.616.616h.72v5.31L.027%2011.987H0L.014%2012%200%2012.014h.027l2.706%202.706v6.467l.907.523h2.322l1.857-1.904%204.166%204.166V24l.015-.014.014.014v-.028l2.51-2.509h.485c.111%200%20.211-.07.25-.179l.146-.426c.028-.084.012-.172-.037-.239l1.462-1.462-.612%201.962c-.043.141.036.289.177.332.025.008.052.012.078.012h1.824c.106-.001.201-.064.243-.163l.165-.394c.025-.065.024-.138-.004-.203-.027-.065-.08-.116-.146-.142-.029-.012-.062-.019-.097-.02h-.075l.84-2.644h1.232l-1.016%203.221c-.043.141.036.289.176.332.025.008.052.012.079.012h2.002c.11%200%20.207-.066.248-.17l.164-.428c.051-.138-.021-.29-.158-.341-.029-.011-.06-.017-.091-.017h-.145l1.131-3.673c.027-.082.012-.173-.039-.24l-.375-.504-.003-.005c-.051-.064-.127-.102-.209-.102h-1.436c-.071%200-.141.03-.19.081l-.4.439h-.624l-.042-.046%204.445-4.445H24L23.986%2012l.014-.014zM9.838%2021.139l1.579-4.509h-.501l.297-.304h1.659l-1.563%204.555h.623l-.079.258H9.838zm3.695-7.516l.15.151-.269.922-.225.226h-.969l-.181-.181.311-.871.288-.247h.895zM5.59%2020.829H3.877l-.262-.15V3.091H2.379l-.1-.1V1.815l.143-.154h7.371l.213.214v1.108l-.142.173H8.785v8.688l8.807-8.688h-2.086l-.175-.188V1.805l.121-.111h7.49l.132.133v1.07L12.979%2013.25h-.373c-.015-.001-.028%200-.042.001l-.02.003c-.045.01-.086.03-.119.06l-.343.295-.004.003c-.033.031-.059.069-.073.111l-.296.83-6.119%206.276zm14.768-3.952l.474-.519h1.334l.309.415-1.265%204.107h.493l-.08.209H19.84l1.124-3.564h-2.015l-1.077%203.391h.424l-.073.174h-1.605l1.107-3.548h-2.096l-1.062%203.339h.436l-.072.209H13.27l1.514-4.46H14.198l.091-.271h1.65l.519.537h.906l.491-.554h1.061l.489.535h.953z'/%3e%3c/svg%3e",Q2=""+new URL("sed-BwsOyU9v.svg",import.meta.url).href,U2={coreutils:"dark:brightness-[1.8]",diffutils:"dark:brightness-[1.8]",findutils:"dark:brightness-[1.8]",gawk:"dark:brightness-[1.8]",grep:"dark:brightness-[1.8]",gzip:"dark:brightness-[1.8]",sed:"dark:brightness-[1.8]",tar:"dark:brightness-[1.8]",wget:"dark:brightness-[1.8]",codex:"dark:brightness-[2.1]",curl:"dark:brightness-[2.6]",sqlite3:"dark:brightness-[2.6]",duckdb:"dark:invert",jq:"dark:invert",opencode:"dark:invert",pi:"dark:invert"},F2={browserbase:L2,"claude-code":b2,codex:w2,coreutils:y2,curl:j2,diffutils:N2,duckdb:C2,findutils:k2,gawk:O2,git:R2,grep:S2,gzip:V2,jq:M2,node:l0,nodejs:l0,opencode:E2,pi:H2,python:B2,sed:P2,sqlite3:A2,"super-memory":z2,tar:T2,vim:_2,wget:Q2};function j0(e){return e?new Date(e).toLocaleTimeString():"—"}function Y(e,t=0,r=[]){const n=[...e].sort((o,a)=>+(a.status==="running")-+(o.status==="running")||a.startTime-o.startTime);for(const o of n){const{children:a,...i}=o;r.push({...i,args:i.args??[],depth:t}),Y(a??[],t+1,r)}return r}const D2=32,c0=64e3;class q2{constructor(){s0(this,"buffers",new Map)}append(t,r){const n=this.buffers.get(t);if(n===void 0&&this.buffers.size>=D2){const a=this.buffers.keys().next().value;a!==void 0&&this.buffers.delete(a)}const o=(n??"")+r;this.buffers.set(t,o.length>c0?o.slice(-c0):o)}get(t){return this.buffers.get(t)}}function S({label:e,value:t}){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-muted-foreground/70",children:e}),s.jsx("div",{className:"truncate font-mono",title:t,children:t})]})}function $2({p:e,outputTail:t,onStop:r,onKill:n,actionError:o}){const{armed:a,confirm:i}=X0({resetKey:e.pid});return s.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 text-xs",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 sm:grid-cols-4",children:[s.jsx(S,{label:"ppid",value:e.ppid?String(e.ppid):"—"}),s.jsx(S,{label:"cwd",value:e.cwd||"—"}),s.jsx(S,{label:"driver",value:e.driver||"—"}),s.jsx(S,{label:"exit code",value:e.exitCode==null?"—":String(e.exitCode)}),s.jsx(S,{label:"args",value:e.args.join(" ")||"—"}),s.jsx(S,{label:"started",value:j0(e.startTime)}),s.jsx(S,{label:"exited",value:e.exitTime==null?"—":D0(e.exitTime)}),s.jsx(S,{label:"group / session",value:`${e.pgid} / ${e.sid}`})]}),e.status==="running"?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>i("stop",r),className:"rounded border px-2 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:a==="stop"?"Confirm stop?":"Stop"}),s.jsx("button",{type:"button",onClick:()=>i("kill",n),className:"rounded border border-destructive/40 px-2 py-0.5 text-destructive transition-colors hover:bg-destructive/10",children:a==="kill"?"Confirm kill?":"Kill"})]}):null,o?s.jsx(p0,{error:o,className:"p-0"}):null,t?s.jsxs("div",{children:[s.jsx("div",{className:"mb-1 text-muted-foreground/70",children:"Output (live tail)"}),s.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:t})]}):s.jsx("div",{className:"text-muted-foreground/60",children:"No live output. Only processes spawned through the SDK stream stdout/stderr here."})]})}function Z2(e){const{data:t}=g0(R.processTreeQueryOptions(e)),r=Y(t);return{running:r.filter(n=>n.status==="running").length,total:r.length}}function K2({actorId:e}){const{data:t}=g0(R.processTreeQueryOptions(e)),r=h0(),[n,o]=m.useState(null),[a,i]=m.useState(null),l=Y(t),f=m.useRef(new q2),[,h]=m.useState(0),c=_0().useEvent;c("processOutput",d=>{const u=d;if(!u||typeof u.pid!="number")return;const v=new TextDecoder("utf-8",{fatal:!1}).decode(Q0(u.data));v&&(f.current.append(u.pid,v),h(b=>b+1))}),c("processExit",d=>{const u=d;!u||typeof u.pid!="number"||(f.current.append(u.pid,`
2
2
  [exited ${u.exitCode}]`),h(v=>v+1),r.invalidateQueries({queryKey:R.processTreeQueryOptions(e).queryKey}))});const x=()=>r.invalidateQueries({queryKey:R.processTreeQueryOptions(e).queryKey}),y=async d=>{i(null);try{await d(),await x()}catch(u){i(u)}};return l.length===0?s.jsx("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:"No processes in the VM."}):s.jsx("div",{className:"max-h-96 overflow-y-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"sticky top-0 bg-secondary text-[11px] text-muted-foreground",children:s.jsxs("tr",{className:"border-b",children:[s.jsx("th",{className:"w-8 px-3 py-2","aria-label":"Expand"}),s.jsx("th",{className:"w-16 px-2 py-2 text-left font-medium",children:"PID"}),s.jsx("th",{className:"px-2 py-2 text-left font-medium",children:"Command"}),s.jsx("th",{className:"w-28 px-2 py-2 text-left font-medium",children:"Started"}),s.jsx("th",{className:"w-28 px-2 py-2 text-left font-medium",children:"Status"})]})}),s.jsx("tbody",{children:l.map(d=>s.jsxs(U0.Fragment,{children:[s.jsxs("tr",{onClick:()=>o(u=>u===d.pid?null:d.pid),className:B("cursor-pointer border-b border-foreground/[0.06] hover:bg-muted/50",n===d.pid&&"bg-muted/40",d.status==="exited"&&"opacity-50"),children:[s.jsx("td",{className:"px-3 py-1.5",children:s.jsx(f0,{className:B("size-3 text-muted-foreground/60 transition-transform",n===d.pid&&"rotate-90")})}),s.jsx("td",{className:"px-2 py-1.5 font-mono",children:d.pid}),s.jsx("td",{className:"px-2 py-1.5 font-mono text-xs",children:s.jsxs("span",{style:{paddingLeft:`${d.depth*14}px`},children:[d.depth>0?s.jsx("span",{className:"text-muted-foreground/40",children:"└ "}):null,d.command,d.args.length>0?s.jsxs("span",{className:"text-muted-foreground/60",children:[" ",d.args.join(" ")]}):null]})}),s.jsx("td",{className:"px-2 py-1.5 font-mono text-xs text-muted-foreground",children:j0(d.startTime)}),s.jsx("td",{className:"px-2 py-1.5",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs",children:[s.jsx(F0,{color:d.status==="running"?"green":"muted"}),d.status]})})]}),n===d.pid?s.jsx("tr",{className:"border-b border-foreground/[0.06] bg-muted/20",children:s.jsx("td",{colSpan:5,children:s.jsx($2,{p:d,outputTail:f.current.get(d.pid),onStop:()=>void y(()=>R.stopProcess(d.pid)),onKill:()=>void y(()=>R.killProcess(d.pid)),actionError:a})})}):null]},d.pid))})]})})}function I2({bundle:e}){const[t,r]=m.useState(!1),n=e.binaries.length>0,o=F2[e.slug];return s.jsxs(g2,{open:t,onOpenChange:r,className:"border-none",children:[s.jsxs(x2,{className:"flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50",disabled:!n,children:[s.jsx(f0,{className:B("size-3 shrink-0 text-muted-foreground transition-transform",t&&"rotate-90",!n&&"opacity-0")}),s.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?s.jsx("img",{src:o,alt:"",className:B("size-4",U2[e.slug])}):s.jsx("span",{className:"text-[11px] font-medium text-black/60 dark:text-muted-foreground",children:e.slug.charAt(0)})}),s.jsx("span",{className:"flex-1 truncate font-mono text-sm",children:e.name}),n?s.jsxs("span",{className:"text-[11px] tabular-nums text-muted-foreground/70",children:[e.binaries.length," cmd",e.binaries.length===1?"":"s"]}):null,s.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:e.version}),s.jsx(v0,{variant:e.source==="user"?"outline":"secondary",children:e.source})]}),n?s.jsx(v2,{children:s.jsx("div",{className:"flex flex-wrap gap-1.5 px-4 pb-3 pl-9",children:e.binaries.map(a=>s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:a},a))})}):null]})}const G2=e=>typeof e>"u"||e===null||Object.keys(e).length===0;function J2({mounts:e}){return s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-[11px] text-muted-foreground",children:s.jsxs("tr",{className:"border-b",children:[s.jsx("th",{className:"px-4 py-2 text-left font-medium",children:"Path"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Kind"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Access"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Config"})]})}),s.jsx("tbody",{children:e.map(t=>s.jsxs("tr",{className:"border-b border-foreground/[0.06] align-top last:border-0 hover:bg-muted/50",children:[s.jsx("td",{className:"px-4 py-2 font-mono text-xs",children:t.path}),s.jsx("td",{className:"px-3 py-2",children:s.jsx(v0,{variant:"secondary",className:"font-mono",children:t.kind})}),s.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:t.readOnly?"read-only":"read-write"}),s.jsx("td",{className:"px-3 py-2",children:G2(t.config)?s.jsx("span",{className:"text-muted-foreground/60",children:"—"}):s.jsxs("div",{className:"group relative max-w-[20rem]",children:[s.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(t.config)}),s.jsx(q0,{value:JSON.stringify(t.config,null,2),className:"absolute right-1 top-1 bg-background/70 backdrop-blur-sm"})]})})]},t.path))})]})}function W2(){const[e,t]=m.useState("3000"),[r,n]=m.useState([]),o=n0({mutationFn:async l=>{const f=Number.parseInt(l,10);if(!Number.isInteger(f)||f<1||f>65535)throw new Error(`Not a valid port: ${l}`);return R.createSignedPreviewUrl(f,900)},onSuccess:l=>n(f=>[...f.filter(h=>h.token!==l.token),l])}),a=n0({mutationFn:async l=>(await R.expireSignedPreviewUrl(l.token),l),onSuccess:l=>n(f=>f.filter(h=>h.token!==l.token))}),i=o.error??a.error;return s.jsxs("div",{className:"text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("label",{className:"text-muted-foreground",htmlFor:"agentos-preview-port",children:"Port"}),s.jsx("input",{id:"agentos-preview-port",value:e,onChange:l=>t(l.target.value),onKeyDown:l=>l.key==="Enter"&&o.mutate(e),inputMode:"numeric",className:"w-20 rounded border bg-background px-2 py-1 font-mono focus:outline-none"}),s.jsx("button",{type:"button",disabled:o.isPending,onClick:()=>o.mutate(e),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"}),s.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."})]}),i?s.jsx(p0,{error:i,className:"py-2"}):null,r.length>0?s.jsx("div",{className:"mt-2 flex flex-col gap-1",children:r.map(l=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("a",{href:l.path,target:"_blank",rel:"noreferrer",className:"truncate font-mono text-primary hover:underline",children:["port ",l.port,": ",l.path]}),s.jsxs("span",{className:"text-muted-foreground/60",children:["expires ",new Date(l.expiresAt).toLocaleTimeString()]}),s.jsx("button",{type:"button",onClick:()=>a.mutate(l),className:"rounded border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:"Revoke"})]},l.token))}):null]})}function _({title:e,right:t,children:r}){return s.jsxs("section",{className:"rounded-xl border bg-secondary p-4",children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-semibold",children:e}),s.jsx("span",{className:"ml-auto"}),t]}),r]})}function ae({actorId:e}){return s.jsx($0,{actorId:e,note:"VM not booted.",actionLabel:"Boot the VM and show system info",children:s.jsx(X2,{actorId:e})})}function X2({actorId:e}){const[t,r]=s2({queries:[R.softwareQueryOptions(e),R.mountsQueryOptions(e)]}),n=Z2(e),o=a=>s.jsx("span",{className:"text-xs text-muted-foreground",children:a});return s.jsxs("div",{className:"relative h-full min-h-0",children:[s.jsx("div",{className:"absolute right-3 top-2 z-10",children:s.jsx(W0,{actorId:e})}),s.jsx(J0,{className:"h-full min-h-0",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-4 px-4 py-4",children:[s.jsx(_,{title:"Processes",right:o(`${n.running} of ${n.total} running`),children:s.jsx("div",{className:"overflow-hidden rounded-lg border",children:s.jsx(K2,{actorId:e})})}),s.jsx(_,{title:"Software",right:o(String(t.data.length)),children:t.data.length===0?s.jsx("div",{className:"text-sm text-muted-foreground",children:"No software bundles installed."}):s.jsx("div",{className:"divide-y overflow-hidden rounded-lg border",children:t.data.map(a=>s.jsx(I2,{bundle:a},a.name))})}),s.jsx(_,{title:"Mounts",right:o(String(r.data.length)),children:r.data.length===0?s.jsx("div",{className:"text-sm text-muted-foreground",children:"No mounts configured on this actor."}):s.jsx("div",{className:"overflow-hidden rounded-lg border",children:s.jsx(J2,{mounts:r.data})})}),s.jsx(_,{title:"Preview links",children:s.jsx(W2,{})})]})})]})}export{ae as SystemTabConnected};