@mcpjam/inspector 3.27.0 → 3.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/client/assets/{CaniuseCapabilityPage-CXmikV_v.js → CaniuseCapabilityPage-CrC-cTZL.js} +4 -4
  2. package/dist/client/assets/{CaniuseLoadingScreen-CISUL_K4.js → CaniuseLoadingScreen-DFga82Px.js} +2 -2
  3. package/dist/client/assets/{PosthogUtils-DE_PkwDN.js → PosthogUtils-BAwbC5iX.js} +2 -2
  4. package/dist/client/assets/{PosthogUtils-E_cG1Twh.js → PosthogUtils-C6QzDx66.js} +1 -1
  5. package/dist/client/assets/{access-link-C0MWhbv8.js → access-link-BJMsYDmK.js} +2 -2
  6. package/dist/client/assets/{app-bootstrap-DfSpCiag.js → app-bootstrap-DzzSTL6f.js} +328 -328
  7. package/dist/client/assets/{app-navigation-BQGUR9cb.js → app-navigation-CTBnrg26.js} +2 -2
  8. package/dist/client/assets/{bundle-mjs-DKP7sq7T.js → bundle-mjs-BGe1waGK.js} +2 -2
  9. package/dist/client/assets/{caniuse-bootstrap-D6d1Susz.js → caniuse-bootstrap-C-sKeXoq.js} +3 -3
  10. package/dist/client/assets/{chunk-D32TOXHM-D2CUPCH8.js → chunk-D32TOXHM-C-gMffNp.js} +5 -5
  11. package/dist/client/assets/{dead-clicks-autocapture-DvbdThCp.js → dead-clicks-autocapture-Bf2yz9Zr.js} +2 -2
  12. package/dist/client/assets/{error-reporting-CJClTLWK.js → error-reporting-C7685g3J.js} +2 -2
  13. package/dist/client/assets/{error-reporting-B_hxqtsN.js → error-reporting-DmYc69Ih.js} +1 -1
  14. package/dist/client/assets/{exception-autocapture-CkcPU7XW.js → exception-autocapture-C6yGegF5.js} +2 -2
  15. package/dist/client/assets/{feature-flags-BUIQpHKT.js → feature-flags-Cbn8gAeC.js} +3 -3
  16. package/dist/client/assets/{first-run-oauth-return-l9GCZrqg.js → first-run-oauth-return-CFW2tqzu.js} +2 -2
  17. package/dist/client/assets/{highlighted-body-KQOG7T2V-uT92T9zL.js → highlighted-body-KQOG7T2V-BufAIVu0.js} +2 -2
  18. package/dist/client/assets/{index-ByP2kceG.js → index-CCQWRMU8.js} +3 -3
  19. package/dist/client/assets/{jszip.min-C5LLiUXa.js → jszip.min-C6ASC0Lj.js} +2 -2
  20. package/dist/client/assets/{mcp-init-BIoRq6yl.js → mcp-init-BWmQoGiF.js} +3 -3
  21. package/dist/client/assets/{mermaid-MCJ5UELQ-BCP5Oj92.js → mermaid-MCJ5UELQ-84PBltPS.js} +1 -1
  22. package/dist/client/assets/{module-Wq_OenZL.js → module-BA6blRdw.js} +2 -2
  23. package/dist/client/assets/{module-D3s7YCoh.js → module-DovF9UUB.js} +1 -1
  24. package/dist/client/assets/posthog-bundled-extensions-Cs4q3GVP.js +3 -0
  25. package/dist/client/assets/{posthog-bundled-extensions-BIjySVP-.js → posthog-bundled-extensions-_dhL7VQK.js} +1 -1
  26. package/dist/client/assets/{posthog-recorder-DTh3r-Ko.js → posthog-recorder-BIqCIRJB.js} +2 -2
  27. package/dist/client/assets/{preload-helper-BN6vHXe1.js → preload-helper-CQSqs-Ur.js} +1 -1
  28. package/dist/client/assets/{project-route-CjZmQY5n.js → project-route-B8ycjI6Q.js} +2 -2
  29. package/dist/client/assets/{react-dom-DtL8G3gn.js → react-dom-DXowvrFG.js} +2 -2
  30. package/dist/client/assets/{rolldown-runtime-KtSMB9jY.js → rolldown-runtime-BlpueFg6.js} +1 -1
  31. package/dist/client/assets/{server-feature-flags-wgvQSqd5.js → server-feature-flags-CFqtsG2I.js} +2 -2
  32. package/dist/client/assets/{server-feature-flags-BBH-SYjw.js → server-feature-flags-yy8cq8x7.js} +1 -1
  33. package/dist/client/assets/{session-revoked-HpzxsCkX.js → session-revoked-BJat-_na.js} +2 -2
  34. package/dist/client/assets/{surveys-BYfLymeD.js → surveys-DSRAF-TV.js} +2 -2
  35. package/dist/client/assets/telemetry-files-58cade72c6da8102.js +1 -0
  36. package/dist/client/assets/{trace-timeline-BFtz0cI8.js → trace-timeline-BdQMiVa6.js} +1 -1
  37. package/dist/client/assets/{trace-timeline-CRxEZYCU.js → trace-timeline-CLTmhMpA.js} +2 -2
  38. package/dist/client/assets/{web-vitals-C1IvwuFq.js → web-vitals-BGMXZEXu.js} +2 -2
  39. package/dist/client/index.html +12 -12
  40. package/dist/server/harness-install-cli.js +3 -3
  41. package/dist/server/index.js +2 -2
  42. package/package.json +2 -2
  43. package/dist/client/assets/posthog-bundled-extensions-CQjB_Dfr.js +0 -3
  44. package/dist/client/assets/telemetry-files-5758eea65e761de9.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as ng,r as dy}from"./rolldown-runtime-KtSMB9jY.js";import{$ as MB,Dt as sg,bt as hy,q as By,xt as fy}from"./PosthogUtils-DE_PkwDN.js";import{c as ah,l as py,o as my,r as rg}from"./access-link-C0MWhbv8.js";import{n as gy,t as Cy}from"./react-dom-DtL8G3gn.js";import{r as vy}from"./bundle-mjs-DKP7sq7T.js";import{Ar as oi,Cr as Cn,Er as Ey,N as by,Sr as tt,Tr as Sy,Tt as yy,V as xy,br as Dy,fn as wy,jr as ge,jt as ig,wt as Ay}from"./app-navigation-BQGUR9cb.js";import{B as al,Bt as Zs,Ct as ar,E as LB,Gt as Iy,I as og,Jt as Ty,Kt as sr,R as ky,St as ag,T as lh,Ut as Nl,V as Ry,Vt as Ny,Xt as Ro,_ as Ma,b as Oy,bt as As,c as $s,ct as lg,d as Js,g as ch,k as ll,l as Ws,m as uh,n as cg,v as My,vt as dh,xt as ro,y as Ly,yt as _y}from"./feature-flags-BUIQpHKT.js";import{$ as G,B as Fy,J as L,K as Py,Q as ug,X as No,_t as C,at as dg,bt as jt,dt as b,gt as cs,ht as Ut,lt as Hy,rt as at,st as I,tt as X,ut as w,yt as Zt}from"./mcp-init-BIoRq6yl.js";import{Ha as Gy,Nr as jy,Ua as Uy,Wa as Vy,ao as is,d as zy,l as $y,no as Jy,ro as hg,to as Wy}from"./error-reporting-CJClTLWK.js";import{n as Ky,t as qy}from"./session-revoked-HpzxsCkX.js";import{a as Yy,c as Xy,n as Qy,o as Zy}from"./chunk-D32TOXHM-D2CUPCH8.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"3.27.0"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="81f74545-39bd-4255-9d4b-7c7e72eefd22",t._sentryDebugIdIdentifier="sentry-dbid-81f74545-39bd-4255-9d4b-7c7e72eefd22")}catch{}})();var g=ng(gy(),1),ex=Object.defineProperty,tx=(t,e)=>ex(t,"name",{value:e,configurable:!0});function Bg(t,[e,n]){return Math.min(n,Math.max(e,t))}tx(Bg,"clamp");var B=vy(),nx=Object.defineProperty,Te=(t,e)=>nx(t,"name",{value:e,configurable:!0});function fg(t,e){return g.useReducer((n,s)=>e[n][s]??n,t)}Te(fg,"useStateMachine");var pg="ScrollArea",[mg,ij]=Ty(pg),[sx,ln]=mg(pg),rx=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[l,c]=g.useState(null),[u,d]=g.useState(null),[h,f]=g.useState(null),[p,m]=g.useState(null),[v,E]=g.useState(null),[S,A]=g.useState(0),[N,k]=g.useState(0),[R,T]=g.useState(!1),[Q,P]=g.useState(!1),V=oi(n,c),U=Ny(i);return(0,B.jsx)(sx,{scope:s,type:r,dir:U,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:R,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:E,scrollbarYEnabled:Q,onScrollbarYEnabledChange:P,onCornerWidthChange:A,onCornerHeightChange:k,children:(0,B.jsx)(Ro.div,{dir:U,...a,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})},"ScrollArea")),ix="ScrollAreaViewport",ox=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,children:r,nonce:i,...o}=e,a=ln(ix,s),l=g.useRef(null),c=oi(n,l,a.onViewportChange);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ax,{nonce:i}),(0,B.jsx)(Ro.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,B.jsx)("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})},"ScrollAreaViewport")),ax=g.memo(Te(function({nonce:e}){return(0,B.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(t,e)=>t.nonce===e.nonce),ds="ScrollAreaScrollbar",lx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,l=e.orientation==="horizontal";return g.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),i.type==="hover"?(0,B.jsx)(cx,{...r,ref:n,forceMount:s}):i.type==="scroll"?(0,B.jsx)(ux,{...r,ref:n,forceMount:s}):i.type==="auto"?(0,B.jsx)(gg,{...r,ref:n,forceMount:s}):i.type==="always"?(0,B.jsx)(hh,{...r,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),[o,a]=g.useState(!1);return g.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const u=Te(()=>{window.clearTimeout(c),a(!0)},"handlePointerEnter"),d=Te(()=>{c=window.setTimeout(()=>a(!1),i.scrollHideDelay)},"handlePointerLeave");return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),(0,B.jsx)(Nl,{present:s||o,children:(0,B.jsx)(gg,{"data-state":o?"visible":"hidden",...r,ref:n})})},"ScrollAreaScrollbarHover")),ux=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Mo(()=>c("SCROLL_END"),100),[l,c]=fg("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 g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,i.scrollHideDelay,c]),g.useEffect(()=>{const u=i.viewport,d=o?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=Te(()=>{const p=u[d];h!==p&&(c("SCROLL"),a()),h=p},"handleScroll");return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[i.viewport,o,c,a]),(0,B.jsx)(Nl,{present:s||l!=="hidden",children:(0,B.jsx)(hh,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:n,onPointerEnter:sr(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:sr(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),gg=g.forwardRef(Te(function(e,n){const s=ln(ds,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=g.useState(!1),l=e.orientation==="horizontal",c=Mo(()=>{if(s.viewport){const u=s.viewport.offsetWidth<s.viewport.scrollWidth,d=s.viewport.offsetHeight<s.viewport.scrollHeight;a(l?u:d)}},10);return lr(s.viewport,c),lr(s.content,c),(0,B.jsx)(Nl,{present:r||o,children:(0,B.jsx)(hh,{"data-state":o?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarAuto")),hh=g.forwardRef(Te(function(e,n){const{orientation:s="vertical",...r}=e,i=ln(ds,e.__scopeScrollArea),o=g.useRef(null),a=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Bh(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:Te(f=>o.current=f,"onThumbChange"),onThumbPointerUp:Te(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:Te(f=>a.current=f,"onThumbPointerDown")};function h(f,p){return bg(f,a.current,l,p)}return Te(h,"getScrollPosition"),s==="horizontal"?(0,B.jsx)(dx,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,p=fu(f,l,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=h(f,i.dir))}}):s==="vertical"?(0,B.jsx)(hx,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,p=fu(f,l);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=h(f))}}):null},"ScrollAreaScrollbarVisible")),dx=g.forwardRef(Te(function(e,n){const{sizes:s,onSizesChange:r,...i}=e,o=ln(ds,e.__scopeScrollArea),[a,l]=g.useState(),c=g.useRef(null),u=oi(n,c,o.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,B.jsx)(vg,{"data-orientation":"horizontal",...i,ref:u,sizes:s,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oo(s)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(o.viewport){const f=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),ph(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:io(a.paddingLeft),paddingEnd:io(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),hx=g.forwardRef(Te(function(e,n){const{sizes:s,onSizesChange:r,...i}=e,o=ln(ds,e.__scopeScrollArea),[a,l]=g.useState(),c=g.useRef(null),u=oi(n,c,o.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,B.jsx)(vg,{"data-orientation":"vertical",...i,ref:u,sizes:s,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oo(s)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(o.viewport){const f=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),ph(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:io(a.paddingTop),paddingEnd:io(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[Bx,Cg]=mg(ds),vg=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=e,p=ln(ds,s),[m,v]=g.useState(null),E=oi(n,v),S=g.useRef(null),A=g.useRef(""),N=p.viewport,k=r.content-r.viewport,R=Zs(d),T=Zs(c),Q=Mo(h,10);function P(V){if(S.current){const U=V.clientX-S.current.left,j=V.clientY-S.current.top;u({x:U,y:j})}}return Te(P,"handleDragScroll"),g.useEffect(()=>{const V=Te(U=>{const j=U.target;m?.contains(j)&&R(U,k)},"handleWheel");return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[N,m,k,R]),g.useEffect(T,[r,T]),lr(m,Q),lr(p.content,Q),(0,B.jsx)(Bx,{scope:s,scrollbar:m,hasThumb:i,onThumbChange:Zs(o),onThumbPointerUp:Zs(a),onThumbPositionChange:T,onThumbPointerDown:Zs(l),children:(0,B.jsx)(Ro.div,{...f,ref:E,style:{position:"absolute",...f.style},onPointerDown:sr(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),S.current=m.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(V))}),onPointerMove:sr(e.onPointerMove,P),onPointerUp:sr(e.onPointerUp,V=>{const U=V.target;U.hasPointerCapture(V.pointerId)&&U.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=A.current,p.viewport&&(p.viewport.style.scrollBehavior=""),S.current=null})})})},"ScrollAreaScrollbarImpl")),Bu="ScrollAreaThumb",fx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=Cg(Bu,e.__scopeScrollArea);return(0,B.jsx)(Nl,{present:s||i.hasThumb,children:(0,B.jsx)(px,{ref:n,...r})})},"ScrollAreaThumb")),px=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,style:r,...i}=e,o=ln(Bu,s),a=Cg(Bu,s),{onThumbPositionChange:l}=a,c=oi(n,a.onThumbChange),u=g.useRef(void 0),d=Mo(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const h=o.viewport;if(h){const f=Te(()=>{if(d(),!u.current){const p=Cx(h,l);u.current=p,l()}},"handleScroll");return l(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[o.viewport,d,l]),(0,B.jsx)(Ro.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:sr(e.onPointerDownCapture,h=>{const f=h.target.getBoundingClientRect(),p=h.clientX-f.left,m=h.clientY-f.top;a.onThumbPointerDown({x:p,y:m})}),onPointerUp:sr(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Eg="ScrollAreaCorner",mx=g.forwardRef(Te(function(e,n){const s=ln(Eg,e.__scopeScrollArea),r=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&r?(0,B.jsx)(gx,{...e,ref:n}):null},"ScrollAreaCorner")),gx=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,...r}=e,i=ln(Eg,s),[o,a]=g.useState(0),[l,c]=g.useState(0),u=!!(o&&l),{onCornerWidthChange:d,onCornerHeightChange:h}=i;return lr(i.scrollbarX,()=>{const f=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(f),c(f)}),lr(i.scrollbarY,()=>{const f=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(f),a(f)}),g.useEffect(()=>()=>{d(0),h(0)},[d,h]),u?(0,B.jsx)(Ro.div,{...r,ref:n,style:{width:o,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function io(t){return t?parseInt(t,10):0}Te(io,"toInt");function Bh(t,e){const n=t/e;return isNaN(n)?0:n}Te(Bh,"getThumbRatio");function Oo(t){const e=Bh(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=(t.scrollbar.size-n)*e;return Math.max(s,18)}Te(Oo,"getThumbSize");function bg(t,e,n,s="ltr"){const r=Oo(n),i=r/2,o=e||i,a=r-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=s==="ltr"?[0,u]:[u*-1,0];return fh([l,c],d)(t)}Te(bg,"getScrollPositionFromPointer");function fu(t,e,n="ltr"){const s=Oo(e),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-r,o=e.content-e.viewport,a=i-s,l=n==="ltr"?[0,o]:[o*-1,0],c=Bg(t,l);return fh([0,o],[0,a])(c)}Te(fu,"getThumbOffsetFromScroll");function fh(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const s=(e[1]-e[0])/(t[1]-t[0]);return e[0]+s*(n-t[0])}}Te(fh,"linearScale");function ph(t,e){return t>0&&t<e}Te(ph,"isScrollingWithinScrollbarBounds");var Cx=Te((t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},s=0;return Te((function r(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&e(),n=i,s=window.requestAnimationFrame(r)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Mo(t,e){const n=Zs(t),s=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),g.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,e)},[n,e])}Te(Mo,"useDebounceCallback");function lr(t,e){const n=Zs(e);Iy(()=>{let s=0;if(t){const r=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return r.observe(t),()=>{window.cancelAnimationFrame(s),r.unobserve(t)}}},[t,n])}Te(lr,"useResizeObserver");var vx=rx,Ex=ox,bx=mx,Sg={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};Sg.node;var Sx=tt(Sg),yg={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};yg.node;var yx=tt(yg),xg={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};xg.node;var _B=tt(xg),Dg={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};Dg.node;var xx=tt(Dg),wg={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};wg.node;var Dx=tt(wg),Ag={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};Ag.node;var wx=tt(Ag),Ig={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};Ig.node;var Ax=tt(Ig),Tg={name:"list-filter",size:24,node:[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]};Tg.node;var Ix=tt(Tg),kg={name:"list-tree",size:24,node:[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]};kg.node;var FB=tt(kg),Rg={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};Rg.node;var Tx=tt(Rg),Ng={name:"message-square-quote",size:24,node:[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]]};Ng.node;var kx=tt(Ng),Og={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};Og.node;var Rx=tt(Og),Mg={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Mg.node;var Nx=tt(Mg),Lg={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]};Lg.node;var Ox=tt(Lg),_g={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};_g.node;var Mx=tt(_g),Fg={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};Fg.node;var Lx=tt(Fg),Pg={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};Pg.node;var _x=tt(Pg),Hg={name:"shrink",size:24,node:[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]};Hg.node;var Fx=tt(Hg),Gg={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};Gg.node;var Px=tt(Gg),jg={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};jg.node;var Hx=tt(jg),Ug={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};Ug.node;var Gx=tt(Ug),Vg={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};Vg.node;var jx=tt(Vg),zg={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};zg.node;var Ux=tt(zg),Is=class extends Error{constructor(t){super(t),this.name="CanonicalJsonError"}};function $g(t){if(!Number.isFinite(t))throw new Is(`Cannot canonicalize non-finite number: ${String(t)}`);return t===0?"0":String(t)}function Ol(t){if(t===void 0)throw new Is("Cannot canonicalize `undefined` at the root");return pu(t,new Set)}function pu(t,e){if(t===null)return"null";switch(typeof t){case"boolean":return t?"true":"false";case"number":return $g(t);case"string":return JSON.stringify(t);case"object":break;default:throw new Is(`Cannot canonicalize value of type ${typeof t}`)}if(e.has(t))throw new Is("Cannot canonicalize a circular structure");e.add(t);try{if(Array.isArray(t)){const i=[],o=t.length;for(let a=0;a<o;a+=1){const l=t[a];i.push(l===void 0?"null":pu(l,e))}return`[${i.join(",")}]`}const n=Object.getPrototypeOf(t);if(n!==Object.prototype&&n!==null)throw new Is("Cannot canonicalize a non-plain object (only plain objects, arrays and JSON primitives are part of the contract)");const s=t,r=[];for(const i of Object.keys(s).sort()){const o=s[i];o!==void 0&&r.push(`${JSON.stringify(i)}:${pu(o,e)}`)}return`{${r.join(",")}}`}finally{e.delete(t)}}var mu=Symbol("canonicalJsonBounded.overBudget"),Vx=class{constructor(t){this.maxChars=t}parts=[];length=0;remaining(){return this.maxChars-this.length}push(t){if(t.length>this.remaining())throw mu;this.parts.push(t),this.length+=t.length}pushString(t,e=""){if(t.length+2+e.length>this.remaining())throw mu;this.push(JSON.stringify(t)+e)}toString(){return this.parts.join("")}};function oj(t,e){if(t===void 0)return{ok:!1,reason:"uncanonical",message:"Cannot canonicalize `undefined` at the root"};const n=new Vx(e);try{gu(t,new Set,n)}catch(s){return s===mu?{ok:!1,reason:"overBudget"}:{ok:!1,reason:"uncanonical",message:s instanceof Error?s.message:String(s)}}return{ok:!0,json:n.toString()}}function gu(t,e,n){if(t===null){n.push("null");return}switch(typeof t){case"boolean":n.push(t?"true":"false");return;case"number":n.push($g(t));return;case"string":n.pushString(t);return;case"object":break;default:throw new Is(`Cannot canonicalize value of type ${typeof t}`)}if(e.has(t))throw new Is("Cannot canonicalize a circular structure");e.add(t);try{if(Array.isArray(t)){n.push("[");const o=t.length;for(let a=0;a<o;a+=1){a>0&&n.push(",");const l=t[a];l===void 0?n.push("null"):gu(l,e,n)}n.push("]");return}const s=Object.getPrototypeOf(t);if(s!==Object.prototype&&s!==null)throw new Is("Cannot canonicalize a non-plain object (only plain objects, arrays and JSON primitives are part of the contract)");const r=t;n.push("{");let i=!0;for(const o of Object.keys(r).sort()){const a=r[o];a!==void 0&&(i||n.push(","),i=!1,n.pushString(o,":"),gu(a,e,n))}n.push("}")}finally{e.delete(t)}}function Ml(t){return Uy(Gy(Vy(t)))}function mh(t){return Ml(Ol(t))}function zx(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function $x(t){return typeof t=="number"&&Number.isFinite(t)&&t>=0?t:void 0}function Jx(t){const e=Object.entries(t).filter(([,n])=>n!==void 0);return e.length>0?Object.fromEntries(e):void 0}var Wx=["uncachedInputTokens","cacheReadTokens","cacheWriteTokens","cacheWrite1hTokens","outputTokens","reasoningTokens","webSearchRequests"];function Kx(t){const e=zx(t);if(!e)return;const n={};for(const s of Wx){const r=$x(e[s]);r!==void 0&&(n[s]=r)}return Jx(n)}var oo=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:void 0,es=t=>typeof t=="number"&&Number.isFinite(t)&&t>=0?t:void 0,Cu=t=>typeof t=="string"&&t.length>0?t:void 0;function Ks(t,e){return e.includes(t)?t:void 0}function Ss(t,e,n){const s={};for(const r of e){const i=n(t[r]);i!==void 0&&(s[r]=i)}return s}var PB=["input","output","cacheRead","cacheWrite","cacheWrite1h"];function qx(t){const e=oo(t);if(!e||e.currency!=="USD")return;const n=Ss(e,[...PB,"webSearchPerThousand"],es);if(n.input===void 0||n.output===void 0)return;const s=(Array.isArray(e.tiers)?e.tiers:[]).map(oo).filter(r=>es(r?.aboveInputTokens)!==void 0).map(r=>Ss(r,["aboveInputTokens",...PB],es));return{...n,currency:"USD",...s.length>0?{tiers:s}:{}}}function Yx(t){const e=oo(t),n=Ks(e?.source,["list_price","customer_rate"]),s=qx(e?.rates),r=Cu(e?.modelId);if(!e||!n||!s||!r)return;const i=Array.isArray(e.assumptions)?e.assumptions.filter(o=>typeof o=="string"):[];return{source:n,rates:s,modelId:r,...Ss(e,["provider","versionId"],Cu),...Ss(e,["effectiveAt","retrievedAt"],es),...i.length>0?{assumptions:i}:{}}}function Jg(t){const e=oo(t);if(!e||e.currency!=="USD")return;const n=Ks(e.completeness,["complete","partial","unavailable"]),s=es(e.calculationVersion),r=es(e.amountUsd),i=Ks(e.source,["provider_reported","list_price","customer_rate","runner_reported"]);if(!n||s===void 0||n==="unavailable"!=(r===void 0)||r!==void 0&&!i)return;const o=Ss(oo(e.parts)??{},["input","cacheRead","cacheWrite","output","webSearch"],es),a=(Array.isArray(e.missing)?e.missing:[]).filter(f=>Ks(f,["usage","input_tokens","output_tokens","rate","cache_read_rate","cache_write_rate","cache_write_1h_rate","web_search_rate"])!==void 0),l=Ks(e.reason,["no_usage","no_rate","invalid_rate","unsupported_currency"]),c=Ks(e.funding,["mcpjam","customer"]),u=Ks(e.usageSource,["provider","runner","interrupted_estimate"]),d=Kx(e.usage),h=Yx(e.rate);return{calculationVersion:s,currency:"USD",completeness:n,...r!==void 0?{amountUsd:r}:{},...i?{source:i}:{},...Object.keys(o).length>0?{parts:o}:{},...a.length>0?{missing:a}:{},...l?{reason:l}:{},...Ss(e,["tierAboveInputTokens"],es),...h?{rate:h}:{},...Ss(e,["reporter"],Cu),...c?{funding:c}:{},...d?{usage:d}:{},...u?{usageSource:u}:{},...Ss(e,["recordedAt"],es)}}var HB=1000000000000000n,Wg=1e15;function Xx(t){return BigInt(Math.round(t*Wg))}function Qx(t){const e=t/HB,n=t%HB;return Number(e)+Number(n)/Wg}var Zx=["provider_reported","customer_rate","list_price","runner_reported"];function eD(t){let e=0n,n=0,s=0,r=0;const i=new Set;for(const l of t){if(!l||l.amountUsd===void 0||l.currency!=="USD"){r+=1;continue}e+=Xx(l.amountUsd),l.source&&i.add(l.source),l.completeness==="complete"?n+=1:s+=1}const o=t.length,a=n===o?"complete":n+s===0?"unavailable":"partial";return{currency:"USD",knownSubtotalUsd:Qx(e),completeness:a,totalCalls:o,completeCalls:n,partialCalls:s,unavailableCalls:r,sources:Zx.filter(l=>i.has(l))}}function qs(t){const e=[t.scope??"",t.serverId,t.wire,t.taskId];if(t.connectionId!==void 0&&e.push(t.connectionId),e.some(n=>n.includes("\0"))||t.connectionId==="")throw new Error("Invalid task identity");return e.join("\0")}var tD=["completed","failed","cancelled","expired"];function Ti(t){return tD.includes(t)}var nD=250,sD=3e5,rD=1e3,iD=6e4;function GB(t){return typeof t=="number"&&Number.isFinite(t)&&t>0?t:0}function gr(t){return typeof t=="number"&&Number.isFinite(t)&&t>0?t:void 0}function fi(t){return{...t,respondedInputKeys:[...t.respondedInputKeys],terminal:Ti(t.status)}}var aj=class{records=new Map;now;absoluteFloorMs;maximumIntervalMs;backoffBaseMs;backoffMaxMs;userMinimumIntervalMs;callbacks;constructor(t={}){this.now=t.now??(()=>Date.now()),this.absoluteFloorMs=t.absoluteFloorMs??nD,this.maximumIntervalMs=t.maximumIntervalMs??sD,this.backoffBaseMs=t.errorBackoffBaseMs??rD,this.backoffMaxMs=t.errorBackoffMaxMs??iD,this.userMinimumIntervalMs=GB(t.userMinimumIntervalMs),this.callbacks=t.callbacks??{}}setCallbacks(t){this.callbacks=t}setUserMinimumIntervalMs(t){this.userMinimumIntervalMs=GB(t);for(const e of this.records.values()){if(Ti(e.status))continue;const n=(e.lastObservedAt??this.now())+this.effectiveIntervalMs(e),s=e.consecutiveErrors>0?e.nextPollAt:0;e.nextPollAt=Math.max(n,e.retryAfterUntil??0,s)}}getUserMinimumIntervalMs(){return this.userMinimumIntervalMs}effectiveIntervalMs(t,e){const n=e??this.now(),s=gr(t.pollIntervalMs)??0,r=t.consecutiveErrors>0?Math.min(this.backoffBaseMs*2**(t.consecutiveErrors-1),this.backoffMaxMs):0,i=t.retryAfterUntil?Math.max(0,t.retryAfterUntil-n):0,o=Math.min(Math.max(this.absoluteFloorMs,this.userMinimumIntervalMs,r),Math.max(this.maximumIntervalMs,this.absoluteFloorMs));return Math.max(o,s,i)}get(t){return this.records.get(qs(t))}getByKey(t){return this.records.get(t)}snapshot(t){const e=this.get(t);return e?fi(e):void 0}all(){return[...this.records.values()].map(fi)}register(t,e={}){const n=qs(t),s=this.records.get(n);if(s)return s;const r=this.now(),i={key:n,identity:{...t},status:e.status??"unknown",createdAt:e.createdAt,ttlMs:e.ttlMs??null,pollIntervalMs:gr(e.pollIntervalMs),nextPollAt:typeof e.nextPollAt=="number"&&Number.isFinite(e.nextPollAt)?Math.max(r,e.nextPollAt):r,lastObservedAt:typeof e.lastObservedAt=="number"&&Number.isFinite(e.lastObservedAt)?e.lastObservedAt:void 0,consecutiveErrors:0,cancellationRequested:!1,restored:e.restored===!0,pollInFlight:!1,respondedInputKeys:new Set(e.respondedInputKeys??[]),toolName:e.toolName,surface:e.surface};return this.records.set(n,i),e.restored||this.callbacks.onTaskCreated?.(fi(i)),i}forget(t){this.records.delete(qs(t))}clear(){this.records.clear()}observe(t,e,n="poll"){const s=this.register(t,{restored:!0}),r=s.status,i=this.now();if(Ti(s.status)&&!s.restored)return s.lastObservedAt=i,s;s.restored=!1,s.status=e.status,s.statusMessage=e.statusMessage,e.createdAt!==void 0&&(s.createdAt=e.createdAt),e.lastUpdatedAt!==void 0&&(s.lastUpdatedAt=e.lastUpdatedAt),e.ttlMs!==void 0&&(s.ttlMs=e.ttlMs),e.pollIntervalMs!==void 0&&(s.pollIntervalMs=gr(e.pollIntervalMs)),s.inputRequests=e.inputRequests,s.result=e.result,s.error=e.error,s.raw=e.raw,s.lastObservedAt=i,n!=="notification"&&(s.consecutiveErrors=0,s.retryAfterUntil=void 0);const o=Ti(s.status);o?s.nextPollAt=Number.POSITIVE_INFINITY:n==="notification"&&s.consecutiveErrors>0?s.nextPollAt=Math.min(s.nextPollAt,i+this.effectiveIntervalMs(s,i)):s.nextPollAt=i+this.effectiveIntervalMs(s,i);const a=fi(s);return r!==s.status?(this.callbacks.onState?.(a,r),s.status==="input_required"&&this.callbacks.onInputRequired?.(a),o&&this.callbacks.onTerminal?.(a)):s.status==="input_required"&&n!=="create"&&this.callbacks.onInputRequired?.(a),s}observeError(t,e={}){const n=this.register(t,{restored:!0}),s=this.now();n.consecutiveErrors+=1;const r=gr(e.retryAfterMs);return r!==void 0&&(n.retryAfterUntil=s+r),n.nextPollAt=s+this.effectiveIntervalMs(n,s),n}applyRetryAfter(t,e){const n=this.register(t,{restored:!0}),s=this.now(),r=gr(e);r!==void 0&&(n.retryAfterUntil=s+r,n.nextPollAt=Math.max(n.nextPollAt,s+r))}clearErrorBackoff(t){const e=this.records.get(qs(t));if(!e)return;const n=this.now();e.consecutiveErrors=0;const s=gr(e.pollIntervalMs)??0;e.nextPollAt=Math.max(n,e.lastObservedAt!==void 0?e.lastObservedAt+s:0,e.retryAfterUntil??0)}markExpired(t){const e=this.register(t,{restored:!0}),n=e.status;e.status="expired",e.lastObservedAt=this.now(),e.nextPollAt=Number.POSITIVE_INFINITY,e.consecutiveErrors=0;const s=fi(e);return n!=="expired"&&(this.callbacks.onState?.(s,n),this.callbacks.onTerminal?.(s)),e}markCancellationRequested(t){const e=this.register(t,{restored:!0});e.cancellationRequested=!0}markInputKeysResponded(t,e){const n=this.register(t,{restored:!0});for(const s of e)n.respondedInputKeys.add(s)}pendingInputKeys(t){const e=this.get(t);return e?.inputRequests?Object.keys(e.inputRequests).filter(n=>Object.prototype.hasOwnProperty.call(e.inputRequests,n)&&!e.respondedInputKeys.has(n)):[]}owesRead(t){return Ti(t.status)?t.restored&&t.identity.wire==="extension":!0}due(t){const e=t??this.now();return[...this.records.values()].filter(n=>this.owesRead(n)&&!n.pollInFlight&&n.nextPollAt<=e).sort((n,s)=>n.nextPollAt-s.nextPollAt)}active(){return[...this.records.values()].filter(t=>this.owesRead(t))}msUntilNextDue(t){const e=t??this.now();let n=Number.POSITIVE_INFINITY;for(const s of this.records.values())this.owesRead(s)&&(n=Math.min(n,s.nextPollAt));if(Number.isFinite(n))return Math.max(0,n-e)}reserve(t,e){const n=e??this.now();for(const s of t)s.nextPollAt=n+this.effectiveIntervalMs(s,n)}acquirePoll(t,e){const n=this.records.get(qs(t));return!n||n.pollInFlight?!1:(n.pollInFlight=!0,this.reserve([n],e),!0)}releasePoll(t){const e=this.records.get(qs(t));e&&(e.pollInFlight=!1)}batchIntervalMs(t,e){const n=e??this.now();let s=Math.max(this.absoluteFloorMs,this.userMinimumIntervalMs);for(const r of t)s=Math.max(s,this.effectiveIntervalMs(r,n));return s}},gh=ng(Cy(),1);function oD(){return document.activeElement?.closest('[role="dialog"],[role="alertdialog"]')??document.body}async function ai(t){try{return await navigator.clipboard.writeText(t),!0}catch{const e=document.createElement("textarea");try{return e.value=t,e.style.position="fixed",e.style.opacity="0",oD().appendChild(e),e.select(),e.selectionStart!==0||e.selectionEnd!==e.value.length?(console.warn("Clipboard copy failed: fallback selection did not take, nothing was copied"),!1):document.execCommand("copy")?(console.warn("Clipboard API unavailable, used deprecated execCommand fallback"),!0):(console.warn("Clipboard copy failed: execCommand fallback reported failure"),!1)}catch{return console.warn("Clipboard copy failed: both modern and fallback methods failed"),!1}finally{e.remove()}}}var aD=class extends Error{reason;constructor(t,e){super(e?`App is still bootstrapping (${t}): ${e}`:`App is still bootstrapping (${t}). Wait for useAppReady() to resolve before initiating requests.`),this.name="BootstrapNotReadyError",this.reason=t}},vu="mcpjam:task-bookmarks-changed";function lD(){typeof window<"u"&&window.dispatchEvent(new Event(vu))}function lj(t){return window.addEventListener(vu,t),window.addEventListener("storage",t),()=>{window.removeEventListener(vu,t),window.removeEventListener("storage",t)}}var cD=2e3,uD=6048e5;function cj(t){return t!=="working"&&t!=="input_required"}function uj(t,e){return Math.max(t,cD,e??0)}function dD(t,e){return t&&e?JSON.stringify(["owned-task-v1",t,e]):void 0}var Ll,ao;function hD(t){Ll=t??void 0}function BD(){return Ll}function fD(t,e){ao=dD(t,e)}function Ch(){return ao}function $r(t){return t.connectionId!==void 0||t.sourceExecutionId!==void 0}function Lo(t){return{...t,scope:t.scope??($r(t)?ao:Ll)}}function Kg(t){return $r(t)?ao!==void 0&&t.scope===ao:t.scope===Ll}function Eu(t,e){const n=`${e?.scope??(e?.connectionId!==void 0?Ch():BD())??""}\0${t}`;return e?.wire!==void 0||e?.connectionId!==void 0?`${n}\0${e.wire??""}\0${e.connectionId??""}`:n}function li(t,e){return t.connectionId===e?.connectionId&&(e?.scope===void 0||t.scope===e.scope)&&(e?.wire===void 0||t.wire===e.wire)}var qg="mcp-tracked-tasks",Yg="mcp-tracked-tasks-v4",La=4,pD=50,Jr=1024,Xg=100,mD=524288;function rn(t){return qs(t)}function gD(t,e){const n=Date.parse(t.createdAt);return Number.isNaN(n)?!0:e-n<uD}function Bn(t){if(typeof t=="string")return t.length>Jr?t.slice(0,Jr):t}function vn(t){if(typeof t=="string")return t.length>Jr||t.includes("\0")?void 0:t}function Gs(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function jB(t){if(typeof t!="object"||t===null||Array.isArray(t))return;const e=t,n=vn(e.taskId),s=vn(e.serverId),r=Bn(e.createdAt);if(!n||!s)return;const i=vn(e.connectionId),o=vn(e.sourceExecutionId);if(e.connectionId!==void 0&&!i||e.sourceExecutionId!==void 0&&!o)return;const a=vn(e.scope);if(e.scope!==void 0&&a===void 0||!r||Number.isNaN(Date.parse(r)))return;const l=e.wire==="extension"||e.wire==="legacy"?e.wire:"legacy",c=e.ttlMs===null?null:Gs(e.ttlMs),u=Array.isArray(e.respondedInputKeys)?e.respondedInputKeys.filter(d=>typeof d=="string").slice(0,Xg).map(d=>d.slice(0,Jr)):void 0;return{taskId:n,serverId:s,wire:l,createdAt:r,...Bn(e.toolName)?{toolName:Bn(e.toolName)}:{},...e.primitiveType==="tool"||e.primitiveType==="prompt"||e.primitiveType==="resource"?{primitiveType:e.primitiveType}:{},...Bn(e.primitiveName)?{primitiveName:Bn(e.primitiveName)}:{},...e.dismissed===!0?{dismissed:!0}:{},...e.expired===!0?{expired:!0}:{},...a!==void 0?{scope:a}:{},...i!==void 0?{connectionId:i}:{},...o!==void 0?{sourceExecutionId:o}:{},...Bn(e.serverName)?{serverName:Bn(e.serverName)}:{},...Bn(e.lastUpdatedAt)?{lastUpdatedAt:Bn(e.lastUpdatedAt)}:{},...Bn(e.status)?{status:Bn(e.status)}:{},...c!==void 0?{ttlMs:c}:{},...Gs(e.pollIntervalMs)!==void 0?{pollIntervalMs:Gs(e.pollIntervalMs)}:{},...Gs(e.nextPollAt)!==void 0?{nextPollAt:Gs(e.nextPollAt)}:{},...Gs(e.lastObservedAt)!==void 0?{lastObservedAt:Gs(e.lastObservedAt)}:{},...u?.length?{respondedInputKeys:u}:{}}}function CD(t){if(Array.isArray(t))return t.map(jB).filter(n=>n!==void 0);if(typeof t!="object"||t===null)return[];const e=t;return typeof e.version=="number"&&e.version>La?[]:Array.isArray(e.tasks)?e.tasks.map(jB).filter(n=>n!==void 0):[]}function UB(t){try{const e=localStorage.getItem(t);return e?CD(JSON.parse(e)).filter(n=>gD(n,Date.now())):[]}catch{return[]}}function _l(){const t=UB(qg).filter(n=>!$r(n)),e=UB(Yg);return[...new Map([...t,...e].map(n=>[rn(n),n])).values()]}function kn(){return _l().filter(Kg)}function _o(t){vh([...t,..._l().filter(e=>!Kg(e))])}function vh(t){try{let e=t,n=JSON.stringify({version:La,tasks:e});for(;n.length>mD&&e.length>1;)e=e.slice(0,Math.floor(e.length/2)),n=JSON.stringify({version:La,tasks:e});localStorage.setItem(qg,JSON.stringify({version:3,tasks:e.filter(s=>!$r(s))})),localStorage.setItem(Yg,JSON.stringify({version:La,tasks:e.filter($r)})),lD()}catch{}}function dj(){return kn()}function hj(t,e,n,s){return kn().filter(r=>r.serverId===t&&!r.dismissed&&li(r,{wire:e,connectionId:n,scope:s}))}function Bj(t,e,n){return kn().find(s=>s.taskId===t&&(e===void 0||s.serverId===e)&&li(s,n))}function fj(t){const e=Lo(t);if($r(e)&&e.scope===void 0||vn(e.taskId)===void 0||vn(e.serverId)===void 0||e.scope!==void 0&&vn(e.scope)===void 0||e.connectionId!==void 0&&!vn(e.connectionId)||e.sourceExecutionId!==void 0&&!vn(e.sourceExecutionId))return;const n=_l(),s=rn(e);if(n.some(o=>rn(o)===s))return;const r=o=>(o.scope??void 0)===(e.scope??void 0),i=n.filter(r);i.unshift({...e,dismissed:!1}),vh([...i.slice(0,pD),...n.filter(o=>!r(o))])}function vD(t,e){e.status!==void 0&&(t.status=e.status),e.lastUpdatedAt!==void 0&&(t.lastUpdatedAt=e.lastUpdatedAt),e.ttlMs!==void 0&&(t.ttlMs=e.ttlMs),e.pollIntervalMs!==void 0&&(t.pollIntervalMs=e.pollIntervalMs),e.nextPollAt!==void 0&&(t.nextPollAt=e.nextPollAt),e.lastObservedAt!==void 0&&(t.lastObservedAt=e.lastObservedAt)}function pj(t){if(t.length===0)return;const e=kn(),n=new Map(e.map(r=>[rn(r),r]));let s=!1;for(const{identity:r,observation:i}of t){const o=n.get(rn(Lo(r)));o&&(vD(o,i),s=!0)}s&&_o(e)}function mj(t){const e=new Map;if(t.length===0)return e;const n=new Map;for(const s of t)n.set(rn(Lo(s)),rn(s));for(const s of kn()){const r=n.get(rn(s));r!==void 0&&e.set(r,{nextPollAt:s.nextPollAt,lastObservedAt:s.lastObservedAt,pollIntervalMs:s.pollIntervalMs,ttlMs:s.ttlMs,status:s.status,respondedInputKeys:s.respondedInputKeys??[]})}return e}function gj(t,e){if(e.length===0)return;const n=rn(Lo(t)),s=kn(),r=s.find(i=>rn(i)===n);r&&(r.respondedInputKeys=[...new Set([...r.respondedInputKeys??[],...e])].slice(0,Xg).map(i=>i.slice(0,Jr)),_o(s))}function Cj(t){const e=rn(Lo(t));return kn().find(n=>rn(n)===e)?.respondedInputKeys??[]}function vj(t,e,n){const s=kn();for(const r of s)r.taskId===t&&(e===void 0||r.serverId===e)&&li(r,n)&&(r.expired=!0);_o(s)}function Ej(t,e,n){const s=new Set(e),r=kn();for(const i of r)i.serverId===t&&s.has(i.taskId)&&li(i,n)&&(i.dismissed=!0);_o(r)}var Qg="mcp-dismissed-registry-tasks",ED=200;function Eh(){try{const t=localStorage.getItem(Qg);if(!t)return{};const e=JSON.parse(t);if(typeof e!="object"||e===null||Array.isArray(e))return{};const n={};for(const[s,r]of Object.entries(e))Array.isArray(r)&&(n[s]=r.filter(i=>typeof i=="string"&&i.length>0&&i.length<=Jr).slice(0,ED));return n}catch{return{}}}function Zg(t){try{localStorage.setItem(Qg,JSON.stringify(t))}catch{}}function bj(t,e,n){if(n?.connectionId!==void 0&&n.scope===void 0&&Ch()===void 0)return;const s=e.filter(o=>vn(o)!==void 0);if(s.length===0)return;const r=Eh(),i=Eu(t,n);r[i]=[...new Set([...r[i]??[],...s])].slice(-200),Zg(r)}function Sj(t,e){if(e?.connectionId!==void 0&&e.scope===void 0&&Ch()===void 0)return new Set;const n=new Set(kn().filter(i=>i.serverId===t&&i.dismissed&&li(i,e)).map(i=>i.taskId)),s=Eh(),r=[Eu(t,e)];e?.connectionId===void 0&&e?.scope===void 0&&r.push(Eu(t));for(const i of r)for(const o of s[i]??[])n.add(o);return n}function yj(t,e){_o(kn().filter(n=>n.serverId!==t||!li(n,e)))}function bD(t){const e=t??void 0;vh(_l().filter(i=>(i.scope??void 0)!==e));const n=Eh(),s=`${e??""}\0`;let r=!1;for(const i of Object.keys(n))i.startsWith(s)&&(delete n[i],r=!0);r&&Zg(n)}var eC={projectId:null,serverIdsByName:{}},fe=eC,mn=null,Ts=0,bu=new Set,ki=3e4,SD=3e3,yD=100,vc=null;function bh(){mn=null}var xD=1e4;async function DD(){if(Rr())return null;const t=fe.getAccessToken;if(!t)return null;const e=Ts;bh();let n;try{const s=await Promise.race([t({forceRefresh:!0}),new Promise(r=>{n=setTimeout(()=>r(null),xD)})]);return!s||e!==Ts?null:(mn={token:s,expiresAt:Date.now()+ki,kind:"session"},s)}catch{return null}finally{clearTimeout(n)}}function tC(){Ts+=1;for(const t of bu)t()}function xj(t){return bu.add(t),()=>{bu.delete(t)}}function Dj(){return Ts}var VB=null;function wj(t){const e=VB;if(e&&e.revision===Ts&&e.serverNameOrId===t)return e.key;const n=fe.clientConfigSyncPending||!ID(t)?null:JSON.stringify([Rr(),ND(t)]);return VB={revision:Ts,serverNameOrId:t,key:n},n}function wD(){throw new Error("Hosted API context is only available in hosted mode")}function Sh(){if(fe.clientConfigSyncPending)throw new Error(Ry)}function AD(){return!fe.isAuthenticated&&!fe.hasSession}function yh(){return!(fe.isAuthenticated||fe.hasSession)}function Rr(){return yh()}function Aj(t){const e=fe.projectId??void 0,n=t?.projectId??void 0;e&&n&&e!==n&&bD(e),hD(n),fD(n,t?.taskOwnerId),fe=t?{...t,clientCapabilities:t.clientCapabilities??Fy()}:eC,bh(),tC()}function Ij(t,e,n){fe.projectId===n&&fe.serverIdsByName[t]!==e&&(fe={...fe,serverIdsByName:{...fe.serverIdsByName,[t]:e}},tC())}function nC(){const t=fe.projectId;if(!t)throw new aD("provisioning-project","hosted projectId is not in the API context yet");return t}function ID(t){const e=fe.projectId;if(!e)return null;const n=fe.serverIdsByName[t];return n?{projectId:e,serverId:n}:Object.values(fe.serverIdsByName).includes(t)?{projectId:e,serverId:t}:null}function TD(t){const e=t.trim();return!(e.length<1||e.length>=20&&/^[a-z0-9]+$/i.test(e))}var kD="Hosted server not found. The server is not in your hosted project, or the server list is still loading.";function sC(t){const e=fe.serverIdsByName[t];if(e)return e;if(Object.values(fe.serverIdsByName).includes(t))return t;throw TD(t)?new Error(`Hosted server not found for "${t}"`):new Error(kD)}function Fo(t){return Object.entries(fe.serverIdsByName).find(([,e])=>e===t)?.[0]}function Tj(t){return Fo(t)}function kj(t){}function Rj(t){wD();const e=new Set,n=[];for(const s of t){if(typeof s!="string")continue;const r=s.trim();if(!r)continue;const i=fe.serverIdsByName[r]!==void 0?r:Fo(r)??r,o=i.toLowerCase();e.has(o)||(e.add(o),n.push(i))}return n}function RD(t){const e=new Set,n=[];for(const s of t){const r=sC(s);e.has(r)||(e.add(r),n.push({serverId:r,serverName:fe.serverIdsByName[s]!==void 0?s:Fo(r)??s}))}return n}function xh(){return fe.scenarioId}function rC(){return fe.accessVersion}function iC(){return xh()?"chat_v2":void 0}function Dh(t){return{...t.mirrorToolParamHeaders===!1?{mirrorToolParamHeaders:!1}:{},...t.firstPageOnly===!0?{firstPageOnly:!0}:{},...t.suppressListenChannel===!0?{suppressListenChannel:!0}:{},...t.dropToolListChanged===!0?{dropToolListChanged:!0}:{},...t.toolCallCancellation?{toolCallCancellation:t.toolCallCancellation}:{},...t.supportsMrtr===!1?{supportsMrtr:!1}:{}}}function ND(t){Sh();const e=nC(),n=sC(t),s=xh(),r=rC(),i=iC();return{projectId:e,serverId:n,serverName:fe.serverIdsByName[t]!==void 0?t:Fo(n)??t,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...fe.mcpProtocolVersionsByServerId?.[n]?{mcpProtocolVersion:fe.mcpProtocolVersionsByServerId[n]}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...i?{accessScope:i}:{},...s?{scenarioId:s}:{},...s&&Number.isFinite(r)?{accessVersion:r}:{}}}function Nj(t){Sh();const e=nC(),n=RD(t),s=n.map(c=>c.serverId),r=n.map(c=>c.serverName),i=oC(s),o=xh(),a=rC(),l=iC();return{projectId:e,serverIds:s,serverNames:r,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...i?{mcpProtocolVersionsByServerId:i}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...l?{accessScope:l}:{},...o?{scenarioId:o}:{},...o&&Number.isFinite(a)?{accessVersion:a}:{}}}function oC(t){const e=fe.mcpProtocolVersionsByServerId;if(!e)return;const n={};for(const s of t){const r=e[s];r&&(n[s]=r)}return Object.keys(n).length>0?n:void 0}function Oj(t){Sh();const e=oC(t.serverIds);return{projectId:t.projectId,serverIds:t.serverIds,serverNames:t.serverNames,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...e?{mcpProtocolVersionsByServerId:e}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...t.accessScope?{accessScope:t.accessScope}:{},...t.scenarioId?{scenarioId:t.scenarioId}:{},...t.scenarioId&&Number.isFinite(t.accessVersion)?{accessVersion:t.accessVersion}:{}}}function OD(){return vc??=MD().finally(()=>{vc=null}),vc}async function MD(){const t=Date.now()+SD;for(;Date.now()<t;){if(await new Promise(n=>setTimeout(n,yD)),yh())return null;const e=fe.getAccessToken;if(e)try{const n=await e();if(n)return n}catch{}}return null}async function aC(t=1){const e=Ts,n=Rr(),s=()=>Ts!==e||Rr()!==n,r=()=>t>0?aC(t-1):null,i=Date.now();if(mn&&mn.expiresAt>i)if(mn.kind==="guest"&&!Rr())mn=null;else return`Bearer ${mn.token}`;if(Rr()){const l=await MB();if(s())return r();if(l)return mn={token:l,expiresAt:i+ki,kind:"guest"},`Bearer ${l}`}const o=fe.getAccessToken;if(o)try{const l=await o();if(s())return r();if(l)return mn={token:l,expiresAt:i+ki,kind:"session"},`Bearer ${l}`}catch{}if(!yh()){const l=await OD();return s()?r():l?(mn={token:l,expiresAt:Date.now()+ki,kind:"session"},`Bearer ${l}`):null}const a=await MB();return s()?r():a?(mn={token:a,expiresAt:i+ki,kind:"guest"},`Bearer ${a}`):null}function LD(){const t=hy();if(t)return t;const e=fy()??"https://rt.mcpjam.com";return e&&typeof e=="string"?e.replace(".convex.cloud",".convex.site"):null}async function _D(t){const e=t.headers.get("content-type")?.split(";")[0].trim().toLowerCase()||void 0,n=await t.text().catch(()=>""),s=n.trimStart().startsWith("{")?FD(n):null;return s?{ok:"ok"in s&&s.ok===!0,code:"code"in s&&typeof s.code=="string"?s.code:void 0,contentType:e}:{ok:!1,contentType:e}}function FD(t){try{const e=JSON.parse(t);return typeof e=="object"?e:null}catch{return null}}var PD=[/^\/api\/v1\/projects\/[^/]+\/mock-servers(\/[^/]+(\/(versions|forwarding-policy))?)?$/,/^\/api\/v1\/projects\/[^/]+\/mock-forwarding-policy$/],HD=[...PD,/^\/api\/v1\/chat-sessions\/[^/]+(\/trace)?$/,/^\/api\/v1\/projects\/[^/]+\/servers$/],Wr=null,Ri=null,wh=class extends Error{status;code;restarted;contentType;constructor(t,{code:e,restarted:n=!1,contentType:s}={}){super(`Failed to get session token: ${t}`),this.name="SessionTokenError",this.status=t,this.code=e,this.restarted=n,this.contentType=s}};function Mj(t){return t instanceof wh&&t.status===403&&t.code==="HOST_NOT_ALLOWED"}function GD(t){return t instanceof wh&&t.status===401&&t.code==="ACCESS_LINK_REQUIRED"}var zB={"/api/web/scenarios/bootstrap":"scenario"};function jD(t){const e=t instanceof URL?t.toString():typeof Request<"u"&&t instanceof Request?t.url:String(t),n=typeof window<"u"?window.location.origin:"http://localhost";try{const s=new URL(e,n);return zB[s.pathname]??null}catch{return zB[e]??null}}function UD(...t){const e={};for(const n of t)if(n){if(n instanceof Headers){n.forEach((s,r)=>{e[r]=s});continue}if(Array.isArray(n)){for(const[s,r]of n)e[s]=r;continue}Object.assign(e,n)}return e}function VD(t){return t?t instanceof Headers?t.has("Authorization"):Array.isArray(t)?t.some(([e])=>e.toLowerCase()==="authorization"):Object.keys(t).some(e=>e.toLowerCase()==="authorization"):!1}function ea(t,e,n){const s=dC(t)?$D():void 0,r=n&&hC(t)?{Authorization:n}:void 0;return{...e,headers:UD(s,r,e?.headers)}}async function lC(t){const e=await fetch("/api/session-token",{headers:t?{"X-MCP-Session-Auth":`Bearer ${t}`}:{},cache:"no-store"}),n=await _D(e);if(!e.ok||!n.ok||!my(t))throw new wh(e.status,{code:n.code,restarted:!!t,contentType:n.contentType});return Wr=t,py(t),t}async function Lj(){return Wr||(Ri||(Ri=lC(ah()).catch(t=>{throw Ri=null,t})),Ri)}async function zD(){Wr=null,Ri=null;try{return await lC(ah(!0))}catch(t){return GD(t)&&window.dispatchEvent(new CustomEvent(rg,{detail:{restarted:t.restarted}})),null}}function Fl(){return Wr||(ah()??"")}function _j(){return!!Fl()}function $D(){const t=Fl();return t?{"X-MCP-Session-Auth":`Bearer ${t}`}:(console.warn("[Auth] Session token not available"),{})}function cC(t){return t==="localhost"||t==="127.0.0.1"||t==="::1"||t==="[::1]"}function Ah(t){const e=typeof window<"u"?window.location.origin:"http://localhost";try{return t instanceof URL?t:typeof Request<"u"&&t instanceof Request?new URL(t.url,e):new URL(String(t),e)}catch{return null}}function uC(t){return cC(t.hostname)?!0:typeof window<"u"&&t.origin===window.location.origin}function dC(t){const e=Ah(t);return e?uC(e)&&e.pathname.startsWith("/api/"):typeof t=="string"&&t.startsWith("/api/")}var JD=["/api/mcp/webmcp","/api/web/","/api/v1/harness/","/api/v1/built-in-tools/","/api/web-clients/accounts/","/api/web-clients/reconnect/","/api/v1/agent-ops","/api/mcp/local-harness","/api/mcp/connect","/api/mcp/servers/reconnect","/api/mcp/servers/approve-command","/api/mcp/server-features/observations","/api/mcp/servers/canvas/refresh","/api/mcp/chat-v2","/api/mcp/xaa/proxy/token","/api/mcp/xaa/negative-tests","/api/mcp/xaa/authenticate","/api/mcp/xaa/token-exchange","/api/mcp/xaa/token","/api/mcp/computers/local-consent","/api/mcp/computers/local-terminal-token","/api/mcp/computers/local-browser","/api/mcp/computers/browser-location","/web/oauth/","/web/registry/"];function WD(t){if(typeof window<"u"&&t.origin===window.location.origin||cC(t.hostname))return!0;const e=LD();if(e)try{const n=new URL(e).hostname;if(t.hostname===n)return!0}catch{}return!1}var KD=[/^\/api\/mcp\/(chat-persistence|turn-authorization)\/?$/,/^\/api\/mcp\/servers\/command-approval\/?$/,/^\/api\/v1\/projects\/[^/]+\/readiness-runs(\/[^/]+(\/(cancel|report|resume))?)?$/,/^\/api\/v1\/projects\/[^/]+\/servers\/[^/]+\/revisions(\/\d+\/diff)?$/,/^\/api\/v1\/projects\/[^/]+\/servers\/[^/]+\/readiness-runs\/(claude|openai)$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/reviewer-attempts(\/[^/]+(\/(resume|cancel|handoff))?)?$/,/^\/api\/v1\/directory-flows(\/[^/]+)?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions(\/[^/]+(\/(runs|results|handoff|export|events|snapshots|findings(\/[^/]+)?))?)?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/packs(\/(generate|verify-video|compare|revisions(\/\d+\/download)?))?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/(test-plan(\/draft)?|tool-tests)$/,/^\/api\/v1\/projects\/[^/]+\/eval-suites\/[^/]+\/run-disclosure$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/(decision-summary|stage-analytics|route-facts|server-facts)$/,/^\/api\/v1\/projects\/[^/]+\/eval-suites\/[^/]+\/stage-analytics$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/description-experiments$/,/^\/api\/v1\/projects\/[^/]+\/eval-description-experiments\/[^/]+(\/start)?$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/backtest$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/iterations$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/compare$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/cancel$/,...HD];function $B(t){return KD.some(e=>e.test(t))?!0:JD.some(e=>e.endsWith("/")?t.startsWith(e):t===e||t.startsWith(`${e}/`))}var qD=["/api/web/apps/plugin-instances/","/api/web/plugin-forms/"];function YD(t){const e=Ah(t),n=e?e.pathname:typeof t=="string"?t.split("?")[0]:"";return/^\/api\/(web|mcp)\/(chat-persistence|turn-authorization)\/?$/.test(n)||qD.some(s=>n.startsWith(s))}function XD(t){return t==null||typeof t=="string"||t instanceof FormData||t instanceof URLSearchParams||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function hC(t){const e=Ah(t);if(e)return WD(e)?$B(e.pathname):!1;if(typeof t!="string"||!t.startsWith("/"))return!1;const n=t.split("?")[0];return $B(n)}function QD(t){const e=Fl();if(!e)return console.warn("[Auth] Session token not available for URL"),t;try{const n=new URL(t,window.location.origin);return uC(n)?(n.searchParams.set("_token",e),n.origin===window.location.origin?n.pathname+n.search:n.href):(console.warn("[Auth] Refusing to attach session token to foreign origin"),t)}catch{return`${t}${t.includes("?")?"&":"?"}_token=${encodeURIComponent(e)}`}}async function Fj(t,e){const n=jD(t),s=VD(e?.headers),r=hC(t),i=r&&!s?await aC():null,o=ea(t,e,i),a=await fetch(t,o);if(a.status===401&&r&&await qy(a))return Ky(),a;if(a.status===401&&r&&!s&&YD(t)&&XD(e?.body)&&a.headers?.get("X-MCP-Auth-Required")!=="oauth"){const u=await DD();if(u)return e?.signal?.throwIfAborted(),fetch(t,ea(t,e,`Bearer ${u}`))}if(a.status===401&&dC(t)&&a.headers?.get("X-MCPJam-Session")!=null){const u=Fl(),d=await zD();if(d&&d!==u){const h=ea(t,e,i),f=await fetch(t,h);return f.status===401&&f.headers.get("X-MCPJam-Session")&&window.dispatchEvent(new CustomEvent(rg,{detail:{restarted:!0}})),f}}if(a.status!==401||!r||!AD()||s||a.headers?.get("X-MCP-Auth-Required")==="oauth")return a;bh();const l=await By();if(!l)return n&&al("guest_refresh_failure",{location:"auth_fetch",surface:n,auth_mode:"guest",status:"failure",error_kind:"guest_refresh_unavailable"}),a;n&&al("guest_refresh_success",{location:"auth_fetch",surface:n,auth_mode:"guest",status:"success"});const c=ea(t,e,`Bearer ${l}`);return fetch(t,c)}function ZD(t){if(!t||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}var e1=t=>{switch(t){case"success":return s1;case"info":return i1;case"warning":return r1;case"error":return o1;default:return null}},t1=Array(12).fill(0),n1=({visible:t,className:e})=>g.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},g.createElement("div",{className:"sonner-spinner"},t1.map((n,s)=>g.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),s1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),r1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),i1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),o1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),a1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},g.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),l1=()=>{const[t,e]=g.useState(document.hidden);return g.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),t},c1=1,u1=100,JB=t=>{var e;return typeof t?.id=="number"||(t==null||(e=t.id)==null?void 0:e.length)>0?t.id:c1++},d1=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(e=>t(e)),()=>{const e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-u1;t<=0||(this.toasts=this.toasts.filter(e=>t>0&&this.dismissedToasts.has(e.id)?(this.dismissedToasts.delete(e.id),t--,!1):!0))},this.create=t=>{const{message:e,...n}=t,s=JB(t),r=this.pendingDismissals.get(s);r!==void 0&&(cancelAnimationFrame(r),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const i=this.dismissedToasts.has(s),o=t.dismissible===void 0?!0:t.dismissible;return i&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(a=>a.id!==s)),!i&&this.toasts.find(a=>a.id===s)?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:e}),{...a,...t,id:s,dismissible:o,title:e}):a):this.addToast({title:e,...n,dismissible:o,id:s}),s},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const e=this.pendingDismissals.get(t);return e!==void 0&&cancelAnimationFrame(e),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(n=>n({id:t,dismiss:!0}))})),t},this.message=(t,e)=>this.create({...e,message:t,type:void 0}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let r=n!==void 0,i;const o=s.then(async l=>{if(i=["resolve",l],g.isValidElement(l))r=!1,this.create({id:n,type:"default",message:l});else if(B1(l)&&!l.ok){r=!1;const c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}else if(l instanceof Error){r=!1;const c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}else if(e.success!==void 0){r=!1;const c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"success",description:u,...d})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){r=!1;const c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}}).finally(()=>{r&&(this.dismiss(n),n=void 0),e.finally==null||e.finally.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{const n=JB(e);return this.create({...e,jsx:t(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Pt=new d1,h1=(t,e)=>Pt.message(t,e),B1=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",f1=h1,p1=()=>Pt.toasts,m1=()=>Pt.getActiveToasts(),Su=Object.assign(f1,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:p1,getToasts:m1});ZD("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ta(t){return t.label!==void 0}var g1=3,C1="24px",v1="16px",WB=4e3,E1=356,b1=14,S1=45,y1=200;function _n(...t){return t.filter(Boolean).join(" ")}function x1(t){const[e,n]=t.split("-"),s=[];return e&&s.push(e),n&&s.push(n),s}var D1=t=>{var e,n,s,r,i,o,a,l,c;const{invert:u,toast:d,unstyled:h,interacting:f,setHeights:p,visibleToasts:m,heights:v,index:E,toasts:S,expanded:A,removeToast:N,defaultRichColors:k,closeButton:R,style:T,cancelButtonStyle:Q,actionButtonStyle:P,className:V="",descriptionClassName:U="",duration:j,position:oe,gap:ne,expandByDefault:H,classNames:z,icons:ae,closeButtonAriaLabel:ue="Close toast"}=t,[le,Ce]=g.useState(null),[ie,Ie]=g.useState(null),[J,$]=g.useState(!1),[Z,Y]=g.useState(!1),[ee,pe]=g.useState(!1),[ce,Ne]=g.useState(!1),[ke,Me]=g.useState(!1),[nt,gt]=g.useState(0),[dt,lt]=g.useState(0),Ct=g.useRef(d.duration||j||WB),ht=g.useRef(null),Ye=g.useRef(null),un=E===0,Bt=E+1<=m,Fe=d.type,de=Fe??"default",Re=d.dismissible!==!1,Ge=d.className||"",Fs=d.descriptionClassName||"",Xe=g.useMemo(()=>v.findIndex(W=>W.toastId===d.id)||0,[v,d.id]),hs=g.useMemo(()=>{var W;return(W=d.closeButton)!=null?W:R},[d.closeButton,R]),St=g.useMemo(()=>d.duration||j||WB,[d.duration,j]),On=g.useRef(0),Pe=g.useRef(0),Bs=g.useRef(0),dn=g.useRef(null),[hn,ze]=oe.split("-"),mr=g.useMemo(()=>v.reduce((W,He,je)=>je>=Xe?W:W+He.height,0),[v,Xe]),Ps=l1(),Vt=g.useMemo(()=>{var W;return(W=t.swipeDirections)!=null?W:x1(oe)},[t.swipeDirections,oe]),mc=d.invert||u,Hs=Fe==="loading";Pe.current=g.useMemo(()=>Xe*ne+mr,[Xe,mr]),g.useEffect(()=>{Ct.current=St},[St]),g.useEffect(()=>{$(!0)},[]),g.useEffect(()=>{const W=Ye.current;if(W){const He=W.getBoundingClientRect().height;return lt(He),p(je=>[{toastId:d.id,height:He,position:d.position},...je]),()=>p(je=>je.filter(st=>st.toastId!==d.id))}},[p,d.id]),g.useLayoutEffect(()=>{if(!J)return;const W=Ye.current,He=W.style.height;W.style.height="auto";const je=W.getBoundingClientRect().height;W.style.height=He,lt(je),p(st=>st.find(Le=>Le.toastId===d.id)?st.map(Le=>Le.toastId===d.id?{...Le,height:je}:Le):[{toastId:d.id,height:je,position:d.position},...st])},[J,d.title,d.description,p,d.id,d.jsx,d.action,d.cancel]);const Mn=g.useCallback(()=>{Y(!0),gt(Pe.current),p(W=>W.filter(He=>He.toastId!==d.id)),setTimeout(()=>{N(d)},y1)},[d,N,p,Pe]);g.useEffect(()=>{if(d.promise&&Fe==="loading"||d.duration===1/0||d.type==="loading")return;let W;return A||f||Ps?(()=>{if(Bs.current<On.current){const st=new Date().getTime()-On.current;Ct.current=Ct.current-st}Bs.current=new Date().getTime()})():Ct.current!==1/0&&(On.current=new Date().getTime(),W=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Mn()},Ct.current)),()=>clearTimeout(W)},[A,f,d,Fe,Ps,Mn]),g.useEffect(()=>{d.delete&&(Mn(),d.onDismiss==null||d.onDismiss.call(d,d))},[Mn,d.delete]);function M(){var W;if(ae?.loading){var He;return g.createElement("div",{className:_n(z?.loader,d==null||(He=d.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":Fe==="loading"},ae.loading)}return g.createElement(n1,{className:_n(z?.loader,d==null||(W=d.classNames)==null?void 0:W.loader),visible:Fe==="loading"})}const be=d.icon||ae?.[Fe]||e1(Fe);var De,We;return g.createElement("li",{tabIndex:0,ref:Ye,className:_n(V,Ge,z?.toast,d==null||(e=d.classNames)==null?void 0:e.toast,z?.[de],d==null||(n=d.classNames)==null?void 0:n[de]),"data-sonner-toast":"","data-rich-colors":(De=d.richColors)!=null?De:k,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":J,"data-promise":!!d.promise,"data-swiped":ke,"data-removed":Z,"data-visible":Bt,"data-y-position":hn,"data-x-position":ze,"data-index":E,"data-front":un,"data-swiping":ee,"data-dismissible":Re,"data-type":Fe,"data-invert":mc,"data-swipe-out":ce,"data-swipe-direction":ie,"data-expanded":!!(A||H&&J),"data-testid":d.testId,style:{"--index":E,"--toasts-before":E,"--z-index":S.length-E,"--offset":`${Z?nt:Pe.current}px`,"--initial-height":H?"auto":`${dt}px`,...T,...d.style},onDragEnd:()=>{pe(!1),Ce(null),dn.current=null},onPointerDown:W=>{W.button!==2&&(Hs||!Re||(ht.current=new Date,gt(Pe.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(pe(!0),dn.current={x:W.clientX,y:W.clientY})))},onPointerUp:()=>{var W,He,je;if(ce||!Re)return;dn.current=null;const st=Number(((W=Ye.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Le=Number(((He=Ye.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((je=ht.current)==null?void 0:je.getTime()),et=le==="x"?st:Le,Ln=Math.abs(et)/ft;if((le==="x"?Vt.includes(st>0?"right":"left"):Vt.includes(Le>0?"bottom":"top"))&&(Math.abs(et)>=S1||Ln>.11)){gt(Pe.current),d.onDismiss==null||d.onDismiss.call(d,d),Ie(le==="x"?st>0?"right":"left":Le>0?"down":"up"),Mn(),Ne(!0);return}else{var ct,fs;(ct=Ye.current)==null||ct.style.setProperty("--swipe-amount-x","0px"),(fs=Ye.current)==null||fs.style.setProperty("--swipe-amount-y","0px")}Me(!1),pe(!1),Ce(null)},onPointerMove:W=>{var He,je,st;if(!dn.current||!Re||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;const Le=W.clientY-dn.current.y,ft=W.clientX-dn.current.x;!le&&(Math.abs(ft)>1||Math.abs(Le)>1)&&Ce(Math.abs(ft)>Math.abs(Le)?"x":"y");let et={x:0,y:0};const Ln=ct=>1/(1.5+Math.abs(ct)/20);if(le==="y"){if(Vt.includes("top")||Vt.includes("bottom"))if(Vt.includes("top")&&Le<0||Vt.includes("bottom")&&Le>0)et.y=Le;else{const ct=Le*Ln(Le);et.y=Math.abs(ct)<Math.abs(Le)?ct:Le}}else if(le==="x"&&(Vt.includes("left")||Vt.includes("right")))if(Vt.includes("left")&&ft<0||Vt.includes("right")&&ft>0)et.x=ft;else{const ct=ft*Ln(ft);et.x=Math.abs(ct)<Math.abs(ft)?ct:ft}(Math.abs(et.x)>0||Math.abs(et.y)>0)&&Me(!0),(je=Ye.current)==null||je.style.setProperty("--swipe-amount-x",`${et.x}px`),(st=Ye.current)==null||st.style.setProperty("--swipe-amount-y",`${et.y}px`)}},hs&&!d.jsx&&Fe!=="loading"?g.createElement("button",{"aria-label":ue,"data-disabled":Hs,"data-close-button":!0,onClick:Hs||!Re?()=>{}:()=>{Mn(),d.onDismiss==null||d.onDismiss.call(d,d)},className:_n(z?.closeButton,d==null||(s=d.classNames)==null?void 0:s.closeButton)},(We=ae?.close)!=null?We:a1):null,(Fe||d.icon||d.promise)&&d.icon!==null&&(ae?.[Fe]!==null||d.icon)?g.createElement("div",{"data-icon":"",className:_n(z?.icon,d==null||(r=d.classNames)==null?void 0:r.icon)},Fe==="loading"?d.icon||M():d.promise?M():null,Fe!=="loading"?be:null):null,g.createElement("div",{"data-content":"",className:_n(z?.content,d==null||(i=d.classNames)==null?void 0:i.content)},g.createElement("div",{"data-title":"",className:_n(z?.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?g.createElement("div",{"data-description":"",className:_n(U,Fs,z?.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),g.isValidElement(d.cancel)?d.cancel:d.cancel&&ta(d.cancel)?g.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||Q,onClick:W=>{ta(d.cancel)&&Re&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,W),Mn())},className:_n(z?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,g.isValidElement(d.action)?d.action:d.action&&ta(d.action)?g.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||P,onClick:W=>{ta(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,W),!W.defaultPrevented&&Mn())},className:_n(z?.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function KB(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function w1(t,e){const n={};return[t,e].forEach((s,r)=>{const i=r===1,o=i?"--mobile-offset":"--offset",a=i?v1:C1;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof s=="number"||typeof s=="string"?l(s):typeof s=="object"?["top","right","bottom","left"].forEach(c=>{s[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof s[c]=="number"?`${s[c]}px`:s[c]}):l(a)}),n}var Pj=g.forwardRef(function(e,n){const{id:s,invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:d,theme:h="light",richColors:f,duration:p,style:m,visibleToasts:v=g1,toastOptions:E,dir:S=KB(),gap:A=b1,icons:N,customAriaLabel:k,containerAriaLabel:R="Notifications"}=e,[T,Q]=g.useState([]),P=g.useMemo(()=>s?T.filter($=>$.toasterId===s):T.filter($=>!$.toasterId),[T,s]),V=g.useMemo(()=>Array.from(new Set([i].concat(P.filter($=>$.position).map($=>$.position)))),[P,i]),[U,j]=g.useState([]),[oe,ne]=g.useState(!1),[H,z]=g.useState(!1),[ae,ue]=g.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),le=g.useRef(null),Ce=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),ie=g.useRef(null),Ie=g.useRef(!1),J=g.useCallback($=>{Q(Z=>{var Y;return(Y=Z.find(ee=>ee.id===$.id))!=null&&Y.delete||Pt.dismiss($.id),Z.filter(({id:ee})=>ee!==$.id)})},[]);return g.useEffect(()=>Pt.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{Q(Z=>Z.map(Y=>Y.id===$.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{gh.flushSync(()=>{Q(Z=>{const Y=Z.findIndex(ee=>ee.id===$.id);return Y!==-1?[...Z.slice(0,Y),{...Z[Y],...$},...Z.slice(Y+1)]:[$,...Z]})})})}),[]),g.useEffect(()=>{if(h!=="system"){ue(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ue("dark"):ue("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:Z})=>{ue(Z?"dark":"light")})}catch{$.addListener(({matches:Y})=>{try{ue(Y?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),g.useEffect(()=>{T.length<=1&&ne(!1)},[T]),g.useEffect(()=>{const $=Z=>{var Y;if(o.length>0&&o.every(pe=>Z[pe]||Z.code===pe)){var ee;ne(!0),(ee=le.current)==null||ee.focus()}Z.code==="Escape"&&(document.activeElement===le.current||(Y=le.current)!=null&&Y.contains(document.activeElement))&&ne(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[o]),g.useEffect(()=>{if(le.current)return()=>{ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null,Ie.current=!1)}},[le.current]),g.createElement("section",{ref:n,"aria-label":k??`${R} ${Ce}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},V.map(($,Z)=>{var Y;const[ee,pe]=$.split("-");return P.length?g.createElement("ol",{key:$,dir:S==="auto"?KB():S,tabIndex:-1,ref:le,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ae,"data-y-position":ee,"data-x-position":pe,style:{"--front-toast-height":`${((Y=U[0])==null?void 0:Y.height)||0}px`,"--width":`${E1}px`,"--gap":`${A}px`,...m,...w1(u,d)},onBlur:ce=>{Ie.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(Ie.current=!1,ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||Ie.current||(Ie.current=!0,ie.current=ce.relatedTarget)},onMouseEnter:()=>ne(!0),onMouseMove:()=>ne(!0),onMouseLeave:()=>{H||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},P.filter(ce=>!ce.position&&Z===0||ce.position===$).map((ce,Ne)=>{var ke,Me;return g.createElement(D1,{key:ce.id,icons:N,index:Ne,toast:ce,defaultRichColors:f,duration:(ke=E?.duration)!=null?ke:p,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Me=E?.closeButton)!=null?Me:l,interacting:H,position:$,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:J,toasts:P.filter(nt=>nt.position==ce.position),heights:U.filter(nt=>nt.position==ce.position),setHeights:j,expandByDefault:a,gap:A,expanded:oe,swipeDirections:e.swipeDirections})})):null}))});function A1(t,e){return t?.slug==="sdk/protocol_version_pin_unsupported"?!0:typeof e=="string"&&I1.test(e)}var I1=/which this client is pinned to/i;function T1({text:t,copyText:e}){const[n,s]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{if(!n)return;const r=setTimeout(()=>s(!1),1500);return()=>clearTimeout(r)},[n]),(0,B.jsxs)("div",{className:"relative min-h-5 pr-7",children:[(0,B.jsx)("span",{className:"whitespace-pre-wrap break-words",children:t}),(0,B.jsx)("button",{type:"button","aria-label":"Copy error message",title:"Copy error message",onClick:r=>{r.stopPropagation(),ai(e??t).then(i=>{i&&s(!0)})},className:"absolute right-2 top-0 z-10 flex h-5 w-5 items-center justify-center rounded-full border border-border bg-popover text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover/toast:opacity-100",children:n?(0,B.jsx)(ar,{className:"h-3 w-3 text-green-500"}):(0,B.jsx)(As,{className:"h-3 w-3"})})]})}var k1=8e3;function R1(t,e){if(!e?.action&&typeof t=="string"&&A1(void 0,t))return{action:{label:"Change protocol version",onClick:()=>{al("change_protocol_version_clicked",{location:"toast_fallback",has_host_id:!1}),by(xy.hosts)}}}}function N1(t,e){const{text:n,requestId:s}=zy(t),r=e?.description,i=typeof r=="string"&&r.trim()!==""?r:void 0;if(!s)return{title:t,description:i};if(r!=null&&typeof r!="string")return{title:t,description:void 0};const o=`Reference ${s}`;return{title:n||t,description:i?`${i}
1
+ import{o as ng,r as dy}from"./rolldown-runtime-BlpueFg6.js";import{$ as MB,Dt as sg,bt as hy,q as By,xt as fy}from"./PosthogUtils-BAwbC5iX.js";import{c as ah,l as py,o as my,r as rg}from"./access-link-BJMsYDmK.js";import{n as gy,t as Cy}from"./react-dom-DXowvrFG.js";import{r as vy}from"./bundle-mjs-BGe1waGK.js";import{Ar as oi,Cr as Cn,Er as Ey,N as by,Sr as tt,Tr as Sy,Tt as yy,V as xy,br as Dy,fn as wy,jr as ge,jt as ig,wt as Ay}from"./app-navigation-CTBnrg26.js";import{B as al,Bt as Zs,Ct as ar,E as LB,Gt as Iy,I as og,Jt as Ty,Kt as sr,R as ky,St as ag,T as lh,Ut as Nl,V as Ry,Vt as Ny,Xt as Ro,_ as Ma,b as Oy,bt as As,c as $s,ct as lg,d as Js,g as ch,k as ll,l as Ws,m as uh,n as cg,v as My,vt as dh,xt as ro,y as Ly,yt as _y}from"./feature-flags-Cbn8gAeC.js";import{$ as G,B as Fy,J as L,K as Py,Q as ug,X as No,_t as C,at as dg,bt as jt,dt as b,gt as cs,ht as Ut,lt as Hy,rt as at,st as I,tt as X,ut as w,yt as Zt}from"./mcp-init-BWmQoGiF.js";import{Ha as Gy,Nr as jy,Ua as Uy,Wa as Vy,ao as is,d as zy,l as $y,no as Jy,ro as hg,to as Wy}from"./error-reporting-C7685g3J.js";import{n as Ky,t as qy}from"./session-revoked-BJat-_na.js";import{a as Yy,c as Xy,n as Qy,o as Zy}from"./chunk-D32TOXHM-C-gMffNp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"3.27.1"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="81f74545-39bd-4255-9d4b-7c7e72eefd22",t._sentryDebugIdIdentifier="sentry-dbid-81f74545-39bd-4255-9d4b-7c7e72eefd22")}catch{}})();var g=ng(gy(),1),ex=Object.defineProperty,tx=(t,e)=>ex(t,"name",{value:e,configurable:!0});function Bg(t,[e,n]){return Math.min(n,Math.max(e,t))}tx(Bg,"clamp");var B=vy(),nx=Object.defineProperty,Te=(t,e)=>nx(t,"name",{value:e,configurable:!0});function fg(t,e){return g.useReducer((n,s)=>e[n][s]??n,t)}Te(fg,"useStateMachine");var pg="ScrollArea",[mg,ij]=Ty(pg),[sx,ln]=mg(pg),rx=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[l,c]=g.useState(null),[u,d]=g.useState(null),[h,f]=g.useState(null),[p,m]=g.useState(null),[v,E]=g.useState(null),[S,A]=g.useState(0),[N,k]=g.useState(0),[R,T]=g.useState(!1),[Q,P]=g.useState(!1),V=oi(n,c),U=Ny(i);return(0,B.jsx)(sx,{scope:s,type:r,dir:U,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:R,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:E,scrollbarYEnabled:Q,onScrollbarYEnabledChange:P,onCornerWidthChange:A,onCornerHeightChange:k,children:(0,B.jsx)(Ro.div,{dir:U,...a,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})},"ScrollArea")),ix="ScrollAreaViewport",ox=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,children:r,nonce:i,...o}=e,a=ln(ix,s),l=g.useRef(null),c=oi(n,l,a.onViewportChange);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ax,{nonce:i}),(0,B.jsx)(Ro.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,B.jsx)("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})},"ScrollAreaViewport")),ax=g.memo(Te(function({nonce:e}){return(0,B.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(t,e)=>t.nonce===e.nonce),ds="ScrollAreaScrollbar",lx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,l=e.orientation==="horizontal";return g.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),i.type==="hover"?(0,B.jsx)(cx,{...r,ref:n,forceMount:s}):i.type==="scroll"?(0,B.jsx)(ux,{...r,ref:n,forceMount:s}):i.type==="auto"?(0,B.jsx)(gg,{...r,ref:n,forceMount:s}):i.type==="always"?(0,B.jsx)(hh,{...r,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),[o,a]=g.useState(!1);return g.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const u=Te(()=>{window.clearTimeout(c),a(!0)},"handlePointerEnter"),d=Te(()=>{c=window.setTimeout(()=>a(!1),i.scrollHideDelay)},"handlePointerLeave");return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),(0,B.jsx)(Nl,{present:s||o,children:(0,B.jsx)(gg,{"data-state":o?"visible":"hidden",...r,ref:n})})},"ScrollAreaScrollbarHover")),ux=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=ln(ds,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Mo(()=>c("SCROLL_END"),100),[l,c]=fg("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 g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,i.scrollHideDelay,c]),g.useEffect(()=>{const u=i.viewport,d=o?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=Te(()=>{const p=u[d];h!==p&&(c("SCROLL"),a()),h=p},"handleScroll");return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[i.viewport,o,c,a]),(0,B.jsx)(Nl,{present:s||l!=="hidden",children:(0,B.jsx)(hh,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:n,onPointerEnter:sr(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:sr(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),gg=g.forwardRef(Te(function(e,n){const s=ln(ds,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=g.useState(!1),l=e.orientation==="horizontal",c=Mo(()=>{if(s.viewport){const u=s.viewport.offsetWidth<s.viewport.scrollWidth,d=s.viewport.offsetHeight<s.viewport.scrollHeight;a(l?u:d)}},10);return lr(s.viewport,c),lr(s.content,c),(0,B.jsx)(Nl,{present:r||o,children:(0,B.jsx)(hh,{"data-state":o?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarAuto")),hh=g.forwardRef(Te(function(e,n){const{orientation:s="vertical",...r}=e,i=ln(ds,e.__scopeScrollArea),o=g.useRef(null),a=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Bh(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:Te(f=>o.current=f,"onThumbChange"),onThumbPointerUp:Te(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:Te(f=>a.current=f,"onThumbPointerDown")};function h(f,p){return bg(f,a.current,l,p)}return Te(h,"getScrollPosition"),s==="horizontal"?(0,B.jsx)(dx,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,p=fu(f,l,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=h(f,i.dir))}}):s==="vertical"?(0,B.jsx)(hx,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,p=fu(f,l);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=h(f))}}):null},"ScrollAreaScrollbarVisible")),dx=g.forwardRef(Te(function(e,n){const{sizes:s,onSizesChange:r,...i}=e,o=ln(ds,e.__scopeScrollArea),[a,l]=g.useState(),c=g.useRef(null),u=oi(n,c,o.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,B.jsx)(vg,{"data-orientation":"horizontal",...i,ref:u,sizes:s,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oo(s)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(o.viewport){const f=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),ph(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:io(a.paddingLeft),paddingEnd:io(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),hx=g.forwardRef(Te(function(e,n){const{sizes:s,onSizesChange:r,...i}=e,o=ln(ds,e.__scopeScrollArea),[a,l]=g.useState(),c=g.useRef(null),u=oi(n,c,o.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,B.jsx)(vg,{"data-orientation":"vertical",...i,ref:u,sizes:s,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oo(s)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(o.viewport){const f=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),ph(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:io(a.paddingTop),paddingEnd:io(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[Bx,Cg]=mg(ds),vg=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=e,p=ln(ds,s),[m,v]=g.useState(null),E=oi(n,v),S=g.useRef(null),A=g.useRef(""),N=p.viewport,k=r.content-r.viewport,R=Zs(d),T=Zs(c),Q=Mo(h,10);function P(V){if(S.current){const U=V.clientX-S.current.left,j=V.clientY-S.current.top;u({x:U,y:j})}}return Te(P,"handleDragScroll"),g.useEffect(()=>{const V=Te(U=>{const j=U.target;m?.contains(j)&&R(U,k)},"handleWheel");return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[N,m,k,R]),g.useEffect(T,[r,T]),lr(m,Q),lr(p.content,Q),(0,B.jsx)(Bx,{scope:s,scrollbar:m,hasThumb:i,onThumbChange:Zs(o),onThumbPointerUp:Zs(a),onThumbPositionChange:T,onThumbPointerDown:Zs(l),children:(0,B.jsx)(Ro.div,{...f,ref:E,style:{position:"absolute",...f.style},onPointerDown:sr(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),S.current=m.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(V))}),onPointerMove:sr(e.onPointerMove,P),onPointerUp:sr(e.onPointerUp,V=>{const U=V.target;U.hasPointerCapture(V.pointerId)&&U.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=A.current,p.viewport&&(p.viewport.style.scrollBehavior=""),S.current=null})})})},"ScrollAreaScrollbarImpl")),Bu="ScrollAreaThumb",fx=g.forwardRef(Te(function(e,n){const{forceMount:s,...r}=e,i=Cg(Bu,e.__scopeScrollArea);return(0,B.jsx)(Nl,{present:s||i.hasThumb,children:(0,B.jsx)(px,{ref:n,...r})})},"ScrollAreaThumb")),px=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,style:r,...i}=e,o=ln(Bu,s),a=Cg(Bu,s),{onThumbPositionChange:l}=a,c=oi(n,a.onThumbChange),u=g.useRef(void 0),d=Mo(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const h=o.viewport;if(h){const f=Te(()=>{if(d(),!u.current){const p=Cx(h,l);u.current=p,l()}},"handleScroll");return l(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[o.viewport,d,l]),(0,B.jsx)(Ro.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:sr(e.onPointerDownCapture,h=>{const f=h.target.getBoundingClientRect(),p=h.clientX-f.left,m=h.clientY-f.top;a.onThumbPointerDown({x:p,y:m})}),onPointerUp:sr(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Eg="ScrollAreaCorner",mx=g.forwardRef(Te(function(e,n){const s=ln(Eg,e.__scopeScrollArea),r=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&r?(0,B.jsx)(gx,{...e,ref:n}):null},"ScrollAreaCorner")),gx=g.forwardRef(Te(function(e,n){const{__scopeScrollArea:s,...r}=e,i=ln(Eg,s),[o,a]=g.useState(0),[l,c]=g.useState(0),u=!!(o&&l),{onCornerWidthChange:d,onCornerHeightChange:h}=i;return lr(i.scrollbarX,()=>{const f=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(f),c(f)}),lr(i.scrollbarY,()=>{const f=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(f),a(f)}),g.useEffect(()=>()=>{d(0),h(0)},[d,h]),u?(0,B.jsx)(Ro.div,{...r,ref:n,style:{width:o,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function io(t){return t?parseInt(t,10):0}Te(io,"toInt");function Bh(t,e){const n=t/e;return isNaN(n)?0:n}Te(Bh,"getThumbRatio");function Oo(t){const e=Bh(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=(t.scrollbar.size-n)*e;return Math.max(s,18)}Te(Oo,"getThumbSize");function bg(t,e,n,s="ltr"){const r=Oo(n),i=r/2,o=e||i,a=r-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=s==="ltr"?[0,u]:[u*-1,0];return fh([l,c],d)(t)}Te(bg,"getScrollPositionFromPointer");function fu(t,e,n="ltr"){const s=Oo(e),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-r,o=e.content-e.viewport,a=i-s,l=n==="ltr"?[0,o]:[o*-1,0],c=Bg(t,l);return fh([0,o],[0,a])(c)}Te(fu,"getThumbOffsetFromScroll");function fh(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const s=(e[1]-e[0])/(t[1]-t[0]);return e[0]+s*(n-t[0])}}Te(fh,"linearScale");function ph(t,e){return t>0&&t<e}Te(ph,"isScrollingWithinScrollbarBounds");var Cx=Te((t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},s=0;return Te((function r(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&e(),n=i,s=window.requestAnimationFrame(r)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Mo(t,e){const n=Zs(t),s=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),g.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,e)},[n,e])}Te(Mo,"useDebounceCallback");function lr(t,e){const n=Zs(e);Iy(()=>{let s=0;if(t){const r=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return r.observe(t),()=>{window.cancelAnimationFrame(s),r.unobserve(t)}}},[t,n])}Te(lr,"useResizeObserver");var vx=rx,Ex=ox,bx=mx,Sg={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};Sg.node;var Sx=tt(Sg),yg={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};yg.node;var yx=tt(yg),xg={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};xg.node;var _B=tt(xg),Dg={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};Dg.node;var xx=tt(Dg),wg={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};wg.node;var Dx=tt(wg),Ag={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};Ag.node;var wx=tt(Ag),Ig={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};Ig.node;var Ax=tt(Ig),Tg={name:"list-filter",size:24,node:[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]};Tg.node;var Ix=tt(Tg),kg={name:"list-tree",size:24,node:[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]};kg.node;var FB=tt(kg),Rg={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};Rg.node;var Tx=tt(Rg),Ng={name:"message-square-quote",size:24,node:[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]]};Ng.node;var kx=tt(Ng),Og={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};Og.node;var Rx=tt(Og),Mg={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Mg.node;var Nx=tt(Mg),Lg={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]};Lg.node;var Ox=tt(Lg),_g={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};_g.node;var Mx=tt(_g),Fg={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};Fg.node;var Lx=tt(Fg),Pg={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};Pg.node;var _x=tt(Pg),Hg={name:"shrink",size:24,node:[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]};Hg.node;var Fx=tt(Hg),Gg={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};Gg.node;var Px=tt(Gg),jg={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};jg.node;var Hx=tt(jg),Ug={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};Ug.node;var Gx=tt(Ug),Vg={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};Vg.node;var jx=tt(Vg),zg={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};zg.node;var Ux=tt(zg),Is=class extends Error{constructor(t){super(t),this.name="CanonicalJsonError"}};function $g(t){if(!Number.isFinite(t))throw new Is(`Cannot canonicalize non-finite number: ${String(t)}`);return t===0?"0":String(t)}function Ol(t){if(t===void 0)throw new Is("Cannot canonicalize `undefined` at the root");return pu(t,new Set)}function pu(t,e){if(t===null)return"null";switch(typeof t){case"boolean":return t?"true":"false";case"number":return $g(t);case"string":return JSON.stringify(t);case"object":break;default:throw new Is(`Cannot canonicalize value of type ${typeof t}`)}if(e.has(t))throw new Is("Cannot canonicalize a circular structure");e.add(t);try{if(Array.isArray(t)){const i=[],o=t.length;for(let a=0;a<o;a+=1){const l=t[a];i.push(l===void 0?"null":pu(l,e))}return`[${i.join(",")}]`}const n=Object.getPrototypeOf(t);if(n!==Object.prototype&&n!==null)throw new Is("Cannot canonicalize a non-plain object (only plain objects, arrays and JSON primitives are part of the contract)");const s=t,r=[];for(const i of Object.keys(s).sort()){const o=s[i];o!==void 0&&r.push(`${JSON.stringify(i)}:${pu(o,e)}`)}return`{${r.join(",")}}`}finally{e.delete(t)}}var mu=Symbol("canonicalJsonBounded.overBudget"),Vx=class{constructor(t){this.maxChars=t}parts=[];length=0;remaining(){return this.maxChars-this.length}push(t){if(t.length>this.remaining())throw mu;this.parts.push(t),this.length+=t.length}pushString(t,e=""){if(t.length+2+e.length>this.remaining())throw mu;this.push(JSON.stringify(t)+e)}toString(){return this.parts.join("")}};function oj(t,e){if(t===void 0)return{ok:!1,reason:"uncanonical",message:"Cannot canonicalize `undefined` at the root"};const n=new Vx(e);try{gu(t,new Set,n)}catch(s){return s===mu?{ok:!1,reason:"overBudget"}:{ok:!1,reason:"uncanonical",message:s instanceof Error?s.message:String(s)}}return{ok:!0,json:n.toString()}}function gu(t,e,n){if(t===null){n.push("null");return}switch(typeof t){case"boolean":n.push(t?"true":"false");return;case"number":n.push($g(t));return;case"string":n.pushString(t);return;case"object":break;default:throw new Is(`Cannot canonicalize value of type ${typeof t}`)}if(e.has(t))throw new Is("Cannot canonicalize a circular structure");e.add(t);try{if(Array.isArray(t)){n.push("[");const o=t.length;for(let a=0;a<o;a+=1){a>0&&n.push(",");const l=t[a];l===void 0?n.push("null"):gu(l,e,n)}n.push("]");return}const s=Object.getPrototypeOf(t);if(s!==Object.prototype&&s!==null)throw new Is("Cannot canonicalize a non-plain object (only plain objects, arrays and JSON primitives are part of the contract)");const r=t;n.push("{");let i=!0;for(const o of Object.keys(r).sort()){const a=r[o];a!==void 0&&(i||n.push(","),i=!1,n.pushString(o,":"),gu(a,e,n))}n.push("}")}finally{e.delete(t)}}function Ml(t){return Uy(Gy(Vy(t)))}function mh(t){return Ml(Ol(t))}function zx(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function $x(t){return typeof t=="number"&&Number.isFinite(t)&&t>=0?t:void 0}function Jx(t){const e=Object.entries(t).filter(([,n])=>n!==void 0);return e.length>0?Object.fromEntries(e):void 0}var Wx=["uncachedInputTokens","cacheReadTokens","cacheWriteTokens","cacheWrite1hTokens","outputTokens","reasoningTokens","webSearchRequests"];function Kx(t){const e=zx(t);if(!e)return;const n={};for(const s of Wx){const r=$x(e[s]);r!==void 0&&(n[s]=r)}return Jx(n)}var oo=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:void 0,es=t=>typeof t=="number"&&Number.isFinite(t)&&t>=0?t:void 0,Cu=t=>typeof t=="string"&&t.length>0?t:void 0;function Ks(t,e){return e.includes(t)?t:void 0}function Ss(t,e,n){const s={};for(const r of e){const i=n(t[r]);i!==void 0&&(s[r]=i)}return s}var PB=["input","output","cacheRead","cacheWrite","cacheWrite1h"];function qx(t){const e=oo(t);if(!e||e.currency!=="USD")return;const n=Ss(e,[...PB,"webSearchPerThousand"],es);if(n.input===void 0||n.output===void 0)return;const s=(Array.isArray(e.tiers)?e.tiers:[]).map(oo).filter(r=>es(r?.aboveInputTokens)!==void 0).map(r=>Ss(r,["aboveInputTokens",...PB],es));return{...n,currency:"USD",...s.length>0?{tiers:s}:{}}}function Yx(t){const e=oo(t),n=Ks(e?.source,["list_price","customer_rate"]),s=qx(e?.rates),r=Cu(e?.modelId);if(!e||!n||!s||!r)return;const i=Array.isArray(e.assumptions)?e.assumptions.filter(o=>typeof o=="string"):[];return{source:n,rates:s,modelId:r,...Ss(e,["provider","versionId"],Cu),...Ss(e,["effectiveAt","retrievedAt"],es),...i.length>0?{assumptions:i}:{}}}function Jg(t){const e=oo(t);if(!e||e.currency!=="USD")return;const n=Ks(e.completeness,["complete","partial","unavailable"]),s=es(e.calculationVersion),r=es(e.amountUsd),i=Ks(e.source,["provider_reported","list_price","customer_rate","runner_reported"]);if(!n||s===void 0||n==="unavailable"!=(r===void 0)||r!==void 0&&!i)return;const o=Ss(oo(e.parts)??{},["input","cacheRead","cacheWrite","output","webSearch"],es),a=(Array.isArray(e.missing)?e.missing:[]).filter(f=>Ks(f,["usage","input_tokens","output_tokens","rate","cache_read_rate","cache_write_rate","cache_write_1h_rate","web_search_rate"])!==void 0),l=Ks(e.reason,["no_usage","no_rate","invalid_rate","unsupported_currency"]),c=Ks(e.funding,["mcpjam","customer"]),u=Ks(e.usageSource,["provider","runner","interrupted_estimate"]),d=Kx(e.usage),h=Yx(e.rate);return{calculationVersion:s,currency:"USD",completeness:n,...r!==void 0?{amountUsd:r}:{},...i?{source:i}:{},...Object.keys(o).length>0?{parts:o}:{},...a.length>0?{missing:a}:{},...l?{reason:l}:{},...Ss(e,["tierAboveInputTokens"],es),...h?{rate:h}:{},...Ss(e,["reporter"],Cu),...c?{funding:c}:{},...d?{usage:d}:{},...u?{usageSource:u}:{},...Ss(e,["recordedAt"],es)}}var HB=1000000000000000n,Wg=1e15;function Xx(t){return BigInt(Math.round(t*Wg))}function Qx(t){const e=t/HB,n=t%HB;return Number(e)+Number(n)/Wg}var Zx=["provider_reported","customer_rate","list_price","runner_reported"];function eD(t){let e=0n,n=0,s=0,r=0;const i=new Set;for(const l of t){if(!l||l.amountUsd===void 0||l.currency!=="USD"){r+=1;continue}e+=Xx(l.amountUsd),l.source&&i.add(l.source),l.completeness==="complete"?n+=1:s+=1}const o=t.length,a=n===o?"complete":n+s===0?"unavailable":"partial";return{currency:"USD",knownSubtotalUsd:Qx(e),completeness:a,totalCalls:o,completeCalls:n,partialCalls:s,unavailableCalls:r,sources:Zx.filter(l=>i.has(l))}}function qs(t){const e=[t.scope??"",t.serverId,t.wire,t.taskId];if(t.connectionId!==void 0&&e.push(t.connectionId),e.some(n=>n.includes("\0"))||t.connectionId==="")throw new Error("Invalid task identity");return e.join("\0")}var tD=["completed","failed","cancelled","expired"];function Ti(t){return tD.includes(t)}var nD=250,sD=3e5,rD=1e3,iD=6e4;function GB(t){return typeof t=="number"&&Number.isFinite(t)&&t>0?t:0}function gr(t){return typeof t=="number"&&Number.isFinite(t)&&t>0?t:void 0}function fi(t){return{...t,respondedInputKeys:[...t.respondedInputKeys],terminal:Ti(t.status)}}var aj=class{records=new Map;now;absoluteFloorMs;maximumIntervalMs;backoffBaseMs;backoffMaxMs;userMinimumIntervalMs;callbacks;constructor(t={}){this.now=t.now??(()=>Date.now()),this.absoluteFloorMs=t.absoluteFloorMs??nD,this.maximumIntervalMs=t.maximumIntervalMs??sD,this.backoffBaseMs=t.errorBackoffBaseMs??rD,this.backoffMaxMs=t.errorBackoffMaxMs??iD,this.userMinimumIntervalMs=GB(t.userMinimumIntervalMs),this.callbacks=t.callbacks??{}}setCallbacks(t){this.callbacks=t}setUserMinimumIntervalMs(t){this.userMinimumIntervalMs=GB(t);for(const e of this.records.values()){if(Ti(e.status))continue;const n=(e.lastObservedAt??this.now())+this.effectiveIntervalMs(e),s=e.consecutiveErrors>0?e.nextPollAt:0;e.nextPollAt=Math.max(n,e.retryAfterUntil??0,s)}}getUserMinimumIntervalMs(){return this.userMinimumIntervalMs}effectiveIntervalMs(t,e){const n=e??this.now(),s=gr(t.pollIntervalMs)??0,r=t.consecutiveErrors>0?Math.min(this.backoffBaseMs*2**(t.consecutiveErrors-1),this.backoffMaxMs):0,i=t.retryAfterUntil?Math.max(0,t.retryAfterUntil-n):0,o=Math.min(Math.max(this.absoluteFloorMs,this.userMinimumIntervalMs,r),Math.max(this.maximumIntervalMs,this.absoluteFloorMs));return Math.max(o,s,i)}get(t){return this.records.get(qs(t))}getByKey(t){return this.records.get(t)}snapshot(t){const e=this.get(t);return e?fi(e):void 0}all(){return[...this.records.values()].map(fi)}register(t,e={}){const n=qs(t),s=this.records.get(n);if(s)return s;const r=this.now(),i={key:n,identity:{...t},status:e.status??"unknown",createdAt:e.createdAt,ttlMs:e.ttlMs??null,pollIntervalMs:gr(e.pollIntervalMs),nextPollAt:typeof e.nextPollAt=="number"&&Number.isFinite(e.nextPollAt)?Math.max(r,e.nextPollAt):r,lastObservedAt:typeof e.lastObservedAt=="number"&&Number.isFinite(e.lastObservedAt)?e.lastObservedAt:void 0,consecutiveErrors:0,cancellationRequested:!1,restored:e.restored===!0,pollInFlight:!1,respondedInputKeys:new Set(e.respondedInputKeys??[]),toolName:e.toolName,surface:e.surface};return this.records.set(n,i),e.restored||this.callbacks.onTaskCreated?.(fi(i)),i}forget(t){this.records.delete(qs(t))}clear(){this.records.clear()}observe(t,e,n="poll"){const s=this.register(t,{restored:!0}),r=s.status,i=this.now();if(Ti(s.status)&&!s.restored)return s.lastObservedAt=i,s;s.restored=!1,s.status=e.status,s.statusMessage=e.statusMessage,e.createdAt!==void 0&&(s.createdAt=e.createdAt),e.lastUpdatedAt!==void 0&&(s.lastUpdatedAt=e.lastUpdatedAt),e.ttlMs!==void 0&&(s.ttlMs=e.ttlMs),e.pollIntervalMs!==void 0&&(s.pollIntervalMs=gr(e.pollIntervalMs)),s.inputRequests=e.inputRequests,s.result=e.result,s.error=e.error,s.raw=e.raw,s.lastObservedAt=i,n!=="notification"&&(s.consecutiveErrors=0,s.retryAfterUntil=void 0);const o=Ti(s.status);o?s.nextPollAt=Number.POSITIVE_INFINITY:n==="notification"&&s.consecutiveErrors>0?s.nextPollAt=Math.min(s.nextPollAt,i+this.effectiveIntervalMs(s,i)):s.nextPollAt=i+this.effectiveIntervalMs(s,i);const a=fi(s);return r!==s.status?(this.callbacks.onState?.(a,r),s.status==="input_required"&&this.callbacks.onInputRequired?.(a),o&&this.callbacks.onTerminal?.(a)):s.status==="input_required"&&n!=="create"&&this.callbacks.onInputRequired?.(a),s}observeError(t,e={}){const n=this.register(t,{restored:!0}),s=this.now();n.consecutiveErrors+=1;const r=gr(e.retryAfterMs);return r!==void 0&&(n.retryAfterUntil=s+r),n.nextPollAt=s+this.effectiveIntervalMs(n,s),n}applyRetryAfter(t,e){const n=this.register(t,{restored:!0}),s=this.now(),r=gr(e);r!==void 0&&(n.retryAfterUntil=s+r,n.nextPollAt=Math.max(n.nextPollAt,s+r))}clearErrorBackoff(t){const e=this.records.get(qs(t));if(!e)return;const n=this.now();e.consecutiveErrors=0;const s=gr(e.pollIntervalMs)??0;e.nextPollAt=Math.max(n,e.lastObservedAt!==void 0?e.lastObservedAt+s:0,e.retryAfterUntil??0)}markExpired(t){const e=this.register(t,{restored:!0}),n=e.status;e.status="expired",e.lastObservedAt=this.now(),e.nextPollAt=Number.POSITIVE_INFINITY,e.consecutiveErrors=0;const s=fi(e);return n!=="expired"&&(this.callbacks.onState?.(s,n),this.callbacks.onTerminal?.(s)),e}markCancellationRequested(t){const e=this.register(t,{restored:!0});e.cancellationRequested=!0}markInputKeysResponded(t,e){const n=this.register(t,{restored:!0});for(const s of e)n.respondedInputKeys.add(s)}pendingInputKeys(t){const e=this.get(t);return e?.inputRequests?Object.keys(e.inputRequests).filter(n=>Object.prototype.hasOwnProperty.call(e.inputRequests,n)&&!e.respondedInputKeys.has(n)):[]}owesRead(t){return Ti(t.status)?t.restored&&t.identity.wire==="extension":!0}due(t){const e=t??this.now();return[...this.records.values()].filter(n=>this.owesRead(n)&&!n.pollInFlight&&n.nextPollAt<=e).sort((n,s)=>n.nextPollAt-s.nextPollAt)}active(){return[...this.records.values()].filter(t=>this.owesRead(t))}msUntilNextDue(t){const e=t??this.now();let n=Number.POSITIVE_INFINITY;for(const s of this.records.values())this.owesRead(s)&&(n=Math.min(n,s.nextPollAt));if(Number.isFinite(n))return Math.max(0,n-e)}reserve(t,e){const n=e??this.now();for(const s of t)s.nextPollAt=n+this.effectiveIntervalMs(s,n)}acquirePoll(t,e){const n=this.records.get(qs(t));return!n||n.pollInFlight?!1:(n.pollInFlight=!0,this.reserve([n],e),!0)}releasePoll(t){const e=this.records.get(qs(t));e&&(e.pollInFlight=!1)}batchIntervalMs(t,e){const n=e??this.now();let s=Math.max(this.absoluteFloorMs,this.userMinimumIntervalMs);for(const r of t)s=Math.max(s,this.effectiveIntervalMs(r,n));return s}},gh=ng(Cy(),1);function oD(){return document.activeElement?.closest('[role="dialog"],[role="alertdialog"]')??document.body}async function ai(t){try{return await navigator.clipboard.writeText(t),!0}catch{const e=document.createElement("textarea");try{return e.value=t,e.style.position="fixed",e.style.opacity="0",oD().appendChild(e),e.select(),e.selectionStart!==0||e.selectionEnd!==e.value.length?(console.warn("Clipboard copy failed: fallback selection did not take, nothing was copied"),!1):document.execCommand("copy")?(console.warn("Clipboard API unavailable, used deprecated execCommand fallback"),!0):(console.warn("Clipboard copy failed: execCommand fallback reported failure"),!1)}catch{return console.warn("Clipboard copy failed: both modern and fallback methods failed"),!1}finally{e.remove()}}}var aD=class extends Error{reason;constructor(t,e){super(e?`App is still bootstrapping (${t}): ${e}`:`App is still bootstrapping (${t}). Wait for useAppReady() to resolve before initiating requests.`),this.name="BootstrapNotReadyError",this.reason=t}},vu="mcpjam:task-bookmarks-changed";function lD(){typeof window<"u"&&window.dispatchEvent(new Event(vu))}function lj(t){return window.addEventListener(vu,t),window.addEventListener("storage",t),()=>{window.removeEventListener(vu,t),window.removeEventListener("storage",t)}}var cD=2e3,uD=6048e5;function cj(t){return t!=="working"&&t!=="input_required"}function uj(t,e){return Math.max(t,cD,e??0)}function dD(t,e){return t&&e?JSON.stringify(["owned-task-v1",t,e]):void 0}var Ll,ao;function hD(t){Ll=t??void 0}function BD(){return Ll}function fD(t,e){ao=dD(t,e)}function Ch(){return ao}function $r(t){return t.connectionId!==void 0||t.sourceExecutionId!==void 0}function Lo(t){return{...t,scope:t.scope??($r(t)?ao:Ll)}}function Kg(t){return $r(t)?ao!==void 0&&t.scope===ao:t.scope===Ll}function Eu(t,e){const n=`${e?.scope??(e?.connectionId!==void 0?Ch():BD())??""}\0${t}`;return e?.wire!==void 0||e?.connectionId!==void 0?`${n}\0${e.wire??""}\0${e.connectionId??""}`:n}function li(t,e){return t.connectionId===e?.connectionId&&(e?.scope===void 0||t.scope===e.scope)&&(e?.wire===void 0||t.wire===e.wire)}var qg="mcp-tracked-tasks",Yg="mcp-tracked-tasks-v4",La=4,pD=50,Jr=1024,Xg=100,mD=524288;function rn(t){return qs(t)}function gD(t,e){const n=Date.parse(t.createdAt);return Number.isNaN(n)?!0:e-n<uD}function Bn(t){if(typeof t=="string")return t.length>Jr?t.slice(0,Jr):t}function vn(t){if(typeof t=="string")return t.length>Jr||t.includes("\0")?void 0:t}function Gs(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function jB(t){if(typeof t!="object"||t===null||Array.isArray(t))return;const e=t,n=vn(e.taskId),s=vn(e.serverId),r=Bn(e.createdAt);if(!n||!s)return;const i=vn(e.connectionId),o=vn(e.sourceExecutionId);if(e.connectionId!==void 0&&!i||e.sourceExecutionId!==void 0&&!o)return;const a=vn(e.scope);if(e.scope!==void 0&&a===void 0||!r||Number.isNaN(Date.parse(r)))return;const l=e.wire==="extension"||e.wire==="legacy"?e.wire:"legacy",c=e.ttlMs===null?null:Gs(e.ttlMs),u=Array.isArray(e.respondedInputKeys)?e.respondedInputKeys.filter(d=>typeof d=="string").slice(0,Xg).map(d=>d.slice(0,Jr)):void 0;return{taskId:n,serverId:s,wire:l,createdAt:r,...Bn(e.toolName)?{toolName:Bn(e.toolName)}:{},...e.primitiveType==="tool"||e.primitiveType==="prompt"||e.primitiveType==="resource"?{primitiveType:e.primitiveType}:{},...Bn(e.primitiveName)?{primitiveName:Bn(e.primitiveName)}:{},...e.dismissed===!0?{dismissed:!0}:{},...e.expired===!0?{expired:!0}:{},...a!==void 0?{scope:a}:{},...i!==void 0?{connectionId:i}:{},...o!==void 0?{sourceExecutionId:o}:{},...Bn(e.serverName)?{serverName:Bn(e.serverName)}:{},...Bn(e.lastUpdatedAt)?{lastUpdatedAt:Bn(e.lastUpdatedAt)}:{},...Bn(e.status)?{status:Bn(e.status)}:{},...c!==void 0?{ttlMs:c}:{},...Gs(e.pollIntervalMs)!==void 0?{pollIntervalMs:Gs(e.pollIntervalMs)}:{},...Gs(e.nextPollAt)!==void 0?{nextPollAt:Gs(e.nextPollAt)}:{},...Gs(e.lastObservedAt)!==void 0?{lastObservedAt:Gs(e.lastObservedAt)}:{},...u?.length?{respondedInputKeys:u}:{}}}function CD(t){if(Array.isArray(t))return t.map(jB).filter(n=>n!==void 0);if(typeof t!="object"||t===null)return[];const e=t;return typeof e.version=="number"&&e.version>La?[]:Array.isArray(e.tasks)?e.tasks.map(jB).filter(n=>n!==void 0):[]}function UB(t){try{const e=localStorage.getItem(t);return e?CD(JSON.parse(e)).filter(n=>gD(n,Date.now())):[]}catch{return[]}}function _l(){const t=UB(qg).filter(n=>!$r(n)),e=UB(Yg);return[...new Map([...t,...e].map(n=>[rn(n),n])).values()]}function kn(){return _l().filter(Kg)}function _o(t){vh([...t,..._l().filter(e=>!Kg(e))])}function vh(t){try{let e=t,n=JSON.stringify({version:La,tasks:e});for(;n.length>mD&&e.length>1;)e=e.slice(0,Math.floor(e.length/2)),n=JSON.stringify({version:La,tasks:e});localStorage.setItem(qg,JSON.stringify({version:3,tasks:e.filter(s=>!$r(s))})),localStorage.setItem(Yg,JSON.stringify({version:La,tasks:e.filter($r)})),lD()}catch{}}function dj(){return kn()}function hj(t,e,n,s){return kn().filter(r=>r.serverId===t&&!r.dismissed&&li(r,{wire:e,connectionId:n,scope:s}))}function Bj(t,e,n){return kn().find(s=>s.taskId===t&&(e===void 0||s.serverId===e)&&li(s,n))}function fj(t){const e=Lo(t);if($r(e)&&e.scope===void 0||vn(e.taskId)===void 0||vn(e.serverId)===void 0||e.scope!==void 0&&vn(e.scope)===void 0||e.connectionId!==void 0&&!vn(e.connectionId)||e.sourceExecutionId!==void 0&&!vn(e.sourceExecutionId))return;const n=_l(),s=rn(e);if(n.some(o=>rn(o)===s))return;const r=o=>(o.scope??void 0)===(e.scope??void 0),i=n.filter(r);i.unshift({...e,dismissed:!1}),vh([...i.slice(0,pD),...n.filter(o=>!r(o))])}function vD(t,e){e.status!==void 0&&(t.status=e.status),e.lastUpdatedAt!==void 0&&(t.lastUpdatedAt=e.lastUpdatedAt),e.ttlMs!==void 0&&(t.ttlMs=e.ttlMs),e.pollIntervalMs!==void 0&&(t.pollIntervalMs=e.pollIntervalMs),e.nextPollAt!==void 0&&(t.nextPollAt=e.nextPollAt),e.lastObservedAt!==void 0&&(t.lastObservedAt=e.lastObservedAt)}function pj(t){if(t.length===0)return;const e=kn(),n=new Map(e.map(r=>[rn(r),r]));let s=!1;for(const{identity:r,observation:i}of t){const o=n.get(rn(Lo(r)));o&&(vD(o,i),s=!0)}s&&_o(e)}function mj(t){const e=new Map;if(t.length===0)return e;const n=new Map;for(const s of t)n.set(rn(Lo(s)),rn(s));for(const s of kn()){const r=n.get(rn(s));r!==void 0&&e.set(r,{nextPollAt:s.nextPollAt,lastObservedAt:s.lastObservedAt,pollIntervalMs:s.pollIntervalMs,ttlMs:s.ttlMs,status:s.status,respondedInputKeys:s.respondedInputKeys??[]})}return e}function gj(t,e){if(e.length===0)return;const n=rn(Lo(t)),s=kn(),r=s.find(i=>rn(i)===n);r&&(r.respondedInputKeys=[...new Set([...r.respondedInputKeys??[],...e])].slice(0,Xg).map(i=>i.slice(0,Jr)),_o(s))}function Cj(t){const e=rn(Lo(t));return kn().find(n=>rn(n)===e)?.respondedInputKeys??[]}function vj(t,e,n){const s=kn();for(const r of s)r.taskId===t&&(e===void 0||r.serverId===e)&&li(r,n)&&(r.expired=!0);_o(s)}function Ej(t,e,n){const s=new Set(e),r=kn();for(const i of r)i.serverId===t&&s.has(i.taskId)&&li(i,n)&&(i.dismissed=!0);_o(r)}var Qg="mcp-dismissed-registry-tasks",ED=200;function Eh(){try{const t=localStorage.getItem(Qg);if(!t)return{};const e=JSON.parse(t);if(typeof e!="object"||e===null||Array.isArray(e))return{};const n={};for(const[s,r]of Object.entries(e))Array.isArray(r)&&(n[s]=r.filter(i=>typeof i=="string"&&i.length>0&&i.length<=Jr).slice(0,ED));return n}catch{return{}}}function Zg(t){try{localStorage.setItem(Qg,JSON.stringify(t))}catch{}}function bj(t,e,n){if(n?.connectionId!==void 0&&n.scope===void 0&&Ch()===void 0)return;const s=e.filter(o=>vn(o)!==void 0);if(s.length===0)return;const r=Eh(),i=Eu(t,n);r[i]=[...new Set([...r[i]??[],...s])].slice(-200),Zg(r)}function Sj(t,e){if(e?.connectionId!==void 0&&e.scope===void 0&&Ch()===void 0)return new Set;const n=new Set(kn().filter(i=>i.serverId===t&&i.dismissed&&li(i,e)).map(i=>i.taskId)),s=Eh(),r=[Eu(t,e)];e?.connectionId===void 0&&e?.scope===void 0&&r.push(Eu(t));for(const i of r)for(const o of s[i]??[])n.add(o);return n}function yj(t,e){_o(kn().filter(n=>n.serverId!==t||!li(n,e)))}function bD(t){const e=t??void 0;vh(_l().filter(i=>(i.scope??void 0)!==e));const n=Eh(),s=`${e??""}\0`;let r=!1;for(const i of Object.keys(n))i.startsWith(s)&&(delete n[i],r=!0);r&&Zg(n)}var eC={projectId:null,serverIdsByName:{}},fe=eC,mn=null,Ts=0,bu=new Set,ki=3e4,SD=3e3,yD=100,vc=null;function bh(){mn=null}var xD=1e4;async function DD(){if(Rr())return null;const t=fe.getAccessToken;if(!t)return null;const e=Ts;bh();let n;try{const s=await Promise.race([t({forceRefresh:!0}),new Promise(r=>{n=setTimeout(()=>r(null),xD)})]);return!s||e!==Ts?null:(mn={token:s,expiresAt:Date.now()+ki,kind:"session"},s)}catch{return null}finally{clearTimeout(n)}}function tC(){Ts+=1;for(const t of bu)t()}function xj(t){return bu.add(t),()=>{bu.delete(t)}}function Dj(){return Ts}var VB=null;function wj(t){const e=VB;if(e&&e.revision===Ts&&e.serverNameOrId===t)return e.key;const n=fe.clientConfigSyncPending||!ID(t)?null:JSON.stringify([Rr(),ND(t)]);return VB={revision:Ts,serverNameOrId:t,key:n},n}function wD(){throw new Error("Hosted API context is only available in hosted mode")}function Sh(){if(fe.clientConfigSyncPending)throw new Error(Ry)}function AD(){return!fe.isAuthenticated&&!fe.hasSession}function yh(){return!(fe.isAuthenticated||fe.hasSession)}function Rr(){return yh()}function Aj(t){const e=fe.projectId??void 0,n=t?.projectId??void 0;e&&n&&e!==n&&bD(e),hD(n),fD(n,t?.taskOwnerId),fe=t?{...t,clientCapabilities:t.clientCapabilities??Fy()}:eC,bh(),tC()}function Ij(t,e,n){fe.projectId===n&&fe.serverIdsByName[t]!==e&&(fe={...fe,serverIdsByName:{...fe.serverIdsByName,[t]:e}},tC())}function nC(){const t=fe.projectId;if(!t)throw new aD("provisioning-project","hosted projectId is not in the API context yet");return t}function ID(t){const e=fe.projectId;if(!e)return null;const n=fe.serverIdsByName[t];return n?{projectId:e,serverId:n}:Object.values(fe.serverIdsByName).includes(t)?{projectId:e,serverId:t}:null}function TD(t){const e=t.trim();return!(e.length<1||e.length>=20&&/^[a-z0-9]+$/i.test(e))}var kD="Hosted server not found. The server is not in your hosted project, or the server list is still loading.";function sC(t){const e=fe.serverIdsByName[t];if(e)return e;if(Object.values(fe.serverIdsByName).includes(t))return t;throw TD(t)?new Error(`Hosted server not found for "${t}"`):new Error(kD)}function Fo(t){return Object.entries(fe.serverIdsByName).find(([,e])=>e===t)?.[0]}function Tj(t){return Fo(t)}function kj(t){}function Rj(t){wD();const e=new Set,n=[];for(const s of t){if(typeof s!="string")continue;const r=s.trim();if(!r)continue;const i=fe.serverIdsByName[r]!==void 0?r:Fo(r)??r,o=i.toLowerCase();e.has(o)||(e.add(o),n.push(i))}return n}function RD(t){const e=new Set,n=[];for(const s of t){const r=sC(s);e.has(r)||(e.add(r),n.push({serverId:r,serverName:fe.serverIdsByName[s]!==void 0?s:Fo(r)??s}))}return n}function xh(){return fe.scenarioId}function rC(){return fe.accessVersion}function iC(){return xh()?"chat_v2":void 0}function Dh(t){return{...t.mirrorToolParamHeaders===!1?{mirrorToolParamHeaders:!1}:{},...t.firstPageOnly===!0?{firstPageOnly:!0}:{},...t.suppressListenChannel===!0?{suppressListenChannel:!0}:{},...t.dropToolListChanged===!0?{dropToolListChanged:!0}:{},...t.toolCallCancellation?{toolCallCancellation:t.toolCallCancellation}:{},...t.supportsMrtr===!1?{supportsMrtr:!1}:{}}}function ND(t){Sh();const e=nC(),n=sC(t),s=xh(),r=rC(),i=iC();return{projectId:e,serverId:n,serverName:fe.serverIdsByName[t]!==void 0?t:Fo(n)??t,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...fe.mcpProtocolVersionsByServerId?.[n]?{mcpProtocolVersion:fe.mcpProtocolVersionsByServerId[n]}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...i?{accessScope:i}:{},...s?{scenarioId:s}:{},...s&&Number.isFinite(r)?{accessVersion:r}:{}}}function Nj(t){Sh();const e=nC(),n=RD(t),s=n.map(c=>c.serverId),r=n.map(c=>c.serverName),i=oC(s),o=xh(),a=rC(),l=iC();return{projectId:e,serverIds:s,serverNames:r,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...i?{mcpProtocolVersionsByServerId:i}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...l?{accessScope:l}:{},...o?{scenarioId:o}:{},...o&&Number.isFinite(a)?{accessVersion:a}:{}}}function oC(t){const e=fe.mcpProtocolVersionsByServerId;if(!e)return;const n={};for(const s of t){const r=e[s];r&&(n[s]=r)}return Object.keys(n).length>0?n:void 0}function Oj(t){Sh();const e=oC(t.serverIds);return{projectId:t.projectId,serverIds:t.serverIds,serverNames:t.serverNames,...fe.clientCapabilities?{clientCapabilities:fe.clientCapabilities}:{},...fe.clientInfo?{clientInfo:fe.clientInfo}:{},...fe.supportedProtocolVersions?.length?{supportedProtocolVersions:fe.supportedProtocolVersions}:{},...e?{mcpProtocolVersionsByServerId:e}:{},...Dh(fe),...fe.xaaPolicy?{xaaPolicy:fe.xaaPolicy}:{},...t.accessScope?{accessScope:t.accessScope}:{},...t.scenarioId?{scenarioId:t.scenarioId}:{},...t.scenarioId&&Number.isFinite(t.accessVersion)?{accessVersion:t.accessVersion}:{}}}function OD(){return vc??=MD().finally(()=>{vc=null}),vc}async function MD(){const t=Date.now()+SD;for(;Date.now()<t;){if(await new Promise(n=>setTimeout(n,yD)),yh())return null;const e=fe.getAccessToken;if(e)try{const n=await e();if(n)return n}catch{}}return null}async function aC(t=1){const e=Ts,n=Rr(),s=()=>Ts!==e||Rr()!==n,r=()=>t>0?aC(t-1):null,i=Date.now();if(mn&&mn.expiresAt>i)if(mn.kind==="guest"&&!Rr())mn=null;else return`Bearer ${mn.token}`;if(Rr()){const l=await MB();if(s())return r();if(l)return mn={token:l,expiresAt:i+ki,kind:"guest"},`Bearer ${l}`}const o=fe.getAccessToken;if(o)try{const l=await o();if(s())return r();if(l)return mn={token:l,expiresAt:i+ki,kind:"session"},`Bearer ${l}`}catch{}if(!yh()){const l=await OD();return s()?r():l?(mn={token:l,expiresAt:Date.now()+ki,kind:"session"},`Bearer ${l}`):null}const a=await MB();return s()?r():a?(mn={token:a,expiresAt:i+ki,kind:"guest"},`Bearer ${a}`):null}function LD(){const t=hy();if(t)return t;const e=fy()??"https://rt.mcpjam.com";return e&&typeof e=="string"?e.replace(".convex.cloud",".convex.site"):null}async function _D(t){const e=t.headers.get("content-type")?.split(";")[0].trim().toLowerCase()||void 0,n=await t.text().catch(()=>""),s=n.trimStart().startsWith("{")?FD(n):null;return s?{ok:"ok"in s&&s.ok===!0,code:"code"in s&&typeof s.code=="string"?s.code:void 0,contentType:e}:{ok:!1,contentType:e}}function FD(t){try{const e=JSON.parse(t);return typeof e=="object"?e:null}catch{return null}}var PD=[/^\/api\/v1\/projects\/[^/]+\/mock-servers(\/[^/]+(\/(versions|forwarding-policy))?)?$/,/^\/api\/v1\/projects\/[^/]+\/mock-forwarding-policy$/],HD=[...PD,/^\/api\/v1\/chat-sessions\/[^/]+(\/trace)?$/,/^\/api\/v1\/projects\/[^/]+\/servers$/],Wr=null,Ri=null,wh=class extends Error{status;code;restarted;contentType;constructor(t,{code:e,restarted:n=!1,contentType:s}={}){super(`Failed to get session token: ${t}`),this.name="SessionTokenError",this.status=t,this.code=e,this.restarted=n,this.contentType=s}};function Mj(t){return t instanceof wh&&t.status===403&&t.code==="HOST_NOT_ALLOWED"}function GD(t){return t instanceof wh&&t.status===401&&t.code==="ACCESS_LINK_REQUIRED"}var zB={"/api/web/scenarios/bootstrap":"scenario"};function jD(t){const e=t instanceof URL?t.toString():typeof Request<"u"&&t instanceof Request?t.url:String(t),n=typeof window<"u"?window.location.origin:"http://localhost";try{const s=new URL(e,n);return zB[s.pathname]??null}catch{return zB[e]??null}}function UD(...t){const e={};for(const n of t)if(n){if(n instanceof Headers){n.forEach((s,r)=>{e[r]=s});continue}if(Array.isArray(n)){for(const[s,r]of n)e[s]=r;continue}Object.assign(e,n)}return e}function VD(t){return t?t instanceof Headers?t.has("Authorization"):Array.isArray(t)?t.some(([e])=>e.toLowerCase()==="authorization"):Object.keys(t).some(e=>e.toLowerCase()==="authorization"):!1}function ea(t,e,n){const s=dC(t)?$D():void 0,r=n&&hC(t)?{Authorization:n}:void 0;return{...e,headers:UD(s,r,e?.headers)}}async function lC(t){const e=await fetch("/api/session-token",{headers:t?{"X-MCP-Session-Auth":`Bearer ${t}`}:{},cache:"no-store"}),n=await _D(e);if(!e.ok||!n.ok||!my(t))throw new wh(e.status,{code:n.code,restarted:!!t,contentType:n.contentType});return Wr=t,py(t),t}async function Lj(){return Wr||(Ri||(Ri=lC(ah()).catch(t=>{throw Ri=null,t})),Ri)}async function zD(){Wr=null,Ri=null;try{return await lC(ah(!0))}catch(t){return GD(t)&&window.dispatchEvent(new CustomEvent(rg,{detail:{restarted:t.restarted}})),null}}function Fl(){return Wr||(ah()??"")}function _j(){return!!Fl()}function $D(){const t=Fl();return t?{"X-MCP-Session-Auth":`Bearer ${t}`}:(console.warn("[Auth] Session token not available"),{})}function cC(t){return t==="localhost"||t==="127.0.0.1"||t==="::1"||t==="[::1]"}function Ah(t){const e=typeof window<"u"?window.location.origin:"http://localhost";try{return t instanceof URL?t:typeof Request<"u"&&t instanceof Request?new URL(t.url,e):new URL(String(t),e)}catch{return null}}function uC(t){return cC(t.hostname)?!0:typeof window<"u"&&t.origin===window.location.origin}function dC(t){const e=Ah(t);return e?uC(e)&&e.pathname.startsWith("/api/"):typeof t=="string"&&t.startsWith("/api/")}var JD=["/api/mcp/webmcp","/api/web/","/api/v1/harness/","/api/v1/built-in-tools/","/api/web-clients/accounts/","/api/web-clients/reconnect/","/api/v1/agent-ops","/api/mcp/local-harness","/api/mcp/connect","/api/mcp/servers/reconnect","/api/mcp/servers/approve-command","/api/mcp/server-features/observations","/api/mcp/servers/canvas/refresh","/api/mcp/chat-v2","/api/mcp/xaa/proxy/token","/api/mcp/xaa/negative-tests","/api/mcp/xaa/authenticate","/api/mcp/xaa/token-exchange","/api/mcp/xaa/token","/api/mcp/computers/local-consent","/api/mcp/computers/local-terminal-token","/api/mcp/computers/local-browser","/api/mcp/computers/browser-location","/web/oauth/","/web/registry/"];function WD(t){if(typeof window<"u"&&t.origin===window.location.origin||cC(t.hostname))return!0;const e=LD();if(e)try{const n=new URL(e).hostname;if(t.hostname===n)return!0}catch{}return!1}var KD=[/^\/api\/mcp\/(chat-persistence|turn-authorization)\/?$/,/^\/api\/mcp\/servers\/command-approval\/?$/,/^\/api\/v1\/projects\/[^/]+\/readiness-runs(\/[^/]+(\/(cancel|report|resume))?)?$/,/^\/api\/v1\/projects\/[^/]+\/servers\/[^/]+\/revisions(\/\d+\/diff)?$/,/^\/api\/v1\/projects\/[^/]+\/servers\/[^/]+\/readiness-runs\/(claude|openai)$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/reviewer-attempts(\/[^/]+(\/(resume|cancel|handoff))?)?$/,/^\/api\/v1\/directory-flows(\/[^/]+)?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions(\/[^/]+(\/(runs|results|handoff|export|events|snapshots|findings(\/[^/]+)?))?)?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/packs(\/(generate|verify-video|compare|revisions(\/\d+\/download)?))?$/,/^\/api\/v1\/projects\/[^/]+\/directory-submissions\/[^/]+\/(test-plan(\/draft)?|tool-tests)$/,/^\/api\/v1\/projects\/[^/]+\/eval-suites\/[^/]+\/run-disclosure$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/(decision-summary|stage-analytics|route-facts|server-facts)$/,/^\/api\/v1\/projects\/[^/]+\/eval-suites\/[^/]+\/stage-analytics$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/description-experiments$/,/^\/api\/v1\/projects\/[^/]+\/eval-description-experiments\/[^/]+(\/start)?$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/backtest$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/iterations$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/compare$/,/^\/api\/v1\/projects\/[^/]+\/eval-runs\/[^/]+\/cancel$/,...HD];function $B(t){return KD.some(e=>e.test(t))?!0:JD.some(e=>e.endsWith("/")?t.startsWith(e):t===e||t.startsWith(`${e}/`))}var qD=["/api/web/apps/plugin-instances/","/api/web/plugin-forms/"];function YD(t){const e=Ah(t),n=e?e.pathname:typeof t=="string"?t.split("?")[0]:"";return/^\/api\/(web|mcp)\/(chat-persistence|turn-authorization)\/?$/.test(n)||qD.some(s=>n.startsWith(s))}function XD(t){return t==null||typeof t=="string"||t instanceof FormData||t instanceof URLSearchParams||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function hC(t){const e=Ah(t);if(e)return WD(e)?$B(e.pathname):!1;if(typeof t!="string"||!t.startsWith("/"))return!1;const n=t.split("?")[0];return $B(n)}function QD(t){const e=Fl();if(!e)return console.warn("[Auth] Session token not available for URL"),t;try{const n=new URL(t,window.location.origin);return uC(n)?(n.searchParams.set("_token",e),n.origin===window.location.origin?n.pathname+n.search:n.href):(console.warn("[Auth] Refusing to attach session token to foreign origin"),t)}catch{return`${t}${t.includes("?")?"&":"?"}_token=${encodeURIComponent(e)}`}}async function Fj(t,e){const n=jD(t),s=VD(e?.headers),r=hC(t),i=r&&!s?await aC():null,o=ea(t,e,i),a=await fetch(t,o);if(a.status===401&&r&&await qy(a))return Ky(),a;if(a.status===401&&r&&!s&&YD(t)&&XD(e?.body)&&a.headers?.get("X-MCP-Auth-Required")!=="oauth"){const u=await DD();if(u)return e?.signal?.throwIfAborted(),fetch(t,ea(t,e,`Bearer ${u}`))}if(a.status===401&&dC(t)&&a.headers?.get("X-MCPJam-Session")!=null){const u=Fl(),d=await zD();if(d&&d!==u){const h=ea(t,e,i),f=await fetch(t,h);return f.status===401&&f.headers.get("X-MCPJam-Session")&&window.dispatchEvent(new CustomEvent(rg,{detail:{restarted:!0}})),f}}if(a.status!==401||!r||!AD()||s||a.headers?.get("X-MCP-Auth-Required")==="oauth")return a;bh();const l=await By();if(!l)return n&&al("guest_refresh_failure",{location:"auth_fetch",surface:n,auth_mode:"guest",status:"failure",error_kind:"guest_refresh_unavailable"}),a;n&&al("guest_refresh_success",{location:"auth_fetch",surface:n,auth_mode:"guest",status:"success"});const c=ea(t,e,`Bearer ${l}`);return fetch(t,c)}function ZD(t){if(!t||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}var e1=t=>{switch(t){case"success":return s1;case"info":return i1;case"warning":return r1;case"error":return o1;default:return null}},t1=Array(12).fill(0),n1=({visible:t,className:e})=>g.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},g.createElement("div",{className:"sonner-spinner"},t1.map((n,s)=>g.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),s1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),r1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),i1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),o1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},g.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),a1=g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},g.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),l1=()=>{const[t,e]=g.useState(document.hidden);return g.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),t},c1=1,u1=100,JB=t=>{var e;return typeof t?.id=="number"||(t==null||(e=t.id)==null?void 0:e.length)>0?t.id:c1++},d1=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(e=>t(e)),()=>{const e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-u1;t<=0||(this.toasts=this.toasts.filter(e=>t>0&&this.dismissedToasts.has(e.id)?(this.dismissedToasts.delete(e.id),t--,!1):!0))},this.create=t=>{const{message:e,...n}=t,s=JB(t),r=this.pendingDismissals.get(s);r!==void 0&&(cancelAnimationFrame(r),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const i=this.dismissedToasts.has(s),o=t.dismissible===void 0?!0:t.dismissible;return i&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(a=>a.id!==s)),!i&&this.toasts.find(a=>a.id===s)?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:e}),{...a,...t,id:s,dismissible:o,title:e}):a):this.addToast({title:e,...n,dismissible:o,id:s}),s},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(n=>{this.dismissedToasts.add(n.id),this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const e=this.pendingDismissals.get(t);return e!==void 0&&cancelAnimationFrame(e),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(n=>n({id:t,dismiss:!0}))})),t},this.message=(t,e)=>this.create({...e,message:t,type:void 0}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let r=n!==void 0,i;const o=s.then(async l=>{if(i=["resolve",l],g.isValidElement(l))r=!1,this.create({id:n,type:"default",message:l});else if(B1(l)&&!l.ok){r=!1;const c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}else if(l instanceof Error){r=!1;const c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}else if(e.success!==void 0){r=!1;const c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"success",description:u,...d})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){r=!1;const c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description,d=typeof c=="object"&&!g.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}}).finally(()=>{r&&(this.dismiss(n),n=void 0),e.finally==null||e.finally.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{const n=JB(e);return this.create({...e,jsx:t(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Pt=new d1,h1=(t,e)=>Pt.message(t,e),B1=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",f1=h1,p1=()=>Pt.toasts,m1=()=>Pt.getActiveToasts(),Su=Object.assign(f1,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:p1,getToasts:m1});ZD("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ta(t){return t.label!==void 0}var g1=3,C1="24px",v1="16px",WB=4e3,E1=356,b1=14,S1=45,y1=200;function _n(...t){return t.filter(Boolean).join(" ")}function x1(t){const[e,n]=t.split("-"),s=[];return e&&s.push(e),n&&s.push(n),s}var D1=t=>{var e,n,s,r,i,o,a,l,c;const{invert:u,toast:d,unstyled:h,interacting:f,setHeights:p,visibleToasts:m,heights:v,index:E,toasts:S,expanded:A,removeToast:N,defaultRichColors:k,closeButton:R,style:T,cancelButtonStyle:Q,actionButtonStyle:P,className:V="",descriptionClassName:U="",duration:j,position:oe,gap:ne,expandByDefault:H,classNames:z,icons:ae,closeButtonAriaLabel:ue="Close toast"}=t,[le,Ce]=g.useState(null),[ie,Ie]=g.useState(null),[J,$]=g.useState(!1),[Z,Y]=g.useState(!1),[ee,pe]=g.useState(!1),[ce,Ne]=g.useState(!1),[ke,Me]=g.useState(!1),[nt,gt]=g.useState(0),[dt,lt]=g.useState(0),Ct=g.useRef(d.duration||j||WB),ht=g.useRef(null),Ye=g.useRef(null),un=E===0,Bt=E+1<=m,Fe=d.type,de=Fe??"default",Re=d.dismissible!==!1,Ge=d.className||"",Fs=d.descriptionClassName||"",Xe=g.useMemo(()=>v.findIndex(W=>W.toastId===d.id)||0,[v,d.id]),hs=g.useMemo(()=>{var W;return(W=d.closeButton)!=null?W:R},[d.closeButton,R]),St=g.useMemo(()=>d.duration||j||WB,[d.duration,j]),On=g.useRef(0),Pe=g.useRef(0),Bs=g.useRef(0),dn=g.useRef(null),[hn,ze]=oe.split("-"),mr=g.useMemo(()=>v.reduce((W,He,je)=>je>=Xe?W:W+He.height,0),[v,Xe]),Ps=l1(),Vt=g.useMemo(()=>{var W;return(W=t.swipeDirections)!=null?W:x1(oe)},[t.swipeDirections,oe]),mc=d.invert||u,Hs=Fe==="loading";Pe.current=g.useMemo(()=>Xe*ne+mr,[Xe,mr]),g.useEffect(()=>{Ct.current=St},[St]),g.useEffect(()=>{$(!0)},[]),g.useEffect(()=>{const W=Ye.current;if(W){const He=W.getBoundingClientRect().height;return lt(He),p(je=>[{toastId:d.id,height:He,position:d.position},...je]),()=>p(je=>je.filter(st=>st.toastId!==d.id))}},[p,d.id]),g.useLayoutEffect(()=>{if(!J)return;const W=Ye.current,He=W.style.height;W.style.height="auto";const je=W.getBoundingClientRect().height;W.style.height=He,lt(je),p(st=>st.find(Le=>Le.toastId===d.id)?st.map(Le=>Le.toastId===d.id?{...Le,height:je}:Le):[{toastId:d.id,height:je,position:d.position},...st])},[J,d.title,d.description,p,d.id,d.jsx,d.action,d.cancel]);const Mn=g.useCallback(()=>{Y(!0),gt(Pe.current),p(W=>W.filter(He=>He.toastId!==d.id)),setTimeout(()=>{N(d)},y1)},[d,N,p,Pe]);g.useEffect(()=>{if(d.promise&&Fe==="loading"||d.duration===1/0||d.type==="loading")return;let W;return A||f||Ps?(()=>{if(Bs.current<On.current){const st=new Date().getTime()-On.current;Ct.current=Ct.current-st}Bs.current=new Date().getTime()})():Ct.current!==1/0&&(On.current=new Date().getTime(),W=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Mn()},Ct.current)),()=>clearTimeout(W)},[A,f,d,Fe,Ps,Mn]),g.useEffect(()=>{d.delete&&(Mn(),d.onDismiss==null||d.onDismiss.call(d,d))},[Mn,d.delete]);function M(){var W;if(ae?.loading){var He;return g.createElement("div",{className:_n(z?.loader,d==null||(He=d.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":Fe==="loading"},ae.loading)}return g.createElement(n1,{className:_n(z?.loader,d==null||(W=d.classNames)==null?void 0:W.loader),visible:Fe==="loading"})}const be=d.icon||ae?.[Fe]||e1(Fe);var De,We;return g.createElement("li",{tabIndex:0,ref:Ye,className:_n(V,Ge,z?.toast,d==null||(e=d.classNames)==null?void 0:e.toast,z?.[de],d==null||(n=d.classNames)==null?void 0:n[de]),"data-sonner-toast":"","data-rich-colors":(De=d.richColors)!=null?De:k,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":J,"data-promise":!!d.promise,"data-swiped":ke,"data-removed":Z,"data-visible":Bt,"data-y-position":hn,"data-x-position":ze,"data-index":E,"data-front":un,"data-swiping":ee,"data-dismissible":Re,"data-type":Fe,"data-invert":mc,"data-swipe-out":ce,"data-swipe-direction":ie,"data-expanded":!!(A||H&&J),"data-testid":d.testId,style:{"--index":E,"--toasts-before":E,"--z-index":S.length-E,"--offset":`${Z?nt:Pe.current}px`,"--initial-height":H?"auto":`${dt}px`,...T,...d.style},onDragEnd:()=>{pe(!1),Ce(null),dn.current=null},onPointerDown:W=>{W.button!==2&&(Hs||!Re||(ht.current=new Date,gt(Pe.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(pe(!0),dn.current={x:W.clientX,y:W.clientY})))},onPointerUp:()=>{var W,He,je;if(ce||!Re)return;dn.current=null;const st=Number(((W=Ye.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Le=Number(((He=Ye.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((je=ht.current)==null?void 0:je.getTime()),et=le==="x"?st:Le,Ln=Math.abs(et)/ft;if((le==="x"?Vt.includes(st>0?"right":"left"):Vt.includes(Le>0?"bottom":"top"))&&(Math.abs(et)>=S1||Ln>.11)){gt(Pe.current),d.onDismiss==null||d.onDismiss.call(d,d),Ie(le==="x"?st>0?"right":"left":Le>0?"down":"up"),Mn(),Ne(!0);return}else{var ct,fs;(ct=Ye.current)==null||ct.style.setProperty("--swipe-amount-x","0px"),(fs=Ye.current)==null||fs.style.setProperty("--swipe-amount-y","0px")}Me(!1),pe(!1),Ce(null)},onPointerMove:W=>{var He,je,st;if(!dn.current||!Re||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;const Le=W.clientY-dn.current.y,ft=W.clientX-dn.current.x;!le&&(Math.abs(ft)>1||Math.abs(Le)>1)&&Ce(Math.abs(ft)>Math.abs(Le)?"x":"y");let et={x:0,y:0};const Ln=ct=>1/(1.5+Math.abs(ct)/20);if(le==="y"){if(Vt.includes("top")||Vt.includes("bottom"))if(Vt.includes("top")&&Le<0||Vt.includes("bottom")&&Le>0)et.y=Le;else{const ct=Le*Ln(Le);et.y=Math.abs(ct)<Math.abs(Le)?ct:Le}}else if(le==="x"&&(Vt.includes("left")||Vt.includes("right")))if(Vt.includes("left")&&ft<0||Vt.includes("right")&&ft>0)et.x=ft;else{const ct=ft*Ln(ft);et.x=Math.abs(ct)<Math.abs(ft)?ct:ft}(Math.abs(et.x)>0||Math.abs(et.y)>0)&&Me(!0),(je=Ye.current)==null||je.style.setProperty("--swipe-amount-x",`${et.x}px`),(st=Ye.current)==null||st.style.setProperty("--swipe-amount-y",`${et.y}px`)}},hs&&!d.jsx&&Fe!=="loading"?g.createElement("button",{"aria-label":ue,"data-disabled":Hs,"data-close-button":!0,onClick:Hs||!Re?()=>{}:()=>{Mn(),d.onDismiss==null||d.onDismiss.call(d,d)},className:_n(z?.closeButton,d==null||(s=d.classNames)==null?void 0:s.closeButton)},(We=ae?.close)!=null?We:a1):null,(Fe||d.icon||d.promise)&&d.icon!==null&&(ae?.[Fe]!==null||d.icon)?g.createElement("div",{"data-icon":"",className:_n(z?.icon,d==null||(r=d.classNames)==null?void 0:r.icon)},Fe==="loading"?d.icon||M():d.promise?M():null,Fe!=="loading"?be:null):null,g.createElement("div",{"data-content":"",className:_n(z?.content,d==null||(i=d.classNames)==null?void 0:i.content)},g.createElement("div",{"data-title":"",className:_n(z?.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?g.createElement("div",{"data-description":"",className:_n(U,Fs,z?.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),g.isValidElement(d.cancel)?d.cancel:d.cancel&&ta(d.cancel)?g.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||Q,onClick:W=>{ta(d.cancel)&&Re&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,W),Mn())},className:_n(z?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,g.isValidElement(d.action)?d.action:d.action&&ta(d.action)?g.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||P,onClick:W=>{ta(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,W),!W.defaultPrevented&&Mn())},className:_n(z?.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function KB(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function w1(t,e){const n={};return[t,e].forEach((s,r)=>{const i=r===1,o=i?"--mobile-offset":"--offset",a=i?v1:C1;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof s=="number"||typeof s=="string"?l(s):typeof s=="object"?["top","right","bottom","left"].forEach(c=>{s[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof s[c]=="number"?`${s[c]}px`:s[c]}):l(a)}),n}var Pj=g.forwardRef(function(e,n){const{id:s,invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:d,theme:h="light",richColors:f,duration:p,style:m,visibleToasts:v=g1,toastOptions:E,dir:S=KB(),gap:A=b1,icons:N,customAriaLabel:k,containerAriaLabel:R="Notifications"}=e,[T,Q]=g.useState([]),P=g.useMemo(()=>s?T.filter($=>$.toasterId===s):T.filter($=>!$.toasterId),[T,s]),V=g.useMemo(()=>Array.from(new Set([i].concat(P.filter($=>$.position).map($=>$.position)))),[P,i]),[U,j]=g.useState([]),[oe,ne]=g.useState(!1),[H,z]=g.useState(!1),[ae,ue]=g.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),le=g.useRef(null),Ce=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),ie=g.useRef(null),Ie=g.useRef(!1),J=g.useCallback($=>{Q(Z=>{var Y;return(Y=Z.find(ee=>ee.id===$.id))!=null&&Y.delete||Pt.dismiss($.id),Z.filter(({id:ee})=>ee!==$.id)})},[]);return g.useEffect(()=>Pt.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{Q(Z=>Z.map(Y=>Y.id===$.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{gh.flushSync(()=>{Q(Z=>{const Y=Z.findIndex(ee=>ee.id===$.id);return Y!==-1?[...Z.slice(0,Y),{...Z[Y],...$},...Z.slice(Y+1)]:[$,...Z]})})})}),[]),g.useEffect(()=>{if(h!=="system"){ue(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ue("dark"):ue("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:Z})=>{ue(Z?"dark":"light")})}catch{$.addListener(({matches:Y})=>{try{ue(Y?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),g.useEffect(()=>{T.length<=1&&ne(!1)},[T]),g.useEffect(()=>{const $=Z=>{var Y;if(o.length>0&&o.every(pe=>Z[pe]||Z.code===pe)){var ee;ne(!0),(ee=le.current)==null||ee.focus()}Z.code==="Escape"&&(document.activeElement===le.current||(Y=le.current)!=null&&Y.contains(document.activeElement))&&ne(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[o]),g.useEffect(()=>{if(le.current)return()=>{ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null,Ie.current=!1)}},[le.current]),g.createElement("section",{ref:n,"aria-label":k??`${R} ${Ce}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},V.map(($,Z)=>{var Y;const[ee,pe]=$.split("-");return P.length?g.createElement("ol",{key:$,dir:S==="auto"?KB():S,tabIndex:-1,ref:le,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ae,"data-y-position":ee,"data-x-position":pe,style:{"--front-toast-height":`${((Y=U[0])==null?void 0:Y.height)||0}px`,"--width":`${E1}px`,"--gap":`${A}px`,...m,...w1(u,d)},onBlur:ce=>{Ie.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(Ie.current=!1,ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||Ie.current||(Ie.current=!0,ie.current=ce.relatedTarget)},onMouseEnter:()=>ne(!0),onMouseMove:()=>ne(!0),onMouseLeave:()=>{H||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},P.filter(ce=>!ce.position&&Z===0||ce.position===$).map((ce,Ne)=>{var ke,Me;return g.createElement(D1,{key:ce.id,icons:N,index:Ne,toast:ce,defaultRichColors:f,duration:(ke=E?.duration)!=null?ke:p,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Me=E?.closeButton)!=null?Me:l,interacting:H,position:$,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:J,toasts:P.filter(nt=>nt.position==ce.position),heights:U.filter(nt=>nt.position==ce.position),setHeights:j,expandByDefault:a,gap:A,expanded:oe,swipeDirections:e.swipeDirections})})):null}))});function A1(t,e){return t?.slug==="sdk/protocol_version_pin_unsupported"?!0:typeof e=="string"&&I1.test(e)}var I1=/which this client is pinned to/i;function T1({text:t,copyText:e}){const[n,s]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{if(!n)return;const r=setTimeout(()=>s(!1),1500);return()=>clearTimeout(r)},[n]),(0,B.jsxs)("div",{className:"relative min-h-5 pr-7",children:[(0,B.jsx)("span",{className:"whitespace-pre-wrap break-words",children:t}),(0,B.jsx)("button",{type:"button","aria-label":"Copy error message",title:"Copy error message",onClick:r=>{r.stopPropagation(),ai(e??t).then(i=>{i&&s(!0)})},className:"absolute right-2 top-0 z-10 flex h-5 w-5 items-center justify-center rounded-full border border-border bg-popover text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover/toast:opacity-100",children:n?(0,B.jsx)(ar,{className:"h-3 w-3 text-green-500"}):(0,B.jsx)(As,{className:"h-3 w-3"})})]})}var k1=8e3;function R1(t,e){if(!e?.action&&typeof t=="string"&&A1(void 0,t))return{action:{label:"Change protocol version",onClick:()=>{al("change_protocol_version_clicked",{location:"toast_fallback",has_host_id:!1}),by(xy.hosts)}}}}function N1(t,e){const{text:n,requestId:s}=zy(t),r=e?.description,i=typeof r=="string"&&r.trim()!==""?r:void 0;if(!s)return{title:t,description:i};if(r!=null&&typeof r!="string")return{title:t,description:void 0};const o=`Reference ${s}`;return{title:n||t,description:i?`${i}
2
2
  ${o}`:o}}var O1=(t,e)=>{const n=typeof t=="string"?N1(t,e):null;return Su.error(n?(0,B.jsx)(T1,{text:n.title,copyText:n.description?`${n.title}: ${n.description}`:void 0}):t,{duration:k1,...e,...n?.description?{description:n.description}:{},...R1(t,e)})},M1=Object.assign((...t)=>Su(...t),Su,{error:O1}),L1=8192,_1=8192,Ec=64,F1=new Set(["_truncated","bytes","limitBytes","reason","head"]);function ys(t,e){let n=0,s=0;for(let r=0;r<t.length&&!(n>e);r++){const i=t.charCodeAt(r);if(i<128){n+=1,i===34||i===92?s+=1:i<32&&(s+=i===8||i===9||i===10||i===12||i===13?1:5);continue}if(i<2048){n+=2;continue}if(i>=55296&&i<=56319){const o=t.charCodeAt(r+1);if(o>=56320&&o<=57343){n+=4,r++;continue}}if(i>=55296&&i<=57343){n+=3,s+=3;continue}n+=3}return{utf8:n,json:n+s+2}}function P1(t){const e=t.charCodeAt(8191);return t.slice(0,e>=55296&&e<=56319?8191:_1)}var H1=8,BC=5e4;function fC(t,e){let n=0,s=0;const r=[t];for(;r.length>0;){if(n>e)return{bytes:n,exceeded:!0};if(++s>BC)return{bytes:n,exceeded:!0};const i=r.pop();if(typeof i=="string"){n+=ys(i,e-n).json;continue}if(i===null||typeof i!="object"){n+=5;continue}if(Array.isArray(i)){n+=2+i.length;for(const o of i){if(n>e)return{bytes:n,exceeded:!0};r.push(o)}continue}n+=2;for(const o in i)if(Object.hasOwn(i,o)){if(n+=ys(o,e-n).json+2,n>e)return{bytes:n,exceeded:!0};r.push(i[o])}}return{bytes:n,exceeded:n>e}}function G1(t,e){const n={_truncated:!0,limitBytes:e};if(typeof t!="object"||t===null||Array.isArray(t))return n;let s=0,r=0;const i=new Set,o=d=>d===void 0?{_truncated:!0}:{_truncated:!0,bytes:d},a=(d,h)=>{if(++r>BC)return o();if(typeof d=="string"){const p=ys(d,e-s);if(d.length<=L1&&s+p.json<=e)return s+=p.json,d;const m=ys(d,Number.POSITIVE_INFINITY).utf8,v=P1(d);if(v.length<d.length){const E=ys(v,Number.POSITIVE_INFINITY).json;if(s+E+Ec<=e)return s+=E+Ec,{_truncated:!0,bytes:m,head:v}}return s+=Ec,o(m)}if(d===null||typeof d!="object")return s+=5,d;if(h>=H1||i.has(d))return o();if(i.add(d),Array.isArray(d)){s+=2;const p=[];for(const m of d){if(s+=1,s>e)return i.delete(d),o();p.push(a(m,h+1))}return i.delete(d),p}s+=2;const f={};for(const p in d)if(Object.hasOwn(d,p)){if(s+=ys(p,e-s).json+2,s>e)return i.delete(d),o();f[p]=a(d[p],h+1)}return i.delete(d),f},l=a(t,0),c={};if(!j1(l)&&typeof l=="object"&&l!==null)for(const[d,h]of Object.entries(l))F1.has(d)||(c[d]=h);const u={...c,...n};return fC(u,e).exceeded?n:u}function j1(t){return typeof t=="object"&&t!==null&&t._truncated===!0}function bc(t){return t<1024?`${t} B`:t<1048576?`${Math.round(t/1024)} KB`:`${(t/1048576).toFixed(1)} MB`}function Hj(t){if(t.reason)return`Payload not recorded: ${t.reason}.`;const e=typeof t.limitBytes=="number"?`over the ${bc(t.limitBytes)} log limit`:"over the log size limit",n=typeof t.bytes=="number"?` It was ${bc(t.bytes)}.`:"";return typeof t.head=="string"?`Payload truncated — ${e}.${n} Showing the first ${bc(ys(t.head,Number.POSITIVE_INFINITY).utf8)}.`:`Payload not recorded — ${e}.${n}`}function pC(t){try{return new URL(t).pathname}catch{return t}}function U1(t){return typeof t=="string"&&t.startsWith("Automatic resolved to ")}var yu=1e3,Sc=1048576,mC=8388608,gC=new WeakMap;function V1(t){const e=t.length>yu?t.slice(0,yu):t;let n=0;for(let s=0;s<e.length;s++)if(n+=gC.get(e[s])??0,n>mC&&s>0)return e.slice(0,s);return e}var Kr=Wy(t=>({items:[],mcpServerItems:[],addLog:e=>{const n={...e,id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,timestamp:new Date().toISOString()};t(s=>({items:[n,...s.items].slice(0,yu)}))},addMcpServerLog:e=>{const n={...e,id:e.id??`${e.timestamp}-${Math.random().toString(36).slice(2)}`};gC.set(n,fC(n.payload,mC).bytes),t(s=>({mcpServerItems:V1(s.mcpServerItems.some(r=>r.id===n.id)?s.mcpServerItems.map(r=>r.id===n.id?n:r):[n,...s.mcpServerItems])}))},clear:()=>t({items:[],mcpServerItems:[]})}));function CC(t){return typeof t.eventId=="string"&&t.eventId.length>0?t.eventId:void 0}function Gj(t){if(!Array.isArray(t)||t.length===0)return;const e=Kr.getState();t.forEach(n=>{const s=CC(n);e.addMcpServerLog({...s?{id:s}:{},serverId:n.serverId,serverName:n.serverName,direction:n.direction.toUpperCase(),method:hg(n.message),timestamp:n.timestamp,payload:n.message})})}function jj(t){if(!Array.isArray(t)||t.length===0)return;const e=Kr.getState();t.forEach(n=>{const s=CC(n);e.addMcpServerLog({...s?{id:s}:{},serverId:n.serverId,serverName:n.serverName,direction:"HTTP",method:`${n.exchange.request.method} ${pC(n.exchange.request.url)}`,timestamp:n.timestamp,payload:n.exchange,kind:"http"})})}function Uj(t){const{serverId:e,serverName:n,trace:s}=t;if(!s||!Array.isArray(s.steps)||s.steps.length===0)return;const r=Kr.getState();s.steps.forEach(i=>{const o=new Date(i.completedAt??i.startedAt).toISOString();U1(i.message)&&r.addMcpServerLog({id:`oauth:${e}:${s.source}:automatic_resolution:${i.startedAt}`,serverId:e,serverName:n,direction:"OAUTH",method:"Automatic Resolution",timestamp:o,payload:{source:s.source,step:"automatic_resolution",title:"Automatic Resolution",status:i.status,message:i.message,details:i.details,relatedStep:i.step},kind:"oauth",oauthStatus:i.status,oauthSource:s.source,oauthRecovered:i.recovered===!0}),r.addMcpServerLog({id:`oauth:${e}:${s.source}:${i.step}:${i.startedAt}`,serverId:e,serverName:n,direction:"OAUTH",method:i.title,timestamp:o,payload:{source:s.source,step:i.step,title:i.title,status:i.status,message:i.message,error:i.error,details:i.details,recovered:i.recovered,recoveredAt:i.recoveredAt,recoveryMessage:i.recoveryMessage,httpHistory:s.httpHistory.filter(a=>a.step===i.step)},kind:"oauth",oauthStatus:i.status,oauthSource:s.source,oauthRecovered:i.recovered===!0})})}var qn=null,pi=0;function Vj(){if(pi++,!qn){const t=new URLSearchParams;t.set("replay","3"),t.set("_t",Date.now().toString()),qn=new EventSource(QD(`/api/mcp/servers/rpc/stream?${t.toString()}`)),qn.onmessage=e=>{try{const n=JSON.parse(e.data);if(!n)return;const s=typeof n.eventId=="string"&&n.eventId.length>0?n.eventId:void 0;if(n.type==="http"){if(!n.exchange)return;const l=n.exchange;Kr.getState().addMcpServerLog({...s?{id:s}:{},serverId:typeof n.serverId=="string"?n.serverId:"unknown",direction:"HTTP",method:`${l.request.method} ${pC(l.request.url)}`,timestamp:n.timestamp??new Date().toISOString(),payload:l,kind:"http"});return}if(n.type!=="rpc")return;const{serverId:r,direction:i,message:o,timestamp:a}=n;Kr.getState().addMcpServerLog({...s?{id:s}:{},serverId:typeof r=="string"?r:"unknown",direction:typeof i=="string"?i.toUpperCase():"",method:hg(o),timestamp:a??new Date().toISOString(),payload:ys(e.data,Sc).utf8>Sc?G1(o,Sc):o})}catch{}},qn.onerror=()=>{qn?.close(),qn=null,pi=0}}return()=>{pi--,pi<=0&&qn&&(qn.close(),qn=null,pi=0)}}var z1=Sy("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",inverse:"border-transparent bg-popover text-popover-foreground"}},defaultVariants:{variant:"default"}});function lo({className:t,variant:e,asChild:n=!1,...s}){const r=n?Ey:"span";return(0,B.jsx)(r,{"data-slot":"badge",className:ge(z1({variant:e}),t),...s})}var zj=["role","severity"];function $j(t){const{role:e,severity:n,evaluator:s,...r}=t;return r}function Jj(t){return t?.role==="advisory"?"advisory":"gating"}function vC(t){return t==="gating"||t==="required"}function $1(t){if(!t||typeof t!="object"||t.role!=="required")return t;const{role:e,...n}=t;return n}function Wj(t){return Array.isArray(t)?t.map($1):void 0}function Kj(t){return t?.severity==="warn"?"warn":void 0}var _a={toolCallOrder:"ignore",maxExtraToolCalls:null,argumentMatching:"partial"};function qj(t,e,n){const s={..._a};for(const r of[t,e,n])r&&(r.toolCallOrder!==void 0&&(s.toolCallOrder=r.toolCallOrder),r.argumentMatching!==void 0&&(s.argumentMatching=r.argumentMatching),r.maxExtraToolCalls!==void 0?s.maxExtraToolCalls=r.maxExtraToolCalls:r.allowExtraToolCalls!==void 0&&(s.maxExtraToolCalls=r.allowExtraToolCalls?null:0));return J1(s),s}function J1(t){if(t.toolCallOrder!==void 0&&!["ignore","strict","superset"].includes(t.toolCallOrder))throw new Error(`Invalid toolCallOrder: ${String(t.toolCallOrder)}`);if(t.argumentMatching!==void 0&&!["partial","exact","ignore"].includes(t.argumentMatching))throw new Error(`Invalid argumentMatching: ${String(t.argumentMatching)}`);bC(t.maxExtraToolCalls)}function W1(t,e){if(typeof t!="string")return null;switch(t.trim().toLowerCase()){case"any":return e!==void 0;case"string":return typeof e=="string";case"number":return typeof e=="number";case"boolean":return typeof e=="boolean";case"object":return e!==null&&typeof e=="object"&&!Array.isArray(e);case"array":return Array.isArray(e);case"null":return e===null;default:return null}}function co(t){return t===null||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(co).join(",")}]`:`{${Object.keys(t).sort().map(e=>`${JSON.stringify(e)}:${co(t[e])}`).join(",")}}`}function EC(t,e){return co(t)===co(e)}function K1(t){const e=t.map(s=>`${JSON.stringify(s?.toolName)}:${co(s?.arguments??{})}`),n=[];return t.forEach((s,r)=>{if(s?.failed!==!0)return;const i=e.indexOf(e[r],r+1);i!==-1&&n.push({toolName:s.toolName,arguments:s.arguments??{},actualIndex:r,retriedByIndex:i})}),n}function Yj(t,e){const n=new Set;for(const s of e)typeof s?.toolCallId=="string"&&s.toolCallId.length>0&&n.add(s.toolCallId);return n.size===0?[...t]:t.map(s=>typeof s.toolCallId=="string"&&n.has(s.toolCallId)?{...s,failed:!0}:s)}function q1(t,e){for(const[n,s]of Object.entries(t)){const r=W1(s,e[n]);if(r!==null){if(!r)return!1;continue}if(!EC(e[n],s))return!1}return!0}function Y1(t,e){return EC(t,e)}function X1(t,e,n){return n==="ignore"?!0:n==="partial"?Object.keys(t).length===0?!0:q1(t,e):Y1(t,e)}function yc(t,e,n){return t.toolName!==e.toolName?!1:X1(t.arguments||{},e.arguments||{},n)}function Fa(t,e){return typeof t=="function"?t(e):t}function Q1(t,e,n,s){const r=new Map;if(n==="strict"){const o=Math.min(t.length,e.length);for(let a=0;a<o;a++){const l=Fa(s,a);yc(t[a],e[a],l)&&r.set(a,a)}return{expectedToActual:r}}if(n==="superset"){let o=0;const a=new Array(t.length);for(let l=0;l<t.length;l++){a[l]=o;const c=Fa(s,l);for(;o<e.length;){if(yc(t[l],e[o],c)){r.set(l,o),o++;break}o++}if(o>=e.length){for(let u=l+1;u<t.length;u++)a[u]=o;break}}return{expectedToActual:r,supersetCursorByExpected:a}}const i=new Set;for(let o=0;o<t.length;o++){const a=Fa(s,o);for(let l=0;l<e.length;l++)if(!i.has(l)&&yc(t[o],e[l],a)){r.set(o,l),i.add(l);break}}return{expectedToActual:r}}function Z1(t,e,n,s){const{expectedToActual:r,supersetCursorByExpected:i}=Q1(t,e,n,s),o=new Set(r.keys()),a=new Set(r.values()),l=[];for(let c=0;c<t.length;c++){if(o.has(c))continue;const u=t[c];let d=0,h=e.length;n==="strict"?(d=c,h=Math.min(c+1,e.length)):n==="superset"&&i&&(d=Math.min(i[c]??0,e.length));for(let f=d;f<h;f++)if(!a.has(f)&&e[f].toolName===u.toolName){o.add(c),a.add(f),r.set(c,f),Fa(s,c)!=="ignore"&&l.push(c);break}}return{expectedToActual:r,argumentMismatchExpected:l}}function bC(t){if(t!=null&&(!Number.isInteger(t)||t<0))throw new Error(`Invalid maxExtraToolCalls: ${t}. Must be null (unlimited) or a non-negative integer.`)}function SC(t,e,n){const s=Array.isArray(t)?t:[],r=Array.isArray(e)?e:[];let i;n?.maxExtraToolCalls!==void 0?i=n.maxExtraToolCalls:n?.allowExtraToolCalls!==void 0?i=n.allowExtraToolCalls?null:0:i=_a.maxExtraToolCalls,bC(i);const o=n?.toolCallOrder??_a.toolCallOrder,a=n?.argumentMatching??_a.argumentMatching;if(n?.isNegativeTest)return{missing:[],extra:r,outOfOrder:[],argumentMismatches:[],retries:[],passed:r.length===0};if(r.length===0)return{missing:s,extra:[],outOfOrder:[],argumentMismatches:[],retries:[],passed:!1};const l=K1(r),c=new Set(l.map(N=>N.actualIndex)),u=c.size===0?r:r.filter((N,k)=>!c.has(k)),{expectedToActual:d,argumentMismatchExpected:h}=Z1(s,u,o,a),f=new Set(d.keys()),p=new Set(d.values()),m=h.map(N=>({toolName:s[N].toolName,expectedArgs:s[N].arguments||{},actualArgs:u[d.get(N)].arguments||{}})),v=[],E=s.filter((N,k)=>!f.has(k)),S=u.filter((N,k)=>!p.has(k)),A=i!==null&&S.length>i;return{missing:E,extra:S,outOfOrder:v,argumentMismatches:m,retries:l,passed:E.length===0&&m.length===0&&v.length===0&&!A}}var F=class Ys{static FOLD_CASE=1;static LITERAL=2;static CLASS_NL=4;static DOT_NL=8;static ONE_LINE=16;static NON_GREEDY=32;static PERL_X=64;static UNICODE_GROUPS=128;static WAS_DOLLAR=256;static LOOKBEHIND=512;static MATCH_NL=Ys.CLASS_NL|Ys.DOT_NL;static PERL=Ys.CLASS_NL|Ys.ONE_LINE|Ys.PERL_X|Ys.UNICODE_GROUPS;static POSIX=0;static UNANCHORED=0;static ANCHOR_START=1;static ANCHOR_BOTH=2},gn={CASE_INSENSITIVE:1,DOTALL:2,MULTILINE:4,DISABLE_UNICODE_GROUPS:8,LONGEST_MATCH:16,LOOKBEHINDS:512},uo=128,xu=new Int32Array(uo),Du=new Int32Array(uo),na=65535;for(let t=0;t<uo;t++)t>=97&&t<=122?xu[t]=t-32:xu[t]=t,t>=65&&t<=90?Du[t]=t+32:Du[t]=t;var _=class{static CODES=new Map([["\x07",7],["\b",8],[" ",9],[`
3
3
  `,10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["'",39],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["`",96],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]);static toUpperCase(t){if(t<uo)return xu[t];const e=String.fromCodePoint(t).toUpperCase(),n=e.codePointAt(0)>na?2:1;if(e.length>n)return t;const s=String.fromCodePoint(e.codePointAt(0)).toLowerCase(),r=s.codePointAt(0)>na?2:1;return s.length>r||s.codePointAt(0)!==t?t:e.codePointAt(0)}static toLowerCase(t){if(t<uo)return Du[t];const e=String.fromCodePoint(t).toLowerCase(),n=e.codePointAt(0)>na?2:1;if(e.length>n)return t;const s=String.fromCodePoint(e.codePointAt(0)).toUpperCase(),r=s.codePointAt(0)>na?2:1;return s.length>r||s.codePointAt(0)!==t?t:e.codePointAt(0)}},y=class{constructor(t,e=!1){this.data=t,this.isStride1=e,this.SIZE=e?2:3}getLo(t){return this.data[t*this.SIZE]}getHi(t){return this.data[t*this.SIZE+1]}getStride(t){return this.isStride1?1:this.data[t*this.SIZE+2]}get length(){return this.data.length/this.SIZE}},yC=new Uint8Array(256);for(let t=0,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-";t<64;t++)yC[e.charCodeAt(t)]=t;var xC=t=>{const e=[];let n=0,s=0;for(let r=0;r<t.length;r++){let i=yC[t.charCodeAt(r)];n|=(i&31)<<s,(i&32)===0?(e.push(n),n=0,s=0):s+=5}return e},x=(t,e)=>{const n=xC(t),s=e?n.length/2:n.length/3,r=new Uint32Array(s*3);let i=0,o=0;for(let a=0;a<s;a++)i+=n[o++],r[a*3]=i,i+=n[o++],r[a*3+1]=i,r[a*3+2]=e?1:n[o++];return r},ew=t=>{const e=xC(t),n=new Map;let s=0;for(let r=0;r<e.length;r+=2){s+=e[r];const i=e[r+1],o=i>>>1^-(i&1);n.set(s,s+o)}return n},sa=class{constructor(t){this.initializer=t,this.cache=new Map}has(t){return t in this.initializer}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.initializer[t],n=e?e():null;return this.cache.set(t,n),n}},Ft=class{static _CASE_ORBIT=null;static get CASE_ORBIT(){return this._CASE_ORBIT||(this._CASE_ORBIT=ew("rCgCIgCY+rQI4QiCuuBLgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCBgCB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BBBNBBnLDBEOBqDBB6HCBmQCC8HBB4CBBFBB-MCBuBmUmUBrCrCBspBspBBDB6vRBBmEiCiCBBBLqRqRBoJoJBnwTnwTovHDB",!1)),Uppercase:()=>new y(x("hCZBmDWBCGBiB2BCDOCDuBCBECEBBCCCBCCBBBDDBCBBCCBEBBCBBCECBCCDCCBCCBBBCCCBEEIJDCMCDQCDDDCCBC4BCIBBCBBDCCBCBCGCiJCCEJJHCCBBBCCCBCCBPBCIBkBDDBBBEWCGDDCBBDyBBxBgBCK2BCBMCD+CCDlBBq6ClBBCGGzW1CB0kCHHBpBBDCBhK0ECKgDCKHBJFBLHBJHBJFBMGCJHBpCDBNDBNDBNEBMDBnIFFECBDCBDEEBDBHGCBCBDDBLBBGbbBOBUzZzZBYBx5BvBBxBCCBBBDGCBCBCDDJCBCgDCJCCFuqeuqeCqBCUaCoEMCE8BCLECBICFCCDCCEUCBDBCEBCOCBCBCCCBQCZs5Vs5VBYBmmBnBBpEjBB9EKBCOBCGBCBBr3ByBB+EVB75CfBhsVfBhCYBoqZZBbZBbZBbCCBGDBDDBCBCHBbZBbBBCDBDHBCGBcBBCDBCEBCEEBFBcZBbZBbZBbZBbZBbZBfYBiBYBiBYBiBYBiBYBiB2pE2pEBgBBvgCZBHZBHZB",!1)),White_Space:()=>new y(x("JEBTlDlDbgvFgvFgsCKBeBBGwBwBh9DAB",!1))});static get Upper(){return this.CATEGORIES.get("Lu")}static SCRIPTS=new sa({Adlam:()=>new y(x("go6DrCFJFB",!0)),Ahom:()=>new y(x("g4lCaDOFW",!0)),Anatolian_Hieroglyphs:()=>new y(x("ggxCmS",!0)),Arabic:()=>new y(x("gwBEBCFBCNBCCBCfBCJBMZBCrDBChBBxCvBBxHhBBGqCBCcBxy8BtPBDvEBhBPBxDEBCmEBk7DeBkCFBJIBiBFBh43BDBCaBCBBCDDCJBCDBCCCHFFCECBBBCBBCDDCICBCCDDBCGBCDBCDBCCCBIBCQBGCBCEBCQB1BBB",!1)),Armenian:()=>new y(x("xpBlBDxBDCks9BE",!0)),Avestan:()=>new y(x("g4iC1BEG",!0)),Balinese:()=>new y(x("g4GsCCxB",!0)),Bamum:()=>new y(x("g1pB3CpowB4R",!0)),Bassa_Vah:()=>new y(x("w26CdDF",!0)),Batak:()=>new y(x("g+GzBJD",!0)),Bengali:()=>new y(x("gsCDBCHBDBBDVBCGBCEEBCBDIBDBBDDBJFFBCCBDBDYB",!1)),Beria_Erfe:()=>new y(x("g17CYDY",!0)),Bhaiksuki:()=>new y(x("ggnCICsBCNLc",!0)),Bopomofo:()=>new y(x("qXB6wLqBxDf",!0)),Brahmi:()=>new y(x("ggkCtCFjBKA",!0)),Braille:()=>new y(x("ggK-H",!0)),Buginese:()=>new y(x("gwGbDB",!0)),Buhid:()=>new y(x("g6FT",!0)),Canadian_Aboriginal:()=>new y(x("ggF-TxRlC7tgCP",!0)),Carian:()=>new y(x("g1gCwB",!0)),Caucasian_Albanian:()=>new y(x("wphCzBMA",!0)),Chakma:()=>new y(x("gokC0BCR",!0)),Cham:()=>new y(x("gwqB2BKNDJDD",!0)),Cherokee:()=>new y(x("g9E1CDFz7lBvC",!0)),Chorasmian:()=>new y(x("w9jCb",!0)),Common:()=>new y(x("AgCBbFBbuBBCOBCEBYgBgBiOmBBGEBDTB1DKKHCC+THHPEEhB9E9ElQiEiEB6mB6mB2MDBjJwvBwvBBBBoCBBsGBBCumBumBOIIBCBCFBCCBDmYmYBKBD2CBCKBEKBCOBShBB-BlBBCCBDFBCaBCQBqBCBF5UBXKBW-cBhIzTBDpEBhQ9CBzMUBCCCBXBQHBFDB8CBBE7C7CB0E0EBOBhBlBBKxBxBB+BBgBwCBwB5C5CBmFBhuG-BBhoWhBBnDCBmFJB1HhFhFsMPPBzuUzuUBxGxGBIBXiBBCSBCDB0ECCBeBbFBbKBLuBuBBhChCBFBCGBLEBjICBFsBBEIBxCMB0BsBBlHaBltuBDB96D8HBEzNBHWBQQBgDzDB9B1HBLmBBD9BBEQBJBBIdBF8BB2GTBNTBN2CBKYBoE0CBCmCBCBBDDDBDDBCBCLBCCCBFBCgCBCDBDHBCGBCbBCDBCEBCEEBFBCzKBDjJBDxBByjFjCBtC8BBjWrBBFjDBNOBDOBCOBCkBBLtFB5BZBCBBOrBBFIBIBBPFB7E4eBEQBEMBE5GBHLBFQQBKBF3BBJJBHnBBJdBDLBFBBPIBoB3KBJNBDMBEKBE4BBCFFBOBDLBFJBIyEBCmDBnghYffB+CB",!1)),Coptic:()=>new y(x("ifNxkKzDGG",!0)),Cuneiform:()=>new y(x("ggoC5cnDuDCEMjG",!0)),Cypriot:()=>new y(x("ggiCFBDCCBqBBCBBEDD",!1)),Cypro_Minoan:()=>new y(x("w8rCiD",!0)),Cyrillic:()=>new y(x("ggBkEBDoFBx6FKBhFtCtCojEfBhie-CBv8VBBhw4B9BBiBAB",!1)),Deseret:()=>new y(x("gghCvC",!0)),Devanagari:()=>new y(x("goCwCFODZh7nBfhwcJ",!0)),Dives_Akuru:()=>new y(x("gomCGBDDDBGBCBBCdBCBBDLBKJB",!1)),Dogra:()=>new y(x("ggmC7B",!0)),Duployan:()=>new y(x("ggvDqDGMEIIJDD",!0)),Egyptian_Hieroglyphs:()=>new y(x("ggsC1iBL68D",!0)),Elbasan:()=>new y(x("gohCnB",!0)),Elymaic:()=>new y(x("g-jCW",!0)),Ethiopic:()=>new y(x("gwEoCBCDBDGBCCCBCBDoBBCDBDgBBCDBDGBCCCBCBDOBC4BBCDBDiCBDfBEZBnvGWBKGBCGBCGBCGBCGBCGBCGBCGBjpfFBDFBDFBKGBCGBylvCGBCDBCBBCOB",!1)),Garay:()=>new y(x("gqjClBEcJB",!0)),Georgian:()=>new y(x("glElBBCGGDqBBCDBx8CqBBDCBhiElBBCGG",!1)),Glagolitic:()=>new y(x("ggL-Ch9sDGCQDGCBCE",!0)),Gothic:()=>new y(x("w5gCa",!0)),Grantha:()=>new y(x("g4kCDBCHBDBBDVBCGBCBBCEBDIBDBBDCBDHHGGBDGBEEB",!1)),Greek:()=>new y(x("wbDBCCBDDBCFFCCCBBBCCCBSBC+BBPPBnpGEBzBEBFEB1ChKhKBUBDFBDlBBDFBDHBCGCBdBD0BBCOBCNBDFBCSBDCBCIBoJ-xiB-xiB7uVuCBSgj0Bgj0BBkCB",!1)),Gujarati:()=>new y(x("h0CCBCIBCCBCVBCGBCBBCEBDJBCCBCCBDQQBCBDLBIGB",!1)),Gunjala_Gondi:()=>new y(x("grnCFCBCkBCBCFIJ",!0)),Gurmukhi:()=>new y(x("hwCCBCFBFBBDVBCGBCBBCBBCBBDCCBDBFBBDCBEIIBCBCIIBPB",!1)),Gurung_Khema:()=>new y(x("go4C5B",!0)),Han:()=>new y(x("g0LZBC4CBN1GBwBCCaIBPDBle-tGBhC-vUBhoWtLBDpDBpodBBNGBqgkB-2pBBhB9oEBDt0FBDwpHBQtTBjtC9QBjvBq6EBGppIB",!1)),Hangul:()=>new y(x("goE-HvxHBiI9CyDeiCei3dckUj9KNWFwBl9JeEFDFDFDC",!0)),Hanifi_Rohingya:()=>new y(x("gojCnBJJ",!0)),Hanunoo:()=>new y(x("g5FU",!0)),Hatran:()=>new y(x("gniCSCBGE",!0)),Hebrew:()=>new y(x("xsB2BBJaBFFBpp9BZBCEBCCCBCCBCCBIB",!1)),Hiragana:()=>new y(x("hiM1CBHCBi7-C+IBTeeBBBulQAB",!1)),Imperial_Aramaic:()=>new y(x("giiCVCI",!0)),Inherited:()=>new y(x("gYvDB2IBBlOKBbhXhXBCB8qEtBBDLBlPCBCMBCGBFHHEBBnG-BBtQBBjGgBB65DDBsDBBmrzBPBRNBwejHjH7iEl+uBl+uBBsBBDWBhRCBSHBDGBfDBz6rYvHB",!1)),Inscriptional_Pahlavi:()=>new y(x("g7iCSGH",!0)),Inscriptional_Parthian:()=>new y(x("g6iCVDH",!0)),Javanese:()=>new y(x("gsqBtCDJFB",!0)),Kaithi:()=>new y(x("gkkCiCLA",!0)),Kannada:()=>new y(x("gkDMCCCWCJCEDICCCDIBGCCDDJCC",!0)),Katakana:()=>new y(x("hlM5CBDCBxHPBxGuBBC3CBvgzBJBCsBBzisBDBCGBCBBCgJgJBBBzBPPBCB",!1)),Kawi:()=>new y(x("g4nCQCoBEc",!0)),Kayah_Li:()=>new y(x("goqBtBCA",!0)),Kharoshthi:()=>new y(x("gwiCDCBGHCCCcDCFJII",!0)),Khitan_Small_Script:()=>new y(x("k-7C84G84GB0OBqBAB",!1)),Khmer:()=>new y(x("g8F9CDJHJnPf",!0)),Khojki:()=>new y(x("gwkCRCuB",!0)),Khudawadi:()=>new y(x("w1kC6BGJ",!0)),Kirat_Rai:()=>new y(x("gq7C5B",!0)),Lao:()=>new y(x("h0DBBCCCBDBCXBCCCBVBDEBCCCBFBCJBDDB",!1)),Latin:()=>new y(x("hCZBHZBwBQQGWBCeBCgOBoBEB8wGlBBHwBBGDBGMBClCBiC-HByLOORMBuEBBHccSoBB42CfBj1elDBExCBVOBxZqBBCIBCDB38TGB7gBZBHZBmhCFBCpBBCIBm61BeBHFB",!1)),Lepcha:()=>new y(x("ggH3BEOEC",!0)),Limbu:()=>new y(x("goGeBCLBFLBFEEBKB",!1)),Linear_A:()=>new y(x("gwhC2JKVLH",!0)),Linear_B:()=>new y(x("gggCLCZCSCBCODNjB6D",!0)),Lisu:()=>new y(x("wmpBvBx1eA",!0)),Lycian:()=>new y(x("g0gCc",!0)),Lydian:()=>new y(x("gpiCZGA",!0)),Mahajani:()=>new y(x("wqkCmB",!0)),Makasar:()=>new y(x("g3nCY",!0)),Malayalam:()=>new y(x("goDMCCCyBCCCFFPDZ",!0)),Mandaic:()=>new y(x("giCbDA",!0)),Manichaean:()=>new y(x("g2iCmBFL",!0)),Marchen:()=>new y(x("wjnCfDVCN",!0)),Masaram_Gondi:()=>new y(x("gonCGBCBBCrBBECCBCCBHBJJB",!1)),Medefaidrin:()=>new y(x("gy7C6C",!0)),Meetei_Mayek:()=>new y(x("g3qBWqGtBDJ",!0)),Mende_Kikakui:()=>new y(x("gg6DkGDP",!0)),Meroitic_Cursive:()=>new y(x("gtiCXFTDtB",!0)),Meroitic_Hieroglyphs:()=>new y(x("gsiCf",!0)),Miao:()=>new y(x("g47CqCF4BIQ",!0)),Modi:()=>new y(x("gwlCkCMJ",!0)),Mongolian:()=>new y(x("ggGBBDCCBSBH4CBIqBB2t-BMB",!1)),Mro:()=>new y(x("gy6CeCJFB",!0)),Multani:()=>new y(x("g0kCGBCCCBCBCOBCKB",!1)),Myanmar:()=>new y(x("ggE-EhqmBeiDfxibT",!0)),Nabataean:()=>new y(x("gkiCeJI",!0)),Nag_Mundari:()=>new y(x("wm5DpB",!0)),Nandinagari:()=>new y(x("gtmCHDtBDK",!0)),New_Tai_Lue:()=>new y(x("gsGrBFZHKEB",!0)),Newa:()=>new y(x("gglC7CCE",!0)),Nko:()=>new y(x("g+B6BDC",!0)),Nushu:()=>new y(x("h-7CvsQvsQBqMB",!1)),Nyiakeng_Puachue_Hmong:()=>new y(x("go4DsBENDJFB",!0)),Ogham:()=>new y(x("g0Fc",!0)),Ol_Chiki:()=>new y(x("wiHvB",!0)),Ol_Onal:()=>new y(x("wu5DqBFA",!0)),Old_Hungarian:()=>new y(x("gkjCyBOyBIF",!0)),Old_Italic:()=>new y(x("g4gCjBKC",!0)),Old_North_Arabian:()=>new y(x("g0iCf",!0)),Old_Permic:()=>new y(x("w6gCqB",!0)),Old_Persian:()=>new y(x("g9gCjBFN",!0)),Old_Sogdian:()=>new y(x("g4jCnB",!0)),Old_South_Arabian:()=>new y(x("gziCf",!0)),Old_Turkic:()=>new y(x("ggjCoC",!0)),Old_Uyghur:()=>new y(x("w7jCZ",!0)),Oriya:()=>new y(x("h4CCCHDBDVCGCBCEDIDBDCICFBCEDR",!0)),Osage:()=>new y(x("wlhCjBFjB",!0)),Osmanya:()=>new y(x("gkhCdDJ",!0)),Pahawh_Hmong:()=>new y(x("g46ClCLJCGCUGS",!0)),Palmyrene:()=>new y(x("gjiCf",!0)),Pau_Cin_Hau:()=>new y(x("g2mC4B",!0)),Phags_Pa:()=>new y(x("giqB3B",!0)),Phoenician:()=>new y(x("goiCbEA",!0)),Psalter_Pahlavi:()=>new y(x("g8iCRIDNG",!0)),Rejang:()=>new y(x("wpqBjBMA",!0)),Runic:()=>new y(x("g1FqCEK",!0)),Samaritan:()=>new y(x("ggCtBDO",!0)),Saurashtra:()=>new y(x("gkqBlCJL",!0)),Sharada:()=>new y(x("gskC-ChsCH",!0)),Shavian:()=>new y(x("wihCvB",!0)),Siddham:()=>new y(x("gslC1BDlB",!0)),Sidetic:()=>new y(x("gqiCZ",!0)),SignWriting:()=>new y(x("gg2DrUQECO",!0)),Sinhala:()=>new y(x("hsDCBCRBEXBCIBCDDBFBEFFBEBCCCBGBHJBDCBt-gCTB",!1)),Sogdian:()=>new y(x("w5jCpB",!0)),Sora_Sompeng:()=>new y(x("wmkCYIJ",!0)),Soyombo:()=>new y(x("wymCyC",!0)),Sundanese:()=>new y(x("g8G-BhIH",!0)),Sunuwar:()=>new y(x("g+mChBPJ",!0)),Syloti_Nagri:()=>new y(x("ggqBsB",!0)),Syriac:()=>new y(x("g4BNC7BDCxIK",!0)),Tagalog:()=>new y(x("g4FVKA",!0)),Tagbanwa:()=>new y(x("g7FMCCCB",!0)),Tai_Le:()=>new y(x("wqGdDE",!0)),Tai_Tham:()=>new y(x("gxG+BCcDKHJHN",!0)),Tai_Viet:()=>new y(x("g0qBiCZE",!0)),Tai_Yo:()=>new y(x("g25DeCVJB",!0)),Takri:()=>new y(x("g0lC5BHJ",!0)),Tamil:()=>new y(x("i8CBBCFBECBCDBEBBCCCBEEBEEBBBELBFEBECBCDBDHHPUBm+kCxBBOAB",!1)),Tangsa:()=>new y(x("wz6CuCCJ",!0)),Tangut:()=>new y(x("g-7CgBgBB+3GBhQeBiDyDB",!1)),Telugu:()=>new y(x("ggDMCCCWCPDICCCDIBCCCBDDDJII",!0)),Thaana:()=>new y(x("g8BxB",!0)),Thai:()=>new y(x("hwD5BGb",!0)),Tibetan:()=>new y(x("g4Dn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IiCFFBJJIddFGGCCBI1K1KBlJlJB-V-VBNBGQQBuiBBgBFBH0GBISSBIIDGGBDB-BgBBCvDBuBCBPBBLDBD-JBgBQB7BEBCvOBrB1GBsBDBC-FBgBXXBGBD-GBIFFDQQmGBBRoBBtCDBLDBDwYBlCrCB+BhGBFccDCCBCCLFFCCCBEBCDBCECEDDCBBCICDCCBFFIKFCLLSEBEGGSzBBDtIBtBDBlDLBQBBQQQmBJBvF3BBeMBtBDBKGBDNBH5EB6eCBSCBOCB7GFBNDBCOBNDB5BHBLFBpBHBfBBNDBDNBKmBB5KHBPBBOCBMCB6BCCBCBRBBNDBLGB0EoDoDBjgBBh3pBfB-oEBBv0FBBypHOBvThtCB-QhvBBs6EEBrpIm8yVBCdBhD-DBxHvw-FB",!1)),Vai:()=>new y(x("gopBrJ",!0)),Vithkuqi:()=>new y(x("wrhCKCOCGCBCKCOCGCB",!0)),Wancho:()=>new y(x("g24D5BGA",!0)),Warang_Citi:()=>new y(x("glmCyCNA",!0)),Yezidi:()=>new y(x("g0jCpBCCDB",!0)),Yi:()=>new y(x("ggoBskBE2B",!0)),Zanabazar_Square:()=>new y(x("gwmCnC",!0))});static FOLD_CATEGORIES=new sa({L:()=>new y(x("laA",!0)),LC:()=>new y(x("laA",!0)),Ll:()=>new y(x("hCZBmDWBCGBiBuBCEECDOCDuBCBECEBBCCCBCCBBBDDBCBBCCBEBBCBBCECBCCDCCBCCBBBCCCBEEIBBCBBCBBCOCDQCDBBCCCBBBC4BCIBBCBBDCCBCBCGC3HrBrBCEEJHHCCBCCCBCCBPBCIBkBJJCUCGDDCBBDyBBxBgBCK2BCBMCD+CCDlBBq6ClBBCGGzW1CB0kCHHBpBBDCBhK0ECKgDCKHBJFBLHBJHBJFBMGCJHBZHBJHBJHBJEBMEBMDBNEBMEBqJEEBHHxC9zC9zCBuBBxBCCBBBDGCBCBCDDJCBCgDCJCCFuqeuqeCqBCUaCoEMCE8BCLECBICFCCDCCEUCBDBCEBCOCBCBCCCB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QCZs5Vs5VBYBmmBnBBpEjBB9EKBCOBCGBCBBr3ByBB+EVB75CfBhsVfBhCYBoyehBB",!1)),Math:()=>new y(x("ycGDCHHFMMDDDCHHFAB",!1)),Uppercase:()=>new y(x("hDZB7BqBqBBWBCHBCuBCEECDOCDsBCDECBBBDCCDEEGDDECBDDDCCCDFFDEECDDECCGBBCBBCBBCOCBSCDBBCEECkBCEQCJDDBCCFICBEBCBBCCCBEEBCCBCBCEBDCCBDDIDDCBBEFBGLLBnFnFsBCCEEEBBBvBDBCdBCBBECBCWCBDBCGD1BvBBCgBCK0BCDMCBgDCyBlBBq6CqBBDCB5XFBjkCIBCvHvHERRzD0ECGGGC8CCBHBJFBLHBJHBJFBMGCJHBJNBzBBBNSSBPPBEEpLiBiBBOBFsasaBYBn6BvBBCEEBGCHDDLiDCJCCFNNBkBBCGG0oesBCUaCoEMCE8BCLCCDICFFFCBBDSCMOCFCCDOCb9a9advCBi8UZBumBnBBpEjBB8EKBCOBCGBCBBk4ByBB+DVB75CfBhsVfB8BYBvyehBB",!1))});static FOLD_SCRIPT=new sa({Common:()=>new y(x("8cgBgB",!1)),Greek:()=>new y(x("1FwUwU",!1)),Inherited:()=>new y(x("5cgBgBlgHAB",!1))})},se=class Rt{static MAX_RUNE=1114111;static RUNE_ERROR=65533;static isUnsearchable(e){return e===Rt.RUNE_ERROR||e>=Rt.MIN_HIGH_SURROGATE&&e<=Rt.MAX_LOW_SURROGATE}static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static MIN_HIGH_SURROGATE=55296;static MAX_HIGH_SURROGATE=56319;static MIN_LOW_SURROGATE=56320;static MAX_LOW_SURROGATE=57343;static MIN_SUPPLEMENTARY_CODE_POINT=65536;static is32(e,n){let s=0,r=e.length;for(;s<r;){const i=s+Math.floor((r-s)/2),o=e.getLo(i),a=e.getHi(i);if(o<=n&&n<=a){const l=e.getStride(i);return(n-o)%l===0}n<o?r=i:s=i+1}return!1}static is(e,n){if(n<=Rt.MAX_LATIN1){for(let s=0;s<e.length;s++){if(n>e.getHi(s))continue;const r=e.getLo(s);if(n<r)return!1;const i=e.getStride(s);return(n-r)%i===0}return!1}return e.length>0&&n>=e.getLo(0)&&Rt.is32(e,n)}static isUpper(e){if(e<=Rt.MAX_LATIN1){const n=String.fromCodePoint(e);return n.toUpperCase()===n&&n.toLowerCase()!==n}return Rt.is(Ft.Upper,e)}static isPrint(e){return e<=Rt.MAX_LATIN1?e>=32&&e<Rt.MAX_ASCII||e>=161&&e!==173:Rt.is(Ft.Print,e)}static simpleFold(e){if(Ft.CASE_ORBIT.has(e))return Ft.CASE_ORBIT.get(e);const n=_.toLowerCase(e);return n!==e?n:_.toUpperCase(e)}static equalsIgnoreCase(e,n){if(e===n)return!0;if(e<0||n<0)return!1;if(e<=Rt.MAX_ASCII&&n<=Rt.MAX_ASCII)return 65<=e&&e<=90&&(e|=32),65<=n&&n<=90&&(n|=32),e===n;for(let s=Rt.simpleFold(e);s!==e;s=Rt.simpleFold(s))if(s===n)return!0;return!1}},Ih=256,DC=new Uint8Array(Ih);for(let t=0;t<Ih;t++)DC[t]=97<=t&&t<=122||65<=t&&t<=90||48<=t&&t<=57||t===95?1:0;var xc=null,Dc=null,Be=class Kt{static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=-1;static emptyInts(){return[]}static isByteArray(e){return Array.isArray(e)||Object.prototype.toString.call(e)==="[object Uint8Array]"}static isalnum(e){return _.CODES.get("0")<=e&&e<=_.CODES.get("9")||_.CODES.get("a")<=e&&e<=_.CODES.get("z")||_.CODES.get("A")<=e&&e<=_.CODES.get("Z")}static unhex(e){return _.CODES.get("0")<=e&&e<=_.CODES.get("9")?e-_.CODES.get("0"):_.CODES.get("a")<=e&&e<=_.CODES.get("f")?e-_.CODES.get("a")+10:_.CODES.get("A")<=e&&e<=_.CODES.get("F")?e-_.CODES.get("A")+10:-1}static escapeRune(e){let n="";if(se.isPrint(e))Kt.METACHARACTERS.indexOf(String.fromCodePoint(e))>=0&&(n+="\\"),n+=String.fromCodePoint(e);else switch(e){case _.CODES.get('"'):n+='\\"';break;case _.CODES.get("\\"):n+="\\\\";break;case _.CODES.get(" "):n+="\\t";break;case _.CODES.get(`
4
4
  `):n+="\\n";break;case _.CODES.get("\r"):n+="\\r";break;case _.CODES.get("\b"):n+="\\b";break;case _.CODES.get("\f"):n+="\\f";break;default:{let s=e.toString(16);e<256?(n+="\\x",s.length===1&&(n+="0"),n+=s):n+=`\\x{${s}}`;break}}return n}static stringToRunes(e){const n=String(e),s=[];let r=0;for(;r<n.length;){const i=n.codePointAt(r);s.push(i),r+=i>se.MAX_BMP?2:1}return new Int32Array(s)}static runeToString(e){return String.fromCodePoint(e)}static isWordRune(e){return e<Ih?DC[e]===1:!1}static emptyOpContext(e,n){let s=0;return e<0&&(s|=Kt.EMPTY_BEGIN_TEXT|Kt.EMPTY_BEGIN_LINE),e===10&&(s|=Kt.EMPTY_BEGIN_LINE),n<0&&(s|=Kt.EMPTY_END_TEXT|Kt.EMPTY_END_LINE),n===10&&(s|=Kt.EMPTY_END_LINE),Kt.isWordRune(e)!==Kt.isWordRune(n)?s|=Kt.EMPTY_WORD_BOUNDARY:s|=Kt.EMPTY_NO_WORD_BOUNDARY,s}static quoteMeta(e){return e.split("").map(n=>Kt.METACHARACTERS.indexOf(n)>=0?`\\${n}`:n).join("")}static charCount(e){return e>se.MAX_BMP?2:1}static toArray(e){const n=e.length,s=new Array(n);for(let r=0;r<n;r++)s[r]=e[r];return s}static stringToUtf8ByteArray(e){if(globalThis.TextEncoder)return xc||(xc=new TextEncoder),xc.encode(e);{let n=[],s=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?n[s++]=i:i<2048?(n[s++]=i>>6|192,n[s++]=i&63|128):(i&64512)===se.MIN_HIGH_SURROGATE&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===se.MIN_LOW_SURROGATE?(i=se.MIN_SUPPLEMENTARY_CODE_POINT+((i&1023)<<10)+(e.charCodeAt(++r)&1023),n[s++]=i>>18|240,n[s++]=i>>12&63|128,n[s++]=i>>6&63|128,n[s++]=i&63|128):(n[s++]=i>>12|224,n[s++]=i>>6&63|128,n[s++]=i&63|128)}return n}}static utf8ByteArrayToString(e){if(globalThis.TextDecoder){Dc||(Dc=new TextDecoder("utf-8"));const n=e instanceof Uint8Array?e:new Uint8Array(e);return Dc.decode(n)}else{let n=[],s=0,r=0;for(;s<e.length;){let i=e[s++];if(i<128)n[r++]=String.fromCharCode(i);else if(i>191&&i<224){let o=e[s++];n[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){let o=e[s++],a=e[s++],l=e[s++],c=((i&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-se.MIN_SUPPLEMENTARY_CODE_POINT;n[r++]=String.fromCharCode(se.MIN_HIGH_SURROGATE+(c>>10)),n[r++]=String.fromCharCode(se.MIN_LOW_SURROGATE+(c&1023))}else{let o=e[s++],a=e[s++];n[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return n.join("")}}},wC=(t=[],e=0)=>{const n=Object.create(null);for(let s=0;s<t.length;s++){const r=t[s],i=e+s;n[r]=i,n[i]=r}return Object.freeze(n)},cr=class wu{static Encoding=wC(["UTF_16","UTF_8"]);getEncoding(){throw Error("not implemented")}asCharSequence(){throw Error("not implemented")}asBytes(){throw Error("not implemented")}length(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===wu.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===wu.Encoding.UTF_16}},qB=class extends cr{constructor(t=null){super(),this.bytes=t}getEncoding(){return cr.Encoding.UTF_8}asCharSequence(){return Be.utf8ByteArrayToString(this.bytes)}asBytes(){return this.bytes}length(){return this.bytes.length}},tw=class extends cr{constructor(t=null){super(),this.charSequence=t}getEncoding(){return cr.Encoding.UTF_16}asCharSequence(){return this.charSequence}asBytes(){return Be.stringToUtf8ByteArray(this.charSequence.toString())}length(){return this.charSequence.length}},tr=class{static utf16(t){return new tw(t)}static utf8(t){return Be.isByteArray(t)?new qB(t):new qB(Be.stringToUtf8ByteArray(t))}},Mt=class{static EOF(){return-8}constructor(){this.end=0}canCheckPrefix(){return!0}endPos(){return this.end}hasString(){return!1}hasAnyString(){return!1}prefixLength(){return 0}},nw=class yr extends Mt{static RUNE_ERROR_STEP=se.RUNE_ERROR<<3|1;constructor(e,n=0,s=e.length){super(),this.bytes=e,this.start=n,this.end=s}hasString(e,n){const s=e.bytes;if(s.length===0)return!0;const r=this.indexOf(this.bytes,s,this.start+n);return r!==-1&&r<=this.end-s.length}hasAnyString(e,n){return e.automaton8().searchUTF8(this.bytes,this.start+n,this.end)}step(e){if(e+=this.start,e>=this.end)return Mt.EOF();const n=this.bytes[e]&255;if(n<128)return n<<3|1;let s,r,i=128,o=191;if(n>=194&&n<=223)s=2,r=n&31;else if(n>=224&&n<=239)s=3,r=n&15,n===224?i=160:n===237&&(o=159);else if(n>=240&&n<=244)s=4,r=n&7,n===240?i=144:n===244&&(o=143);else return yr.RUNE_ERROR_STEP;if(e+s>this.end)return yr.RUNE_ERROR_STEP;const a=this.bytes[e+1]&255;if(a<i||a>o)return yr.RUNE_ERROR_STEP;if(r=r<<6|a&63,s>2){const l=this.bytes[e+2]&255;if((l&192)!==128)return yr.RUNE_ERROR_STEP;if(r=r<<6|l&63,s>3){const c=this.bytes[e+3]&255;if((c&192)!==128)return yr.RUNE_ERROR_STEP;r=r<<6|c&63}}return r<<3|s}index(e,n){n+=this.start;const s=this.indexOf(this.bytes,e.prefixUTF8,n);return s<0?s:s-n}context(e){e+=this.start;let n=-1;if(e>this.start&&e<=this.end){let r=e-1;if(n=this.bytes[r--],n>=128){let i=e-4;for(i<this.start&&(i=this.start);r>=i&&(this.bytes[r]&192)===128;)r--;r<this.start&&(r=this.start),n=this.step(r-this.start)>>3}}const s=e<this.end?this.step(e-this.start)>>3:-1;return Be.emptyOpContext(n,s)}indexOf(e,n,s=0){let r=n.length;if(r===0)return s<=this.end?s:-1;const i=n[0];let o=this.end-r;const a=typeof e.indexOf=="function";let l=s;for(;l<=o;){if(a){if(l=e.indexOf(i,l),l===-1||l>o)return-1}else{for(;l<=o&&e[l]!==i;)l++;if(l>o)return-1}let c=!0;for(let u=1;u<r;u++)if(e[l+u]!==n[u]){c=!1;break}if(c)return l;l++}return-1}prefixLength(e){return e.prefixUTF8.length}},sw=class extends Mt{constructor(t,e=0,n=t.length){super(),this.charSequence=t,this.start=e,this.end=n}hasString(t,e){const n=this.charSequence.indexOf(t.str,this.start+e);return n!==-1&&n<=this.end-t.str.length}hasAnyString(t,e){return t.automaton16().searchUTF16(this.charSequence,this.start+e,this.end)}step(t){if(t+=this.start,t>=this.end)return Mt.EOF();const e=this.charSequence.charCodeAt(t);if(e<se.MIN_HIGH_SURROGATE||e>se.MAX_HIGH_SURROGATE||t+1>=this.end)return e<<3|1;const n=this.charSequence.charCodeAt(t+1);return n>=se.MIN_LOW_SURROGATE&&n<=se.MAX_LOW_SURROGATE?(e-se.MIN_HIGH_SURROGATE)*1024+(n-se.MIN_LOW_SURROGATE)+se.MIN_SUPPLEMENTARY_CODE_POINT<<3|2:e<<3|1}index(t,e){e+=this.start;const n=this.charSequence.indexOf(t.prefix,e);return n<0||n>this.end-t.prefix.length?-1:n-e}context(t){t+=this.start;const e=t>this.start&&t<=this.end?this.charSequence.charCodeAt(t-1):-1,n=t<this.end?this.charSequence.charCodeAt(t):-1;return Be.emptyOpContext(e,n)}prefixLength(t){return t.prefix.length}},Ue=class{static fromUTF8(t,e=0,n=t.length){return new nw(t,e,n)}static fromUTF16(t,e=0,n=t.length){return new sw(t,e,n)}},Po=class extends Error{constructor(t){super(t),this.name="RE2JSException"}},$e=class extends Po{constructor(t,e=null){let n=`error parsing regexp: ${t}`;e&&(n+=`: \`${e}\``),super(n),this.name="RE2JSSyntaxException",this.message=n,this.error=t,this.input=e}getDescription(){return this.error}getPattern(){return this.input}},zi=class extends Po{constructor(t){super(t),this.name="RE2JSCompileException"}},_t=class extends Po{constructor(t){super(t),this.name="RE2JSGroupException"}},rw=class extends Po{constructor(t){super(t),this.name="RE2JSFlagsException"}},$i=class extends Po{constructor(t){super(t),this.name="RE2JSInternalException"}},YB=class AC{static MAX_REPLACER_ARGS=65535;static quoteReplacement(e,n=!1){return n?e.indexOf("\\")<0&&e.indexOf("$")<0?e:e.split("").map(s=>{const r=s.codePointAt(0);return r===_.CODES.get("\\")||r===_.CODES.get("$")?`\\${s}`:s}).join(""):e.indexOf("$")<0?e:e.split("").map(s=>s.codePointAt(0)===_.CODES.get("$")?"$$":s).join("")}constructor(e,n){if(e===null)throw new Error("pattern is null");this.patternInput=e;const s=this.patternInput.re2();this.patternGroupCount=s.numberOfCapturingGroups(),this.groups=[],this.namedGroups=s.namedGroups,this.numberOfInstructions=s.numberOfInstructions(),this.lookbehindState=null,n instanceof cr?this.resetMatcherInput(n):Be.isByteArray(n)?this.resetMatcherInput(tr.utf8(n)):this.resetMatcherInput(tr.utf16(n))}pattern(){return this.patternInput}reset(){return this.matcherInputLength=this.matcherInput.length(),this.appendPos=0,this.hasMatch=!1,this.hasGroups=!1,this.anchorFlag=0,this}resetMatcherInput(e){if(e===null)throw new Error("input is null");return e instanceof cr||(Be.isByteArray(e)?e=tr.utf8(e):e=tr.utf16(e)),this.matcherInput=e,this.lookbehindState!==null?this.lookbehindState.reset():this.lookbehindState=this.patternInput.re2().createLookbehindState(),this.reset(),this}start(e=0){if(typeof e=="string"){const n=this.namedGroups[e];if(!Number.isFinite(n))throw new _t(`group '${e}' not found`);e=n}return this.loadGroup(e),this.groups[2*e]}end(e=0){if(typeof e=="string"){const n=this.namedGroups[e];if(!Number.isFinite(n))throw new _t(`group '${e}' not found`);e=n}return this.loadGroup(e),this.groups[2*e+1]}programSize(){return this.numberOfInstructions}group(e=0){if(typeof e=="string"){const r=this.namedGroups[e];if(!Number.isFinite(r))throw new _t(`group '${e}' not found`);e=r}const n=this.start(e),s=this.end(e);return n<0&&s<0?null:this.substring(n,s)}getNamedGroups(){if(!this.hasMatch)throw new _t("perhaps no match attempted");const e=Object.create(null);for(const n of Object.keys(this.namedGroups))e[n]=this.group(n);return e}groupCount(){return this.patternGroupCount}loadGroup(e){if(!Number.isInteger(e)||e<0||e>this.patternGroupCount)throw new _t(`Group index out of bounds: ${e}`);if(!this.hasMatch)throw new _t("perhaps no match attempted");if(e===0||this.hasGroups)return;const n=this.matcherInputLength,s=this.patternInput.re2().matchMachineInput(this.matcherInput,this.groups[0],n,this.anchorFlag,1+this.patternGroupCount,this.lookbehindState);if(!s[0])throw new _t("inconsistency in matching group data");this.groups=s[1],this.hasGroups=!0}matches(){return this.genMatch(0,F.ANCHOR_BOTH)}lookingAt(){return this.genMatch(0,F.ANCHOR_START)}find(e=null){if(e!==null){if(!Number.isInteger(e)||e<0||e>this.matcherInputLength)throw new _t(`start index out of bounds: ${e}`);return this.reset(),this.genMatch(e,0)}if(e=0,this.hasMatch&&(e=this.groups[1],this.groups[0]===this.groups[1])){const n=(this.matcherInput.isUTF16Encoding()?Ue.fromUTF16(this.matcherInput.asCharSequence(),0,this.matcherInputLength):Ue.fromUTF8(this.matcherInput.asBytes(),0,this.matcherInputLength)).step(e);n<0?e++:e+=n&7}return this.genMatch(e,F.UNANCHORED)}genMatch(e,n){const s=this.patternInput.re2().matchMachineInput(this.matcherInput,e,this.matcherInputLength,n,1,this.lookbehindState);return s[0]?(this.groups=s[1],this.hasMatch=!0,this.hasGroups=this.patternGroupCount===0,this.anchorFlag=n,!0):(this.hasMatch=!1,!1)}substring(e,n){return this.matcherInput.isUTF8Encoding()?Be.utf8ByteArrayToString(this.matcherInput.asBytes().slice(e,n)):this.matcherInput.asCharSequence().substring(e,n).toString()}inputLength(){return this.matcherInputLength}appendReplacement(e,n=!1){let s="";const r=this.start(),i=this.end();return this.appendPos<r&&(s+=this.substring(this.appendPos,r)),this.appendPos=i,s+=n?this.appendReplacementInternalJava(e):this.appendReplacementInternalJs(e),s}appendReplacementInternalJava(e){let n="",s=0;const r=e.length;let i=0;for(;i<r;){const o=e.codePointAt(i);if(o===_.CODES.get("\\")){if(s<i&&(n+=e.substring(s,i)),i++,i>=r)throw new _t("character to be escaped is missing");s=i,i++;continue}if(o===_.CODES.get("$")){if(s<i&&(n+=e.substring(s,i)),i+1>=r)throw new _t("Illegal group reference: group index is missing");const a=e.codePointAt(i+1);if(_.CODES.get("0")<=a&&a<=_.CODES.get("9")){let l=a-_.CODES.get("0"),c=i+2;for(;c<r;c++){const d=e.codePointAt(c);if(d<_.CODES.get("0")||d>_.CODES.get("9")||l*10+d-_.CODES.get("0")>this.patternGroupCount)break;l=l*10+d-_.CODES.get("0")}if(l>this.patternGroupCount)throw new _t(`n > number of groups: ${l}`);const u=this.group(l);u!==null&&(n+=u),i=c,s=i}else if(a===_.CODES.get("{")){let l=i+2;for(;l<r&&e.codePointAt(l)!==_.CODES.get("}");)l++;if(l>=r)throw new _t("named capture group is missing trailing '}'");const c=e.substring(i+2,l),u=this.group(c);u!==null&&(n+=u),i=l+1,s=i}else throw new _t("Illegal group reference");continue}i++}return s<r&&(n+=e.substring(s,r)),n}appendReplacementInternalJs(e){let n="",s=0;const r=e.length;for(let i=0;i<r-1;i++)if(e.codePointAt(i)===_.CODES.get("$")){let o=e.codePointAt(i+1);if(_.CODES.get("$")===o){s<i&&(n+=e.substring(s,i)),n+="$",i++,s=i+1;continue}else if(_.CODES.get("&")===o){s<i&&(n+=e.substring(s,i));const a=this.group(0);a!==null?n+=a:n+="$&",i++,s=i+1;continue}else if(_.CODES.get("`")===o){s<i&&(n+=e.substring(s,i)),n+=this.substring(0,this.start(0)),i++,s=i+1;continue}else if(_.CODES.get("'")===o){s<i&&(n+=e.substring(s,i)),n+=this.substring(this.end(0),this.matcherInputLength),i++,s=i+1;continue}else if(_.CODES.get("1")<=o&&o<=_.CODES.get("9")){let a=o-_.CODES.get("0");for(s<i&&(n+=e.substring(s,i)),i+=2;i<r&&(o=e.codePointAt(i),!(o<_.CODES.get("0")||o>_.CODES.get("9")||a*10+o-_.CODES.get("0")>this.patternGroupCount));i++)a=a*10+o-_.CODES.get("0");if(a>this.patternGroupCount){n+=`$${a}`,s=i,i--;continue}const l=this.group(a);l!==null&&(n+=l),s=i,i--;continue}else if(o===_.CODES.get("<")){s<i&&(n+=e.substring(s,i)),i++;let a=i+1;for(;a<e.length&&e.codePointAt(a)!==_.CODES.get(">")&&e.codePointAt(a)!==_.CODES.get(" ");)a++;if(a===e.length||e.codePointAt(a)!==_.CODES.get(">")){n+=e.substring(i-1,a+1),s=a+1,i=a;continue}const l=e.substring(i+1,a);if(Object.prototype.hasOwnProperty.call(this.namedGroups,l)){const c=this.group(l);c!==null&&(n+=c)}else n+=`$<${l}>`;s=a+1,i=a;continue}}return s<r&&(n+=e.substring(s,r)),n}appendTail(){return this.substring(this.appendPos,this.matcherInputLength)}replaceAll(e,n=!1){return this.replace(e,!0,n)}replaceFirst(e,n=!1){return this.replace(e,!1,n)}replace(e,n=!0,s=!1){let r="";this.reset();const i=typeof e=="function",o=Object.keys(this.namedGroups).length>0;let a=null;if(i){if(this.groupCount()>=AC.MAX_REPLACER_ARGS)throw new _t("Too many capture groups to safely invoke replacer function");a=this.matcherInput.isUTF8Encoding()?this.matcherInput.asBytes():this.matcherInput.asCharSequence()}for(;this.find()&&(r+=i?this.appendReplacementFunc(e,o,a):this.appendReplacement(e,s),!!n););return r+=this.appendTail(),r}appendReplacementFunc(e,n,s){let r="";const i=this.start(),o=this.end();this.appendPos<i&&(r+=this.substring(this.appendPos,i)),this.appendPos=o;const a=this.buildReplacerArgs(i,n,s);return r+=String(e(...a)),r}buildReplacerArgs(e,n,s){const r=[this.group(0)],i=this.groupCount();for(let o=1;o<=i;o++){const a=this.start(o);a<0?r.push(void 0):r.push(this.substring(a,this.end(o)))}if(r.push(e),r.push(s),n){const o=this.getNamedGroups();for(const a in o)o[a]===null&&(o[a]=void 0);r.push(o)}return r}},O=class vt{static ALT=1;static ALT_MATCH=2;static CAPTURE=3;static EMPTY_WIDTH=4;static FAIL=5;static MATCH=6;static NOP=7;static RUNE=8;static RUNE1=9;static RUNE_ANY=10;static RUNE_ANY_NOT_NL=11;static LB_WRITE=12;static LB_CHECK=13;static isRuneOp(e){return vt.RUNE<=e&&e<=vt.RUNE_ANY_NOT_NL}static escapeRunes(e){let n='"';for(let s of e)n+=Be.escapeRune(s);return n+='"',n}constructor(e){this.op=e,this.out=0,this.arg=0,this.runes=new Int32Array(0),this.next=null}matchRune(e){if(this.runes.length===1){const o=this.runes[0];return(this.arg&F.FOLD_CASE)!==0?se.equalsIgnoreCase(o,e):e===o}const n=this.runes.length;if(n===0)return!1;if(n===2||n===4||n===6||n===8){for(let o=0;o<n;o+=2){if(e<this.runes[o])return!1;if(e<=this.runes[o+1])return!0}return!1}let s=0,r=n>>1;for(;r>1;){const o=r>>1;s+=this.runes[s+o<<1]<=e?o:0,r-=o}s+=this.runes[s<<1]<=e?1:0;const i=s-1;return i>=0&&e<=this.runes[i<<1|1]}matchRunePos(e){if(this.runes.length===1){const o=this.runes[0];return(this.arg&F.FOLD_CASE)!==0?se.equalsIgnoreCase(o,e)?0:-1:e===o?0:-1}const n=this.runes.length;if(n===0)return-1;if(n===2||n===4||n===6||n===8){for(let o=0;o<n;o+=2){if(e<this.runes[o])return-1;if(e<=this.runes[o+1])return Math.floor(o/2)}return-1}let s=0,r=n>>1;for(;r>1;){const o=r>>1;s+=this.runes[s+o<<1]<=e?o:0,r-=o}s+=this.runes[s<<1]<=e?1:0;const i=s-1;return i>=0&&e<=this.runes[i<<1|1]?i:-1}toString(){switch(this.op){case vt.ALT:return`alt -> ${this.out}, ${this.arg}`;case vt.ALT_MATCH:return`altmatch -> ${this.out}, ${this.arg}`;case vt.CAPTURE:return`cap ${this.arg} -> ${this.out}`;case vt.EMPTY_WIDTH:return`empty ${this.arg} -> ${this.out}`;case vt.MATCH:return`match${this.arg!==0?` ${this.arg}`:""}`;case vt.FAIL:return"fail";case vt.NOP:return`nop -> ${this.out}`;case vt.LB_WRITE:return`lbwrite ${this.arg} -> ${this.out}`;case vt.LB_CHECK:return`lbcheck ${this.arg} -> ${this.out}`;case vt.RUNE:return this.runes===null?"rune <null>":["rune ",vt.escapeRunes(this.runes),(this.arg&F.FOLD_CASE)!==0?"/i":""," -> ",this.out].join("");case vt.RUNE1:return`rune1 ${vt.escapeRunes(this.runes)} -> ${this.out}`;case vt.RUNE_ANY:return`any -> ${this.out}`;case vt.RUNE_ANY_NOT_NL:return`anynotnl -> ${this.out}`;default:throw new Error("unhandled case in Inst.toString")}}},XB=class IC{constructor(e){this.sparse=new Int32Array(e),this.densePcs=new Int32Array(e),this.denseCaps=null,this.size=0,this.ncap=0,this.mainThreads=0}static INITIAL_THREADS=32;init(e){this.ncap=e;const n=Math.min(this.densePcs.length,IC.INITIAL_THREADS)*e;(!this.denseCaps||this.denseCaps.length<n)&&(this.denseCaps=new Int32Array(n))}growCaps(e){const n=this.densePcs.length*this.ncap,s=new Int32Array(Math.min(n,Math.max(e,2*this.denseCaps.length)));s.set(this.denseCaps),this.denseCaps=s}contains(e){const n=this.sparse[e];return n<this.size&&this.densePcs[n]===e}isEmpty(){return this.size===0}add(e){const n=this.size++;return this.sparse[e]=n,this.densePcs[n]=e,n}clear(){this.size=0,this.mainThreads=0}toString(){let e="{";for(let n=0;n<this.size;n++)n!==0&&(e+=", "),e+=this.densePcs[n];return e+="}",e}},iw=class{constructor(t){this.pos=-1,this.pcs=new Int32Array(t.numInst()),this.size=0,this.lbTable=new Int32Array(t.numLb+1)}reset(){this.pos=-1,this.size=0}},TC=class kC{static fromRE2(e){const n=new kC;return n.prog=e.prog,n.re2=e,n.q0=new XB(n.prog.numInst()),n.q1=new XB(n.prog.numInst()),n.addStack=new Int32Array(2*(n.prog.numInst()+1)),n.matched=!1,n.matchcap=new Int32Array(n.prog.numCap<2?2:n.prog.numCap),n.ncap=0,n}constructor(){this.prog=null,this.re2=null,this.q0=null,this.q1=null,this.addStack=null,this.matched=!1,this.matchcap=null,this.ncap=0,this.lbTable=null}init(e){this.ncap=e,e>this.matchcap.length?this.matchcap=new Int32Array(e).fill(-1):this.matchcap.fill(-1),this.q0.init(e),this.q1.init(e),this.prog.numLb>0&&((!this.lbTable||this.lbTable.length<this.prog.numLb+1)&&(this.lbTable=new Int32Array(this.prog.numLb+1)),this.lbTable.fill(-1))}submatches(){return this.ncap===0?Be.emptyInts():Be.toArray(this.matchcap.subarray(0,this.ncap))}match(e,n,s,r=null){const i=this.re2.cond;if(i===Be.EMPTY_ALL||(s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&n!==0)return!1;this.matched=!1,this.matchcap.fill(-1);const o=this.prog.numLb>0,a=n;let l=n,c=!1;o&&(r!==null&&r.pos>=0&&r.pos<=n?(l=r.pos,c=!0):l=0);let u=o&&r!==null,d=this.q0,h=this.q1,f=e.step(l),p=f>>3,m=f&7,v=-1,E=0;f!==Mt.EOF()&&(f=e.step(l+m),v=f>>3,E=f&7);let S;for(l===0?S=Be.emptyOpContext(-1,p):S=e.context(l),o&&(c?this.restoreLookbehinds(r,d,S):this.spawnLookbehinds(d,l,S));;){if(d.mainThreads===0){if((i&Be.EMPTY_BEGIN_TEXT)!==0&&l!==0||(s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&l!==0||this.matched)break;if(this.prog.numLb===0&&d.isEmpty()&&this.re2.prefix.length!==0&&v!==this.re2.prefixRune&&e.canCheckPrefix()){const k=e.index(this.re2,l);if(k<0)break;l+=k,f=e.step(l),p=f>>3,m=f&7,f=e.step(l+m),v=f>>3,E=f&7,S=e.context(l)}}l>=a&&(u&&(this.saveLookbehinds(r,d,l),u=!1),!this.matched&&(l===0||s===F.UNANCHORED)&&(this.ncap>0&&(this.matchcap[0]=l),this.add(d,this.prog.start,l,this.matchcap,0,S)));const A=l+m;if(S=e.context(A),this.step(d,h,l,A,p,S,s,l===e.endPos()),m===0||this.ncap===0&&this.matched)break;l+=m,p=v,m=E,p!==-1&&(f=e.step(l+m),v=f>>3,E=f&7);const N=d;d=h,h=N}return d.clear(),h.clear(),this.matched}matchSet(e,n,s){const r=this.re2.cond;if(r===Be.EMPTY_ALL)return[];if((s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&n!==0)return[];let i=this.prog.numLb>0?0:n,o=n,a=this.q0,l=this.q1,c=e.step(i),u=c>>3,d=c&7,h=-1,f=0;c!==Mt.EOF()&&(c=e.step(i+d),h=c>>3,f=c&7);let p=i===0?Be.emptyOpContext(-1,u):e.context(i);const m=new Set;for(this.prog.numLb>0&&this.spawnLookbehinds(a,i,p);!(a.mainThreads===0&&((r&Be.EMPTY_BEGIN_TEXT)!==0&&i!==0||(s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&i!==0));){(i===0||s===F.UNANCHORED)&&i>=o&&this.add(a,this.prog.start,i,this.matchcap,0,p);const v=i+d;p=e.context(v);for(let S=0;S<a.size;S++){const A=a.densePcs[S],N=this.prog.inst[A],k=S*this.ncap;let R=!1;switch(N.op){case O.MATCH:if(s===F.ANCHOR_BOTH&&i!==e.endPos())break;m.add(N.arg);break;case O.RUNE:R=N.matchRune(u);break;case O.RUNE1:R=u===N.runes[0];break;case O.RUNE_ANY:R=!0;break;case O.RUNE_ANY_NOT_NL:R=u!==10;break;default:continue}R&&this.add(l,N.out,v,a.denseCaps,k,p)}if(a.clear(),d===0)break;i+=d,u=h,d=f,u!==-1&&(c=e.step(i+d),h=c>>3,f=c&7);const E=a;a=l,l=E}return l.clear(),Array.from(m).sort((v,E)=>v-E)}step(e,n,s,r,i,o,a,l){const c=this.re2.longest;for(let u=0;u<e.size;u++){const d=e.densePcs[u],h=u*this.ncap;if(c&&this.matched&&this.ncap>0&&this.matchcap[0]<e.denseCaps[h])continue;const f=this.prog.inst[d];let p=!1;switch(f.op){case O.MATCH:if(a===F.ANCHOR_BOTH&&!l)break;if(this.ncap>0&&(!c||!this.matched||this.matchcap[1]<s)){e.denseCaps[h+1]=s;for(let m=0;m<this.ncap;m++)this.matchcap[m]=e.denseCaps[h+m]}c||(e.size=0),this.matched=!0;break;case O.RUNE:p=f.matchRune(i);break;case O.RUNE1:p=i===f.runes[0];break;case O.RUNE_ANY:p=!0;break;case O.RUNE_ANY_NOT_NL:p=i!==10;break;default:continue}p&&this.add(n,f.out,r,e.denseCaps,h,o)}e.clear()}spawnLookbehinds(e,n,s){for(let r=0;r<this.prog.lbStarts.length;r++)this.add(e,this.prog.lbStarts[r],n,this.matchcap,0,s)}restoreLookbehinds(e,n,s){this.lbTable.set(e.lbTable);for(let r=0;r<e.size;r++)this.add(n,e.pcs[r],e.pos,this.matchcap,0,s)}saveLookbehinds(e,n,s){let r=0;for(let i=0;i<n.size;i++){const o=n.densePcs[i];this.prog.lbInst[o]===1&&O.isRuneOp(this.prog.inst[o].op)&&(e.pcs[r++]=o)}e.size=r,e.pos=s,e.lbTable.set(this.lbTable)}add(e,n,s,r,i,o){const a=this.addStack;let l=0;for(;;){for(;n!==0&&!e.contains(n);){const u=e.add(n),d=this.prog.inst[n];switch(d.op){case O.FAIL:n=0;break;case O.ALT:case O.ALT_MATCH:a[l++]=d.arg,a[l++]=0,n=d.out;break;case O.EMPTY_WIDTH:n=(d.arg&~o)===0?d.out:0;break;case O.NOP:n=d.out;break;case O.CAPTURE:d.arg<this.ncap&&(a[l++]=-d.arg-1,a[l++]=r[i+d.arg],r[i+d.arg]=s),n=d.out;break;case O.LB_WRITE:this.lbTable[Math.abs(d.arg)]=s,n=d.out;break;case O.LB_CHECK:d.arg>0?n=this.lbTable[d.arg]===s?d.out:0:n=this.lbTable[-d.arg]!==s?d.out:0;break;case O.MATCH:case O.RUNE:case O.RUNE1:case O.RUNE_ANY:case O.RUNE_ANY_NOT_NL:if(this.prog.lbInst[n]===0&&e.mainThreads++,this.ncap>0){const h=u*this.ncap;h+this.ncap>e.denseCaps.length&&e.growCaps(h+this.ncap);for(let f=0;f<this.ncap;f++)e.denseCaps[h+f]=r[i+f]}n=0;break;default:throw new $i("unhandled")}}if(l===0)return;l-=2;const c=a[l];c<0?(r[i-c-1]=a[l+1],n=0):n=c}}},ow=t=>{let e=-2128831035;for(let n=0;n<t.length;n++)e^=t[n],e=Math.imul(e,16777619);return e},aw=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},lw=class{constructor(t,e,n){this.nfaStates=t,this.isMatch=e,this.matchIDs=n,this.next=null,this.nextAnchored=null}},RC=class Pa{static STATE_OVERHEAD=160;static TABLE_OVERHEAD=16;static PROGRESS_PER_STATE=10;constructor(e,n=8388608){this.prog=e,this.maxMem=n,this.stateCache=new Map,this.stateCount=0,this.startState=null,this.failed=!1;for(let s=0;s<e.numInst();s++){const r=e.getInst(s).op;if(r===O.EMPTY_WIDTH||r===O.LB_WRITE||r===O.LB_CHECK){this.failed=!0;break}}this.computeRuneClasses(),this.stateBudget=n,this.memBudget=n}computeRuneClasses(){const e=new Set,n=r=>{e.add(r),e.add(r+1)};for(let r=0;r<this.prog.numInst();r++){const i=this.prog.getInst(r);switch(i.op){case O.RUNE:case O.RUNE1:if(i.runes.length===1){if(n(i.runes[0]),(i.arg&F.FOLD_CASE)!==0)for(let o=se.simpleFold(i.runes[0]);o!==i.runes[0];o=se.simpleFold(o))n(o)}else for(let o=0;o<i.runes.length;o+=2)e.add(i.runes[o]),e.add(i.runes[o+1]+1);break;case O.RUNE_ANY_NOT_NL:n(10)}}e.delete(0),this.classBounds=Int32Array.from(e).sort(),this.numClasses=this.classBounds.length+1;const s=new Int32Array(se.MAX_LATIN1+1);for(let r=0;r<=se.MAX_LATIN1;r++)s[r]=this.searchClass(r);this.latin1Class=s}runeClass(e){return e<=se.MAX_LATIN1?this.latin1Class[e]:this.searchClass(e)}searchClass(e){const n=this.classBounds;let s=0,r=n.length;for(;s<r;){const i=s+r>>1;n[i]<=e?s=i+1:r=i}return s}computeClosure(e){const n=new Set,s=[...e];let r=!1;const i=new Set;for(;s.length>0;){const l=s.pop();if(n.has(l))continue;n.add(l);const c=this.prog.getInst(l);switch(c.op){case O.MATCH:r=!0,i.add(c.arg);break;case O.ALT:case O.ALT_MATCH:s.push(c.out),s.push(c.arg);break;case O.NOP:case O.CAPTURE:s.push(c.out);break;case O.EMPTY_WIDTH:case O.LB_WRITE:case O.LB_CHECK:return null}}const o=Int32Array.from(n).sort(),a=Array.from(i).sort((l,c)=>l-c);return{pcs:o,isMatch:r,matchIDs:a}}getState(e){const n=this.computeClosure(e);if(!n)return null;const s=n.pcs,r=ow(s);let i=this.stateCache.get(r);if(i)for(let l=0;l<i.length;l++){const c=i[l];if(aw(c.nfaStates,s))return c}const o=Pa.STATE_OVERHEAD+4*s.length+8*n.matchIDs.length;if(this.memBudget<o)return null;this.memBudget-=o,i||(i=[],this.stateCache.set(r,i));const a=new lw(s,n.isMatch,n.matchIDs);return i.push(a),this.stateCount++,a}allocTable(e,n){const s=Pa.TABLE_OVERHEAD+8*this.numClasses;if(this.memBudget<s)return null;this.memBudget-=s;const r=new Array(this.numClasses).fill(null);return n===F.UNANCHORED?e.next=r:e.nextAnchored=r,r}clearCache(){this.stateCache.clear(),this.stateCount=0,this.startState=null,this.memBudget=this.stateBudget}resetCache(e){return this.clearCache(),this.getState(e.nfaStates)}step(e,n,s,r){let i=r===F.UNANCHORED?e.next:e.nextAnchored;if(i!==null){const l=i[n];if(l!==null)return l}else if(i=this.allocTable(e,r),i===null)return null;const o=[];for(let l=0;l<e.nfaStates.length;l++){const c=e.nfaStates[l],u=this.prog.getInst(c);O.isRuneOp(u.op)&&u.matchRune(s)&&o.push(u.out)}r===F.UNANCHORED&&o.push(this.prog.start);const a=this.getState(o);return a===null?null:(i[n]=a,a)}start(){return this.startState===null&&(this.startState=this.getState([this.prog.start]),this.startState===null&&!this.failed&&(this.clearCache(),this.startState=this.getState([this.prog.start]))),this.startState}run(e,n,s,r,i,o){const a=e.endPos(),l=this.latin1Class;let c=-1,u=n;for(;u<a;){const d=e.step(u),h=d>>3,f=d&7;if(f===0)break;const p=h<=se.MAX_LATIN1?l[h]:this.runeClass(h);let m=s===F.UNANCHORED&&r.next!==null?r.next[p]:null;if(m===null&&(m=this.step(r,p,h,s),m===null&&(c>=0&&u-c<Pa.PROGRESS_PER_STATE*this.stateCount||(c=u,r=this.resetCache(r),r===null)||(m=this.step(r,p,h,s),m===null))))return null;r=m,u+=f;const v=i(r,u);if(v!==null)return v;if(r.nfaStates.length===0&&s!==F.UNANCHORED)return o}return o}match(e,n,s){if(this.failed)return null;if((s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&n!==0)return!1;const r=this.start();if(r===null)return null;const i=e.endPos();return r.isMatch&&(s!==F.ANCHOR_BOTH||n===i)?!0:this.run(e,n,s,r,(o,a)=>o.isMatch&&(s!==F.ANCHOR_BOTH||a===i)?!0:null,!1)}matchSet(e,n,s){if(this.failed)return null;if((s===F.ANCHOR_START||s===F.ANCHOR_BOTH)&&n!==0)return[];const r=this.start();if(r===null)return null;const i=e.endPos(),o=new Set,a=(l,c)=>{if(l.isMatch&&(s!==F.ANCHOR_BOTH||c===i))for(let u=0;u<l.matchIDs.length;u++)o.add(l.matchIDs[u]);return null};return a(r,n),this.run(e,n,s,r,a,!1)===null?null:Array.from(o).sort((l,c)=>l-c)}},cw=32,uw=500,wc=256,dw=262144,hw=class{constructor(){this.end=0,this.cap=new Int32Array(0),this.matchcap=new Int32Array(0),this.ncap=0,this.jobPc=new Int32Array(wc),this.jobArg=new Uint8Array(wc),this.jobPos=new Int32Array(wc),this.jobLen=0,this.visited=new Uint32Array(0)}reset(t,e,n){this.end=e,this.jobLen=0,this.ncap=n;const s=t.numInst()*(e+1)+cw-1>>>5;this.visited.length<s?this.visited=new Uint32Array(s):this.visited.fill(0,0,s),this.cap.length<n?this.cap=new Int32Array(n).fill(-1):this.cap.fill(-1,0,n),this.matchcap.length<n?this.matchcap=new Int32Array(n).fill(-1):this.matchcap.fill(-1,0,n)}shouldVisit(t,e){const n=t*(this.end+1)+e,s=n>>>5,r=1<<(n&31);return(this.visited[s]&r)!==0?!1:(this.visited[s]|=r,!0)}push(t,e,n,s){if(t.prog.getInst(e).op!==O.FAIL&&(s||this.shouldVisit(e,n))){if(this.jobLen>=this.jobPc.length){const r=this.jobPc.length*2,i=new Int32Array(r);i.set(this.jobPc),this.jobPc=i;const o=new Uint8Array(r);o.set(this.jobArg),this.jobArg=o;const a=new Int32Array(r);a.set(this.jobPos),this.jobPos=a}this.jobPc[this.jobLen]=e,this.jobArg[this.jobLen]=s?1:0,this.jobPos[this.jobLen]=n,this.jobLen++}}tryBacktrack(t,e,n,s,r){const i=t.longest;for(this.push(t,n,s,!1);this.jobLen>0;){this.jobLen--;let o=this.jobPc[this.jobLen],a=this.jobArg[this.jobLen]===1,l=this.jobPos[this.jobLen],c=!0;for(;!(!c&&!this.shouldVisit(o,l));){c=!1;const u=t.prog.getInst(o);switch(u.op){case O.FAIL:throw new $i("unexpected InstFail");case O.ALT:if(a){a=!1,o=u.arg;continue}else{this.push(t,o,l,!0),o=u.out;continue}case O.ALT_MATCH:{const d=t.prog.getInst(u.out);if(O.isRuneOp(d.op)){this.push(t,u.arg,l,!1),o=u.arg,l=this.end;continue}this.push(t,u.out,this.end,!1),o=u.out;continue}case O.RUNE:{const d=e.step(l);if(d===Mt.EOF()||!u.matchRune(d>>3))break;l+=d&7,o=u.out;continue}case O.RUNE1:{const d=e.step(l);if(d===Mt.EOF()||d>>3!==u.runes[0])break;l+=d&7,o=u.out;continue}case O.RUNE_ANY_NOT_NL:{const d=e.step(l);if(d===Mt.EOF()||d>>3===10)break;l+=d&7,o=u.out;continue}case O.RUNE_ANY:{const d=e.step(l);if(d===Mt.EOF())break;l+=d&7,o=u.out;continue}case O.CAPTURE:if(a){this.cap[u.arg]=l;break}else{u.arg<this.ncap&&(this.push(t,o,this.cap[u.arg],!0),this.cap[u.arg]=l),o=u.out;continue}case O.EMPTY_WIDTH:{const d=e.context(l);if((u.arg&~d)!==0)break;o=u.out;continue}case O.NOP:o=u.out;continue;case O.MATCH:{if(r===F.ANCHOR_BOTH&&l!==this.end)break;if(this.ncap===0)return!0;this.ncap>1&&(this.cap[1]=l);const d=this.matchcap[1];if((d===-1||i&&l>0&&l>d)&&this.matchcap.set(this.cap),!i||l===this.end)return!0;break}case O.LB_WRITE:case O.LB_CHECK:throw new $i("Backtracker cannot evaluate Lookbehind instructions");default:throw new $i("bad inst")}break}}return i&&this.matchcap.length>1&&this.matchcap[1]>=0}},ra=[],ia=class NC{static shouldBacktrack(e){return e.numInst()<=uw}static maxBitStateLen(e){return NC.shouldBacktrack(e)?Math.floor(dw/e.numInst()):0}static execute(e,n,s,r,i){const o=e.cond;if(o===Be.EMPTY_ALL||(r===F.ANCHOR_START||r===F.ANCHOR_BOTH)&&s!==0||(o&Be.EMPTY_BEGIN_TEXT)!==0&&s!==0)return null;const a=ra.length>0?ra.pop():new hw,l=n.endPos();a.reset(e.prog,l,i);let c=!1;if((o&Be.EMPTY_BEGIN_TEXT)!==0||r===F.ANCHOR_START||r===F.ANCHOR_BOTH)a.ncap>0&&(a.cap[0]=s),a.tryBacktrack(e,n,e.prog.start,s,r)&&(c=!0);else{let d=-1;for(;s<=l&&d!==0;s+=d){if(e.prefix.length>0){const f=n.index(e,s);if(f<0)break;s+=f}if(a.ncap>0&&(a.cap[0]=s),a.tryBacktrack(e,n,e.prog.start,s,r)){c=!0;break}const h=n.step(s);d=h===Mt.EOF()?0:h&7}}if(!c)return ra.push(a),null;const u=i===0?[]:Be.toArray(a.matchcap.subarray(0,i));return ra.push(a),u}},QB=class{constructor(t){this.sparse=new Uint32Array(t),this.dense=new Uint32Array(t),this.size=0,this.nextIndex=0}empty(){return this.nextIndex>=this.size}next(){return this.dense[this.nextIndex++]}clear(){this.size=0,this.nextIndex=0}contains(t){return t<this.sparse.length&&this.sparse[t]<this.size&&this.dense[this.sparse[t]]===t}insert(t){this.contains(t)||this.insertNew(t)}insertNew(t){t>=this.sparse.length||(this.sparse[t]=this.size,this.dense[this.size]=t,this.size++)}},Bw=(t,e,n,s)=>{const r=t.length,i=e.length;let o=0,a=0;const l=[],c=[];let u=!0,d=-1;const h=f=>{const p=f?t:e,m=f?o:a,v=f?n:s;return d>0&&p[m]<=l[d]?!1:(l.push(p[m],p[m+1]),f?o+=2:a+=2,d+=2,c.push(v),!0)};for(;o<r||a<i;)if(a>=i?u=h(!0):o>=r||e[a]<t[o]?u=h(!1):u=h(!0),!u)return null;return{merged:l,next:c}},fw=class{constructor(t){this.start=t.start,this.numCap=t.numCap,this.inst=new Array(t.inst.length);for(let e=0;e<t.inst.length;e++){const n=t.inst[e],s=new O(n.op);s.out=n.out,s.arg=n.arg,s.runes=n.runes?new Int32Array(n.runes):new Int32Array(0),s.next=null,this.inst[e]=s}}},pw=t=>{const e=new fw(t);for(let n=0;n<e.inst.length;n++){const s=e.inst[n];if(s.op!==O.ALT&&s.op!==O.ALT_MATCH)continue;let r="out",i="arg",o=e.inst[s[i]];if(o.op!==O.ALT&&o.op!==O.ALT_MATCH&&(r="arg",i="out",o=e.inst[s[i]],o.op!==O.ALT&&o.op!==O.ALT_MATCH))continue;const a=e.inst[s[r]];if(a.op===O.ALT||a.op===O.ALT_MATCH)continue;let l="out",c="arg",u=!1;o.out===n?u=!0:o.arg===n&&(u=!0,l="arg",c="out"),u&&(o[l]=s[r]),s[r]===o[l]&&(s[i]=o[c])}return e},mw=t=>{if(t.inst.length>=1e3)return null;const e=new QB(t.inst.length),n=new QB(t.inst.length),s=new Array(t.inst.length),r=new Array(t.inst.length).fill(!1),i=o=>{let a=!0;const l=t.inst[o];if(n.contains(o))return!0;switch(n.insert(o),l.op){case O.ALT:case O.ALT_MATCH:{a=i(l.out)&&i(l.arg);let c=r[l.out],u=r[l.arg];if(c&&u)return!1;if(u){const p=l.out;l.out=l.arg,l.arg=p;const m=c;c=u,u=m}c&&(r[o]=!0,l.op=O.ALT_MATCH);const d=s[l.out]||[],h=s[l.arg]||[],f=Bw(d,h,l.out,l.arg);if(!f)return!1;s[o]=new Int32Array(f.merged),l.next=new Uint32Array(f.next);break}case O.CAPTURE:case O.EMPTY_WIDTH:case O.NOP:a=i(l.out),r[o]=r[l.out],s[o]=s[l.out]?new Int32Array(s[l.out]):new Int32Array(0),l.next=new Uint32Array(Math.floor(s[o].length/2)+1).fill(l.out);break;case O.MATCH:case O.FAIL:r[o]=l.op===O.MATCH;break;case O.RUNE:{if(r[o]=!1,l.next&&l.next.length>0)break;if(e.insert(l.out),!l.runes||l.runes.length===0){s[o]=new Int32Array(0),l.next=new Uint32Array([l.out]);break}let c=[];if(l.runes.length===1&&(l.arg&F.FOLD_CASE)!==0){const u=l.runes[0];c.push(u,u);for(let d=se.simpleFold(u);d!==u;d=se.simpleFold(d))c.push(d,d);c.sort((d,h)=>d-h)}else for(let u=0;u<l.runes.length;u++)c.push(l.runes[u]);s[o]=new Int32Array(c),l.next=new Uint32Array(Math.floor(c.length/2)+1).fill(l.out),l.op=O.RUNE;break}case O.RUNE1:{if(r[o]=!1,l.next&&l.next.length>0)break;e.insert(l.out);let c=[];if((l.arg&F.FOLD_CASE)!==0){const u=l.runes[0];c.push(u,u);for(let d=se.simpleFold(u);d!==u;d=se.simpleFold(d))c.push(d,d);c.sort((d,h)=>d-h)}else c.push(l.runes[0],l.runes[0]);s[o]=new Int32Array(c),l.next=new Uint32Array(Math.floor(c.length/2)+1).fill(l.out),l.op=O.RUNE;break}case O.RUNE_ANY:if(r[o]=!1,l.next&&l.next.length>0)break;e.insert(l.out),s[o]=new Int32Array([0,se.MAX_RUNE]),l.next=new Uint32Array([l.out]);break;case O.RUNE_ANY_NOT_NL:if(r[o]=!1,l.next&&l.next.length>0)break;e.insert(l.out),s[o]=new Int32Array([0,9,11,se.MAX_RUNE]),l.next=new Uint32Array(Math.floor(s[o].length/2)+1).fill(l.out)}return a};for(e.clear(),e.insert(t.start);!e.empty();)if(n.clear(),!i(e.next()))return null;for(let o=0;o<t.inst.length;o++)s[o]&&(t.inst[o].runes=s[o]);return t},gw=(t,e)=>{for(let n=0;n<e.inst.length;n++){const s=e.inst[n];switch(s.op){case O.ALT:case O.ALT_MATCH:case O.RUNE:break;case O.CAPTURE:case O.EMPTY_WIDTH:case O.NOP:case O.MATCH:case O.FAIL:t.inst[n].next=null;break;case O.RUNE1:case O.RUNE_ANY:case O.RUNE_ANY_NOT_NL:t.inst[n].next=null,t.inst[n].op=s.op,t.inst[n].runes=s.runes?new Int32Array(s.runes):new Int32Array(0)}}},ZB=class OC{static compile(e){if(e.start===0||e.numLb>0)return null;const n=e.inst[e.start];if(n.op!==O.EMPTY_WIDTH||(n.arg&Be.EMPTY_BEGIN_TEXT)===0)return null;let s=!1;for(let i=0;i<e.inst.length;i++)if(e.inst[i].op===O.ALT||e.inst[i].op===O.ALT_MATCH){s=!0;break}for(let i=0;i<e.inst.length;i++){const o=e.inst[i],a=e.inst[o.out].op;switch(o.op){case O.ALT:case O.ALT_MATCH:if(a===O.MATCH||e.inst[o.arg].op===O.MATCH)return null;break;case O.EMPTY_WIDTH:if(a===O.MATCH){if((o.arg&Be.EMPTY_END_TEXT)===Be.EMPTY_END_TEXT)continue;return null}break;default:if(a===O.MATCH&&s)return null}}let r=pw(e);return r=mw(r),r!==null&&gw(r,e),r}static next(e,n){const s=e.matchRunePos(n);return s>=0?e.next[s]:e.op===O.ALT_MATCH?e.out:0}static execute(e,n,s,r,i){const o=e.onepass;if(!o)return null;const a=new Int32Array(i).fill(-1);let l=!1,c=n.step(s),u=c>>3,d=c&7,h=Mt.EOF(),f=-1,p=0;c!==Mt.EOF()&&(h=n.step(s+d),h!==Mt.EOF()&&(f=h>>3,p=h&7));let m=s===0?Be.emptyOpContext(-1,u):n.context(s),v=o.start,E;for(;;){switch(E=o.inst[v],v=E.out,E.op){case O.MATCH:return r===F.ANCHOR_BOTH&&s!==n.endPos()?null:(l=!0,a.length>0&&(a[0]=0,a[1]=s),i===0?[]:Be.toArray(a));case O.RUNE:if(!E.matchRune(u))return null;break;case O.RUNE1:if(u!==E.runes[0])return null;break;case O.RUNE_ANY:break;case O.RUNE_ANY_NOT_NL:if(u===10)return null;break;case O.ALT:case O.ALT_MATCH:v=OC.next(E,u);continue;case O.FAIL:return null;case O.NOP:continue;case O.EMPTY_WIDTH:if((E.arg&~m)!==0)return null;continue;case O.CAPTURE:E.arg<a.length&&(a[E.arg]=s);continue;default:throw new $i("bad inst")}if(d===0)break;m=Be.emptyOpContext(u,f),s+=d,u=f,d=p,u!==-1&&(h=n.step(s+d),h!==Mt.EOF()?(f=h>>3,p=h&7):(f=-1,p=0))}return l?i===0?[]:Be.toArray(a):null}},D=class ve{static Op=wC(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","PLB","NLB","LEFT_PAREN","VERTICAL_BAR"]);static isPseudoOp(e){return e>=ve.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen(e){return e===_.CODES.get("-")?"\\":""}static fromRegexp(e){const n=new ve(e.op);return n.flags=e.flags,n.subs=e.subs,n.runes=e.runes,n.cap=e.cap,n.min=e.min,n.max=e.max,n.name=e.name,n.namedGroups=e.namedGroups,n.lb=e.lb,n}constructor(e){this.op=e,this.flags=0,this.subs=ve.emptySubs(),this.runes=new Int32Array(0),this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups=Object.create(null),this.lb=0}reinit(){this.flags=0,this.subs=ve.emptySubs(),this.runes=new Int32Array(0),this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups=Object.create(null),this.lb=0}toString(){return this.appendTo()}appendTo(){let e="";switch(this.op){case ve.Op.NO_MATCH:e+="[^\\x00-\\x{10FFFF}]";break;case ve.Op.EMPTY_MATCH:e+="(?:)";break;case ve.Op.STAR:case ve.Op.PLUS:case ve.Op.QUEST:case ve.Op.REPEAT:{const n=this.subs[0];switch(n.op>ve.Op.CAPTURE||n.op===ve.Op.LITERAL&&n.runes.length>1?e+=`(?:${n.appendTo()})`:e+=n.appendTo(),this.op){case ve.Op.STAR:e+="*";break;case ve.Op.PLUS:e+="+";break;case ve.Op.QUEST:e+="?";break;case ve.Op.REPEAT:e+=`{${this.min}`,this.min!==this.max&&(e+=",",this.max>=0&&(e+=this.max)),e+="}"}(this.flags&F.NON_GREEDY)!==0&&(e+="?");break}case ve.Op.CONCAT:for(let n of this.subs)n.op===ve.Op.ALTERNATE?e+=`(?:${n.appendTo()})`:e+=n.appendTo();break;case ve.Op.ALTERNATE:{let n="";for(let s of this.subs)e+=n,n="|",e+=s.appendTo();break}case ve.Op.LITERAL:(this.flags&F.FOLD_CASE)!==0&&(e+="(?i:");for(let n of this.runes)e+=Be.escapeRune(n);(this.flags&F.FOLD_CASE)!==0&&(e+=")");break;case ve.Op.ANY_CHAR_NOT_NL:e+="(?-s:.)";break;case ve.Op.ANY_CHAR:e+="(?s:.)";break;case ve.Op.PLB:e+=`(?<=${this.subs[0].appendTo()})`;break;case ve.Op.NLB:e+=`(?<!${this.subs[0].appendTo()})`;break;case ve.Op.CAPTURE:this.name===null||this.name.length===0?e+="(":e+=`(?P<${this.name}>`,this.subs[0].op!==ve.Op.EMPTY_MATCH&&(e+=this.subs[0].appendTo()),e+=")";break;case ve.Op.BEGIN_TEXT:e+="\\A";break;case ve.Op.END_TEXT:(this.flags&F.WAS_DOLLAR)!==0?e+="(?-m:$)":e+="\\z";break;case ve.Op.BEGIN_LINE:e+="^";break;case ve.Op.END_LINE:e+="$";break;case ve.Op.WORD_BOUNDARY:e+="\\b";break;case ve.Op.NO_WORD_BOUNDARY:e+="\\B";break;case ve.Op.CHAR_CLASS:if(this.runes.length%2!==0){e+="[invalid char class]";break}if(e+="[",this.runes.length===0)e+="^\\x00-\\x{10FFFF}";else if(this.runes[0]===0&&this.runes[this.runes.length-1]===se.MAX_RUNE){e+="^";for(let n=1;n<this.runes.length-1;n+=2){const s=this.runes[n]+1,r=this.runes[n+1]-1;e+=ve.quoteIfHyphen(s),e+=Be.escapeRune(s),s!==r&&(e+="-",e+=ve.quoteIfHyphen(r),e+=Be.escapeRune(r))}}else for(let n=0;n<this.runes.length;n+=2){const s=this.runes[n],r=this.runes[n+1];e+=ve.quoteIfHyphen(s),e+=Be.escapeRune(s),s!==r&&(e+="-",e+=ve.quoteIfHyphen(r),e+=Be.escapeRune(r))}e+="]";break;default:e+=this.op}return e}maxCap(){let e=0;if(this.op===ve.Op.CAPTURE&&(e=this.cap),this.subs!==null)for(let n of this.subs){const s=n.maxCap();e<s&&(e=s)}return e}equals(e){if(!(e!==null&&e instanceof ve)||this.op!==e.op)return!1;switch(this.op){case ve.Op.END_TEXT:if((this.flags&F.WAS_DOLLAR)!==(e.flags&F.WAS_DOLLAR))return!1;break;case ve.Op.LITERAL:case ve.Op.CHAR_CLASS:if(this.runes===null&&e.runes===null)break;if(this.runes===null||e.runes===null||this.runes.length!==e.runes.length)return!1;for(let n=0;n<this.runes.length;n++)if(this.runes[n]!==e.runes[n])return!1;break;case ve.Op.ALTERNATE:case ve.Op.CONCAT:if(this.subs.length!==e.subs.length)return!1;for(let n=0;n<this.subs.length;++n)if(!this.subs[n].equals(e.subs[n]))return!1;break;case ve.Op.STAR:case ve.Op.PLUS:case ve.Op.QUEST:if((this.flags&F.NON_GREEDY)!==(e.flags&F.NON_GREEDY)||!this.subs[0].equals(e.subs[0]))return!1;break;case ve.Op.REPEAT:if((this.flags&F.NON_GREEDY)!==(e.flags&F.NON_GREEDY)||this.min!==e.min||this.max!==e.max||!this.subs[0].equals(e.subs[0]))return!1;break;case ve.Op.CAPTURE:if(this.cap!==e.cap||(this.name===null?e.name!==null:this.name!==e.name)||!this.subs[0].equals(e.subs[0]))return!1;break;case ve.Op.PLB:case ve.Op.NLB:if(this.lb!==e.lb||!this.subs[0].equals(e.subs[0]))return!1}return!0}},Th=class{static walk(t,e){const n=[];let s=t,r;for(;;){if(s.subs.length===0)r=e.leaf(s);else{const i=e.enter(s);if(i.result===void 0){n.push({re:s,state:i,i:0}),s=s.subs[0];continue}r=i.result}for(;;){if(n.length===0)return r;const i=n[n.length-1];if(e.child(i.re,i.state,r,i.i),i.i++,i.state.result===void 0&&i.i<i.re.subs.length){s=i.re.subs[i.i];break}n.pop(),r=i.state.result!==void 0?i.state.result:e.leave(i.re,i.state)}}}},ef=class{constructor(t,e){const n=new Map,s=[0],r=[0],i=[0],o=[0];for(const p of t){let m=0;for(let v=0;v<p.length;v++){const E=m*e+p[v];let S=n.get(E);S===void 0&&(S=s.length,n.set(E,S),s.push(m),r.push(p[v]),i.push(i[m]+1),o.push(0)),m=S}o[m]=1}const a=s.length,l=new Int32Array(a-1);for(let p=1;p<a;p++)l[p-1]=p;l.sort((p,m)=>s[p]-s[m]||r[p]-r[m]);const c=new Int32Array(a+1);for(let p=1;p<a;p++)c[s[p]+1]++;for(let p=0;p<a;p++)c[p+1]+=c[p];const u=new Int32Array(a-1);for(let p=0;p<l.length;p++)u[p]=r[l[p]];this.childStart=c,this.childUnit=u,this.childNode=l;const d=new Int32Array(a);for(let p=0;p<a;p++)d[p]=p;d.sort((p,m)=>i[p]-i[m]);const h=new Int32Array(a),f=Uint8Array.from(o);for(let p=1;p<a;p++){const m=d[p],v=s[m];if(v!==0){let E=h[v],S=this.next(E,r[m]);for(;S<0&&E!==0;)E=h[E],S=this.next(E,r[m]);h[m]=S>=0?S:0}f[m]|=f[h[m]]}this.fail=h,this.match=f}next(t,e){let n=this.childStart[t],s=this.childStart[t+1];const r=this.childUnit;for(;n<s;){const i=n+s>>1,o=r[i];if(o===e)return this.childNode[i];o<e?n=i+1:s=i}return-1}advance(t,e){for(;;){const n=this.next(t,e);if(n>=0)return n;if(t===0)return 0;t=this.fail[t]}}searchUTF16(t,e,n){let s=0;for(let r=e;r<n;r++)if(s=this.advance(s,t.charCodeAt(r)),this.match[s]===1)return!0;return!1}searchUTF8(t,e,n){let s=0;for(let r=e;r<n;r++)if(s=this.advance(s,t[r]),this.match[s]===1)return!0;return!1}},Se=class xr{static Type={NONE:0,EXACT:1,AND:2,OR:3};static MAX_SCANS=32;static MAX_AC_UNITS=1<<18;constructor(e){this.type=e,this.subs=[],this.str="",this.bytes=null,this.cost=e===xr.Type.EXACT?1:0,this.allExact=!1,this.ac16=null,this.ac8=null}automaton16(){if(this.ac16===null){const e=this.subs.map(n=>{const s=new Array(n.str.length);for(let r=0;r<n.str.length;r++)s[r]=n.str.charCodeAt(r);return s});this.ac16=new ef(e,65536)}return this.ac16}automaton8(){return this.ac8===null&&(this.ac8=new ef(this.subs.map(e=>e.bytes),256)),this.ac8}eval(e,n){switch(this.type){case xr.Type.NONE:return!0;case xr.Type.EXACT:return e.hasString(this,n);case xr.Type.AND:for(let s=0;s<this.subs.length;s++)if(!this.subs[s].eval(e,n))return!1;return!0;case xr.Type.OR:if(this.allExact)return e.hasAnyString(this,n);for(let s=0;s<this.subs.length;s++)if(this.subs[s].eval(e,n))return!0;return!1;default:return!0}}},Cw=class Dr{static build(e){return e?Th.walk(e,Dr.WALKER):new Se(Se.Type.NONE)}static WALKER={leaf:e=>Dr.leaf(e),enter:e=>Dr.enter(e),child:(e,n,s)=>Dr.child(e,n,s),leave:(e,n)=>Dr.leave(e,n)};static leaf(e){if(e.op!==D.Op.LITERAL)return new Se(Se.Type.NONE);if(e.runes.length===0||(e.flags&F.FOLD_CASE)!==0)return new Se(Se.Type.NONE);let n="";for(let r=0;r<e.runes.length;r++){if(se.isUnsearchable(e.runes[r]))return new Se(Se.Type.NONE);n+=String.fromCodePoint(e.runes[r])}const s=new Se(Se.Type.EXACT);return s.str=n,s.bytes=Be.stringToUtf8ByteArray(s.str),s}static enter(e){switch(e.op){case D.Op.CAPTURE:case D.Op.PLUS:return{sub:null};case D.Op.REPEAT:return e.min>=1?{sub:null}:{result:new Se(Se.Type.NONE)};case D.Op.CONCAT:return{pf:new Se(Se.Type.AND),subs:[]};case D.Op.ALTERNATE:return{pf:new Se(Se.Type.OR),subs:[]};default:return{result:new Se(Se.Type.NONE)}}}static child(e,n,s){if(n.subs===void 0){n.sub=s;return}if(n.pf.type===Se.Type.AND){if(s.type===Se.Type.NONE)return;if(s.type===Se.Type.AND){for(let r=0;r<s.subs.length;r++)n.subs.push(s.subs[r]);return}n.subs.push(s);return}if(s.type===Se.Type.NONE){n.result=new Se(Se.Type.NONE);return}if(s.type===Se.Type.OR){for(let r=0;r<s.subs.length;r++)n.subs.push(s.subs[r]);return}n.subs.push(s)}static leave(e,n){if(n.subs===void 0)return n.sub;const s=n.pf,r=new Set,i=[];for(const c of n.subs){if(c.type===Se.Type.EXACT){if(r.has(c.str))continue;r.add(c.str)}i.push(c)}if(s.type===Se.Type.AND){const c=[];let u=0;for(const d of i)u+d.cost>Se.MAX_SCANS||(c.push(d),u+=d.cost);return c.length===0?new Se(Se.Type.NONE):c.length===1?c[0]:(s.subs=c,s.cost=u,s)}if(i.length===0)return new Se(Se.Type.NONE);if(i.length===1)return i[0];s.subs=i;let o=!0,a=0,l=0;for(const c of i)c.type!==Se.Type.EXACT?o=!1:l+=c.bytes.length,a+=c.cost;return o?l>Se.MAX_AC_UNITS?new Se(Se.Type.NONE):(s.allExact=!0,s.cost=1,s):a>Se.MAX_SCANS?new Se(Se.Type.NONE):(s.cost=a,s)}},en=class{constructor(t=0,e=0){this.head=t,this.tail=e}},vw=class{constructor(){this.inst=[],this.start=0,this.numCap=2,this.lbStarts=[],this.numLb=0,this.lbInst=null}getInst(t){return this.inst[t]}numInst(){return this.inst.length}addInst(t){this.inst.push(new O(t))}markLookbehindInsts(){const t=new Uint8Array(this.inst.length),e=this.lbStarts.slice();for(;e.length>0;){const n=e.pop();if(n===0||t[n]===1)continue;t[n]=1;const s=this.inst[n];switch(s.op){case O.ALT:case O.ALT_MATCH:e.push(s.out,s.arg);break;case O.MATCH:case O.FAIL:break;default:e.push(s.out)}}this.lbInst=t}skipNop(t){let e=this.inst[t];for(;e.op===O.NOP||e.op===O.CAPTURE;)e=this.inst[t],t=e.out;return e}prefix(){let t="",e=this.skipNop(this.start);if(!O.isRuneOp(e.op)||e.runes.length!==1)return[e.op===O.MATCH,t];for(;O.isRuneOp(e.op)&&e.runes.length===1&&(e.arg&F.FOLD_CASE)===0&&!se.isUnsearchable(e.runes[0]);)t+=String.fromCodePoint(e.runes[0]),e=this.skipNop(e.out);return[e.op===O.MATCH,t]}startCond(){let t=0,e=this.start;e:for(;;){const n=this.inst[e];switch(n.op){case O.EMPTY_WIDTH:t|=n.arg;break;case O.FAIL:return-1;case O.CAPTURE:case O.NOP:break;default:break e}e=n.out}return t}patch(t,e){let n=t.head;for(;n!==0;){const s=this.inst[n>>1];(n&1)===0?(n=s.out,s.out=e):(n=s.arg,s.arg=e)}}append(t,e){if(t.head===0)return e;if(e.head===0)return t;const n=this.inst[t.tail>>1];return(t.tail&1)===0?n.out=e.head:n.arg=e.head,new en(t.head,e.tail)}toString(){let t="";for(let e=0;e<this.inst.length;e++){const n=t.length;t+=e,e===this.start&&(t+="*"),t+=" ".substring(t.length-n),t+=this.inst[e],t+=`
@@ -49,4 +49,4 @@ ${o}`:o}}var O1=(t,e)=>{const n=typeof t=="string"?N1(t,e):null;return Su.error(
49
49
  
50
50
  `),s=e.startsWith("ÿØÿ");if(!n&&!s)throw new Error("PLUGIN_REPLAY_IMAGE_INVALID");return`data:image/${n?"png":"jpeg"};base64,${t}`}function lH(t,e){t!==void 0&&AB(t);const n=e?zS(e):void 0;return`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-src 'none'; connect-src 'none'"><meta name="referrer" content="no-referrer"><style>html,body{margin:0}img{display:block;max-width:100%;height:auto}</style></head><body>${n?`<img alt="Captured workspace" src="${n}">`:"<p>No captured image available.</p>"}</body></html>`}function zm({recording:t,screenshotBase64:e}){let n;try{n=lH(t,e)}catch{return(0,B.jsx)("p",{role:"status",className:"text-xs text-muted-foreground",children:"Unsupported workspace capture."})}return(0,B.jsx)("iframe",{title:"Recorded plugin workspace",sandbox:"",referrerPolicy:"no-referrer",srcDoc:n,className:"h-96 w-full rounded-md border border-border bg-background"})}function cH({recording:t,screenshotUrl:e}){const n=mB(e??void 0),[s,r]=(0,g.useState)();let i=!1;try{t!==void 0&&AB(t),i=!0}catch{}return(0,g.useEffect)(()=>{if(!i||!n)return;const o=new AbortController;return(async()=>{try{if(!Ko(n))throw new Error("Owned screenshot link unavailable");const a=await RP(n,{signal:o.signal,credentials:"omit",redirect:"error"});if(!a.ok||!a.body)throw new Error("Screenshot unavailable");const l=a.body.getReader(),c=[];let u=0;try{for(;;){const{done:m,value:v}=await l.read();if(m)break;if(u+=v.byteLength,u>1048576)throw new Error("Screenshot too large");c.push(v)}}finally{await l.cancel().catch(()=>{}),l.releaseLock()}const d=new Uint8Array(u);let h=0;for(const m of c)d.set(m,h),h+=m.length;let f="";for(let m=0;m<d.length;m+=8192)f+=String.fromCharCode(...d.subarray(m,m+8192));const p=btoa(f);zS(p),o.signal.aborted||r({url:n,base64:p})}catch{o.signal.aborted||r({url:n,failed:!0})}})(),()=>o.abort()},[n,i]),i?n&&s?.url!==n?(0,B.jsx)("p",{role:"status",className:"text-xs text-muted-foreground",children:"Loading captured workspace…"}):(0,B.jsxs)("div",{className:"space-y-2",children:[s?.failed?(0,B.jsx)("p",{role:"status",className:"text-xs text-muted-foreground",children:"Captured image unavailable."}):null,(0,B.jsx)(zm,{recording:t,screenshotBase64:n?s?.base64:void 0})]}):(0,B.jsx)(zm,{recording:t})}var uH=500,dH={ok:"border-success/30 bg-success/10 text-success",error:"border-destructive/30 bg-destructive/10 text-destructive",unknown:"border-border/50 bg-muted/40 text-muted-foreground"};function $S(t){switch(t){case"left_click":return"Click";case"double_click":return"Double-click";case"right_click":return"Right-click";case"mouse_move":return"Move";case"type":return"Type";case"key":return"Key";case"scroll":return"Scroll";case"wait":return"Wait";case"screenshot":return"Assert";default:return t}}function ri(t){const e=$S(t.action),n=t.locatorLabel?.trim();return n?`Interact · ${e} ${n}`:`Interact · ${e}`}function Rl(t){return t.assertion?t.assertion.passed?"ok":"error":t.ok===!0?"ok":t.ok===!1?"error":"unknown"}function Di(t){return`${t.toolCallId}:${t.stepIndex}`}function hH(t){if(!t)return[];const e=[];return typeof t.durationMs=="number"&&t.durationMs>0&&e.push({key:"duration",label:BH(t.durationMs),...typeof t.distinctFrames=="number"?{title:`${t.distinctFrames.toLocaleString()} distinct frames — identical frames are dropped, so an idle page costs none`}:{}}),typeof t.fps=="number"&&t.fps>0&&e.push({key:"fps",label:`${t.fps} fps`}),e}function BH(t){const e=Math.round(t/1e3),n=e%60,s=Math.floor(e/60)%60,r=Math.floor(e/3600),i=String(s).padStart(r>0?2:1,"0");return r>0?`${r}:${i}:${String(n).padStart(2,"0")}`:`${i}:${String(n).padStart(2,"0")}`}function JS(t){return typeof t=="string"&&t.length>0?t:null}function fz(t){return(t.widgetRenderObservations?.length??0)>0||(t.browserInteractionSteps?.length??0)>0||JS(t.videoUrl)!==null}function fH(t){return t==="ok"?"OK":t==="error"?"Failed":"Unknown"}function WS({step:t,leading:e,className:n}){const s=Rl(t),r=t.widgetToolCalls??[],i=t.coordinateX!=null&&t.coordinateY!=null?`(${t.coordinateX}, ${t.coordinateY})`:null;return(0,B.jsxs)("div",{"data-testid":"browser-step-detail",className:ge("flex flex-col gap-4",n),children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[e,(0,B.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,B.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:ri(t)}),(0,B.jsxs)("p",{className:"text-xs text-muted-foreground",children:["App interaction · ",t.elapsedMs,"ms",i?` · ${i}`:""]})]}),(0,B.jsx)("span",{className:ge("inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-[11px] font-medium",dH[s]),children:fH(s)})]}),t.assertion&&!t.assertion.passed&&t.assertion.reason?(0,B.jsx)("p",{className:"text-xs text-destructive",children:t.assertion.reason}):null,t.pluginWorkspace?(0,B.jsx)(cH,{recording:t.pluginWorkspace,screenshotUrl:t.screenshotUrl}):t.screenshotUrl?(0,B.jsx)(uS,{src:t.screenshotUrl,alt:ri(t),className:"max-h-72 w-full rounded-md border border-border/50 object-contain"}):null,r.length>0?(0,B.jsxs)("div",{className:"space-y-1.5",children:[(0,B.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Widget tool calls"}),r.map((o,a)=>(0,B.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs",children:[(0,B.jsx)("span",{className:ge("inline-block h-1.5 w-1.5 shrink-0 rounded-full",o.ok?"bg-success":"bg-destructive"),"aria-hidden":!0}),(0,B.jsx)("span",{className:"font-mono text-foreground",children:o.name}),o.error?(0,B.jsx)("span",{className:"truncate text-destructive",children:o.error}):null]},`${o.name}-${a}`))]}):null,t.followUps&&t.followUps.length>0?(0,B.jsxs)("div",{className:"space-y-1.5",children:[(0,B.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Sent message to chat"}),t.followUps.map((o,a)=>(0,B.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs",children:[(0,B.jsx)("span",{"aria-hidden":!0,children:"↳"}),(0,B.jsx)("span",{className:"truncate text-foreground",children:o})]},a))]}):null]})}function pH(t){const e=Math.floor(t/1e3),n=Math.floor(e/60),s=e%60;return`${n}:${String(s).padStart(2,"0")}`}function mH(t,e){let n=null;for(const s of t)if(s.videoOffsetMs!=null)if(s.videoOffsetMs<=e)n=s;else break;return n}function pz({steps:t,videoUrl:e,videoMeta:n,isRunning:s=!1,className:r}){const i=(0,g.useRef)(null),[o,a]=(0,g.useState)(null),[l,c]=(0,g.useState)(null),u=(0,g.useRef)(null),[d,h]=(0,g.useState)(!1),[f,p]=(0,g.useState)(null),m=mB(JS(e)),v=(0,g.useMemo)(()=>hH(n),[n]),E=(0,g.useMemo)(()=>[...t].sort((P,V)=>(P.videoOffsetMs??Number.POSITIVE_INFINITY)-(V.videoOffsetMs??Number.POSITIVE_INFINITY)||P.promptIndex-V.promptIndex||P.ts-V.ts),[t]),S=o??l??null,A=(0,g.useMemo)(()=>E.find(P=>Di(P)===S)??null,[E,S]),N=m!=null&&!d,k=E.some(P=>P.screenshotUrl),R=(0,g.useCallback)(P=>{a(Di(P));const V=i.current;if(!V||!N||P.videoOffsetMs==null)return;const U=P.videoOffsetMs/1e3;u.current=U,V.currentTime=U},[N]),T=(0,g.useCallback)(()=>{u.current=null},[]),Q=(0,g.useCallback)(()=>{const P=i.current;if(!P)return;const V=mH(E,P.currentTime*1e3);if(c(V?Di(V):null),u.current==null){if(o!=null){const U=E.find(j=>Di(j)===o);if(U?.videoOffsetMs!=null){const j=U.videoOffsetMs-P.currentTime*1e3;if(j>0&&j<uH)return}}a(null)}},[E,o]);return(0,g.useEffect)(()=>{h(!1)},[m]),(0,g.useEffect)(()=>{if(!f||f.url!==m)return;const P=setTimeout(()=>{p(null),h(!1)},f.delayMs);return()=>clearTimeout(P)},[f,m]),E.length===0&&!m?(0,B.jsx)("div",{className:"flex items-center justify-center rounded-md border border-dashed border-border/40 py-8 text-xs text-muted-foreground","data-testid":"browser-filmstrip-empty",children:s?"Finalizing replay…":"No app interactions were recorded."}):(0,B.jsxs)("section",{className:ge("flex min-w-0 flex-col gap-3",r),"data-testid":"browser-step-filmstrip",children:[(0,B.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,B.jsxs)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Replay",(0,B.jsx)("span",{className:"ml-1.5 font-normal normal-case text-muted-foreground/70",children:"screen recording of the app interactions in this run"})]}),m&&!d&&(v.length>0||n?.truncated)?(0,B.jsxs)("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground","data-testid":"browser-replay-video-meta",children:[v.map(P=>(0,B.jsx)("span",{title:P.title,children:P.label},P.key)),n?.truncated?(0,B.jsx)("span",{className:"rounded-sm border border-warning/30 bg-warning/10 px-1.5 py-px font-medium text-warning-foreground","data-testid":"browser-replay-truncated-badge",title:"The recorder stopped at its size limit, so this video covers the beginning of the run and not the end of it.",children:"Stopped at the size limit"}):null]}):null,m&&!d?(0,B.jsx)("video",{ref:i,src:m,controls:!0,preload:"metadata",onTimeUpdate:Q,onSeeked:T,onError:()=>{const P=lS(m);h(!0),p(P!==null&&P>0?{url:m,delayMs:P}:null)},onLoadedMetadata:()=>cS(m),className:"w-full rounded-md border border-border/60 bg-black","data-testid":"browser-replay-video"}):(0,B.jsx)("p",{className:"rounded-md border border-dashed border-border/50 bg-muted/20 px-3 py-2 text-[11px] text-muted-foreground","data-testid":"browser-replay-video-unavailable",children:s?"Finalizing replay — the recording is written when the run ends.":d?k?"Recording failed to load — screenshots preserved.":"Recording failed to load, and no screenshots were captured.":k?"Video unavailable — screenshots preserved.":"Partial capture — no recording, and no screenshots survived."})]}),E.length>0?(0,B.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,B.jsx)("div",{className:"flex min-w-0 gap-2 overflow-x-auto pb-1","data-testid":"browser-filmstrip-track",children:E.map(P=>{const V=Di(P),U=Rl(P),j=V===S;return(0,B.jsxs)("button",{type:"button",onClick:()=>R(P),"aria-pressed":j,title:ri(P),"data-testid":"browser-filmstrip-frame","data-step-key":V,"data-active":j?"true":"false",className:ge("flex w-28 shrink-0 flex-col gap-1 rounded-md border p-1 text-left transition-colors",j?"border-primary bg-primary/5":"border-border/50 hover:border-border"),children:[P.pluginWorkspace?(0,B.jsx)("span",{className:"text-xs text-muted-foreground",children:"Workspace capture"}):P.screenshotUrl?(0,B.jsx)(uS,{src:P.screenshotUrl,alt:ri(P),loading:"lazy",className:"h-16 w-full rounded-sm border border-border/40 bg-background object-cover object-top"}):(0,B.jsx)("div",{className:"flex h-16 w-full items-center justify-center rounded-sm border border-dashed border-border/50 bg-muted/20 text-[10px] text-muted-foreground",children:"No frame"}),(0,B.jsx)("span",{className:"truncate text-[10px] font-medium text-foreground",children:$S(P.action)}),(0,B.jsx)("span",{className:ge("truncate text-[10px]",U==="error"?"text-destructive":"text-muted-foreground"),children:P.videoOffsetMs!=null?pH(P.videoOffsetMs):`turn ${P.promptIndex+1}`})]},V)})}),A?(0,B.jsx)(WS,{step:A,className:"rounded-lg bg-muted/5 px-4 py-4"}):(0,B.jsx)("p",{className:"px-1 text-[11px] text-muted-foreground",children:"Select a frame to see the interaction that produced it."})]}):null]})}function gH(t){const e=[];for(const n of t)n?.event&&e.push({promptIndex:n.promptIndex,...typeof n.startedAtMs=="number"&&Number.isFinite(n.startedAtMs)?{turnStartedAtMs:n.startedAtMs}:{},event:n.event});return e.sort((n,s)=>n.promptIndex-s.promptIndex)}function mz(t,e){if(!t&&!e)return;const n={},s=(t?.inputTokens??0)+(e?.inputTokens??0),r=(t?.outputTokens??0)+(e?.outputTokens??0),i=(t?.totalTokens??0)+(e?.totalTokens??0),o=(t?.reasoningTokens??0)+(e?.reasoningTokens??0),a=(t?.cachedInputTokens??0)+(e?.cachedInputTokens??0);return s>0&&(n.inputTokens=s),r>0&&(n.outputTokens=r),i>0&&(n.totalTokens=i),o>0&&(n.reasoningTokens=o),a>0&&(n.cachedInputTokens=a),Object.keys(n).length>0?n:void 0}function gz(t){return!Array.isArray(t)||t.length===0?0:t.reduce((e,n)=>Math.max(e,n.endMs),0)}function Cz(t,e){return!Array.isArray(t)||t.length===0?[]:t.map(n=>({...n,startMs:n.startMs+e,endMs:n.endMs+e}))}function CH(t){const e=new Map;return t.map(n=>{const s=e.get(n.turnId),r={system:n.inherits?.system?s?.system??"":n.payload.system??"",tools:n.inherits?.tools?s?.tools??{}:n.payload.tools??{},messages:n.payload.messages??[]};e.set(n.turnId,r);const{inherits:i,...o}=n;return{...o,payload:r}})}function vz(t){if(!t||typeof t!="object"||Array.isArray(t))return[];const e=t;try{const n=e.requestPayloads??(e.requestPayloadsJson?JSON.parse(e.requestPayloadsJson):void 0);return Array.isArray(n)?CH(n):[]}catch{return[]}}function vH(t){return typeof t=="string"&&t.length>0&&t.length<=200?t:void 0}var EH={[-32700]:"Parse error",[-32600]:"Invalid request",[-32601]:"Method not found",[-32602]:"Invalid params",[-32603]:"Internal error",[-32e3]:"Connection closed",[-32001]:"Request timeout",[-32042]:"URL elicitation required"};function bH(t){const e=EH[t];return e?`${t} · ${e}`:String(t)}var SH=b({id:C(),parentId:C().optional(),name:C(),category:L(["step","llm","tool","error","connection","discovery"]),startMs:w(),endMs:w(),promptIndex:w().optional(),stepIndex:w().optional(),authoredStepId:C().optional(),status:L(["ok","error"]).optional(),toolCallId:C().optional(),toolName:C().optional(),toolOrigin:L(["mcp","native","builtin","unknown"]).optional(),serverId:C().optional(),connectionId:C().optional(),modelId:C().optional(),inputTokens:w().optional(),outputTokens:w().optional(),totalTokens:w().optional(),cost:jt().transform(Jg).optional(),callId:jt().transform(vH).optional(),messageStartIndex:w().optional(),messageEndIndex:w().optional(),finishReason:C().optional(),provider:C().optional(),responseId:C().optional(),responseTimestamp:C().optional(),ttfcMs:w().optional(),mcpErrorCode:w().optional(),outputSource:Zt([I("narration"),I("evidence"),I("reconstructed")]).optional(),wireCorroborated:X().optional(),evidenceRequestId:C().optional(),evidenceStatus:Zt([I("complete"),I("incomplete")]).optional()}),zs=b({toolName:C(),arguments:Ut(C(),ug())}),yH=b({promptIndex:w(),prompt:C(),expectedToolCalls:G(zs),actualToolCalls:G(zs),expectedOutput:C().optional(),passed:X(),missing:G(zs),unexpected:G(zs),argumentMismatches:G(b({expected:zs,actual:zs,mismatchedArguments:G(C())})),retries:G(zs.extend({actualIndex:w().int().nonnegative(),retriedByIndex:w().int().nonnegative()})).optional()}),xH=b({toolCallId:C(),toolName:C(),protocol:Zt([I("mcp-apps"),I("openai-apps")]),serverId:C(),resourceUri:C().optional(),toolMetadata:Ut(C(),jt()),widgetCsp:Ut(C(),jt()).nullable().optional(),widgetPermissions:Ut(C(),jt()).nullable().optional(),widgetPermissive:X().optional(),prefersBorder:X().optional(),widgetHtmlBlobId:C().optional(),widgetHtmlUrl:C().nullable().optional(),injectedOpenAiCompat:X().optional(),injectedOpenAiCompatCapabilities:b({callTool:X().optional(),sendFollowUpMessage:X().optional(),setWidgetState:X().optional(),requestDisplayMode:L(["all","fullscreen-only","none"]).optional(),notifyIntrinsicHeight:X().optional(),openExternal:X().optional(),setOpenInAppUrl:X().optional(),requestModal:X().optional(),uploadFile:X().optional(),selectFiles:X().optional(),getFileDownloadUrl:X().optional(),requestCheckout:X().optional(),requestClose:X().optional()}).optional()}),DH=b({source:L(["hosted","widget"]),fps:w().optional(),durationMs:w().optional(),distinctFrames:w().optional(),truncated:X().optional()}),Ez=b({traceVersion:I(1),messages:G(ug()),widgetSnapshots:G(xH).optional(),spans:G(SH).optional(),prompts:G(yH).optional(),videoBlobId:C().optional(),videoMeta:DH.optional()});function wH(t,e){const n=[],s=new Map;return e.forEach((r,i)=>{if(r.role==="user"&&n.push(i),!!Array.isArray(r.content))for(const o of r.content){if(typeof o!="object"||o===null||o.type!=="tool-call"&&o.type!=="tool-result"||typeof o.toolCallId!="string")continue;const a=s.get(o.toolCallId)??[];a.push(i),s.set(o.toolCallId,a)}}),{userIndices:n,spans:t.map(r=>{const i=n[r.promptIndex??0],o=n[(r.promptIndex??0)+1]??e.length,a=i!==void 0&&r.category==="tool"&&r.toolCallId?s.get(r.toolCallId)?.filter(l=>l>=i&&l<o):void 0;return{...r,messageStartIndex:a?.[0],messageEndIndex:a?.at(-1)}})}}function AH({recording:t}){let e;try{e=AB(t)}catch{return null}return(0,B.jsxs)("section",{"aria-label":"Workspace events",className:"mt-4 space-y-2 text-xs",children:[(0,B.jsx)("p",{className:"font-medium",children:"Workspace events"}),e.droppedEvents>0&&(0,B.jsxs)("p",{className:"text-muted-foreground",children:[e.droppedEvents," earlier events omitted."]}),e.events.map(n=>(0,B.jsxs)("div",{className:"flex gap-2 border-b border-border py-2",children:[(0,B.jsx)("span",{className:"tabular-nums text-muted-foreground",children:n.sequence}),(0,B.jsxs)("span",{children:[n.kind,"feature"in n&&n.feature?` · ${n.feature} (${n.fidelity})`:"","outcome"in n&&n.outcome?` · ${n.outcome}`:"","display"in n&&n.display?` · ${n.display.displayMode??"unavailable"} · cursor ${n.display.interactionCursor}`:""]})]},n.sequence))]})}function IH(t,e){return e?.find(n=>n.parentId===t.id&&n.name.startsWith("Answered by the mock: "))?.name.slice(22)}var IB=(0,g.createContext)(void 0);function bz({accounts:t,testCaseId:e,children:n}){const s=OP(),r=(0,g.useMemo)(()=>s?t?.filter(i=>!i.cases||i.cases.some(o=>o.testCaseId===e)):void 0,[t,s,e]);return(0,B.jsx)(IB.Provider,{value:r,children:n})}function KS(){const t=(0,g.useContext)(IB);return(0,g.useCallback)(e=>VS(e,t),[t])}function Sz({spans:t,children:e}){const n=(0,g.useContext)(IB),s=(0,g.useMemo)(()=>rH(t,n),[t,n]);return(0,B.jsx)(tv.Provider,{value:s,children:e})}var TH=1024;function kH(t){const[e,n]=(0,g.useState)(null),[s,r]=(0,g.useState)(!1);return(0,g.useLayoutEffect)(()=>{if(t!=="auto"||!e)return;const i=()=>r(e.getBoundingClientRect().width>=TH);if(i(),typeof ResizeObserver>"u")return;const o=new ResizeObserver(i);return o.observe(e),()=>o.disconnect()},[t,e]),{containerRef:n,direction:t==="auto"&&s?"horizontal":"vertical"}}var RH=["all","connection","discovery","llm","tool","error"];function cu(t){switch(t){case"all":return"All";case"connection":return"Connect";case"discovery":return"Discovery";case"llm":return"LLM";case"tool":return"Tool";case"error":return"Error"}}function NH({filter:t,onFilterChange:e,isFullyExpanded:n,expandDisabled:s,onToggleExpandAll:r,zoomControls:i,showBottomBorder:o=!0}){return(0,B.jsxs)("div",{className:ge("flex min-h-7 min-w-0 flex-1 flex-row flex-nowrap items-center gap-2 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",o&&"border-b border-border/30 pb-2"),children:[(0,B.jsxs)(uh,{children:[(0,B.jsx)(lh,{asChild:!0,children:(0,B.jsxs)(Cn,{type:"button",variant:"outline",size:"sm",className:"h-7 shrink-0 gap-1.5 border-border/50 px-2 text-[10px] font-medium text-foreground","aria-label":`Filter timeline rows: ${cu(t)}`,children:[(0,B.jsx)(Ix,{className:"size-3.5 shrink-0 opacity-80","aria-hidden":!0}),cu(t)]})}),(0,B.jsx)(ch,{align:"start",className:"min-w-[8rem]",children:(0,B.jsx)(Ly,{value:t,onValueChange:a=>e(a),children:RH.map(a=>(0,B.jsx)(Oy,{value:a,className:"text-xs",children:cu(a)},a))})})]}),(0,B.jsx)(Cn,{type:"button",variant:"outline",size:"icon",disabled:s,className:"h-7 w-7 shrink-0 border-border/50 text-muted-foreground hover:text-foreground disabled:opacity-40",title:n?"Collapse all":"Expand all","aria-label":n?"Collapse all":"Expand all","aria-pressed":n,onClick:r,children:n?(0,B.jsx)(Fx,{className:"size-3.5",strokeWidth:2,"aria-hidden":!0}):(0,B.jsx)(xx,{className:"size-3.5",strokeWidth:2,"aria-hidden":!0})}),i?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("span",{className:"bg-border hidden h-3 w-px shrink-0 md:block","aria-hidden":!0}),(0,B.jsx)("div",{className:"flex shrink-0 items-center gap-0.5",children:i})]}):null]})}function qS(t,e=[]){const n=t.filter(s=>s.category==="llm");if(!(!n.some(s=>s.cost)&&e.length===0))return eD([...n.map(s=>s.cost),...e])}function YS(t,e){if(!t||t.kind==="interaction")return;if(t.kind==="span"){const{span:s}=t;if(s.category!=="llm")return;const r=s.cost??e?.find(({id:i})=>i===s.id)?.cost;return r?{kind:"call",cost:r}:void 0}const n=qS((e??[]).filter(s=>(s.promptIndex??0)===t.promptIndex));return n?{kind:"rollup",rollup:n}:void 0}function OH(t){if(t===0)return"$0.00";if(t<1e-4)return"<$0.0001";const e=t.toFixed(4);return Number(e)<1?`$${e}`:`$${t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}var TB={provider_reported:"Provider-reported",list_price:"Estimated at list price",customer_rate:"Estimated at your rates",runner_reported:"Runner-reported"},XS={partial:"Partial",unavailable:"Cost unavailable"},kB=t=>t==="list_price"||t==="customer_rate",MH={no_usage:"No token usage was reported for this call.",no_rate:"No price is on record for this model.",invalid_rate:"The price on record for this model was invalid. An organization admin can set a price under Model prices to price future calls.",unsupported_currency:"The price on record is not in US dollars."},LH={usage:"unreported usage",input_tokens:"input tokens",output_tokens:"output tokens",rate:"tokens without a rate",cache_read_rate:"cache reads",cache_write_rate:"cache writes",cache_write_1h_rate:"one-hour cache writes",web_search_rate:"web searches"},_H={input:"Input",cacheRead:"Cache read",cacheWrite:"Cache write",output:"Output",webSearch:"Web search"};function FH(t){if(t.length<=1)return t[0]&&TB[t[0]];const e=t.filter(kB).length;return e===t.length?"Estimated":e>0?"Reported and estimated":"Reported"}function PH(t){const e=(t.missing??[]).map(r=>LH[r]),n=t.completeness==="unavailable"?t.reason?MH[t.reason]:"No price is on record for this call.":t.completeness==="partial"?e.length>0?`Excludes ${e.join(", ")}.`:"Some charges on this call are not priced.":void 0,s=Object.entries(_H).flatMap(([r,i])=>{const o=t.parts?.[r];return typeof o=="number"?[{label:i,amountUsd:o}]:[]});return{amountUsd:t.amountUsd,estimated:t.source?kB(t.source):!1,sourceLabel:t.source?TB[t.source]:void 0,completeness:t.completeness,note:n,parts:s}}function HH(t){const e=t.totalCalls-t.unavailableCalls,n=t.totalCalls===1?"call":"calls",s=t.partialCalls>0?`, ${t.partialCalls} partly`:"";return{amountUsd:t.completeness==="unavailable"?void 0:t.knownSubtotalUsd,estimated:t.sources.some(kB),sourceLabel:FH(t.sources),completeness:t.completeness,coverage:`${e} of ${t.totalCalls} ${n} priced${s}`,parts:[]}}function QS(t){return t.kind==="call"?PH(t.cost):HH(t.rollup)}var wi={name:512,eventId:1024,timestamp:64,subscriptionId:256,triggerId:256},rh=["poll","push","webhook"],GH=["server","simulation","replay"];function $m(t){return t>=55296&&t<=56319}function Jm(t){return t>=56320&&t<=57343}function jH(t,e){let n="",s=0;for(;s<t.length;){const r=t.charCodeAt(s);let i;if($m(r)&&s+1<t.length&&Jm(t.charCodeAt(s+1))?i=t.slice(s,s+2):$m(r)||Jm(r)?i="�":i=t[s],n.length+i.length>e)break;n+=i,s+=i==="�"?1:i.length}return n}function UH(t,e){return typeof t=="string"&&rh.includes(t)?{origin:"server",delivery:t}:t==="simulation"||t==="replay"?typeof e=="string"&&rh.includes(e)?{origin:t,delivery:e}:{origin:t}:{origin:"server"}}function Ai(t,e){if(typeof t!="string")return;const n=jH(t,e);return n.length>0?n:void 0}function VH(t){return t>=0&&!Number.isNaN(new Date(t).getTime())}function ZS(t){const e=Ai(t.name,wi.name);if(!e||!VH(t.receivedAt))return;const{origin:n,delivery:s}=UH(t.origin,t.subscriptionMode),r=Ai(t.eventId,wi.eventId),i=Ai(t.timestamp,wi.timestamp),o=Ai(t.subscriptionId,wi.subscriptionId),a=Ai(t.triggerId,wi.triggerId);return{name:e,...r?{eventId:r}:{},...i?{timestamp:i}:{},receivedAt:t.receivedAt,...s?{delivery:s}:{},origin:n,...o?{subscriptionId:o}:{},...a?{triggerId:a}:{}}}function yz(t,e){return ZS({name:t.name??"",eventId:t.eventId,timestamp:t.timestamp,receivedAt:t.receivedAt,origin:t.origin,subscriptionMode:e,subscriptionId:t.logicalSubscriptionId})}function zH(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Na(t){return t==null||typeof t=="string"}function ey(t){if(!zH(t)||typeof t.name!="string"||typeof t.receivedAt!="number"||typeof t.origin!="string"||!GH.includes(t.origin)||!(t.delivery===void 0||t.delivery===null||typeof t.delivery=="string"&&rh.includes(t.delivery))||!Na(t.eventId)||!Na(t.timestamp)||!Na(t.subscriptionId)||!Na(t.triggerId))return;const e=ZS({name:t.name,eventId:t.eventId,timestamp:t.timestamp,receivedAt:t.receivedAt,subscriptionId:t.subscriptionId,triggerId:t.triggerId});if(e)return{...e,...typeof t.delivery=="string"?{delivery:t.delivery}:{},origin:t.origin}}function xz(t){if(!t||typeof t!="object"||Array.isArray(t))return;const e=t.turnEvents;if(!Array.isArray(e))return;const n=new Map;for(const s of e){if(!s||typeof s!="object")continue;const{promptIndex:r,turnStartedAtMs:i,event:o}=s,a=ey(o);typeof r!="number"||!a||n.set(r,{promptIndex:r,...ty(i)?{turnStartedAtMs:i}:{},event:a})}return n.size>0?n:void 0}function Dz(t){return gH((t??[]).map(e=>({promptIndex:e.promptIndex,startedAtMs:e.startedAt,event:ey(e.eventAtTurn)})))}function $H(t){return`Event: ${t.name}`}function JH(t){return t.origin==="simulation"}function WH(t,e,n=QH){const s=[];if(t.timestamp!==void 0){const l=YH(t.timestamp);s.push(l===void 0?{key:"occurred",label:"Occurred",asSent:t.timestamp}:{key:"occurred",label:"Occurred",ms:l})}s.push({key:"received",label:"Received",ms:t.receivedAt}),ty(e)&&s.push({key:"turn-started",label:"Turn started",ms:e});const r=s.map((l,c)=>{const u=s[c-1];if(!u||!("ms"in u)||!("ms"in l))return;const d=l.ms-u.ms;return d>=0?d:void 0}),i=s.map((l,c)=>{const u=r[c];return{key:l.key,label:l.label,..."ms"in l?{value:n(l.ms)}:{value:l.asSent,asSent:!0},...u!==void 0?{waitSincePrevious:Wm(u)}:{}}}),[,o,a]=r;return{stops:i,...s.length===3&&o!==void 0&&a!==void 0?{totalWait:Wm(o+a)}:{}}}var KH={poll:"Poll",push:"Push",webhook:"Webhook"};function qH(t){const e=[];return t.eventId&&e.push({label:"Event ID",value:t.eventId,copySubject:"event ID"}),t.subscriptionId&&e.push({label:"Subscription",value:t.subscriptionId,copySubject:"subscription ID"}),t.triggerId&&e.push({label:"Trigger",value:t.triggerId,copySubject:"trigger ID"}),t.delivery&&e.push({label:"Delivery",value:KH[t.delivery]}),e}function YH(t){const e=/(\d{4})-(\d{2})-(\d{2})[T ]\d{2}:\d{2}/.exec(t);if(!e||!XH(Number(e[1]),Number(e[2]),Number(e[3])))return;const n=Date.parse(t);return Number.isFinite(n)?n:void 0}function XH(t,e,n){const s=new Date(0);return s.setUTCFullYear(t,e-1,n),s.getUTCFullYear()===t&&s.getUTCMonth()===e-1&&s.getUTCDate()===n}function QH(t){return new Date(t).toLocaleString()}function Wm(t){const e=Math.round(t);return e<6e4?Z2(e):R2(e)}function ty(t){return typeof t=="number"&&Number.isFinite(t)}function ny({event:t}){return!t||!JH(t)?null:(0,B.jsx)(lo,{variant:"outline","data-testid":"trace-event-test-badge",className:"border-border/60 bg-muted/30 px-1.5 py-0 text-[10px] font-medium text-muted-foreground",title:"A test event, sent from MCPJam",children:"Test"})}function ZH({turnEvent:t}){const{event:e}=t,n=WH(e,t.turnStartedAtMs),s=qH(e);return(0,B.jsxs)("section",{"data-testid":"trace-event-section","aria-label":"Event",className:"space-y-3 rounded-md border border-border/50 px-3 py-3 text-xs",children:[(0,B.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,B.jsx)(Lx,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),(0,B.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Event"}),(0,B.jsx)("span",{className:"min-w-0 truncate font-mono text-xs font-medium text-foreground",title:e.name,children:e.name}),(0,B.jsx)(ny,{event:e})]}),(0,B.jsxs)("div",{"data-testid":"trace-event-timing",children:[n.stops.map((r,i)=>(0,B.jsxs)("div",{children:[i>0?(0,B.jsxs)("div",{className:"flex min-h-4 items-stretch gap-3 text-[11px] tabular-nums text-muted-foreground","data-testid":`trace-event-wait-${r.key}`,children:[(0,B.jsx)("span",{className:"flex w-[11px] shrink-0 justify-center","aria-hidden":!0,children:(0,B.jsx)("span",{className:"w-px bg-border"})}),(0,B.jsx)("span",{className:"w-24 shrink-0","aria-hidden":!0}),(0,B.jsx)("span",{className:"self-center",children:r.waitSincePrevious?`+${r.waitSincePrevious}`:null})]}):null,(0,B.jsx)(uu,{marker:(0,B.jsx)("span",{className:"block size-[11px] rounded-full border border-border bg-background"}),label:r.label,children:(0,B.jsx)("span",{"data-testid":`trace-event-time-${r.key}`,className:r.asSent?"break-all font-mono text-foreground":"tabular-nums text-foreground",children:r.value})})]},r.key)),n.totalWait?(0,B.jsx)("div",{className:"pt-2",children:(0,B.jsx)(uu,{label:"Total wait",children:(0,B.jsx)("span",{"data-testid":"trace-event-total-wait",className:"font-medium tabular-nums text-foreground",children:n.totalWait})})}):null]}),s.length>0?(0,B.jsx)("div",{"data-testid":"trace-event-identifiers",className:"space-y-1 border-t border-border/40 pt-3",children:s.map(r=>(0,B.jsx)(uu,{label:r.label,children:(0,B.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[(0,B.jsx)("span",{className:r.copySubject?"min-w-0 truncate font-mono text-foreground":"min-w-0 truncate text-foreground",title:r.value,children:r.value}),r.copySubject?(0,B.jsx)(LP,{value:r.value,subject:r.copySubject,size:"inline"}):null]})},r.label))}):null]})}function uu({marker:t,label:e,children:n}){return(0,B.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,B.jsx)("span",{className:"flex w-[11px] shrink-0 justify-center","aria-hidden":!0,children:t}),(0,B.jsx)("span",{className:"w-24 shrink-0 text-muted-foreground",children:e}),(0,B.jsx)("span",{className:"min-w-0 flex-1",children:n})]})}var eG="trace-cost";function Yo(){return cg(eG)===!0}var sy="evalIterationModelCalls:list",tG=ky(sy),Oa=t=>Number.isInteger(t)&&t>=0;function nG(t){if(!t||typeof t!="object")return;const e=t,{knownSubtotalUsd:n,sources:s}=e;return e.currency==="USD"&&typeof n=="number"&&Number.isFinite(n)&&n>=0&&["complete","partial","unavailable"].includes(e.completeness)&&Oa(e.totalCalls)&&Oa(e.completeCalls)&&Oa(e.partialCalls)&&Oa(e.unavailableCalls)&&Array.isArray(s)&&s.every(r=>typeof r=="string"&&Object.hasOwn(TB,r))?t:void 0}function wz(t,e){const n=nG(t.usage?.costRollup);return{iterationId:t._id,...n?{rollup:n}:{},harness:e?e.startsWith("harness:"):!!jy(t.execution)?.harness}}function sG(t,e){const n=new Set(t.filter(o=>o.category==="llm").map(o=>o.id)),s=new Map,r=[],i=new Set;for(const o of e??[]){if(i.has(o.generationId))continue;i.add(o.generationId);const a=Jg(o.cost),l=o.matchedSpanId;l&&n.has(l)&&!s.has(l)?s.set(l,a):r.push({generationId:o.generationId,modelId:o.modelId,cost:a})}return{spans:t.map(o=>{const a=o.cost??s.get(o.id);return a===o.cost?o:{...o,cost:a}}),unmatched:r}}function rG(t){return $y(t,sy)}var ry=[];function Bc(t){const e=Yo();return(0,g.useMemo)(()=>e&&t?QS(t):void 0,[e,t])}function Io({amountUsd:t,estimated:e,slot:n=!1}){return(0,B.jsxs)("span",{className:"whitespace-nowrap tabular-nums",children:[e?(0,B.jsx)("span",{className:"inline-block w-[1ch] text-center",children:"≈"}):n?(0,B.jsx)("span",{"aria-hidden":!0,className:"inline-block w-[1ch]"}):null,OH(t)]})}function iy({view:t}){return(0,B.jsxs)(B.Fragment,{children:[t.sourceLabel?(0,B.jsx)(lo,{variant:"outline",className:"px-1.5 py-0 text-[10px] text-muted-foreground",children:t.sourceLabel}):null,t.completeness!=="complete"?(0,B.jsx)(lo,{variant:"outline",className:ge("px-1.5 py-0 text-[10px]",t.completeness==="partial"?"border-warning/50 bg-warning/10 text-foreground":"text-muted-foreground"),children:XS[t.completeness]}):null,t.coverage?(0,B.jsx)("span",{children:t.coverage}):null,t.note?(0,B.jsx)("span",{children:t.note}):null]})}function iG({cost:t}){const e=Bc(t);return e?.amountUsd===void 0?null:(0,B.jsxs)("span",{"data-testid":"trace-cost-inline",children:[" · ",(0,B.jsx)("span",{className:"font-medium text-foreground",children:(0,B.jsx)(Io,{amountUsd:e.amountUsd,estimated:e.estimated})})]})}function oG({cost:t}){const e=Bc(t);return e?(0,B.jsxs)("div",{"data-testid":"trace-cost-chips",className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground",children:[(0,B.jsx)("span",{className:"text-muted-foreground/70",children:"Cost"}),(0,B.jsx)(iy,{view:e})]}):null}function Ii({label:t,children:e}){return(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:t}),(0,B.jsx)("span",{className:"min-w-0 text-right font-medium text-popover-foreground",children:e})]})}function aG({cost:t}){const e=Bc(t);return e?(0,B.jsxs)("div",{"data-testid":"trace-row-hover-cost",className:"space-y-1.5",children:[(0,B.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-popover-foreground/65",children:"Cost"}),(0,B.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,B.jsx)(Ii,{label:t?.kind==="rollup"?"Total":"Amount",children:e.amountUsd===void 0?"Unavailable":(0,B.jsx)(Io,{amountUsd:e.amountUsd,estimated:e.estimated,slot:!0})}),e.parts.map(n=>(0,B.jsx)(Ii,{label:n.label,children:(0,B.jsx)(Io,{amountUsd:n.amountUsd,estimated:e.estimated,slot:!0})},n.label)),e.sourceLabel?(0,B.jsx)(Ii,{label:"Source",children:e.sourceLabel}):null,e.completeness==="partial"?(0,B.jsx)(Ii,{label:"Status",children:XS.partial}):null,e.coverage?(0,B.jsx)(Ii,{label:"Coverage",children:e.coverage}):null,e.note?(0,B.jsx)("p",{className:"text-popover-foreground/70",children:e.note}):null]})]}):null}function lG(t,e){const n=Yo()&&e?.harness?e.iterationId:void 0,[s,r]=(0,g.useState)(),i=s?.iterationId===n?s?.calls:void 0,o=(0,g.useMemo)(()=>i?sG(t??[],i):void 0,[t,i]),a=(0,g.useCallback)(()=>r(void 0),[]),l=n?(0,B.jsx)(ll,{name:"trace-cost-model-calls",isExpectedError:rG,onError:a,fallback:null,children:(0,B.jsx)(cG,{iterationId:n,onLoad:r})},n):null;return{spans:o?.spans??t,unmatched:o?.unmatched??ry,loader:l}}function cG({iterationId:t,onLoad:e}){const n=og(tG,{iterationId:t});return(0,g.useEffect)(()=>{n&&e({iterationId:t,calls:n})},[n,t,e]),null}function uG({spans:t,iteration:e,unmatched:n=ry}){const s=Yo(),r=Bc((0,g.useMemo)(()=>{if(!s)return;const i=e?.rollup??qS(t??[],n.map(o=>o.cost));return i&&{kind:"rollup",rollup:i}},[s,t,e?.rollup,n]));return r?(0,B.jsxs)("div",{"data-testid":"trace-cost-summary",className:"shrink-0 space-y-2 rounded-lg border border-border/50 bg-background px-3 py-2 text-xs text-muted-foreground",children:[(0,B.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,B.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide",children:"Trace cost"}),r.amountUsd!==void 0?(0,B.jsx)("span",{className:"text-sm font-semibold text-foreground",children:(0,B.jsx)(Io,{amountUsd:r.amountUsd,estimated:r.estimated})}):null,(0,B.jsx)(iy,{view:r})]}),n.length>0?(0,B.jsx)(dG,{calls:n}):null]}):null}function dG({calls:t}){return(0,B.jsxs)("div",{"data-testid":"trace-cost-unmatched-calls",className:"space-y-1",children:[(0,B.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide",children:"Model calls not matched to a step"}),(0,B.jsx)("ul",{"data-testid":"trace-cost-unmatched-list",className:"max-h-40 space-y-0.5 overflow-y-auto",children:t.map(e=>{const n=e.cost&&QS({kind:"call",cost:e.cost});return(0,B.jsxs)("li",{className:"flex flex-wrap items-baseline gap-x-2",children:[(0,B.jsx)("span",{className:"min-w-0 truncate font-mono text-foreground",children:e.modelId}),(0,B.jsx)("span",{className:"font-medium text-foreground",children:n?.amountUsd!==void 0?(0,B.jsx)(Io,{amountUsd:n.amountUsd,estimated:n.estimated}):"Cost unavailable"}),n?.sourceLabel?(0,B.jsx)("span",{children:n.sourceLabel}):null]},e.generationId)})})]})}var Km=[0,25,50,75,100],hG=54,BG=120;function fG(t){if(!Number.isFinite(t))return[0,100];if(t<=0)return[0,100];const e=Math.max(2,Math.floor(t/hG));return e>=Km.length?[...Km]:e<=2?[0,100]:e===3?[0,50,100]:[0,25,75,100]}function pG(t){return t<=0?"left-0 top-1/2 -translate-x-0 -translate-y-1/2 text-left":t>=100?"left-0 top-1/2 -translate-x-full -translate-y-1/2 text-right":"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center"}function qm(t){return t<=0?ol(0):`${ol(0)}–${ol(t)}`}function mG(t){const e=t.filter(l=>l.category==="llm");let n=0,s=0,r=0,i=0,o=0,a=0;for(const l of e)typeof l.inputTokens=="number"&&(n+=l.inputTokens,s++),typeof l.outputTokens=="number"&&(r+=l.outputTokens,i++),typeof l.totalTokens=="number"&&(o+=l.totalTokens,a++);return{...s?{inputTokens:n}:{},...i?{outputTokens:r}:{},...a?{totalTokens:o}:{}}}function fc(t,e){return e}function Ym(t){switch(t){case"connection":return-2;case"discovery":return-1;case"step":return 0;case"llm":return 1;case"tool":return 2;case"error":return 3;default:return fc(t,9)}}function gG(t,e){if(t.startMs!==e.startMs)return t.startMs-e.startMs;const n=Ym(t.category)-Ym(e.category);return n!==0?n:t.endMs!==e.endMs?t.endMs-e.endMs:t.name.localeCompare(e.name)}function CG(t,e){return typeof t!="number"||e<50?null:t/(e/1e3)}function so(t){return t>=1e3?`${(t/1e3).toFixed(t>=1e4?1:2)}s`:`${Math.round(t)}ms`}function ol(t){return t>=1e3?`${(t/1e3).toFixed(2)}s`:`${Math.round(t)}ms`}function rs(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function To(t){const e=t.toolName??t.name;return typeof e=="string"&&e.trim()?e:void 0}function Xo(t){return Array.isArray(t.content)?t.content.filter(e=>rs(e)&&typeof e.type=="string"):typeof t.content=="string"?[{type:"text",text:t.content}]:[]}function oy(t){if(t==null)return"None";if(typeof t=="string")return t.length>180?`${t.slice(0,177)}...`:t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`${t.length} item${t.length===1?"":"s"}`;if(rs(t)){const e=Object.keys(t);return e.length>0?`{ ${e.slice(0,4).join(", ")}${e.length>4?", ...":""} }`:"{}"}return String(t)}function vG(t){const e=Xo(t);if(e.length===0)return typeof t.content=="string"?t.content:"No content";const n=e.slice(0,3).map(s=>s.type==="text"&&typeof s.text=="string"?s.text:s.type==="tool-call"?`Tool call: ${To(s)??"Tool"}`:s.type==="tool-result"?`Tool result: ${To(s)??"Tool"}`:typeof s.type=="string"?s.type:"content").join(" | ");return n.length>220?`${n.slice(0,217)}...`:n}function EG(t){return!rs(t)||!("type"in t)||!("value"in t)?t:t.value}function bG(t){return t.result!==void 0?t.result:EG(t.output)}function SG(t){const e=bG(t);if(typeof t.error=="string"&&t.error.trim())return t.error.trim();if(rs(t.error)&&typeof t.error.message=="string")return t.error.message;if(rs(t.output)&&t.output.type==="error-text")return typeof t.output.value=="string"?t.output.value:"Tool error";if(rs(t.result)&&t.result.isError===!0||rs(t.output)&&rs(t.output.value)&&t.output.value.isError===!0||t.isError===!0)return lu(e)??"Tool error"}function pc(t,e,n,s){if(!e&&!n)return{};if(s){if(!e||s.messageStartIndex===void 0||s.messageEndIndex===void 0)return{};t=t.slice(s.messageStartIndex,s.messageEndIndex+1)}let r,i,o;for(const a of t)for(const l of Xo(a)){const c=typeof e=="string"&&l.toolCallId===e,u=!e&&typeof n=="string"&&To(l)===n;if(!(!c&&!u)&&(l.type==="tool-call"&&(r=l.input??l.parameters??l.args),l.type==="tool-result")){i=l.result??(rs(l.output)&&"value"in l.output?l.output.value:l.output);const d=SG(l);d&&(o=d)}}return{input:r,output:i,errorText:o}}function Fr(t,e,n=!1){return t.category==="error"||t.status==="error"?!0:t.category==="tool"?!!pc(e,t.toolCallId,t.toolName??t.name,n?t:void 0).errorText:!1}function hi(t,e){if(typeof t!="number"&&typeof e!="number")return;const n=t??e??0,s=e??t??n;return{startIndex:Math.min(n,s),endIndex:Math.max(n,s)}}function yG(t){return hi(t.messageStartIndex,t.messageEndIndex)}function xG(t){return hi(t.span.messageStartIndex,t.span.messageEndIndex)}function ay(t){if(!t||t.startIndex<0)return[];const e=[];for(let n=t.startIndex;n<=t.endIndex;n+=1)e.push(n);return e}function ly(t,e,n){if(e)for(let s=e.startIndex;s<=e.endIndex;s+=1){const r=t[s];if(r&&n(r))return s}}function RB(t,e,n){if(!t.length)return;const s=hi(e,n);if(!s){const i=t.findIndex(o=>o.role==="user");return i>=0?i:void 0}const r=ly(t,s,i=>i.role==="user");if(typeof r=="number")return r;if(!(s.startIndex>=t.length)&&s.startIndex>0)for(let i=s.startIndex-1;i>=0;i-=1){const o=t[i];if(o){if(o.role==="user")return i;if(o.role==="assistant")break}}}function DG(t,e){if(t.kind==="prompt")return"trace-waterfall-bar-prompt";if(t.kind==="interaction")return t.status==="error"?"trace-waterfall-bar-error":"trace-waterfall-bar-tool";if(t.kind==="span"&&e)return"trace-waterfall-bar-error";if(t.kind!=="span")return"trace-waterfall-bar-step";const n=t.span.category;switch(n){case"llm":return"trace-waterfall-bar-llm";case"tool":return"trace-waterfall-bar-tool";case"step":case"connection":case"discovery":return"trace-waterfall-bar-step";case"error":return"trace-waterfall-bar-error";default:return fc(n,"trace-waterfall-bar-step")}}function wG(t){switch(t){case"prompt":return"trace-waterfall-glyph-prompt";case"step":return"trace-waterfall-glyph-step";case"llm":return"trace-waterfall-glyph-llm";case"tool":case"interaction":return"trace-waterfall-glyph-tool";case"error":return"trace-waterfall-glyph-error";case"connection":case"discovery":return"trace-waterfall-glyph-step";default:return fc(t,"text-muted-foreground")}}function AG(t,e){if(t.kind==="prompt")return"trace-waterfall-row-accent-prompt";if(t.kind==="interaction")return t.status==="error"?"trace-waterfall-row-accent-error":"trace-waterfall-row-accent-tool";const n=e?"error":t.span.category;switch(n){case"llm":return"trace-waterfall-row-accent-llm";case"tool":return"trace-waterfall-row-accent-tool";case"error":return"trace-waterfall-row-accent-error";case"step":case"connection":case"discovery":return"trace-waterfall-row-accent-step";default:return fc(n,"border-l-muted-foreground")}}function IG(t){const e=new Map;for(const n of t){const s=typeof n.promptIndex=="number"?n.promptIndex:0,r=e.get(s);r?r.push(n):e.set(s,[n])}return[...e.entries()].sort(([n],[s])=>n-s).map(([n,s])=>{const r=new Map;s.forEach(c=>{r.set(c.id,{span:c,children:[]})});const i=[];s.forEach(c=>{const u=r.get(c.id),d=typeof c.parentId=="string"?r.get(c.parentId):void 0;if(d){d.children.push(u);return}i.push(u)});const o=c=>{c.sort((u,d)=>gG(u.span,d.span)),c.forEach(u=>o(u.children))};o(i);const a=s.flatMap(c=>{const u=[];return typeof c.messageStartIndex=="number"&&u.push(c.messageStartIndex),typeof c.messageEndIndex=="number"&&u.push(c.messageEndIndex),u}),l={step:0,llm:0,tool:0,error:0,connection:0,discovery:0};for(const c of s)c.category in l&&l[c.category]++;return{key:`prompt-${n}`,promptIndex:n,label:`Prompt ${n+1}`,spans:s,roots:i,startMs:Math.min(...s.map(c=>c.startMs)),endMs:Math.max(...s.map(c=>c.endMs)),messageStartIndex:a.length>0?Math.min(...a):void 0,messageEndIndex:a.length>0?Math.max(...a):void 0,counts:l}})}function Xm(t){const e=new Set;function n(s){for(const r of s)r.span.category==="step"&&r.children.length>0&&e.add(r.span.id),n(r.children)}for(const s of t)n(s.roots);return e}function du(t){return{role:t.role,content:t.content}}function cy(t,e,n){const s=hi(e,n);if(!s)return[];const r=t.slice(s.startIndex,s.endIndex+1);if(r.length===0)return[];let i=-1;for(let a=0;a<r.length;a++)if(r[a].role==="assistant"){i=a;break}if(i<0)return t.slice(0,s.endIndex+1);const o=s.startIndex+i;return o===0?[]:t.slice(0,o)}function TG(t,e,n){const s=hi(e,n);if(!s)return{input:null,output:null};const r=t.slice(s.startIndex,s.endIndex+1);if(r.length===0)return{input:[],output:null};let i=-1;for(let l=r.length-1;l>=0;l-=1)if(r[l].role==="assistant"){i=l;break}if(i<0)return{input:r.map(du),output:null};const o=cy(t,e,n),a=r[i];return{input:o.length>0?o.map(du):null,output:du(a)}}var kG=96;function Sn(t,e=kG){const n=t.replace(/\s+/g," ").trim();return n.length<=e?n:`${n.slice(0,e-1)}…`}function ko(t){return typeof t.content=="string"?t.content.trim():Xo(t).map(e=>e.type==="text"&&typeof e.text=="string"?e.text.trim():"").filter(Boolean).join(" ")}function RG(t){const e=Xo(t),n=[];for(const s of e)s.type==="tool-call"&&n.push(To(s)??"tool");return n}function NG(t,e){if(!t.length)return;const n=cy(t,e.messageStartIndex,e.messageEndIndex);if(n.length!==0){for(let s=n.length-1;s>=0;s--){const r=n[s];if(r.role==="user"){const i=ko(r);if(i)return Sn(i)}}for(const s of n)if(s.role==="system"){const r=ko(s);if(r)return Sn(r)}for(let s=n.length-1;s>=0;s--){const r=n[s];if(r.role==="tool"){const i=vG(r);if(i&&i!=="No content")return Sn(i)}}}}function OG(t,e){if(!t.length)return;const n=hi(e.messageStartIndex,e.messageEndIndex);if(!n)return;const s=t.slice(n.startIndex,n.endIndex+1);for(let r=s.length-1;r>=0;r--){const i=s[r];if(i.role!=="assistant")continue;const o=ko(i);if(o)return{kind:"text",preview:Sn(o)};const a=RG(i);if(a.length>0)return{kind:"tools",preview:Sn(`Calling ${a.join(", ")}`)}}}function MG(t,e,n){const s=RB(t,e,n);if(typeof s!="number")return;const r=ko(t[s]);return r?Sn(r):void 0}function LG(t,e,n){const s=RB(t,e,n);if(typeof s=="number")return ko(t[s])||void 0}function Qm(t,e){if(typeof e.toolCallId=="string"&&t.toolCallId===e.toolCallId)return!0;const n=e.toolName?.trim()||e.name?.trim();return!!(!e.toolCallId&&n&&To(t)===n)}function _G(t,e,n){if(n)for(let s=n.startIndex;s<=n.endIndex;s+=1){const r=t[s];if(!r)continue;const i=Xo(r);if(i.some(o=>o.type==="tool-call"&&Qm(o,e))||i.some(o=>o.type==="tool-result"&&Qm(o,e)))return s}}function FG(t,e){const n=RB(e,t.messageStartIndex,t.messageEndIndex);if(typeof n=="number")return{focusSourceIndex:n,highlightSourceIndices:[n]};const s=ay(yG(t));if(s.length!==0)return{focusSourceIndex:s[0],highlightSourceIndices:s}}function PG(t,e){const n=xG(t),s=ay(n);if(s.length===0)return;const r=ly(e,n,i=>i.role==="assistant");return{focusSourceIndex:(t.span.category==="tool"?_G(e,t.span,n):void 0)??r??s[0],highlightSourceIndices:s}}function HG(t,e,n=!1){const s=pc(t,e.toolCallId,e.toolName??e.name,n?e:void 0);if(s.input==null)return;const r=oy(s.input);if(!(!r||r==="None"))return Sn(r)}function ii({category:t,size:e="sm"}){const n=ge(e==="lg"?"h-5 w-5 shrink-0":"h-3.5 w-3.5 shrink-0",wG(t));switch(t){case"prompt":return(0,B.jsx)(jx,{className:n,"aria-hidden":!0});case"llm":return(0,B.jsx)(Sx,{className:n,"aria-hidden":!0});case"tool":return(0,B.jsx)(Ux,{className:n,"aria-hidden":!0});case"interaction":return(0,B.jsx)(Ox,{className:n,"aria-hidden":!0});case"error":return(0,B.jsx)(yx,{className:n,"aria-hidden":!0});case"connection":case"discovery":case"step":return(0,B.jsx)(FB,{className:n,"aria-hidden":!0});default:return(0,B.jsx)(FB,{className:n,"aria-hidden":!0})}}function GG(t,e){const n=e.promptIndex,s=e.stepIndex;if(typeof n!="number"||typeof s!="number")return{};const r=t.find(i=>i.category==="llm"&&i.promptIndex===n&&i.stepIndex===s);return r?{...typeof r.inputTokens=="number"?{inputTokens:r.inputTokens}:{},...typeof r.outputTokens=="number"?{outputTokens:r.outputTokens}:{},...typeof r.totalTokens=="number"?{totalTokens:r.totalTokens}:{}}:{}}function jG(t,e){if(t.kind==="prompt")return{inputTokens:t.aggregatedInputTokens,outputTokens:t.aggregatedOutputTokens,totalTokens:t.aggregatedTotalTokens};if(t.kind==="interaction")return{};const n={inputTokens:t.span.inputTokens,outputTokens:t.span.outputTokens,totalTokens:t.span.totalTokens};if(typeof n.inputTokens=="number"||typeof n.outputTokens=="number"||typeof n.totalTokens=="number"||!e?.length||t.span.category!=="llm"&&t.span.category!=="step")return n;const s=GG(e,t.span);return typeof s.inputTokens=="number"||typeof s.outputTokens=="number"||typeof s.totalTokens=="number"?s:n}function hu(t){return typeof t=="number"?t.toLocaleString():"—"}function Zm(t){return typeof t=="number"&&Number.isFinite(t)?new Date(t).toLocaleString():"—"}function UG({traceStartedAtMs:t,traceEndedAtMs:e,traceDurationMs:n}){return typeof t=="number"&&Number.isFinite(t)?t:typeof e=="number"&&Number.isFinite(e)?e-n:null}function ih(t,e,n=!1,s){const{span:r,promptIndex:i}=t,o=r.modelId?.trim()?Sn(r.modelId.trim(),56):void 0,a=r.name?.trim()??"";if(r.category==="step"){const l=typeof r.stepIndex=="number"?r.stepIndex+1:void 0,c=typeof l=="number"?`Step ${l}`:a||"Step",u=typeof l=="number"&&(a===`Step ${l}`||a.toLowerCase()===`step ${l}`),d=a&&!u?Sn(a,64):c,h=NG(e,r);return h?{title:d,subtitle:h}:o?{title:d,subtitle:o}:{title:d,subtitle:`Prompt ${i+1}`}}if(r.category==="llm"){const l=OG(e,r),c=!a||/^assistant$/i.test(a)||/^llm$/i.test(a)||/^model$/i.test(a)||a==="Model response"||/·\s*response$/i.test(a)?"Agent":Sn(a,64);return l?.kind==="text"?{title:`${c}: "${l.preview}"`,subtitle:o}:l?.kind==="tools"?{title:`${c} · ${l.preview}`,subtitle:o}:{title:c,subtitle:o}}if(r.category==="tool"){const l=`Tool · ${(r.toolName??r.name).trim()||"tool"}${s?` · ${s}`:""}`,c=HG(e,r,n),u=!c||c==="{}"||c==="None";if(c&&!u)return{title:l,subtitle:c};if(u){const d=pc(e,r.toolCallId,r.toolName??r.name,n?r:void 0);if(d.output!=null){const h=oy(d.output);if(h&&h!=="None"&&h!=="{}")return{title:l,subtitle:Sn(h)}}}return typeof r.stepIndex=="number"?{title:l,subtitle:o?`${o} · step ${r.stepIndex+1}`:`step ${r.stepIndex+1}`}:{title:l,subtitle:o}}return{title:r.name,subtitle:typeof r.stepIndex=="number"?o?`${o} · step ${r.stepIndex+1}`:`step ${r.stepIndex+1}`:o}}function oh(t){const e=t.kind==="span"?t.span.startMs:t.startMs,n=t.kind==="span"?t.span.endMs:t.endMs;return{startMs:e,endMs:n,durationMs:n-e}}function VG({format:t,onFormatChange:e}){return(0,B.jsx)("div",{className:"flex flex-wrap gap-1",children:["plain","markdown"].map(n=>(0,B.jsx)(Cn,{type:"button",size:"sm",variant:t===n?"secondary":"outline",className:"h-7 text-[10px] capitalize",onClick:()=>e(n),children:n==="plain"?"Plain":"Markdown"},n))})}function eg({value:t}){const[e,n]=(0,g.useState)("plain");return(0,g.useEffect)(()=>{typeof t=="string"&&n("plain")},[t]),t==null?(0,B.jsx)("div",{className:"rounded-md border border-dashed border-border/60 px-3 py-2 text-xs text-muted-foreground",children:"None"}):typeof t=="string"?(0,B.jsxs)("div",{className:"space-y-2",children:[(0,B.jsx)(VG,{format:e,onFormatChange:n}),e==="markdown"?(0,B.jsx)("div",{className:"max-h-44 overflow-auto rounded-md border border-border/60 bg-muted/10 p-3 text-xs leading-relaxed text-foreground",children:(0,B.jsx)(tS,{content:t})}):(0,B.jsx)("pre",{className:"max-h-44 overflow-auto rounded-md border border-border/60 bg-muted/20 p-3 text-xs whitespace-pre-wrap break-words",children:t})]}):(0,B.jsx)(aP,{value:t,containerClassName:"max-h-56 rounded-md border border-border/60 bg-background"})}function zG({row:t}){return(0,B.jsxs)("div",{"data-testid":"trace-detail-pane",className:"min-h-[280px] rounded-lg bg-muted/5 px-5 py-5",children:[(0,B.jsx)(WS,{step:t.step,leading:(0,B.jsx)(ii,{category:"interaction",size:"lg"})}),t.step.pluginWorkspace&&(0,B.jsx)(AH,{recording:t.step.pluginWorkspace})]})}function tg(t){return t.split(/[-_\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function $G(t){return t.engine==="harness"?t.harness?tg(t.harness):"Harness":t.engine==="emulated"?"Emulated":t.harness?tg(t.harness):"Unknown"}function JG({row:t,recordedSpans:e,projectedMessages:n,transcriptMessages:s,onRevealInTranscript:r,turnRuntimeByPromptIndex:i,turnEvent:o}){const a=KS(),l=Yo();if(!t)return(0,B.jsxs)("div",{"data-testid":"trace-detail-pane",className:"flex min-h-[280px] flex-col items-center justify-center gap-3 rounded-lg bg-muted/5 px-6 py-12 text-center",children:[(0,B.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-full border border-border/50 bg-background shadow-sm",children:(0,B.jsx)(Ax,{className:"h-7 w-7 text-muted-foreground","aria-hidden":!0})}),(0,B.jsxs)("div",{className:"space-y-1",children:[(0,B.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No span selected"}),(0,B.jsx)("p",{className:"text-xs text-muted-foreground",children:"Click a row or use arrow keys"})]})]});if(t.kind==="interaction")return(0,B.jsx)(zG,{row:t});const c=t.kind==="prompt"?FG(t,s):PG(t,s),u=t.kind==="span"?pc(s,t.span.toolCallId,t.span.toolName??t.span.name,n?t.span:void 0):{},{durationMs:d}=oh(t),h=t.kind==="span"?ih(t,s,n,a(t.span)):null,f=t.kind==="prompt"?t.label:h.title,p=t.kind==="prompt"?t.hasAnyFailure?"error":"ok":Fr(t.span,s,n)?"error":"ok",m=t.kind==="prompt"?"prompt":t.span.category==="tool"&&Fr(t.span,s,n)?"error":t.span.category,v=i?.get(t.promptIndex),E=t.kind==="span"&&(t.span.category==="llm"||t.span.category==="step")?TG(s,t.span.messageStartIndex,t.span.messageEndIndex):{input:null,output:null},S=t.kind==="span"&&t.span.category==="tool"&&(!!t.span.toolCallId||!!(t.span.toolName?.trim()||t.span.name?.trim())),A=t.kind==="prompt"?null:S?u.input:t.kind==="span"&&(t.span.category==="llm"||t.span.category==="step")?E.input:(t.kind==="span"&&t.span.category==="error",null),N=t.kind==="prompt"?null:S?u.output:t.kind==="span"&&(t.span.category==="llm"||t.span.category==="step")?E.output:t.kind==="span"&&t.span.category==="error"?t.span.name:null,k=t.kind==="prompt"?LG(s,t.messageStartIndex,t.messageEndIndex):void 0,R=t.kind==="span"&&(typeof t.span.inputTokens=="number"||typeof t.span.outputTokens=="number"||typeof t.span.totalTokens=="number"),T=t.kind==="prompt"&&(typeof t.aggregatedInputTokens=="number"||typeof t.aggregatedOutputTokens=="number"||typeof t.aggregatedTotalTokens=="number"),Q=t.kind==="span"&&u.errorText?u.errorText:null,P=!!(c&&r),V=l?YS(t,e):void 0;return(0,B.jsxs)("div",{"data-testid":"trace-detail-pane",className:"space-y-4 bg-background p-4",children:[(0,B.jsxs)("div",{className:ge("border-b border-border/40 pb-3",P?"flex flex-col gap-3 min-[400px]:flex-row min-[400px]:items-start":""),children:[(0,B.jsxs)("div",{className:ge("flex gap-3",P?"min-w-0 min-[400px]:flex-1":""),children:[(0,B.jsx)("div",{className:"shrink-0 pt-0.5",children:t.kind==="prompt"?(0,B.jsx)(ii,{category:"prompt",size:"lg"}):(0,B.jsx)(ii,{category:m,size:"lg"})}),(0,B.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,B.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,B.jsx)("h3",{className:"text-sm font-bold leading-tight text-foreground",children:f}),v?(0,B.jsxs)(lo,{className:"border-border/60 bg-muted/30 px-1.5 py-0 text-[10px] font-medium text-muted-foreground","data-testid":"trace-turn-runtime-badge",title:v.engine==="harness"?"This turn ran through the harness adapter.":v.engine==="emulated"?"This turn ran through MCPJam's emulated chat engine.":v.harness?"This turn ran through the harness adapter.":"Runtime engine was not recorded for this turn.",children:["Engine: ",$G(v)]}):null,p==="error"?(0,B.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Error","aria-label":"Error"}):null]}),(0,B.jsxs)("div",{className:"text-xs tabular-nums text-muted-foreground",children:[(0,B.jsx)("span",{className:"font-medium text-foreground",children:so(d)}),t.kind==="prompt"&&T?(0,B.jsxs)(B.Fragment,{children:[typeof t.aggregatedInputTokens=="number"?` · ${t.aggregatedInputTokens} in`:"",typeof t.aggregatedOutputTokens=="number"?` → ${t.aggregatedOutputTokens} out`:"",typeof t.aggregatedTotalTokens=="number"?` (${t.aggregatedTotalTokens} total)`:""]}):t.kind==="span"&&R?(0,B.jsxs)(B.Fragment,{children:[typeof t.span.inputTokens=="number"?` · ${t.span.inputTokens} in`:"",typeof t.span.outputTokens=="number"?` → ${t.span.outputTokens} out`:"",typeof t.span.totalTokens=="number"?` (${t.span.totalTokens} total)`:""]}):null,(0,B.jsx)(iG,{cost:V})]}),(0,B.jsx)(oG,{cost:V}),t.kind==="span"?(()=>{const U=t.span,j=U.category==="llm"?CG(U.outputTokens,d):null,oe=[],ne=U.category==="tool"?IH(U,e):void 0;return ne&&oe.push({label:"Answered by",value:`the mock: ${ne}`}),U.provider&&oe.push({label:"Provider",value:U.provider}),U.finishReason&&oe.push({label:"Finish",value:U.finishReason}),typeof U.ttfcMs=="number"&&oe.push({label:"TTFC",value:so(U.ttfcMs)}),j!==null&&oe.push({label:"Throughput",value:`${j.toFixed(1)} tok/s`}),U.responseId&&oe.push({label:"Response ID",value:U.responseId}),oe.length===0?null:(0,B.jsx)("div",{"data-testid":"trace-span-metadata",className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:oe.map(H=>(0,B.jsxs)("span",{className:"truncate",children:[(0,B.jsxs)("span",{className:"text-muted-foreground/70",children:[H.label,":"," "]}),(0,B.jsx)("span",{className:"font-medium text-foreground",children:H.value})]},H.label))})})():null]})]}),P?(0,B.jsx)("div",{className:"flex min-w-0 min-[400px]:flex-1 min-[400px]:justify-end min-[400px]:pt-0.5",children:(0,B.jsxs)(Cn,{type:"button",size:"sm",variant:"outline",className:"w-full shrink-0 justify-center whitespace-nowrap min-[400px]:w-auto",onClick:()=>{c&&r&&r(c)},children:[(0,B.jsx)(kx,{className:"h-3.5 w-3.5"}),"Reveal in Chat"]})}):null]}),t.kind==="prompt"&&o?(0,B.jsx)(ZH,{turnEvent:o}):null,t.kind==="prompt"&&k?(0,B.jsx)("div",{className:"min-h-0 max-h-[min(60vh,28rem)] flex-1 overflow-auto rounded-md border border-border/50 bg-muted/10 px-3 py-2 text-xs leading-relaxed text-foreground",children:k}):null,n&&t.kind==="span"&&t.span.messageStartIndex===void 0?(0,B.jsx)("p",{className:"text-xs text-muted-foreground",children:"Message details are unavailable for this span. Read the conversation in Chat."}):t.kind==="span"?(0,B.jsxs)("div",{className:"space-y-4",children:[(0,B.jsxs)("div",{className:"space-y-2",children:[(0,B.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Input"}),(0,B.jsx)(eg,{value:A??void 0})]}),(0,B.jsxs)("div",{className:ge("space-y-2",t.span.category==="error"||Q?"rounded-md border border-destructive/50 bg-destructive/50 p-2":""),children:[(0,B.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Output"}),(0,B.jsx)(eg,{value:N??void 0}),Q?(0,B.jsx)("pre",{className:"max-h-40 overflow-auto rounded-md border border-destructive/50 bg-destructive/50 p-3 text-xs whitespace-pre-wrap break-words text-foreground",children:Q}):null,typeof t.span.mcpErrorCode=="number"?(0,B.jsxs)("div",{"data-testid":"trace-mcp-error-code",className:"text-[11px] tabular-nums text-muted-foreground",title:"MCP-layer error code. -32602/-32601 etc. are server JSON-RPC errors; -32000 (connection closed) / -32001 (request timeout) are transport/client failures, not server faults.",children:[(0,B.jsx)("span",{className:"text-muted-foreground/70",children:"MCP error: "}),(0,B.jsx)("span",{className:"font-medium text-foreground",children:bH(t.span.mcpErrorCode)})]}):null]})]}):null]})}function Az({recordedSpans:t,projectedMessages:e=!1,interactionSteps:n,estimatedDurationMs:s,transcriptMessageCount:r=0,transcriptMessages:i=[],traceStartedAtMs:o=null,traceEndedAtMs:a=null,onRevealInTranscript:l,hideToolbar:c=!1,timelineFilter:u,onTimelineFilterChange:d,expandedPromptIds:h,onExpandedPromptIdsChange:f,expandedStepIds:p,onExpandedStepIdsChange:m,viewportMaxMs:v,turnRuntimeByPromptIndex:E,turnEventByPromptIndex:S,fillContent:A=!1,detailPlacement:N="below",iterationCost:k}){const{containerRef:R,direction:T}=kH(N),Q=T==="horizontal",P=(0,g.useMemo)(()=>e?wH(t??[],i):void 0,[e,t,i]),V=P?.spans??t,U=lG(V,k),j=U.spans,oe=wy(),ne=KS(),H=Yo(),z=(0,g.useMemo)(()=>new Set(H?(j??[]).filter(M=>M.cost).map(M=>M.id):[]),[H,j]),ae=V&&V.length>0?"recorded":(s??0)>0?"estimated":"none",ue=(0,g.useMemo)(()=>V?.length?IG(V).map(M=>P?{...M,messageStartIndex:P.userIndices[M.promptIndex]??-1,messageEndIndex:P.userIndices[M.promptIndex]??-1}:M):[],[V,P]),le=(0,g.useMemo)(()=>{const M=new Map;for(const be of n??[]){const De=M.get(be.toolCallId);De?De.push(be):M.set(be.toolCallId,[be])}for(const be of M.values())be.sort((De,We)=>De.stepIndex-We.stepIndex);return M},[n]),Ce=V?.length?V.reduce((M,be)=>Math.max(M,be.endMs),1):Math.max(s??0,1),ie=(0,g.useMemo)(()=>V?.map(M=>`${M.id}:${M.startMs}:${M.endMs}`).join("|")??ae,[ae,V]),[Ie,J]=(0,g.useState)(1);(0,g.useEffect)(()=>{v===void 0&&J(Ce)},[Ce,ie,v]);const $=Math.max(1,v!==void 0?v:Ie),Z=Math.max(1,Math.round(Ce/50)),Y=(0,g.useMemo)(()=>UG({traceStartedAtMs:o,traceEndedAtMs:a,traceDurationMs:Ce}),[Ce,a,o]),[ee,pe]=(0,g.useState)("all"),ce=u!==void 0?u:ee,Ne=d??pe,[ke,Me]=(0,g.useState)(new Set),[nt,gt]=(0,g.useState)(new Set),dt=h!==void 0?h:ke,lt=f??Me,Ct=p!==void 0?p:nt,ht=m??gt,[Ye,un]=(0,g.useState)(null),[Bt,Fe]=(0,g.useState)(null),[de,Re]=(0,g.useState)(null),Ge=(0,g.useRef)(null),Fs=(0,g.useRef)(null),[Xe,hs]=(0,g.useState)(-1);(0,g.useLayoutEffect)(()=>{const M=Fs.current;if(!M)return;const be=()=>{const We=M.getBoundingClientRect().width;hs(Number.isFinite(We)?We:0)};if(be(),typeof ResizeObserver>"u")return;const De=new ResizeObserver(be);return De.observe(M),()=>De.disconnect()},[T]);const St=(0,g.useMemo)(()=>fG(Xe),[Xe]),On=(0,g.useMemo)(()=>St.length!==2?!1:Xe<0||Xe===0?!0:Xe<BG,[Xe,St]);(0,g.useEffect)(()=>{c||(Me(new Set(ue.map(M=>M.key))),gt(Xm(ue)))},[c,ue]);const Pe=(0,g.useMemo)(()=>{if(ae!=="recorded")return[];const M=[],be=new Set;function De(W){return ce==="all"?!0:ce==="error"?Fr(W,i,e):W.category===ce}function We(W,He,je){const st=W.span.category==="step",Le=st?je:je+1,ft=W.children.map(zt=>We(zt,He,Le)),et=ft.flatMap(zt=>zt.rows),Ln=ft.some(zt=>zt.hasVisibleContent);if(st)return{hasVisibleContent:Ln||W.children.length>0,rows:et};if(W.span.category==="llm"&&!z.has(W.span.id)&&typeof W.span.totalTokens!="number"&&typeof W.span.inputTokens!="number"&&typeof W.span.outputTokens!="number"&&W.span.endMs-W.span.startMs<50)return{hasVisibleContent:!1,rows:[]};const ct=W.span.toolCallId,fs=W.span.category==="tool"&&!!ct&&!be.has(ct);fs&&ct&&be.add(ct);const Qo=fs&&ct?(le.get(ct)??[]).filter(zt=>ce==="all"||ce==="tool"?!0:ce==="error"?Rl(zt)==="error":!1).map((zt,gc)=>({kind:"interaction",key:`interaction-${W.span.id}-${zt.stepIndex}-${gc}`,promptIndex:He,depth:je+1,step:zt,startMs:W.span.startMs,endMs:W.span.endMs,status:Rl(zt)})):[];if(!(De(W.span)||Ln||Qo.length>0))return{hasVisibleContent:Ln,rows:et};const Bi={kind:"span",key:W.span.id,promptIndex:He,depth:je,span:W.span,hasChildren:W.children.length>0,isExpanded:Ct.has(W.span.id)};return{hasVisibleContent:!0,rows:[Bi,...Bi.hasChildren&&Bi.isExpanded?et:[],...Qo]}}for(const W of ue){const He=W.roots.map(et=>We(et,W.promptIndex,0)).flatMap(et=>et.rows);if(!(He.length>0||ce==="all"&&W.spans.length>0))continue;const je=W.spans.some(et=>Fr(et,i,e)),st=MG(i,W.messageStartIndex,W.messageEndIndex),Le=mG(W.spans),ft=S?.get(W.promptIndex);M.push({kind:"prompt",key:W.key,promptIndex:W.promptIndex,label:W.label,conversationLabel:ft?$H(ft.event):st?`User: "${st}"`:void 0,startMs:W.startMs,endMs:W.endMs,messageStartIndex:W.messageStartIndex,messageEndIndex:W.messageEndIndex,counts:W.counts,hasAnyFailure:je,isExpanded:dt.has(W.key),aggregatedInputTokens:Le.inputTokens,aggregatedOutputTokens:Le.outputTokens,aggregatedTotalTokens:Le.totalTokens}),dt.has(W.key)&&M.push(...He)}return M},[dt,Ct,ce,ue,le,ae,i,e,z,S]),Bs=(0,g.useMemo)(()=>Xm(ue),[ue]),dn=(0,g.useMemo)(()=>{if(ue.length===0)return!1;for(const M of ue)if(!dt.has(M.key))return!1;for(const M of Bs)if(!Ct.has(M))return!1;return!0},[ue,dt,Ct,Bs]);(0,g.useEffect)(()=>{if(Pe.length===0){un(null);return}(!Ye||!Pe.some(M=>M.key===Ye))&&un(Pe[0].key)},[Pe,Ye]);const hn=Pe.find(M=>M.key===Ye),ze=Bt?Pe.find(M=>M.key===Bt):void 0,mr=Bt?Pe.findIndex(M=>M.key===Bt):-1;(0,g.useEffect)(()=>{Bt&&!Pe.some(M=>M.key===Bt)&&(Fe(null),Re(null),Ge.current=null)},[Bt,Pe]);const Ps=(0,g.useCallback)(M=>{const be=(M.querySelector('[data-testid="trace-row-glyph"]')??M).getBoundingClientRect();return{anchorX:be.left+be.width/2,anchorY:be.top,anchorBottom:be.bottom}},[]);(0,g.useEffect)(()=>{if(!Bt)return;const M=()=>{const be=Ge.current;be&&Re(Ps(be))};return window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M)}},[Bt,Ps]);const Vt=(0,g.useMemo)(()=>{if(!ze)return null;const{startMs:M,endMs:be}=oh(ze),De=ze.kind==="span"&&Fr(ze.span,i,e),We=ze.kind==="span"?ih(ze,i,e,ne(ze.span)):null,W=ze.kind==="prompt"?ze.conversationLabel??ze.label:ze.kind==="interaction"?ri(ze.step):We.title,He=jG(ze,V),je=ze.kind==="prompt"?"prompt":ze.kind==="interaction"?"interaction":ze.span.category==="tool"&&De?"error":ze.span.category;return{label:W,spanShowsFailure:De,tokenStats:He,rowStartTimestamp:Y!==null?Y+M:null,rowEndTimestamp:Y!==null?Y+be:null,glyphCategory:je,cost:H?YS(ze,j):void 0}},[ze,V,j,Y,i,e,ne,H]),mc=(0,g.useCallback)(M=>{if(Pe.length===0)return;const be=Pe.findIndex(De=>De.key===Ye);if(M.key==="ArrowDown"){M.preventDefault();const De=be<0?0:Math.min(Pe.length-1,be+1);un(Pe[De].key);return}if(M.key==="ArrowUp"){M.preventDefault();const De=be<=0?0:be-1;un(Pe[De].key);return}if(M.key==="Enter"&&be>=0){const De=Pe[be];if(De.kind==="prompt"){M.preventDefault();const We=new Set(dt);We.has(De.key)?We.delete(De.key):We.add(De.key),lt(We);return}if(De.kind==="span"&&De.hasChildren){M.preventDefault();const We=new Set(Ct);We.has(De.key)?We.delete(De.key):We.add(De.key),ht(We)}}},[dt,Ct,Pe,Ye,lt,ht]),Hs=(0,B.jsxs)(B.Fragment,{children:[U.loader,(0,B.jsx)(uG,{spans:j,iteration:k,unmatched:U.unmatched})]});if(ae==="none")return(0,B.jsxs)(B.Fragment,{children:[Hs,(0,B.jsx)("div",{className:"text-xs text-muted-foreground",children:"No timing data recorded for this iteration."})]});if(ae==="estimated")return(0,B.jsxs)("div",{className:"space-y-3",children:[Hs,(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(lo,{className:"border-warning/50 bg-warning/50 text-foreground",children:"Estimated total only"}),(0,B.jsx)("span",{className:"text-xs text-muted-foreground",children:so(s??0)})]}),(0,B.jsxs)("div",{className:"space-y-1 text-[11px] text-muted-foreground",children:[(0,B.jsx)("p",{children:"Per-step timing was not recorded for this run."}),r>0?(0,B.jsxs)("p",{children:["Conversation detail is in the Chat tab. Open"," ",(0,B.jsx)("span",{className:"font-medium text-foreground/80",children:"Raw"})," to inspect the stored trace and confirm whether a"," ",(0,B.jsx)("code",{className:"rounded border border-border/50 bg-muted/40 px-1 py-px font-mono text-[10px] text-foreground/90",children:"spans"})," ","array exists; only new runs that persist spans show a per-step timeline here."]}):null]})]});const Mn=v===void 0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Cn,{type:"button",variant:"outline",size:"icon",className:"h-7 w-7 border-border/50",title:"Zoom in timeline","aria-label":"Zoom in timeline",disabled:Ie<=Z,onClick:()=>J(M=>Math.max(Z,Math.round(M*.8))),children:(0,B.jsx)(_y,{className:"size-3.5","aria-hidden":!0})}),(0,B.jsx)(Cn,{type:"button",variant:"outline",size:"icon",className:"h-7 w-7 border-border/50",title:"Zoom out timeline","aria-label":"Zoom out timeline",disabled:Ie>=Ce*4,onClick:()=>J(M=>Math.min(Ce*4,Math.round(M*1.25))),children:(0,B.jsx)(Nx,{className:"size-3.5","aria-hidden":!0})})]}):null;return(0,B.jsxs)("div",{className:ge("space-y-2",A&&"flex min-h-0 flex-1 flex-col"),children:[c?null:(0,B.jsxs)("div",{className:A?"shrink-0":void 0,children:[(0,B.jsx)(NH,{filter:ce,onFilterChange:Ne,isFullyExpanded:dn,expandDisabled:ue.length===0,zoomControls:Mn,onToggleExpandAll:()=>{dn?(lt(new Set),ht(new Set)):(lt(new Set(ue.map(M=>M.key))),ht(new Set(Bs)))}}),(0,B.jsx)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 px-1 text-xs text-muted-foreground",children:[{label:"User",cls:"trace-waterfall-bar-prompt"},{label:"Connect",cls:"trace-waterfall-bar-step"},{label:"Discovery",cls:"trace-waterfall-bar-step"},{label:"LLM",cls:"trace-waterfall-bar-llm"},{label:"Tool",cls:"trace-waterfall-bar-tool"},{label:"Step",cls:"trace-waterfall-bar-step"},{label:"Error",cls:"trace-waterfall-bar-error"}].map(({label:M,cls:be})=>(0,B.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,B.jsx)("span",{className:ge("h-2 w-2.5 rounded-sm",be)}),M]},M))})]}),Hs,(0,B.jsx)("div",{ref:R,className:ge("@container/trace-timeline min-w-0",A&&"flex min-h-0 flex-1 flex-col"),children:(0,B.jsxs)(B2,{direction:T,className:ge("rounded-lg border border-border/50 bg-background",A?"min-h-0 flex-1 overflow-hidden":"min-h-[min(25rem,calc(100dvh-8rem))]"),style:A?void 0:{height:"auto"},children:[(0,B.jsx)(sh,{defaultSize:Q?62:65,minSize:0,className:"min-h-0 min-w-0 overflow-hidden",children:(0,B.jsx)(C2,{className:ge(A?"h-full min-h-0 overflow-hidden":"max-h-[calc(100vh-8rem)] min-h-0"),children:(0,B.jsx)("div",{tabIndex:0,role:"region","aria-label":"Trace timeline. Use arrow keys to change selection, Enter to expand.",onKeyDown:mc,className:"relative min-h-0 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:(0,B.jsxs)("div",{className:"grid pr-4",style:{gridTemplateColumns:"minmax(140px, 260px) minmax(0, 1fr) minmax(5.25rem, max-content)",gridTemplateRows:`auto repeat(${Pe.length}, minmax(48px, auto))`},children:[(0,B.jsx)("div",{className:"sticky top-0 z-20 border-b border-border/50 bg-background/95 px-4 py-1.5 backdrop-blur",style:{gridColumn:"1 / 3",gridRow:1},children:(0,B.jsxs)("div",{className:"flex min-h-6 min-w-0 items-center gap-3",children:[(0,B.jsx)("div",{className:"shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Trace"}),(0,B.jsx)("div",{className:"min-h-6 min-w-0 flex-1",children:(0,B.jsx)("div",{ref:Fs,className:"relative h-6 min-w-0",children:On?(0,B.jsx)("div",{className:"flex h-full min-w-0 items-center justify-center",children:(0,B.jsx)("span",{className:"min-w-0 max-w-full truncate text-center text-[10px] tabular-nums text-muted-foreground",title:qm($),children:qm($)})}):St.map(M=>{const be=M>=100?"100%":`${M}%`;return(0,B.jsx)("div",{className:"pointer-events-none absolute inset-y-0",style:{left:be},children:(0,B.jsx)("div",{className:ge("absolute text-[10px] tabular-nums text-muted-foreground",pG(M)),children:ol($*M/100)})},M)})})})]})}),(0,B.jsx)("div",{className:"sticky top-0 z-20 flex min-h-0 items-center border-b border-l border-border/50 bg-background/95 px-3 py-1.5 pl-4 backdrop-blur",style:{gridColumn:3,gridRow:1},children:(0,B.jsxs)("div",{className:"flex h-6 w-full min-w-0 items-center justify-start gap-1.5",children:[(0,B.jsx)(_B,{className:"size-3 shrink-0 text-muted-foreground","aria-hidden":!0}),(0,B.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Latency"})]})}),Pe.length>0?(0,B.jsx)("div",{className:"pointer-events-none relative z-0 bg-transparent",style:{gridColumn:2,gridRow:`2 / ${Pe.length+2}`},children:St.map(M=>(0,B.jsx)("div",{className:"absolute top-0 bottom-0 w-px bg-border/40",style:{left:M>=100?"100%":`${M}%`}},M))}):null,Pe.map((M,be)=>{const De=M.key===Ye,{startMs:We,endMs:W,durationMs:He}=oh(M),je=We/$*100,st=Math.max((W-We)/$*100,.45),Le=M.kind==="span"&&Fr(M.span,i,e),ft=M.kind==="prompt"?"prompt":M.kind==="interaction"?"interaction":M.span.category==="tool"&&Le?"error":M.span.category,et=M.kind==="interaction"&&M.status==="error",Ln=M.kind==="span"?ih(M,i,e):null,ct=M.kind==="prompt"?M.conversationLabel??M.label:M.kind==="interaction"?ri(M.step):Ln.title,fs=so(He),Qo=M.kind==="prompt"?!0:M.kind==="interaction"?!1:M.hasChildren||M.span.category==="llm",Bi=be+2,zt=AG(M,Le),gc=DG(M,Le),NB=()=>{al("trace_span_clicked",{location:"trace_timeline",span_kind:M.kind}),un(M.key)},Cc=$t=>{$t.stopPropagation(),NB()},uy=De?ge("bg-transparent",zt):"border-l-transparent bg-background group-hover:bg-muted/20 hover:bg-muted/20",OB=De?"bg-transparent":"bg-background group-hover:bg-muted/20 hover:bg-muted/20";return(0,B.jsxs)(lg.div,{"data-testid":"trace-row","data-state":De?"selected":void 0,onClick:NB,onMouseEnter:$t=>{Fe(M.key);const Jt=$t.currentTarget;Ge.current=Jt,Re(Ps(Jt))},onMouseLeave:()=>{Fe($t=>$t===M.key?null:$t),Re(null),Ge.current=null},onFocus:$t=>{Fe(M.key);const Jt=$t.currentTarget;Ge.current=Jt,Re(Ps(Jt))},onBlur:$t=>{$t.currentTarget.contains($t.relatedTarget)||(Fe(Jt=>Jt===M.key?null:Jt),Re(null),Ge.current=null)},initial:oe||be>=20?!1:{opacity:0,y:6},animate:{opacity:1,y:0},transition:oe||be>=20?{duration:0}:{duration:.15,delay:be*.03+.05,ease:[.16,1,.3,1]},style:{gridColumn:"1 / 4",gridRow:Bi,display:"grid",gridTemplateColumns:"subgrid"},className:ge("group min-h-0 min-w-0 cursor-pointer items-stretch",De&&"trace-waterfall-row-selected ring-1 ring-inset ring-ring/40"),children:[(0,B.jsxs)("div",{className:ge("flex items-center gap-2 border-b border-border/40 px-4 py-2 transition-all duration-150 border-l-2",uy),children:[(0,B.jsx)("div",{className:"flex shrink-0 items-center",style:{paddingLeft:M.kind==="prompt"?0:M.depth*16},children:Qo?(0,B.jsx)("button",{type:"button",className:"mr-1 inline-flex h-5 w-5 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted/30 hover:text-foreground",onClick:$t=>{if($t.stopPropagation(),M.kind==="prompt"){const Zo=new Set(dt);Zo.has(M.key)?Zo.delete(M.key):Zo.add(M.key),lt(Zo);return}const Jt=new Set(Ct);Jt.has(M.key)?Jt.delete(M.key):Jt.add(M.key),ht(Jt)},"aria-label":M.kind==="prompt"?`${M.isExpanded?"Collapse":"Expand"} ${M.label}`:`${"isExpanded"in M&&M.isExpanded?"Collapse":"Expand"} ${ct}`,children:"isExpanded"in M&&M.isExpanded?(0,B.jsx)(ag,{className:"h-3.5 w-3.5"}):(0,B.jsx)(ro,{className:"h-3.5 w-3.5"})}):(0,B.jsx)("span",{className:"mr-1 h-5 w-5"})}),(0,B.jsx)("button",{type:"button","data-testid":"trace-row-label-button",className:"min-w-0 flex-1 text-left",onClick:Cc,children:(0,B.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,B.jsx)("span",{"data-testid":"trace-row-glyph",className:"inline-flex shrink-0 items-center",children:M.kind==="prompt"?(0,B.jsx)(ii,{category:"prompt"}):(0,B.jsx)(ii,{category:ft})}),(0,B.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:ct}),M.kind==="prompt"?(0,B.jsx)(ny,{event:S?.get(M.promptIndex)?.event}):null,(0,B.jsx)(tN,{name:M.kind==="span"?ne(M.span):void 0}),M.kind==="prompt"&&M.hasAnyFailure?(0,B.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Contains errors","aria-label":"Contains errors"}):null,M.kind==="span"&&Le||et?(0,B.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Error","aria-label":"Error"}):null]})})]}),(0,B.jsx)("button",{type:"button","data-testid":"trace-row-bar-hit","data-state":De?"selected":void 0,className:ge("relative z-[1] flex min-h-[48px] w-full items-center overflow-hidden border-b border-border/40 border-l-2 border-l-transparent px-4 py-2 text-left transition-all duration-150",OB),"aria-label":`Select on timeline (${so(He)})`,onClick:Cc,children:(0,B.jsx)("div",{"data-testid":M.kind==="span"&&Le?"trace-row-bar-error":"trace-row-bar",className:ge("absolute top-1/2 z-[1] h-4 min-w-0 -translate-y-1/2 rounded-[3px] transition-[left,width] duration-150",gc),style:{left:`${je}%`,width:`max(${st}%, 3px)`}})}),(0,B.jsxs)("button",{type:"button","data-testid":"trace-row-duration-hit","data-state":De?"selected":void 0,className:ge("flex min-h-[48px] items-center justify-start gap-1.5 whitespace-nowrap border-b border-l border-border/40 px-3 py-2 pl-4 text-[11px] tabular-nums text-muted-foreground transition-all duration-150",OB),"aria-label":`Select row duration (${fs})`,onClick:Cc,children:[(0,B.jsx)(_B,{className:"size-3 shrink-0 opacity-80","aria-hidden":!0}),fs]})]},M.key)})]})})})}),(0,B.jsx)(f2,{withHandle:!0}),(0,B.jsx)(sh,{defaultSize:Q?38:35,minSize:Q?25:20,className:"min-h-0 min-w-0 overflow-hidden",children:(0,B.jsx)("div",{"data-testid":"trace-timeline-detail-sticky",className:"h-full min-h-0 min-w-0 max-h-full overflow-y-auto",children:(0,B.jsx)(JG,{projectedMessages:e,row:hn,recordedSpans:j,transcriptMessages:i,onRevealInTranscript:l,turnRuntimeByPromptIndex:E,turnEvent:hn?.kind==="prompt"?S?.get(hn.promptIndex):void 0})})})]},T)}),ze&&Vt&&de?(0,B.jsx)(WG,{hoverPos:de,info:Vt,placement:mr===0?"bottom":"top",reduceMotion:oe??!1,rowKey:ze.key}):null]})}function WG({hoverPos:t,info:e,placement:n,reduceMotion:s,rowKey:r}){if(typeof document>"u")return null;const i=304,o=12,a=8,l=i/2,c=typeof window<"u"?window.innerWidth:t.anchorX+l+o,u=164,d=Math.max(u,c-l-o),h=Math.min(Math.max(t.anchorX,u),d),f={position:"fixed",top:n==="top"?t.anchorY-a:t.anchorBottom+a,left:h,transform:n==="top"?"translate(-50%, -100%)":"translateX(-50%)",zIndex:9999};return(0,gh.createPortal)((0,B.jsx)("div",{className:"pointer-events-none",style:f,children:(0,B.jsx)(lg.div,{"data-placement":n,"data-testid":"trace-row-hover-content",initial:s?!1:{opacity:0,y:6,filter:"blur(2px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{duration:.16,ease:[.16,1,.3,1]},className:"w-[19rem] overflow-hidden rounded-md border border-border/60 bg-popover text-popover-foreground shadow-xl",children:(0,B.jsxs)("div",{"data-testid":"trace-row-hover-card",className:"space-y-3 p-3",children:[(0,B.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,B.jsx)(ii,{category:e.glyphCategory}),(0,B.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs font-semibold text-popover-foreground",children:e.label})]}),(0,B.jsxs)("div",{className:"space-y-1.5",children:[(0,B.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-popover-foreground/65",children:"Time"}),(0,B.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Start"}),(0,B.jsx)("span",{"data-testid":"trace-row-hover-start",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:Zm(e.rowStartTimestamp)})]}),(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"End"}),(0,B.jsx)("span",{"data-testid":"trace-row-hover-end",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:Zm(e.rowEndTimestamp)})]})]})]}),(0,B.jsxs)("div",{className:"space-y-1.5",children:[(0,B.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-popover-foreground/65",children:"Tokens"}),(0,B.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Input"}),(0,B.jsx)("span",{"data-testid":"trace-row-hover-input-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:hu(e.tokenStats.inputTokens)})]}),(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Output"}),(0,B.jsx)("span",{"data-testid":"trace-row-hover-output-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:hu(e.tokenStats.outputTokens)})]}),(0,B.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,B.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Total"}),(0,B.jsx)("span",{"data-testid":"trace-row-hover-total-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:hu(e.tokenStats.totalTokens)})]})]})]}),(0,B.jsx)(aG,{cost:e.cost})]})},r)}),document.body)}export{X3 as $,G1 as $a,l5 as $i,LV as $n,cj as $o,hU as $r,v3 as $t,cH as A,Tw as Aa,A5 as Ai,o3 as An,Aj as Ao,PU as Ar,Bg as As,Y3 as At,oz as B,Jj as Ba,Fh as Bi,ZF as Bn,mj as Bo,vU as Br,R3 as Bt,mz as C,Qj as Ca,zA as Ci,B2 as Cn,wj as Co,lV as Cr,Ix as Cs,F2 as Ct,$S as D,kw as Da,L5 as Di,pB as Dn,DD as Do,UT as Dr,_B as Ds,j2 as Dt,pz as E,s5 as Ea,RA as Ei,uS as En,Rj as Eo,VU as Er,Dx as Es,L3 as Et,uz as F,Yj as Fa,k5 as Fi,r3 as Fn,bj as Fo,EU as Fr,nz as Ft,q2 as G,jj as Ga,g5 as Gi,WV as Gn,pj as Go,CU as Gr,k3 as Gt,rz as H,vC as Ha,D5 as Hi,xN as Hn,hj as Ho,NU as Hr,qo as Ht,dz as I,qj as Ia,jl as Ii,s3 as In,Ej as Io,IU as Ir,dc as It,z2 as J,Vj as Ja,m5 as Ji,zV as Jn,Ch as Jo,_u as Jr,G2 as Jt,sz as K,Gj as Ka,Gl as Ki,JV as Kn,rn as Ko,gU as Kr,xB as Kt,iz as L,zj as La,aA as Li,cP as Ln,Sj as Lo,yU as Lr,T3 as Lt,Bz as M,Ji as Ma,r0 as Mi,mB as Mn,kj as Mo,YU as Mr,jS as Mt,hz as N,_a as Na,R5 as Ni,i3 as Nn,ID as No,wU as Nr,si as Nt,fz as O,Rw as Oa,N5 as Oi,RP as On,bh as Oo,UU as Or,yx as Os,H2 as Ot,lz as P,SC as Pa,w5 as Pi,tS as Pn,yj as Po,xU as Pr,V3 as Pt,k2 as Q,fC as Qa,ZC as Qi,NV as Qn,uj as Qo,dU as Qr,y3 as Qt,az as R,$1 as Ra,iA as Ri,aP as Rn,Cj as Ro,bU as Rr,O2 as Rt,gH as S,ww as Sa,P5 as Si,sh as Sn,xh as So,tV as Sr,Tx as Ss,G3 as St,Cz as T,e5 as Ta,OA as Ti,OP as Tn,Tj as To,zU as Tr,wx as Ts,P3 as Tt,V2 as U,$j as Ua,v5 as Ui,tN as Un,vj as Uo,_U as Ur,M2 as Ut,Z2 as V,Kj as Va,x5 as Vi,TN as Vn,dj as Vo,OU as Vr,_3 as Vt,J2 as W,lo as Wa,C5 as Wi,KV as Wn,gj as Wo,mU as Wr,N3 as Wt,O3 as X,Hj as Xa,B5 as Xi,$R as Xn,$r as Xo,uU as Xr,f3 as Xt,W3 as Y,Kr as Ya,f5 as Yi,Uf as Yn,BD as Yo,HT as Yr,uc as Yt,T2 as Z,j1 as Za,h5 as Zi,VV as Zn,cD as Zo,BU as Zr,x3 as Zt,Sz as _,Fw as _a,U5 as _i,C2 as _n,ND as _o,aV as _r,Mx as _s,ez as _t,Io as a,Ww as aa,q5 as ai,S3 as an,QD as ao,PV as ar,qx as as,Ta as at,CH as b,Nw as ba,dI as bi,yi as bn,nC as bo,sV as br,Rx as bs,F3 as bt,xz as c,$C as ca,lI as ci,m3 as cn,$D as co,RV as cr,Ol as cs,H3 as ct,ey as d,a5 as da,Nu as di,x2 as dn,Lj as do,IV as dr,Ux as ds,J3 as dt,Kw as ea,Q5 as ei,w2 as en,M1 as eo,FV as er,lj as es,K3 as et,XS as f,jo as fa,QA as fi,y2 as fn,GD as fo,yV as fr,jx as fs,R2 as ft,bz as g,Ow as ga,j5 as gi,d3 as gn,Nj as go,pV as gr,Lx as gs,Z3 as gt,NH as h,r5 as ha,V5 as hi,u3 as hn,Oj as ho,fV as hr,Px as hs,A3 as ht,fG as i,WC as ia,tU as ii,p3 as in,wh as io,OV as ir,Ti as is,D3 as it,kl as j,t5 as ja,I5 as ji,kP as jn,xj as jo,Pf as jr,GS as jt,JS as k,n5 as ka,T5 as ki,wP as kn,sC as ko,Hf as kr,Sx as ks,_2 as kt,Dz as l,Vw as la,Tf as li,NS as ln,Fl as lo,TV as lr,oj as ls,z3 as lt,YS as m,o5 as ma,z5 as mi,l3 as mn,LD as mo,CV as mr,Hx as ms,N2 as mt,IG as n,Pl as na,eU as ni,E3 as nn,Pj as no,_V as nr,ai as ns,L2 as nt,wz as o,Uw as oa,G5 as oi,g3 as on,Fj as oo,GV as or,Is as os,tz as ot,QS as p,xf as pa,Pr as pi,RS as pn,Mj as po,EV as pr,Gx as ps,j3 as pt,K2 as q,Uj as qa,yn as qi,$V as qn,fj as qo,AU as qr,Q3 as qt,Xm as r,Tu as ra,Z5 as ri,b3 as rn,Su as ro,MV as rr,aj as rs,q3 as rt,Yo as s,qC as sa,aI as si,C3 as sn,lC as so,zR as sr,mh as ss,$3 as st,Az as t,c5 as ta,X5 as ti,B3 as tn,A1 as to,HV as tr,aD as ts,U3 as tt,yz as u,KC as ua,ZA as ui,D2 as un,_j as uo,VR as ur,Ml as us,P2 as ut,SH as v,HC as va,$5 as vi,v2 as vn,aC as vo,oV as vr,Ox as vs,DB as vt,vz as w,Zj as wa,VA as wi,LP as wn,Ij as wo,ZU as wr,Ax as ws,w3 as wt,gz as x,Ho as xa,F5 as xi,f2 as xn,rC as xo,rV as xr,kx as xs,I3 as xt,DH as y,UC as ya,hI as yi,a3 as yn,Dj as yo,nV as yr,Nx as ys,yB as yt,cz as z,Wj as za,oA as zi,rP as zn,Bj as zo,SU as zr,M3 as zt};
51
51
 
52
- //# sourceMappingURL=trace-timeline-CRxEZYCU.js.map
52
+ //# sourceMappingURL=trace-timeline-CLTmhMpA.js.map