@mcpjam/inspector 3.12.6 → 3.12.7

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 (27) hide show
  1. package/dist/client/assets/{OAuthDesktopReturnNotice-Hqfjrb1H.js → OAuthDesktopReturnNotice-DUuacpVO.js} +2 -2
  2. package/dist/client/assets/{app-bootstrap-BJCjI-vd.js → app-bootstrap-DiOYsEwh.js} +324 -324
  3. package/dist/client/assets/{button-BIwDmB_t.js → button-F4pHUjYC.js} +2 -2
  4. package/dist/client/assets/{chunk-YOKDWASO-BR3Wei6p.js → chunk-YOKDWASO-B2XCf4h4.js} +5 -5
  5. package/dist/client/assets/{dead-clicks-autocapture-By9oPZNO.js → dead-clicks-autocapture-BAMovRYs.js} +2 -2
  6. package/dist/client/assets/{error-reporting-DETvm7SY.js → error-reporting-BrfSwhO1.js} +4 -4
  7. package/dist/client/assets/{error-reporting-CcPrCWMZ.js → error-reporting-CWlEVH2b.js} +1 -1
  8. package/dist/client/assets/{exception-autocapture-DwbGcAD3.js → exception-autocapture-D5Eikj0K.js} +2 -2
  9. package/dist/client/assets/{failed-request-tracker-C_rHGGiC.js → failed-request-tracker-CYWaDq0H.js} +2 -2
  10. package/dist/client/assets/{highlighted-body-KPVGNVTW-BtWesXMy.js → highlighted-body-KPVGNVTW-BjkaxPPc.js} +2 -2
  11. package/dist/client/assets/{index-DVxvFt1b.js → index-B-8CVYYi.js} +3 -3
  12. package/dist/client/assets/{jszip.min-jjKI-S8C.js → jszip.min-BtiG5GuL.js} +2 -2
  13. package/dist/client/assets/{mermaid-HWGCJPDP-Sm76m65k.js → mermaid-HWGCJPDP-CYPKMbVd.js} +1 -1
  14. package/dist/client/assets/{posthog-recorder-e8IS69Uh.js → posthog-recorder-D-Nq98cg.js} +2 -2
  15. package/dist/client/assets/{preload-helper-CWYHVRyR.js → preload-helper-CC679xXH.js} +2 -2
  16. package/dist/client/assets/{rolldown-runtime-CQzr1Zku.js → rolldown-runtime-1PqeXL0B.js} +1 -1
  17. package/dist/client/assets/{surveys-o2N6B1zC.js → surveys-olC_pHGU.js} +2 -2
  18. package/dist/client/assets/{trace-timeline-Beb_Djgr.js → trace-timeline-D2FsrVpF.js} +1 -1
  19. package/dist/client/assets/{trace-timeline-D_iD3a0v.js → trace-timeline-fl51h9sN.js} +2 -2
  20. package/dist/client/assets/{web-vitals-DCOcPgvo.js → web-vitals-CIP57d68.js} +2 -2
  21. package/dist/client/index.html +6 -6
  22. package/dist/server/{chunk-SUMJU6PX.js → chunk-76PAQUEP.js} +2 -2
  23. package/dist/server/{chunk-T4H5HSBJ.js → chunk-FQTRKEDA.js} +2 -2
  24. package/dist/server/harness-install-cli.js +1 -1
  25. package/dist/server/index.js +23 -7
  26. package/dist/server/{local-turn-ZKWOMPM4.js → local-turn-3DH4OF7C.js} +3 -3
  27. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import{a as rT,n as iT,o as xy,r as sT}from"./rolldown-runtime-CQzr1Zku.js";import{a as oT,i as aT,o as lT}from"./preload-helper-CWYHVRyR.js";import{a as cT,i as uT,l as Ae,o as Xi,r as X,s as hT,t as Nt}from"./button-BIwDmB_t.js";import{Ai as Kc,Di as ve,En as fT,Si as xr,Ti as Va,cn as yl,di as by,dn as dT,fi as yn,fn as pT,ki as oh,ln as Fn,on as ah,pi as Ue,si as xl,sn as Pn,t as mT,un as gT,vi as dr,xi as ct,xn as vT}from"./error-reporting-DETvm7SY.js";import{a as yT,n as xT}from"./chunk-YOKDWASO-BR3Wei6p.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.12.6"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7f0847f6-e6cf-44c1-90ec-44d142beb7e9",e._sentryDebugIdIdentifier="sentry-dbid-7f0847f6-e6cf-44c1-90ec-44d142beb7e9")}catch{}})();var m=xy(lT(),1),_o=xy(oT(),1),g=aT(),bT=Object.defineProperty,wT=(e,t)=>bT(e,"name",{value:t,configurable:!0}),_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Xi(`Primitive.${t}`),r=m.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xd(e,t){e&&_o.flushSync(()=>e.dispatchEvent(t))}wT(xd,"dispatchDiscreteCustomEvent");var ST=Object.defineProperty,kT=(e,t)=>ST(e,"name",{value:t,configurable:!0}),CT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),TT=m.forwardRef(kT(function(t,n){return(0,g.jsx)(_e.span,{...t,ref:n,style:{...CT,...t.style}})},"VisuallyHidden")),AT=TT,RT=Object.defineProperty,Lt=(e,t)=>RT(e,"name",{value:t,configurable:!0});function MT(e,t){const n=m.createContext(t);n.displayName=e+"Context";const r=Lt(s=>{const{children:o,...a}=s,l=m.useMemo(()=>a,Object.values(a));return(0,g.jsx)(n.Provider,{value:l,children:o})},"Provider");r.displayName=e+"Provider";function i(s,o={}){const{optional:a=!1}=o,l=m.useContext(n);if(l)return l;if(t!==void 0)return t;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Lt(i,"useContext"),[r,i]}Lt(MT,"createContext");function rr(e,t=[]){let n=[];function r(s,o){const a=m.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=Lt(h=>{const{scope:f,children:d,...p}=h,v=f?.[e]?.[l]||a,y=m.useMemo(()=>p,Object.values(p));return(0,g.jsx)(v.Provider,{value:y,children:d})},"Provider");c.displayName=s+"Provider";function u(h,f,d={}){const{optional:p=!1}=d,v=f?.[e]?.[l]||a,y=m.useContext(v);if(y)return y;if(o!==void 0)return o;if(!p)throw new Error(`\`${h}\` must be used within \`${s}\``)}return Lt(u,"useContext"),[c,u]}Lt(r,"createContext");const i=Lt(()=>{const s=n.map(o=>m.createContext(o));return Lt(function(a){const l=a?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return i.scopeName=e,[r,wy(i,...t)]}Lt(rr,"createContextScope");function wy(...e){const t=e[0];if(e.length===1)return t;const n=Lt(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return Lt(function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Lt(wy,"composeContextScopes");var PT=Object.defineProperty,Ge=(e,t)=>PT(e,"name",{value:t,configurable:!0});function bd(e){const t=e+"CollectionProvider",[n,r]=rr(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Ge(v=>{const{scope:y,children:x}=v,b=m.useRef(null),w=m.useRef(new Map).current;return(0,g.jsx)(i,{scope:y,itemMap:w,collectionRef:b,children:x})},"CollectionProvider");o.displayName=t;const a=e+"CollectionSlot",l=Xi(a),c=m.forwardRef((v,y)=>{const{scope:x,children:b}=v,w=s(a,x),S=Ae(y,w.collectionRef);return(0,g.jsx)(l,{ref:S,children:b})});c.displayName=a;const u=e+"CollectionItemSlot",h="data-radix-collection-item",f=Xi(u),d=m.forwardRef((v,y)=>{const{scope:x,children:b,...w}=v,S=m.useRef(null),k=Ae(y,S),C=s(u,x);return m.useEffect(()=>(C.itemMap.set(S,{ref:S,...w}),()=>{C.itemMap.delete(S)})),(0,g.jsx)(f,{[h]:"",ref:k,children:b})});d.displayName=u;function p(v){const y=s(e+"CollectionConsumer",v);return m.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((w,S)=>b.indexOf(w.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return Ge(p,"useCollection"),[{Provider:o,Slot:c,ItemSlot:d},p,r]}Ge(bd,"createCollection");var om=new WeakMap,Gc=class lr extends Map{static{Ge(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],om.set(this,!0)}set(t,n){return om.get(this)&&(this.has(t)?this.#e[this.#e.indexOf(t)]=t:this.#e.push(t)),super.set(t,n),this}insert(t,n,r){const i=this.has(n),s=this.#e.length,o=wd(t);let a=o>=0?o:s+o;const l=a<0||a>=s?-1:a;if(l===this.size||i&&l===this.size-1||l===-1)return this.set(n,r),this;const c=this.size+(i?0:1);o<0&&a++;const u=[...this.#e];let h,f=!1;for(let d=a;d<c;d++)if(a===d){let p=u[d];u[d]===n&&(p=u[d+1]),i&&this.delete(n),h=this.get(p),this.set(n,r)}else{!f&&u[d-1]===n&&(f=!0);const p=u[f?d:d-1],v=h;h=this.get(p),this.delete(p),this.set(p,v)}return this}with(t,n,r){const i=new lr(this);return i.insert(t,n,r),i}before(t){const n=this.#e.indexOf(t)-1;if(!(n<0))return this.entryAt(n)}setBefore(t,n,r){const i=this.#e.indexOf(t);return i===-1?this:this.insert(i,n,r)}after(t){let n=this.#e.indexOf(t);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(t,n,r){const i=this.#e.indexOf(t);return i===-1?this:this.insert(i+1,n,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){const n=super.delete(t);return n&&this.#e.splice(this.#e.indexOf(t),1),n}deleteAt(t){const n=this.keyAt(t);return n!==void 0?this.delete(n):!1}at(t){const n=Fa(this.#e,t);if(n!==void 0)return this.get(n)}entryAt(t){const n=Fa(this.#e,t);if(n!==void 0)return[n,this.get(n)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return Fa(this.#e,t)}from(t,n){const r=this.indexOf(t);if(r===-1)return;let i=r+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(t,n){const r=this.indexOf(t);if(r===-1)return;let i=r+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return i;r++}}findIndex(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return r;r++}return-1}filter(t,n){const r=[];let i=0;for(const s of this)Reflect.apply(t,n,[s,i,this])&&r.push(s),i++;return new lr(r)}map(t,n){const r=[];let i=0;for(const s of this)r.push([s[0],Reflect.apply(t,n,[s,i,this])]),i++;return new lr(r)}reduce(...t){const[n,r]=t;let i=0,s=r??this.at(0);for(const o of this)i===0&&t.length===1?s=o:s=Reflect.apply(n,this,[s,o,i,this]),i++;return s}reduceRight(...t){const[n,r]=t;let i=r??this.at(-1);for(let s=this.size-1;s>=0;s--){const o=this.at(s);s===this.size-1&&t.length===1?i=o:i=Reflect.apply(n,this,[i,o,s,this])}return i}toSorted(t){const n=[...this.entries()].sort(t);return new lr(n)}toReversed(){const t=new lr;for(let n=this.size-1;n>=0;n--){const r=this.keyAt(n),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){const n=[...this.entries()];return n.splice(...t),new lr(n)}slice(t,n){const r=new lr;let i=this.size-1;if(t===void 0)return r;t<0&&(t=t+this.size),n!==void 0&&n>0&&(i=n-1);for(let s=t;s<=i;s++){const o=this.keyAt(s),a=this.get(o);r.set(o,a)}return r}every(t,n){let r=0;for(const i of this){if(!Reflect.apply(t,n,[i,r,this]))return!1;r++}return!0}some(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return!0;r++}return!1}};function Fa(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Sy(e,t);return n===-1?void 0:e[n]}Ge(Fa,"at");function Sy(e,t){const n=e.length,r=wd(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Ge(Sy,"toSafeIndex");function wd(e){return e!==e||e===0?0:Math.trunc(e)}Ge(wd,"toSafeInteger");function ET(e){const t=e+"CollectionProvider",[n,r]=rr(t),[i,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Gc,setItemMap:Ge(()=>{},"setItemMap")}),o=Ge(({state:b,...w})=>b?(0,g.jsx)(l,{...w,state:b}):(0,g.jsx)(a,{...w}),"CollectionProvider");o.displayName=t;const a=Ge(b=>{const w=y();return(0,g.jsx)(l,{...b,state:w})},"CollectionInit");a.displayName=t+"Init";const l=Ge(b=>{const{scope:w,children:S,state:k}=b,C=m.useRef(null),[T,M]=m.useState(null),A=Ae(C,M),[R,O]=k;return m.useEffect(()=>{if(!T)return;const P=Ty(()=>{});return P.observe(T,{childList:!0,subtree:!0}),()=>{P.disconnect()}},[T]),(0,g.jsx)(i,{scope:w,itemMap:R,setItemMap:O,collectionRef:A,collectionRefObject:C,collectionElement:T,children:S})},"CollectionProviderImpl");l.displayName=t+"Impl";const c=e+"CollectionSlot",u=Xi(c),h=m.forwardRef((b,w)=>{const{scope:S,children:k}=b,C=s(c,S),T=Ae(w,C.collectionRef);return(0,g.jsx)(u,{ref:T,children:k})});h.displayName=c;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Xi(f),v=m.forwardRef((b,w)=>{const{scope:S,children:k,...C}=b,T=m.useRef(null),[M,A]=m.useState(null),R=Ae(w,T,A),{setItemMap:O}=s(f,S),P=m.useRef(C);ky(P.current,C)||(P.current=C);const j=P.current;return m.useEffect(()=>{const N=j;return O(E=>M?E.has(M)?E.set(M,{...N,element:M}).toSorted(lh):(E.set(M,{...N,element:M}),E.toSorted(lh)):E),()=>{O(E=>!M||!E.has(M)?E:(E.delete(M),new Gc(E)))}},[M,j,O]),(0,g.jsx)(p,{[d]:"",ref:R,children:k})});v.displayName=f;function y(){return m.useState(new Gc)}Ge(y,"useInitCollection");function x(b){const{itemMap:w}=s(e+"CollectionConsumer",b);return w}return Ge(x,"useCollection"),[{Provider:o,Slot:h,ItemSlot:v},{createCollectionScope:r,useCollection:x,useInitCollection:y}]}Ge(ET,"createCollection");function ky(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||e[i]!==t[i])return!1;return!0}Ge(ky,"shallowEqual");function Cy(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ge(Cy,"isElementPreceding");function lh(e,t){return!e[1].element||!t[1].element?0:Cy(e[1].element,t[1].element)?-1:1}Ge(lh,"sortByDocumentPosition");function Ty(e){return new MutationObserver(t=>{for(const n of t)if(n.type==="childList"){e();return}})}Ge(Ty,"getChildListObserver");var OT=Object.defineProperty,fs=(e,t)=>OT(e,"name",{value:t,configurable:!0}),Ay=!!(typeof window<"u"&&window.document&&window.document.createElement);function te(e,t,{checkForDefaultPrevented:n=!0}={}){return fs(function(i){if(e?.(i),n===!1||!i||!i.defaultPrevented)return t?.(i)},"handleEvent")}fs(te,"composeEventHandlers");function IT(e){if(!Ay)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}fs(IT,"getOwnerWindow");function ch(e){if(!Ay)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}fs(ch,"getOwnerDocument");function Ry(e,t=!1){const{activeElement:n}=ch(e);if(!n?.nodeName)return null;if(My(n)&&n.contentDocument)return Ry(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=ch(n).getElementById(r);if(i)return i}}return n}fs(Ry,"getActiveElement");function My(e){return e.tagName==="IFRAME"}fs(My,"isFrame");var Dt=globalThis?.document?m.useLayoutEffect:()=>{},DT=Object.defineProperty,NT=(e,t)=>DT(e,"name",{value:t,configurable:!0}),am=m[" useEffectEvent ".trim().toString()],lm=m[" useInsertionEffect ".trim().toString()];function Py(e){if(typeof am=="function")return am(e);const t=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof lm=="function"?lm(()=>{t.current=e}):Dt(()=>{t.current=e}),m.useMemo(()=>((...n)=>t.current?.(...n)),[])}NT(Py,"useEffectEvent");var LT=Object.defineProperty,Bo=(e,t)=>LT(e,"name",{value:t,configurable:!0}),jT=m[" useInsertionEffect ".trim().toString()]||Dt;function Vo({prop:e,defaultProp:t,onChange:n=Bo(()=>{},"onChange"),caller:r}){const[i,s,o]=Ey({defaultProp:t,onChange:n}),a=e!==void 0;return[a?e:i,m.useCallback(c=>{if(a){const u=Oy(c)?c(e):c;u!==e&&o.current?.(u)}else s(c)},[a,e,s,o])]}Bo(Vo,"useControllableState");function Ey({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),i=m.useRef(n),s=m.useRef(t);return jT(()=>{s.current=t},[t]),m.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}Bo(Ey,"useUncontrolledState");function Oy(e){return typeof e=="function"}Bo(Oy,"isFunction");var cm=Symbol("RADIX:SYNC_STATE");function _T(e,t,n,r){const{prop:i,defaultProp:s,onChange:o,caller:a}=t,l=i!==void 0,c=Py(o),u=[{...n,state:s}];r&&u.push(r);const[h,f]=m.useReducer((y,x)=>{if(x.type===cm)return{...y,state:x.state};const b=e(y,x);return l&&!Object.is(b.state,y.state)&&c(b.state),b},...u),d=h.state,p=m.useRef(d);m.useEffect(()=>{p.current!==d&&(p.current=d,l||c(d))},[d,p,l]);const v=m.useMemo(()=>i!==void 0?{...h,state:i}:h,[h,i]);return m.useEffect(()=>{l&&!Object.is(i,h.state)&&f({type:cm,state:i})},[i,h.state,l]),[v,f]}Bo(_T,"useControllableStateReducer");var BT=Object.defineProperty,er=(e,t)=>BT(e,"name",{value:t,configurable:!0});function Iy(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}er(Iy,"useStateMachine");var Nn=er(e=>{const{present:t,children:n}=e,r=Dy(t),i=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),s=Ny(r.ref,Ly(i));return typeof n=="function"||r.isPresent?m.cloneElement(i,{ref:s}):null},"Presence");function Dy(e){const[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),s=m.useRef("none"),o=m.useRef(void 0),[a,l]=Iy(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{a==="mounted"?(s.current=o.current??Ri(r.current),o.current=void 0):s.current="none"},[a]),Dt(()=>{const c=r.current,u=i.current;if(u!==e){const h=s.current,f=Ri(c);e?(o.current=f,l("MOUNT")):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Dt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,h=er(d=>{const p=Ri(r.current).includes(CSS.escape(d.animationName));if(d.target===t&&p&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},"handleAnimationEnd"),f=er(d=>{d.target===t&&(s.current=Ri(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{if(c){const u=getComputedStyle(c);r.current=u,o.current=Ri(u)}else r.current=null;n(c)},[])}}er(Dy,"usePresence");function uh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}er(uh,"setRef");function Ny(...e){const t=m.useRef(e);return t.current=e,m.useCallback(n=>{const r=t.current;let i=!1;const s=r.map(o=>{const a=uh(o,n);return!i&&typeof a=="function"&&(i=!0),a});if(i)return()=>{for(let o=0;o<s.length;o++){const a=s[o];typeof a=="function"?a():uh(r[o],null)}}},[])}er(Ny,"useStableComposedRefs");function Ri(e){return e?.animationName||"none"}er(Ri,"getAnimationName");function Ly(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}er(Ly,"getElementRef");var VT=Object.defineProperty,FT=(e,t)=>VT(e,"name",{value:t,configurable:!0}),zT=m[" useId ".trim().toString()]||(()=>{}),$T=0;function ri(e){const[t,n]=m.useState(zT());return Dt(()=>{e||n(r=>r??String($T++))},[e]),e||(t?`radix-${t}`:"")}FT(ri,"useId");var HT=Object.defineProperty,WT=(e,t)=>HT(e,"name",{value:t,configurable:!0}),qT=m.createContext(void 0);function nc(e){const t=m.useContext(qT);return e||t||"ltr"}WT(nc,"useDirection");var UT=Object.defineProperty,KT=(e,t)=>UT(e,"name",{value:t,configurable:!0});function Qe(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...n)=>t.current?.(...n)),[])}KT(Qe,"useCallbackRef");var GT=Object.defineProperty,Ke=(e,t)=>GT(e,"name",{value:t,configurable:!0}),hh="dismissableLayer.update",QT="dismissableLayer.pointerDownOutside",XT="dismissableLayer.focusOutside",um,jy=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),_y=m.forwardRef(Ke(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,h=m.useContext(jy),[f,d]=m.useState(null),p=f?.ownerDocument??globalThis?.document,[,v]=m.useState({}),y=Ae(n,d),x=Array.from(h.layers),[b]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),w=b?x.indexOf(b):-1,S=f?x.indexOf(f):-1,k=h.layersWithOutsidePointerEventsDisabled.size>0,C=S>=w,T=m.useRef(!1),M=By(P=>{o?.(P),l?.(P),P.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(P=>{if(!(P instanceof Node))return!1;const j=[...h.branches].some(N=>N.contains(P));return C&&!j},[h.branches,C])}),A=Vy(P=>{if(i&&T.current)return;const j=P.target;[...h.branches].some(N=>N.contains(j))||(a?.(P),l?.(P),P.defaultPrevented||c?.())},p),R=f?S===x.length-1:!1,O=Qe(P=>{P.key==="Escape"&&(s?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))});return m.useEffect(()=>{if(R)return p.addEventListener("keydown",O,{capture:!0}),()=>p.removeEventListener("keydown",O,{capture:!0})},[p,R,O]),m.useEffect(()=>{if(f)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(um=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(f)),h.layers.add(f),fh(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(f),h.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=um))}},[f,p,r,h]),m.useEffect(()=>()=>{f&&(h.layers.delete(f),h.layersWithOutsidePointerEventsDisabled.delete(f),fh())},[f,h]),m.useEffect(()=>{const P=Ke(()=>v({}),"handleUpdate");return document.addEventListener(hh,P),()=>document.removeEventListener(hh,P)},[]),(0,g.jsx)(_e.div,{...u,ref:y,style:{pointerEvents:k?C?"auto":"none":void 0,...t.style},onFocusCapture:te(t.onFocusCapture,A.onFocusCapture),onBlurCapture:te(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:te(t.onPointerDownCapture,M.onPointerDownCapture)})},"DismissableLayer"));function YT(){const e=m.useContext(jy),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ke(YT,"useDismissableLayerSurface");var JT=Ke(()=>!0,"IS_TRUE");function By(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:s,shouldHandlePointerDownOutside:o=JT}=t,a=Qe(e),l=m.useRef(!1),c=m.useRef(!1),u=m.useRef(new Map),h=m.useRef(()=>{});return m.useEffect(()=>{function f(){c.current=!1,i.current=!1,u.current.clear()}Ke(f,"resetOutsideInteraction");function d(){return Array.from(u.current.values()).some(Boolean)}Ke(d,"isOutsideInteractionIntercepted");function p(w){if(!c.current)return;const S=w.target;S instanceof Node&&[...s].some(k=>k.contains(S))||u.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{c.current&&h.current()},0)}Ke(p,"handleInteractionCapture");function v(w){c.current&&u.current.set(w.type,!1)}Ke(v,"handleInteractionBubble");const y=Ke(w=>{if(w.target&&!l.current){let S=function(){n.removeEventListener("click",h.current);const C=d();f(),C||Sd(QT,a,k,{discrete:!0})};if(Ke(S,"handleAndDispatchPointerDownOutsideEvent"),!o(w.target)){n.removeEventListener("click",h.current),f(),l.current=!1;return}const k={originalEvent:w};c.current=!0,i.current=r&&w.button===0,u.current.clear(),!r||w.button!==0?S():(n.removeEventListener("click",h.current),h.current=S,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),f();l.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of x)n.addEventListener(w,p,!0),n.addEventListener(w,v);const b=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",y),n.removeEventListener("click",h.current);for(const w of x)n.removeEventListener(w,p,!0),n.removeEventListener(w,v)}},[n,a,r,i,s,o]),{onPointerDownCapture:Ke(()=>l.current=!0,"onPointerDownCapture")}}Ke(By,"usePointerDownOutside");function Vy(e,t=globalThis?.document){const n=Qe(e),r=m.useRef(!1);return m.useEffect(()=>{const i=Ke(s=>{s.target&&!r.current&&Sd(XT,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:Ke(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ke(()=>r.current=!1,"onBlurCapture")}}Ke(Vy,"useFocusOutside");function fh(){const e=new CustomEvent(hh);document.dispatchEvent(e)}Ke(fh,"dispatchUpdate");function Sd(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xd(i,s):i.dispatchEvent(s)}Ke(Sd,"handleAndDispatchCustomEvent");var ZT=Object.defineProperty,ht=(e,t)=>ZT(e,"name",{value:t,configurable:!0}),Qc="focusScope.autoFocusOnMount",Xc="focusScope.autoFocusOnUnmount",hm={bubbles:!1,cancelable:!0},eA=m.forwardRef(ht(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=t,[l,c]=m.useState(null),u=Qe(s),h=Qe(o),f=m.useRef(null),d=Ae(n,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let y=function(S){if(p.paused||!l)return;const k=S.target;l.contains(k)?f.current=k:Vn(f.current,{select:!0})},x=function(S){if(p.paused||!l)return;const k=S.relatedTarget;k!==null&&(l.contains(k)||Vn(f.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const k of S)k.removedNodes.length>0&&Vn(l)};ht(y,"handleFocusIn"),ht(x,"handleFocusOut"),ht(b,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",x);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),w.disconnect()}}},[i,l,p.paused]),m.useEffect(()=>{if(l){fm.add(p);const y=document.activeElement;if(!l.contains(y)){const x=new CustomEvent(Qc,hm);l.addEventListener(Qc,u),l.dispatchEvent(x),x.defaultPrevented||(Fy(qy(kd(l)),{select:!0}),document.activeElement===y&&Vn(l))}return()=>{l.removeEventListener(Qc,u),setTimeout(()=>{const x=new CustomEvent(Xc,hm);l.addEventListener(Xc,h),l.dispatchEvent(x),x.defaultPrevented||Vn(y??document.body,{select:!0}),l.removeEventListener(Xc,h),fm.remove(p)},0)}}},[l,u,h,p]);const v=m.useCallback(y=>{if(!r&&!i||p.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(x&&b){const w=y.currentTarget,[S,k]=zy(w);S&&k?!y.shiftKey&&b===k?(y.preventDefault(),r&&Vn(S,{select:!0})):y.shiftKey&&b===S&&(y.preventDefault(),r&&Vn(k,{select:!0})):b===w&&y.preventDefault()}},[r,i,p.paused]);return(0,g.jsx)(_e.div,{tabIndex:-1,...a,ref:d,onKeyDown:v})},"FocusScope"));function Fy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vn(r,{select:t}),document.activeElement!==n)return}ht(Fy,"focusFirst");function zy(e){const t=kd(e);return[dh(t,e),dh(t.reverse(),e)]}ht(zy,"getTabbableEdges");function kd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ht(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}ht(kd,"getTabbableCandidates");function dh(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):$y(r,{upTo:t})))return r}ht(dh,"findVisible");function $y(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}ht($y,"isHidden");function Hy(e){return e instanceof HTMLInputElement&&"select"in e}ht(Hy,"isSelectableInput");function Vn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Hy(e)&&t&&e.select()}}ht(Vn,"focus");var fm=Wy();function Wy(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ph(e,t),e.unshift(t)},remove(t){e=ph(e,t),e[0]?.resume()}}}ht(Wy,"createFocusScopesStack");function ph(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ht(ph,"arrayRemove");function qy(e){return e.filter(t=>t.tagName!=="A")}ht(qy,"removeLinks");var tA=Object.defineProperty,nA=(e,t)=>tA(e,"name",{value:t,configurable:!0}),Uy=m.forwardRef(nA(function(t,n){const{container:r,...i}=t,[s,o]=m.useState(!1);Dt(()=>o(!0),[]);const a=r||s&&globalThis?.document?.body;return a?_o.createPortal((0,g.jsx)(_e.div,{...i,ref:n}),a):null},"Portal")),rA=Object.defineProperty,Cd=(e,t)=>rA(e,"name",{value:t,configurable:!0}),sa=0,gi=null;function iA(e){return Td(),e.children}Cd(iA,"FocusGuards");function Td(){m.useEffect(()=>{gi||(gi={start:mh(),end:mh()});const{start:e,end:t}=gi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),sa++,()=>{sa===1&&(gi?.start.remove(),gi?.end.remove(),gi=null),sa=Math.max(0,sa-1)}},[])}Cd(Td,"useFocusGuards");function mh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Cd(mh,"createFocusGuard");var bn=function(){return bn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},bn.apply(this,arguments)};function Ky(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sA(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var za="right-scroll-bar-position",$a="width-before-scroll-bar",oA="with-scroll-bars-hidden",aA="--removed-body-scroll-bar-size";function Yc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lA(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var cA=typeof window<"u"?m.useLayoutEffect:m.useEffect,dm=new WeakMap;function uA(e,t){var n=lA(t||null,function(r){return e.forEach(function(i){return Yc(i,r)})});return cA(function(){var r=dm.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;i.forEach(function(a){s.has(a)||Yc(a,null)}),s.forEach(function(a){i.has(a)||Yc(a,o)})}dm.set(n,e)},[e]),n}function hA(e){return e}function fA(e,t){t===void 0&&(t=hA);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(i),s=n}var a=function(){var c=s;s=[],c.forEach(i)},l=function(){return Promise.resolve().then(a)};l(),n={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),n}}}}}function dA(e){e===void 0&&(e={});var t=fA(null);return t.options=bn({async:!0,ssr:!1},e),t}var Gy=function(e){var t=e.sideCar,n=Ky(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,bn({},n))};Gy.isSideCarExport=!0;function pA(e,t){return e.useMedium(t),Gy}var Qy=dA(),Jc=function(){},rc=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Jc,onWheelCapture:Jc,onTouchMoveCapture:Jc}),i=r[0],s=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,h=e.shards,f=e.sideCar,d=e.noRelative,p=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,S=Ky(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,C=uA([n,t]),T=bn(bn({},S),i);return m.createElement(m.Fragment,null,u&&m.createElement(k,{sideCar:Qy,removeScrollBar:c,shards:h,noRelative:d,noIsolation:p,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:w}),o?m.cloneElement(m.Children.only(a),bn(bn({},T),{ref:C})):m.createElement(b,bn({},T,{className:l,ref:C}),a))});rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rc.classNames={fullWidth:$a,zeroRight:za};var pm,mA=function(){if(pm)return pm;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mA();return t&&e.setAttribute("nonce",t),e}function vA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yA(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var xA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gA())&&(vA(t,n),yA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bA=function(){var e=xA();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xy=function(){var e=bA(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},wA={left:0,top:0,right:0,gap:0},Zc=function(e){return parseInt(e||"",10)||0},SA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zc(n),Zc(r),Zc(i)]},kA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wA;var t=SA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},CA=Xy(),Qs="data-scroll-locked",TA=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
1
+ import{a as rT,n as iT,o as xy,r as sT}from"./rolldown-runtime-1PqeXL0B.js";import{a as oT,i as aT,o as lT}from"./preload-helper-CC679xXH.js";import{a as cT,i as uT,l as Ae,o as Xi,r as X,s as hT,t as Nt}from"./button-F4pHUjYC.js";import{Ai as Kc,Di as ve,En as fT,Si as xr,Ti as Va,cn as yl,di as by,dn as dT,fi as yn,fn as pT,ki as oh,ln as Fn,on as ah,pi as Ue,si as xl,sn as Pn,t as mT,un as gT,vi as dr,xi as ct,xn as vT}from"./error-reporting-BrfSwhO1.js";import{a as yT,n as xT}from"./chunk-YOKDWASO-B2XCf4h4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.12.7"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7f0847f6-e6cf-44c1-90ec-44d142beb7e9",e._sentryDebugIdIdentifier="sentry-dbid-7f0847f6-e6cf-44c1-90ec-44d142beb7e9")}catch{}})();var m=xy(lT(),1),_o=xy(oT(),1),g=aT(),bT=Object.defineProperty,wT=(e,t)=>bT(e,"name",{value:t,configurable:!0}),_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Xi(`Primitive.${t}`),r=m.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xd(e,t){e&&_o.flushSync(()=>e.dispatchEvent(t))}wT(xd,"dispatchDiscreteCustomEvent");var ST=Object.defineProperty,kT=(e,t)=>ST(e,"name",{value:t,configurable:!0}),CT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),TT=m.forwardRef(kT(function(t,n){return(0,g.jsx)(_e.span,{...t,ref:n,style:{...CT,...t.style}})},"VisuallyHidden")),AT=TT,RT=Object.defineProperty,Lt=(e,t)=>RT(e,"name",{value:t,configurable:!0});function MT(e,t){const n=m.createContext(t);n.displayName=e+"Context";const r=Lt(s=>{const{children:o,...a}=s,l=m.useMemo(()=>a,Object.values(a));return(0,g.jsx)(n.Provider,{value:l,children:o})},"Provider");r.displayName=e+"Provider";function i(s,o={}){const{optional:a=!1}=o,l=m.useContext(n);if(l)return l;if(t!==void 0)return t;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Lt(i,"useContext"),[r,i]}Lt(MT,"createContext");function rr(e,t=[]){let n=[];function r(s,o){const a=m.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=Lt(h=>{const{scope:f,children:d,...p}=h,v=f?.[e]?.[l]||a,y=m.useMemo(()=>p,Object.values(p));return(0,g.jsx)(v.Provider,{value:y,children:d})},"Provider");c.displayName=s+"Provider";function u(h,f,d={}){const{optional:p=!1}=d,v=f?.[e]?.[l]||a,y=m.useContext(v);if(y)return y;if(o!==void 0)return o;if(!p)throw new Error(`\`${h}\` must be used within \`${s}\``)}return Lt(u,"useContext"),[c,u]}Lt(r,"createContext");const i=Lt(()=>{const s=n.map(o=>m.createContext(o));return Lt(function(a){const l=a?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return i.scopeName=e,[r,wy(i,...t)]}Lt(rr,"createContextScope");function wy(...e){const t=e[0];if(e.length===1)return t;const n=Lt(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return Lt(function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Lt(wy,"composeContextScopes");var PT=Object.defineProperty,Ge=(e,t)=>PT(e,"name",{value:t,configurable:!0});function bd(e){const t=e+"CollectionProvider",[n,r]=rr(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Ge(v=>{const{scope:y,children:x}=v,b=m.useRef(null),w=m.useRef(new Map).current;return(0,g.jsx)(i,{scope:y,itemMap:w,collectionRef:b,children:x})},"CollectionProvider");o.displayName=t;const a=e+"CollectionSlot",l=Xi(a),c=m.forwardRef((v,y)=>{const{scope:x,children:b}=v,w=s(a,x),S=Ae(y,w.collectionRef);return(0,g.jsx)(l,{ref:S,children:b})});c.displayName=a;const u=e+"CollectionItemSlot",h="data-radix-collection-item",f=Xi(u),d=m.forwardRef((v,y)=>{const{scope:x,children:b,...w}=v,S=m.useRef(null),k=Ae(y,S),C=s(u,x);return m.useEffect(()=>(C.itemMap.set(S,{ref:S,...w}),()=>{C.itemMap.delete(S)})),(0,g.jsx)(f,{[h]:"",ref:k,children:b})});d.displayName=u;function p(v){const y=s(e+"CollectionConsumer",v);return m.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((w,S)=>b.indexOf(w.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return Ge(p,"useCollection"),[{Provider:o,Slot:c,ItemSlot:d},p,r]}Ge(bd,"createCollection");var om=new WeakMap,Gc=class lr extends Map{static{Ge(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],om.set(this,!0)}set(t,n){return om.get(this)&&(this.has(t)?this.#e[this.#e.indexOf(t)]=t:this.#e.push(t)),super.set(t,n),this}insert(t,n,r){const i=this.has(n),s=this.#e.length,o=wd(t);let a=o>=0?o:s+o;const l=a<0||a>=s?-1:a;if(l===this.size||i&&l===this.size-1||l===-1)return this.set(n,r),this;const c=this.size+(i?0:1);o<0&&a++;const u=[...this.#e];let h,f=!1;for(let d=a;d<c;d++)if(a===d){let p=u[d];u[d]===n&&(p=u[d+1]),i&&this.delete(n),h=this.get(p),this.set(n,r)}else{!f&&u[d-1]===n&&(f=!0);const p=u[f?d:d-1],v=h;h=this.get(p),this.delete(p),this.set(p,v)}return this}with(t,n,r){const i=new lr(this);return i.insert(t,n,r),i}before(t){const n=this.#e.indexOf(t)-1;if(!(n<0))return this.entryAt(n)}setBefore(t,n,r){const i=this.#e.indexOf(t);return i===-1?this:this.insert(i,n,r)}after(t){let n=this.#e.indexOf(t);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(t,n,r){const i=this.#e.indexOf(t);return i===-1?this:this.insert(i+1,n,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){const n=super.delete(t);return n&&this.#e.splice(this.#e.indexOf(t),1),n}deleteAt(t){const n=this.keyAt(t);return n!==void 0?this.delete(n):!1}at(t){const n=Fa(this.#e,t);if(n!==void 0)return this.get(n)}entryAt(t){const n=Fa(this.#e,t);if(n!==void 0)return[n,this.get(n)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return Fa(this.#e,t)}from(t,n){const r=this.indexOf(t);if(r===-1)return;let i=r+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(t,n){const r=this.indexOf(t);if(r===-1)return;let i=r+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return i;r++}}findIndex(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return r;r++}return-1}filter(t,n){const r=[];let i=0;for(const s of this)Reflect.apply(t,n,[s,i,this])&&r.push(s),i++;return new lr(r)}map(t,n){const r=[];let i=0;for(const s of this)r.push([s[0],Reflect.apply(t,n,[s,i,this])]),i++;return new lr(r)}reduce(...t){const[n,r]=t;let i=0,s=r??this.at(0);for(const o of this)i===0&&t.length===1?s=o:s=Reflect.apply(n,this,[s,o,i,this]),i++;return s}reduceRight(...t){const[n,r]=t;let i=r??this.at(-1);for(let s=this.size-1;s>=0;s--){const o=this.at(s);s===this.size-1&&t.length===1?i=o:i=Reflect.apply(n,this,[i,o,s,this])}return i}toSorted(t){const n=[...this.entries()].sort(t);return new lr(n)}toReversed(){const t=new lr;for(let n=this.size-1;n>=0;n--){const r=this.keyAt(n),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){const n=[...this.entries()];return n.splice(...t),new lr(n)}slice(t,n){const r=new lr;let i=this.size-1;if(t===void 0)return r;t<0&&(t=t+this.size),n!==void 0&&n>0&&(i=n-1);for(let s=t;s<=i;s++){const o=this.keyAt(s),a=this.get(o);r.set(o,a)}return r}every(t,n){let r=0;for(const i of this){if(!Reflect.apply(t,n,[i,r,this]))return!1;r++}return!0}some(t,n){let r=0;for(const i of this){if(Reflect.apply(t,n,[i,r,this]))return!0;r++}return!1}};function Fa(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Sy(e,t);return n===-1?void 0:e[n]}Ge(Fa,"at");function Sy(e,t){const n=e.length,r=wd(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Ge(Sy,"toSafeIndex");function wd(e){return e!==e||e===0?0:Math.trunc(e)}Ge(wd,"toSafeInteger");function ET(e){const t=e+"CollectionProvider",[n,r]=rr(t),[i,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Gc,setItemMap:Ge(()=>{},"setItemMap")}),o=Ge(({state:b,...w})=>b?(0,g.jsx)(l,{...w,state:b}):(0,g.jsx)(a,{...w}),"CollectionProvider");o.displayName=t;const a=Ge(b=>{const w=y();return(0,g.jsx)(l,{...b,state:w})},"CollectionInit");a.displayName=t+"Init";const l=Ge(b=>{const{scope:w,children:S,state:k}=b,C=m.useRef(null),[T,M]=m.useState(null),A=Ae(C,M),[R,O]=k;return m.useEffect(()=>{if(!T)return;const P=Ty(()=>{});return P.observe(T,{childList:!0,subtree:!0}),()=>{P.disconnect()}},[T]),(0,g.jsx)(i,{scope:w,itemMap:R,setItemMap:O,collectionRef:A,collectionRefObject:C,collectionElement:T,children:S})},"CollectionProviderImpl");l.displayName=t+"Impl";const c=e+"CollectionSlot",u=Xi(c),h=m.forwardRef((b,w)=>{const{scope:S,children:k}=b,C=s(c,S),T=Ae(w,C.collectionRef);return(0,g.jsx)(u,{ref:T,children:k})});h.displayName=c;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Xi(f),v=m.forwardRef((b,w)=>{const{scope:S,children:k,...C}=b,T=m.useRef(null),[M,A]=m.useState(null),R=Ae(w,T,A),{setItemMap:O}=s(f,S),P=m.useRef(C);ky(P.current,C)||(P.current=C);const j=P.current;return m.useEffect(()=>{const N=j;return O(E=>M?E.has(M)?E.set(M,{...N,element:M}).toSorted(lh):(E.set(M,{...N,element:M}),E.toSorted(lh)):E),()=>{O(E=>!M||!E.has(M)?E:(E.delete(M),new Gc(E)))}},[M,j,O]),(0,g.jsx)(p,{[d]:"",ref:R,children:k})});v.displayName=f;function y(){return m.useState(new Gc)}Ge(y,"useInitCollection");function x(b){const{itemMap:w}=s(e+"CollectionConsumer",b);return w}return Ge(x,"useCollection"),[{Provider:o,Slot:h,ItemSlot:v},{createCollectionScope:r,useCollection:x,useInitCollection:y}]}Ge(ET,"createCollection");function ky(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||e[i]!==t[i])return!1;return!0}Ge(ky,"shallowEqual");function Cy(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ge(Cy,"isElementPreceding");function lh(e,t){return!e[1].element||!t[1].element?0:Cy(e[1].element,t[1].element)?-1:1}Ge(lh,"sortByDocumentPosition");function Ty(e){return new MutationObserver(t=>{for(const n of t)if(n.type==="childList"){e();return}})}Ge(Ty,"getChildListObserver");var OT=Object.defineProperty,fs=(e,t)=>OT(e,"name",{value:t,configurable:!0}),Ay=!!(typeof window<"u"&&window.document&&window.document.createElement);function te(e,t,{checkForDefaultPrevented:n=!0}={}){return fs(function(i){if(e?.(i),n===!1||!i||!i.defaultPrevented)return t?.(i)},"handleEvent")}fs(te,"composeEventHandlers");function IT(e){if(!Ay)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}fs(IT,"getOwnerWindow");function ch(e){if(!Ay)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}fs(ch,"getOwnerDocument");function Ry(e,t=!1){const{activeElement:n}=ch(e);if(!n?.nodeName)return null;if(My(n)&&n.contentDocument)return Ry(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=ch(n).getElementById(r);if(i)return i}}return n}fs(Ry,"getActiveElement");function My(e){return e.tagName==="IFRAME"}fs(My,"isFrame");var Dt=globalThis?.document?m.useLayoutEffect:()=>{},DT=Object.defineProperty,NT=(e,t)=>DT(e,"name",{value:t,configurable:!0}),am=m[" useEffectEvent ".trim().toString()],lm=m[" useInsertionEffect ".trim().toString()];function Py(e){if(typeof am=="function")return am(e);const t=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof lm=="function"?lm(()=>{t.current=e}):Dt(()=>{t.current=e}),m.useMemo(()=>((...n)=>t.current?.(...n)),[])}NT(Py,"useEffectEvent");var LT=Object.defineProperty,Bo=(e,t)=>LT(e,"name",{value:t,configurable:!0}),jT=m[" useInsertionEffect ".trim().toString()]||Dt;function Vo({prop:e,defaultProp:t,onChange:n=Bo(()=>{},"onChange"),caller:r}){const[i,s,o]=Ey({defaultProp:t,onChange:n}),a=e!==void 0;return[a?e:i,m.useCallback(c=>{if(a){const u=Oy(c)?c(e):c;u!==e&&o.current?.(u)}else s(c)},[a,e,s,o])]}Bo(Vo,"useControllableState");function Ey({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),i=m.useRef(n),s=m.useRef(t);return jT(()=>{s.current=t},[t]),m.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}Bo(Ey,"useUncontrolledState");function Oy(e){return typeof e=="function"}Bo(Oy,"isFunction");var cm=Symbol("RADIX:SYNC_STATE");function _T(e,t,n,r){const{prop:i,defaultProp:s,onChange:o,caller:a}=t,l=i!==void 0,c=Py(o),u=[{...n,state:s}];r&&u.push(r);const[h,f]=m.useReducer((y,x)=>{if(x.type===cm)return{...y,state:x.state};const b=e(y,x);return l&&!Object.is(b.state,y.state)&&c(b.state),b},...u),d=h.state,p=m.useRef(d);m.useEffect(()=>{p.current!==d&&(p.current=d,l||c(d))},[d,p,l]);const v=m.useMemo(()=>i!==void 0?{...h,state:i}:h,[h,i]);return m.useEffect(()=>{l&&!Object.is(i,h.state)&&f({type:cm,state:i})},[i,h.state,l]),[v,f]}Bo(_T,"useControllableStateReducer");var BT=Object.defineProperty,er=(e,t)=>BT(e,"name",{value:t,configurable:!0});function Iy(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}er(Iy,"useStateMachine");var Nn=er(e=>{const{present:t,children:n}=e,r=Dy(t),i=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),s=Ny(r.ref,Ly(i));return typeof n=="function"||r.isPresent?m.cloneElement(i,{ref:s}):null},"Presence");function Dy(e){const[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),s=m.useRef("none"),o=m.useRef(void 0),[a,l]=Iy(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{a==="mounted"?(s.current=o.current??Ri(r.current),o.current=void 0):s.current="none"},[a]),Dt(()=>{const c=r.current,u=i.current;if(u!==e){const h=s.current,f=Ri(c);e?(o.current=f,l("MOUNT")):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Dt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,h=er(d=>{const p=Ri(r.current).includes(CSS.escape(d.animationName));if(d.target===t&&p&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},"handleAnimationEnd"),f=er(d=>{d.target===t&&(s.current=Ri(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{if(c){const u=getComputedStyle(c);r.current=u,o.current=Ri(u)}else r.current=null;n(c)},[])}}er(Dy,"usePresence");function uh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}er(uh,"setRef");function Ny(...e){const t=m.useRef(e);return t.current=e,m.useCallback(n=>{const r=t.current;let i=!1;const s=r.map(o=>{const a=uh(o,n);return!i&&typeof a=="function"&&(i=!0),a});if(i)return()=>{for(let o=0;o<s.length;o++){const a=s[o];typeof a=="function"?a():uh(r[o],null)}}},[])}er(Ny,"useStableComposedRefs");function Ri(e){return e?.animationName||"none"}er(Ri,"getAnimationName");function Ly(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}er(Ly,"getElementRef");var VT=Object.defineProperty,FT=(e,t)=>VT(e,"name",{value:t,configurable:!0}),zT=m[" useId ".trim().toString()]||(()=>{}),$T=0;function ri(e){const[t,n]=m.useState(zT());return Dt(()=>{e||n(r=>r??String($T++))},[e]),e||(t?`radix-${t}`:"")}FT(ri,"useId");var HT=Object.defineProperty,WT=(e,t)=>HT(e,"name",{value:t,configurable:!0}),qT=m.createContext(void 0);function nc(e){const t=m.useContext(qT);return e||t||"ltr"}WT(nc,"useDirection");var UT=Object.defineProperty,KT=(e,t)=>UT(e,"name",{value:t,configurable:!0});function Qe(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...n)=>t.current?.(...n)),[])}KT(Qe,"useCallbackRef");var GT=Object.defineProperty,Ke=(e,t)=>GT(e,"name",{value:t,configurable:!0}),hh="dismissableLayer.update",QT="dismissableLayer.pointerDownOutside",XT="dismissableLayer.focusOutside",um,jy=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),_y=m.forwardRef(Ke(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,h=m.useContext(jy),[f,d]=m.useState(null),p=f?.ownerDocument??globalThis?.document,[,v]=m.useState({}),y=Ae(n,d),x=Array.from(h.layers),[b]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),w=b?x.indexOf(b):-1,S=f?x.indexOf(f):-1,k=h.layersWithOutsidePointerEventsDisabled.size>0,C=S>=w,T=m.useRef(!1),M=By(P=>{o?.(P),l?.(P),P.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(P=>{if(!(P instanceof Node))return!1;const j=[...h.branches].some(N=>N.contains(P));return C&&!j},[h.branches,C])}),A=Vy(P=>{if(i&&T.current)return;const j=P.target;[...h.branches].some(N=>N.contains(j))||(a?.(P),l?.(P),P.defaultPrevented||c?.())},p),R=f?S===x.length-1:!1,O=Qe(P=>{P.key==="Escape"&&(s?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))});return m.useEffect(()=>{if(R)return p.addEventListener("keydown",O,{capture:!0}),()=>p.removeEventListener("keydown",O,{capture:!0})},[p,R,O]),m.useEffect(()=>{if(f)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(um=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(f)),h.layers.add(f),fh(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(f),h.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=um))}},[f,p,r,h]),m.useEffect(()=>()=>{f&&(h.layers.delete(f),h.layersWithOutsidePointerEventsDisabled.delete(f),fh())},[f,h]),m.useEffect(()=>{const P=Ke(()=>v({}),"handleUpdate");return document.addEventListener(hh,P),()=>document.removeEventListener(hh,P)},[]),(0,g.jsx)(_e.div,{...u,ref:y,style:{pointerEvents:k?C?"auto":"none":void 0,...t.style},onFocusCapture:te(t.onFocusCapture,A.onFocusCapture),onBlurCapture:te(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:te(t.onPointerDownCapture,M.onPointerDownCapture)})},"DismissableLayer"));function YT(){const e=m.useContext(jy),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ke(YT,"useDismissableLayerSurface");var JT=Ke(()=>!0,"IS_TRUE");function By(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:s,shouldHandlePointerDownOutside:o=JT}=t,a=Qe(e),l=m.useRef(!1),c=m.useRef(!1),u=m.useRef(new Map),h=m.useRef(()=>{});return m.useEffect(()=>{function f(){c.current=!1,i.current=!1,u.current.clear()}Ke(f,"resetOutsideInteraction");function d(){return Array.from(u.current.values()).some(Boolean)}Ke(d,"isOutsideInteractionIntercepted");function p(w){if(!c.current)return;const S=w.target;S instanceof Node&&[...s].some(k=>k.contains(S))||u.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{c.current&&h.current()},0)}Ke(p,"handleInteractionCapture");function v(w){c.current&&u.current.set(w.type,!1)}Ke(v,"handleInteractionBubble");const y=Ke(w=>{if(w.target&&!l.current){let S=function(){n.removeEventListener("click",h.current);const C=d();f(),C||Sd(QT,a,k,{discrete:!0})};if(Ke(S,"handleAndDispatchPointerDownOutsideEvent"),!o(w.target)){n.removeEventListener("click",h.current),f(),l.current=!1;return}const k={originalEvent:w};c.current=!0,i.current=r&&w.button===0,u.current.clear(),!r||w.button!==0?S():(n.removeEventListener("click",h.current),h.current=S,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),f();l.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of x)n.addEventListener(w,p,!0),n.addEventListener(w,v);const b=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",y),n.removeEventListener("click",h.current);for(const w of x)n.removeEventListener(w,p,!0),n.removeEventListener(w,v)}},[n,a,r,i,s,o]),{onPointerDownCapture:Ke(()=>l.current=!0,"onPointerDownCapture")}}Ke(By,"usePointerDownOutside");function Vy(e,t=globalThis?.document){const n=Qe(e),r=m.useRef(!1);return m.useEffect(()=>{const i=Ke(s=>{s.target&&!r.current&&Sd(XT,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:Ke(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ke(()=>r.current=!1,"onBlurCapture")}}Ke(Vy,"useFocusOutside");function fh(){const e=new CustomEvent(hh);document.dispatchEvent(e)}Ke(fh,"dispatchUpdate");function Sd(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xd(i,s):i.dispatchEvent(s)}Ke(Sd,"handleAndDispatchCustomEvent");var ZT=Object.defineProperty,ht=(e,t)=>ZT(e,"name",{value:t,configurable:!0}),Qc="focusScope.autoFocusOnMount",Xc="focusScope.autoFocusOnUnmount",hm={bubbles:!1,cancelable:!0},eA=m.forwardRef(ht(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=t,[l,c]=m.useState(null),u=Qe(s),h=Qe(o),f=m.useRef(null),d=Ae(n,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(i){let y=function(S){if(p.paused||!l)return;const k=S.target;l.contains(k)?f.current=k:Vn(f.current,{select:!0})},x=function(S){if(p.paused||!l)return;const k=S.relatedTarget;k!==null&&(l.contains(k)||Vn(f.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const k of S)k.removedNodes.length>0&&Vn(l)};ht(y,"handleFocusIn"),ht(x,"handleFocusOut"),ht(b,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",x);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),w.disconnect()}}},[i,l,p.paused]),m.useEffect(()=>{if(l){fm.add(p);const y=document.activeElement;if(!l.contains(y)){const x=new CustomEvent(Qc,hm);l.addEventListener(Qc,u),l.dispatchEvent(x),x.defaultPrevented||(Fy(qy(kd(l)),{select:!0}),document.activeElement===y&&Vn(l))}return()=>{l.removeEventListener(Qc,u),setTimeout(()=>{const x=new CustomEvent(Xc,hm);l.addEventListener(Xc,h),l.dispatchEvent(x),x.defaultPrevented||Vn(y??document.body,{select:!0}),l.removeEventListener(Xc,h),fm.remove(p)},0)}}},[l,u,h,p]);const v=m.useCallback(y=>{if(!r&&!i||p.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(x&&b){const w=y.currentTarget,[S,k]=zy(w);S&&k?!y.shiftKey&&b===k?(y.preventDefault(),r&&Vn(S,{select:!0})):y.shiftKey&&b===S&&(y.preventDefault(),r&&Vn(k,{select:!0})):b===w&&y.preventDefault()}},[r,i,p.paused]);return(0,g.jsx)(_e.div,{tabIndex:-1,...a,ref:d,onKeyDown:v})},"FocusScope"));function Fy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vn(r,{select:t}),document.activeElement!==n)return}ht(Fy,"focusFirst");function zy(e){const t=kd(e);return[dh(t,e),dh(t.reverse(),e)]}ht(zy,"getTabbableEdges");function kd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ht(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}ht(kd,"getTabbableCandidates");function dh(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):$y(r,{upTo:t})))return r}ht(dh,"findVisible");function $y(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}ht($y,"isHidden");function Hy(e){return e instanceof HTMLInputElement&&"select"in e}ht(Hy,"isSelectableInput");function Vn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Hy(e)&&t&&e.select()}}ht(Vn,"focus");var fm=Wy();function Wy(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ph(e,t),e.unshift(t)},remove(t){e=ph(e,t),e[0]?.resume()}}}ht(Wy,"createFocusScopesStack");function ph(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ht(ph,"arrayRemove");function qy(e){return e.filter(t=>t.tagName!=="A")}ht(qy,"removeLinks");var tA=Object.defineProperty,nA=(e,t)=>tA(e,"name",{value:t,configurable:!0}),Uy=m.forwardRef(nA(function(t,n){const{container:r,...i}=t,[s,o]=m.useState(!1);Dt(()=>o(!0),[]);const a=r||s&&globalThis?.document?.body;return a?_o.createPortal((0,g.jsx)(_e.div,{...i,ref:n}),a):null},"Portal")),rA=Object.defineProperty,Cd=(e,t)=>rA(e,"name",{value:t,configurable:!0}),sa=0,gi=null;function iA(e){return Td(),e.children}Cd(iA,"FocusGuards");function Td(){m.useEffect(()=>{gi||(gi={start:mh(),end:mh()});const{start:e,end:t}=gi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),sa++,()=>{sa===1&&(gi?.start.remove(),gi?.end.remove(),gi=null),sa=Math.max(0,sa-1)}},[])}Cd(Td,"useFocusGuards");function mh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Cd(mh,"createFocusGuard");var bn=function(){return bn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},bn.apply(this,arguments)};function Ky(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sA(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var za="right-scroll-bar-position",$a="width-before-scroll-bar",oA="with-scroll-bars-hidden",aA="--removed-body-scroll-bar-size";function Yc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lA(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var cA=typeof window<"u"?m.useLayoutEffect:m.useEffect,dm=new WeakMap;function uA(e,t){var n=lA(t||null,function(r){return e.forEach(function(i){return Yc(i,r)})});return cA(function(){var r=dm.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;i.forEach(function(a){s.has(a)||Yc(a,null)}),s.forEach(function(a){i.has(a)||Yc(a,o)})}dm.set(n,e)},[e]),n}function hA(e){return e}function fA(e,t){t===void 0&&(t=hA);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(i),s=n}var a=function(){var c=s;s=[],c.forEach(i)},l=function(){return Promise.resolve().then(a)};l(),n={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),n}}}}}function dA(e){e===void 0&&(e={});var t=fA(null);return t.options=bn({async:!0,ssr:!1},e),t}var Gy=function(e){var t=e.sideCar,n=Ky(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,bn({},n))};Gy.isSideCarExport=!0;function pA(e,t){return e.useMedium(t),Gy}var Qy=dA(),Jc=function(){},rc=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Jc,onWheelCapture:Jc,onTouchMoveCapture:Jc}),i=r[0],s=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,h=e.shards,f=e.sideCar,d=e.noRelative,p=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,S=Ky(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,C=uA([n,t]),T=bn(bn({},S),i);return m.createElement(m.Fragment,null,u&&m.createElement(k,{sideCar:Qy,removeScrollBar:c,shards:h,noRelative:d,noIsolation:p,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:w}),o?m.cloneElement(m.Children.only(a),bn(bn({},T),{ref:C})):m.createElement(b,bn({},T,{className:l,ref:C}),a))});rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rc.classNames={fullWidth:$a,zeroRight:za};var pm,mA=function(){if(pm)return pm;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mA();return t&&e.setAttribute("nonce",t),e}function vA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yA(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var xA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gA())&&(vA(t,n),yA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bA=function(){var e=xA();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xy=function(){var e=bA(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},wA={left:0,top:0,right:0,gap:0},Zc=function(e){return parseInt(e||"",10)||0},SA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zc(n),Zc(r),Zc(i)]},kA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wA;var t=SA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},CA=Xy(),Qs="data-scroll-locked",TA=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(oA,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -134,4 +134,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
134
134
 
135
135
  `):null}function sH({className:e,children:t,...n}){return(0,g.jsxs)(vE,{"data-slot":"scroll-area",className:X("relative",e),...n,children:[(0,g.jsx)(yE,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,g.jsx)(oH,{}),(0,g.jsx)(xE,{})]})}function oH({className:e,orientation:t="vertical",...n}){return(0,g.jsx)(oE,{"data-slot":"scroll-area-scrollbar",orientation:t,className:X("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:(0,g.jsx)(fE,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var aH=500,lH={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 QC(e){switch(e){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 e}}function us(e){const t=QC(e.action),n=e.locatorLabel?.trim();return n?`Interact · ${t} ${n}`:`Interact · ${t}`}function tc(e){return e.assertion?e.assertion.passed?"ok":"error":e.ok===!0?"ok":e.ok===!1?"error":"unknown"}function Ls(e){return`${e.toolCallId}:${e.stepIndex}`}function cH(e){if(!e)return[];const t=[];return typeof e.durationMs=="number"&&e.durationMs>0&&t.push({key:"duration",label:uH(e.durationMs),...typeof e.distinctFrames=="number"?{title:`${e.distinctFrames.toLocaleString()} distinct frames — identical frames are dropped, so an idle page costs none`}:{}}),typeof e.fps=="number"&&e.fps>0&&t.push({key:"fps",label:`${e.fps} fps`}),t}function uH(e){const t=Math.round(e/1e3),n=t%60,r=Math.floor(t/60)%60,i=Math.floor(t/3600),s=String(r).padStart(i>0?2:1,"0");return i>0?`${i}:${s}:${String(n).padStart(2,"0")}`:`${s}:${String(n).padStart(2,"0")}`}function XC(e){return typeof e=="string"&&e.length>0?e:null}function HW(e){return(e.widgetRenderObservations?.length??0)>0||(e.browserInteractionSteps?.length??0)>0||XC(e.videoUrl)!==null}function hH(e){return e==="ok"?"OK":e==="error"?"Failed":"Unknown"}function YC({step:e,leading:t,className:n}){const r=tc(e),i=e.widgetToolCalls??[],s=e.coordinateX!=null&&e.coordinateY!=null?`(${e.coordinateX}, ${e.coordinateY})`:null;return(0,g.jsxs)("div",{"data-testid":"browser-step-detail",className:X("flex flex-col gap-4",n),children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[t,(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:us(e)}),(0,g.jsxs)("p",{className:"text-xs text-muted-foreground",children:["App interaction · ",e.elapsedMs,"ms",s?` · ${s}`:""]})]}),(0,g.jsx)("span",{className:X("inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-[11px] font-medium",lH[r]),children:hH(r)})]}),e.assertion&&!e.assertion.passed&&e.assertion.reason?(0,g.jsx)("p",{className:"text-xs text-destructive",children:e.assertion.reason}):null,e.screenshotUrl?(0,g.jsx)(MC,{src:e.screenshotUrl,alt:us(e),className:"max-h-72 w-full rounded-md border border-border/50 object-contain"}):null,i.length>0?(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Widget tool calls"}),i.map((o,a)=>(0,g.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs",children:[(0,g.jsx)("span",{className:X("inline-block h-1.5 w-1.5 shrink-0 rounded-full",o.ok?"bg-success":"bg-destructive"),"aria-hidden":!0}),(0,g.jsx)("span",{className:"font-mono text-foreground",children:o.name}),o.error?(0,g.jsx)("span",{className:"truncate text-destructive",children:o.error}):null]},`${o.name}-${a}`))]}):null,e.followUps&&e.followUps.length>0?(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Sent message to chat"}),e.followUps.map((o,a)=>(0,g.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs",children:[(0,g.jsx)("span",{"aria-hidden":!0,children:"↳"}),(0,g.jsx)("span",{className:"truncate text-foreground",children:o})]},a))]}):null]})}function fH(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,"0")}`}function dH(e,t){let n=null;for(const r of e)if(r.videoOffsetMs!=null)if(r.videoOffsetMs<=t)n=r;else break;return n}function WW({steps:e,videoUrl:t,videoMeta:n,isRunning:r=!1,className:i}){const s=(0,m.useRef)(null),[o,a]=(0,m.useState)(null),[l,c]=(0,m.useState)(null),u=(0,m.useRef)(null),[h,f]=(0,m.useState)(!1),[d,p]=(0,m.useState)(null),v=SC(XC(t)),y=(0,m.useMemo)(()=>cH(n),[n]),x=(0,m.useMemo)(()=>[...e].sort((A,R)=>(A.videoOffsetMs??Number.POSITIVE_INFINITY)-(R.videoOffsetMs??Number.POSITIVE_INFINITY)||A.promptIndex-R.promptIndex||A.ts-R.ts),[e]),b=o??l??null,w=(0,m.useMemo)(()=>x.find(A=>Ls(A)===b)??null,[x,b]),S=v!=null&&!h,k=x.some(A=>A.screenshotUrl),C=(0,m.useCallback)(A=>{a(Ls(A));const R=s.current;if(!R||!S||A.videoOffsetMs==null)return;const O=A.videoOffsetMs/1e3;u.current=O,R.currentTime=O},[S]),T=(0,m.useCallback)(()=>{u.current=null},[]),M=(0,m.useCallback)(()=>{const A=s.current;if(!A)return;const R=dH(x,A.currentTime*1e3);if(c(R?Ls(R):null),u.current==null){if(o!=null){const O=x.find(P=>Ls(P)===o);if(O?.videoOffsetMs!=null){const P=O.videoOffsetMs-A.currentTime*1e3;if(P>0&&P<aH)return}}a(null)}},[x,o]);return(0,m.useEffect)(()=>{f(!1)},[v]),(0,m.useEffect)(()=>{if(!d||d.url!==v)return;const A=setTimeout(()=>{p(null),f(!1)},d.delayMs);return()=>clearTimeout(A)},[d,v]),x.length===0&&!v?(0,g.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:r?"Finalizing replay…":"No app interactions were recorded."}):(0,g.jsxs)("section",{className:X("flex min-w-0 flex-col gap-3",i),"data-testid":"browser-step-filmstrip",children:[(0,g.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,g.jsxs)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Replay",(0,g.jsx)("span",{className:"ml-1.5 font-normal normal-case text-muted-foreground/70",children:"screen recording of the app interactions in this run"})]}),v&&!h&&(y.length>0||n?.truncated)?(0,g.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:[y.map(A=>(0,g.jsx)("span",{title:A.title,children:A.label},A.key)),n?.truncated?(0,g.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,v&&!h?(0,g.jsx)("video",{ref:s,src:v,controls:!0,preload:"metadata",onTimeUpdate:M,onSeeked:T,onError:()=>{const A=AC(v);f(!0),p(A!==null&&A>0?{url:v,delayMs:A}:null)},onLoadedMetadata:()=>RC(v),className:"w-full rounded-md border border-border/60 bg-black","data-testid":"browser-replay-video"}):(0,g.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:r?"Finalizing replay — the recording is written when the run ends.":h?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."})]}),x.length>0?(0,g.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,g.jsx)("div",{className:"flex min-w-0 gap-2 overflow-x-auto pb-1","data-testid":"browser-filmstrip-track",children:x.map(A=>{const R=Ls(A),O=tc(A),P=R===b;return(0,g.jsxs)("button",{type:"button",onClick:()=>C(A),"aria-pressed":P,title:us(A),"data-testid":"browser-filmstrip-frame","data-step-key":R,"data-active":P?"true":"false",className:X("flex w-28 shrink-0 flex-col gap-1 rounded-md border p-1 text-left transition-colors",P?"border-primary bg-primary/5":"border-border/50 hover:border-border"),children:[A.screenshotUrl?(0,g.jsx)(MC,{src:A.screenshotUrl,alt:us(A),loading:"lazy",className:"h-16 w-full rounded-sm border border-border/40 bg-background object-cover object-top"}):(0,g.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,g.jsx)("span",{className:"truncate text-[10px] font-medium text-foreground",children:QC(A.action)}),(0,g.jsx)("span",{className:X("truncate text-[10px]",O==="error"?"text-destructive":"text-muted-foreground"),children:A.videoOffsetMs!=null?fH(A.videoOffsetMs):`turn ${A.promptIndex+1}`})]},R)})}),w?(0,g.jsx)(YC,{step:w,className:"rounded-lg bg-muted/5 px-4 py-4"}):(0,g.jsx)("p",{className:"px-1 text-[11px] text-muted-foreground",children:"Select a frame to see the interaction that produced it."})]}):null]})}var pH={[-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 mH(e){const t=pH[e];return t?`${e} · ${t}`:String(e)}var gH=xr({id:ve(),parentId:ve().optional(),name:ve(),category:xl(["step","llm","tool","error","connection","discovery"]),startMs:ct(),endMs:ct(),promptIndex:ct().optional(),stepIndex:ct().optional(),authoredStepId:ve().optional(),status:xl(["ok","error"]).optional(),toolCallId:ve().optional(),toolName:ve().optional(),serverId:ve().optional(),connectionId:ve().optional(),modelId:ve().optional(),inputTokens:ct().optional(),outputTokens:ct().optional(),totalTokens:ct().optional(),messageStartIndex:ct().optional(),messageEndIndex:ct().optional(),finishReason:ve().optional(),provider:ve().optional(),responseId:ve().optional(),responseTimestamp:ve().optional(),ttfcMs:ct().optional(),mcpErrorCode:ct().optional(),outputSource:oh([dr("narration"),dr("evidence"),dr("reconstructed")]).optional(),wireCorroborated:Ue().optional(),evidenceRequestId:ve().optional(),evidenceStatus:oh([dr("complete"),dr("incomplete")]).optional()}),Ai=xr({toolName:ve(),arguments:Va(ve(),by())}),vH=xr({promptIndex:ct(),prompt:ve(),expectedToolCalls:yn(Ai),actualToolCalls:yn(Ai),expectedOutput:ve().optional(),passed:Ue(),missing:yn(Ai),unexpected:yn(Ai),argumentMismatches:yn(xr({expected:Ai,actual:Ai,mismatchedArguments:yn(ve())}))}),yH=xr({toolCallId:ve(),toolName:ve(),protocol:oh([dr("mcp-apps"),dr("openai-apps")]),serverId:ve(),resourceUri:ve().optional(),toolMetadata:Va(ve(),Kc()),widgetCsp:Va(ve(),Kc()).nullable().optional(),widgetPermissions:Va(ve(),Kc()).nullable().optional(),widgetPermissive:Ue().optional(),prefersBorder:Ue().optional(),widgetHtmlBlobId:ve().optional(),widgetHtmlUrl:ve().nullable().optional(),injectedOpenAiCompat:Ue().optional(),injectedOpenAiCompatCapabilities:xr({callTool:Ue().optional(),sendFollowUpMessage:Ue().optional(),setWidgetState:Ue().optional(),requestDisplayMode:xl(["all","fullscreen-only","none"]).optional(),notifyIntrinsicHeight:Ue().optional(),openExternal:Ue().optional(),setOpenInAppUrl:Ue().optional(),requestModal:Ue().optional(),uploadFile:Ue().optional(),selectFiles:Ue().optional(),getFileDownloadUrl:Ue().optional(),requestCheckout:Ue().optional(),requestClose:Ue().optional()}).optional()}),xH=xr({source:xl(["hosted","widget"]),fps:ct().optional(),durationMs:ct().optional(),distinctFrames:ct().optional(),truncated:Ue().optional()}),qW=xr({traceVersion:dr(1),messages:yn(by()),widgetSnapshots:yn(yH).optional(),spans:yn(gH).optional(),prompts:yn(vH).optional(),videoBlobId:ve().optional(),videoMeta:xH.optional()}),bH=["all","connection","discovery","llm","tool","error"];function rh(e){switch(e){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 wH({filter:e,onFilterChange:t,isFullyExpanded:n,expandDisabled:r,onToggleExpandAll:i,zoomControls:s,showBottomBorder:o=!0}){return(0,g.jsxs)("div",{className:X("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,g.jsxs)(cS,{children:[(0,g.jsx)(uS,{asChild:!0,children:(0,g.jsxs)(Nt,{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: ${rh(e)}`,children:[(0,g.jsx)(xO,{className:"size-3.5 shrink-0 opacity-80","aria-hidden":!0}),rh(e)]})}),(0,g.jsx)(hS,{align:"start",className:"min-w-[8rem]",children:(0,g.jsx)(t_,{value:e,onValueChange:a=>t(a),children:bH.map(a=>(0,g.jsx)(n_,{value:a,className:"text-xs",children:rh(a)},a))})})]}),(0,g.jsx)(Nt,{type:"button",variant:"outline",size:"icon",disabled:r,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:i,children:n?(0,g.jsx)(BO,{className:"size-3.5",strokeWidth:2,"aria-hidden":!0}):(0,g.jsx)(hO,{className:"size-3.5",strokeWidth:2,"aria-hidden":!0})}),s?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:"bg-border hidden h-3 w-px shrink-0 md:block","aria-hidden":!0}),(0,g.jsx)("div",{className:"flex shrink-0 items-center gap-0.5",children:s})]}):null]})}var hy=[0,25,50,75,100],SH=54,kH=120;function CH(e){if(!Number.isFinite(e))return[0,100];if(e<=0)return[0,100];const t=Math.max(2,Math.floor(e/SH));return t>=hy.length?[...hy]:t<=2?[0,100]:t===3?[0,50,100]:[0,25,75,100]}function TH(e){return e<=0?"left-0 top-1/2 -translate-x-0 -translate-y-1/2 text-left":e>=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 fy(e){return e<=0?vl(0):`${vl(0)}–${vl(e)}`}function AH(e){const t=e.filter(l=>l.category==="llm");let n=0,r=0,i=0,s=0,o=0,a=0;for(const l of t)typeof l.inputTokens=="number"&&(n+=l.inputTokens,r++),typeof l.outputTokens=="number"&&(i+=l.outputTokens,s++),typeof l.totalTokens=="number"&&(o+=l.totalTokens,a++);return{...r?{inputTokens:n}:{},...s?{outputTokens:i}:{},...a?{totalTokens:o}:{}}}function Hc(e,t){return t}function dy(e){switch(e){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 Hc(e,9)}}function RH(e,t){if(e.startMs!==t.startMs)return e.startMs-t.startMs;const n=dy(e.category)-dy(t.category);return n!==0?n:e.endMs!==t.endMs?e.endMs-t.endMs:e.name.localeCompare(t.name)}function MH(e,t){return typeof e!="number"||t<50?null:e/(t/1e3)}function co(e){return e>=1e3?`${(e/1e3).toFixed(e>=1e4?1:2)}s`:`${Math.round(e)}ms`}function vl(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${Math.round(e)}ms`}function Kn(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Lo(e){const t=e.toolName??e.name;return typeof t=="string"&&t.trim()?t:void 0}function ta(e){return Array.isArray(e.content)?e.content.filter(t=>Kn(t)&&typeof t.type=="string"):typeof e.content=="string"?[{type:"text",text:e.content}]:[]}function JC(e){if(e==null)return"None";if(typeof e=="string")return e.length>180?`${e.slice(0,177)}...`:e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`${e.length} item${e.length===1?"":"s"}`;if(Kn(e)){const t=Object.keys(e);return t.length>0?`{ ${t.slice(0,4).join(", ")}${t.length>4?", ...":""} }`:"{}"}return String(e)}function PH(e){const t=ta(e);if(t.length===0)return typeof e.content=="string"?e.content:"No content";const n=t.slice(0,3).map(r=>r.type==="text"&&typeof r.text=="string"?r.text:r.type==="tool-call"?`Tool call: ${Lo(r)??"Tool"}`:r.type==="tool-result"?`Tool result: ${Lo(r)??"Tool"}`:typeof r.type=="string"?r.type:"content").join(" | ");return n.length>220?`${n.slice(0,217)}...`:n}function EH(e){return!Kn(e)||!("type"in e)||!("value"in e)?e:e.value}function OH(e){return e.result!==void 0?e.result:EH(e.output)}function IH(e){const t=OH(e);if(typeof e.error=="string"&&e.error.trim())return e.error.trim();if(Kn(e.error)&&typeof e.error.message=="string")return e.error.message;if(Kn(e.output)&&e.output.type==="error-text")return typeof e.output.value=="string"?e.output.value:"Tool error";if(Kn(e.result)&&e.result.isError===!0||Kn(e.output)&&Kn(e.output.value)&&e.output.value.isError===!0||e.isError===!0)return nh(t)??"Tool error"}function Wc(e,t,n){if(!t&&!n)return{};let r,i,s;for(const o of e)for(const a of ta(o)){const l=typeof t=="string"&&a.toolCallId===t,c=!l&&typeof n=="string"&&Lo(a)===n;if(!(!l&&!c)&&(a.type==="tool-call"&&(r=a.input??a.parameters??a.args),a.type==="tool-result")){i=a.result??(Kn(a.output)&&"value"in a.output?a.output.value:a.output);const u=IH(a);u&&(s=u)}}return{input:r,output:i,errorText:s}}function zi(e,t){return e.category==="error"||e.status==="error"?!0:e.category==="tool"?!!Wc(t,e.toolCallId,e.toolName??e.name).errorText:!1}function bs(e,t){if(typeof e!="number"&&typeof t!="number")return;const n=e??t??0,r=t??e??n;return{startIndex:Math.min(n,r),endIndex:Math.max(n,r)}}function DH(e){return bs(e.messageStartIndex,e.messageEndIndex)}function NH(e){return bs(e.span.messageStartIndex,e.span.messageEndIndex)}function ZC(e){if(!e)return[];const t=[];for(let n=e.startIndex;n<=e.endIndex;n+=1)t.push(n);return t}function eT(e,t,n){if(t)for(let r=t.startIndex;r<=t.endIndex;r+=1){const i=e[r];if(i&&n(i))return r}}function rm(e,t,n){if(!e.length)return;const r=bs(t,n);if(!r){const s=e.findIndex(o=>o.role==="user");return s>=0?s:void 0}const i=eT(e,r,s=>s.role==="user");if(typeof i=="number")return i;if(!(r.startIndex>=e.length)&&r.startIndex>0)for(let s=r.startIndex-1;s>=0;s-=1){const o=e[s];if(o){if(o.role==="user")return s;if(o.role==="assistant")break}}}function LH(e,t){if(e.kind==="prompt")return"trace-waterfall-bar-prompt";if(e.kind==="interaction")return e.status==="error"?"trace-waterfall-bar-error":"trace-waterfall-bar-tool";if(e.kind==="span"&&t)return"trace-waterfall-bar-error";if(e.kind!=="span")return"trace-waterfall-bar-step";const n=e.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 Hc(n,"trace-waterfall-bar-step")}}function jH(e){switch(e){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 Hc(e,"text-muted-foreground")}}function _H(e,t){if(e.kind==="prompt")return"trace-waterfall-row-accent-prompt";if(e.kind==="interaction")return e.status==="error"?"trace-waterfall-row-accent-error":"trace-waterfall-row-accent-tool";const n=t?"error":e.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 Hc(n,"border-l-muted-foreground")}}function BH(e){const t=new Map;for(const n of e){const r=typeof n.promptIndex=="number"?n.promptIndex:0,i=t.get(r);i?i.push(n):t.set(r,[n])}return[...t.entries()].sort(([n],[r])=>n-r).map(([n,r])=>{const i=new Map;r.forEach(c=>{i.set(c.id,{span:c,children:[]})});const s=[];r.forEach(c=>{const u=i.get(c.id),h=typeof c.parentId=="string"?i.get(c.parentId):void 0;if(h){h.children.push(u);return}s.push(u)});const o=c=>{c.sort((u,h)=>RH(u.span,h.span)),c.forEach(u=>o(u.children))};o(s);const a=r.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 r)c.category in l&&l[c.category]++;return{key:`prompt-${n}`,promptIndex:n,label:`Prompt ${n+1}`,spans:r,roots:s,startMs:Math.min(...r.map(c=>c.startMs)),endMs:Math.max(...r.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 py(e){const t=new Set;function n(r){for(const i of r)i.span.category==="step"&&i.children.length>0&&t.add(i.span.id),n(i.children)}for(const r of e)n(r.roots);return t}function ih(e){return{role:e.role,content:e.content}}function tT(e,t,n){const r=bs(t,n);if(!r)return[];const i=e.slice(r.startIndex,r.endIndex+1);if(i.length===0)return[];let s=-1;for(let a=0;a<i.length;a++)if(i[a].role==="assistant"){s=a;break}if(s<0)return e.slice(0,r.endIndex+1);const o=r.startIndex+s;return o===0?[]:e.slice(0,o)}function VH(e,t,n){const r=bs(t,n);if(!r)return{input:null,output:null};const i=e.slice(r.startIndex,r.endIndex+1);if(i.length===0)return{input:[],output:null};let s=-1;for(let l=i.length-1;l>=0;l-=1)if(i[l].role==="assistant"){s=l;break}if(s<0)return{input:i.map(ih),output:null};const o=tT(e,t,n),a=i[s];return{input:o.length>0?o.map(ih):null,output:ih(a)}}var FH=96;function Yt(e,t=FH){const n=e.replace(/\s+/g," ").trim();return n.length<=t?n:`${n.slice(0,t-1)}…`}function jo(e){return typeof e.content=="string"?e.content.trim():ta(e).map(t=>t.type==="text"&&typeof t.text=="string"?t.text.trim():"").filter(Boolean).join(" ")}function zH(e){const t=ta(e),n=[];for(const r of t)r.type==="tool-call"&&n.push(Lo(r)??"tool");return n}function $H(e,t){if(!e.length)return;const n=tT(e,t.messageStartIndex,t.messageEndIndex);if(n.length!==0){for(let r=n.length-1;r>=0;r--){const i=n[r];if(i.role==="user"){const s=jo(i);if(s)return Yt(s)}}for(const r of n)if(r.role==="system"){const i=jo(r);if(i)return Yt(i)}for(let r=n.length-1;r>=0;r--){const i=n[r];if(i.role==="tool"){const s=PH(i);if(s&&s!=="No content")return Yt(s)}}}}function HH(e,t){if(!e.length)return;const n=bs(t.messageStartIndex,t.messageEndIndex);if(!n)return;const r=e.slice(n.startIndex,n.endIndex+1);for(let i=r.length-1;i>=0;i--){const s=r[i];if(s.role!=="assistant")continue;const o=jo(s);if(o)return{kind:"text",preview:Yt(o)};const a=zH(s);if(a.length>0)return{kind:"tools",preview:Yt(`Calling ${a.join(", ")}`)}}}function WH(e,t,n){const r=rm(e,t,n);if(typeof r!="number")return;const i=jo(e[r]);return i?Yt(i):void 0}function qH(e,t,n){const r=rm(e,t,n);if(typeof r=="number")return jo(e[r])||void 0}function my(e,t){if(typeof t.toolCallId=="string"&&e.toolCallId===t.toolCallId)return!0;const n=t.toolName?.trim()||t.name?.trim();return!!(n&&Lo(e)===n)}function UH(e,t,n){if(n)for(let r=n.startIndex;r<=n.endIndex;r+=1){const i=e[r];if(!i)continue;const s=ta(i);if(s.some(o=>o.type==="tool-call"&&my(o,t))||s.some(o=>o.type==="tool-result"&&my(o,t)))return r}}function KH(e,t){const n=rm(t,e.messageStartIndex,e.messageEndIndex);if(typeof n=="number")return{focusSourceIndex:n,highlightSourceIndices:[n]};const r=ZC(DH(e));if(r.length!==0)return{focusSourceIndex:r[0],highlightSourceIndices:r}}function GH(e,t){const n=NH(e),r=ZC(n);if(r.length===0)return;const i=eT(t,n,s=>s.role==="assistant");return{focusSourceIndex:(e.span.category==="tool"?UH(t,e.span,n):void 0)??i??r[0],highlightSourceIndices:r}}function QH(e,t){const n=Wc(e,t.toolCallId,t.toolName??t.name);if(n.input==null)return;const r=JC(n.input);if(!(!r||r==="None"))return Yt(r)}function hs({category:e,size:t="sm"}){const n=X(t==="lg"?"h-5 w-5 shrink-0":"h-3.5 w-3.5 shrink-0",jH(e));switch(e){case"prompt":return(0,g.jsx)(HO,{className:n,"aria-hidden":!0});case"llm":return(0,g.jsx)(eO,{className:n,"aria-hidden":!0});case"tool":return(0,g.jsx)(qO,{className:n,"aria-hidden":!0});case"interaction":return(0,g.jsx)(EO,{className:n,"aria-hidden":!0});case"error":return(0,g.jsx)(sO,{className:n,"aria-hidden":!0});case"connection":case"discovery":case"step":return(0,g.jsx)(Dm,{className:n,"aria-hidden":!0});default:return(0,g.jsx)(Dm,{className:n,"aria-hidden":!0})}}function XH(e,t){const n=t.promptIndex,r=t.stepIndex;if(typeof n!="number"||typeof r!="number")return{};const i=e.find(s=>s.category==="llm"&&s.promptIndex===n&&s.stepIndex===r);return i?{...typeof i.inputTokens=="number"?{inputTokens:i.inputTokens}:{},...typeof i.outputTokens=="number"?{outputTokens:i.outputTokens}:{},...typeof i.totalTokens=="number"?{totalTokens:i.totalTokens}:{}}:{}}function YH(e,t){if(e.kind==="prompt")return{inputTokens:e.aggregatedInputTokens,outputTokens:e.aggregatedOutputTokens,totalTokens:e.aggregatedTotalTokens};if(e.kind==="interaction")return{};const n={inputTokens:e.span.inputTokens,outputTokens:e.span.outputTokens,totalTokens:e.span.totalTokens};if(typeof n.inputTokens=="number"||typeof n.outputTokens=="number"||typeof n.totalTokens=="number"||!t?.length||e.span.category!=="llm"&&e.span.category!=="step")return n;const r=XH(t,e.span);return typeof r.inputTokens=="number"||typeof r.outputTokens=="number"||typeof r.totalTokens=="number"?r:n}function sh(e){return typeof e=="number"?e.toLocaleString():"—"}function gy(e){return typeof e=="number"&&Number.isFinite(e)?new Date(e).toLocaleString():"—"}function JH({traceStartedAtMs:e,traceEndedAtMs:t,traceDurationMs:n}){return typeof e=="number"&&Number.isFinite(e)?e:typeof t=="number"&&Number.isFinite(t)?t-n:null}function vd(e,t){const{span:n,promptIndex:r}=e,i=n.modelId?.trim()?Yt(n.modelId.trim(),56):void 0,s=n.name?.trim()??"";if(n.category==="step"){const o=typeof n.stepIndex=="number"?n.stepIndex+1:void 0,a=typeof o=="number"?`Step ${o}`:s||"Step",l=typeof o=="number"&&(s===`Step ${o}`||s.toLowerCase()===`step ${o}`),c=s&&!l?Yt(s,64):a,u=$H(t,n);return u?{title:c,subtitle:u}:i?{title:c,subtitle:i}:{title:c,subtitle:`Prompt ${r+1}`}}if(n.category==="llm"){const o=HH(t,n),a=!s||/^assistant$/i.test(s)||/^llm$/i.test(s)||/^model$/i.test(s)||s==="Model response"||/·\s*response$/i.test(s)?"Agent":Yt(s,64);return o?.kind==="text"?{title:`${a}: "${o.preview}"`,subtitle:i}:o?.kind==="tools"?{title:`${a} · ${o.preview}`,subtitle:i}:{title:a,subtitle:i}}if(n.category==="tool"){const o=`Tool · ${(n.toolName??n.name).trim()||"tool"}`,a=QH(t,n),l=!a||a==="{}"||a==="None";if(a&&!l)return{title:o,subtitle:a};if(l){const c=Wc(t,n.toolCallId,n.toolName??n.name);if(c.output!=null){const u=JC(c.output);if(u&&u!=="None"&&u!=="{}")return{title:o,subtitle:Yt(u)}}}return typeof n.stepIndex=="number"?{title:o,subtitle:i?`${i} · step ${n.stepIndex+1}`:`step ${n.stepIndex+1}`}:{title:o,subtitle:i}}return{title:n.name,subtitle:typeof n.stepIndex=="number"?i?`${i} · step ${n.stepIndex+1}`:`step ${n.stepIndex+1}`:i}}function yd(e){const t=e.kind==="span"?e.span.startMs:e.startMs,n=e.kind==="span"?e.span.endMs:e.endMs;return{startMs:t,endMs:n,durationMs:n-t}}function ZH({format:e,onFormatChange:t}){return(0,g.jsx)("div",{className:"flex flex-wrap gap-1",children:["plain","markdown"].map(n=>(0,g.jsx)(Nt,{type:"button",size:"sm",variant:e===n?"secondary":"outline",className:"h-7 text-[10px] capitalize",onClick:()=>t(n),children:n==="plain"?"Plain":"Markdown"},n))})}function vy({value:e}){const[t,n]=(0,m.useState)("plain");return(0,m.useEffect)(()=>{typeof e=="string"&&n("plain")},[e]),e==null?(0,g.jsx)("div",{className:"rounded-md border border-dashed border-border/60 px-3 py-2 text-xs text-muted-foreground",children:"None"}):typeof e=="string"?(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)(ZH,{format:t,onFormatChange:n}),t==="markdown"?(0,g.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,g.jsx)(yC,{content:e})}):(0,g.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:e})]}):(0,g.jsx)(u3,{value:e,containerClassName:"max-h-56 rounded-md border border-border/60 bg-background"})}function eW({row:e}){return(0,g.jsx)("div",{"data-testid":"trace-detail-pane",className:"min-h-[280px] rounded-lg bg-muted/5 px-5 py-5",children:(0,g.jsx)(YC,{step:e.step,leading:(0,g.jsx)(hs,{category:"interaction",size:"lg"})})})}function yy(e){return e.split(/[-_\s]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function tW(e){return e.engine==="harness"?e.harness?yy(e.harness):"Harness":e.engine==="emulated"?"Emulated":e.harness?yy(e.harness):"Unknown"}function nW({row:e,transcriptMessages:t,onRevealInTranscript:n,turnRuntimeByPromptIndex:r}){if(!e)return(0,g.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,g.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-full border border-border/50 bg-background shadow-sm",children:(0,g.jsx)(vO,{className:"h-7 w-7 text-muted-foreground","aria-hidden":!0})}),(0,g.jsxs)("div",{className:"space-y-1",children:[(0,g.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No span selected"}),(0,g.jsx)("p",{className:"text-xs text-muted-foreground",children:"Click a row or use arrow keys"})]})]});if(e.kind==="interaction")return(0,g.jsx)(eW,{row:e});const i=e.kind==="prompt"?KH(e,t):GH(e,t),s=e.kind==="span"?Wc(t,e.span.toolCallId,e.span.toolName??e.span.name):{},{durationMs:o}=yd(e),a=e.kind==="span"?vd(e,t):null,l=e.kind==="prompt"?e.label:a.title,c=e.kind==="prompt"?e.hasAnyFailure?"error":"ok":zi(e.span,t)?"error":"ok",u=e.kind==="prompt"?"prompt":e.span.category==="tool"&&zi(e.span,t)?"error":e.span.category,h=r?.get(e.promptIndex),f=e.kind==="span"&&(e.span.category==="llm"||e.span.category==="step")?VH(t,e.span.messageStartIndex,e.span.messageEndIndex):{input:null,output:null},d=e.kind==="span"&&e.span.category==="tool"&&(!!e.span.toolCallId||!!(e.span.toolName?.trim()||e.span.name?.trim())),p=e.kind==="prompt"?null:d?s.input:e.kind==="span"&&(e.span.category==="llm"||e.span.category==="step")?f.input:(e.kind==="span"&&e.span.category==="error",null),v=e.kind==="prompt"?null:d?s.output:e.kind==="span"&&(e.span.category==="llm"||e.span.category==="step")?f.output:e.kind==="span"&&e.span.category==="error"?e.span.name:null,y=e.kind==="prompt"?qH(t,e.messageStartIndex,e.messageEndIndex):void 0,x=e.kind==="span"&&(typeof e.span.inputTokens=="number"||typeof e.span.outputTokens=="number"||typeof e.span.totalTokens=="number"),b=e.kind==="prompt"&&(typeof e.aggregatedInputTokens=="number"||typeof e.aggregatedOutputTokens=="number"||typeof e.aggregatedTotalTokens=="number"),w=e.kind==="span"&&s.errorText?s.errorText:null,S=!!(i&&n);return(0,g.jsxs)("div",{"data-testid":"trace-detail-pane",className:"space-y-4 bg-background p-4",children:[(0,g.jsxs)("div",{className:X("border-b border-border/40 pb-3",S?"flex flex-col gap-3 min-[400px]:flex-row min-[400px]:items-start":""),children:[(0,g.jsxs)("div",{className:X("flex gap-3",S?"min-w-0 min-[400px]:flex-1":""),children:[(0,g.jsx)("div",{className:"shrink-0 pt-0.5",children:e.kind==="prompt"?(0,g.jsx)(hs,{category:"prompt",size:"lg"}):(0,g.jsx)(hs,{category:u,size:"lg"})}),(0,g.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,g.jsx)("h3",{className:"text-sm font-bold leading-tight text-foreground",children:l}),h?(0,g.jsxs)(fS,{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:h.engine==="harness"?"This turn ran through the harness adapter.":h.engine==="emulated"?"This turn ran through MCPJam's emulated chat engine.":h.harness?"This turn ran through the harness adapter.":"Runtime engine was not recorded for this turn.",children:["Engine: ",tW(h)]}):null,c==="error"?(0,g.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Error","aria-label":"Error"}):null]}),(0,g.jsxs)("div",{className:"text-xs tabular-nums text-muted-foreground",children:[(0,g.jsx)("span",{className:"font-medium text-foreground",children:co(o)}),e.kind==="prompt"&&b?(0,g.jsxs)(g.Fragment,{children:[typeof e.aggregatedInputTokens=="number"?` · ${e.aggregatedInputTokens} in`:"",typeof e.aggregatedOutputTokens=="number"?` → ${e.aggregatedOutputTokens} out`:"",typeof e.aggregatedTotalTokens=="number"?` (${e.aggregatedTotalTokens} total)`:""]}):e.kind==="span"&&x?(0,g.jsxs)(g.Fragment,{children:[typeof e.span.inputTokens=="number"?` · ${e.span.inputTokens} in`:"",typeof e.span.outputTokens=="number"?` → ${e.span.outputTokens} out`:"",typeof e.span.totalTokens=="number"?` (${e.span.totalTokens} total)`:""]}):null]}),e.kind==="span"?(()=>{const k=e.span,C=k.category==="llm"?MH(k.outputTokens,o):null,T=[];return k.provider&&T.push({label:"Provider",value:k.provider}),k.finishReason&&T.push({label:"Finish",value:k.finishReason}),typeof k.ttfcMs=="number"&&T.push({label:"TTFC",value:co(k.ttfcMs)}),C!==null&&T.push({label:"Throughput",value:`${C.toFixed(1)} tok/s`}),k.responseId&&T.push({label:"Response ID",value:k.responseId}),T.length===0?null:(0,g.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:T.map(M=>(0,g.jsxs)("span",{className:"truncate",children:[(0,g.jsxs)("span",{className:"text-muted-foreground/70",children:[M.label,":"," "]}),(0,g.jsx)("span",{className:"font-medium text-foreground",children:M.value})]},M.label))})})():null]})]}),S?(0,g.jsx)("div",{className:"flex min-w-0 min-[400px]:flex-1 min-[400px]:justify-end min-[400px]:pt-0.5",children:(0,g.jsxs)(Nt,{type:"button",size:"sm",variant:"outline",className:"w-full shrink-0 justify-center whitespace-nowrap min-[400px]:w-auto",onClick:()=>{i&&n&&n(i)},children:[(0,g.jsx)(CO,{className:"h-3.5 w-3.5"}),"Reveal in Chat"]})}):null]}),e.kind==="prompt"&&y?(0,g.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:y}):null,e.kind==="span"?(0,g.jsxs)("div",{className:"space-y-4",children:[(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Input"}),(0,g.jsx)(vy,{value:p??void 0})]}),(0,g.jsxs)("div",{className:X("space-y-2",e.span.category==="error"||w?"rounded-md border border-destructive/50 bg-destructive/50 p-2":""),children:[(0,g.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Output"}),(0,g.jsx)(vy,{value:v??void 0}),w?(0,g.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:w}):null,typeof e.span.mcpErrorCode=="number"?(0,g.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,g.jsx)("span",{className:"text-muted-foreground/70",children:"MCP error: "}),(0,g.jsx)("span",{className:"font-medium text-foreground",children:mH(e.span.mcpErrorCode)})]}):null]})]}):null]})}function UW({recordedSpans:e,interactionSteps:t,estimatedDurationMs:n,transcriptMessageCount:r=0,transcriptMessages:i=[],traceStartedAtMs:s=null,traceEndedAtMs:o=null,onRevealInTranscript:a,hideToolbar:l=!1,timelineFilter:c,onTimelineFilterChange:u,expandedPromptIds:h,onExpandedPromptIdsChange:f,expandedStepIds:d,onExpandedStepIdsChange:p,viewportMaxMs:v,turnRuntimeByPromptIndex:y,fillContent:x=!1}){const b=HL(),w=e&&e.length>0?"recorded":(n??0)>0?"estimated":"none",S=(0,m.useMemo)(()=>e?.length?BH(e):[],[e]),k=(0,m.useMemo)(()=>{const D=new Map;for(const ee of t??[]){const ce=D.get(ee.toolCallId);ce?ce.push(ee):D.set(ee.toolCallId,[ee])}for(const ee of D.values())ee.sort((ce,Ce)=>ce.stepIndex-Ce.stepIndex);return D},[t]),C=e?.length?e.reduce((D,ee)=>Math.max(D,ee.endMs),1):Math.max(n??0,1),T=(0,m.useMemo)(()=>e?.map(D=>`${D.id}:${D.startMs}:${D.endMs}`).join("|")??w,[w,e]),[M,A]=(0,m.useState)(1);(0,m.useEffect)(()=>{v===void 0&&A(C)},[C,T,v]);const R=Math.max(1,v!==void 0?v:M),O=Math.max(1,Math.round(C/50)),P=(0,m.useMemo)(()=>JH({traceStartedAtMs:s,traceEndedAtMs:o,traceDurationMs:C}),[C,o,s]),[j,N]=(0,m.useState)("all"),E=c!==void 0?c:j,L=u??N,[B,H]=(0,m.useState)(new Set),[V,I]=(0,m.useState)(new Set),ne=h!==void 0?h:B,re=f??H,_=d!==void 0?d:V,U=p??I,[K,G]=(0,m.useState)(null),[$,J]=(0,m.useState)(null),[ae,he]=(0,m.useState)(null),se=(0,m.useRef)(null),Ye=(0,m.useRef)(null),[Le,rt]=(0,m.useState)(-1);(0,m.useLayoutEffect)(()=>{const D=Ye.current;if(!D)return;const ee=()=>{const Ce=D.getBoundingClientRect().width;rt(Number.isFinite(Ce)?Ce:0)};if(ee(),typeof ResizeObserver>"u")return;const ce=new ResizeObserver(ee);return ce.observe(D),()=>ce.disconnect()},[]);const qe=(0,m.useMemo)(()=>CH(Le),[Le]),gt=(0,m.useMemo)(()=>qe.length!==2?!1:Le<0||Le===0?!0:Le<kH,[Le,qe]);(0,m.useEffect)(()=>{l||(H(new Set(S.map(D=>D.key))),I(py(S)))},[l,S]);const Me=(0,m.useMemo)(()=>{if(w!=="recorded")return[];const D=[],ee=new Set;function ce(ie){return E==="all"?!0:E==="error"?zi(ie,i):ie.category===E}function Ce(ie,kt,st){const ln=ie.span.category==="step",Ct=ln?st:st+1,cn=ie.children.map(Tt=>Ce(Tt,kt,Ct)),Ss=cn.flatMap(Tt=>Tt.rows),ks=cn.some(Tt=>Tt.hasVisibleContent);if(ln)return{hasVisibleContent:ks||ie.children.length>0,rows:Ss};if(ie.span.category==="llm"&&typeof ie.span.totalTokens!="number"&&typeof ie.span.inputTokens!="number"&&typeof ie.span.outputTokens!="number"&&ie.span.endMs-ie.span.startMs<50)return{hasVisibleContent:!1,rows:[]};const Ln=ie.span.toolCallId,Cs=ie.span.category==="tool"&&!!Ln&&!ee.has(Ln);Cs&&Ln&&ee.add(Ln);const ra=Cs&&Ln?(k.get(Ln)??[]).filter(Tt=>E==="all"||E==="tool"?!0:E==="error"?tc(Tt)==="error":!1).map((Tt,qc)=>({kind:"interaction",key:`interaction-${ie.span.id}-${Tt.stepIndex}-${qc}`,promptIndex:kt,depth:st+1,step:Tt,startMs:ie.span.startMs,endMs:ie.span.endMs,status:tc(Tt)})):[];if(!(ce(ie.span)||ks||ra.length>0))return{hasVisibleContent:ks,rows:Ss};const Ts={kind:"span",key:ie.span.id,promptIndex:kt,depth:st,span:ie.span,hasChildren:ie.children.length>0,isExpanded:_.has(ie.span.id)};return{hasVisibleContent:!0,rows:[Ts,...Ts.hasChildren&&Ts.isExpanded?Ss:[],...ra]}}for(const ie of S){const kt=ie.roots.map(cn=>Ce(cn,ie.promptIndex,0)).flatMap(cn=>cn.rows);if(!(kt.length>0||E==="all"&&ie.spans.length>0))continue;const st=ie.spans.some(cn=>zi(cn,i)),ln=WH(i,ie.messageStartIndex,ie.messageEndIndex),Ct=AH(ie.spans);D.push({kind:"prompt",key:ie.key,promptIndex:ie.promptIndex,label:ie.label,conversationLabel:ln?`User: "${ln}"`:void 0,startMs:ie.startMs,endMs:ie.endMs,messageStartIndex:ie.messageStartIndex,messageEndIndex:ie.messageEndIndex,counts:ie.counts,hasAnyFailure:st,isExpanded:ne.has(ie.key),aggregatedInputTokens:Ct.inputTokens,aggregatedOutputTokens:Ct.outputTokens,aggregatedTotalTokens:Ct.totalTokens}),ne.has(ie.key)&&D.push(...kt)}return D},[ne,_,E,S,k,w,i]),it=(0,m.useMemo)(()=>py(S),[S]),Nr=(0,m.useMemo)(()=>{if(S.length===0)return!1;for(const D of S)if(!ne.has(D.key))return!1;for(const D of it)if(!_.has(D))return!1;return!0},[S,ne,_,it]);(0,m.useEffect)(()=>{if(Me.length===0){G(null);return}(!K||!Me.some(D=>D.key===K))&&G(Me[0].key)},[Me,K]);const ws=Me.find(D=>D.key===K),me=$?Me.find(D=>D.key===$):void 0,Y=$?Me.findIndex(D=>D.key===$):-1;(0,m.useEffect)(()=>{$&&!Me.some(D=>D.key===$)&&(J(null),he(null),se.current=null)},[$,Me]);const ye=(0,m.useCallback)(D=>{const ee=(D.querySelector('[data-testid="trace-row-glyph"]')??D).getBoundingClientRect();return{anchorX:ee.left+ee.width/2,anchorY:ee.top,anchorBottom:ee.bottom}},[]);(0,m.useEffect)(()=>{if(!$)return;const D=()=>{const ee=se.current;ee&&he(ye(ee))};return window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[$,ye]);const je=(0,m.useMemo)(()=>{if(!me)return null;const{startMs:D,endMs:ee}=yd(me),ce=me.kind==="span"&&zi(me.span,i),Ce=me.kind==="span"?vd(me,i):null,ie=me.kind==="prompt"?me.conversationLabel??me.label:me.kind==="interaction"?us(me.step):Ce.title,kt=YH(me,e),st=me.kind==="prompt"?"prompt":me.kind==="interaction"?"interaction":me.span.category==="tool"&&ce?"error":me.span.category;return{label:ie,spanShowsFailure:ce,tokenStats:kt,rowStartTimestamp:P!==null?P+D:null,rowEndTimestamp:P!==null?P+ee:null,glyphCategory:st}},[me,e,P,i]),na=(0,m.useCallback)(D=>{if(Me.length===0)return;const ee=Me.findIndex(ce=>ce.key===K);if(D.key==="ArrowDown"){D.preventDefault();const ce=ee<0?0:Math.min(Me.length-1,ee+1);G(Me[ce].key);return}if(D.key==="ArrowUp"){D.preventDefault();const ce=ee<=0?0:ee-1;G(Me[ce].key);return}if(D.key==="Enter"&&ee>=0){const ce=Me[ee];if(ce.kind==="prompt"){D.preventDefault();const Ce=new Set(ne);Ce.has(ce.key)?Ce.delete(ce.key):Ce.add(ce.key),re(Ce);return}if(ce.kind==="span"&&ce.hasChildren){D.preventDefault();const Ce=new Set(_);Ce.has(ce.key)?Ce.delete(ce.key):Ce.add(ce.key),U(Ce)}}},[ne,_,Me,K,re,U]);if(w==="none")return(0,g.jsx)("div",{className:"text-xs text-muted-foreground",children:"No timing data recorded for this iteration."});if(w==="estimated")return(0,g.jsxs)("div",{className:"space-y-3",children:[(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(fS,{className:"border-warning/50 bg-warning/50 text-foreground",children:"Estimated total only"}),(0,g.jsx)("span",{className:"text-xs text-muted-foreground",children:co(n??0)})]}),(0,g.jsxs)("div",{className:"space-y-1 text-[11px] text-muted-foreground",children:[(0,g.jsx)("p",{children:"Per-step timing was not recorded for this run."}),r>0?(0,g.jsxs)("p",{children:["Conversation detail is in the Chat tab. Open"," ",(0,g.jsx)("span",{className:"font-medium text-foreground/80",children:"Raw"})," to inspect the stored trace and confirm whether a"," ",(0,g.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 vt=v===void 0?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Nt,{type:"button",variant:"outline",size:"icon",className:"h-7 w-7 border-border/50",title:"Zoom in timeline","aria-label":"Zoom in timeline",disabled:M<=O,onClick:()=>A(D=>Math.max(O,Math.round(D*.8))),children:(0,g.jsx)(NO,{className:"size-3.5","aria-hidden":!0})}),(0,g.jsx)(Nt,{type:"button",variant:"outline",size:"icon",className:"h-7 w-7 border-border/50",title:"Zoom out timeline","aria-label":"Zoom out timeline",disabled:M>=C*4,onClick:()=>A(D=>Math.min(C*4,Math.round(D*1.25))),children:(0,g.jsx)(MO,{className:"size-3.5","aria-hidden":!0})})]}):null;return(0,g.jsxs)("div",{className:X("space-y-2",x&&"flex min-h-0 flex-1 flex-col"),children:[l?null:(0,g.jsxs)("div",{className:x?"shrink-0":void 0,children:[(0,g.jsx)(wH,{filter:E,onFilterChange:L,isFullyExpanded:Nr,expandDisabled:S.length===0,zoomControls:vt,onToggleExpandAll:()=>{Nr?(re(new Set),U(new Set)):(re(new Set(S.map(D=>D.key))),U(new Set(it)))}}),(0,g.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:D,cls:ee})=>(0,g.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,g.jsx)("span",{className:X("h-2 w-2.5 rounded-sm",ee)}),D]},D))})]}),(0,g.jsx)("div",{className:X("@container/trace-timeline min-w-0",x&&"flex min-h-0 flex-1 flex-col"),children:(0,g.jsxs)(eH,{direction:"vertical",className:X("rounded-lg border border-border/50 bg-background",x?"min-h-0 flex-1 overflow-hidden":"min-h-[min(25rem,calc(100dvh-8rem))]"),style:x?void 0:{height:"auto"},children:[(0,g.jsx)(gd,{defaultSize:65,minSize:0,className:"min-h-0 min-w-0 overflow-hidden",children:(0,g.jsx)(sH,{className:X(x?"h-full min-h-0 overflow-hidden":"max-h-[calc(100vh-8rem)] min-h-0"),children:(0,g.jsx)("div",{tabIndex:0,role:"region","aria-label":"Trace timeline. Use arrow keys to change selection, Enter to expand.",onKeyDown:na,className:"relative min-h-0 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:(0,g.jsxs)("div",{className:"grid pr-4",style:{gridTemplateColumns:"minmax(140px, 260px) minmax(0, 1fr) minmax(5.25rem, max-content)",gridTemplateRows:`auto repeat(${Me.length}, minmax(48px, auto))`},children:[(0,g.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,g.jsxs)("div",{className:"flex min-h-6 min-w-0 items-center gap-3",children:[(0,g.jsx)("div",{className:"shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Trace"}),(0,g.jsx)("div",{className:"min-h-6 min-w-0 flex-1",children:(0,g.jsx)("div",{ref:Ye,className:"relative h-6 min-w-0",children:gt?(0,g.jsx)("div",{className:"flex h-full min-w-0 items-center justify-center",children:(0,g.jsx)("span",{className:"min-w-0 max-w-full truncate text-center text-[10px] tabular-nums text-muted-foreground",title:fy(R),children:fy(R)})}):qe.map(D=>{const ee=D>=100?"100%":`${D}%`;return(0,g.jsx)("div",{className:"pointer-events-none absolute inset-y-0",style:{left:ee},children:(0,g.jsx)("div",{className:X("absolute text-[10px] tabular-nums text-muted-foreground",TH(D)),children:vl(R*D/100)})},D)})})})]})}),(0,g.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,g.jsxs)("div",{className:"flex h-6 w-full min-w-0 items-center justify-start gap-1.5",children:[(0,g.jsx)(Im,{className:"size-3 shrink-0 text-muted-foreground","aria-hidden":!0}),(0,g.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Latency"})]})}),Me.length>0?(0,g.jsx)("div",{className:"pointer-events-none relative z-0 bg-transparent",style:{gridColumn:2,gridRow:`2 / ${Me.length+2}`},children:qe.map(D=>(0,g.jsx)("div",{className:"absolute top-0 bottom-0 w-px bg-border/40",style:{left:D>=100?"100%":`${D}%`}},D))}):null,Me.map((D,ee)=>{const ce=D.key===K,{startMs:Ce,endMs:ie,durationMs:kt}=yd(D),st=Ce/R*100,ln=Math.max((ie-Ce)/R*100,.45),Ct=D.kind==="span"&&zi(D.span,i),cn=D.kind==="prompt"?"prompt":D.kind==="interaction"?"interaction":D.span.category==="tool"&&Ct?"error":D.span.category,Ss=D.kind==="interaction"&&D.status==="error",ks=D.kind==="span"?vd(D,i):null,Ln=D.kind==="prompt"?D.conversationLabel??D.label:D.kind==="interaction"?us(D.step):ks.title,Cs=co(kt),ra=D.kind==="prompt"?!0:D.kind==="interaction"?!1:D.hasChildren||D.span.category==="llm",Ts=ee+2,Tt=_H(D,Ct),qc=LH(D,Ct),im=()=>{qE("trace_span_clicked",{location:"trace_timeline",span_kind:D.kind}),G(D.key)},Uc=At=>{At.stopPropagation(),im()},nT=ce?X("bg-transparent",Tt):"border-l-transparent bg-background group-hover:bg-muted/20 hover:bg-muted/20",sm=ce?"bg-transparent":"bg-background group-hover:bg-muted/20 hover:bg-muted/20";return(0,g.jsxs)(eS.div,{"data-testid":"trace-row","data-state":ce?"selected":void 0,onClick:im,onMouseEnter:At=>{J(D.key);const Rt=At.currentTarget;se.current=Rt,he(ye(Rt))},onMouseLeave:()=>{J(At=>At===D.key?null:At),he(null),se.current=null},onFocus:At=>{J(D.key);const Rt=At.currentTarget;se.current=Rt,he(ye(Rt))},onBlur:At=>{At.currentTarget.contains(At.relatedTarget)||(J(Rt=>Rt===D.key?null:Rt),he(null),se.current=null)},initial:b||ee>=20?!1:{opacity:0,y:6},animate:{opacity:1,y:0},transition:b||ee>=20?{duration:0}:{duration:.15,delay:ee*.03+.05,ease:[.16,1,.3,1]},style:{gridColumn:"1 / 4",gridRow:Ts,display:"grid",gridTemplateColumns:"subgrid"},className:X("group min-h-0 min-w-0 cursor-pointer items-stretch",ce&&"trace-waterfall-row-selected ring-1 ring-inset ring-ring/40"),children:[(0,g.jsxs)("div",{className:X("flex items-center gap-2 border-b border-border/40 px-4 py-2 transition-all duration-150 border-l-2",nT),children:[(0,g.jsx)("div",{className:"flex shrink-0 items-center",style:{paddingLeft:D.kind==="prompt"?0:D.depth*16},children:ra?(0,g.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:At=>{if(At.stopPropagation(),D.kind==="prompt"){const ia=new Set(ne);ia.has(D.key)?ia.delete(D.key):ia.add(D.key),re(ia);return}const Rt=new Set(_);Rt.has(D.key)?Rt.delete(D.key):Rt.add(D.key),U(Rt)},"aria-label":D.kind==="prompt"?`${D.isExpanded?"Collapse":"Expand"} ${D.label}`:`${"isExpanded"in D&&D.isExpanded?"Collapse":"Expand"} ${Ln}`,children:"isExpanded"in D&&D.isExpanded?(0,g.jsx)(db,{className:"h-3.5 w-3.5"}):(0,g.jsx)(Zi,{className:"h-3.5 w-3.5"})}):(0,g.jsx)("span",{className:"mr-1 h-5 w-5"})}),(0,g.jsx)("button",{type:"button","data-testid":"trace-row-label-button",className:"min-w-0 flex-1 text-left",onClick:Uc,children:(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,g.jsx)("span",{"data-testid":"trace-row-glyph",className:"inline-flex shrink-0 items-center",children:D.kind==="prompt"?(0,g.jsx)(hs,{category:"prompt"}):(0,g.jsx)(hs,{category:cn})}),(0,g.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:Ln}),D.kind==="prompt"&&D.hasAnyFailure?(0,g.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Contains errors","aria-label":"Contains errors"}):null,D.kind==="span"&&Ct||Ss?(0,g.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-destructive",title:"Error","aria-label":"Error"}):null]})})]}),(0,g.jsx)("button",{type:"button","data-testid":"trace-row-bar-hit","data-state":ce?"selected":void 0,className:X("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",sm),"aria-label":`Select on timeline (${co(kt)})`,onClick:Uc,children:(0,g.jsx)("div",{"data-testid":D.kind==="span"&&Ct?"trace-row-bar-error":"trace-row-bar",className:X("absolute top-1/2 z-[1] h-4 min-w-0 -translate-y-1/2 rounded-[3px] transition-[left,width] duration-150",qc),style:{left:`${st}%`,width:`max(${ln}%, 3px)`}})}),(0,g.jsxs)("button",{type:"button","data-testid":"trace-row-duration-hit","data-state":ce?"selected":void 0,className:X("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",sm),"aria-label":`Select row duration (${Cs})`,onClick:Uc,children:[(0,g.jsx)(Im,{className:"size-3 shrink-0 opacity-80","aria-hidden":!0}),Cs]})]},D.key)})]})})})}),(0,g.jsx)(tH,{withHandle:!0}),(0,g.jsx)(gd,{defaultSize:35,minSize:20,className:"min-h-0 min-w-0 overflow-hidden",children:(0,g.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,g.jsx)(nW,{row:ws,transcriptMessages:i,onRevealInTranscript:a,turnRuntimeByPromptIndex:y})})})]})}),me&&je&&ae?(0,g.jsx)(rW,{hoverPos:ae,info:je,placement:Y===0?"bottom":"top",reduceMotion:b??!1,rowKey:me.key}):null]})}function rW({hoverPos:e,info:t,placement:n,reduceMotion:r,rowKey:i}){if(typeof document>"u")return null;const s=304,o=12,a=8,l=s/2,c=typeof window<"u"?window.innerWidth:e.anchorX+l+o,u=164,h=Math.max(u,c-l-o),f=Math.min(Math.max(e.anchorX,u),h),d={position:"fixed",top:n==="top"?e.anchorY-a:e.anchorBottom+a,left:f,transform:n==="top"?"translate(-50%, -100%)":"translateX(-50%)",zIndex:9999};return(0,_o.createPortal)((0,g.jsx)("div",{className:"pointer-events-none",style:d,children:(0,g.jsx)(eS.div,{"data-placement":n,"data-testid":"trace-row-hover-content",initial:r?!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,g.jsxs)("div",{"data-testid":"trace-row-hover-card",className:"space-y-3 p-3",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,g.jsx)(hs,{category:t.glyphCategory}),(0,g.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs font-semibold text-popover-foreground",children:t.label})]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-popover-foreground/65",children:"Time"}),(0,g.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,g.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Start"}),(0,g.jsx)("span",{"data-testid":"trace-row-hover-start",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:gy(t.rowStartTimestamp)})]}),(0,g.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,g.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"End"}),(0,g.jsx)("span",{"data-testid":"trace-row-hover-end",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:gy(t.rowEndTimestamp)})]})]})]}),(0,g.jsxs)("div",{className:"space-y-1.5",children:[(0,g.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-popover-foreground/65",children:"Tokens"}),(0,g.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,g.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Input"}),(0,g.jsx)("span",{"data-testid":"trace-row-hover-input-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:sh(t.tokenStats.inputTokens)})]}),(0,g.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,g.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Output"}),(0,g.jsx)("span",{"data-testid":"trace-row-hover-output-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:sh(t.tokenStats.outputTokens)})]}),(0,g.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-3",children:[(0,g.jsx)("span",{className:"shrink-0 text-popover-foreground/70",children:"Total"}),(0,g.jsx)("span",{"data-testid":"trace-row-hover-total-tokens",className:"min-w-0 text-right font-medium text-popover-foreground tabular-nums",children:sh(t.tokenStats.totalTokens)})]})]})]})]})},i)}),document.body)}export{Uj as $,Uy as $t,R_ as A,Im as At,bW as B,gc as Bt,S5 as C,CO as Ct,a3 as D,mO as Dt,u3 as E,vO as Et,fS as F,Ji as Ft,CW as G,xx as Gt,n_ as H,RM as Ht,cS as I,eO as It,Yh as J,cc as Jt,kW as K,bx as Kt,xW as L,JE as Lt,Hr as M,sO as Mt,i_ as N,Zi as Nt,n3 as O,dO as Ot,$r as P,db as Pt,yW as Q,Td as Qt,hS as R,be as Rt,zW as S,AO as St,yC as T,xO as Tt,wW as U,AM as Ut,t_ as V,Qx as Vt,SW as W,Ax as Wt,gW as X,WA as Xt,Jj as Y,nx as Yt,mW as Z,ex as Zt,eH as _,vc as _t,wH as a,ri as an,eS as at,FW as b,EO as bt,WW as c,Dt as cn,ZD as ct,sH as d,rr as dn,GO as dt,eA as en,vW as et,oH as f,CT as fn,UO as ft,gd as g,zO as gt,tH as h,HO as ht,CH as i,nc as in,HL as it,zr as j,aO as jt,I_ as k,Hi as kt,HW as l,te as ln,Se as lt,Ns as m,qO as mt,BH as n,YT as nn,pt as nt,gH as o,Nn as on,DN as ot,$W as p,_e as pn,pb as pt,uS as q,Id as qt,py as r,Qe as rn,xp as rt,xH as s,Vo as sn,Fw as st,UW as t,_y as tn,Kj as tt,XC as u,bd as un,Ud as ut,MC as v,NO as vt,VW as w,SO as wt,y5 as x,MO as xt,Jp as y,IO as yt,e_ as z,qE as zt};
136
136
 
137
- //# sourceMappingURL=trace-timeline-D_iD3a0v.js.map
137
+ //# sourceMappingURL=trace-timeline-fl51h9sN.js.map
@@ -1,3 +1,3 @@
1
- (function(){try{var g=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};g.SENTRY_RELEASE={id:"3.12.6"};var w=new g.Error().stack;w&&(g._sentryDebugIds=g._sentryDebugIds||{},g._sentryDebugIds[w]="3a73e22f-747b-4425-ad4a-15abe56be946",g._sentryDebugIdIdentifier="sentry-dbid-3a73e22f-747b-4425-ad4a-15abe56be946")}catch{}})();(function(){typeof[].at!="function"&&Object.defineProperty(Array.prototype,"at",{value(e){const t=this.length;let n=Math.trunc(e)||0;return 0>n&&(n+=t),0>n||n>=t?void 0:this[n]},writable:!0,enumerable:!1,configurable:!0});const g="u">typeof window?window:void 0,w="u">typeof globalThis?globalThis:g;w!=null&&w.XMLHttpRequest&&new w.XMLHttpRequest;const C=typeof globalThis<"u"?globalThis:g;C&&typeof self>"u"&&(C.self=C),C&&typeof File>"u"&&(C.File=function(){});const T=g??{};function S(e){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(e)}function at(e,t,n){return(t=(function(i){var o=(function(r){if(S(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,"string");if(S(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)})(i);return S(o)=="symbol"?o:o+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function F(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z(Object(n),!0).forEach(function(i){at(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}let X=-1;const L=()=>X,k=e=>{addEventListener("pageshow",t=>{t.persisted&&(X=t.timeStamp,e(t))},!0)},p=(e,t,n,i)=>{let o,r;return a=>{var c;t.value>=0&&(a||i)&&(r=t.value-((c=o)!==null&&c!==void 0?c:0),(r||o===void 0)&&(o=t.value,t.delta=r,t.rating=((u,l)=>u>l[1]?"poor":u>l[0]?"needs-improvement":"good")(t.value,n),e(t)))}},R=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},$=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},M=()=>{var e,t;return(e=(t=$())===null||t===void 0?void 0:t.activationStart)!==null&&e!==void 0?e:0};let P=-1;const Y=new Set,G=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,D=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of Y)t();isFinite(P)||(P=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",D,!0))}},O=(e=!1)=>{if(e&&(P=1/0),0>P){var t;const n=M(),i=document.prerendering||(t=globalThis.performance.getEntriesByType("visibility-state").find(o=>o.name==="hidden"&&o.startTime>=n))===null||t===void 0?void 0:t.startTime;P=i??G(),addEventListener("visibilitychange",D,!0),addEventListener("prerenderingchange",D,!0),k(()=>{setTimeout(()=>{P=G()})})}return{get firstHiddenTime(){return P},onHidden(n){Y.add(n)}}},b=(e,t=-1,n,i=0,o,r,a)=>{const c=$(),u=c?.navigationId||0;let l="navigate";return n?l=n:0>L()?c&&(document.prerendering||M()>0?l="prerender":document.wasDiscarded?l="restore":c.type&&(l=c.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:l,navigationId:i||u,navigationInteractionId:o,navigationURL:r||c?.name,navigationStartTime:a||0}},J=new WeakMap;function j(e,t){let n=J.get(t);return n||(n=new WeakMap,J.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var rt=class{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(e.hadRecentInput)return;const n=this.o[0],i=this.o.at(-1);this.i&&n&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-n.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),(t=this.t)===null||t===void 0||t.call(this,e)}};const _=(e,t,n={})=>{try{const i=e.filter(o=>PerformanceObserver.supportedEntryTypes.includes(o));if(i.length>0){const o=new PerformanceObserver(r=>{queueMicrotask(()=>{const a=r.getEntries();i.length>1&&a.sort((c,u)=>c.startTime+c.duration-(u.startTime+u.duration)),t(a)})});for(const r of i)o.observe(F({type:r,buffered:!0},n));return o}}catch{}},A=e=>{var t,n;return((t=globalThis.PerformanceObserver)===null||t===void 0||(t=t.supportedEntryTypes)===null||t===void 0?void 0:t.includes("soft-navigation"))&&typeof((n=globalThis.PerformanceSoftNavigation)===null||n===void 0||(n=n.prototype)===null||n===void 0?void 0:n.getLargestInteractionContentfulPaint)=="function"&&e&&e.reportSoftNavs},K=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const n=e.keys().next().value;n!==void 0&&e.delete(n)}},Q=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var st=class{constructor(){this.l=void 0}};const W=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},q=[1800,3e3],Z=(e,t={})=>{const n=A(t);W(()=>{const i=j(t,st),o=O();let r,a=b("FCP");const c=_(["paint"],u=>{for(const l of u)l.name==="first-contentful-paint"&&(c.disconnect(),o.firstHiddenTime>l.startTime&&(a.value=Math.max(l.startTime-M(),0),a.entries.push(l),a.navigationId=l.navigationId||a.navigationId,r(!0)))});c&&(r=p(e,a,q,t.reportAllChanges),k(u=>{a=b("FCP",-1,"back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,L()),r=p(e,a,q,t.reportAllChanges),R(()=>{a.value=performance.now()-u.timeStamp,r(!0)})})),n&&_(["soft-navigation"],u=>{u.forEach(l=>{i.l&&l.navigationId&&K(i.l,l);const m=Math.max((l.presentationTime||l.paintTime||0)-l.startTime,0);a=b("FCP",m,"soft-navigation",l.navigationId,l.interactionId,l.name,l.startTime),r=p(e,a,q,t.reportAllChanges),r(!0)})},t)})},tt=[.1,.25];let et=0,N=1/0,x=0;const lt=e=>{for(const t of e)t.interactionId&&(N=Math.min(N,t.interactionId),x=Math.max(x,t.interactionId),et=x?(x-N)/7+1:0)};let B;const nt=()=>{var e;return B?et:(e=performance.interactionCount)!==null&&e!==void 0?e:0};var ct=class{constructor(){this.u=0,this.v=[],this.m=new Map,this.p=void 0,this.T=void 0}_(){return nt()-this.u}M(){this.u=nt(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||n!==-1||e!=="soft-navigation"&&e!=="back-forward-cache"?this.v[n]:{P:8,id:-1,entries:[]}}h(e){var t;if((t=this.p)===null||t===void 0||t.call(this,e),!e.interactionId)return;const n=this.v.at(-1);let i=this.m.get(e.interactionId);if(i||10>this.v.length||e.duration>n.P){var o;if(i?e.duration>i.P?(i.entries=[e],i.P=e.duration):e.duration===i.P&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(i={id:e.interactionId,entries:[e],P:e.duration},this.m.set(i.id,i),this.v.push(i)),this.v.sort((r,a)=>a.P-r.P),this.v.length>10){const r=this.v.splice(10);for(const a of r)this.m.delete(a.id)}(o=this.T)===null||o===void 0||o.call(this,i)}}};const it=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const o=Q(e);let r=-1;const a=()=>{i(r),o()};addEventListener("visibilitychange",a,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",a,{capture:!0}),o()},{timeout:t})}},ot=[200,500];var dt=class{constructor(){this.p=void 0,this.l=void 0}h(e){var t;(t=this.p)===null||t===void 0||t.call(this,e)}};const U=[2500,4e3],H={onLCP(e,t={}){let n=!1;const i=A(t);W(()=>{let o,r=O(),a=b("LCP");const c=j(t,dt),u=(s,v,d,h,y)=>{a=b("LCP",-1,s,v,d,h,y),o=p(e,a,U,t.reportAllChanges),n=!1,s==="soft-navigation"&&(r=O(!0))},l=s=>{var v;c.l&&s.navigationId&&K(c.l,s),n||o(!0),u("soft-navigation",s.navigationId,s.interactionId,s.name,s.startTime);const d=(v=s.getLargestInteractionContentfulPaint)===null||v===void 0?void 0:v.call(s);d&&m([d])},m=s=>{t.reportAllChanges||i||(s=s.slice(-1));for(const d of s){if(!d)continue;if(d.entryType==="soft-navigation"){l(d);continue}let h=0,y=[],V=d.startTime;if(d.entryType==="largest-contentful-paint")h=Math.max(d.startTime-M(),0),c.h(d),y=[d];else if(d.entryType==="interaction-contentful-paint"){var v;const E=d;if(!a.navigationId||"interactionId"in E&&E.interactionId!=a.navigationInteractionId)continue;V=((v=E.largestContentfulPaint)===null||v===void 0?void 0:v.renderTime)||0,h=Math.max(V-d.startTime,0),E.largestContentfulPaint&&(c.h(E.largestContentfulPaint),y=[E.largestContentfulPaint])}r.firstHiddenTime>V&&(a.value=h,a.entries=y,o())}},I=["largest-contentful-paint"];i&&I.push("interaction-contentful-paint","soft-navigation");const f=_(I,m);if(f){o=p(e,a,U,t.reportAllChanges);const s=["keydown","click","visibilitychange"],v=d=>{if(d.isTrusted&&!n){const h=a.id;it(()=>{if(!n){if(!i){f.disconnect();for(const y of s)removeEventListener(y,v,{capture:!0})}h===a.id&&(n=!0,o(!0))}})}};for(const d of s)addEventListener(d,v,{capture:!0});k(d=>{u("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,L()),o=p(e,a,U,t.reportAllChanges),R(()=>{a.value=performance.now()-d.timeStamp,n=!0,o(!0)})})}})},onCLS(e,t={}){const n=O();Z(Q(()=>{let i,o=b("CLS",0);const r=j(t,rt),a=(f,s,v,d,h)=>{o=b("CLS",0,f,s,v,d,h),r.i=0,i=p(e,o,tt,t.reportAllChanges)},c=(f=!1)=>{r.i>o.value&&(o.value=r.i,o.entries=r.o),i(f)},u=f=>{c(!0),a("soft-navigation",f.navigationId,f.interactionId,f.name,f.startTime)},l=f=>{for(const s of f)s.entryType!=="soft-navigation"?r.h(s):u(s);c()},m=["layout-shift"];A(t)&&m.push("soft-navigation");const I=_(m,l);I&&(i=p(e,o,tt,t.reportAllChanges),n.onHidden(()=>{l(I.takeRecords()),i(!0)}),k(()=>{a("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,L()),R(i)}),setTimeout(i))}))},onFCP:Z,onINP(e,t={}){if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=O();W(()=>{var i;"interactionCount"in performance||B||(B=_(["event"],lt,{durationThreshold:0}));let o,r=b("INP");const a=j(t,ct),c=(s,v,d,h,y)=>{a.M(),r=b("INP",-1,s,v,d,h,y),o=p(e,r,ot,t.reportAllChanges)},u=()=>{const s=a.L(r.navigationType);s&&s.P!==r.value&&(r.value=s.P,r.entries=s.entries,o())},l=s=>{u(),o(!0),c("soft-navigation",s.navigationId,s.interactionId,s.name,s.startTime)},m=(s,v=!1)=>{it(()=>{for(const d of s)d.entryType!=="soft-navigation"?a.h(d):l(d);u(),v&&o(!0)})},I=["event","first-input"];A(t)&&I.push("soft-navigation");const f=_(I,m,F(F({},t),{},{durationThreshold:(i=t.durationThreshold)!==null&&i!==void 0?i:40}));o=p(e,r,ot,t.reportAllChanges),f&&(n.onHidden(()=>{m(f.takeRecords(),!0)}),k(()=>{c("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,L())}))})}};T.__PosthogExtensions__=T.__PosthogExtensions__||{},T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals"]=H,T.__PosthogExtensions__.postHogWebVitalsCallbacks=H,T.postHogWebVitalsCallbacks=H,T.__PosthogExtensions__.loadWebVitalsCallbacks=()=>H})();
1
+ (function(){try{var g=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};g.SENTRY_RELEASE={id:"3.12.7"};var w=new g.Error().stack;w&&(g._sentryDebugIds=g._sentryDebugIds||{},g._sentryDebugIds[w]="3a73e22f-747b-4425-ad4a-15abe56be946",g._sentryDebugIdIdentifier="sentry-dbid-3a73e22f-747b-4425-ad4a-15abe56be946")}catch{}})();(function(){typeof[].at!="function"&&Object.defineProperty(Array.prototype,"at",{value(e){const t=this.length;let n=Math.trunc(e)||0;return 0>n&&(n+=t),0>n||n>=t?void 0:this[n]},writable:!0,enumerable:!1,configurable:!0});const g="u">typeof window?window:void 0,w="u">typeof globalThis?globalThis:g;w!=null&&w.XMLHttpRequest&&new w.XMLHttpRequest;const C=typeof globalThis<"u"?globalThis:g;C&&typeof self>"u"&&(C.self=C),C&&typeof File>"u"&&(C.File=function(){});const T=g??{};function S(e){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(e)}function at(e,t,n){return(t=(function(i){var o=(function(r){if(S(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,"string");if(S(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)})(i);return S(o)=="symbol"?o:o+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function F(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z(Object(n),!0).forEach(function(i){at(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}let X=-1;const L=()=>X,k=e=>{addEventListener("pageshow",t=>{t.persisted&&(X=t.timeStamp,e(t))},!0)},p=(e,t,n,i)=>{let o,r;return a=>{var c;t.value>=0&&(a||i)&&(r=t.value-((c=o)!==null&&c!==void 0?c:0),(r||o===void 0)&&(o=t.value,t.delta=r,t.rating=((u,l)=>u>l[1]?"poor":u>l[0]?"needs-improvement":"good")(t.value,n),e(t)))}},R=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},$=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},M=()=>{var e,t;return(e=(t=$())===null||t===void 0?void 0:t.activationStart)!==null&&e!==void 0?e:0};let P=-1;const Y=new Set,G=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,D=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of Y)t();isFinite(P)||(P=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",D,!0))}},O=(e=!1)=>{if(e&&(P=1/0),0>P){var t;const n=M(),i=document.prerendering||(t=globalThis.performance.getEntriesByType("visibility-state").find(o=>o.name==="hidden"&&o.startTime>=n))===null||t===void 0?void 0:t.startTime;P=i??G(),addEventListener("visibilitychange",D,!0),addEventListener("prerenderingchange",D,!0),k(()=>{setTimeout(()=>{P=G()})})}return{get firstHiddenTime(){return P},onHidden(n){Y.add(n)}}},b=(e,t=-1,n,i=0,o,r,a)=>{const c=$(),u=c?.navigationId||0;let l="navigate";return n?l=n:0>L()?c&&(document.prerendering||M()>0?l="prerender":document.wasDiscarded?l="restore":c.type&&(l=c.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:l,navigationId:i||u,navigationInteractionId:o,navigationURL:r||c?.name,navigationStartTime:a||0}},J=new WeakMap;function j(e,t){let n=J.get(t);return n||(n=new WeakMap,J.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var rt=class{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(e.hadRecentInput)return;const n=this.o[0],i=this.o.at(-1);this.i&&n&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-n.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),(t=this.t)===null||t===void 0||t.call(this,e)}};const _=(e,t,n={})=>{try{const i=e.filter(o=>PerformanceObserver.supportedEntryTypes.includes(o));if(i.length>0){const o=new PerformanceObserver(r=>{queueMicrotask(()=>{const a=r.getEntries();i.length>1&&a.sort((c,u)=>c.startTime+c.duration-(u.startTime+u.duration)),t(a)})});for(const r of i)o.observe(F({type:r,buffered:!0},n));return o}}catch{}},A=e=>{var t,n;return((t=globalThis.PerformanceObserver)===null||t===void 0||(t=t.supportedEntryTypes)===null||t===void 0?void 0:t.includes("soft-navigation"))&&typeof((n=globalThis.PerformanceSoftNavigation)===null||n===void 0||(n=n.prototype)===null||n===void 0?void 0:n.getLargestInteractionContentfulPaint)=="function"&&e&&e.reportSoftNavs},K=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const n=e.keys().next().value;n!==void 0&&e.delete(n)}},Q=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var st=class{constructor(){this.l=void 0}};const W=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},q=[1800,3e3],Z=(e,t={})=>{const n=A(t);W(()=>{const i=j(t,st),o=O();let r,a=b("FCP");const c=_(["paint"],u=>{for(const l of u)l.name==="first-contentful-paint"&&(c.disconnect(),o.firstHiddenTime>l.startTime&&(a.value=Math.max(l.startTime-M(),0),a.entries.push(l),a.navigationId=l.navigationId||a.navigationId,r(!0)))});c&&(r=p(e,a,q,t.reportAllChanges),k(u=>{a=b("FCP",-1,"back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,L()),r=p(e,a,q,t.reportAllChanges),R(()=>{a.value=performance.now()-u.timeStamp,r(!0)})})),n&&_(["soft-navigation"],u=>{u.forEach(l=>{i.l&&l.navigationId&&K(i.l,l);const m=Math.max((l.presentationTime||l.paintTime||0)-l.startTime,0);a=b("FCP",m,"soft-navigation",l.navigationId,l.interactionId,l.name,l.startTime),r=p(e,a,q,t.reportAllChanges),r(!0)})},t)})},tt=[.1,.25];let et=0,N=1/0,x=0;const lt=e=>{for(const t of e)t.interactionId&&(N=Math.min(N,t.interactionId),x=Math.max(x,t.interactionId),et=x?(x-N)/7+1:0)};let B;const nt=()=>{var e;return B?et:(e=performance.interactionCount)!==null&&e!==void 0?e:0};var ct=class{constructor(){this.u=0,this.v=[],this.m=new Map,this.p=void 0,this.T=void 0}_(){return nt()-this.u}M(){this.u=nt(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||n!==-1||e!=="soft-navigation"&&e!=="back-forward-cache"?this.v[n]:{P:8,id:-1,entries:[]}}h(e){var t;if((t=this.p)===null||t===void 0||t.call(this,e),!e.interactionId)return;const n=this.v.at(-1);let i=this.m.get(e.interactionId);if(i||10>this.v.length||e.duration>n.P){var o;if(i?e.duration>i.P?(i.entries=[e],i.P=e.duration):e.duration===i.P&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(i={id:e.interactionId,entries:[e],P:e.duration},this.m.set(i.id,i),this.v.push(i)),this.v.sort((r,a)=>a.P-r.P),this.v.length>10){const r=this.v.splice(10);for(const a of r)this.m.delete(a.id)}(o=this.T)===null||o===void 0||o.call(this,i)}}};const it=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const o=Q(e);let r=-1;const a=()=>{i(r),o()};addEventListener("visibilitychange",a,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",a,{capture:!0}),o()},{timeout:t})}},ot=[200,500];var dt=class{constructor(){this.p=void 0,this.l=void 0}h(e){var t;(t=this.p)===null||t===void 0||t.call(this,e)}};const U=[2500,4e3],H={onLCP(e,t={}){let n=!1;const i=A(t);W(()=>{let o,r=O(),a=b("LCP");const c=j(t,dt),u=(s,v,d,h,y)=>{a=b("LCP",-1,s,v,d,h,y),o=p(e,a,U,t.reportAllChanges),n=!1,s==="soft-navigation"&&(r=O(!0))},l=s=>{var v;c.l&&s.navigationId&&K(c.l,s),n||o(!0),u("soft-navigation",s.navigationId,s.interactionId,s.name,s.startTime);const d=(v=s.getLargestInteractionContentfulPaint)===null||v===void 0?void 0:v.call(s);d&&m([d])},m=s=>{t.reportAllChanges||i||(s=s.slice(-1));for(const d of s){if(!d)continue;if(d.entryType==="soft-navigation"){l(d);continue}let h=0,y=[],V=d.startTime;if(d.entryType==="largest-contentful-paint")h=Math.max(d.startTime-M(),0),c.h(d),y=[d];else if(d.entryType==="interaction-contentful-paint"){var v;const E=d;if(!a.navigationId||"interactionId"in E&&E.interactionId!=a.navigationInteractionId)continue;V=((v=E.largestContentfulPaint)===null||v===void 0?void 0:v.renderTime)||0,h=Math.max(V-d.startTime,0),E.largestContentfulPaint&&(c.h(E.largestContentfulPaint),y=[E.largestContentfulPaint])}r.firstHiddenTime>V&&(a.value=h,a.entries=y,o())}},I=["largest-contentful-paint"];i&&I.push("interaction-contentful-paint","soft-navigation");const f=_(I,m);if(f){o=p(e,a,U,t.reportAllChanges);const s=["keydown","click","visibilitychange"],v=d=>{if(d.isTrusted&&!n){const h=a.id;it(()=>{if(!n){if(!i){f.disconnect();for(const y of s)removeEventListener(y,v,{capture:!0})}h===a.id&&(n=!0,o(!0))}})}};for(const d of s)addEventListener(d,v,{capture:!0});k(d=>{u("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,L()),o=p(e,a,U,t.reportAllChanges),R(()=>{a.value=performance.now()-d.timeStamp,n=!0,o(!0)})})}})},onCLS(e,t={}){const n=O();Z(Q(()=>{let i,o=b("CLS",0);const r=j(t,rt),a=(f,s,v,d,h)=>{o=b("CLS",0,f,s,v,d,h),r.i=0,i=p(e,o,tt,t.reportAllChanges)},c=(f=!1)=>{r.i>o.value&&(o.value=r.i,o.entries=r.o),i(f)},u=f=>{c(!0),a("soft-navigation",f.navigationId,f.interactionId,f.name,f.startTime)},l=f=>{for(const s of f)s.entryType!=="soft-navigation"?r.h(s):u(s);c()},m=["layout-shift"];A(t)&&m.push("soft-navigation");const I=_(m,l);I&&(i=p(e,o,tt,t.reportAllChanges),n.onHidden(()=>{l(I.takeRecords()),i(!0)}),k(()=>{a("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,L()),R(i)}),setTimeout(i))}))},onFCP:Z,onINP(e,t={}){if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=O();W(()=>{var i;"interactionCount"in performance||B||(B=_(["event"],lt,{durationThreshold:0}));let o,r=b("INP");const a=j(t,ct),c=(s,v,d,h,y)=>{a.M(),r=b("INP",-1,s,v,d,h,y),o=p(e,r,ot,t.reportAllChanges)},u=()=>{const s=a.L(r.navigationType);s&&s.P!==r.value&&(r.value=s.P,r.entries=s.entries,o())},l=s=>{u(),o(!0),c("soft-navigation",s.navigationId,s.interactionId,s.name,s.startTime)},m=(s,v=!1)=>{it(()=>{for(const d of s)d.entryType!=="soft-navigation"?a.h(d):l(d);u(),v&&o(!0)})},I=["event","first-input"];A(t)&&I.push("soft-navigation");const f=_(I,m,F(F({},t),{},{durationThreshold:(i=t.durationThreshold)!==null&&i!==void 0?i:40}));o=p(e,r,ot,t.reportAllChanges),f&&(n.onHidden(()=>{m(f.takeRecords(),!0)}),k(()=>{c("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,L())}))})}};T.__PosthogExtensions__=T.__PosthogExtensions__||{},T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},T.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals"]=H,T.__PosthogExtensions__.postHogWebVitalsCallbacks=H,T.postHogWebVitalsCallbacks=H,T.__PosthogExtensions__.loadWebVitalsCallbacks=()=>H})();
2
2
 
3
- //# sourceMappingURL=web-vitals-DCOcPgvo.js.map
3
+ //# sourceMappingURL=web-vitals-CIP57d68.js.map
@@ -12,12 +12,12 @@
12
12
  rel="stylesheet"
13
13
  />
14
14
  <title>MCPJam Inspector</title>
15
- <script type="module" crossorigin src="/assets/index-DVxvFt1b.js"></script>
16
- <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-CQzr1Zku.js">
17
- <link rel="modulepreload" crossorigin href="/assets/failed-request-tracker-C_rHGGiC.js">
18
- <link rel="modulepreload" crossorigin href="/assets/preload-helper-CWYHVRyR.js">
19
- <link rel="modulepreload" crossorigin href="/assets/OAuthDesktopReturnNotice-Hqfjrb1H.js">
20
- <link rel="modulepreload" crossorigin href="/assets/button-BIwDmB_t.js">
15
+ <script type="module" crossorigin src="/assets/index-B-8CVYYi.js"></script>
16
+ <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-1PqeXL0B.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/failed-request-tracker-CYWaDq0H.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/preload-helper-CC679xXH.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/OAuthDesktopReturnNotice-DUuacpVO.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/button-F4pHUjYC.js">
21
21
  <link rel="stylesheet" crossorigin href="/assets/OAuthDesktopReturnNotice-B_x9xTE-.css">
22
22
  </head>
23
23
  <body>
@@ -37,7 +37,7 @@ function resolveEnvironment() {
37
37
  }
38
38
  return "dev";
39
39
  }
40
- var BAKED_VERSION = "3.12.6";
40
+ var BAKED_VERSION = "3.12.7";
41
41
  function blankToNull(value) {
42
42
  return value === void 0 || value.trim() === "" ? null : value;
43
43
  }
@@ -2873,4 +2873,4 @@ export {
2873
2873
  installRuntimePack,
2874
2874
  reportLocalHarnessRuntimeStatusInBackground
2875
2875
  };
2876
- //# sourceMappingURL=chunk-SUMJU6PX.js.map
2876
+ //# sourceMappingURL=chunk-76PAQUEP.js.map
@@ -22,7 +22,7 @@ import {
22
22
  supportsOwnershipProof,
23
23
  terminateOwnedProcess,
24
24
  terminateOwnedProcessGroup
25
- } from "./chunk-SUMJU6PX.js";
25
+ } from "./chunk-76PAQUEP.js";
26
26
  import {
27
27
  HOSTED_MODE,
28
28
  LOCAL_HARNESS_ENABLED,
@@ -4798,4 +4798,4 @@ export {
4798
4798
  localHarnessSupervisor,
4799
4799
  prepareLocalHarnessTurn
4800
4800
  };
4801
- //# sourceMappingURL=chunk-T4H5HSBJ.js.map
4801
+ //# sourceMappingURL=chunk-FQTRKEDA.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  installRuntimePack,
3
3
  readRuntimeInstallStatus
4
- } from "./chunk-SUMJU6PX.js";
4
+ } from "./chunk-76PAQUEP.js";
5
5
  import "./chunk-PZ5AY32C.js";
6
6
 
7
7
  // server/harness-install-cli.ts
@@ -28,7 +28,7 @@ import {
28
28
  stopLocalHarnessProject,
29
29
  stopLocalHarnessWorkspace,
30
30
  validateWorkspaceCandidate
31
- } from "./chunk-T4H5HSBJ.js";
31
+ } from "./chunk-FQTRKEDA.js";
32
32
  import {
33
33
  LOCAL_HARNESS_MANIFEST,
34
34
  LOCAL_HARNESS_POLICY_VERSION,
@@ -57,7 +57,7 @@ import {
57
57
  runtimeInstallRoot,
58
58
  startRuntimeInstall,
59
59
  supportsOwnershipProof
60
- } from "./chunk-SUMJU6PX.js";
60
+ } from "./chunk-76PAQUEP.js";
61
61
  import {
62
62
  BROWSER_CONSENT_HEADER,
63
63
  createBrowserConsentLifetime,
@@ -28834,7 +28834,7 @@ var noopPosthog = {
28834
28834
  var posthog = isTelemetryDisabled ? noopPosthog : new PostHog("phc_dTOPniyUNU2kD8Jx8yHMXSqiZHM8I91uWopTMX6EBE9", {
28835
28835
  host: "https://us.i.posthog.com"
28836
28836
  });
28837
- var SDK_VERSION = "8.20.0";
28837
+ var SDK_VERSION = "8.20.1";
28838
28838
  var SDK_RELEASE = `@mcpjam/sdk@${SDK_VERSION}`;
28839
28839
  var CAPTURED_ERROR_SYMBOL = Symbol.for("@mcpjam/sdk/captured-eval-error");
28840
28840
  init_internal();
@@ -28846,7 +28846,7 @@ init_eval_tool_execution();
28846
28846
  init_internal();
28847
28847
  init_internal();
28848
28848
  function readSdkVersion() {
28849
- return "8.20.0";
28849
+ return "8.20.1";
28850
28850
  }
28851
28851
  var DEFAULT_PLATFORM_USER_AGENT = `mcpjam-sdk/${readSdkVersion()}`;
28852
28852
  init_HostRunner();
@@ -87729,7 +87729,7 @@ var NEGATIVE_TEST_MODE_DETAILS = {
87729
87729
  };
87730
87730
  init_client_id_metadata2();
87731
87731
  function readSdkVersion2() {
87732
- return "8.20.0";
87732
+ return "8.20.1";
87733
87733
  }
87734
87734
  var CONFORMANCE_CHECKER_VERSION2 = readSdkVersion2();
87735
87735
  var MUST_POINTS2 = 95;
@@ -92547,7 +92547,7 @@ async function sweepLocalHarnessScratch() {
92547
92547
  var startup;
92548
92548
  function startLocalHarnessJanitor() {
92549
92549
  startup ??= (async () => {
92550
- const { localHarnessSupervisor } = await import("./local-turn-ZKWOMPM4.js");
92550
+ const { localHarnessSupervisor } = await import("./local-turn-3DH4OF7C.js");
92551
92551
  await localHarnessSupervisor().reclaimOrphans();
92552
92552
  await sweepLocalHarnessScratch();
92553
92553
  })().catch((error) => {
@@ -161594,7 +161594,7 @@ function platformRefusalHint(refusal) {
161594
161594
  return refusal.canTopUp === false ? `${when} This is a usage limit: topping up credits does not lift it.` : when;
161595
161595
  }
161596
161596
  function readSdkVersion3() {
161597
- return "8.20.0";
161597
+ return "8.20.1";
161598
161598
  }
161599
161599
  var DEFAULT_PLATFORM_API_BASE_URL = "https://app.mcpjam.com/api/v1";
161600
161600
  function resolvePlatformRequestUrl(spec) {
@@ -225757,6 +225757,19 @@ async function handleEvalAuthoring(c, local) {
225757
225757
  requestedEnvironmentId: input.environmentId,
225758
225758
  hasServerOverride: false,
225759
225759
  serverField: "servers"
225760
+ }).catch((error) => {
225761
+ if (!local && input.source === "markdown" && error instanceof WebRouteError && error.details?.reason === "ENVIRONMENT_REQUIRED") {
225762
+ getRequestLogger(c, "routes.shared.eval-authoring").event(
225763
+ "eval.import.environment_selection.failed",
225764
+ {
225765
+ projectId: input.projectId,
225766
+ suiteId: input.suiteId,
225767
+ reason: "ENVIRONMENT_REQUIRED"
225768
+ },
225769
+ { sentry: true }
225770
+ );
225771
+ }
225772
+ throw error;
225760
225773
  });
225761
225774
  const environment = environmentId ? await resolveEnvironmentForLaunch(convex, {
225762
225775
  serverSource: EVAL_LAUNCH_SERVER_SOURCE,
@@ -237304,6 +237317,7 @@ document.addEventListener('securitypolicyviolation', function(e) {
237304
237317
  sandboxAttrs,
237305
237318
  cspDirectives,
237306
237319
  cspSubtypePolicy,
237320
+ clientContext,
237307
237321
  browserStorage,
237308
237322
  permissive,
237309
237323
  colorScheme,
@@ -237446,6 +237460,8 @@ document.addEventListener('securitypolicyviolation', function(e) {
237446
237460
  {
237447
237461
  csp,
237448
237462
  cspDirectives,
237463
+ cspSubtypePolicy,
237464
+ clientContext,
237449
237465
  permissive: Boolean(permissive),
237450
237466
  },
237451
237467
  );
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  localHarnessSupervisor,
3
3
  prepareLocalHarnessTurn
4
- } from "./chunk-T4H5HSBJ.js";
5
- import "./chunk-SUMJU6PX.js";
4
+ } from "./chunk-FQTRKEDA.js";
5
+ import "./chunk-76PAQUEP.js";
6
6
  import "./chunk-SH24KJBI.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
9
9
  localHarnessSupervisor,
10
10
  prepareLocalHarnessTurn
11
11
  };
12
- //# sourceMappingURL=local-turn-ZKWOMPM4.js.map
12
+ //# sourceMappingURL=local-turn-3DH4OF7C.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcpjam/inspector",
3
3
  "productName": "MCPJam Inspector",
4
- "version": "3.12.6",
4
+ "version": "3.12.7",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=22.0.0"
@@ -150,7 +150,7 @@
150
150
  "@hookform/resolvers": "^3.10.0",
151
151
  "@lezer/highlight": "^1.2.3",
152
152
  "@mcp-ui/client": "^5.9.0",
153
- "@mcpjam/sdk": "^8.20.0",
153
+ "@mcpjam/sdk": "^8.20.1",
154
154
  "@modelcontextprotocol/client": "2.0.0",
155
155
  "@modelcontextprotocol/ext-apps": "^1.7.4",
156
156
  "@novnc/novnc": "^1.7.0",