reeval 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +5 -5
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +61 -66
- package/dist/{agent-Dcnbp_qS.js → agent-BrqDHAx6.js} +5 -5
- package/dist/{agent-Dcnbp_qS.js.map → agent-BrqDHAx6.js.map} +1 -1
- package/dist/{agent-BDPZxZo6.js → agent-bHgHIPVD.js} +4 -4
- package/dist/{agent-BDPZxZo6.js.map → agent-bHgHIPVD.js.map} +1 -1
- package/dist/{analysis-1fqCRQJ5.js → analysis-BV3TCznv.js} +9 -5
- package/dist/analysis-BV3TCznv.js.map +1 -0
- package/dist/{assemble-Br5xWfoJ.js → assemble-BB_dcnfh.js} +37 -11
- package/dist/assemble-BB_dcnfh.js.map +1 -0
- package/dist/assemble-DcLLkwnB.js +2 -0
- package/dist/bridge/index.mjs +1 -1
- package/dist/capture-EvOaSXj_.js +2 -0
- package/dist/capture-tcMRp6ks.js +587 -0
- package/dist/capture-tcMRp6ks.js.map +1 -0
- package/dist/{cli-Ben0kbJt.js → cli-BM-qbqO_.js} +69 -51
- package/dist/cli-BM-qbqO_.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{command-DpR1iz_b.js → command-BT9i1I5S.js} +12 -12
- package/dist/{command-DpR1iz_b.js.map → command-BT9i1I5S.js.map} +1 -1
- package/dist/command-Bn_kbh3B.js +2 -0
- package/dist/{command-zD7IIwQF.js → command-BpoZJVeI.js} +13 -13
- package/dist/{command-zD7IIwQF.js.map → command-BpoZJVeI.js.map} +1 -1
- package/dist/{command-CmFpqrTW.js → command-DATlIXj1.js} +9 -9
- package/dist/{command-CmFpqrTW.js.map → command-DATlIXj1.js.map} +1 -1
- package/dist/{command-BZXB7JbK.js → command-DITkSzxp.js} +59 -17
- package/dist/command-DITkSzxp.js.map +1 -0
- package/dist/{commands-CkfvCaoN.js → commands-C0SFWd1T.js} +6 -6
- package/dist/{commands-CkfvCaoN.js.map → commands-C0SFWd1T.js.map} +1 -1
- package/dist/{commands-8xIhRt-7.js → commands-CDty3r_G.js} +1 -1
- package/dist/{config-kbc7kZz3.js → config-Cy_vLUbw.js} +11 -7
- package/dist/config-Cy_vLUbw.js.map +1 -0
- package/dist/db-4nMvBFNX.js +2 -0
- package/dist/{db-DYPkngEs.js → db-iskAs8Ox.js} +11 -8
- package/dist/db-iskAs8Ox.js.map +1 -0
- package/dist/{dist-D6co5uaT.js → dist-Dmm3bnKA.js} +4 -4
- package/dist/{dist-D6co5uaT.js.map → dist-Dmm3bnKA.js.map} +1 -1
- package/dist/{docker-C4H1eSjN.js → docker-B9wx9-KX.js} +8 -4
- package/dist/{docker-C4H1eSjN.js.map → docker-B9wx9-KX.js.map} +1 -1
- package/dist/{docker-BLqzfYMT.js → docker-Ctnty6xd.js} +2 -2
- package/dist/{docker-BLqzfYMT.js.map → docker-Ctnty6xd.js.map} +1 -1
- package/dist/{docker-CJkJ4-_n.js → docker-Di4o89kZ.js} +1 -1
- package/dist/{doctor-X2ba-e1Y.js → doctor-BMUVi-gC.js} +12 -12
- package/dist/{doctor-X2ba-e1Y.js.map → doctor-BMUVi-gC.js.map} +1 -1
- package/dist/duration-JsJrIWXq.js +26 -0
- package/dist/duration-JsJrIWXq.js.map +1 -0
- package/dist/{egress-CRQ7wCj8.js → egress-3bdvDu1s.js} +85 -23
- package/dist/{egress-CRQ7wCj8.js.map → egress-3bdvDu1s.js.map} +1 -1
- package/dist/{environment-D3sZUybY.js → environment-DiCljXMD.js} +4 -26
- package/dist/environment-DiCljXMD.js.map +1 -0
- package/dist/files-BM78_nnF.js +2 -0
- package/dist/{files-CO4Y4eRS.js → files-CITwkC4O.js} +2 -2
- package/dist/{files-CO4Y4eRS.js.map → files-CITwkC4O.js.map} +1 -1
- package/dist/files-C_CsTMtM.js +2 -0
- package/dist/{files-BLlrhU4-.js → files-Ca0d6Uq3.js} +2 -2
- package/dist/{files-BLlrhU4-.js.map → files-Ca0d6Uq3.js.map} +1 -1
- package/dist/{files-DiGDoSSw.js → files-DGhQZaXT.js} +7 -7
- package/dist/{files-DiGDoSSw.js.map → files-DGhQZaXT.js.map} +1 -1
- package/dist/files-vgLA9tcj.js +2 -0
- package/dist/{git-BZlPo1Rh.js → git-BzyBakoB.js} +2 -2
- package/dist/{git-BZlPo1Rh.js.map → git-BzyBakoB.js.map} +1 -1
- package/dist/harness.d.ts +1 -1
- package/dist/{header-CTTSGpy-.js → header-IE-uIvX0.js} +2 -2
- package/dist/{header-CTTSGpy-.js.map → header-IE-uIvX0.js.map} +1 -1
- package/dist/{images-CPfNRSuK.js → images-QBtOj-_q.js} +6 -6
- package/dist/{images-CPfNRSuK.js.map → images-QBtOj-_q.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -64
- package/dist/index.js.map +1 -1
- package/dist/{init-CquBKr3J.js → init-B47uIoHu.js} +5 -5
- package/dist/{init-CquBKr3J.js.map → init-B47uIoHu.js.map} +1 -1
- package/dist/init-DIAJuCs2.js +2 -0
- package/dist/{jiti-DWsGEgxD.js → jiti-BcJHCtrb.js} +2 -2
- package/dist/{jiti-DWsGEgxD.js.map → jiti-BcJHCtrb.js.map} +1 -1
- package/dist/judge.d.ts +1 -1
- package/dist/{model-BAB6ScG7.js → model-BeoRxCcJ.js} +1 -1
- package/dist/model-C_B5JrhL.js +2 -0
- package/dist/{model-CwxodD2e.js → model-Cp6NoAT3.js} +5 -3
- package/dist/model-Cp6NoAT3.js.map +1 -0
- package/dist/{model-DGafiJdy.js → model-CtrJdFi6.js} +41 -3
- package/dist/{model-DGafiJdy.js.map → model-CtrJdFi6.js.map} +1 -1
- package/dist/{node-B72WWfgg.js → node-Co7EXge0.js} +2 -2
- package/dist/{node-B72WWfgg.js.map → node-Co7EXge0.js.map} +1 -1
- package/dist/{options-BBLwgaSz.js → options-DVB78W8X.js} +45 -5
- package/dist/options-DVB78W8X.js.map +1 -0
- package/dist/{patch-CzT5wTZr.js → patch-CGCVipPu.js} +2 -2
- package/dist/{patch-CzT5wTZr.js.map → patch-CGCVipPu.js.map} +1 -1
- package/dist/{paths-CBvm6pap.js → paths-BmR-7tx3.js} +7 -3
- package/dist/{paths-CBvm6pap.js.map → paths-BmR-7tx3.js.map} +1 -1
- package/dist/{plan-4AO_VH20.js → plan-Bsge1_cc.js} +2 -2
- package/dist/{plan-4AO_VH20.js.map → plan-Bsge1_cc.js.map} +1 -1
- package/dist/{preflight-B8XgaXdX.js → preflight-B5ue4TlX.js} +1 -1
- package/dist/{preflight-Cl__EL9Y.js → preflight-BOstyJDX.js} +3 -3
- package/dist/{preflight-Cl__EL9Y.js.map → preflight-BOstyJDX.js.map} +1 -1
- package/dist/{prepare-BgzG6f6h.js → prepare-ChIEi8hP.js} +2 -2
- package/dist/{prepare-jmZNuhe5.js → prepare-jpXfdH-9.js} +6 -5
- package/dist/prepare-jpXfdH-9.js.map +1 -0
- package/dist/{provenance-rP7Unzb4.js → provenance-BTJCjEPg.js} +2 -2
- package/dist/{provenance-rP7Unzb4.js.map → provenance-BTJCjEPg.js.map} +1 -1
- package/dist/{providers-Cs0GAhfO.js → providers-BJCxWIm4.js} +3 -3
- package/dist/{providers-Cs0GAhfO.js.map → providers-BJCxWIm4.js.map} +1 -1
- package/dist/{providers-Dh6hQDI6.js → providers-DxVIaae1.js} +1 -1
- package/dist/query-BtLxk32J.js +2 -0
- package/dist/{query-BOtU7Phq.js → query-Cpe659ni.js} +2 -2
- package/dist/{query-BOtU7Phq.js.map → query-Cpe659ni.js.map} +1 -1
- package/dist/{questions-nUB6aKz_.js → questions-ZdT3JDyQ.js} +3 -3
- package/dist/{questions-nUB6aKz_.js.map → questions-ZdT3JDyQ.js.map} +1 -1
- package/dist/{results-EaWTGQtw.js → results-CiJzkjNI.js} +4 -4
- package/dist/{results-EaWTGQtw.js.map → results-CiJzkjNI.js.map} +1 -1
- package/dist/{root-Zeokqt3-.js → root-CvdRlRZX.js} +3 -3
- package/dist/{root-Zeokqt3-.js.map → root-CvdRlRZX.js.map} +1 -1
- package/dist/{sandbox-DsY0Xa_L.js → sandbox--ZXuscAZ.js} +3 -2
- package/dist/sandbox--ZXuscAZ.js.map +1 -0
- package/dist/sandbox.d.ts +1 -1
- package/dist/sandbox.js +1 -1
- package/dist/server-CN3lGbK-.js +2 -0
- package/dist/{server-DFCcG4kE.js → server-CSSXF89R.js} +9 -9
- package/dist/{server-DFCcG4kE.js.map → server-CSSXF89R.js.map} +1 -1
- package/dist/{source-ybqIFzmB.js → source-BcHShRWU.js} +2 -2
- package/dist/{source-ybqIFzmB.js.map → source-BcHShRWU.js.map} +1 -1
- package/dist/source-CxLRUqU2.js +2 -0
- package/dist/{src-DABrrexp.js → src-B3J1D0nL.js} +45 -45
- package/dist/{src-DABrrexp.js.map → src-B3J1D0nL.js.map} +1 -1
- package/dist/{src-CQXA5zkO.js → src-BRdoxjJS.js} +15 -15
- package/dist/{src-CQXA5zkO.js.map → src-BRdoxjJS.js.map} +1 -1
- package/dist/src-Ba3zMSdv.js +3 -0
- package/dist/{src-D0RdqpNb.js → src-BjVw2K4H.js} +4 -4
- package/dist/{src-D0RdqpNb.js.map → src-BjVw2K4H.js.map} +1 -1
- package/dist/src-BpVFmHqj.js +3 -0
- package/dist/src-CJONyPRm.js +3 -0
- package/dist/src-CLO4dUg7.js +3 -0
- package/dist/{src-DVWhOfrD.js → src-CdwJuMBO.js} +2 -2
- package/dist/{src-DVWhOfrD.js.map → src-CdwJuMBO.js.map} +1 -1
- package/dist/{src-OXjUr5ng.js → src-DQCjANtm.js} +1 -1
- package/dist/{src-Zqi4rheD.js → src-Dk96a9w7.js} +4 -4
- package/dist/{src-Zqi4rheD.js.map → src-Dk96a9w7.js.map} +1 -1
- package/dist/{src-BmBFlEIe.js → src-DyQJdvp2.js} +8 -6
- package/dist/{src-BmBFlEIe.js.map → src-DyQJdvp2.js.map} +1 -1
- package/dist/{src-CQzUdIZj.js → src-a6y9cGkR.js} +1 -1
- package/dist/src-yCDQ7kpQ.js +4 -0
- package/dist/state-CeYoWFWx.js +2 -0
- package/dist/{state-CWs2X2x8.js → state-evRYxV_q.js} +14 -14
- package/dist/{state-CWs2X2x8.js.map → state-evRYxV_q.js.map} +1 -1
- package/dist/studio-app/assets/{index-B1Pf3LAT.css → index-CUx6GoL5.css} +1 -1
- package/dist/studio-app/assets/{index-BYZWo5gl.js → index-WQPq5K3E.js} +9 -9
- package/dist/studio-app/index.html +2 -2
- package/dist/{summary-CxHRN1zB.js → summary-CIw18kb-.js} +6 -6
- package/dist/{summary-CxHRN1zB.js.map → summary-CIw18kb-.js.map} +1 -1
- package/dist/{summary-78yLjokt.js → summary-DTUCNA-v.js} +3 -3
- package/dist/{summary-78yLjokt.js.map → summary-DTUCNA-v.js.map} +1 -1
- package/dist/{tools-DCuVntbR.js → tools-By2WuNxm.js} +3 -3
- package/dist/{tools-DCuVntbR.js.map → tools-By2WuNxm.js.map} +1 -1
- package/dist/{types-BUWwRisO.d.ts → types-C2Gl05_c.d.ts} +101 -5
- package/dist/types-C5vI3g1C.js.map +1 -1
- package/dist/view/index.d.ts +14 -5
- package/dist/view/index.js +5 -5
- package/dist/views-BEurSpHC.js +3 -0
- package/dist/{views-CZDDDj2F.js → views-BJ0i1Iuw.js} +4 -4
- package/dist/{views-CZDDDj2F.js.map → views-BJ0i1Iuw.js.map} +1 -1
- package/dist/{worker-entry-DlriWSAs.js → worker-entry-mCctDzig.js} +2 -2
- package/dist/{worker-entry-DlriWSAs.js.map → worker-entry-mCctDzig.js.map} +1 -1
- package/dist/{workspace-oBK63kWs.js → workspace-Bl1SiRQa.js} +4 -4
- package/dist/{workspace-oBK63kWs.js.map → workspace-Bl1SiRQa.js.map} +1 -1
- package/dist/{workspace-BwKzynEj.js → workspace-CvAPfa8b.js} +1 -1
- package/package.json +4 -4
- package/dist/analysis-1fqCRQJ5.js.map +0 -1
- package/dist/assemble-Br5xWfoJ.js.map +0 -1
- package/dist/assemble-BriNtYfK.js +0 -2
- package/dist/cli-Ben0kbJt.js.map +0 -1
- package/dist/command-BZXB7JbK.js.map +0 -1
- package/dist/command-pIntI3Iq.js +0 -2
- package/dist/config-kbc7kZz3.js.map +0 -1
- package/dist/db-BgmkqBzz.js +0 -2
- package/dist/db-DYPkngEs.js.map +0 -1
- package/dist/environment-D3sZUybY.js.map +0 -1
- package/dist/files-BTF2wg0i.js +0 -2
- package/dist/files-BvHCFWgD.js +0 -2
- package/dist/files-CspMl_3t.js +0 -2
- package/dist/init-C5Kp2CVo.js +0 -2
- package/dist/model-Bip8dx2I.js +0 -2
- package/dist/model-CwxodD2e.js.map +0 -1
- package/dist/options-BBLwgaSz.js.map +0 -1
- package/dist/prepare-jmZNuhe5.js.map +0 -1
- package/dist/query-BjqPXDPV.js +0 -2
- package/dist/sandbox-DsY0Xa_L.js.map +0 -1
- package/dist/server-D62mXUew.js +0 -2
- package/dist/source-Cr87qm1N.js +0 -2
- package/dist/src-B3kHPyvg.js +0 -3
- package/dist/src-Bq2wa7fE.js +0 -3
- package/dist/src-CYBvNARj.js +0 -3
- package/dist/src-D2H8Rz6M.js +0 -4
- package/dist/src-DygwWk6l.js +0 -3
- package/dist/state-BOeZS-Wa.js +0 -2
- package/dist/views-BVu2pD9u.js +0 -3
|
@@ -47,12 +47,12 @@ Error generating stack: `+e.message+`
|
|
|
47
47
|
`},Wc=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Gc=function(){p.useEffect(function(){return document.body.setAttribute(Hc,(Wc()+1).toString()),function(){var e=Wc()-1;e<=0?document.body.removeAttribute(Hc):document.body.setAttribute(Hc,e.toString())}},[])},Kc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Gc();var a=p.useMemo(function(){return Bc(i)},[i]);return p.createElement(Vc,{styles:Uc(a,!t,i,n?``:`!important`)})},qc=!1;if(typeof window<`u`)try{var Jc=Object.defineProperty({},"passive",{get:function(){return qc=!0,!0}});window.addEventListener(`test`,Jc,Jc),window.removeEventListener(`test`,Jc,Jc)}catch{qc=!1}var Yc=qc?{passive:!1}:!1,Xc=function(e){return e.tagName===`TEXTAREA`},Zc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Xc(e)&&n[t]===`visible`)},Qc=function(e){return Zc(e,`overflowY`)},$c=function(e){return Zc(e,`overflowX`)},el=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),rl(e,r)){var i=il(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tl=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},nl=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},rl=function(e,t){return e===`v`?Qc(t):$c(t)},il=function(e,t){return e===`v`?tl(t):nl(t)},al=function(e,t){return e===`h`&&t===`rtl`?-1:1},ol=function(e,t,n,r,i){var a=al(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=il(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&rl(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},sl=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cl=function(e){return[e.deltaX,e.deltaY]},ll=function(e){return e&&`current`in e?e.current:e},ul=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dl=function(e){return`
|
|
48
48
|
.block-interactivity-${e} {pointer-events: none;}
|
|
49
49
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
50
|
-
`},fl=0,pl=[];function ml(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(fl++)[0],a=p.useState(Ic)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=fc([e.lockRef.current],(e.shards||[]).map(ll),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=sl(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=el(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=el(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ol(h,t,e,h===`h`?s:c,!0)},[]),c=p.useCallback(function(e){var n=e;if(pl.length&&pl[pl.length-1]===a){var r=`deltaY`in n?cl(n):sl(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ul(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ll).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=p.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:hl(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=p.useCallback(function(e){n.current=sl(e),r.current=void 0},[]),d=p.useCallback(function(t){l(t.type,cl(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){l(t.type,sl(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return pl.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Yc),document.addEventListener(`touchmove`,c,Yc),document.addEventListener(`touchstart`,u,Yc),function(){pl=pl.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Yc),document.removeEventListener(`touchmove`,c,Yc),document.removeEventListener(`touchstart`,u,Yc)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:dl(i)}):null,m?p.createElement(Kc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var gl=Ec(Dc,ml),_l=p.forwardRef(function(e,t){return p.createElement(kc,uc({},e,{ref:t,sideCar:gl}))});_l.classNames=kc.classNames;var vl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},yl=new WeakMap,bl=new WeakMap,xl={},Sl=0,Cl=function(e){return e&&(e.host||Cl(e.parentNode))},wl=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Cl(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Tl=function(e,t,n,r){var i=wl(t,Array.isArray(e)?e:[e]);xl[n]||(xl[n]=new WeakMap);var a=xl[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(yl.get(e)||0)+1,l=(a.get(e)||0)+1;yl.set(e,c),a.set(e,l),o.push(e),c===1&&i&&bl.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Sl++,function(){o.forEach(function(e){var t=yl.get(e)-1,i=a.get(e)-1;yl.set(e,t),a.set(e,i),t||(bl.has(e)||e.removeAttribute(r),bl.delete(e)),i||e.removeAttribute(n)}),Sl--,Sl||(yl=new WeakMap,yl=new WeakMap,bl=new WeakMap,xl={})}},El=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||vl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Tl(r,i,n,`aria-hidden`)):function(){return null}},Dl=Object.defineProperty,Ol=(e,t)=>Dl(e,`name`,{value:t,configurable:!0});function kl(e){let[t,n]=p.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Ol(kl,`useSize`);var Al=[`top`,`right`,`bottom`,`left`],jl=Math.min,Ml=Math.max,Nl=Math.round,Pl=Math.floor,Fl=e=>({x:e,y:e}),Il={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ll(e,t,n){return Ml(e,jl(t,n))}function Rl(e,t){return typeof e==`function`?e(t):e}function zl(e){return e.split(`-`)[0]}function Bl(e){return e.split(`-`)[1]}function Vl(e){return e===`x`?`y`:`x`}function Hl(e){return e===`y`?`height`:`width`}function Ul(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wl(e){return Vl(Ul(e))}function Gl(e,t,n){n===void 0&&(n=!1);let r=Bl(e),i=Wl(e),a=Hl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=eu(o)),[o,eu(o)]}function Kl(e){let t=eu(e);return[ql(e),t,ql(t)]}function ql(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jl=[`left`,`right`],Yl=[`right`,`left`],Xl=[`top`,`bottom`],Zl=[`bottom`,`top`];function Ql(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yl:Jl:t?Jl:Yl;case`left`:case`right`:return t?Xl:Zl;default:return[]}}function $l(e,t,n,r){let i=Bl(e),a=Ql(zl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ql)))),a}function eu(e){let t=zl(e);return Il[t]+e.slice(t.length)}function tu(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nu(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tu(e)}function ru(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function iu(e,t,n){let{reference:r,floating:i}=e,a=Ul(t),o=Wl(t),s=Hl(o),c=zl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function au(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rl(t,e),p=nu(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ru(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ru(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ou=50,su=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:au},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=iu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ou&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=iu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},cu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Rl(e,t)||{};if(l==null)return{};let d=nu(u),f={x:n,y:r},p=Wl(i),m=Hl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jl(d[_],T),D=jl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ll(E,k,O),j=!c.arrow&&Bl(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}}),lu=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zl(r),_=Ul(o),v=zl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[eu(o)]:Kl(o)),x=p!==`none`;!d&&x&&b.push(...$l(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ul(t)||T.every(e=>Ul(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ul(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function uu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function du(e){return Al.some(t=>e[t]>=0)}var fu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Rl(e,t);switch(i){case`referenceHidden`:{let e=uu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:du(e)}}}case`escaped`:{let e=uu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:du(e)}}}default:return{}}}}},pu=new Set([`left`,`top`]);async function mu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zl(n),s=Bl(n),c=Ul(n)===`y`,l=pu.has(o)?-1:1,u=a&&c?-1:1,d=Rl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var hu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},gu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ul(i),p=Vl(f),m=u[p],h=u[f],g=(e,t)=>Ll(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},_u=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rl(e,t),u={x:n,y:r},d=Ul(i),f=Vl(d),p=u[f],m=u[d],h=Rl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=pu.has(zl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rl(e,t),c=await i.detectOverflow(t,s),l=zl(n),u=Bl(n),d=Ul(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jl(p-c[m],g),y=jl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ml(c.left,c.right):S=p-2*Ml(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function yu(){return typeof window<`u`}function bu(e){return Cu(e)?(e.nodeName||``).toLowerCase():`#document`}function xu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Su(e){return((Cu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Cu(e){return yu()?e instanceof Node||e instanceof xu(e).Node:!1}function wu(e){return yu()?e instanceof Element||e instanceof xu(e).Element:!1}function V(e){return yu()?e instanceof HTMLElement||e instanceof xu(e).HTMLElement:!1}function Tu(e){return!yu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xu(e).ShadowRoot}function Eu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Lu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Du(e){return/^(table|td|th)$/.test(bu(e))}function Ou(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ku=/transform|translate|scale|rotate|perspective|filter/,Au=/paint|layout|strict|content/,ju=e=>!!e&&e!==`none`,Mu;function Nu(e){let t=wu(e)?Lu(e):e;return ju(t.transform)||ju(t.translate)||ju(t.scale)||ju(t.rotate)||ju(t.perspective)||!Fu()&&(ju(t.backdropFilter)||ju(t.filter))||ku.test(t.willChange||``)||Au.test(t.contain||``)}function Pu(e){let t=zu(e);for(;V(t)&&!Iu(t);){if(Nu(t))return t;if(Ou(t))return null;t=zu(t)}return null}function Fu(){return Mu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Mu}function Iu(e){return/^(html|body|#document)$/.test(bu(e))}function Lu(e){return xu(e).getComputedStyle(e)}function Ru(e){return wu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zu(e){if(bu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Tu(e)&&e.host||Su(e);return Tu(t)?t.host:t}function Bu(e){let t=zu(e);return Iu(t)?(e.ownerDocument||e).body:V(t)&&Eu(t)?t:Bu(t)}function Vu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Bu(e),i=r===e.ownerDocument?.body,a=xu(r);if(i){let e=Hu(a);return t.concat(a,a.visualViewport||[],Eu(r)?r:[],e&&n?Vu(e):[])}return t.concat(r,Vu(r,[],n))}function Hu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uu(e){let t=Lu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nl(n)!==a||Nl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Wu(e){return wu(e)?e:e.contextElement}function Gu(e){let t=Wu(e);if(!V(t))return Fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Uu(t),o=(a?Nl(n.width):n.width)/r,s=(a?Nl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ku=Fl(0);function qu(e){let t=xu(e);return!Fu()||!t.visualViewport?Ku:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ju(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xu(e)}function Yu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Wu(e),o=Fl(1);t&&(r?wu(r)&&(o=Gu(r)):o=Gu(e));let s=Ju(a,n,r)?qu(a):Fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=xu(a),t=wu(r)?xu(r):r,n=e,i=Hu(n);for(;i&&t!==n;){let e=Gu(i),t=i.getBoundingClientRect(),r=Lu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xu(i),i=Hu(n)}}return ru({width:u,height:d,x:c,y:l})}function Xu(e,t){let n=Ru(e).scrollLeft;return t?t.left+n:Yu(Su(e)).left+n}function Zu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xu(e,n),y:n.top+t.scrollTop}}function Qu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Su(r),s=t?Ou(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fl(1),u=Fl(0),d=V(r);if((d||!a)&&((bu(r)!==`body`||Eu(o))&&(c=Ru(r)),d)){let e=Yu(r);l=Gu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Zu(o,c):Fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function $u(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ed(e){let t=Ru(e),n=e.ownerDocument.body,r=Ml(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ml(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Xu(e),o=-t.scrollTop;return Lu(n).direction===`rtl`&&(a+=Ml(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var td=25;function nd(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=xu(e),a=Su(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Fu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Xu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=td&&(s-=o)}return{width:s,height:c,x:l,y:u}}function rd(e,t){let n=Yu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function H(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=nd(e,n,t);else if(t===`document`)r=ed(Su(e));else if(wu(t))r=rd(t,n);else{let n=qu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ru(r)}function id(e,t){let n=t.get(e);if(n)return n;let r=Vu(e,[],!1).filter(e=>wu(e)&&bu(e)!==`body`),i=null,a=Lu(e).position===`fixed`,o=a?zu(e):e;for(;wu(o)&&!Iu(o);){let e=Lu(o),t=Nu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=zu(o)}return t.set(e,r),r}function U(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ou(t)?[]:id(t,this._c):[].concat(n),r],o=H(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=H(t,a[e],i);s=Ml(n.top,s),c=jl(n.right,c),l=jl(n.bottom,l),u=Ml(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function W(e){let{width:t,height:n}=Uu(e);return{width:t,height:n}}function ad(e,t,n){let r=V(t),i=Su(t),a=n===`fixed`,o=Yu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fl(0);if((r||!a)&&((bu(t)!==`body`||Eu(i))&&(s=Ru(t)),r)){let e=Yu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Xu(i));let l=i&&!r&&!a?Zu(i,s):Fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function od(e){return Lu(e).position===`static`}function sd(e,t){if(!V(e)||Lu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Su(e)===n&&(n=n.ownerDocument.body),n}function cd(e,t){let n=xu(e);if(Ou(e))return n;if(!V(e)){let t=zu(e);for(;t&&!Iu(t);){if(wu(t)&&!od(t))return t;t=zu(t)}return n}let r=sd(e,t);for(;r&&Du(r)&&od(r);)r=sd(r,t);return r&&Iu(r)&&od(r)&&!Nu(r)?n:r||Pu(e)||n}var ld=async function(e){let t=this.getOffsetParent||cd,n=this.getDimensions,r=await n(e.floating);return{reference:ad(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ud(e){return Lu(e).direction===`rtl`}var dd={convertOffsetParentRelativeRectToViewportRelativeRect:Qu,getDocumentElement:Su,getClippingRect:U,getOffsetParent:cd,getElementRects:ld,getClientRects:$u,getDimensions:W,getScale:Gu,isElement:wu,isRTL:ud};function fd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pd(e,t,n){let r=null,i,a=Su(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pl(d),h=Pl(a.clientWidth-(u+f)),g=Pl(a.clientHeight-(d+p)),_=Pl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ml(0,jl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!fd(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=xu(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function md(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Wu(e),u=i||a?[...l?Vu(l):[],...t?Vu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?pd(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Yu(e):null;c&&g();function g(){let t=Yu(e);h&&!fd(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var hd=hu,gd=gu,_d=lu,vd=vu,yd=fu,bd=cu,xd=_u,Sd=(e,t,n)=>{let r=new Map,i=n??{},a={...dd,...i.platform,_c:r};return su(e,t,{...i,platform:a})},Cd=typeof document<`u`?p.useLayoutEffect:function(){};function wd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!wd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Td(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ed(e,t){let n=Td(e);return Math.round(t*n)/n}function Dd(e){let t=p.useRef(e);return Cd(()=>{t.current=e}),t}function Od(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);wd(f,r)||m(r);let[h,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=p.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=p.useRef(null),w=p.useRef(null),T=p.useRef(u),E=c!=null,D=Dd(c),O=Dd(i),k=Dd(l),A=p.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Sd(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!wd(T.current,t)&&(T.current=t,lo.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Cd(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=p.useRef(!1);Cd(()=>(j.current=!0,()=>{j.current=!1}),[]),Cd(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=p.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=p.useMemo(()=>({reference:x,floating:S}),[x,S]),te=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ed(M.floating,u.x),r=Ed(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Td(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:A,refs:ee,elements:M,floatingStyles:te}),[u,A,ee,M,te])}var kd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:bd({element:r.current,padding:i}).fn(n):r?bd({element:r,padding:i}).fn(n):{}}}},Ad=(e,t)=>{let n=hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},jd=(e,t)=>{let n=gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Md=(e,t)=>({fn:xd(e).fn,options:[e,t]}),Nd=(e,t)=>{let n=_d(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pd=(e,t)=>{let n=vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fd=(e,t)=>{let n=yd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Id=(e,t)=>{let n=kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ld=Object.defineProperty,Rd=p.forwardRef(((e,t)=>Ld(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,m.jsx)(po.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,m.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),zd=Object.defineProperty,Bd=(e,t)=>zd(e,`name`,{value:t,configurable:!0}),Vd=`Popper`,[Hd,Ud]=So(Vd),[Wd,Gd]=Hd(Vd),Kd=Bd(e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,m.jsx)(Wd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),qd=`PopperAnchor`,Jd=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Gd(qd,n),o=p.useRef(null),s=a.onAnchorChange,c=Ka(t,p.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&af(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,m.jsx)(po.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Yd=`PopperContent`,[Xd,Zd]=Hd(Yd),Qd=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Gd(Yd,n),[y,b]=p.useState(null),x=Ka(t,b),[S,C]=p.useState(null),w=kl(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(nf),altBoundary:A},{refs:ee,floatingStyles:M,placement:te,isPositioned:ne,middlewareData:N}=Od({strategy:`fixed`,placement:D,whileElementsMounted:Bd((...e)=>md(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[Ad({mainAxis:i+E,alignmentAxis:o}),c&&jd({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Md():void 0,...j}),c&&Nd({...j}),Pd({...j,apply:Bd(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Id({element:S,padding:s}),rf({arrowWidth:T,arrowHeight:E}),f&&Fd({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),re=v.setPlacementState;B(()=>(re(te),()=>{re(void 0)}),[te,re]);let[ie,ae]=af(te),oe=Cs(g);B(()=>{ne&&oe?.()},[ne,oe]);let se=N.arrow?.x,ce=N.arrow?.y,le=N.arrow?.centerOffset!==0,[ue,de]=p.useState();return B(()=>{y&&de(window.getComputedStyle(y).zIndex)},[y]),(0,m.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ne?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,m.jsx)(Xd,{scope:n,placedSide:ie,placedAlign:ae,onArrowChange:C,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,m.jsx)(po.div,{"data-side":ie,"data-align":ae,..._,ref:x,style:{..._.style,animation:ne?_.style?.animation:`none`}})})})},`PopperContent`)),$d=`PopperArrow`,ef={top:`bottom`,right:`left`,bottom:`top`,left:`right`},tf=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,...r}=e,i=Zd($d,n),a=ef[i.placedSide];return(0,m.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,m.jsx)(Rd,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function nf(e){return e!==null}Bd(nf,`isNotNull`);var rf=Bd(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=af(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function af(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Bd(af,`getSideAndAlignFromPlacement`);var of=Kd,sf=Jd,cf=Qd,lf=tf,uf=Object.defineProperty,df=(e,t)=>uf(e,`name`,{value:t,configurable:!0}),ff=!1;function pf(){let[e,t]=p.useState(ff);return p.useEffect(()=>{ff||(ff=!0,t(!0))},[]),e}df(pf,`useIsHydrated`);var mf=p.useSyncExternalStore;function hf(){return()=>{}}df(hf,`subscribe`);function gf(){return mf(hf,()=>!0,()=>!1)}df(gf,`useIsHydratedModern`);var _f=typeof mf==`function`?gf:pf,vf=Object.defineProperty,yf=(e,t)=>vf(e,`name`,{value:t,configurable:!0}),G=`rovingFocusGroup.onEntryFocus`,bf={bubbles:!1,cancelable:!0},xf=`RovingFocusGroup`,[Sf,Cf,wf]=Eo(xf),[Tf,Ef]=So(xf,[wf]),[Df,Of]=Tf(xf),kf=p.forwardRef(yf(function(e,t){return(0,m.jsx)(Sf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(Sf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(Af,{...e,ref:t})})})},`RovingFocusGroup`)),Af=p.forwardRef(yf(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=p.useRef(null),h=Ka(t,f),g=bs(a),[_,v]=Qo({prop:o,defaultProp:s??null,onChange:c,caller:xf}),[y,b]=p.useState(!1),x=Cs(l),S=Cf(n),C=p.useRef(!1),[w,T]=p.useState(0);return p.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(G,x),()=>e.removeEventListener(G,x)},[x]),(0,m.jsx)(Df,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>T(e=>e-1),[]),children:(0,m.jsx)(po.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:`none`,...e.style},onMouseDown:z(e.onMouseDown,()=>{C.current=!0}),onFocus:z(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(G,bf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);If([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:z(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),jf=`RovingFocusGroupItem`,Mf=p.forwardRef(yf(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=gs(),l=a||c,u=Of(jf,n),d=u.currentTabStopId===l,f=Cf(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=u,v=_f();return B(()=>{if(v&&r)return h(),()=>g()},[v,r,h,g]),p.useEffect(()=>{if(!v&&r)return h(),()=>g()},[v,r,h,g]),(0,m.jsx)(Sf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,m.jsx)(po.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:z(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ff(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Lf(n,r+1):n.slice(r+1)}setTimeout(()=>If(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),Nf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Pf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}yf(Pf,`getDirectionAwareKey`);function Ff(e,t,n){let r=Pf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Nf[r]}yf(Ff,`getFocusIntent`);function If(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}yf(If,`focusFirst`);function Lf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}yf(Lf,`wrapArray`);var Rf=kf,zf=Mf,Bf=Object.defineProperty,Vf=(e,t)=>Bf(e,`name`,{value:t,configurable:!0}),Hf=[`Enter`,` `],Uf=[`ArrowDown`,`PageUp`,`Home`],Wf=[`ArrowUp`,`PageDown`,`End`],Gf=[...Uf,...Wf];[...Hf],[...Hf];var Kf=`Menu`,[qf,K,Jf]=Eo(Kf),[Yf,Xf]=So(Kf,[Jf,Ud,Ef]),Zf=Ud(),Qf=Ef(),[$f,ep]=Yf(Kf),[tp,np]=Yf(Kf),rp=Vf(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Zf(t),[c,l]=p.useState(null),u=p.useRef(!1),d=Cs(a),f=bs(i);return p.useEffect(()=>{let e=Vf(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Vf(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),p.useEffect(()=>{if(!n)return;let e=Vf(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,m.jsx)(of,{...s,children:(0,m.jsx)($f,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,m.jsx)(tp,{scope:t,onClose:p.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),ip=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,...r}=e,i=Zf(n);return(0,m.jsx)(sf,{...i,...r,ref:t})},`MenuAnchor`)),ap=`MenuPortal`,[op,sp]=Yf(ap,{forceMount:void 0}),cp=Vf(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ep(ap,t);return(0,m.jsx)(op,{scope:t,forceMount:n,children:(0,m.jsx)(os,{present:n||a.open,children:(0,m.jsx)(nc,{asChild:!0,container:i,children:r})})})},`MenuPortal`),lp=`MenuContent`,[up,dp]=Yf(lp),fp=p.forwardRef(Vf(function(e,t){let n=sp(lp,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ep(lp,e.__scopeMenu),o=np(lp,e.__scopeMenu);return(0,m.jsx)(qf.Provider,{scope:e.__scopeMenu,children:(0,m.jsx)(os,{present:r||a.open,children:(0,m.jsx)(qf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,m.jsx)(pp,{...i,ref:t}):(0,m.jsx)(mp,{...i,ref:t})})})})},`MenuContent`)),pp=p.forwardRef(Vf(function(e,t){let n=ep(lp,e.__scopeMenu),r=p.useRef(null),i=Ka(t,r);return p.useEffect(()=>{let e=r.current;if(e)return El(e)},[]),(0,m.jsx)(gp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),mp=p.forwardRef(Vf(function(e,t){let n=ep(lp,e.__scopeMenu);return(0,m.jsx)(gp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),hp=Ya(`MenuContent.ScrollLock`),gp=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:g,..._}=e,v=ep(lp,n),y=np(lp,n),b=Zf(n),x=Qf(n),S=K(n),[C,w]=p.useState(null),T=p.useRef(null),E=Ka(t,T,v.onContentChange),D=p.useRef(0),O=p.useRef(``),k=p.useRef(0),A=p.useRef(null),j=p.useRef(`right`),ee=p.useRef(0),M=g?_l:p.Fragment,te=g?{as:hp,allowPinchZoom:!0}:void 0,ne=Vf(e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Rp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Vf((function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);p.useEffect(()=>()=>window.clearTimeout(D.current),[]),cc();let N=p.useCallback(e=>j.current===A.current?.side&&Bp(e,A.current?.area),[]);return(0,m.jsx)(up,{scope:n,searchRef:O,onItemEnter:p.useCallback(e=>{N(e)&&e.preventDefault()},[N]),onItemLeave:p.useCallback(e=>{N(e)||(T.current?.focus(),w(null))},[N]),onTriggerLeave:p.useCallback(e=>{N(e)&&e.preventDefault()},[N]),pointerGraceTimerRef:k,onPointerGraceIntentChange:p.useCallback(e=>{A.current=e},[]),children:(0,m.jsx)(M,{...te,children:(0,m.jsx)(Us,{asChild:!0,trapped:i,onMountAutoFocus:z(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:(0,m.jsx)(Rf,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:z(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,m.jsx)(cf,{role:`menu`,"aria-orientation":`vertical`,"data-state":Np(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:z(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ne(e.key));let i=T.current;if(e.target!==i||!Gf.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Wf.includes(e.key)&&a.reverse(),Ip(a)}),onBlur:z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:z(e.onPointerMove,Vp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;j.current=t,ee.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),_p=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,...r}=e;return(0,m.jsx)(po.div,{role:`group`,...r,ref:t})},`MenuGroup`)),vp=`MenuItem`,yp=`menu.itemSelect`,bp=p.forwardRef(Vf(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=p.useRef(null),o=np(vp,e.__scopeMenu),s=dp(vp,e.__scopeMenu),c=Ka(t,a),l=p.useRef(!1),u=Vf(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(yp,{bubbles:!0,cancelable:!0});e.addEventListener(yp,e=>r?.(e),{once:!0}),mo(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,m.jsx)(xp,{...i,ref:c,disabled:n,onClick:z(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:z(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Hf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),xp=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=dp(vp,n),s=Qf(n),c=p.useRef(null),l=Ka(t,c),[u,d]=p.useState(!1),[f,h]=p.useState(``);return p.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,m.jsx)(qf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,m.jsx)(zf,{asChild:!0,...s,focusable:!r,children:(0,m.jsx)(po.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:z(e.onPointerMove,Vp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Vp(e=>o.onItemLeave(e))),onFocus:z(e.onFocus,()=>d(!0)),onBlur:z(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Sp,Cp]=Yf(`MenuRadioGroup`,{value:void 0,onValueChange:Vf(()=>{},`onValueChange`)}),wp=p.forwardRef(Vf(function(e,t){let{value:n,onValueChange:r,...i}=e,a=Cs(r);return(0,m.jsx)(Sp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,m.jsx)(_p,{...i,ref:t})})},`MenuRadioGroup`)),Tp=`MenuRadioItem`,Ep=p.forwardRef(Vf(function(e,t){let{value:n,...r}=e,i=Cp(Tp,e.__scopeMenu),a=n===i.value;return(0,m.jsx)(Op,{scope:e.__scopeMenu,checked:a,children:(0,m.jsx)(bp,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Fp(a),onSelect:z(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),Dp=`MenuItemIndicator`,[Op,kp]=Yf(Dp,{checked:!1}),Ap=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=kp(Dp,n);return(0,m.jsx)(os,{present:r||Pp(a.checked)||a.checked===!0,children:(0,m.jsx)(po.span,{...i,ref:t,"data-state":Fp(a.checked)})})},`MenuItemIndicator`)),[jp,Mp]=Yf(`MenuSub`);function Np(e){return e?`open`:`closed`}Vf(Np,`getOpenState`);function Pp(e){return e===`indeterminate`}Vf(Pp,`isIndeterminate`);function Fp(e){return Pp(e)?`indeterminate`:e?`checked`:`unchecked`}Vf(Fp,`getCheckedState`);function Ip(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Vf(Ip,`focusFirst`);function Lp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Vf(Lp,`wrapArray`);function Rp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Lp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Vf(Rp,`getNextMatch`);function zp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Vf(zp,`isPointInPolygon`);function Bp(e,t){return t?zp({x:e.clientX,y:e.clientY},t):!1}Vf(Bp,`isPointerInGraceArea`);function Vp(e){return t=>t.pointerType===`mouse`?e(t):void 0}Vf(Vp,`whenMouse`);var Hp=rp,Up=ip,Wp=cp,Gp=fp,Kp=wp,qp=Ep,Jp=Ap,Yp=Object.defineProperty,Xp=(e,t)=>Yp(e,`name`,{value:t,configurable:!0}),Zp=`DropdownMenu`,[Qp,$p]=So(Zp,[Xf]),em=Xf(),[tm,nm]=Qp(Zp),rm=Xp(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=em(t),l=p.useRef(null),[u,d]=Qo({prop:i,defaultProp:a??!1,onChange:o,caller:Zp});return(0,m.jsx)(tm,{scope:t,triggerId:gs(),triggerRef:l,contentId:gs(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,m.jsx)(Hp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),im=`DropdownMenuTrigger`,am=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=nm(im,n),o=em(n),s=Ka(t,a.triggerRef);return(0,m.jsx)(Up,{asChild:!0,...o,children:(0,m.jsx)(po.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),om=Xp(e=>{let{__scopeDropdownMenu:t,...n}=e,r=em(t);return(0,m.jsx)(Wp,{...r,...n})},`DropdownMenuPortal`),sm=`DropdownMenuContent`,cm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=nm(sm,n),a=em(n),o=p.useRef(!1);return(0,m.jsx)(Gp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),lm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(Kp,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),um=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(qp,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),dm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(Jp,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),fm=rm,pm=am,mm=om,hm=cm,gm=lm,_m=um,vm=dm,ym=Object.defineProperty,bm=(e,t)=>ym(e,`name`,{value:t,configurable:!0});function xm(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}bm(xm,`usePrevious`);var Sm=Object.defineProperty,Cm=(e,t)=>Sm(e,`name`,{value:t,configurable:!0});function wm(e,[t,n]){return Math.min(n,Math.max(t,e))}Cm(wm,`clamp`);var Tm=Object.defineProperty,q=(e,t)=>Tm(e,`name`,{value:t,configurable:!0}),Em=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Dm=[` `,`Enter`],Om=`Select`,[km,Am,jm]=Eo(Om),[Mm,Nm]=So(Om,[jm,Ud]),Pm=Ud(),[Fm,Im]=Mm(Om),[Lm,Rm]=Mm(Om);function zm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:h,form:g,internal_do_not_use_render:_}=e,v=Pm(t),[y,b]=p.useState(null),[x,S]=p.useState(null),[C,w]=p.useState(!1),T=bs(l),[E,D]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:Om}),[O,k]=Qo({prop:o,defaultProp:s,onChange:c,caller:Om}),A=p.useRef(null),j=p.useRef(O);p.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=q(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let ee=!y||!!g||!!y.closest(`form`),[M,te]=p.useState(new Set),ne=gs(),N=Array.from(M).map(e=>e.props.value).join(`;`),re=p.useCallback(e=>{te(t=>new Set(t).add(e))},[]),ie=p.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),ae={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:ne,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:g,nativeOptions:M,nativeSelectKey:N,isFormControl:ee};return(0,m.jsx)(of,{...v,children:(0,m.jsx)(Fm,{scope:t,...ae,children:(0,m.jsx)(km.Provider,{scope:t,children:(0,m.jsx)(Lm,{scope:t,onNativeOptionAdd:re,onNativeOptionRemove:ie,children:Eh(_)?_(ae):n})})})})}q(zm,`SelectProvider`);var Bm=q(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,m.jsx)(zm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[n,e?(0,m.jsx)(Th,{__scopeSelect:t}):null]})})},`Select`),Vm=`SelectTrigger`,Hm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Pm(n),o=Im(Vm,n),s=o.disabled||r,c=Ka(t,o.onTriggerChange),l=Am(n),u=p.useRef(`touch`),[d,f,h]=Oh(e=>{let t=l().filter(e=>!e.disabled),n=kh(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=q(e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,m.jsx)(sf,{asChild:!0,...a,children:(0,m.jsx)(po.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Dh(o.value)?``:void 0,...i,ref:c,onClick:z(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:z(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:z(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Em.includes(e.key)&&(g(),e.preventDefault())})})})},`SelectTrigger`)),Um=`SelectValue`,Wm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Im(Um,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ka(t,c.onValueNodeChange);B(()=>{l(u)},[l,u]);let f=Dh(c.value);return(0,m.jsx)(po.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,m.jsx)(p.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Gm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,m.jsx)(po.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Km,qm]=Mm(`SelectPortal`,{forceMount:void 0}),Jm=q(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,m.jsx)(Km,{scope:e.__scopeSelect,forceMount:n,children:(0,m.jsx)(nc,{asChild:!0,...r})})},`SelectPortal`),Ym=`SelectContent`,Xm=p.forwardRef(q(function(e,t){let n=qm(Ym,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Im(Ym,e.__scopeSelect),[o,s]=p.useState();return B(()=>{s(new DocumentFragment)},[]),(0,m.jsx)(os,{present:r||a.open,children:({present:e})=>e?(0,m.jsx)(nh,{...i,ref:t}):(0,m.jsx)(Zm,{...i,fragment:o})})},`SelectContent`)),Zm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?lo.createPortal((0,m.jsx)($m,{scope:n,children:(0,m.jsx)(km.Slot,{scope:n,children:(0,m.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Qm=10,[$m,eh]=Mm(Ym),th=Ya(`SelectContent.RemoveScroll`),nh=p.forwardRef(q(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Im(Ym,n),[x,S]=p.useState(null),[C,w]=p.useState(null),T=Ka(t,S),[E,D]=p.useState(null),[O,k]=p.useState(null),A=Am(n),[j,ee]=p.useState(!1),M=p.useRef(!1);p.useEffect(()=>{if(x)return El(x)},[x]),cc();let te=p.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),ne=p.useCallback(()=>te([E,x]),[te,E,x]);p.useEffect(()=>{j&&ne()},[j,ne]);let{onOpenChange:N,triggerPointerDownPosRef:re}=b;p.useEffect(()=>{if(x){let e={x:0,y:0},t=q(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=q(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||N(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,N,re]),p.useEffect(()=>{let e=q(()=>N(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[N]);let[ie,ae]=Oh(e=>{let t=A().filter(e=>!e.disabled),n=kh(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),oe=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(M.current=!0))},[b.value]),se=p.useCallback(()=>x?.focus(),[x]),ce=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),le=r===`popper`?ih:rh,ue=le===ih?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,m.jsx)($m,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:oe,selectedItem:E,onItemLeave:se,itemTextRefCallback:ce,focusSelectedItem:ne,selectedItemText:O,position:r,isPositioned:j,searchRef:ie,children:(0,m.jsx)(_l,{as:th,allowPinchZoom:!0,children:(0,m.jsx)(Us,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:z(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,m.jsx)(le,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ue,onPlaced:()=>ee(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:z(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),rh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Im(Ym,n),o=eh(Ym,n),[s,c]=p.useState(null),[l,u]=p.useState(null),d=Ka(t,u),f=Am(n),h=p.useRef(!1),g=p.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=p.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Qm,d=wm(a,[Qm,Math.max(Qm,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Qm,d=wm(a,[Qm,Math.max(Qm,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Qm*2,u=_.scrollHeight,d=window.getComputedStyle(l),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=p+m+u+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Qm,D=c-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=p+m+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,p+_.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}s.style.margin=`${Qm}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,a.trigger,a.valueNode,s,l,_,v,y,a.dir,r]);B(()=>x(),[x]);let[S,C]=p.useState();B(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=p.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]);return(0,m.jsx)(ah,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:w,children:(0,m.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,m.jsx)(po.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),ih=p.forwardRef(q(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Qm,...a}=e,o=Pm(n);return(0,m.jsx)(cf,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[ah,oh]=Mm(Ym,{}),sh=`SelectViewport`,ch=p.forwardRef(q(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=eh(sh,n),o=oh(sh,n),s=Ka(t,a.onViewportChange),c=p.useRef(0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,m.jsx)(km.Slot,{scope:n,children:(0,m.jsx)(po.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:z(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Qm*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[lh,uh]=Mm(`SelectGroup`),dh=`SelectItem`,[fh,ph]=Mm(dh),mh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Im(dh,n),c=eh(dh,n),l=s.value===r,[u,d]=p.useState(a??``),[f,h]=p.useState(!1),g=Ka(t,Cs(e=>c.itemRefCallback?.(e,r,i))),_=gs(),v=p.useRef(`touch`),y=q(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,m.jsx)(fh,{scope:n,value:r,disabled:i,textId:_,isSelected:l,onItemTextChange:p.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,m.jsx)(km.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,m.jsx)(po.div,{role:`option`,"aria-labelledby":_,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:z(o.onFocus,()=>h(!0)),onBlur:z(o.onBlur,()=>h(!1)),onClick:z(o.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:z(o.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:z(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:z(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:z(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Dm.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),hh=`SelectItemText`,gh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Im(hh,n),s=eh(hh,n),c=ph(hh,n),l=Rm(hh,n),[u,d]=p.useState(null),f=Cs(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),h=Ka(t,d,c.onItemTextChange,f),g=u?.textContent,_=p.useMemo(()=>(0,m.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return B(()=>(v(_),()=>y(_)),[v,y,_]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(po.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Dh(o.value)?lo.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),_h=`SelectItemIndicator`,vh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,...r}=e;return ph(_h,n).isSelected?(0,m.jsx)(po.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),yh=`SelectScrollUpButton`,bh=p.forwardRef(q(function(e,t){let n=eh(yh,e.__scopeSelect),r=oh(yh,e.__scopeSelect),[i,a]=p.useState(!1),o=Ka(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};q(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(Ch,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),xh=`SelectScrollDownButton`,Sh=p.forwardRef(q(function(e,t){let n=eh(xh,e.__scopeSelect),r=oh(xh,e.__scopeSelect),[i,a]=p.useState(!1),o=Ka(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};q(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(Ch,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Ch=p.forwardRef(q(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=eh(`SelectScrollButton`,n),o=p.useRef(null),s=Am(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),B(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,m.jsx)(po.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:z(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:z(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:z(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),wh=`SelectBubbleInput`,Th=p.forwardRef(q(function({__scopeSelect:e,...t},n){let r=Im(wh,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,h=p.useRef(null),g=Ka(n,h),_=i??``,v=xm(_),y=Array.from(d).some(e=>(e.props.value??``)===``);return p.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,m.jsxs)(po.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{..._o,...t.style},ref:g,defaultValue:_,children:[Dh(i)&&!y?(0,m.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function Eh(e){return typeof e==`function`}q(Eh,`isFunction`);function Dh(e){return e===``||e===void 0}q(Dh,`shouldShowPlaceholder`);function Oh(e){let t=Cs(e),n=p.useRef(``),r=p.useRef(0),i=p.useCallback(e=>{let i=n.current+e;t(i),q((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=p.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}q(Oh,`useTypeaheadSearch`);function kh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ah(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}q(kh,`findNextItem`);function Ah(e,t){return e.map((n,r)=>e[(t+r)%e.length])}q(Ah,`wrapArray`);var jh=Object.defineProperty,Mh=(e,t)=>jh(e,`name`,{value:t,configurable:!0}),Nh=`Tabs`,[Ph,Fh]=So(Nh,[Ef]),Ih=Ef(),[Lh,Rh]=Ph(Nh),zh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=bs(s),[d,f]=Qo({prop:r,onChange:i,defaultProp:a??``,caller:Nh});return(0,m.jsx)(Lh,{scope:n,baseId:gs(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,m.jsx)(po.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Bh=`TabsList`,Vh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Rh(Bh,n),o=Ih(n);return(0,m.jsx)(Rf,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,m.jsx)(po.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Hh=`TabsTrigger`,Uh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Rh(Hh,n),s=Ih(n),c=Kh(o.baseId,r),l=qh(o.baseId,r),u=r===o.value;return(0,m.jsx)(zf,{asChild:!0,...s,focusable:!i,active:u,children:(0,m.jsx)(po.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:z(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:z(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:z(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),Wh=`TabsContent`,Gh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Rh(Wh,n),c=Kh(s.baseId,r),l=qh(s.baseId,r),u=r===s.value,d=p.useRef(u);return p.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(os,{present:i||u,children:({present:n})=>(0,m.jsx)(po.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Kh(e,t){return`${e}-trigger-${t}`}Mh(Kh,`makeTriggerId`);function qh(e,t){return`${e}-content-${t}`}Mh(qh,`makeContentId`);var Jh=zh,Yh=Vh,Xh=Uh,Zh=Gh,Qh=Object.defineProperty,$h=(e,t)=>Qh(e,`name`,{value:t,configurable:!0}),[eg,tg]=So(`Tooltip`,[Ud]),ng=Ud(),rg=`TooltipProvider`,ig=700,ag=`tooltip.open`,[og,sg]=eg(rg),cg=$h(e=>{let{__scopeTooltip:t,delayDuration:n=ig,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=p.useRef(!0),s=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,m.jsx)(og,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),lg=`Tooltip`,[ug,dg]=eg(lg),fg=$h(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=sg(lg,e.__scopeTooltip),l=ng(t),[u,d]=p.useState(null),[f,h]=p.useState(void 0),g=gs(),_=p.useRef(0),v=o??c.disableHoverableContent,y=s??c.delayDuration,b=p.useRef(!1),[x,S]=Qo({prop:r,defaultProp:i??!1,onChange:$h(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(ag))):c.onClose(),a?.(e)},`onChange`),caller:lg}),C=p.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=p.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=p.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=p.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);p.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=f??g;return(0,m.jsx)(of,{...l,children:(0,m.jsx)(ug,{scope:t,contentId:D,setContentId:h,open:x,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:p.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),pg=`TooltipTrigger`,mg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,...r}=e,i=dg(pg,n),a=sg(pg,n),o=ng(n),s=Ka(t,p.useRef(null),i.onTriggerChange),c=p.useRef(!1),l=p.useRef(!1),u=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,m.jsx)(sf,{asChild:!0,...o,children:(0,m.jsx)(po.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:z(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:z(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:z(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:z(e.onBlur,i.onClose),onClick:z(e.onClick,i.onClose)})})},`TooltipTrigger`)),hg=`TooltipPortal`,[gg,_g]=eg(hg,{forceMount:void 0}),vg=$h(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=dg(hg,t);return(0,m.jsx)(gg,{scope:t,forceMount:n,children:(0,m.jsx)(os,{present:n||a.open,children:(0,m.jsx)(nc,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),yg=`TooltipContent`,bg=p.forwardRef($h(function(e,t){let n=_g(yg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=dg(yg,e.__scopeTooltip);return(0,m.jsx)(os,{present:r||o.open,children:o.disableHoverableContent?(0,m.jsx)(Cg,{side:i,...a,ref:t}):(0,m.jsx)(xg,{side:i,...a,ref:t})})},`TooltipContent`)),xg=p.forwardRef($h(function(e,t){let n=dg(yg,e.__scopeTooltip),r=sg(yg,e.__scopeTooltip),i=p.useRef(null),a=Ka(t,i),[o,s]=p.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Eg(r,Tg(r,n.getBoundingClientRect())),a=Dg(t.getBoundingClientRect()),o=kg([...i,...a]);s(o),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(c&&u){let e=$h(e=>h(e,u),`handleTriggerLeave`),t=$h(e=>h(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,h,f]),p.useEffect(()=>{if(o){let e=$h(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Og(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,m.jsx)(Cg,{...e,ref:a})},`TooltipContentHoverable`)),Sg=Qa(`TooltipContent`),Cg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=dg(yg,n),u=ng(n),{onClose:d}=l;p.useEffect(()=>(document.addEventListener(ag,d),()=>document.removeEventListener(ag,d)),[d]),p.useEffect(()=>{if(l.trigger){let e=$h(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return B(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,m.jsxs)(cf,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,m.jsx)(Sg,{children:r}),i?(0,m.jsx)(vo,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),wg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,...r}=e,i=ng(n);return(0,m.jsx)(lf,{...i,...r,ref:t})},`TooltipArrow`));function Tg(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}$h(Tg,`getExitSideFromRect`);function Eg(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}$h(Eg,`getPaddedExitPoints`);function Dg(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}$h(Dg,`getPointsFromRect`);function Og(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}$h(Og,`isPointInPolygon`);function kg(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Ag(t)}$h(kg,`getHull`);function Ag(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}$h(Ag,`getHullPresorted`);var jg=cg,Mg=fg,Ng=mg,Pg=vg,Fg=bg,Ig=wg,Lg=Va();function Rg(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rg(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function zg(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rg(e))&&(r&&(r+=` `),r+=t);return r}var Bg=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vg=(e,t)=>({classGroupId:e,validator:t}),Hg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ug=`-`,Wg=[],Gg=`arbitrary..`,Kg=e=>{let t=Yg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Jg(e);let n=e.split(Ug);return qg(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Bg(i,t):t:i||Wg}return n[e]||Wg}}},qg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=qg(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ug):e.slice(t).join(Ug),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Jg=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Gg+r:void 0})(),Yg=e=>{let{theme:t,classGroups:n}=e;return Xg(n,t)},Xg=(e,t)=>{let n=Hg();for(let r in e){let i=e[r];Zg(i,n,r,t)}return n},Zg=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Qg(i,t,n,r)}},Qg=(e,t,n,r)=>{if(typeof e==`string`){$g(e,t,n);return}if(typeof e==`function`){e_(e,t,n,r);return}t_(e,t,n,r)},$g=(e,t,n)=>{let r=e===``?t:n_(t,e);r.classGroupId=n},e_=(e,t,n,r)=>{if(r_(e)){Zg(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vg(n,e))},t_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Zg(o,n_(t,a),n,r)}},n_=(e,t)=>{let n=e,r=t.split(Ug),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Hg(),n.nextPart.set(t,i)),n=i}return n},r_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,i_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},a_=`!`,o_=`:`,s_=[],c_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),l_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===o_){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(a_)?(c=s.slice(0,-1),l=!0):s.startsWith(a_)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return c_(t,l,c,u)};if(t){let e=t+o_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):c_(s_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},u_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},d_=e=>({cache:i_(e.cacheSize),parseClassName:l_(e),sortModifiers:u_(e),postfixLookupClassGroupIds:f_(e),...Kg(e)}),f_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},p_=/\s+/,m_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(p_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+a_:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},h_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=g_(n))&&(i&&(i+=` `),i+=r);return i},g_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=g_(e[r]))&&(n&&(n+=` `),n+=t);return n},__=(e,...t)=>{let n,r,i,a,o=o=>(n=d_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=m_(e,n);return i(e,a),a};return a=o,(...e)=>a(h_(...e))},v_=[],y_=e=>{let t=t=>t[e]||v_;return t.isThemeGetter=!0,t.themeKey=e,t},b_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,x_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,S_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,C_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,T_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,E_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,O_=e=>S_.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),k_=e=>!!e&&Number.isInteger(Number(e)),A_=e=>e.endsWith(`%`)&&J(e.slice(0,-1)),j_=e=>C_.test(e),M_=()=>!0,N_=e=>w_.test(e)&&!T_.test(e),P_=()=>!1,F_=e=>E_.test(e),I_=e=>D_.test(e),L_=e=>!Y(e)&&!X(e),R_=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),z_=e=>ev(e,iv,P_),Y=e=>b_.test(e),B_=e=>ev(e,av,N_),V_=e=>ev(e,ov,J),H_=e=>ev(e,cv,M_),U_=e=>ev(e,sv,P_),W_=e=>ev(e,nv,P_),G_=e=>ev(e,rv,I_),K_=e=>ev(e,lv,F_),X=e=>x_.test(e),q_=e=>tv(e,av),J_=e=>tv(e,sv),Y_=e=>tv(e,nv),X_=e=>tv(e,iv),Z_=e=>tv(e,rv),Q_=e=>tv(e,lv,!0),$_=e=>tv(e,cv,!0),ev=(e,t,n)=>{let r=b_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tv=(e,t,n=!1)=>{let r=x_.exec(e);return r?r[1]?t(r[1]):n:!1},nv=e=>e===`position`||e===`percentage`,rv=e=>e===`image`||e===`url`,iv=e=>e===`length`||e===`size`||e===`bg-size`,av=e=>e===`length`,ov=e=>e===`number`,sv=e=>e===`family-name`,cv=e=>e===`number`||e===`weight`,lv=e=>e===`shadow`,uv=__(()=>{let e=y_(`color`),t=y_(`font`),n=y_(`text`),r=y_(`font-weight`),i=y_(`tracking`),a=y_(`leading`),o=y_(`breakpoint`),s=y_(`container`),c=y_(`spacing`),l=y_(`radius`),u=y_(`shadow`),d=y_(`inset-shadow`),f=y_(`text-shadow`),p=y_(`drop-shadow`),m=y_(`blur`),h=y_(`perspective`),g=y_(`aspect`),_=y_(`ease`),v=y_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),X,Y],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,Y,c],T=()=>[O_,`full`,`auto`,...w()],E=()=>[k_,`none`,`subgrid`,X,Y],D=()=>[`auto`,{span:[`full`,k_,X,Y]},k_,X,Y],O=()=>[k_,`auto`,X,Y],k=()=>[`auto`,`min`,`max`,`fr`,X,Y],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ee=()=>[`auto`,...w()],M=()=>[O_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[s,O_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ne=()=>[O_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,X,Y],re=()=>[...b(),Y_,W_,{position:[X,Y]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,X_,z_,{size:[X,Y]}],oe=()=>[A_,q_,B_],se=()=>[``,`none`,`full`,l,X,Y],ce=()=>[``,J,q_,B_],le=()=>[`solid`,`dashed`,`dotted`,`double`],ue=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],de=()=>[J,A_,Y_,W_],fe=()=>[``,`none`,m,X,Y],pe=()=>[`none`,J,X,Y],me=()=>[`none`,J,X,Y],P=()=>[J,X,Y],F=()=>[O_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[j_],breakpoint:[j_],color:[M_],container:[j_],"drop-shadow":[j_],ease:[`in`,`out`,`in-out`],font:[L_],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[j_],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[j_],shadow:[j_],spacing:[`px`,J],text:[j_],"text-shadow":[j_],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,O_,Y,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,Y]}],"container-named":[R_],columns:[{columns:[J,`auto`,Y,X,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[k_,`auto`,X,Y]}],basis:[{basis:[O_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[J,O_,`auto`,`initial`,`none`,Y]}],grow:[{grow:[``,J,X,Y]}],shrink:[{shrink:[``,J,X,Y]}],order:[{order:[k_,`first`,`last`,`none`,X,Y]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mbs:[{mbs:ee()}],mbe:[{mbe:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...ne()]}],"min-block-size":[{"min-block":[`auto`,...ne()]}],"max-block-size":[{"max-block":[`none`,...ne()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...M()]}],"font-size":[{text:[`base`,n,q_,B_]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$_,H_]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,A_,Y]}],"font-family":[{font:[J_,U_,t]}],"font-features":[{"font-features":[Y]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,Y]}],"line-clamp":[{"line-clamp":[J,`none`,X,V_]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,X,Y]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,Y]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...le(),`wavy`]}],"text-decoration-thickness":[{decoration:[J,`from-font`,`auto`,X,B_]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[J,`auto`,X,Y]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[k_,X,Y]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,Y]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,Y]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},k_,X,Y],radial:[``,X,Y],conic:[``,k_,X,Y]},Z_,G_]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...le(),`hidden`,`none`]}],"divide-style":[{divide:[...le(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...le(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[J,X,Y]}],"outline-w":[{outline:[``,J,q_,B_]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`inner`,`none`,u,Q_,K_]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Q_,K_]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:ce()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[J,B_]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Q_,K_]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[J,X,Y]}],"mix-blend":[{"mix-blend":[...ue(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,Y]}],filter:[{filter:[``,`none`,X,Y]}],blur:[{blur:fe()}],brightness:[{brightness:[J,X,Y]}],contrast:[{contrast:[J,X,Y]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Q_,K_]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,J,X,Y]}],"hue-rotate":[{"hue-rotate":[J,X,Y]}],invert:[{invert:[``,J,X,Y]}],saturate:[{saturate:[J,X,Y]}],sepia:[{sepia:[``,J,X,Y]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,Y]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[J,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[J,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,J,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,X,Y]}],"backdrop-invert":[{"backdrop-invert":[``,J,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[J,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[J,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":[``,J,X,Y]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,Y]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[J,`initial`,X,Y]}],ease:[{ease:[`linear`,`initial`,_,X,Y]}],delay:[{delay:[J,X,Y]}],animate:[{animate:[`none`,v,X,Y]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,Y]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":[`scale-3d`],skew:[{skew:P()}],"skew-x":[{"skew-x":P()}],"skew-y":[{"skew-y":P()}],transform:[{transform:[X,Y,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":[`translate-none`],zoom:[{zoom:[k_,X,Y]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,Y]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,Y]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[J,q_,B_,V_]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Z(...e){return uv(zg(e))}function dv({delayDuration:e=0,...t}){return(0,m.jsx)(jg,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function fv({...e}){return(0,m.jsx)(Mg,{"data-slot":`tooltip`,...e})}function pv({...e}){return(0,m.jsx)(Ng,{"data-slot":`tooltip-trigger`,...e})}function mv({className:e,sideOffset:t=0,children:n,...r}){return(0,m.jsx)(Pg,{children:(0,m.jsxs)(Fg,{"data-slot":`tooltip-content`,sideOffset:t,className:Z(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,m.jsx)(Ig,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var hv=e=>`data/analysis/${e}.json`,gv=e=>e.promptVersion!==`analysis-v3`||e.inputs.digestVersion!==2,_v=[{field:`imageIds`,label:`image ids`,outside:!1},{field:`agentClis`,label:`agent CLI`,outside:!1},{field:`harnesses`,label:`harnesses`,outside:!1},{field:`environments`,label:`environments`,outside:!1},{field:`judgeModel`,label:`judge model`,outside:!1},{field:`threshold`,label:`judge threshold`,outside:!1},{field:`judgeServed`,label:`judge model served`,outside:!0},{field:`judgeVersion`,label:`judge version`,outside:!1},{field:`fingerprintScope`,label:`fingerprint scope`,outside:!0}],vv=e=>Array.isArray(e)?e.join(`, `)||`none`:e===null?`none`:String(e).replace(/^sha256:/,``).slice(0,24),yv={imageIds:e=>e.fingerprintParts.image,agentClis:e=>e.fingerprintParts.agentCli,harnesses:e=>e.harness,environments:e=>`${e.environment}@${(e.environmentDigest??``).replace(/^sha256:/,``).slice(0,12)}`};function bv(e,t){if(![e,t].every(e=>e.evals?.every(e=>Array.isArray(e.cells)))||!e.evals||!t.evals)return null;let n=new Map(e.evals.map(e=>[e.id,new Map(e.cells.map(e=>[e.key,e]))]));return t.evals.flatMap(e=>e.cells.flatMap(t=>{let r=n.get(e.id)?.get(t.key);return r?[[r,t]]:[]}))}function xv(e,t){let n=bv(e,t),r=[];for(let{field:i,label:a,outside:o}of _v){let s=yv[i],c=s&&n?n.filter(([e,t])=>s(e)!==s(t)):[],l=e=>[...new Set(c.flatMap(t=>s?.(t[e])??[]))].sort(),u=s&&n?l(0):e.stack[i],d=s&&n?l(1):t.stack[i];(i!==`judgeServed`||u.length&&d.length)&&JSON.stringify(u)!==JSON.stringify(d)&&r.push({field:i,label:a,base:vv(u),head:vv(d),outsideFingerprint:o})}return r}function Sv(e,t,n){let r=!1;for(let i of n){let n=`${t}\0${i.key}`,a=e.get(n);a!==void 0&&a!==i.fingerprint&&(r=!0),e.set(n,i.fingerprint)}return r}function Cv(e,t){let n=new Map(e.map(e=>[e.path,e.sha256])),r=new Map(t.map(e=>[e.path,e.sha256]));return[...new Set([...n.keys(),...r.keys()])].sort().flatMap(e=>n.has(e)?r.has(e)?n.get(e)===r.get(e)?[]:[`${e} changed`]:[`${e} removed`]:[`${e} added`])}var wv={harness:`harness config`,environment:`environment`,image:`image`,agentCli:`agent CLI`,judge:`judge`,context:`agent context`};function Tv(e,t){let n=Cv(e.sources,t.sources),r=[...new Set([...e.cells,...t.cells].map(e=>e.key))],i=new Set;for(let a of r){let r=e.cells.find(e=>e.key===a),o=t.cells.find(e=>e.key===a);if(!r||!o){n.push(`cell ${a} ${r?`removed`:`added`}`);continue}for(let e of Object.keys(wv))r.fingerprintParts[e]!==o.fingerprintParts[e]&&i.add(wv[e])}return[...n,...[...i].map(e=>`${e} changed`)]}function Ev(e){let t=e.map(e=>e.gate===`none`&&e.outcome===`fail`?`pass`:e.outcome);return t.includes(`fail`)?`fail`:t.includes(`infra_error`)?`infra_error`:t.every(e=>e===`skipped`)?`skipped`:`pass`}function Dv(e,t){let n=new Map(e.cells.map(e=>[e.key,e])),r=t.cells.filter(e=>n.has(e.key));if(!r.length||r.some(e=>n.get(e.key)?.fingerprint!==e.fingerprint))return null;let i=new Set(t.cells.map(e=>e.key));return{base:Ev(r.map(e=>n.get(e.key)??e)),head:Ev(r),cells:{added:t.cells.filter(e=>!n.has(e.key)).map(e=>e.key),removed:e.cells.filter(e=>!i.has(e.key)).map(e=>e.key)}}}function Ov(e,t){let n=e=>({...e.lift?{lift:e.lift}:{},effort:e.effort??null,pass:e.pass,fail:e.fail});return(t.cells??[]).flatMap(t=>{let r=e.cells?.find(e=>e.key===t.key);return!r||!(r.lift||t.lift||r.effort&&t.effort)?[]:[{key:t.key,base:n(r),head:n(t)}]})}function kv(e,t){let n=xv(e,t).some(e=>e.outsideFingerprint);return[...new Set([...t.evals.map(e=>e.id),...e.evals.map(e=>e.id)])].map(r=>{let i=e.evals.find(e=>e.id===r),a=t.evals.find(e=>e.id===r);if(!i)return{id:r,base:null,head:a?.outcome??null,status:`added`};if(!a)return{id:r,base:i.outcome,head:null,status:`removed`};let o=i.fingerprint===a.fingerprint?null:Dv(i,a),s=o?{id:r,...o}:{id:r,base:i.outcome,head:a.outcome},c=Ov(i,a);return c.length&&(s.perCell=c),s.base===`infra_error`||s.head===`infra_error`?{...s,status:`infra`}:i.fingerprint!==a.fingerprint&&!o?{...s,status:`drift`,changes:Tv(i,a)}:n&&s.base!==s.head?{...s,status:`drift`}:s.base===`pass`&&s.head===`fail`?{...s,status:`regressed`}:s.base===`fail`&&s.head===`pass`?{...s,status:`fixed`}:{...s,status:`same`}})}var Av=[`plan`,`image`,`container`,`env`,`broker`,`harness`,`check`,`judge`,`gateway`,`teardown`,`docker`],jv=(e,t)=>`api/debug/${e}?attempt=${encodeURIComponent(t)}`,Mv=(e,t)=>`api/debug/${e}/trace?attempt=${encodeURIComponent(t)}`;Math.max(...Av.map(e=>e.length));function Nv(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var Pv=1.959964;function Fv(e,t){if(t===0)return{low:0,high:1};let n=e/t,r=Pv*Pv,i=1+r/t,a=(n+r/(2*t))/i,o=Pv*Math.sqrt(n*(1-n)/t+r/(4*t*t))/i;return{low:Math.max(0,a-o),high:Math.min(1,a+o)}}function Iv(e,t){let n=e.n?e.pass/e.n:0,r=t.n?t.pass/t.n:0,i=Fv(e.pass,e.n),a=Fv(t.pass,t.n),o=n-r;return{points:o,low:o-Math.sqrt((n-i.low)**2+(a.high-r)**2),high:o+Math.sqrt((i.high-n)**2+(r-a.low)**2)}}var Lv=e=>Math.round(e*1e3)/1e3;function Rv(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t),r=(n.length-1)*t,i=Math.floor(r),a=Math.ceil(r),o=n[i];return o+(n[a]-o)*(r-i)}var zv=e=>Rv(e,.5),Bv=2e5,Vv=(e,t)=>{let n=1;for(let r=1;r<=t;r++)n=n*(e-t+r)/r;return Math.round(n)};function Hv(e,t){let n=e.length,r=t.length;if(n===0||r===0)return null;let i=[...e,...t].map((e,t)=>({v:e,i:t})).sort((e,t)=>e.v-t.v),a=Array(i.length);for(let e=0;e<i.length;){let t=e;for(;t+1<i.length&&i[t+1]?.v===i[e]?.v;)t++;for(let n=e;n<=t;n++)a[i[n]?.i]=(e+t)/2+1;e=t+1}let o=n+r,s=n*(o+1)/2,c=Math.abs(a.slice(0,n).reduce((e,t)=>e+t,0)-s);if(Vv(o,n)>Bv){let e=new Map;for(let{v:t}of i)e.set(t,(e.get(t)??0)+1);let t=[...e.values()].reduce((e,t)=>e+t**3-t,0),a=n*r/12*(o+1-t/(o*(o-1)));if(a<=0)return 1;let s=Math.max(0,c-.5)/Math.sqrt(a);return Math.min(1,2*(1-Wv(s)))}let l=0,u=0,d=(e,t,n)=>{if(t===0){u++,Math.abs(n-s)>=c-1e-9&&l++;return}for(let r=e;r<=o-t;r++)d(r+1,t-1,n+a[r])};return d(0,n,0),l/u}var Uv=(e,t)=>e===0||t===0?1:Math.min(1,2/Vv(e+t,e));function Wv(e){let t=1/(1+.3275911*Math.abs(e)/Math.SQRT2),n=1-t*(.254829592+t*(-.284496736+t*(1.421413741+t*(-1.453152027+t*1.061405429))))*Math.exp(-(e*e)/2);return e>=0?(1+n)/2:(1-n)/2}var Gv=e=>({tools:e.activity.tools,agentMs:e.timings.agentMs,fileEdits:e.activity.fileEdits}),Kv=e=>e.outcome===`pass`||e.outcome===`fail`,qv=e=>({median:zv(e)??0,q1:Rv(e,.25)??0,q3:Rv(e,.75)??0});function Jv(e){return e.length===0?null:{n:e.length,tools:qv(e.map(e=>e.tools)),agentMs:qv(e.map(e=>e.agentMs)),fileEdits:zv(e.map(e=>e.fileEdits))??0}}function Yv(e,t){let n=Hv(e,t);return Uv(e.length,t.length)>=.05?{p:n,verdict:`insufficient`}:n===null||n>=.05?{p:n,verdict:`noise`}:{p:n,verdict:(zv(e)??0)<(zv(t)??0)?`fewer`:`more`}}var Xv=(e,t)=>t===0?null:e/t;function Zv(e,t){let n=Jv(e),r=Jv(t);if(!n||!r)return null;let i=Yv(e.map(e=>e.tools),t.map(e=>e.tools)),a=Yv(e.map(e=>e.agentMs),t.map(e=>e.agentMs)),o=e.map(e=>e.tools),s=t.map(e=>e.tools);return{variant:n,control:r,toolsRatio:Xv(n.tools.median,r.tools.median),agentMsRatio:Xv(n.agentMs.median,r.agentMs.median),agentMsDelta:n.agentMs.median-r.agentMs.median,toolsP:i.p,agentMsP:a.p,separated:Math.max(...o)<Math.min(...s)||Math.min(...o)>Math.max(...s),verdict:i.verdict,timeVerdict:a.verdict}}var Qv=(e,t)=>e.attempts.filter(e=>e.cell===t&&Kv(e)).map(Gv),$v=(e,t)=>Jv(Qv(e,t));function ey(e,t){let n=e.cells.find(e=>e.key===t);return n?.lift?Zv(Qv(e,t),Qv(e,n.lift.vs)):null}var ty=e=>Number.isInteger(e)?String(e):e.toFixed(1),ny=e=>e===null?`×–`:`×${e.toFixed(2)}`;function ry(e){if(e<9950)return e<50?`0s`:`${(e/1e3).toFixed(1)}s`;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,`0`)}s`}var iy={fewer:e=>`fewer ${e}`,more:e=>`more ${e}`,noise:()=>`within noise`,insufficient:()=>`too few attempts to test`},ay=e=>`tools ${ty(e.tools.median)} · agent ${ry(e.agentMs.median)}`;function oy(e,t){let n=Xv(t.tools.median,e.tools.median),r=Xv(t.agentMs.median,e.agentMs.median);return`tools ${ty(e.tools.median)} → ${ty(t.tools.median)} (${ny(n)}) · agent ${ry(e.agentMs.median)} → ${ry(t.agentMs.median)} (${ny(r)})`}function sy(e,t){if(e.length<=t)return e;let n=e.slice(0,t-1),r=n.search(/\s\S*$/);return`${(r>t/2?n.slice(0,r):n).trimEnd()}…`}function cy(e,t){return!e||!t?e??t:{input:e.input+t.input,output:e.output+t.output,cacheRead:e.cacheRead+t.cacheRead,cacheWrite:e.cacheWrite+t.cacheWrite,reasoning:e.reasoning===null&&t.reasoning===null?null:(e.reasoning??0)+(t.reasoning??0)}}var ly=e=>{let t=null;for(let n of e)t=cy(t,n??null);return t},uy=e=>e.input+e.cacheRead+e.cacheWrite,dy=2,fy=e=>e.outcome===`pass`||e.outcome===`fail`;function py(e){return sy(e.replace(/\?+$/,``).trim(),20)}function my(e,t){let n=new Map;for(let r of e.attempts)if(r.cell===t&&fy(r))for(let e of r.judgements){let t=n.get(e.key)??{label:py(e.question),question:e.question,pass:0,counted:0};t.counted++,e.verdict===`pass`&&t.pass++,n.set(e.key,t)}return n}function hy(e,t){let n=e.cells.find(e=>e.key===t);if(n?.role===`variant`)return e.cells.find(e=>e.role===`control`&&e.harness===n.harness&&e.sandbox===n.sandbox)}function gy(e,t){if(!t||e.counted<2||t.counted<2)return null;let{points:n,low:r,high:i}=Iv({pass:e.pass,n:e.counted},{pass:t.pass,n:t.counted});return{points:Lv(n),control:{pass:t.pass,counted:t.counted},variant:{pass:e.pass,counted:e.counted},withinNoise:r<0&&i>0}}function _y(e,t){let n=my(e,t),r=hy(e,t),i=r?my(e,r.key):void 0;return[...n].map(([e,t])=>({key:e,...t,lift:gy(t,i?.get(e))}))}function vy(e){let t=e.map(e=>({verdict:e.verdict,score:e.score,threshold:e.threshold,label:py(e.question),key:e.key}));return t.length<=dy?{shown:t,extra:0}:{shown:[t.reduce((e,t)=>e.score<=t.score?e:t)],extra:t.length}}function yy(e,t){return ly(e.attempts.filter(e=>e.cell===t&&fy(e)).map(e=>e.usage))}var by={"run-record":[{path:`plan.sandboxWarnings`,empty:()=>[]},{path:`stack.harnesses[].resolvedModels`,empty:()=>[]},{path:`evals[].todo`,empty:()=>!1}],"transcript-line":[],analysis:[],"analysis-note":[],"debug-request":[],"live-progress":[],"cli-invocation":[]},xy={},Sy={"run-record":1,analysis:1,"analysis-note":1},Cy=class extends Error{name=`NewerSchemaError`;reason;constructor(e,t,n){let r=`written by a newer reeval (schemaVersion ${t}; this reeval reads up to ${n}). Upgrade reeval to read it.`;super(`${e} was ${r}`),this.reason=r}},wy=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Ty(e,t,n){if(!wy(e))return;let[r=``,...i]=t,a=/^<(\w+)=(.+)>$/.exec(r);if(a){String(e[a[1]])===a[2]&&Ty(e,i,n);return}let[,o=r,s]=/^(.+?)(\[\]|\{\})?$/.exec(r)??[];if(!i.length&&!s){e[o]===void 0&&(e[o]=n());return}let c=e[o],l=s===`[]`?Array.isArray(c)?c:[]:s===`{}`?wy(c)?Object.values(c):[]:[c];for(let e of l)Ty(e,i,n)}function Ey(e,t){for(let n of by[e])Ty(t,n.path.split(`.`),n.empty);return t}function Dy(e,t,n){let r=Sy[e],i=t.schemaVersion;if(typeof i!=`number`)return t;if(i>r)throw new Cy(n,i,r);let a=t;for(;i<r;i++){let t=xy[e]?.[i];if(!t)break;a=t(a)}return a}function Oy(e,t=`Run ${e.runId}`){return Ey(`run-record`,Dy(`run-record`,e,t))}var ky=e=>Ey(`transcript-line`,e),Ay=`api/live`,jy=(e,t)=>`api/live/${e}/transcript?attempt=${encodeURIComponent(t)}`,My=[`pass`,`fail`,`infra_error`,`skipped`],Ny=e=>My.includes(e);[...My];var Py=`studio.json`,Fy=`data/index/manifest.json`,Iy=e=>`data/index/${e}.json`,Ly=e=>`data/runs/${e}.json`,Ry=(e,t)=>`data/runs/${e}/${t}`;function zy(e){let[t=e,...n]=e.split(` › `);return{file:t,path:n.length?n:[t]}}function By(e){if(e==null)return`–`;if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(+(e<1e4))}s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return t<60?n?`${t}m ${n}s`:`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}var Vy=e=>e===null?`–`:`${Math.round(e*100)}%`;function Hy(e){let t=[...e.model?[`model ${e.model}`]:[],...e.resolvedModels.length?[`served ${e.resolvedModels.join(`, `)}`]:[]];return t.length?`${e.id} (${t.join(`, `)})`:e.id}function Uy(e){let t=e.runtime??{name:`node`,version:e.node};return t.name===`node`?`node ${t.version}`:`${t.name} ${t.version} (node ${e.node})`}function Wy(e){let t=e.language;return t?`${t.version?`${t.name} ${t.version}`:t.name} evals`:null}function Gy(e){if(!e)return null;let t=e=>e>=1e4?`${Math.round(e/1e3)}k`:String(e),n=e.cacheRead?` (${t(e.cacheRead)} cached)`:``;return`${t(uy(e))} in${n} · ${t(e.output)} out`}var Ky=e=>e?e.slice(0,7):`no git`;function qy(e){let t=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return`${t(e.tools,`tool call`)} · ${t(e.fileEdits,`file edit`)}`}function Jy(e){if(e.status===`interrupted`)return`skipped`;let t=e.evals.map(e=>e.outcome);return t.includes(`fail`)||e.status===`budget`?`fail`:t.includes(`infra_error`)?`infra_error`:`pass`}function Yy(e){let t=[...e].sort((e,t)=>e.runId<t.runId?-1:1),n=new Map,r=new Map,i=null,a=[];for(let e of t){let{pass:t,fail:o,infraError:s}=e.summary,c=i&&{stack:i.stack,evals:[...r].map(([e,t])=>({id:e,cells:[...t.values()]}))},l=0;for(let t of e.evals){Sv(n,t.id,t.cells)&&l++;let e=r.get(t.id)??new Map;for(let n of t.cells)e.set(n.key,n);r.set(t.id,e)}a.push({entry:e,passed:t,total:t+o+s,drift:c?xv(c,e):[],changedEvals:l}),e.status===`complete`&&(i=e)}return a.reverse()}var Xy=e=>({pass:e.attempts.filter(e=>e.outcome===`pass`).length,fail:e.attempts.filter(t=>t.outcome===`fail`&&!cb(e,t)).length,missed:e.attempts.filter(t=>cb(e,t)).length,infra:e.attempts.filter(e=>e.outcome===`infra_error`).length,skipped:e.attempts.filter(e=>e.outcome===`skipped`).length}),Zy=(e,t)=>({pass:e.pass+t.pass,fail:e.fail+t.fail,missed:e.missed+t.missed,infra:e.infra+t.infra,skipped:e.skipped+t.skipped}),Qy={pass:0,fail:0,missed:0,infra:0,skipped:0};function $y(e){let t={kind:`group`,key:``,name:``,tally:Qy,children:[]};for(let n of e.evals){let e=[n.file,...n.group],r=t;for(let[t,n]of e.entries()){let i=e.slice(0,t+1).join(` › `),a=r.children.find(e=>e.kind===`group`&&e.key===i);a||(a={kind:`group`,key:i,name:n,tally:Qy,children:[]},r.children.push(a)),r=a}r.children.push({kind:`eval`,key:n.id,name:n.name,tally:Xy(n),eval:n})}let n=e=>{if(e.kind===`eval`)return e;let t=e.children.map(n);return t.sort((e,t)=>eb(e.tally)-eb(t.tally)),{...e,children:t,tally:t.reduce((e,t)=>Zy(e,t.tally),Qy)}};return n(t).children}var eb=e=>e.fail?0:e.infra?1:e.pass?2:3;function tb(e){return e.cells.map(t=>({key:t.key,harness:t.harness,environment:t.environment,sandbox:t.sandbox,role:t.role,gated:t.gate!==`none`,gate:t.gate,overrides:t.overrides,runs:t.runs,pass:t.pass,fail:t.fail,infraError:t.infraError,skipped:t.skipped,passRate:t.passRate,outcome:t.outcome,lift:t.lift?Math.round(t.lift.points*100):null,liftInterval:t.lift?{lo:Math.round(t.lift.interval.lo*100),hi:Math.round(t.lift.interval.hi*100),withinNoise:t.lift.withinNoise}:null,belowMinLift:t.lift?.minLift!==void 0&&t.lift.interval.lo<t.lift.minLift,effort:$v(e,t.key),effortVsControl:ey(e,t.key),judgeRates:_y(e,t.key),usage:yy(e,t.key),attempts:e.attempts.filter(e=>e.cell===t.key)}))}function nb(e){return(e.answers??[]).map(e=>{let t=t=>e.rates.filter(e=>e.cut===t).map(e=>({name:e.name,wins:e.wins,n:e.n,rate:e.n?e.wins/e.n:null}));return{question:e.question,model:e.resolvedModel??e.model,votes:e.votes.length,ties:e.votes.filter(e=>e.winner===`tie`).length,within:t(`within`),across:t(`across`),error:e.error??null,noPairs:e.votes.length===0&&e.error===void 0}})}var rb=e=>e.cells.length>1||e.cells.some(e=>e.runs>1);function ib(e,t){let n=[...e].sort((e,t)=>e.runId<t.runId?-1:1),r=[],i=new Map;for(let e of n){let n=e.evals.find(e=>e.slug===t);n&&r.push({run:e,outcome:n.outcome,passRate:n.passRate,cells:n.cells,changed:Sv(i,n.id,n.cells)})}return r}var ab=e=>{let t=e?.attempts.flatMap(e=>e.judgements.map(e=>e.score))??[];return t.length?t.reduce((e,t)=>e+t,0)/t.length:null},ob=[`regressed`,`fixed`,`drift`,`infra`,`added`,`removed`,`same`],sb=e=>e.some(e=>e.gate===`none`),cb=(e,t)=>t.outcome===`fail`&&t.error?.kind!==`aborted`&&e.cells.find(e=>e.key===t.cell)?.gate===`none`;function lb(e){let t=e.filter(e=>e.gate!==`none`),n=t.reduce((e,t)=>e+t.pass,0),r=n+t.reduce((e,t)=>e+t.fail,0);return r?n/r:null}function ub(e,t,n={}){let r=kv(e,t).map(r=>{let i=e.evals.find(e=>e.id===r.id),a=t.evals.find(e=>e.id===r.id),o=new Set(i?.cells.map(e=>e.key)),s=r.cells&&new Set(a?.cells.filter(e=>o.has(e.key)).map(e=>e.key)),c=e=>e?s?lb(e.cells.filter(e=>s.has(e.key))):e.passRate:null;return{...r,slug:a?.slug??i?.slug??null,basePassRate:c(i),headPassRate:c(a),baseScore:ab(n.base?.evals.find(e=>e.id===r.id)),headScore:ab(n.head?.evals.find(e=>e.id===r.id)),perCell:r.perCell??[]}});return r.sort((e,t)=>ob.indexOf(e.status)-ob.indexOf(t.status)),{rows:r,counts:Object.fromEntries(ob.map(e=>[e,r.filter(t=>t.status===e).length])),changes:xv(e,t)}}function db(e){let t=[];for(let n of e.split(`
|
|
51
|
-
`))if(n.trim())try{let e=JSON.parse(n);e&&typeof e.type==`string`&&t.push(
|
|
52
|
-
`))t.startsWith(`+`)&&!t.startsWith(`+++ `)?r++:t.startsWith(`-`)&&!t.startsWith(`--- `)&&i++;return{path:n,status:/^new file mode/m.test(e)?`added`:/^deleted file mode/m.test(e)?`deleted`:/^rename from/m.test(e)?`renamed`:/^(Binary files|GIT binary patch)/m.test(e)?`binary`:`modified`,added:r,removed:i,text:e}}):[]}var hb=(e,t)=>e.evals.find(e=>e.slug===t),gb=(e,t)=>e.attempts.find(e=>e.id===t),_b=class extends Error{name=`NotFoundError`};async function vb(e){let t=await fetch(new URL(e,document.baseURI),{credentials:`same-origin`});if(t.status===404)throw new _b(`${e} not found`);if(t.status===401)throw Error(`The studio session expired. Reopen the URL printed by reeval studio.`);if(!t.ok)throw Error(`${e}: HTTP ${t.status}`);return t}var yb=async e=>(await vb(e)).json(),bb=async e=>(await vb(e)).text(),xb=tt({queryKey:[`index`,Py],queryFn:()=>yb(Py),staleTime:6e4}),Sb=tt({queryKey:[`index`,`headers`],queryFn:async()=>{let e=await yb(Fy);return{manifest:e,headers:(await Promise.all(e.shards.map(e=>yb(Iy(e.id))))).flat()}}}),Cb=e=>tt({queryKey:[`record`,e],queryFn:async()=>Oy(await yb(Ly(e)))}),wb=(e,t)=>tt({queryKey:[`artifact`,e,t],queryFn:()=>bb(Ry(e,t)),enabled:!!t,staleTime:1/0,retry:(e,t)=>!(t instanceof _b)&&e<2}),Tb=e=>tt({queryKey:[`record`,`analysis`,e],queryFn:async()=>{try{return await yb(hv(e))}catch(t){if(t instanceof _b)return{runId:e,entries:[]};throw t}}}),Eb=(e,t,n)=>tt({queryKey:[`debug`,e,t],queryFn:()=>yb(jv(e,t)),enabled:n,retry:!1}),Db=(e,t,n)=>tt({queryKey:[`debug-trace`,e,t],queryFn:()=>bb(Mv(e,t)),enabled:n,staleTime:1/0}),Ob=()=>et(xb),kb=tt({queryKey:[`live`],queryFn:()=>yb(Ay),staleTime:1/0});function Ab(){let{data:e}=Ob(),t=!!e?.features.live,n=et({...kb,enabled:t});return{...n,runs:t?n.data?.runs??[]:[]}}var jb=(e,t)=>tt({queryKey:[`live-transcript`,e,t],queryFn:()=>bb(jy(e,t)),staleTime:1/0,retry:!1});function Mb(e){let t=g();(0,p.useEffect)(()=>{if(!e)return;let n=new EventSource(new URL(`api/events`,document.baseURI));n.addEventListener(`history.changed`,()=>{t.invalidateQueries({queryKey:[`index`]}),t.invalidateQueries({queryKey:[`record`]})});let r=Promise.resolve();return n.addEventListener(`run.progress`,e=>{let n=JSON.parse(e.data);r=r.then(async()=>{let e=t.getQueryData(kb.queryKey)?.runs??[],r=new Set(n.runs.map(e=>e.runId));e.some(e=>!r.has(e.runId))&&await t.refetchQueries({queryKey:[`index`]}).catch(()=>{}),t.setQueryData(kb.queryKey,n)})}),n.addEventListener(`ready`,()=>{t.invalidateQueries({queryKey:kb.queryKey})}),()=>n.close()},[e,t])}var Nb=`reeval-studio-theme`,Pb=()=>window.matchMedia(`(prefers-color-scheme: dark)`),Fb=new Set,Ib=()=>{let e=localStorage.getItem(Nb);return e===`light`||e===`dark`?e:`system`};function Lb(e=Ib()){let t=e===`dark`||e===`system`&&Pb().matches;document.documentElement.classList.toggle(`dark`,t)}function Rb(){Lb(),Pb().addEventListener(`change`,()=>{Lb();for(let e of Fb)e()})}function zb(){let e=(0,p.useSyncExternalStore)(e=>(Fb.add(e),()=>Fb.delete(e)),Ib),t=(0,p.useCallback)(e=>{e===`system`?localStorage.removeItem(Nb):localStorage.setItem(Nb,e),Lb(e);for(let e of Fb)e()},[]);return{theme:e,resolved:e===`system`?Pb().matches?`dark`:`light`:e,setTheme:t}}var Bb=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Vb(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Bb(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Hb=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Ub=e=>{let t=Hb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wb=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Gb={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Kb(e){return e!=null}function qb(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Gb.width,a=e.size??e.height??Gb.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Wb(...c):Wb(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Gb[`stroke-width`])*Number(e.size??e.width??Gb.width)/Number(t.size??t.width??Gb.width):t.strokeWidth??Gb[`stroke-width`];return[`svg`,{...Object.entries(Gb).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Kb(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Kb(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Kb(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Jb(e,t={}){return qb(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Yb=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Xb=(0,p.createContext)({}),Zb=()=>(0,p.useContext)(Xb),Qb=(0,p.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Zb()??{},b=!!c||Yb(d),[x,S,C=[]]=Jb(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Wb(y,s),hasA11yProp:b,attributes:d});return(0,p.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Q(e,t=[],n=[]){let r=typeof e==`string`?Vb(e,t,n):e,i=(0,p.forwardRef)(({className:e,...t},n)=>(0,p.createElement)(Qb,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ub(r.name)),i}var $b={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};$b.node;var ex=Q($b),tx={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};tx.node;var nx=Q(tx),rx={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};rx.node;var ix=Q(rx),ax={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};ax.node;var ox=Q(ax),sx={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};sx.node;var cx=Q(sx),lx={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};lx.node;var ux=Q(lx),dx={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};dx.node;var fx=Q(dx),px={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};px.node;var mx=Q(px),hx={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};hx.node;var gx=Q(hx),_x={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};_x.node;var vx=Q(_x),yx={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};yx.node;var bx=Q(yx),xx={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};xx.node;var Sx=Q(xx),Cx={name:`circle-minus`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]],aliases:[`minus-circle`]};Cx.node;var wx=Q(Cx),Tx={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Tx.node;var Ex=Q(Tx),Dx={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};Dx.node;var Ox=Q(Dx),kx={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};kx.node;var Ax=Q(kx),jx={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};jx.node;var Mx=Q(jx),Nx={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Nx.node;var Px=Q(Nx),Fx={name:`cloud-off`,size:24,node:[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Fx.node;var Ix=Q(Fx),Lx={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};Lx.node;var Rx=Q(Lx),zx={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};zx.node;var Bx=Q(zx),Vx={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Vx.node;var Hx=Q(Vx),Ux={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};Ux.node;var Wx=Q(Ux),Gx={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};Gx.node;var Kx=Q(Gx),qx={name:`file-minus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}]]};qx.node;var Jx=Q(qx),Yx={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Yx.node;var Xx=Q(Yx),Zx={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};Zx.node;var Qx=Q(Zx),$x={name:`file-question-mark`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]],aliases:[`file-question`]};$x.node;var eS=Q($x),tS={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};tS.node;var nS=Q(tS),rS={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};rS.node;var iS=Q(rS),aS={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};aS.node;var oS=Q(aS),sS={name:`gavel`,size:24,node:[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381`,key:`pgg06f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m21.5 10.5-8-8`,key:`a17d9x`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m8.5 7.5 8 8`,key:`1oyaui`}]]};sS.node;var cS=Q(sS),lS={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};lS.node;var uS=Q(lS),dS={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};dS.node;var fS=Q(dS),pS={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};pS.node;var mS=Q(pS),hS={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};hS.node;var gS=Q(hS),_S={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};_S.node;var vS=Q(_S),yS={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};yS.node;var bS=Q(yS),xS={name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]};xS.node;var SS=Q(xS),CS={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};CS.node;var wS=Q(CS),TS={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};TS.node;var ES=Q(TS),DS={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};DS.node;var OS=Q(DS),kS={name:`radio`,size:24,node:[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};kS.node;var AS=Q(kS),jS={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};jS.node;var MS=Q(jS),NS={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};NS.node;var PS=Q(NS),FS={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};FS.node;var IS=Q(FS),LS={name:`search-x`,size:24,node:[[`path`,{d:`m13.5 8.5-5 5`,key:`1cs55j`}],[`path`,{d:`m8.5 8.5 5 5`,key:`a8mexj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]};LS.node;var RS=Q(LS),zS={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};zS.node;var BS=Q(zS),VS={name:`shield-alert`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]};VS.node;var HS=Q(VS),US={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};US.node;var WS=Q(US),GS={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};GS.node;var KS=Q(GS),qS={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};qS.node;var JS=Q(qS),YS={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};YS.node;var XS=Q(YS),ZS={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};ZS.node;var QS=Q(ZS),$S={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};$S.node;var eC=Q($S),tC={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};tC.node;var nC=Q(tC),rC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,iC=zg,aC=(e,t)=>n=>{if(t?.variants==null)return iC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=rC(t)||rC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return iC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},oC=aC(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function sC({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Xa:`button`;return(0,m.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Z(oC({variant:t,size:n,className:e})),...i})}function cC({...e}){return(0,m.jsx)(fm,{"data-slot":`dropdown-menu`,...e})}function lC({...e}){return(0,m.jsx)(pm,{"data-slot":`dropdown-menu-trigger`,...e})}function uC({className:e,sideOffset:t=4,...n}){return(0,m.jsx)(mm,{children:(0,m.jsx)(hm,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:Z(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function dC({...e}){return(0,m.jsx)(gm,{"data-slot":`dropdown-menu-radio-group`,...e})}function fC({className:e,children:t,...n}){return(0,m.jsxs)(_m,{"data-slot":`dropdown-menu-radio-item`,className:Z(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,m.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,m.jsx)(vm,{children:(0,m.jsx)(Mx,{className:`size-2 fill-current`})})}),t]})}var pC=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`}),mC=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function hC(e,t=Date.now()){let n=Date.parse(e)-t;for(let[e,t]of mC)if(Math.abs(n)>=t)return pC.format(Math.round(n/t),e);return`just now`}var gC=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),_C=e=>gC.format(new Date(e)),vC=(e,t)=>`${e} ${t}${e===1?``:`s`}`,yC=e=>e.split(`_`).slice(0,2).join(`_`),bC=[{to:`/`,label:`Runs`,icon:MS},{to:`/evals`,label:`Evals`,icon:iS},{to:`/compare`,label:`Compare`,icon:mS}];function xC(){let{theme:e,resolved:t,setTheme:n}=zb();return(0,m.jsxs)(cC,{children:[(0,m.jsx)(lC,{asChild:!0,children:(0,m.jsx)(sC,{variant:`ghost`,size:`icon`,className:`size-8`,"aria-label":`Theme`,children:t===`dark`?(0,m.jsx)(OS,{className:`size-4`}):(0,m.jsx)(JS,{className:`size-4`})})}),(0,m.jsx)(uC,{align:`end`,className:`w-36`,children:(0,m.jsxs)(dC,{value:e,onValueChange:e=>n(e),children:[(0,m.jsxs)(fC,{value:`light`,children:[(0,m.jsx)(JS,{className:`size-4`}),` Light`]}),(0,m.jsxs)(fC,{value:`dark`,children:[(0,m.jsx)(OS,{className:`size-4`}),` Dark`]}),(0,m.jsxs)(fC,{value:`system`,children:[(0,m.jsx)(vS,{className:`size-4`}),` System`]})]})})]})}function SC(){let{data:e}=Ob();return e?e.mode===`live`?(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs text-muted-foreground`,children:[(0,m.jsxs)(`span`,{className:`relative flex size-2`,children:[(0,m.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-pass opacity-60`}),(0,m.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-pass`})]}),`Live`]})}),(0,m.jsx)(mv,{children:`Watching the history folder: runs show here while they run, and stay once they land.`})]}):(0,m.jsxs)(`span`,{className:`rounded-full border px-2.5 py-0.5 text-xs text-muted-foreground`,children:[`Snapshot · `,hC(e.generatedAt)]}):null}function CC(){let{data:e}=Ob();return Mb(!!e?.features.live),(0,m.jsxs)(`div`,{className:`min-h-dvh`,children:[(0,m.jsx)(`header`,{className:`sticky top-0 z-30 border-b bg-background/80 backdrop-blur-md`,children:(0,m.jsxs)(`div`,{className:`mx-auto flex h-14 max-w-7xl items-center gap-2 px-4 sm:gap-4 sm:px-6`,children:[(0,m.jsxs)(R,{to:`/`,className:`flex items-center gap-2.5 font-semibold tracking-tight`,children:[(0,m.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-lg bg-brand text-white shadow-sm`,children:(0,m.jsx)(`svg`,{viewBox:`0 0 32 32`,className:`size-5`,"aria-hidden":`true`,children:(0,m.jsx)(`path`,{d:`M7 22 13.5 9l3.8 7.6L19.6 13 25 22`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),(0,m.jsx)(`span`,{className:`hidden sm:inline`,children:`reeval Studio`})]}),e?(0,m.jsx)(`span`,{className:`hidden truncate font-mono text-xs text-muted-foreground md:inline`,children:e.project}):null,(0,m.jsx)(`nav`,{className:`ml-1 flex items-center gap-0.5 sm:ml-4`,children:bC.map(({to:e,label:t,icon:n})=>(0,m.jsxs)(R,{to:e,activeOptions:{exact:e===`/`,includeSearch:!1},className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[status=active]:bg-accent data-[status=active]:text-foreground`,children:[(0,m.jsx)(n,{className:`size-4`}),(0,m.jsx)(`span`,{className:`hidden sm:inline`,children:t})]},e))}),(0,m.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,m.jsx)(SC,{}),(0,m.jsx)(xC,{})]})]})}),(0,m.jsx)(`main`,{className:`mx-auto max-w-7xl px-4 py-6 sm:px-6 sm:py-8`,children:(0,m.jsx)(Ea,{})})]})}function wC({className:e,...t}){return(0,m.jsx)(`div`,{"data-slot":`skeleton`,className:Z(`animate-pulse rounded-md bg-accent`,e),...t})}function TC({icon:e,title:t,children:n,className:r}){return(0,m.jsxs)(`div`,{className:Z(`flex flex-col items-center justify-center rounded-xl border border-dashed px-6 py-14 text-center`,r),children:[(0,m.jsx)(`div`,{className:`mb-4 flex size-11 items-center justify-center rounded-full bg-muted`,children:(0,m.jsx)(e,{className:`size-5 text-muted-foreground`})}),(0,m.jsx)(`h3`,{className:`text-sm font-semibold`,children:t}),n?(0,m.jsx)(`div`,{className:`mt-1.5 max-w-md text-sm text-muted-foreground`,children:n}):null]})}function EC({error:e,className:t}){return e instanceof _b?(0,m.jsx)(TC,{icon:RS,title:`Not found`,className:t,children:`This run or file isn't in the history. It may have been removed, or the link is from another checkout.`}):(0,m.jsx)(TC,{icon:Ix,title:`Couldn't load this`,className:t,children:(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e?.message??String(e)})})}function DC({children:e}){return(0,m.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[12px] text-foreground`,children:e})}function OC({rows:e=6,className:t}){return(0,m.jsx)(`div`,{className:Z(`space-y-2`,t),children:Array.from({length:e},(e,t)=>(0,m.jsx)(wC,{className:`h-11 w-full`,style:{opacity:1-t*.12}},t))})}function kC(){return(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsx)(wC,{className:`h-4 w-40`}),(0,m.jsx)(wC,{className:`h-8 w-96 max-w-full`}),(0,m.jsx)(wC,{className:`h-4 w-72 max-w-full`})]})}function AC(e,t,n=!1){return t?`This studio was built with --no-artifacts, so only records are included.`:e.artifacts===`none`?`This run was recorded with --artifacts none, so no files were kept.`:e.artifacts===`failures`?`This run kept files for failing evals only (--artifacts failures).`:n?"recorded, but not on disk (often a `*.log` gitignore)":`The run didn't write this file.`}function jC({record:e,file:t,what:n,children:r}){let{data:i}=Ob(),a=i?.features.artifacts===!1,o=et(wb(e.runId,a?void 0:t?.path));return!t||a||o.error instanceof _b?(0,m.jsx)(TC,{icon:eS,title:`No ${n}`,children:AC(e,a,!!t&&!a)}):o.error?(0,m.jsx)(EC,{error:o.error}):o.isPending?(0,m.jsx)(OC,{rows:5}):(0,m.jsx)(m.Fragment,{children:r(o.data)})}var MC=aC(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function NC({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Xa:`span`;return(0,m.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:Z(MC({variant:t}),e),...r})}var PC={pass:{label:`Passed`,Icon:bx,text:`text-pass`,bg:`bg-pass/10 text-pass border-pass/25`},fail:{label:`Failed`,Icon:Ax,text:`text-fail`,bg:`bg-fail/10 text-fail border-fail/25`},infra_error:{label:`Infra error`,Icon:vx,text:`text-infra`,bg:`bg-infra/10 text-infra border-infra/30`},skipped:{label:`Skipped`,Icon:Sx,text:`text-skip`,bg:`bg-skip/10 text-skip border-skip/25`}},FC=e=>PC[e]??{label:String(e),Icon:Ex,text:`text-muted-foreground`,bg:`bg-muted text-muted-foreground`};function IC({outcome:e,missed:t=!1,className:n}){if(!e)return(0,m.jsx)(`span`,{className:Z(`inline-block size-4 rounded-full border border-dashed border-muted-foreground/40`,n),role:`img`,"aria-label":`Not run`});let{Icon:r,text:i,label:a}=FC(e);return t&&e===`fail`?(0,m.jsx)(wx,{className:Z(`size-4 shrink-0 text-muted-foreground`,n),"aria-label":`Missed, not gated`}):(0,m.jsx)(r,{className:Z(`size-4 shrink-0`,i,n),"aria-label":a})}function LC({outcome:e,label:t,className:n}){let{bg:r,Icon:i,label:a}=FC(e);return(0,m.jsxs)(NC,{variant:`outline`,className:Z(r,n),children:[(0,m.jsx)(i,{}),t??a]})}function RC({pass:e,fail:t,missed:n=0,infra:r=0,skipped:i=0,className:a}){let o=e+t+n+r+i;if(o===0)return(0,m.jsx)(`div`,{className:Z(`h-1.5 rounded-full bg-muted`,a)});let s=(e,t)=>e>0?(0,m.jsx)(`div`,{className:t,style:{width:`${e/o*100}%`}}):null;return(0,m.jsxs)(`div`,{className:Z(`flex h-1.5 overflow-hidden rounded-full bg-muted`,a),children:[s(e,`bg-pass`),s(t,`bg-fail`),s(n,`bg-muted-foreground/40`),s(r,`bg-infra`),s(i,`bg-skip/50`)]})}function zC({rate:e,className:t}){return(0,m.jsx)(`span`,{className:Z(`tabular font-medium`,e===null?`text-muted-foreground`:e>=.999?`text-pass`:e===0?`text-fail`:`text-infra`,t),children:Vy(e)})}var BC=e=>`${e>0?`+`:e<0?`−`:``}${Math.abs(e)}`;function VC({points:e,interval:t}){if(e===null)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});let n=t?.withinNoise??!1;return(0,m.jsxs)(`span`,{className:Z(`tabular font-medium`,n?`text-muted-foreground`:e>0?`text-pass`:e<0?`text-fail`:`text-muted-foreground`),children:[BC(e),` pts`,t?(0,m.jsxs)(`span`,{className:`ml-1 text-[11px] font-normal text-muted-foreground`,children:[`95% `,BC(t.lo),`…`,BC(t.hi),n?` · within noise`:``]}):null]})}function HC({changes:e,evals:t=0}){if(e.length===0&&t===0)return null;let n=[...e.map(e=>`${e.label}: ${e.base} → ${e.head}`),...t?[`${t} eval${t===1?``:`s`} changed (fingerprint)`]:[]];return(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsxs)(NC,{variant:`outline`,className:`cursor-default border-drift/30 bg-drift/10 text-drift`,children:[(0,m.jsx)(mS,{}),`drift`]})}),(0,m.jsxs)(mv,{className:`max-w-sm`,children:[(0,m.jsx)(`p`,{className:`mb-1 font-medium`,children:`Changed since the previous run`}),(0,m.jsx)(`ul`,{className:`space-y-0.5`,children:n.map(e=>(0,m.jsx)(`li`,{className:`font-mono text-[11px] break-all`,children:e},e))})]})]})}function UC({items:e,size:t=`md`}){let n={pass:`bg-pass`,fail:`bg-fail`,infra_error:`bg-infra`,skipped:`bg-skip/50`};return(0,m.jsx)(`div`,{className:`flex items-center gap-[3px]`,children:e.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center gap-[3px]`,children:[e.changed?(0,m.jsx)(`div`,{className:`h-4 w-px bg-drift`,title:`Eval or stack changed`}):null,(0,m.jsx)(`div`,{title:e.title,className:Z(`rounded-[3px]`,t===`sm`?`size-2.5`:`size-3.5`,e.outcome?n[e.outcome]??`bg-muted-foreground/40`:`border border-dashed border-muted-foreground/40`)})]},e.key))})}function WC({className:e,orientation:t=`horizontal`,...n}){return(0,m.jsx)(Jh,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Z(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var GC=aC(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function KC({className:e,variant:t=`default`,...n}){return(0,m.jsx)(Yh,{"data-slot":`tabs-list`,"data-variant":t,className:Z(GC({variant:t}),e),...n})}function qC({className:e,...t}){return(0,m.jsx)(Xh,{"data-slot":`tabs-trigger`,className:Z(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function JC({className:e,...t}){return(0,m.jsx)(Zh,{"data-slot":`tabs-content`,className:Z(`flex-1 outline-none`,e),...t})}function YC({record:e,check:t,index:n}){let r=t.exitCode===0,[i,a]=(0,p.useState)(!r);return(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>a(!i),className:`flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-accent/50`,children:[(0,m.jsx)(mx,{className:Z(`size-4 text-muted-foreground transition-transform`,i&&`rotate-90`)}),(0,m.jsx)(KS,{className:`size-4 text-muted-foreground`}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`#`,n+1]}),(0,m.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-sm`,children:t.command}),(0,m.jsxs)(NC,{variant:`outline`,className:r?`border-pass/30 text-pass`:`border-fail/30 text-fail`,children:[`exit `,t.exitCode]}),(0,m.jsx)(`span`,{className:`tabular w-14 text-right text-xs text-muted-foreground`,children:By(t.durationMs)})]}),i?(0,m.jsx)(`div`,{className:`border-t bg-muted/30 p-3`,children:(0,m.jsx)(jC,{record:e,file:t.log,what:`log`,children:e=>(0,m.jsx)(`pre`,{className:`max-h-[60vh] overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:e})})}):null]})}function XC({record:e,attempt:t}){return t.checks.length===0?(0,m.jsxs)(TC,{icon:bS,title:`No checks`,children:[`This eval ran no `,(0,m.jsx)(`code`,{className:`font-mono`,children:`c.exec()`}),` commands.`]}):(0,m.jsx)(`div`,{className:`space-y-2`,children:t.checks.map((t,n)=>(0,m.jsx)(YC,{record:e,check:t,index:n},n))})}function ZC({className:e,type:t,...n}){return(0,m.jsx)(`input`,{type:t,"data-slot":`input`,className:Z(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function QC(e){let t=[];for(let n of e){let e=Date.parse(n.at),r=t.at(-1);r&&r.phase===n.phase?(r.end=e,r.lines.push(n)):(r&&(r.end=Math.max(r.end,e)),t.push({phase:n.phase,start:e,end:e,lines:[n]}))}return t}function $C({lines:e}){let t=(0,p.useMemo)(()=>QC(e),[e]),[n,r]=(0,p.useState)(null),i=t[0]?.start??0,a=Math.max(1,(t.at(-1)?.end??i)-i);return(0,m.jsx)(`div`,{className:`space-y-1`,children:t.map((e,t)=>(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(n===t?null:t),className:`flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-accent/50`,children:[(0,m.jsx)(mx,{className:Z(`size-4 shrink-0 text-muted-foreground transition-transform`,n===t&&`rotate-90`)}),(0,m.jsx)(`span`,{className:`w-20 shrink-0 font-mono text-xs`,children:e.phase}),(0,m.jsxs)(`span`,{className:`tabular w-16 shrink-0 text-right text-xs text-muted-foreground`,children:[`+`,By(e.start-i)]}),(0,m.jsx)(`div`,{className:`relative hidden h-2 flex-1 rounded-full bg-muted sm:block`,children:(0,m.jsx)(`div`,{className:`absolute h-2 rounded-full bg-brand`,style:{left:`${(e.start-i)/a*100}%`,width:`${Math.max(.5,(e.end-e.start)/a*100)}%`}})}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground sm:hidden`,children:e.lines[0]?.text}),(0,m.jsx)(`span`,{className:`tabular w-14 shrink-0 text-right text-xs text-muted-foreground`,children:By(e.end-e.start)})]}),n===t?(0,m.jsx)(`pre`,{className:`max-h-[50vh] overflow-auto border-t bg-muted/30 p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:e.lines.map(e=>`${e.at.slice(11,23)} ${e.text}`).join(`
|
|
53
|
-
`)}):null]},t))})}function
|
|
54
|
-
`).filter(e=>e&&(!i||e.includes(i)));return(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(
|
|
55
|
-
`)})]})}function
|
|
56
|
-
`),r=n.slice(0,rw);return(0,m.jsxs)(`div`,{className:Z(`overflow-auto rounded-lg border bg-card`,t),children:[(0,m.jsx)(`pre`,{className:`min-w-fit py-2 font-mono text-xs leading-5`,children:r.map((e,t)=>(0,m.jsx)(`div`,{className:Z(`px-4 whitespace-pre`,iw(e)),children:e||` `},t))}),n.length>rw?(0,m.jsxs)(`p`,{className:`border-t px-4 py-2 text-xs text-muted-foreground`,children:[`Showing the first `,rw,` of `,n.length,` lines.`]}):null]})}var ow={added:`text-pass`,deleted:`text-fail`,modified:`text-infra`,renamed:`text-drift`,binary:`text-muted-foreground`};function sw({text:e}){let t=(0,p.useMemo)(()=>mb(e),[e]),[n,r]=(0,p.useState)(0);if(t.length===0)return(0,m.jsx)(TC,{icon:Kx,title:`No changes`,children:`The agent didn't change any files in the workspace.`});let i=t[Math.min(n,t.length-1)],a=t.reduce((e,t)=>e+t.added,0),o=t.reduce((e,t)=>e+t.removed,0);return(0,m.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[260px_1fr]`,children:[(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between px-1 text-xs text-muted-foreground`,children:[(0,m.jsxs)(`span`,{children:[t.length,` files`]}),(0,m.jsxs)(`span`,{className:`font-mono`,children:[(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,a]}),` `,(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,o]})]})]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:t.map((e,t)=>(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(t),className:Z(`flex w-full items-center gap-2 border-b px-3 py-2 text-left last:border-b-0 hover:bg-accent/50`,t===n&&`bg-accent`),children:[(0,m.jsx)(`span`,{className:Z(`text-[10px] font-semibold uppercase`,ow[e.status]),children:e.status[0]}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:e.path}),(0,m.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px]`,children:[(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),` `,(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]})]})]},e.path))})]}),(0,m.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`span`,{className:`truncate font-mono text-sm`,children:i.path}),(0,m.jsx)(NC,{variant:`outline`,className:ow[i.status],children:i.status})]}),(0,m.jsx)(aw,{text:i.text,className:`max-h-[70vh]`})]})]})}function cw({score:e,threshold:t,pass:n}){return(0,m.jsxs)(`div`,{className:`relative h-2 rounded-full bg-muted`,children:[(0,m.jsx)(`div`,{className:Z(`absolute inset-y-0 left-0 rounded-full`,n?`bg-pass`:`bg-fail`),style:{width:`${Math.max(2,e*100)}%`}}),(0,m.jsx)(`div`,{className:`absolute -top-1 -bottom-1 w-0.5 rounded bg-foreground`,style:{left:`${t*100}%`},title:`threshold ${t}`})]})}function lw({j:e}){let t=e.verdict===`pass`;return(0,m.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,m.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,m.jsx)(`p`,{className:`text-sm font-medium leading-relaxed`,children:e.question}),(0,m.jsx)(NC,{variant:`outline`,className:t?`border-pass/30 text-pass`:`border-fail/30 text-fail`,children:e.verdict})]}),(0,m.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-[1fr_auto] sm:items-center`,children:[(0,m.jsx)(cw,{score:e.score,threshold:e.threshold,pass:t}),(0,m.jsxs)(`div`,{className:`tabular text-sm`,children:[(0,m.jsx)(`span`,{className:`font-semibold`,children:e.score.toFixed(2)}),(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` / threshold `,e.threshold]})]})]}),(0,m.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-xs`,children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:`Model`}),(0,m.jsx)(`dd`,{className:`font-mono`,children:e.model}),e.resolvedModel&&e.resolvedModel!==e.model?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:`Served by`}),(0,m.jsx)(`dd`,{className:`font-mono`,children:e.resolvedModel})]}):null]})]})}function uw({name:e,value:t}){let n=t&&typeof t==`object`&&`$ref`in t?String(t.$ref):null;return(0,m.jsxs)(`div`,{className:`border-b px-4 py-3 last:border-b-0`,children:[(0,m.jsx)(`div`,{className:`mb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase`,children:e}),n?(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`The judge saw `,(0,m.jsx)(`code`,{className:`font-mono text-foreground`,children:n}),` (see the Diff tab).`]}):Array.isArray(t)?(0,m.jsx)(`ul`,{className:`space-y-0.5 font-mono text-xs`,children:t.map(e=>(0,m.jsx)(`li`,{children:typeof e==`string`?e:JSON.stringify(e)},String(e)))}):(0,m.jsx)(`pre`,{className:`max-h-72 overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:typeof t==`string`?t:JSON.stringify(t,null,2)})]})}function dw({record:e,attempt:t}){return t.judgements.length===0&&!t.files.judgeInput?(0,m.jsxs)(TC,{icon:cS,title:`No judge`,children:[`This eval made no `,(0,m.jsx)(`code`,{className:`font-mono`,children:`c.judge()`}),` calls.`]}):(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(`section`,{className:`space-y-3`,children:t.judgements.map(e=>(0,m.jsx)(lw,{j:e},e.question))}),(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`What the judge saw`}),(0,m.jsx)(jC,{record:e,file:t.files.judgeInput,what:`judge input`,children:e=>{let t=[];try{t=JSON.parse(e)}catch{return(0,m.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap`,children:e})}return(0,m.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`div`,{className:`border-b bg-muted/40 px-4 py-2 text-xs`,children:[(0,m.jsx)(`span`,{className:`font-medium`,children:e.question}),(0,m.jsx)(`span`,{className:`ml-2 font-mono text-muted-foreground`,children:e.model})]}),Object.entries(e.state).map(([e,t])=>(0,m.jsx)(uw,{name:e,value:t},e))]},e.question))})}})]})]})}function fw({value:e,label:t,className:n}){let[r,i]=(0,p.useState)(!1);return(0,m.jsxs)(sC,{variant:`outline`,size:`sm`,className:Z(`h-7 gap-1.5 font-mono text-xs`,n),onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),1200)})},children:[r?(0,m.jsx)(cx,{className:`size-3.5 text-pass`}):(0,m.jsx)(Hx,{className:`size-3.5`}),t??e]})}function pw({title:e,children:t,action:n}){return(0,m.jsxs)(`section`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b bg-muted/40 px-4 py-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:e}),n]}),(0,m.jsx)(`dl`,{className:`grid grid-cols-[minmax(7rem,auto)_1fr] gap-x-6 gap-y-2 px-4 py-3 text-sm`,children:t})]})}function mw({k:e,children:t,mono:n=!0}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,m.jsx)(`dd`,{className:n?`min-w-0 font-mono text-xs leading-5 break-all`:`min-w-0`,children:t})]})}var hw=(0,m.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:`none`}),gw=e=>e<1024?`${e} B`:e<1024**2?`${(e/1024).toFixed(1)} KB`:`${(e/1024**2).toFixed(1)} MB`;function _w({egress:e}){let t=typeof e.policy==`string`?e.policy:`allow ${e.policy.allow.join(`, `)||`none`}`;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{children:[t,e.allowed?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`· allows `,e.allowed.join(`, `)||`nothing`]}):null]}),e.recorded?null:(0,m.jsx)(`div`,{className:`font-sans text-muted-foreground`,children:`not recorded by this sandbox`}),e.contacted.map(e=>(0,m.jsxs)(`div`,{children:[e.host,`:`,e.port,` `,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[`×`,e.connections,` · ↑`,gw(e.sent),` ↓`,gw(e.received)]})]},`${e.host}:${e.port}`)),e.blocked.map(e=>(0,m.jsxs)(`div`,{className:`text-fail`,children:[`blocked `,e.host,`:`,e.port,` `,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[`×`,e.connections,` · `,e.reason]})]},`blocked ${e.host}:${e.port}`)),e.expectedBlocked.map(e=>(0,m.jsxs)(`div`,{className:`text-muted-foreground`,children:[`blocked `,e.host,`:`,e.port,` ×`,e.connections,` · expected: the harness always tries it`]},`expected ${e.host}:${e.port}`))]})}function vw({record:e,attempt:t}){let{git:n,stack:r}=e,i=r.images.find(e=>e.id===t.imageId);return(0,m.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,m.jsxs)(pw,{title:`Source`,action:n?(0,m.jsx)(fw,{value:`reeval checkout ${e.runId}`,label:`reeval checkout`}):null,children:[n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(mw,{k:`Commit`,children:n.sha}),(0,m.jsx)(mw,{k:`Branch`,children:n.branch??hw}),(0,m.jsx)(mw,{k:`Committed`,children:n.commitTime}),(0,m.jsx)(mw,{k:`Worktree`,mono:!1,children:n.dirty?(0,m.jsxs)(`span`,{className:`text-infra`,children:[`dirty`,n.worktreePatch?` · worktree.patch, ${n.worktreePatch.bytes} bytes`:``,n.worktreePatchNote?` · ${n.worktreePatchNote}`:``]}):`clean`}),n.remote?(0,m.jsx)(mw,{k:`Remote`,children:n.remote}):null,n.shallow?(0,m.jsx)(mw,{k:`Clone`,mono:!1,children:`shallow`}):null]}):(0,m.jsx)(mw,{k:`Git`,mono:!1,children:`Not run in a git repository`}),(0,m.jsx)(mw,{k:`Lockfiles`,children:e.dependencies.lockfiles.length?e.dependencies.lockfiles.map(e=>(0,m.jsxs)(`div`,{children:[e.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.sha256.slice(0,12)})]},e.path)):hw})]}),(0,m.jsxs)(pw,{title:`This attempt`,children:[(0,m.jsx)(mw,{k:`Cell`,children:t.cell}),(0,m.jsx)(mw,{k:`Image`,children:i?(0,m.jsxs)(m.Fragment,{children:[i.ref,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:i.id.slice(0,19)}),i.agentCli?(0,m.jsxs)(`div`,{children:[`agent CLI `,i.agentCli]}):null,i.dockerfile?(0,m.jsxs)(`div`,{children:[`dockerfile `,i.dockerfile.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:i.dockerfile.sha256.slice(0,12)})]}):null,i.install?.length?(0,m.jsxs)(`div`,{children:[`install on `,i.base,i.install.map(e=>(0,m.jsxs)(`div`,{className:`text-muted-foreground`,children:[`$ `,e]},e))]}):null]}):(0,m.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:`none (fake sandbox)`})}),(0,m.jsx)(mw,{k:`Env vars`,children:t.env.vars.length?t.env.vars.join(`, `):hw}),(0,m.jsx)(mw,{k:`Secrets`,children:t.env.secrets.length?t.env.secrets.join(`, `):hw}),(0,m.jsx)(mw,{k:`Egress`,children:t.egress?(0,m.jsx)(_w,{egress:t.egress}):hw}),(0,m.jsx)(mw,{k:`Context`,children:t.context.length?t.context.map(e=>(0,m.jsxs)(`div`,{children:[e.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.sha256.slice(0,12)})]},e.path)):hw})]}),(0,m.jsxs)(pw,{title:`Stack`,children:[(0,m.jsx)(mw,{k:`reeval`,children:[r.es,Uy(r),Wy(r),`${r.os}/${r.arch}`].filter(Boolean).join(` · `)}),(0,m.jsx)(mw,{k:`Harnesses`,children:r.harnesses.map(Hy).join(`, `)}),(0,m.jsxs)(mw,{k:`Judge`,children:[r.judge.model??`none`,` · threshold `,r.judge.threshold,` · version`,` `,r.judge.version,r.judge.resolvedModels.length?` · served ${r.judge.resolvedModels.join(`, `)}`:``]}),(0,m.jsx)(mw,{k:`Environments`,children:e.environments.map(e=>(0,m.jsxs)(`div`,{children:[e.name,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.digest.replace(/^sha256:/,``).slice(0,12)}),e.parent?` · extends ${e.parent}`:``,e.skills.length?` · skills ${e.skills.map(e=>e.name).join(`, `)}`:``,e.overrides.length?` · overrides ${e.overrides.join(`, `)}`:``]},e.name))}),(0,m.jsx)(mw,{k:`Images`,children:r.images.length?r.images.map(e=>(0,m.jsx)(`div`,{children:e.ref},e.id)):hw})]}),(0,m.jsx)(pw,{title:`Package versions`,children:Object.entries(r.packages).map(([e,t])=>(0,m.jsx)(mw,{k:e,children:t},e))}),n?.dirty?(0,m.jsxs)(`div`,{className:`space-y-2 xl:col-span-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Uncommitted changes when the run started`}),(0,m.jsx)(jC,{record:e,file:n.worktreePatch??void 0,what:`worktree patch`,children:e=>(0,m.jsx)(aw,{text:e,className:`max-h-[50vh]`})})]}):null]})}function yw(e){return typeof e==`object`?e.key:e}function bw(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function xw(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function Sw(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Cw=(e,t)=>Math.abs(e-t)<1.01,ww=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},Tw,Ew=()=>{if(Tw!==void 0)return Tw;if(typeof navigator>`u`)return Tw=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Tw=!0;let e=navigator.maxTouchPoints;return Tw=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Dw=e=>e,Ow=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},kw={passive:!0},Aw=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener(`resize`,r,kw),()=>{n.removeEventListener(`resize`,r)}},jw=typeof window>`u`||`onscrollend`in window,Mw=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&jw,o=0,s=a?null:ww(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,kw),a&&r.addEventListener(`scrollend`,u,kw),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Nw=(e,t)=>Mw(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),Pw=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Fw=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})};function Iw(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var Lw=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Dw,rangeExtractor:Ow,onChange:()=>{},measureElement:Pw,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>yw(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||Iw(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:c}=this.options,l=0;for(;l<a&&c(l)!==e;)l++;if(l<a){let e=n[l];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=xw(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,Ew()&&this.targetWindow!=null&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,kw),e.addEventListener(`touchend`,n,kw),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(Ew()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this.scrollState?.behavior===`smooth`&&!Cw(this.getScrollOffset()-i,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=xw(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=xw(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=bw(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=xw(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Bw(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=xw(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&a!=null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f),this._retryClampedAdjustment()}},this.getVirtualItems=xw(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return Sw(t[Rw(0,t.length-1,r?e=>n[e*2]:e=>Sw(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(e===0)return!1;if(Ew()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let n=this.getScrollOffset()+this.scrollAdjustments+e,r=this.scrollElement,i=r!==null&&(`scrollHeight`in r||`document`in r)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&n>i+.5?{target:n,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&Cw(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},Rw=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function zw(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Bw(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=zw(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=Rw(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Vw=typeof document<`u`?p.useLayoutEffect:p.useEffect;function Hw({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=p.useReducer(e=>e+1,0)[1],a=p.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=p.useRef(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=e=>{let t=a.current;if(!t.enabled||!t.container)return;s(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,o=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let s=a.start-o,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==s&&(t.lastPositions.set(c,s),r?c.style.transform=n?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:c.style[i]=`${s}px`)}},l={...r,onChange:(t,n)=>{var s;let l=a.current,u=!0;if(l.enabled){c(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?(0,lo.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[u]=p.useState(()=>{let e=new Lw(l),t=e.measureElement;return e.measureElement=e=>{o.current=!0;try{t(e)}finally{o.current=!1}},Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return u.setOptions(l),Vw(()=>u._didMount(),[]),Vw(()=>(s(u),u._willUpdate())),Vw(()=>{c(u)}),u}function Uw(e){return Hw({getScrollElement:()=>typeof document<`u`?window:null,observeElementRect:Aw,observeElementOffset:Nw,scrollToFn:Fw,initialOffset:()=>typeof document<`u`?window.scrollY:0,...e})}var Ww=e=>e<1e3?`+${e}ms`:`+${(e/1e3).toFixed(1)}s`,Gw=e=>typeof e==`string`?e:e===void 0?``:JSON.stringify(e,null,2);function Kw(e){if(typeof e==`string`)return e;if(!e||typeof e!=`object`)return``;let t=e;for(let e of[`command`,`cmd`,`path`,`file`,`filePath`,`pattern`,`query`,`url`])if(typeof t[e]==`string`)return t[e];let n=Object.values(t).find(e=>typeof e==`string`);return typeof n==`string`?n:``}function qw({open:e,onToggle:t,icon:n,tone:r,title:i,meta:a,children:o}){return(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:t,className:`flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-accent/50`,children:[(0,m.jsx)(mx,{className:Z(`size-3.5 shrink-0 text-muted-foreground transition-transform`,e&&`rotate-90`)}),(0,m.jsx)(n,{className:Z(`size-4 shrink-0 text-muted-foreground`,r)}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),a?(0,m.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:a}):null]}),e?(0,m.jsx)(`div`,{className:`border-t bg-muted/30`,children:o}):null]})}function Jw({label:e,text:t}){return t?(0,m.jsxs)(`div`,{className:`px-3 py-2`,children:[(0,m.jsx)(`div`,{className:`mb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase`,children:e}),(0,m.jsx)(`pre`,{className:`max-h-96 overflow-auto font-mono text-xs leading-relaxed break-words whitespace-pre-wrap`,children:t})]}):null}function Yw({e,open:t,toggle:n}){let r=`durationMs`in e&&e.durationMs?By(e.durationMs):null;switch(e.type){case`text`:return(0,m.jsxs)(`div`,{className:`flex gap-3`,children:[(0,m.jsx)(`div`,{className:`mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-brand/15 text-brand`,children:(0,m.jsx)(ES,{className:`size-3.5`})}),(0,m.jsx)(`p`,{className:`min-w-0 flex-1 pt-0.5 text-sm leading-relaxed break-words whitespace-pre-wrap`,children:e.text})]});case`reasoning`:return(0,m.jsx)(qw,{open:t,onToggle:n,icon:ox,tone:`text-drift`,title:(0,m.jsx)(`span`,{className:`text-muted-foreground italic`,children:t?`Reasoning`:e.text.split(`
|
|
57
|
-
`)[0]}),meta:r?`thought for ${r}`:`reasoning`,children:(0,m.jsx)(`p`,{className:`px-3 py-2 text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground italic`,children:e.text})});case`tool`:return(0,m.jsxs)(qw,{open:t,onToggle:n,icon:e.tool.toLowerCase().includes(`shell`)||e.tool===`bash`?KS:nC,tone:e.ok?void 0:`text-fail`,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`font-medium`,children:e.tool}),(0,m.jsx)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:Kw(e.input)})]}),meta:(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.ok?null:(0,m.jsx)(`span`,{className:`text-fail`,children:`failed`}),r]}),children:[(0,m.jsx)(Jw,{label:`Input`,text:Gw(e.input)}),(0,m.jsx)(Jw,{label:`Output`,text:Gw(e.output)})]});case`file-edit`:{let t=e.kind===`create`?Qx:e.kind===`delete`?Jx:Xx;return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(t,{className:`size-4 text-muted-foreground`}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.kind===`create`?`Created`:e.kind===`delete`?`Deleted`:`Edited`}),(0,m.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.path}),(0,m.jsxs)(`span`,{className:`ml-auto flex shrink-0 gap-2 font-mono text-xs`,children:[e.added===null?null:(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),e.removed===null?null:(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]}),r?(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:r}):null]})]})}case`web-search`:return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(BS,{className:`size-4 text-muted-foreground`}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`Searched`}),(0,m.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`“`,e.query,`”`]}),(0,m.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[e.references===null?``:`${e.references} sources · `,r]})]});case`web-fetch`:return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(gS,{className:Z(`size-4 text-muted-foreground`,!e.ok&&`text-fail`)}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`Fetched`}),(0,m.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.url}),(0,m.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:r})]});case`retry`:return(0,m.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground`,children:[(0,m.jsx)(PS,{className:`mt-0.5 size-4 shrink-0`}),(0,m.jsx)(`span`,{className:`font-mono text-xs break-words whitespace-pre-wrap`,children:e.message})]});case`error`:return(0,m.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-fail/30 bg-fail/5 px-3 py-2 text-sm text-fail`,children:[(0,m.jsx)(vx,{className:`mt-0.5 size-4 shrink-0`}),(0,m.jsx)(`span`,{className:`font-mono text-xs break-words whitespace-pre-wrap`,children:e.message})]})}}function Xw({item:e,open:t,toggle:n}){if(e.kind===`turn`)return(0,m.jsxs)(`div`,{className:`pt-2`,children:[(0,m.jsxs)(`div`,{className:`mb-2 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:[`Turn `,e.turn+1]}),(0,m.jsxs)(`div`,{className:`flex gap-3`,children:[(0,m.jsx)(`div`,{className:`mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-muted`,children:(0,m.jsx)(QS,{className:`size-3.5`})}),(0,m.jsx)(`div`,{className:`min-w-0 flex-1 rounded-lg bg-muted/60 px-3.5 py-2.5 text-sm leading-relaxed break-words whitespace-pre-wrap`,children:e.prompt})]})]});if(e.kind===`turn-end`)return(0,m.jsxs)(`div`,{className:`flex items-center gap-3 py-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,m.jsxs)(`span`,{children:[`Turn `,e.turn+1,` `,e.status,` in `,By(e.durationMs)]}),(0,m.jsx)(`div`,{className:`h-px flex-1 bg-border`})]});let r=e.event;return(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(`span`,{className:`tabular w-14 shrink-0 pt-2 text-right font-mono text-[10px] text-muted-foreground/70`,children:Ww(r.atMs)}),(0,m.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,m.jsx)(Yw,{e:r,open:t,toggle:n})})]})}var Zw=e=>e.kind===`event`&&(e.event.type===`tool`||e.event.type===`reasoning`);function Qw({text:e}){let t=(0,p.useMemo)(()=>fb(db(e)),[e]),[n,r]=(0,p.useState)(()=>new Set),i=(0,p.useRef)(null),[a,o]=(0,p.useState)(0);(0,p.useLayoutEffect)(()=>{o((i.current?.getBoundingClientRect().top??0)+window.scrollY)},[]);let s=Uw({count:t.length,estimateSize:()=>56,overscan:8,scrollMargin:a}),c=(0,p.useCallback)(e=>r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),l=(0,p.useMemo)(()=>{let e=0,n=0,r=0;for(let i of t)i.kind===`event`&&(i.event.type===`tool`&&e++,i.event.type===`reasoning`&&n++,i.event.type===`file-edit`&&r++);return{tools:e,reasoning:n,edits:r}},[t]),u=t.flatMap((e,t)=>Zw(e)?[t]:[]),d=u.length>0&&u.every(e=>n.has(e));return t.length===0?(0,m.jsx)(`p`,{className:`py-10 text-center text-sm text-muted-foreground`,children:`The transcript is empty.`}):(0,m.jsxs)(`div`,{children:[(0,m.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(NC,{variant:`secondary`,children:[l.tools,` tool calls`]}),(0,m.jsxs)(NC,{variant:`secondary`,children:[l.edits,` file edits`]}),(0,m.jsxs)(NC,{variant:`secondary`,children:[l.reasoning,` reasoning blocks`]}),u.length?(0,m.jsx)(sC,{variant:`ghost`,size:`sm`,className:`ml-auto`,onClick:()=>r(d?new Set:new Set(u)),children:d?`Collapse all`:`Expand all`}):null]}),(0,m.jsx)(`div`,{ref:i,className:`relative w-full`,style:{height:s.getTotalSize()},children:s.getVirtualItems().map(e=>{let r=t[e.index];return(0,m.jsx)(`div`,{"data-index":e.index,ref:s.measureElement,className:`absolute top-0 left-0 w-full pb-2.5`,style:{transform:`translateY(${e.start-s.options.scrollMargin}px)`},children:(0,m.jsx)(Xw,{item:r,open:n.has(e.index),toggle:()=>c(e.index)})},e.key)})})]})}var $w=[`transcript`,`diff`,`checks`,`judge`,`state`,`debug`],eT=la(`/runs/$runId/evals/$slug/attempts/$attempt`),tT=[[`setupMs`,`Setup`,`bg-skip/60`],[`agentMs`,`Agent`,`bg-brand`],[`diffMs`,`Diff`,`bg-drift/70`],[`checksMs`,`Checks`,`bg-infra`],[`judgeMs`,`Judge`,`bg-pass`]];function nT({attempt:e}){let t=tT.reduce((t,[n])=>t+e.timings[n],0)||1;return(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`div`,{className:`flex h-2 overflow-hidden rounded-full bg-muted`,children:tT.map(([n,r,i])=>e.timings[n]>0?(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsx)(`div`,{className:i,style:{width:`${e.timings[n]/t*100}%`}})}),(0,m.jsxs)(mv,{children:[r,` `,By(e.timings[n])]})]},n):null)}),(0,m.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:tT.map(([t,n,r])=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:Z(`size-2 rounded-full`,r)}),n,` `,(0,m.jsx)(`span`,{className:`tabular text-foreground`,children:By(e.timings[t])})]},t))})]})}function rT(){let{runId:e,slug:t,attempt:n}=eT.useParams(),{tab:r=`transcript`}=eT.useSearch(),i=Ki({from:`/runs/$runId/evals/$slug/attempts/$attempt`}),{data:a,error:o,isPending:s}=et(Cb(e)),{data:c}=Ob(),l=a&&hb(a,t),u=(l&&gb(l,n)?.key)??``,{data:d}=et(Eb(e,u,!!c?.features.debug&&!!u));if(o)return(0,m.jsx)(EC,{error:o});if(s)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:6})]});let f=hb(a,t),p=f&&gb(f,n);if(!f||!p)return(0,m.jsxs)(TC,{icon:RS,title:`Attempt not found`,children:[`This run has no attempt `,(0,m.jsx)(`code`,{className:`font-mono`,children:n}),` of that eval.`,` `,(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},className:`underline`,children:`Back to the run`})]});let h=f.attempts.indexOf(p),g=f.attempts[h-1],_=f.attempts[h+1],v=p.judgements[0],y=p.checks.filter(e=>e.exitCode!==0).length,b=[...new Set(p.turns.flatMap(e=>e.model?[e.model]:[]))];return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex min-w-0 flex-wrap items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/`,className:`hover:text-foreground`,children:`Runs`}),(0,m.jsx)(mx,{className:`size-3.5`}),(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},className:`font-mono text-xs hover:text-foreground`,children:yC(e)}),(0,m.jsx)(mx,{className:`size-3.5`}),(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},search:{eval:t},className:`max-w-64 truncate hover:text-foreground`,children:f.name}),(0,m.jsx)(mx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:p.id})]}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-start md:justify-between`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[f.file,...f.group].join(` › `)}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:f.name}),(0,m.jsx)(LC,{outcome:p.outcome})]}),(0,m.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:p.id}),` ·`,` `,By(p.durationMs),` · `,vC(p.turns.length,`turn`),` ·`,` `,qy(p.activity),p.activity.reasoningMs?` · ${By(p.activity.reasoningMs)} reasoning`:``,p.usage?` · ${Gy(p.usage)} tokens`:``,b.length?` · served by ${b.join(`, `)}`:``]})]}),f.attempts.length>1?(0,m.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,m.jsx)(sC,{variant:`outline`,size:`icon`,className:`size-8`,disabled:!g,asChild:!!g,children:g?(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:g.id},search:{tab:r},"aria-label":`Previous attempt`,children:(0,m.jsx)(fx,{})}):(0,m.jsx)(fx,{})}),(0,m.jsx)(`div`,{className:`flex items-center gap-0.5 px-1`,children:f.attempts.map(n=>(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:n.id},search:{tab:r},title:n.id,className:Z(`rounded p-0.5`,n.id===p.id?`bg-accent ring-1 ring-border`:`hover:bg-accent/60`),children:(0,m.jsx)(IC,{outcome:n.outcome,className:`size-3.5`})},n.id))}),(0,m.jsx)(sC,{variant:`outline`,size:`icon`,className:`size-8`,disabled:!_,asChild:!!_,children:_?(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:_.id},search:{tab:r},"aria-label":`Next attempt`,children:(0,m.jsx)(mx,{})}):(0,m.jsx)(mx,{})})]}):null]}),p.error?(0,m.jsxs)(`div`,{className:`rounded-lg border border-fail/30 bg-fail/5 px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs font-medium tracking-wide text-fail uppercase`,children:p.error.kind}),(0,m.jsx)(`pre`,{className:`mt-1 max-h-60 overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap text-fail`,children:p.error.message})]}):null,(0,m.jsx)(`div`,{className:`rounded-xl border bg-card p-4`,children:(0,m.jsx)(nT,{attempt:p})}),(0,m.jsxs)(WC,{value:r,onValueChange:e=>i({search:{tab:e},replace:!0}),children:[(0,m.jsxs)(KC,{className:`w-full justify-start overflow-x-auto sm:w-auto`,children:[(0,m.jsx)(qC,{value:`transcript`,children:`Transcript`}),(0,m.jsxs)(qC,{value:`diff`,children:[`Diff`,p.changedFiles.length?(0,m.jsx)(`span`,{className:`tabular text-xs text-muted-foreground`,children:p.changedFiles.length}):null]}),(0,m.jsxs)(qC,{value:`checks`,children:[`Checks`,p.checks.length?(0,m.jsx)(`span`,{className:Z(`tabular text-xs`,y?`text-fail`:`text-muted-foreground`),children:y?`${y}/${p.checks.length}`:p.checks.length}):null]}),(0,m.jsxs)(qC,{value:`judge`,children:[`Judge`,v?(0,m.jsx)(`span`,{className:Z(`tabular text-xs`,v.verdict===`pass`?`text-pass`:`text-fail`),children:v.score.toFixed(2)}):null]}),(0,m.jsx)(qC,{value:`state`,children:`State`}),d?(0,m.jsx)(qC,{value:`debug`,children:`Debug`}):null]}),(0,m.jsxs)(`div`,{className:`mt-4`,children:[(0,m.jsx)(JC,{value:`transcript`,children:(0,m.jsx)(jC,{record:a,file:p.files.transcript,what:`transcript`,children:e=>(0,m.jsx)(Qw,{text:e},p.id)})}),(0,m.jsx)(JC,{value:`diff`,children:(0,m.jsx)(jC,{record:a,file:p.files.diff,what:`diff`,children:e=>(0,m.jsx)(sw,{text:e},p.id)})}),(0,m.jsx)(JC,{value:`checks`,children:(0,m.jsx)(XC,{record:a,attempt:p})}),(0,m.jsx)(JC,{value:`judge`,children:(0,m.jsx)(dw,{record:a,attempt:p})}),(0,m.jsx)(JC,{value:`state`,children:(0,m.jsx)(vw,{record:a,attempt:p})}),d?(0,m.jsx)(JC,{value:`debug`,children:(0,m.jsx)(nw,{runId:e,attemptKey:p.key,view:d})}):null]})]})]})}function iT({...e}){return(0,m.jsx)(Bm,{"data-slot":`select`,...e})}function aT({...e}){return(0,m.jsx)(Wm,{"data-slot":`select-value`,...e})}function oT({className:e,size:t=`default`,children:n,...r}){return(0,m.jsxs)(Hm,{"data-slot":`select-trigger`,"data-size":t,className:Z(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,m.jsx)(Gm,{asChild:!0,children:(0,m.jsx)(ux,{className:`size-4 opacity-50`})})]})}function sT({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,m.jsx)(Jm,{children:(0,m.jsxs)(Xm,{"data-slot":`select-content`,className:Z(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,m.jsx)(lT,{}),(0,m.jsx)(ch,{className:Z(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,m.jsx)(uT,{})]})})}function cT({className:e,children:t,...n}){return(0,m.jsxs)(mh,{"data-slot":`select-item`,className:Z(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,m.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,m.jsx)(vh,{children:(0,m.jsx)(cx,{className:`size-4`})})}),(0,m.jsx)(gh,{children:t})]})}function lT({className:e,...t}){return(0,m.jsx)(bh,{"data-slot":`select-scroll-up-button`,className:Z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(gx,{className:`size-4`})})}function uT({className:e,...t}){return(0,m.jsx)(Sh,{"data-slot":`select-scroll-down-button`,className:Z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(ux,{className:`size-4`})})}function dT({className:e,...t}){return(0,m.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,m.jsx)(`table`,{"data-slot":`table`,className:Z(`w-full caption-bottom text-sm`,e),...t})})}function fT({className:e,...t}){return(0,m.jsx)(`thead`,{"data-slot":`table-header`,className:Z(`[&_tr]:border-b`,e),...t})}function pT({className:e,...t}){return(0,m.jsx)(`tbody`,{"data-slot":`table-body`,className:Z(`[&_tr:last-child]:border-0`,e),...t})}function mT({className:e,...t}){return(0,m.jsx)(`tr`,{"data-slot":`table-row`,className:Z(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function hT({className:e,...t}){return(0,m.jsx)(`th`,{"data-slot":`table-head`,className:Z(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function $({className:e,...t}){return(0,m.jsx)(`td`,{"data-slot":`table-cell`,className:Z(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}var gT=la(`/compare`),_T={regressed:{label:`Regressed`,className:`border-fail/30 bg-fail/10 text-fail`},fixed:{label:`Fixed`,className:`border-pass/30 bg-pass/10 text-pass`},drift:{label:`Not comparable`,className:`border-drift/30 bg-drift/10 text-drift`},infra:{label:`Infra error`,className:`border-infra/30 bg-infra/10 text-infra`},added:{label:`New`,className:`text-brand border-brand/30`},removed:{label:`Removed`,className:`text-muted-foreground`},same:{label:`Same`,className:`text-muted-foreground`}};function vT({label:e,value:t,runs:n,onChange:r}){return(0,m.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[(0,m.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,m.jsxs)(iT,{value:t,onValueChange:r,children:[(0,m.jsx)(oT,{className:`w-full`,children:(0,m.jsx)(aT,{placeholder:`Choose a run`})}),(0,m.jsx)(sT,{children:n.map(e=>(0,m.jsxs)(cT,{value:e.runId,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Ky(e.git?.sha)}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:hC(e.startedAt)}),(0,m.jsxs)(`span`,{className:`tabular text-xs text-muted-foreground`,children:[e.summary.pass,`/`,e.summary.pass+e.summary.fail+e.summary.infraError]}),e.recorded?null:(0,m.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`scratch`})]},e.runId))})]})]})}function yT({base:e,head:t,kind:n}){let r=n===`score`?ST:CT;if(e===null&&t===null)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});if(e===null||t===null)return(0,m.jsx)(`span`,{className:`tabular`,children:r(t===null?e:t)});let i=t-e;return(0,m.jsxs)(`span`,{className:`tabular`,children:[(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:r(e)}),(0,m.jsx)(nx,{className:`mx-1 inline size-3 text-muted-foreground`}),r(t),Math.abs(i)>1e-9?(0,m.jsxs)(`span`,{className:Z(`ml-1.5 text-xs`,i>0?`text-pass`:`text-fail`),children:[i>0?`+`:``,n===`score`?i.toFixed(2):`${Math.round(i*100)} pts`]}):null]})}var bT=e=>`${e>=0?`+`:`−`}${Math.round(Math.abs(e)*100)}`,xT=e=>e?`${bT(e.points)} (${bT(e.lo)}…${bT(e.hi)})${e.withinNoise?` noise`:``}`:`–`,ST=e=>e.toFixed(2),CT=e=>Vy(e);function wT({row:e,head:t}){let n=_T[e.status],r=e.id.split(` › `).slice(1).join(` › `)||e.id;return(0,m.jsxs)(mT,{className:e.status===`same`?`opacity-70`:void 0,children:[(0,m.jsx)($,{className:`pl-4`,children:(0,m.jsx)(NC,{variant:`outline`,className:n.className,children:n.label})}),(0,m.jsxs)($,{className:`max-w-md`,children:[e.slug?(0,m.jsx)(R,{to:`/evals/$slug`,params:{slug:e.slug},className:`font-medium hover:underline`,children:r}):r,(0,m.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.id.split(` › `)[0]}),e.cells?(0,m.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`compared on the cells both runs have`,e.cells.added.length?` · added ${e.cells.added.join(`, `)}`:``,e.cells.removed.length?` · removed ${e.cells.removed.join(`, `)}`:``]}):null,e.perCell.length?(0,m.jsx)(`ul`,{className:`mt-1.5 space-y-0.5 text-[11px] text-muted-foreground`,children:e.perCell.map(e=>(0,m.jsxs)(`li`,{className:`tabular`,children:[(0,m.jsx)(`span`,{className:`font-mono`,children:e.key}),e.base.lift||e.head.lift?(0,m.jsxs)(m.Fragment,{children:[` · lift `,xT(e.base.lift),` → `,xT(e.head.lift)]}):null,e.base.effort&&e.head.effort?(0,m.jsxs)(m.Fragment,{children:[` · `,oy(e.base.effort,e.head.effort)]}):null]},e.key))}):null]}),(0,m.jsx)($,{children:(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(IC,{outcome:e.base}),(0,m.jsx)(nx,{className:`size-3 text-muted-foreground`}),e.slug&&e.head?(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:t},search:{eval:e.slug},children:(0,m.jsx)(IC,{outcome:e.head})}):(0,m.jsx)(IC,{outcome:e.head})]})}),(0,m.jsx)($,{className:`hidden md:table-cell`,children:(0,m.jsx)(yT,{base:e.basePassRate,head:e.headPassRate,kind:`rate`})}),(0,m.jsx)($,{className:`hidden pr-4 md:table-cell`,children:(0,m.jsx)(yT,{base:e.baseScore,head:e.headScore,kind:`score`})})]})}function TT(){let e=gT.useSearch(),t=Ki({from:`/compare`}),{data:n,error:r,isPending:i}=et(Sb),a=n?.headers??[],o=a.find(t=>t.runId===e.head)??(e.head?void 0:a[0]),s=a.find(t=>t.runId===e.base)??(e.base?void 0:a.find(e=>o&&e.runId<o.runId&&e.status===`complete`)),c=et({...Cb(s?.runId??``),enabled:!!s}),l=et({...Cb(o?.runId??``),enabled:!!o}),u=(0,p.useMemo)(()=>s&&o?ub(s,o,{base:c.data,head:l.data}):null,[s,o,c.data,l.data]);return r?(0,m.jsx)(EC,{error:r}):i?(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:6})]}):(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Compare runs`}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[`What flipped between two runs, with pass-rate and judge-score deltas, and each cell's lift and effort (tool calls, agent time). Uses the same rules as`,` `,(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:`reeval compare`}),`.`]})]}),a.length<2?(0,m.jsx)(TC,{icon:mS,title:`Two runs needed`,children:`Record at least two runs to compare them.`}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-xl border bg-card p-4 sm:flex-row sm:items-end`,children:[(0,m.jsx)(vT,{label:`Base`,value:s?.runId,runs:a,onChange:e=>t({search:t=>({...t,base:e}),replace:!0})}),(0,m.jsx)(nx,{className:`mx-auto hidden size-4 shrink-0 text-muted-foreground sm:mb-2.5 sm:block`}),(0,m.jsx)(vT,{label:`Head`,value:o?.runId,runs:a,onChange:e=>t({search:t=>({...t,head:e}),replace:!0})})]}),!s||!o||!u?(0,m.jsx)(TC,{icon:mS,title:`Pick two runs`,children:`Choose a base and a head run to see what changed.`}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[`regressed`,`fixed`,`drift`,`same`].map(e=>(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:_T[e].label}),(0,m.jsx)(`div`,{className:Z(`mt-1 text-2xl font-semibold tracking-tight`,u.counts[e]&&e===`regressed`&&`text-fail`,u.counts[e]&&e===`fixed`&&`text-pass`,u.counts[e]&&e===`drift`&&`text-drift`),children:u.counts[e]})]},e))}),u.changes.length?(0,m.jsxs)(`div`,{className:`rounded-xl border border-drift/30 bg-drift/5 p-4`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-drift`,children:[(0,m.jsx)(XS,{className:`size-4`}),` The stack changed between these runs`]}),(0,m.jsx)(`ul`,{className:`mt-2 space-y-1 text-sm`,children:u.changes.map(e=>(0,m.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-2`,children:[(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.base}),(0,m.jsx)(nx,{className:`size-3 text-muted-foreground`}),(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.head}),e.outsideFingerprint?(0,m.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(not in fingerprints: flips count as not comparable)`}):null]},e.field))})]}):null,(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(dT,{children:[(0,m.jsx)(fT,{children:(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(hT,{className:`w-36 pl-4`,children:`Change`}),(0,m.jsx)(hT,{children:`Eval`}),(0,m.jsx)(hT,{className:`w-24`,children:`Outcome`}),(0,m.jsx)(hT,{className:`hidden md:table-cell`,children:`Pass rate`}),(0,m.jsx)(hT,{className:`hidden pr-4 md:table-cell`,children:`Judge score`})]})}),(0,m.jsx)(pT,{children:u.rows.map(e=>(0,m.jsx)(wT,{row:e,head:o.runId},e.id))})]})})]})]})]})}var ET=la(`/evals/$slug`);function DT(){let{slug:e}=ET.useParams(),{data:t,error:n,isPending:r}=et(Sb),i=(0,p.useMemo)(()=>t?ib(t.headers,e):[],[t,e]);if(n)return(0,m.jsx)(EC,{error:n});if(r)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:8})]});let a=t.manifest.evals.find(t=>t.slug===e);if(!a||i.length===0)return(0,m.jsx)(TC,{icon:RS,title:`No history for this eval`,children:`No recorded run includes it. It may have been renamed: evals are keyed by file, group and name.`});let{file:o,path:s}=zy(a.id),c=i.filter(e=>e.outcome===`pass`||e.outcome===`fail`),l=c.filter(e=>e.outcome===`pass`).length,u=[...i].reverse(),d=i.filter(e=>e.changed).length;return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/evals`,className:`hover:text-foreground`,children:`Evals`}),(0,m.jsx)(mx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`truncate text-foreground`,children:s.at(-1)})]}),(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,...s.slice(0,-1)].join(` › `)}),(0,m.jsx)(`h1`,{className:`mt-1.5 text-2xl font-semibold tracking-tight`,children:s.at(-1)}),(0,m.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[`Passed in `,l,` of `,vC(c.length,`run`),` with a verdict`,d?` · the eval or its stack changed ${vC(d,`time`)}`:``,`.`]})]}),(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card p-5`,children:[(0,m.jsxs)(`div`,{className:`mb-3 flex items-center justify-between text-xs text-muted-foreground`,children:[(0,m.jsx)(`span`,{children:`Oldest`}),(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`span`,{className:`mr-1 inline-block h-3 w-px bg-drift align-middle`}),` changed`]}),(0,m.jsx)(`span`,{children:`Newest`})]}),(0,m.jsx)(UC,{items:i.map(e=>({key:e.run.runId,outcome:e.outcome,changed:e.changed,title:`${Ky(e.run.git?.sha)} · ${hC(e.run.startedAt)} · ${e.outcome}`}))})]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(dT,{children:[(0,m.jsx)(fT,{children:(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(hT,{className:`w-10`}),(0,m.jsx)(hT,{children:`Run`}),(0,m.jsx)(hT,{children:`Commit`}),(0,m.jsx)(hT,{className:`w-48`,children:`Attempts`}),(0,m.jsx)(hT,{className:`text-right`,children:`Pass rate`}),(0,m.jsx)(hT,{className:`hidden text-right sm:table-cell`,children:`Run time`})]})}),(0,m.jsx)(pT,{children:u.map(t=>{let n=t.cells.reduce((e,t)=>e+t.pass,0),r=t.cells.reduce((e,t)=>e+t.fail,0),i=t.cells.reduce((e,t)=>e+t.infraError,0);return(0,m.jsxs)(mT,{children:[(0,m.jsx)($,{className:`pl-4`,children:(0,m.jsx)(IC,{outcome:t.outcome})}),(0,m.jsxs)($,{children:[(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:t.run.runId},search:{eval:e},className:`font-medium hover:underline`,children:(0,m.jsx)(`span`,{title:_C(t.run.startedAt),children:hC(t.run.startedAt)})}),(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:t.run.runId}),t.changed?(0,m.jsx)(NC,{variant:`outline`,className:`h-4 border-drift/30 px-1.5 text-[10px] text-drift`,children:`changed`}):null]})]}),(0,m.jsxs)($,{children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Ky(t.run.git?.sha)}),t.run.git?.branch?(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(uS,{className:`size-3`}),t.run.git.branch]}):null]}),(0,m.jsxs)($,{children:[(0,m.jsxs)(`span`,{className:`tabular text-xs`,children:[n,`/`,n+r+i,t.cells.length>1?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`· `,vC(t.cells.length,`cell`)]}):null]}),(0,m.jsx)(RC,{className:`mt-1.5`,pass:n,fail:r,infra:i})]}),(0,m.jsxs)($,{className:`text-right`,children:[(0,m.jsx)(zC,{rate:t.passRate}),sb(t.cells)?(0,m.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground`,children:`gated`}):null]}),(0,m.jsx)($,{className:`tabular hidden text-right text-muted-foreground sm:table-cell`,children:By(t.run.durationMs)})]},t.run.runId)})})]})})]})}var OT=la(`/evals`);function kT(){let{q:e}=OT.useSearch(),t=Ki({from:`/evals`}),{data:n,error:r,isPending:i}=et(Sb),a=(0,p.useMemo)(()=>{let t=new Map,r=e?.toLowerCase();for(let e of n?.manifest.evals??[]){if(r&&!e.id.toLowerCase().includes(r))continue;let n=t.get(e.file)??[];n.push(e),t.set(e.file,n)}return[...t]},[n,e]);if(r)return(0,m.jsx)(EC,{error:r});if(i)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:8})]});let o=n.headers.slice(0,20);return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Evals`}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[vC(n.manifest.evals.length,`eval`),` across `,vC(n.headers.length,`run`),`. The strip shows the last 20 runs, oldest to newest.`]})]}),(0,m.jsxs)(`div`,{className:`relative sm:w-72`,children:[(0,m.jsx)(BS,{className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,m.jsx)(ZC,{value:e??``,onChange:e=>t({search:{q:e.target.value||void 0},replace:!0}),placeholder:`Filter evals`,className:`h-9 pl-8`})]})]}),n.manifest.evals.length===0?(0,m.jsx)(TC,{icon:iS,title:`No evals yet`,children:`Evals appear here once a run that includes them is recorded.`}):a.length===0?(0,m.jsxs)(TC,{icon:BS,title:`No evals match`,children:[`Nothing matches “`,e,`”.`]}):a.map(([e,t])=>(0,m.jsxs)(`section`,{className:`overflow-hidden rounded-xl border bg-card`,children:[(0,m.jsx)(`div`,{className:`border-b bg-muted/40 px-4 py-2 font-mono text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`divide-y`,children:t.map(e=>{let t=ib(o,e.slug).filter(e=>e.outcome===`pass`||e.outcome===`fail`),n=t.length?t.filter(e=>e.outcome===`pass`).length/t.length:null;return(0,m.jsxs)(R,{to:`/evals/$slug`,params:{slug:e.slug},className:`flex flex-col gap-2 px-4 py-3 transition-colors hover:bg-accent/50 sm:flex-row sm:items-center sm:gap-4`,children:[(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:[(0,m.jsx)(IC,{outcome:e.latest.outcome}),(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.path.at(-1)}),e.path.length>1?(0,m.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.path.slice(0,-1).join(` › `)}):null]})]}),(0,m.jsxs)(`div`,{className:`flex items-center gap-4 pl-6 sm:pl-0`,children:[(0,m.jsx)(UC,{size:`sm`,items:o.slice().reverse().map(t=>({key:t.runId,outcome:t.evals.find(t=>t.slug===e.slug)?.outcome??null}))}),(0,m.jsx)(zC,{rate:n,className:`w-10 text-right text-sm`})]})]},e.slug)})})]},e))]})}var AT={running:{label:`Running`,tone:`border-brand/30 bg-brand/10 text-brand`},cancelling:{label:`Cancelling`,tone:`border-infra/30 bg-infra/10 text-infra`},finishing:{label:`Finishing`,tone:`border-brand/30 bg-brand/10 text-brand`},stopped:{label:`Stopped`,tone:`border-border bg-muted text-muted-foreground`}};function jT(e=1e3){let[t,n]=(0,p.useState)(()=>Date.now());return(0,p.useEffect)(()=>{let t=setInterval(()=>n(Date.now()),e);return()=>clearInterval(t)},[e]),t}function MT({run:e,className:t}){let{label:n,tone:r}=AT[e.state];return(0,m.jsxs)(NC,{variant:`outline`,className:Z(`gap-1.5 tabular`,r,t),children:[e.state===`stopped`?(0,m.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/60`}):(0,m.jsxs)(`span`,{className:`relative flex size-1.5`,children:[(0,m.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-current opacity-60`}),(0,m.jsx)(`span`,{className:`relative inline-flex size-1.5 rounded-full bg-current`})]}),n,` `,e.counts.done,`/`,e.planned]})}function NT({run:e,className:t}){let{passed:n,failed:r,errored:i,skipped:a,running:o,done:s}=e.counts,c=Math.max(e.planned,1),l=(e,t)=>e>0?(0,m.jsx)(`div`,{className:Z(`transition-[width] duration-500`,t),style:{width:`${e/c*100}%`}}):null;return(0,m.jsxs)(`div`,{className:Z(`flex h-2 overflow-hidden rounded-full bg-muted`,t),role:`progressbar`,"aria-label":`Attempts finished`,"aria-valuemin":0,"aria-valuemax":e.planned,"aria-valuenow":s,children:[l(n,`bg-pass`),l(r,`bg-fail`),l(i,`bg-infra`),l(a,`bg-skip/50`),e.state===`stopped`?null:l(o,`animate-pulse bg-brand/40`)]})}function PT({status:e,stopped:t=!1,className:n}){return e===`running`&&!t?(0,m.jsx)(wS,{className:Z(`size-4 shrink-0 animate-spin text-brand`,n),"aria-label":`Running`}):e===`queued`||e===`running`?(0,m.jsx)(IC,{outcome:null,className:n}):(0,m.jsx)(IC,{outcome:e,className:n})}var FT={queued:`Queued`,running:`Running`,pass:`Passed`,fail:`Failed`,infra_error:`Infra error`,skipped:`Skipped`},IT=(e,t)=>By(Math.max(0,t-Date.parse(e.startedAt)));function LT({runs:e}){let t=jT();return e.length?(0,m.jsx)(`section`,{"aria-label":`Runs in progress`,className:`space-y-2`,children:e.map(e=>(0,m.jsxs)(R,{to:`/live/$runId`,params:{runId:e.runId},"data-live-run":e.runId,className:`block rounded-xl border bg-card px-4 py-3 transition-colors hover:bg-accent/50`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,m.jsx)(MT,{run:e}),(0,m.jsxs)(`span`,{className:`text-sm font-medium`,title:_C(e.startedAt),children:[`Started `,hC(e.startedAt,t)]}),(0,m.jsx)(`span`,{className:`hidden font-mono text-[11px] text-muted-foreground sm:inline`,children:e.runId}),(0,m.jsxs)(`span`,{className:`tabular ml-auto text-xs text-muted-foreground`,children:[e.counts.passed,` passed · `,e.counts.failed+e.counts.errored,` failed`,e.state!==`stopped`&&e.counts.running?` · ${e.counts.running} running`:``,` `,`· `,IT(e,t)]})]}),(0,m.jsx)(NT,{run:e,className:`mt-2.5`})]},e.runId))}):null}var RT=la(`/live/$runId`),zT=la(`/live/$runId/attempt`);function BT(e){let t=Ab(),n=et(Sb),r=t.runs.find(t=>t.runId===e);return{run:r,landed:!r&&!!n.data?.headers.some(t=>t.runId===e),isPending:t.isPending||n.isPending,error:t.error??n.error}}function VT({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`tabular mt-1 text-lg font-semibold tracking-tight`,children:t})]})}function HT({runId:e}){return(0,m.jsxs)(TC,{icon:AS,title:`This run isn't in progress`,children:[`No running `,(0,m.jsx)(`span`,{className:`font-mono`,children:`reeval run`}),` has the id`,` `,(0,m.jsx)(`span`,{className:`font-mono`,children:e}),`, and no record of it has landed.`,` `,(0,m.jsx)(R,{to:`/`,className:`underline`,children:`Back to runs`})]})}function UT({attempt:e,run:t,now:n}){return e.durationMs===null?e.status===`running`&&e.startedAt&&t.state!==`stopped`?(0,m.jsx)(m.Fragment,{children:By(Math.max(0,n-Date.parse(e.startedAt)))}):(0,m.jsx)(m.Fragment,{children:`–`}):(0,m.jsx)(m.Fragment,{children:By(e.durationMs)})}function WT(){let{runId:e}=RT.useParams(),t=Ki(),n=jT(),{run:r,landed:i,isPending:a,error:o}=BT(e);(0,p.useEffect)(()=>{i&&t({to:`/runs/$runId`,params:{runId:e},replace:!0})},[i,t,e]);let s=(0,p.useMemo)(()=>{let e=new Map;for(let t of r?.attempts??[])e.set(t.evalId,[...e.get(t.evalId)??[],t]);return[...e.values()]},[r]);if(o)return(0,m.jsx)(EC,{error:o});if(a||i)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:6})]});if(!r)return(0,m.jsx)(HT,{runId:e});let c=r.state===`stopped`;return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(sC,{asChild:!0,variant:`ghost`,size:`sm`,className:`-ml-2 text-muted-foreground`,children:(0,m.jsxs)(R,{to:`/`,children:[(0,m.jsx)(ex,{}),` Runs`]})}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[(0,m.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:c?`Run stopped`:`Run in progress`}),(0,m.jsx)(MT,{run:r})]}),(0,m.jsxs)(`p`,{className:`mt-1 flex flex-wrap gap-x-2 text-sm text-muted-foreground`,children:[(0,m.jsxs)(`span`,{title:_C(r.startedAt),children:[`Started `,hC(r.startedAt,n)]}),(0,m.jsx)(`span`,{children:`·`}),(0,m.jsx)(`span`,{className:`font-mono text-xs leading-5`,children:r.runId})]})]}),c?(0,m.jsxs)(`div`,{className:`flex gap-3 rounded-xl border border-infra/30 bg-infra/5 px-4 py-3 text-sm`,children:[(0,m.jsx)(Ox,{className:`mt-0.5 size-4 shrink-0 text-infra`}),(0,m.jsxs)(`p`,{children:[`This run stopped without writing a record: its`,` `,(0,m.jsx)(`span`,{className:`font-mono`,children:`reeval run`}),` exited or stopped responding. The attempts below are what finished before it did.`]})]}):null,(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsx)(NT,{run:r,className:`h-2.5`}),(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-4`,children:[(0,m.jsxs)(VT,{label:`Finished`,children:[r.counts.done,(0,m.jsxs)(`span`,{className:`ml-1 text-sm font-normal text-muted-foreground`,children:[`of `,vC(r.planned,`attempt`)]})]}),(0,m.jsx)(VT,{label:`Passed`,children:(0,m.jsx)(`span`,{className:`text-pass`,children:r.counts.passed})}),(0,m.jsx)(VT,{label:`Failed`,children:(0,m.jsx)(`span`,{className:r.counts.failed+r.counts.errored?`text-fail`:``,children:r.counts.failed+r.counts.errored})}),(0,m.jsx)(VT,{label:`Elapsed`,children:c?`Stopped`:IT(r,n)})]}),r.state===`finishing`?(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Every attempt has finished; writing the run's record.`}):null]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(dT,{children:[(0,m.jsx)(fT,{children:(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(hT,{className:`w-10`}),(0,m.jsx)(hT,{children:`Attempt`}),(0,m.jsx)(hT,{className:`hidden md:table-cell`,children:`Cell`}),(0,m.jsx)(hT,{className:`hidden sm:table-cell`,children:`Status`}),(0,m.jsx)(hT,{className:`text-right`,children:`Duration`})]})}),(0,m.jsx)(pT,{children:s.flat().map(t=>{let i=Ny(t.status)&&t.status!==`skipped`,a=`${t.name} · #${t.n}`;return(0,m.jsxs)(mT,{"data-live-attempt":t.status,children:[(0,m.jsx)($,{className:`pl-4`,children:(0,m.jsx)(PT,{status:t.status,stopped:c})}),(0,m.jsxs)($,{children:[i?(0,m.jsx)(R,{to:`/live/$runId/attempt`,params:{runId:e},search:{key:t.key},className:`font-medium hover:underline`,children:a}):(0,m.jsx)(`span`,{className:`font-medium`,children:a}),(0,m.jsxs)(`div`,{className:`mt-0.5 font-mono text-[11px] text-muted-foreground`,children:[t.file,(0,m.jsxs)(`span`,{className:`md:hidden`,children:[` · `,t.cell]})]})]}),(0,m.jsx)($,{className:`hidden font-mono text-xs md:table-cell`,children:t.cell}),(0,m.jsx)($,{className:`hidden text-sm text-muted-foreground sm:table-cell`,children:c&&t.status===`running`?`Stopped`:c&&t.status===`queued`?`Never started`:FT[t.status]}),(0,m.jsx)($,{className:`tabular pr-4 text-right text-muted-foreground`,children:(0,m.jsx)(UT,{attempt:t,run:r,now:n})})]},t.key)})})]})})]})}function GT(){let{runId:e}=zT.useParams(),{key:t=``}=zT.useSearch(),n=Ki(),{run:r,landed:i,isPending:a,error:o}=BT(e),s=r?.attempts.find(e=>e.key===t),c=et({...jb(e,t),enabled:!!s&&Ny(s.status)}),l=et({...Cb(e),enabled:i});return(0,p.useEffect)(()=>{if(l.data){for(let r of l.data.evals){let i=r.attempts.find(e=>e.key===t);if(i){n({to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:e,slug:r.slug,attempt:i.id},replace:!0});return}}n({to:`/runs/$runId`,params:{runId:e},replace:!0})}},[l.data,t,n,e]),o?(0,m.jsx)(EC,{error:o}):a||i?(0,m.jsx)(OC,{rows:6}):r?s?(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(sC,{asChild:!0,variant:`ghost`,size:`sm`,className:`-ml-2 text-muted-foreground`,children:(0,m.jsxs)(R,{to:`/live/$runId`,params:{runId:e},children:[(0,m.jsx)(ex,{}),` Run in progress`]})}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[(0,m.jsx)(PT,{status:s.status,className:`size-5`}),(0,m.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:s.name}),(0,m.jsxs)(`span`,{className:`font-mono text-sm text-muted-foreground`,children:[s.cell,`#`,s.n]})]}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[FT[s.status],s.durationMs===null?``:` in ${By(s.durationMs)}`,` · The diff, checks and judge tabs arrive with the run's record.`]})]}),Ny(s.status)?c.error?(0,m.jsx)(TC,{icon:nS,title:`No transcript`,children:`This attempt didn't write one.`}):c.isPending?(0,m.jsx)(OC,{rows:5}):(0,m.jsx)(Qw,{text:c.data}):(0,m.jsx)(TC,{icon:nS,title:`Not finished yet`,children:`The transcript is here once this attempt finishes.`})]}):(0,m.jsxs)(TC,{icon:nS,title:`No such attempt`,children:[`This run has no attempt `,(0,m.jsx)(`span`,{className:`font-mono`,children:t}),`.`]}):(0,m.jsx)(HT,{runId:e})}function KT(){return(0,m.jsxs)(TC,{icon:Bx,title:`Page not found`,children:[`That link doesn't point anywhere in the studio.`,` `,(0,m.jsx)(R,{to:`/`,className:`underline`,children:`Go to runs`})]})}function qT({doc:e,id:t}){let n=e.attempts[t.replace(/:check\d+$/,``)],r=`inline-flex rounded border bg-muted/60 px-1 font-mono text-[10px] text-muted-foreground`;return n?(0,m.jsx)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:n.runId,slug:n.evalSlug,attempt:n.attempt},className:`${r} hover:text-foreground`,children:t}):(0,m.jsx)(`span`,{className:r,title:e.cited[t]??t,children:t})}function JT({doc:e,ids:t}){return(0,m.jsx)(`span`,{className:`ml-1 inline-flex flex-wrap gap-1 align-middle`,children:t.map(t=>(0,m.jsx)(qT,{doc:e,id:t},t))})}function YT({doc:e,title:t,items:n}){return n.length?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:t}),(0,m.jsx)(`ul`,{className:`list-disc space-y-1.5 pl-5 text-sm`,children:n.map(t=>(0,m.jsxs)(`li`,{children:[t.text,(0,m.jsx)(JT,{doc:e,ids:t.cites}),t.confidence===`high`?null:(0,m.jsxs)(`span`,{className:`ml-1 text-xs text-muted-foreground`,children:[`(`,t.confidence,` confidence)`]}),t.unverifiedNumbers?.length?(0,m.jsxs)(`span`,{className:`ml-1 text-xs text-infra`,children:[`(not in the cited facts: `,t.unverifiedNumbers.join(`, `),`)`]}):null]},t.text))})]}):null}function XT({what:e,error:t,children:n}){return(0,m.jsxs)(`div`,{className:`rounded-lg border border-fail/40 bg-fail/5 p-3 text-sm`,children:[(0,m.jsxs)(`p`,{children:[(0,m.jsxs)(`span`,{className:`font-medium text-fail`,children:[e,` failed: `]}),(0,m.jsx)(`span`,{className:`break-words`,children:t})]}),(0,m.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`The run's outcomes don't change.`,n?` `:``,n]})]})}function ZT({entry:e}){let{doc:t}=e,n=t.analysis,r=t.validation,i=(0,m.jsx)(NC,{variant:e.source===`saved`?`secondary`:`outline`,children:e.source===`saved`?`saved`:`local cache`});return t.error===void 0?(0,m.jsxs)(`div`,{className:`space-y-5`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[i,gv(t)?(0,m.jsx)(NC,{variant:`outline`,className:`text-infra`,children:`superseded: re-run reeval analyze`}):null,(0,m.jsxs)(`span`,{children:[t.scope.base?`vs ${t.scope.base}`:`no base run`,t.scope.evals?` · evals matching "${t.scope.evals}"`:``,` · by `,t.author,` ·`,` `,_C(t.createdAt)]})]}),(0,m.jsxs)(`p`,{className:`rounded-lg border bg-muted/40 p-3 text-sm leading-relaxed`,children:[(0,m.jsx)(`span`,{className:`font-semibold`,children:`TL;DR. `}),n.tldr]}),(0,m.jsx)(YT,{doc:t,title:`What happened`,items:n.whatHappened}),(0,m.jsx)(YT,{doc:t,title:`Results`,items:n.results}),(0,m.jsx)(YT,{doc:t,title:`Why`,items:n.why}),n.anomalies.length?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Anomalies`}),(0,m.jsx)(`ul`,{className:`space-y-1.5 text-sm`,children:n.anomalies.map(e=>(0,m.jsxs)(`li`,{children:[(0,m.jsx)(NC,{variant:`outline`,className:`mr-1.5 text-[10px]`,children:e.kind}),e.text,(0,m.jsx)(JT,{doc:t,ids:e.cites})]},e.text))})]}):null,(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Suggested actions`}),n.actions.length===0?(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`None: nothing here is worth acting on.`}):(0,m.jsx)(`ol`,{className:`space-y-3`,children:n.actions.map((e,n)=>(0,m.jsxs)(`li`,{className:`rounded-lg border p-3 text-sm`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(`span`,{className:`font-medium`,children:[n+1,`. `,e.title]}),(0,m.jsx)(NC,{variant:`secondary`,className:`text-[10px]`,children:e.kind}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`impact `,e.impact,` · effort `,e.effort]})]}),(0,m.jsxs)(`p`,{className:`mt-1.5`,children:[(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.target}),`: `,e.change]}),(0,m.jsxs)(`p`,{className:`mt-1 text-muted-foreground`,children:[`Expect: `,e.expectedEffect]}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2 text-xs`,children:[e.verify?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono`,children:e.verify}),(0,m.jsx)(fw,{value:e.verify,label:`copy`})]}):(0,m.jsxs)(`span`,{className:`text-infra`,children:[`Verify command rejected: `,e.verifyProblem??`not reeval’s CLI`]}),(0,m.jsx)(JT,{doc:t,ids:e.cites})]})]},e.title))})]}),(0,m.jsxs)(`p`,{className:`text-sm`,children:[(0,m.jsxs)(`span`,{className:`font-medium`,children:[`Confidence: `,n.confidence.overall,`.`]}),` `,n.confidence.why]}),(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t.resolvedModel??t.model,` · `,t.promptVersion,` · digest v`,t.inputs.digestVersion,t.usage.inputTokens===null?``:` · ${t.usage.inputTokens} in / ${t.usage.outputTokens??`?`} out tokens`,` `,`· `,r.citations,` citations checked, `,r.invalid.length,` invalid, `,r.dropped,` dropped ·`,` `,r.commands,` commands checked, `,r.invalidCommands.length,` rejected · `,e.file]})]}):(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[i,(0,m.jsxs)(`span`,{children:[t.model,` · `,_C(t.createdAt)]})]}),(0,m.jsxs)(XT,{what:`The run's summary`,error:t.error,children:[(0,m.jsxs)(`code`,{className:`font-mono`,children:[`reeval analyze `,t.anchor]}),` calls the model again.`]})]})}function QT({notes:e}){let t=[...new Set(e.map(e=>e.evalId))];return(0,m.jsxs)(`section`,{className:`space-y-3`,"aria-label":`Notes by harness`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Notes by harness`}),t.map(t=>(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t}),(0,m.jsx)(`ul`,{className:`space-y-2`,children:e.filter(e=>e.evalId===t).map(e=>(0,m.jsxs)(`li`,{className:`rounded-lg border p-3 text-sm`,children:[(0,m.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,m.jsx)(NC,{variant:`secondary`,children:e.harness}),(0,m.jsxs)(`span`,{children:[e.attempts.length,` attempt`,e.attempts.length===1?``:`s`,` ·`,` `,e.resolvedModel??e.model]})]}),e.error===void 0?(0,m.jsx)(`p`,{className:`whitespace-pre-wrap leading-relaxed`,children:e.text}):(0,m.jsx)(XT,{what:`This note`,error:e.error})]},e.harness))})]},t))]})}function $T({runId:e}){let{data:t,error:n,isPending:r}=et(Tb(e)),[i,a]=(0,p.useState)();if(n)return(0,m.jsx)(EC,{error:n});if(r)return(0,m.jsx)(OC,{rows:5});let o=t?.entries??[],s=t?.notes??[];if(o.length===0&&s.length===0)return(0,m.jsxs)(TC,{icon:WS,title:`No analysis for this run yet`,children:[`Run `,(0,m.jsxs)(`code`,{className:`font-mono text-xs`,children:[`reeval analyze `,e,` --save`]}),` to write one into the run's history folder, or`,` `,(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:`reeval analyze --context`}),` to hand the digest to your own coding agent.`]});let c=o.find(e=>e.file===i)??o[0];return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[c&&o.length>1?(0,m.jsxs)(iT,{value:c.file,onValueChange:a,children:[(0,m.jsx)(oT,{className:`w-full sm:w-auto`,children:(0,m.jsx)(aT,{})}),(0,m.jsx)(sT,{children:o.map(e=>(0,m.jsxs)(cT,{value:e.file,children:[_C(e.doc.createdAt),` · `,e.source,` · `,e.doc.model,e.doc.error===void 0?``:` · failed`]},e.file))})]}):null,c?(0,m.jsx)(ZT,{entry:c}):(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No summary of the run: run`,` `,(0,m.jsxs)(`code`,{className:`font-mono text-xs`,children:[`reeval analyze `,e,` --save`]}),` to write one.`]}),s.length?(0,m.jsx)(QT,{notes:s}):null]})}var eE=la(`/runs/$runId`);function tE({icon:e,children:t}){return(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(e,{className:`size-3.5`}),t]})}function nE({record:e,children:t}){return(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-start md:justify-between`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:_C(e.startedAt)}),(0,m.jsx)(LC,{outcome:Jy(e)}),e.status===`interrupted`?(0,m.jsx)(NC,{variant:`outline`,className:`text-infra`,children:`interrupted`}):null]}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-sm text-muted-foreground`,children:[(0,m.jsxs)(tE,{icon:fS,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Ky(e.git?.sha)}),e.git?.dirty?(0,m.jsx)(`span`,{className:`text-infra`,children:`· dirty`}):null]}),e.git?.branch?(0,m.jsx)(tE,{icon:uS,children:e.git.branch}):null,(0,m.jsx)(tE,{icon:eC,children:e.runner.kind===`ci`?`CI · ${e.runner.provider}`:e.author}),(0,m.jsx)(tE,{icon:Px,children:By(e.durationMs)}),e.cost.usage?(0,m.jsxs)(tE,{icon:Rx,children:[Gy(e.cost.usage),` tokens`]}):null]})]}),t]})}function rE({warnings:e}){if(e.length===0)return null;let t=e.some(e=>e.kind===`root`);return(0,m.jsxs)(`div`,{role:`alert`,className:Z(`flex gap-3 rounded-xl border p-4 text-sm`,t?`border-fail/40 bg-fail/5`:`border-infra/40 bg-infra/5`),children:[(0,m.jsx)(HS,{className:Z(`mt-0.5 size-4 shrink-0`,t?`text-fail`:`text-infra`)}),(0,m.jsx)(`ul`,{className:`min-w-0 space-y-1`,children:e.map(e=>(0,m.jsxs)(`li`,{className:`break-words`,children:[(0,m.jsx)(`span`,{className:Z(`font-semibold`,e.kind===`root`?`text-fail`:`text-infra`),children:e.kind===`root`?`Root`:`Capabilities`}),` `,(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e.message}),e.file?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,e.file]}):null]},`${e.file}\0${e.message}`))})]})}function iE({node:e,depth:t,selected:n,onSelect:r}){let[i,a]=(0,p.useState)(!0),o={paddingLeft:`${t*14+8}px`};if(e.kind===`eval`){let t=n===e.eval.slug;return(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.eval.slug),style:o,className:Z(`flex w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left text-sm transition-colors`,t?`bg-accent text-foreground`:`text-foreground/85 hover:bg-accent/60`),children:[(0,m.jsx)(IC,{outcome:e.eval.outcome}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),e.eval.todo?(0,m.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:`todo`}):rb(e.eval)?(0,m.jsxs)(`span`,{className:`tabular shrink-0 text-xs text-muted-foreground`,children:[e.tally.pass,`/`,e.tally.pass+e.tally.fail+e.tally.missed+e.tally.infra]}):null]})}let s=t===0,c=s?Wx:oS;return(0,m.jsxs)(`div`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>a(!i),style:o,className:`flex w-full items-center gap-1.5 rounded-md py-1.5 pr-2 text-left text-xs font-medium text-muted-foreground hover:bg-accent/60`,children:[(0,m.jsx)(mx,{className:Z(`size-3.5 transition-transform`,i&&`rotate-90`)}),(0,m.jsx)(c,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:Z(`min-w-0 flex-1 truncate`,s&&`font-mono`),children:e.name}),e.tally.fail?(0,m.jsxs)(`span`,{className:`tabular text-fail`,children:[e.tally.fail,` failed`]}):e.tally.missed?(0,m.jsxs)(`span`,{className:`tabular`,children:[e.tally.missed,` missed, not gated`]}):null]}),i?e.children.map(e=>(0,m.jsx)(iE,{node:e,depth:t+1,selected:n,onSelect:r},e.key)):null]})}function aE(e){return e.flatMap(e=>{if(e.kind===`eval`)return e.eval.outcome===`pass`||e.eval.outcome===`skipped`?[]:[e];let t=aE(e.children);return t.length?[{...e,children:t}]:[]})}function oE({rows:e,runId:t,slug:n}){let r=e.some(e=>e.lift!==null),i=e.some(e=>e.effort!==null),a=e.some(e=>e.usage),o=e.some(e=>e.role===`variant`);return(0,m.jsx)(`div`,{className:`overflow-hidden rounded-lg border`,children:(0,m.jsxs)(dT,{children:[(0,m.jsx)(fT,{children:(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(hT,{children:`Harness`}),(0,m.jsx)(hT,{children:`Environment`}),o?(0,m.jsx)(hT,{children:`Role`}):null,(0,m.jsx)(hT,{className:`hidden 2xl:table-cell`,children:`Sandbox`}),(0,m.jsx)(hT,{children:`Attempts`}),(0,m.jsx)(hT,{className:`text-right`,children:`Pass rate`}),a?(0,m.jsx)(hT,{className:`text-right`,children:`Tokens`}):null,r||i?(0,m.jsx)(hT,{className:`text-right`,children:r&&i?`Lift and effort`:r?`Lift`:`Effort`}):null]})}),(0,m.jsx)(pT,{children:e.map(e=>(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{className:`font-mono text-xs`,children:e.harness}),(0,m.jsxs)($,{className:`font-mono text-xs`,children:[e.environment===`-`?(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`none`}):e.environment,e.overrides.length?(0,m.jsxs)(`div`,{className:`mt-0.5 font-sans text-[11px] text-muted-foreground`,children:[`overrides `,e.overrides.join(`, `)]}):null]}),o?(0,m.jsx)($,{children:(0,m.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[e.role,e.gated?null:(0,m.jsx)(NC,{variant:`outline`,className:`text-[10px] text-muted-foreground`,children:`not gated`})]})}):null,(0,m.jsx)($,{className:`hidden font-mono text-xs 2xl:table-cell`,children:e.sandbox}),(0,m.jsx)($,{children:(0,m.jsx)(`div`,{className:`flex items-center gap-1`,children:e.attempts.map(r=>(0,m.jsx)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:t,slug:n,attempt:r.id},title:`${r.id} · ${By(r.durationMs)}`,className:`rounded-sm p-0.5 hover:bg-accent`,children:(0,m.jsx)(IC,{outcome:r.outcome,missed:!e.gated})},r.id))})}),(0,m.jsxs)($,{className:`text-right`,children:[(0,m.jsx)(zC,{rate:e.passRate}),(0,m.jsxs)(`span`,{className:`tabular ml-1.5 text-xs text-muted-foreground`,children:[e.pass,`/`,e.pass+e.fail]}),e.judgeRates.length?(0,m.jsx)(`div`,{className:`mt-1 text-left text-[11px] text-muted-foreground`,children:(0,m.jsx)(cE,{rates:e.judgeRates})}):null]}),a?(0,m.jsx)($,{className:`text-right text-xs text-muted-foreground`,children:Gy(e.usage)??`–`}):null,r||i?(0,m.jsxs)($,{className:`min-w-44 whitespace-normal text-right`,children:[r?(0,m.jsx)(VC,{points:e.lift,interval:e.liftInterval}):null,e.belowMinLift?(0,m.jsx)(`div`,{className:`text-[11px] text-fail`,children:`lower bound below minLift`}):null,i?(0,m.jsx)(`div`,{className:r?`mt-1`:void 0,children:(0,m.jsx)(sE,{row:e})}):null]}):null]},e.key))})]})})}function sE({row:e}){if(!e.effort)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});let t=e.effortVsControl,n=t&&(t.verdict===`fewer`||t.verdict===`more`);return(0,m.jsxs)(`div`,{className:`tabular text-xs`,children:[(0,m.jsx)(`div`,{children:ay(e.effort)}),t?(0,m.jsxs)(`div`,{className:Z(`text-[11px]`,n?t.verdict===`fewer`?`text-pass`:`text-fail`:`text-muted-foreground`),title:t.toolsP===null?void 0:`exact rank test p = ${t.toolsP.toFixed(3)}`,children:[`tools `,ny(t.toolsRatio),` vs control · `,iy[t.verdict](`tool calls`)]}):null]})}function cE({rates:e}){return e.length===0?null:(0,m.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.map((e,t)=>(0,m.jsxs)(`span`,{className:`tabular`,title:e.question,children:[t>0?` · `:``,e.label,` `,e.pass,`/`,e.counted,e.lift?` (${e.lift.points>=0?`+`:`−`}${Math.round(Math.abs(e.lift.points)*100)} pts)`:``]},e.key))})}function lE({label:e,rates:t}){return t.length===0?null:(0,m.jsxs)(`div`,{className:`space-y-1`,children:[(0,m.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),t.map(e=>(0,m.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,12rem)_minmax(0,1fr)_auto] items-center gap-3 text-xs`,children:[(0,m.jsx)(`span`,{className:`truncate font-mono`,title:e.name,children:e.name}),(0,m.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:e.rate===null?null:(0,m.jsx)(`div`,{className:`h-full bg-pass`,style:{width:`${e.rate*100}%`}})}),(0,m.jsxs)(`span`,{className:`tabular text-right`,children:[(0,m.jsx)(`span`,{className:`font-medium`,children:Vy(e.rate)}),(0,m.jsxs)(`span`,{className:`ml-1.5 text-muted-foreground`,children:[e.wins,`/`,e.n]})]})]},e.name))]})}function uE({rows:e}){return(0,m.jsxs)(`section`,{className:`space-y-2`,"data-questions":!0,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Questions`}),(0,m.jsx)(`div`,{className:`divide-y overflow-hidden rounded-lg border`,children:e.map(e=>(0,m.jsxs)(`div`,{className:`space-y-2.5 px-3.5 py-3`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-3 gap-y-1`,children:[(0,m.jsx)(`p`,{className:`min-w-0 text-sm`,children:e.question}),(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.model})]}),(0,m.jsx)(lE,{label:`Within a harness`,rates:e.within}),(0,m.jsx)(lE,{label:`Across harnesses`,rates:e.across}),e.error===null?null:(0,m.jsxs)(`p`,{className:`font-mono text-xs break-words text-infra`,children:[`failed: `,e.error]}),e.noPairs||e.votes?(0,m.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.noPairs?`No pairs to judge: attempts that failed their checks are left out`:`${vC(e.votes,`vote`)}, ${vC(e.ties,`tie`)}`}):null]},e.question))})]})}function dE({record:e,entry:t}){let n=tb(t),r=rb(t),i=nb(t),a=!r&&n[0]?.judgeRates.length?n[0].judgeRates:[];return(0,m.jsxs)(`div`,{className:`space-y-5`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[t.file,...t.group].join(` › `)}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:t.name}),(0,m.jsx)(LC,{outcome:t.outcome,label:t.todo?`Todo`:void 0})]}),(0,m.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,m.jsx)(sC,{asChild:!0,variant:`outline`,size:`sm`,children:(0,m.jsxs)(R,{to:`/evals/$slug`,params:{slug:t.slug},children:[(0,m.jsx)(MS,{}),` History`]})}),t.tags.map(e=>(0,m.jsxs)(NC,{variant:`secondary`,children:[`#`,e]},e)),t.compare?(0,m.jsxs)(NC,{variant:`outline`,className:`font-mono text-[11px]`,title:t.compare.from===`environment`?`No compare.baseline: the eval's environment is the control`:t.compare.from===`empty`?`No compare.baseline or environment: the control is an empty environment`:void 0,children:[`baseline `,t.compare.baseline]}):null]})]}),r?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Cells`}),(0,m.jsx)(oE,{rows:n,runId:e.runId,slug:t.slug})]}):a.length?(0,m.jsx)(cE,{rates:a}):null,i.length?(0,m.jsx)(uE,{rows:i}):null,(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:vC(t.attempts.length,`attempt`)}),(0,m.jsx)(`div`,{className:`divide-y overflow-hidden rounded-lg border`,children:t.attempts.map(n=>{let r=vy(n.judgements),i=Gy(n.usage),a=cb(t,n);return(0,m.jsxs)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:e.runId,slug:t.slug,attempt:n.id},className:`group flex items-start gap-3 px-3.5 py-3 transition-colors hover:bg-accent/50`,children:[(0,m.jsx)(IC,{outcome:n.outcome,missed:a,className:`mt-0.5`}),(0,m.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-sm`,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:n.id}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[By(n.durationMs),` · `,vC(n.turns.length,`turn`),` ·`,` `,qy(n.activity),i?` · ${i}`:``]}),r.shown.map(e=>(0,m.jsxs)(`span`,{className:Z(`tabular text-xs`,e.verdict===`pass`?`text-pass`:`text-fail`),children:[e.verdict,` `,e.score.toFixed(2),`/`,e.threshold.toFixed(2)]},e.key)),r.extra?(0,m.jsxs)(`span`,{className:`tabular text-xs text-muted-foreground`,children:[r.extra,` judges`]}):null,a?(0,m.jsx)(NC,{variant:`outline`,className:`text-[10px] text-muted-foreground`,children:`missed, not gated`}):null]}),n.error?(0,m.jsxs)(`p`,{className:Z(`mt-1 line-clamp-2 font-mono text-xs`,a?`text-muted-foreground`:`text-fail`),children:[n.error.kind,`: `,n.error.message.split(`
|
|
58
|
-
`)[0]]}):n.turns.at(-1)?.text?(0,m.jsx)(`p`,{className:`mt-1 line-clamp-1 text-xs text-muted-foreground`,children:n.turns.at(-1)?.text}):null]}),(0,m.jsx)(mx,{className:`mt-0.5 size-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100`})]},n.id)})})]})]})}function fE(){let{runId:e}=eE.useParams(),t=eE.useSearch(),n=Ki({from:`/runs/$runId`}),{data:r,error:i,isPending:a}=et(Cb(e)),{data:o}=et(Sb),s=(0,p.useMemo)(()=>r?$y(r):[],[r]);if(i)return(0,m.jsx)(EC,{error:i});if(a)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-[320px_1fr]`,children:[(0,m.jsx)(OC,{rows:8}),(0,m.jsx)(OC,{rows:4})]})]});let c=t.show===`failed`?aE(s):s,l=r.evals.find(e=>e.slug===t.eval)??r.evals.find(e=>e.outcome===`fail`||e.outcome===`infra_error`)??r.evals[0],u=(o?.headers??[]).find(t=>t.runId<e&&t.status===`complete`),{pass:d,fail:f,notGated:h,infraError:g,skipped:_}=r.summary,v=f-h;return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/`,className:`hover:text-foreground`,children:`Runs`}),(0,m.jsx)(mx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`truncate font-mono text-xs text-foreground`,children:e})]}),(0,m.jsx)(nE,{record:r,children:(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[u?(0,m.jsx)(sC,{asChild:!0,variant:`outline`,size:`sm`,children:(0,m.jsxs)(R,{to:`/compare`,search:{base:u.runId,head:e},children:[(0,m.jsx)(mS,{}),` Compare with previous`]})}):null,r.git?(0,m.jsx)(fw,{value:`reeval checkout ${e}`,label:`reeval checkout`}):null]})}),(0,m.jsx)(rE,{warnings:r.plan.sandboxWarnings}),(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card p-4`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-sm`,children:[(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`span`,{className:`font-semibold`,children:d}),` passed`,v?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold text-fail`,children:v}),` failed`]}):null,h?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold`,children:h}),` missed, not gated`]}):null,g?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold text-infra`,children:g}),` infra errors`]}):null,_?` · ${_} skipped`:``,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`across `,vC(r.summary.evals,`eval`),`,`,` `,vC(r.summary.attempts,`attempt`)]})]}),(0,m.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[r.stack.harnesses.map(e=>e.id).join(`, `),` · judge`,` `,r.config.judgeModel??`none`,r.profile?` · profile ${r.profile.name}`:``]})]}),(0,m.jsx)(RC,{className:`mt-3 h-2`,pass:d,fail:v,missed:h,infra:g,skipped:_})]}),(0,m.jsxs)(WC,{value:t.tab??`evals`,onValueChange:e=>n({search:t=>({...t,tab:e===`analysis`?`analysis`:void 0}),replace:!0}),children:[(0,m.jsxs)(KC,{children:[(0,m.jsx)(qC,{value:`evals`,children:`Evals`}),(0,m.jsx)(qC,{value:`analysis`,children:`Analysis`})]}),(0,m.jsx)(JC,{value:`evals`,className:`mt-4`,children:r.evals.length===0?(0,m.jsx)(TC,{icon:SS,title:`No evals ran`,children:`This run matched no evals, so there's nothing to show.`}):(0,m.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[340px_minmax(0,1fr)]`,children:[(0,m.jsx)(`aside`,{className:`min-w-0 lg:sticky lg:top-20 lg:self-start`,children:(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2`,children:[(0,m.jsx)(`span`,{className:`text-sm font-medium`,children:`Evals`}),(0,m.jsx)(`div`,{className:`inline-flex rounded-md bg-muted p-0.5 text-xs`,children:[[void 0,`All`],[`failed`,`Failing`]].map(([e,r])=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>n({search:t=>({...t,show:e}),replace:!0}),className:Z(`rounded px-2 py-0.5`,t.show===e?`bg-background shadow-sm`:`text-muted-foreground`),children:r},r))})]}),(0,m.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto p-1.5 lg:max-h-[calc(100dvh-14rem)]`,children:c.length===0?(0,m.jsx)(`p`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:`Nothing failed in this run.`}):c.map(e=>(0,m.jsx)(iE,{node:e,depth:0,selected:l?.slug,onSelect:e=>n({search:t=>({...t,eval:e}),replace:!0})},e.key))})]})}),(0,m.jsx)(`section`,{className:`min-w-0 rounded-xl border bg-card p-5`,children:l?(0,m.jsx)(dE,{record:r,entry:l}):null})]})}),(0,m.jsx)(JC,{value:`analysis`,className:`mt-4`,children:(0,m.jsx)(`section`,{className:`rounded-xl border bg-card p-5`,children:(0,m.jsx)($T,{runId:e})})})]}),(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Started `,hC(r.startedAt),` · artifacts: `,r.artifacts,` · reeval`,` `,r.stack.es]})]})}var pE=la(`/`);function mE({entry:e}){if(e.ci){let t=(0,m.jsxs)(NC,{variant:`secondary`,className:`gap-1 font-normal`,children:[(0,m.jsx)(ix,{}),` `,e.ci.provider]});return e.ci.runUrl?(0,m.jsx)(`a`,{href:e.ci.runUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),children:t}):t}return(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-muted-foreground`,children:[(0,m.jsx)(eC,{className:`size-3.5`}),e.author]})}function hE({hasScratch:e}){let t=pE.useSearch(),n=Ki({from:`/`}),r=e=>n({search:t=>({...t,...e}),replace:!0}),i=({value:e,label:n})=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>r({status:e}),className:Z(`rounded-md px-3 py-1 text-sm transition-colors`,t.status===e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:n});return(0,m.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,m.jsxs)(`div`,{className:`relative sm:w-80`,children:[(0,m.jsx)(BS,{className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,m.jsx)(ZC,{value:t.q??``,onChange:e=>r({q:e.target.value||void 0}),placeholder:`Filter by branch, commit, author or run id`,className:`h-9 pl-8`})]}),(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(`div`,{className:`inline-flex rounded-lg bg-muted p-0.5`,children:[(0,m.jsx)(i,{value:void 0,label:`All`}),(0,m.jsx)(i,{value:`failed`,label:`Failing`}),(0,m.jsx)(i,{value:`passed`,label:`Passing`})]}),e?(0,m.jsx)(`div`,{className:`inline-flex rounded-lg bg-muted p-0.5`,children:[[void 0,`Everything`],[`recorded`,`Recorded`],[`scratch`,`Scratch`]].map(([e,n])=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>r({source:e}),className:Z(`rounded-md px-3 py-1 text-sm transition-colors`,t.source===e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:n},n))}):null]})]})}function gE({rows:e}){let t=e.slice(0,30).reverse();return(0,m.jsx)(`div`,{className:`flex h-10 items-end gap-[3px]`,children:t.map(e=>{let t=e.total?e.passed/e.total:0;return(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e.entry.runId},className:`group flex h-full w-2 flex-col justify-end sm:w-2.5`,children:(0,m.jsx)(`div`,{className:Z(`w-full rounded-sm transition-opacity group-hover:opacity-70`,t>=.999?`bg-pass`:t===0?`bg-fail`:`bg-infra`),style:{height:`${Math.max(12,t*100)}%`}})})}),(0,m.jsxs)(mv,{children:[Vy(e.total?t:null),` · `,Ky(e.entry.git?.sha),` ·`,` `,hC(e.entry.startedAt)]})]},e.entry.runId)})})}function _E({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`mt-1 text-lg font-semibold tracking-tight`,children:t})]})}function vE(){let e=pE.useSearch(),t=Ki(),{data:n}=Ob(),{data:r,error:i,isPending:a}=et(Sb),{runs:o}=Ab(),s=(0,p.useMemo)(()=>r?Yy(r.headers):[],[r]),c=(0,p.useMemo)(()=>{let t=e.q?.toLowerCase();return s.filter(({entry:n})=>e.status===`failed`&&Jy(n)===`pass`||e.status===`passed`&&Jy(n)!==`pass`||e.source===`recorded`&&!n.recorded||e.source===`scratch`&&n.recorded?!1:!t||[n.runId,n.author,n.git?.branch??``,n.git?.sha??``,n.ci?.provider??``].join(` `).toLowerCase().includes(t))},[s,e]);if(i)return(0,m.jsx)(EC,{error:i});if(a)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(kC,{}),(0,m.jsx)(OC,{rows:8})]});let l=s[0],u=s.some(e=>!e.entry.recorded);return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Runs`}),(0,m.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s.length?`${vC(s.length,`run`)} · ${vC(r.manifest.evals.length,`eval`)} tracked`:`Every recorded run of this project, newest first.`})]}),s.length>1?(0,m.jsx)(gE,{rows:s}):null]}),(0,m.jsx)(LT,{runs:o.filter(e=>!s.some(t=>t.entry.runId===e.runId))}),s.length===0&&o.length?null:s.length===0?(0,m.jsxs)(TC,{icon:MS,title:`No runs yet`,children:[`Record one with `,(0,m.jsx)(DC,{children:`reeval run --record`}),`, or promote your latest scratch run with`,` `,(0,m.jsx)(DC,{children:`reeval record latest`}),`.`,` `,n?.mode===`live`?`It shows up here as soon as it lands.`:``]}):(0,m.jsxs)(m.Fragment,{children:[l?(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-4`,children:[(0,m.jsx)(_E,{label:`Latest run`,children:(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(IC,{outcome:Jy(l.entry),className:`size-5`}),hC(l.entry.startedAt)]})}),(0,m.jsxs)(_E,{label:`Latest pass rate`,children:[Vy(l.total?l.passed/l.total:null),(0,m.jsxs)(`span`,{className:`ml-1.5 text-sm font-normal text-muted-foreground`,children:[l.passed,`/`,l.total]})]}),(0,m.jsxs)(_E,{label:`Failing runs`,children:[s.filter(e=>Jy(e.entry)!==`pass`).length,(0,m.jsxs)(`span`,{className:`ml-1.5 text-sm font-normal text-muted-foreground`,children:[`of `,s.length]})]}),(0,m.jsx)(_E,{label:`Branches`,children:new Set(s.map(e=>e.entry.git?.branch??`–`)).size})]}):null,(0,m.jsx)(hE,{hasScratch:u}),c.length===0?(0,m.jsxs)(TC,{icon:BS,title:`No runs match`,children:[`Try a different filter, or clear it to see all `,s.length,` runs.`]}):(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(dT,{children:[(0,m.jsx)(fT,{children:(0,m.jsxs)(mT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(hT,{className:`w-10`}),(0,m.jsx)(hT,{children:`Run`}),(0,m.jsx)(hT,{children:`Commit`}),(0,m.jsx)(hT,{className:`hidden md:table-cell`,children:`Who`}),(0,m.jsx)(hT,{className:`w-44`,children:`Result`}),(0,m.jsx)(hT,{className:`hidden text-right lg:table-cell`,children:`Tokens`}),(0,m.jsx)(hT,{className:`hidden text-right sm:table-cell`,children:`Duration`}),(0,m.jsx)(hT,{className:`w-24`})]})}),(0,m.jsx)(pT,{children:c.map(e=>{let{entry:n}=e;return(0,m.jsxs)(mT,{className:`cursor-pointer`,onClick:()=>t({to:`/runs/$runId`,params:{runId:n.runId}}),children:[(0,m.jsx)($,{className:`pl-4`,children:(0,m.jsx)(IC,{outcome:Jy(n)})}),(0,m.jsxs)($,{children:[(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:n.runId},className:`font-medium hover:underline`,onClick:e=>e.stopPropagation(),children:(0,m.jsx)(`span`,{title:_C(n.startedAt),children:hC(n.startedAt)})}),(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:n.runId}),n.recorded?null:(0,m.jsx)(NC,{variant:`outline`,className:`h-4 px-1.5 text-[10px] text-muted-foreground`,children:`scratch`}),n.status===`interrupted`?(0,m.jsx)(NC,{variant:`outline`,className:`h-4 px-1.5 text-[10px] text-infra`,children:`interrupted`}):null]})]}),(0,m.jsxs)($,{children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-1.5 font-mono text-xs`,children:[Ky(n.git?.sha),n.git?.dirty?(0,m.jsx)(`span`,{className:`size-1.5 rounded-full bg-infra`,title:`Uncommitted changes`}):null]}),n.git?.branch?(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(uS,{className:`size-3`}),(0,m.jsx)(`span`,{className:`max-w-40 truncate`,children:n.git.branch})]}):null]}),(0,m.jsx)($,{className:`hidden md:table-cell`,children:(0,m.jsx)(mE,{entry:n})}),(0,m.jsxs)($,{children:[(0,m.jsx)(`div`,{className:`flex items-center justify-between gap-2 text-xs`,children:(0,m.jsxs)(`span`,{className:`tabular font-medium`,children:[e.passed,`/`,e.total,(0,m.jsx)(`span`,{className:`ml-1 font-normal text-muted-foreground`,children:`passed`})]})}),(0,m.jsx)(RC,{className:`mt-1.5`,pass:n.summary.pass,fail:n.summary.fail-n.summary.notGated,missed:n.summary.notGated,infra:n.summary.infraError,skipped:n.summary.skipped})]}),(0,m.jsx)($,{className:`tabular hidden text-right text-muted-foreground lg:table-cell`,children:Gy(n.usage)??`–`}),(0,m.jsx)($,{className:`tabular hidden text-right text-muted-foreground sm:table-cell`,children:By(n.durationMs)}),(0,m.jsx)($,{className:`pr-4 text-right`,children:(0,m.jsx)(HC,{changes:e.drift,evals:e.changedEvals})})]},n.runId)})})]})})]})]})}var yE=e=>typeof e==`string`&&e?e:void 0,bE=(e,t)=>e.includes(t)?t:void 0,xE=pa()({component:CC,notFoundComponent:KT}),SE=fa({getParentRoute:()=>xE,path:`/`,validateSearch:e=>({q:yE(e.q),status:bE([`passed`,`failed`],e.status),source:bE([`recorded`,`scratch`],e.source)}),loader:({context:e})=>e.queryClient.prefetchQuery(Sb),component:vE}),CE=fa({getParentRoute:()=>xE,path:`/runs/$runId`,validateSearch:e=>({eval:yE(e.eval),show:bE([`failed`],e.show),tab:bE([`analysis`],e.tab)}),loader:({context:e,params:t})=>e.queryClient.prefetchQuery(Cb(t.runId)),component:fE}),wE=fa({getParentRoute:()=>xE,path:`/runs/$runId/evals/$slug/attempts/$attempt`,validateSearch:e=>({tab:bE($w,e.tab)}),loader:({context:e,params:t})=>e.queryClient.prefetchQuery(Cb(t.runId)),component:rT}),TE=fa({getParentRoute:()=>xE,path:`/live/$runId`,component:WT}),EE=fa({getParentRoute:()=>xE,path:`/live/$runId/attempt`,validateSearch:e=>({key:yE(e.key)}),component:GT}),DE=fa({getParentRoute:()=>xE,path:`/evals`,validateSearch:e=>({q:yE(e.q)}),component:kT}),OE=fa({getParentRoute:()=>xE,path:`/evals/$slug`,component:DT}),kE=fa({getParentRoute:()=>xE,path:`/compare`,validateSearch:e=>({base:yE(e.base),head:yE(e.head)}),component:TT}),AE=xE.addChildren([SE,CE,wE,TE,EE,DE,OE,kE]);function jE(e){return Ma({routeTree:AE,history:Vn(),context:{queryClient:e},defaultPreload:`intent`,defaultPreloadStaleTime:0,scrollRestoration:!0})}Rb();var ME=new Ve({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof _b)&&e<2}}}),NE=jE(ME);(0,Lg.createRoot)(document.getElementById(`root`)).render((0,m.jsx)(p.StrictMode,{children:(0,m.jsx)(_,{client:ME,children:(0,m.jsx)(dv,{delayDuration:200,children:(0,m.jsx)(Fa,{router:NE})})})}));
|
|
50
|
+
`},fl=0,pl=[];function ml(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(fl++)[0],a=p.useState(Ic)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=fc([e.lockRef.current],(e.shards||[]).map(ll),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=sl(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=el(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=el(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ol(h,t,e,h===`h`?s:c,!0)},[]),c=p.useCallback(function(e){var n=e;if(pl.length&&pl[pl.length-1]===a){var r=`deltaY`in n?cl(n):sl(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ul(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ll).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=p.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:hl(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=p.useCallback(function(e){n.current=sl(e),r.current=void 0},[]),d=p.useCallback(function(t){l(t.type,cl(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){l(t.type,sl(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return pl.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Yc),document.addEventListener(`touchmove`,c,Yc),document.addEventListener(`touchstart`,u,Yc),function(){pl=pl.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Yc),document.removeEventListener(`touchmove`,c,Yc),document.removeEventListener(`touchstart`,u,Yc)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:dl(i)}):null,m?p.createElement(Kc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var gl=Ec(Dc,ml),_l=p.forwardRef(function(e,t){return p.createElement(kc,uc({},e,{ref:t,sideCar:gl}))});_l.classNames=kc.classNames;var vl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},yl=new WeakMap,bl=new WeakMap,xl={},Sl=0,Cl=function(e){return e&&(e.host||Cl(e.parentNode))},wl=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Cl(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Tl=function(e,t,n,r){var i=wl(t,Array.isArray(e)?e:[e]);xl[n]||(xl[n]=new WeakMap);var a=xl[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(yl.get(e)||0)+1,l=(a.get(e)||0)+1;yl.set(e,c),a.set(e,l),o.push(e),c===1&&i&&bl.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Sl++,function(){o.forEach(function(e){var t=yl.get(e)-1,i=a.get(e)-1;yl.set(e,t),a.set(e,i),t||(bl.has(e)||e.removeAttribute(r),bl.delete(e)),i||e.removeAttribute(n)}),Sl--,Sl||(yl=new WeakMap,yl=new WeakMap,bl=new WeakMap,xl={})}},El=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||vl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Tl(r,i,n,`aria-hidden`)):function(){return null}},Dl=Object.defineProperty,Ol=(e,t)=>Dl(e,`name`,{value:t,configurable:!0});function kl(e){let[t,n]=p.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Ol(kl,`useSize`);var Al=[`top`,`right`,`bottom`,`left`],jl=Math.min,Ml=Math.max,Nl=Math.round,Pl=Math.floor,Fl=e=>({x:e,y:e}),Il={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ll(e,t,n){return Ml(e,jl(t,n))}function Rl(e,t){return typeof e==`function`?e(t):e}function zl(e){return e.split(`-`)[0]}function Bl(e){return e.split(`-`)[1]}function Vl(e){return e===`x`?`y`:`x`}function Hl(e){return e===`y`?`height`:`width`}function Ul(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wl(e){return Vl(Ul(e))}function Gl(e,t,n){n===void 0&&(n=!1);let r=Bl(e),i=Wl(e),a=Hl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=eu(o)),[o,eu(o)]}function Kl(e){let t=eu(e);return[ql(e),t,ql(t)]}function ql(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jl=[`left`,`right`],Yl=[`right`,`left`],Xl=[`top`,`bottom`],Zl=[`bottom`,`top`];function Ql(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yl:Jl:t?Jl:Yl;case`left`:case`right`:return t?Xl:Zl;default:return[]}}function $l(e,t,n,r){let i=Bl(e),a=Ql(zl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ql)))),a}function eu(e){let t=zl(e);return Il[t]+e.slice(t.length)}function tu(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function nu(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tu(e)}function ru(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function iu(e,t,n){let{reference:r,floating:i}=e,a=Ul(t),o=Wl(t),s=Hl(o),c=zl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function au(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Rl(t,e),p=nu(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ru(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ru(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ou=50,su=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:au},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=iu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ou&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=iu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},cu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Rl(e,t)||{};if(l==null)return{};let d=nu(u),f={x:n,y:r},p=Wl(i),m=Hl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jl(d[_],T),D=jl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ll(E,k,O),j=!c.arrow&&Bl(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}}),lu=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Rl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zl(r),_=Ul(o),v=zl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[eu(o)]:Kl(o)),x=p!==`none`;!d&&x&&b.push(...$l(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ul(t)||T.every(e=>Ul(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ul(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function uu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function du(e){return Al.some(t=>e[t]>=0)}var fu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Rl(e,t);switch(i){case`referenceHidden`:{let e=uu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:du(e)}}}case`escaped`:{let e=uu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:du(e)}}}default:return{}}}}},pu=new Set([`left`,`top`]);async function mu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zl(n),s=Bl(n),c=Ul(n)===`y`,l=pu.has(o)?-1:1,u=a&&c?-1:1,d=Rl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var hu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},gu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Rl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ul(i),p=Vl(f),m=u[p],h=u[f],g=(e,t)=>Ll(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},_u=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Rl(e,t),u={x:n,y:r},d=Ul(i),f=Vl(d),p=u[f],m=u[d],h=Rl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=pu.has(zl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Rl(e,t),c=await i.detectOverflow(t,s),l=zl(n),u=Bl(n),d=Ul(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jl(p-c[m],g),y=jl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ml(c.left,c.right):S=p-2*Ml(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function yu(){return typeof window<`u`}function bu(e){return Cu(e)?(e.nodeName||``).toLowerCase():`#document`}function xu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Su(e){return((Cu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Cu(e){return yu()?e instanceof Node||e instanceof xu(e).Node:!1}function wu(e){return yu()?e instanceof Element||e instanceof xu(e).Element:!1}function V(e){return yu()?e instanceof HTMLElement||e instanceof xu(e).HTMLElement:!1}function Tu(e){return!yu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xu(e).ShadowRoot}function Eu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Lu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Du(e){return/^(table|td|th)$/.test(bu(e))}function Ou(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ku=/transform|translate|scale|rotate|perspective|filter/,Au=/paint|layout|strict|content/,ju=e=>!!e&&e!==`none`,Mu;function Nu(e){let t=wu(e)?Lu(e):e;return ju(t.transform)||ju(t.translate)||ju(t.scale)||ju(t.rotate)||ju(t.perspective)||!Fu()&&(ju(t.backdropFilter)||ju(t.filter))||ku.test(t.willChange||``)||Au.test(t.contain||``)}function Pu(e){let t=zu(e);for(;V(t)&&!Iu(t);){if(Nu(t))return t;if(Ou(t))return null;t=zu(t)}return null}function Fu(){return Mu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Mu}function Iu(e){return/^(html|body|#document)$/.test(bu(e))}function Lu(e){return xu(e).getComputedStyle(e)}function Ru(e){return wu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zu(e){if(bu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Tu(e)&&e.host||Su(e);return Tu(t)?t.host:t}function Bu(e){let t=zu(e);return Iu(t)?(e.ownerDocument||e).body:V(t)&&Eu(t)?t:Bu(t)}function Vu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Bu(e),i=r===e.ownerDocument?.body,a=xu(r);if(i){let e=Hu(a);return t.concat(a,a.visualViewport||[],Eu(r)?r:[],e&&n?Vu(e):[])}return t.concat(r,Vu(r,[],n))}function Hu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uu(e){let t=Lu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nl(n)!==a||Nl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Wu(e){return wu(e)?e:e.contextElement}function Gu(e){let t=Wu(e);if(!V(t))return Fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Uu(t),o=(a?Nl(n.width):n.width)/r,s=(a?Nl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ku=Fl(0);function qu(e){let t=xu(e);return!Fu()||!t.visualViewport?Ku:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ju(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xu(e)}function Yu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Wu(e),o=Fl(1);t&&(r?wu(r)&&(o=Gu(r)):o=Gu(e));let s=Ju(a,n,r)?qu(a):Fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=xu(a),t=wu(r)?xu(r):r,n=e,i=Hu(n);for(;i&&t!==n;){let e=Gu(i),t=i.getBoundingClientRect(),r=Lu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xu(i),i=Hu(n)}}return ru({width:u,height:d,x:c,y:l})}function Xu(e,t){let n=Ru(e).scrollLeft;return t?t.left+n:Yu(Su(e)).left+n}function Zu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xu(e,n),y:n.top+t.scrollTop}}function Qu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Su(r),s=t?Ou(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fl(1),u=Fl(0),d=V(r);if((d||!a)&&((bu(r)!==`body`||Eu(o))&&(c=Ru(r)),d)){let e=Yu(r);l=Gu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Zu(o,c):Fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function $u(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ed(e){let t=Ru(e),n=e.ownerDocument.body,r=Ml(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ml(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Xu(e),o=-t.scrollTop;return Lu(n).direction===`rtl`&&(a+=Ml(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var td=25;function nd(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=xu(e),a=Su(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Fu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Xu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=td&&(s-=o)}return{width:s,height:c,x:l,y:u}}function rd(e,t){let n=Yu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function H(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=nd(e,n,t);else if(t===`document`)r=ed(Su(e));else if(wu(t))r=rd(t,n);else{let n=qu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ru(r)}function id(e,t){let n=t.get(e);if(n)return n;let r=Vu(e,[],!1).filter(e=>wu(e)&&bu(e)!==`body`),i=null,a=Lu(e).position===`fixed`,o=a?zu(e):e;for(;wu(o)&&!Iu(o);){let e=Lu(o),t=Nu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=zu(o)}return t.set(e,r),r}function U(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ou(t)?[]:id(t,this._c):[].concat(n),r],o=H(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=H(t,a[e],i);s=Ml(n.top,s),c=jl(n.right,c),l=jl(n.bottom,l),u=Ml(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function W(e){let{width:t,height:n}=Uu(e);return{width:t,height:n}}function ad(e,t,n){let r=V(t),i=Su(t),a=n===`fixed`,o=Yu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fl(0);if((r||!a)&&((bu(t)!==`body`||Eu(i))&&(s=Ru(t)),r)){let e=Yu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Xu(i));let l=i&&!r&&!a?Zu(i,s):Fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function od(e){return Lu(e).position===`static`}function sd(e,t){if(!V(e)||Lu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Su(e)===n&&(n=n.ownerDocument.body),n}function cd(e,t){let n=xu(e);if(Ou(e))return n;if(!V(e)){let t=zu(e);for(;t&&!Iu(t);){if(wu(t)&&!od(t))return t;t=zu(t)}return n}let r=sd(e,t);for(;r&&Du(r)&&od(r);)r=sd(r,t);return r&&Iu(r)&&od(r)&&!Nu(r)?n:r||Pu(e)||n}var ld=async function(e){let t=this.getOffsetParent||cd,n=this.getDimensions,r=await n(e.floating);return{reference:ad(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ud(e){return Lu(e).direction===`rtl`}var dd={convertOffsetParentRelativeRectToViewportRelativeRect:Qu,getDocumentElement:Su,getClippingRect:U,getOffsetParent:cd,getElementRects:ld,getClientRects:$u,getDimensions:W,getScale:Gu,isElement:wu,isRTL:ud};function fd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pd(e,t,n){let r=null,i,a=Su(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Pl(d),h=Pl(a.clientWidth-(u+f)),g=Pl(a.clientHeight-(d+p)),_=Pl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ml(0,jl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!fd(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=xu(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function md(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Wu(e),u=i||a?[...l?Vu(l):[],...t?Vu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?pd(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Yu(e):null;c&&g();function g(){let t=Yu(e);h&&!fd(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var hd=hu,gd=gu,_d=lu,vd=vu,yd=fu,bd=cu,xd=_u,Sd=(e,t,n)=>{let r=new Map,i=n??{},a={...dd,...i.platform,_c:r};return su(e,t,{...i,platform:a})},Cd=typeof document<`u`?p.useLayoutEffect:function(){};function wd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!wd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Td(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ed(e,t){let n=Td(e);return Math.round(t*n)/n}function Dd(e){let t=p.useRef(e);return Cd(()=>{t.current=e}),t}function Od(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);wd(f,r)||m(r);let[h,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=p.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=p.useRef(null),w=p.useRef(null),T=p.useRef(u),E=c!=null,D=Dd(c),O=Dd(i),k=Dd(l),A=p.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Sd(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!wd(T.current,t)&&(T.current=t,lo.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Cd(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=p.useRef(!1);Cd(()=>(j.current=!0,()=>{j.current=!1}),[]),Cd(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=p.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=p.useMemo(()=>({reference:x,floating:S}),[x,S]),te=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ed(M.floating,u.x),r=Ed(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Td(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:A,refs:ee,elements:M,floatingStyles:te}),[u,A,ee,M,te])}var kd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:bd({element:r.current,padding:i}).fn(n):r?bd({element:r,padding:i}).fn(n):{}}}},Ad=(e,t)=>{let n=hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},jd=(e,t)=>{let n=gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Md=(e,t)=>({fn:xd(e).fn,options:[e,t]}),Nd=(e,t)=>{let n=_d(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pd=(e,t)=>{let n=vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fd=(e,t)=>{let n=yd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Id=(e,t)=>{let n=kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ld=Object.defineProperty,Rd=p.forwardRef(((e,t)=>Ld(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,m.jsx)(po.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,m.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),zd=Object.defineProperty,Bd=(e,t)=>zd(e,`name`,{value:t,configurable:!0}),Vd=`Popper`,[Hd,Ud]=So(Vd),[Wd,Gd]=Hd(Vd),Kd=Bd(e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,m.jsx)(Wd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),qd=`PopperAnchor`,Jd=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Gd(qd,n),o=p.useRef(null),s=a.onAnchorChange,c=Ka(t,p.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&af(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,m.jsx)(po.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Yd=`PopperContent`,[Xd,Zd]=Hd(Yd),Qd=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Gd(Yd,n),[y,b]=p.useState(null),x=Ka(t,b),[S,C]=p.useState(null),w=kl(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(nf),altBoundary:A},{refs:ee,floatingStyles:M,placement:te,isPositioned:ne,middlewareData:N}=Od({strategy:`fixed`,placement:D,whileElementsMounted:Bd((...e)=>md(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[Ad({mainAxis:i+E,alignmentAxis:o}),c&&jd({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Md():void 0,...j}),c&&Nd({...j}),Pd({...j,apply:Bd(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Id({element:S,padding:s}),rf({arrowWidth:T,arrowHeight:E}),f&&Fd({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),re=v.setPlacementState;B(()=>(re(te),()=>{re(void 0)}),[te,re]);let[ie,ae]=af(te),oe=Cs(g);B(()=>{ne&&oe?.()},[ne,oe]);let se=N.arrow?.x,ce=N.arrow?.y,le=N.arrow?.centerOffset!==0,[ue,de]=p.useState();return B(()=>{y&&de(window.getComputedStyle(y).zIndex)},[y]),(0,m.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ne?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,m.jsx)(Xd,{scope:n,placedSide:ie,placedAlign:ae,onArrowChange:C,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,m.jsx)(po.div,{"data-side":ie,"data-align":ae,..._,ref:x,style:{..._.style,animation:ne?_.style?.animation:`none`}})})})},`PopperContent`)),$d=`PopperArrow`,ef={top:`bottom`,right:`left`,bottom:`top`,left:`right`},tf=p.forwardRef(Bd(function(e,t){let{__scopePopper:n,...r}=e,i=Zd($d,n),a=ef[i.placedSide];return(0,m.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,m.jsx)(Rd,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function nf(e){return e!==null}Bd(nf,`isNotNull`);var rf=Bd(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=af(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function af(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Bd(af,`getSideAndAlignFromPlacement`);var of=Kd,sf=Jd,cf=Qd,lf=tf,uf=Object.defineProperty,df=(e,t)=>uf(e,`name`,{value:t,configurable:!0}),ff=!1;function pf(){let[e,t]=p.useState(ff);return p.useEffect(()=>{ff||(ff=!0,t(!0))},[]),e}df(pf,`useIsHydrated`);var mf=p.useSyncExternalStore;function hf(){return()=>{}}df(hf,`subscribe`);function gf(){return mf(hf,()=>!0,()=>!1)}df(gf,`useIsHydratedModern`);var _f=typeof mf==`function`?gf:pf,vf=Object.defineProperty,yf=(e,t)=>vf(e,`name`,{value:t,configurable:!0}),G=`rovingFocusGroup.onEntryFocus`,bf={bubbles:!1,cancelable:!0},xf=`RovingFocusGroup`,[Sf,Cf,wf]=Eo(xf),[Tf,Ef]=So(xf,[wf]),[Df,Of]=Tf(xf),kf=p.forwardRef(yf(function(e,t){return(0,m.jsx)(Sf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(Sf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(Af,{...e,ref:t})})})},`RovingFocusGroup`)),Af=p.forwardRef(yf(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=p.useRef(null),h=Ka(t,f),g=bs(a),[_,v]=Qo({prop:o,defaultProp:s??null,onChange:c,caller:xf}),[y,b]=p.useState(!1),x=Cs(l),S=Cf(n),C=p.useRef(!1),[w,T]=p.useState(0);return p.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(G,x),()=>e.removeEventListener(G,x)},[x]),(0,m.jsx)(Df,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>T(e=>e-1),[]),children:(0,m.jsx)(po.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:`none`,...e.style},onMouseDown:z(e.onMouseDown,()=>{C.current=!0}),onFocus:z(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(G,bf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);If([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:z(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),jf=`RovingFocusGroupItem`,Mf=p.forwardRef(yf(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=gs(),l=a||c,u=Of(jf,n),d=u.currentTabStopId===l,f=Cf(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=u,v=_f();return B(()=>{if(v&&r)return h(),()=>g()},[v,r,h,g]),p.useEffect(()=>{if(!v&&r)return h(),()=>g()},[v,r,h,g]),(0,m.jsx)(Sf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,m.jsx)(po.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:z(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ff(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Lf(n,r+1):n.slice(r+1)}setTimeout(()=>If(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),Nf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Pf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}yf(Pf,`getDirectionAwareKey`);function Ff(e,t,n){let r=Pf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Nf[r]}yf(Ff,`getFocusIntent`);function If(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}yf(If,`focusFirst`);function Lf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}yf(Lf,`wrapArray`);var Rf=kf,zf=Mf,Bf=Object.defineProperty,Vf=(e,t)=>Bf(e,`name`,{value:t,configurable:!0}),Hf=[`Enter`,` `],Uf=[`ArrowDown`,`PageUp`,`Home`],Wf=[`ArrowUp`,`PageDown`,`End`],Gf=[...Uf,...Wf];[...Hf],[...Hf];var Kf=`Menu`,[qf,K,Jf]=Eo(Kf),[Yf,Xf]=So(Kf,[Jf,Ud,Ef]),Zf=Ud(),Qf=Ef(),[$f,ep]=Yf(Kf),[tp,np]=Yf(Kf),rp=Vf(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Zf(t),[c,l]=p.useState(null),u=p.useRef(!1),d=Cs(a),f=bs(i);return p.useEffect(()=>{let e=Vf(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Vf(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),p.useEffect(()=>{if(!n)return;let e=Vf(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,m.jsx)(of,{...s,children:(0,m.jsx)($f,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,m.jsx)(tp,{scope:t,onClose:p.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),ip=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,...r}=e,i=Zf(n);return(0,m.jsx)(sf,{...i,...r,ref:t})},`MenuAnchor`)),ap=`MenuPortal`,[op,sp]=Yf(ap,{forceMount:void 0}),cp=Vf(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ep(ap,t);return(0,m.jsx)(op,{scope:t,forceMount:n,children:(0,m.jsx)(os,{present:n||a.open,children:(0,m.jsx)(nc,{asChild:!0,container:i,children:r})})})},`MenuPortal`),lp=`MenuContent`,[up,dp]=Yf(lp),fp=p.forwardRef(Vf(function(e,t){let n=sp(lp,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ep(lp,e.__scopeMenu),o=np(lp,e.__scopeMenu);return(0,m.jsx)(qf.Provider,{scope:e.__scopeMenu,children:(0,m.jsx)(os,{present:r||a.open,children:(0,m.jsx)(qf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,m.jsx)(pp,{...i,ref:t}):(0,m.jsx)(mp,{...i,ref:t})})})})},`MenuContent`)),pp=p.forwardRef(Vf(function(e,t){let n=ep(lp,e.__scopeMenu),r=p.useRef(null),i=Ka(t,r);return p.useEffect(()=>{let e=r.current;if(e)return El(e)},[]),(0,m.jsx)(gp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),mp=p.forwardRef(Vf(function(e,t){let n=ep(lp,e.__scopeMenu);return(0,m.jsx)(gp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),hp=Ya(`MenuContent.ScrollLock`),gp=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:g,..._}=e,v=ep(lp,n),y=np(lp,n),b=Zf(n),x=Qf(n),S=K(n),[C,w]=p.useState(null),T=p.useRef(null),E=Ka(t,T,v.onContentChange),D=p.useRef(0),O=p.useRef(``),k=p.useRef(0),A=p.useRef(null),j=p.useRef(`right`),ee=p.useRef(0),M=g?_l:p.Fragment,te=g?{as:hp,allowPinchZoom:!0}:void 0,ne=Vf(e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Rp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Vf((function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);p.useEffect(()=>()=>window.clearTimeout(D.current),[]),cc();let N=p.useCallback(e=>j.current===A.current?.side&&Bp(e,A.current?.area),[]);return(0,m.jsx)(up,{scope:n,searchRef:O,onItemEnter:p.useCallback(e=>{N(e)&&e.preventDefault()},[N]),onItemLeave:p.useCallback(e=>{N(e)||(T.current?.focus(),w(null))},[N]),onTriggerLeave:p.useCallback(e=>{N(e)&&e.preventDefault()},[N]),pointerGraceTimerRef:k,onPointerGraceIntentChange:p.useCallback(e=>{A.current=e},[]),children:(0,m.jsx)(M,{...te,children:(0,m.jsx)(Us,{asChild:!0,trapped:i,onMountAutoFocus:z(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:(0,m.jsx)(Rf,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:z(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,m.jsx)(cf,{role:`menu`,"aria-orientation":`vertical`,"data-state":Np(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:z(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ne(e.key));let i=T.current;if(e.target!==i||!Gf.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Wf.includes(e.key)&&a.reverse(),Ip(a)}),onBlur:z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:z(e.onPointerMove,Vp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;j.current=t,ee.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),_p=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,...r}=e;return(0,m.jsx)(po.div,{role:`group`,...r,ref:t})},`MenuGroup`)),vp=`MenuItem`,yp=`menu.itemSelect`,bp=p.forwardRef(Vf(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=p.useRef(null),o=np(vp,e.__scopeMenu),s=dp(vp,e.__scopeMenu),c=Ka(t,a),l=p.useRef(!1),u=Vf(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(yp,{bubbles:!0,cancelable:!0});e.addEventListener(yp,e=>r?.(e),{once:!0}),mo(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,m.jsx)(xp,{...i,ref:c,disabled:n,onClick:z(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:z(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Hf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),xp=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=dp(vp,n),s=Qf(n),c=p.useRef(null),l=Ka(t,c),[u,d]=p.useState(!1),[f,h]=p.useState(``);return p.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,m.jsx)(qf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,m.jsx)(zf,{asChild:!0,...s,focusable:!r,children:(0,m.jsx)(po.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:z(e.onPointerMove,Vp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Vp(e=>o.onItemLeave(e))),onFocus:z(e.onFocus,()=>d(!0)),onBlur:z(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Sp,Cp]=Yf(`MenuRadioGroup`,{value:void 0,onValueChange:Vf(()=>{},`onValueChange`)}),wp=p.forwardRef(Vf(function(e,t){let{value:n,onValueChange:r,...i}=e,a=Cs(r);return(0,m.jsx)(Sp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,m.jsx)(_p,{...i,ref:t})})},`MenuRadioGroup`)),Tp=`MenuRadioItem`,Ep=p.forwardRef(Vf(function(e,t){let{value:n,...r}=e,i=Cp(Tp,e.__scopeMenu),a=n===i.value;return(0,m.jsx)(Op,{scope:e.__scopeMenu,checked:a,children:(0,m.jsx)(bp,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Fp(a),onSelect:z(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),Dp=`MenuItemIndicator`,[Op,kp]=Yf(Dp,{checked:!1}),Ap=p.forwardRef(Vf(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=kp(Dp,n);return(0,m.jsx)(os,{present:r||Pp(a.checked)||a.checked===!0,children:(0,m.jsx)(po.span,{...i,ref:t,"data-state":Fp(a.checked)})})},`MenuItemIndicator`)),[jp,Mp]=Yf(`MenuSub`);function Np(e){return e?`open`:`closed`}Vf(Np,`getOpenState`);function Pp(e){return e===`indeterminate`}Vf(Pp,`isIndeterminate`);function Fp(e){return Pp(e)?`indeterminate`:e?`checked`:`unchecked`}Vf(Fp,`getCheckedState`);function Ip(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Vf(Ip,`focusFirst`);function Lp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Vf(Lp,`wrapArray`);function Rp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Lp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Vf(Rp,`getNextMatch`);function zp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Vf(zp,`isPointInPolygon`);function Bp(e,t){return t?zp({x:e.clientX,y:e.clientY},t):!1}Vf(Bp,`isPointerInGraceArea`);function Vp(e){return t=>t.pointerType===`mouse`?e(t):void 0}Vf(Vp,`whenMouse`);var Hp=rp,Up=ip,Wp=cp,Gp=fp,Kp=wp,qp=Ep,Jp=Ap,Yp=Object.defineProperty,Xp=(e,t)=>Yp(e,`name`,{value:t,configurable:!0}),Zp=`DropdownMenu`,[Qp,$p]=So(Zp,[Xf]),em=Xf(),[tm,nm]=Qp(Zp),rm=Xp(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=em(t),l=p.useRef(null),[u,d]=Qo({prop:i,defaultProp:a??!1,onChange:o,caller:Zp});return(0,m.jsx)(tm,{scope:t,triggerId:gs(),triggerRef:l,contentId:gs(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,m.jsx)(Hp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),im=`DropdownMenuTrigger`,am=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=nm(im,n),o=em(n),s=Ka(t,a.triggerRef);return(0,m.jsx)(Up,{asChild:!0,...o,children:(0,m.jsx)(po.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),om=Xp(e=>{let{__scopeDropdownMenu:t,...n}=e,r=em(t);return(0,m.jsx)(Wp,{...r,...n})},`DropdownMenuPortal`),sm=`DropdownMenuContent`,cm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=nm(sm,n),a=em(n),o=p.useRef(!1);return(0,m.jsx)(Gp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),lm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(Kp,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),um=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(qp,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),dm=p.forwardRef(Xp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=em(n);return(0,m.jsx)(Jp,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),fm=rm,pm=am,mm=om,hm=cm,gm=lm,_m=um,vm=dm,ym=Object.defineProperty,bm=(e,t)=>ym(e,`name`,{value:t,configurable:!0});function xm(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}bm(xm,`usePrevious`);var Sm=Object.defineProperty,Cm=(e,t)=>Sm(e,`name`,{value:t,configurable:!0});function wm(e,[t,n]){return Math.min(n,Math.max(t,e))}Cm(wm,`clamp`);var Tm=Object.defineProperty,q=(e,t)=>Tm(e,`name`,{value:t,configurable:!0}),Em=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Dm=[` `,`Enter`],Om=`Select`,[km,Am,jm]=Eo(Om),[Mm,Nm]=So(Om,[jm,Ud]),Pm=Ud(),[Fm,Im]=Mm(Om),[Lm,Rm]=Mm(Om);function zm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:h,form:g,internal_do_not_use_render:_}=e,v=Pm(t),[y,b]=p.useState(null),[x,S]=p.useState(null),[C,w]=p.useState(!1),T=bs(l),[E,D]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:Om}),[O,k]=Qo({prop:o,defaultProp:s,onChange:c,caller:Om}),A=p.useRef(null),j=p.useRef(O);p.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=q(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let ee=!y||!!g||!!y.closest(`form`),[M,te]=p.useState(new Set),ne=gs(),N=Array.from(M).map(e=>e.props.value).join(`;`),re=p.useCallback(e=>{te(t=>new Set(t).add(e))},[]),ie=p.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),ae={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:ne,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:g,nativeOptions:M,nativeSelectKey:N,isFormControl:ee};return(0,m.jsx)(of,{...v,children:(0,m.jsx)(Fm,{scope:t,...ae,children:(0,m.jsx)(km.Provider,{scope:t,children:(0,m.jsx)(Lm,{scope:t,onNativeOptionAdd:re,onNativeOptionRemove:ie,children:Eh(_)?_(ae):n})})})})}q(zm,`SelectProvider`);var Bm=q(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,m.jsx)(zm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[n,e?(0,m.jsx)(Th,{__scopeSelect:t}):null]})})},`Select`),Vm=`SelectTrigger`,Hm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Pm(n),o=Im(Vm,n),s=o.disabled||r,c=Ka(t,o.onTriggerChange),l=Am(n),u=p.useRef(`touch`),[d,f,h]=Oh(e=>{let t=l().filter(e=>!e.disabled),n=kh(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=q(e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,m.jsx)(sf,{asChild:!0,...a,children:(0,m.jsx)(po.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Dh(o.value)?``:void 0,...i,ref:c,onClick:z(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:z(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:z(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Em.includes(e.key)&&(g(),e.preventDefault())})})})},`SelectTrigger`)),Um=`SelectValue`,Wm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Im(Um,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ka(t,c.onValueNodeChange);B(()=>{l(u)},[l,u]);let f=Dh(c.value);return(0,m.jsx)(po.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,m.jsx)(p.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Gm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,m.jsx)(po.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Km,qm]=Mm(`SelectPortal`,{forceMount:void 0}),Jm=q(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,m.jsx)(Km,{scope:e.__scopeSelect,forceMount:n,children:(0,m.jsx)(nc,{asChild:!0,...r})})},`SelectPortal`),Ym=`SelectContent`,Xm=p.forwardRef(q(function(e,t){let n=qm(Ym,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Im(Ym,e.__scopeSelect),[o,s]=p.useState();return B(()=>{s(new DocumentFragment)},[]),(0,m.jsx)(os,{present:r||a.open,children:({present:e})=>e?(0,m.jsx)(nh,{...i,ref:t}):(0,m.jsx)(Zm,{...i,fragment:o})})},`SelectContent`)),Zm=p.forwardRef(q(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?lo.createPortal((0,m.jsx)($m,{scope:n,children:(0,m.jsx)(km.Slot,{scope:n,children:(0,m.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Qm=10,[$m,eh]=Mm(Ym),th=Ya(`SelectContent.RemoveScroll`),nh=p.forwardRef(q(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Im(Ym,n),[x,S]=p.useState(null),[C,w]=p.useState(null),T=Ka(t,S),[E,D]=p.useState(null),[O,k]=p.useState(null),A=Am(n),[j,ee]=p.useState(!1),M=p.useRef(!1);p.useEffect(()=>{if(x)return El(x)},[x]),cc();let te=p.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),ne=p.useCallback(()=>te([E,x]),[te,E,x]);p.useEffect(()=>{j&&ne()},[j,ne]);let{onOpenChange:N,triggerPointerDownPosRef:re}=b;p.useEffect(()=>{if(x){let e={x:0,y:0},t=q(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=q(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||N(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,N,re]),p.useEffect(()=>{let e=q(()=>N(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[N]);let[ie,ae]=Oh(e=>{let t=A().filter(e=>!e.disabled),n=kh(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),oe=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(M.current=!0))},[b.value]),se=p.useCallback(()=>x?.focus(),[x]),ce=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),le=r===`popper`?ih:rh,ue=le===ih?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,m.jsx)($m,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:oe,selectedItem:E,onItemLeave:se,itemTextRefCallback:ce,focusSelectedItem:ne,selectedItemText:O,position:r,isPositioned:j,searchRef:ie,children:(0,m.jsx)(_l,{as:th,allowPinchZoom:!0,children:(0,m.jsx)(Us,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:z(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,m.jsx)(le,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ue,onPlaced:()=>ee(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:z(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),rh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Im(Ym,n),o=eh(Ym,n),[s,c]=p.useState(null),[l,u]=p.useState(null),d=Ka(t,u),f=Am(n),h=p.useRef(!1),g=p.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=p.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Qm,d=wm(a,[Qm,Math.max(Qm,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Qm,d=wm(a,[Qm,Math.max(Qm,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Qm*2,u=_.scrollHeight,d=window.getComputedStyle(l),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=p+m+u+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Qm,D=c-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=p+m+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,p+_.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}s.style.margin=`${Qm}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,a.trigger,a.valueNode,s,l,_,v,y,a.dir,r]);B(()=>x(),[x]);let[S,C]=p.useState();B(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=p.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]);return(0,m.jsx)(ah,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:w,children:(0,m.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,m.jsx)(po.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),ih=p.forwardRef(q(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Qm,...a}=e,o=Pm(n);return(0,m.jsx)(cf,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[ah,oh]=Mm(Ym,{}),sh=`SelectViewport`,ch=p.forwardRef(q(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=eh(sh,n),o=oh(sh,n),s=Ka(t,a.onViewportChange),c=p.useRef(0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,m.jsx)(km.Slot,{scope:n,children:(0,m.jsx)(po.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:z(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Qm*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[lh,uh]=Mm(`SelectGroup`),dh=`SelectItem`,[fh,ph]=Mm(dh),mh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Im(dh,n),c=eh(dh,n),l=s.value===r,[u,d]=p.useState(a??``),[f,h]=p.useState(!1),g=Ka(t,Cs(e=>c.itemRefCallback?.(e,r,i))),_=gs(),v=p.useRef(`touch`),y=q(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,m.jsx)(fh,{scope:n,value:r,disabled:i,textId:_,isSelected:l,onItemTextChange:p.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,m.jsx)(km.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,m.jsx)(po.div,{role:`option`,"aria-labelledby":_,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:z(o.onFocus,()=>h(!0)),onBlur:z(o.onBlur,()=>h(!1)),onClick:z(o.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:z(o.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:z(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:z(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:z(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Dm.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),hh=`SelectItemText`,gh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Im(hh,n),s=eh(hh,n),c=ph(hh,n),l=Rm(hh,n),[u,d]=p.useState(null),f=Cs(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),h=Ka(t,d,c.onItemTextChange,f),g=u?.textContent,_=p.useMemo(()=>(0,m.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return B(()=>(v(_),()=>y(_)),[v,y,_]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(po.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Dh(o.value)?lo.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),_h=`SelectItemIndicator`,vh=p.forwardRef(q(function(e,t){let{__scopeSelect:n,...r}=e;return ph(_h,n).isSelected?(0,m.jsx)(po.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),yh=`SelectScrollUpButton`,bh=p.forwardRef(q(function(e,t){let n=eh(yh,e.__scopeSelect),r=oh(yh,e.__scopeSelect),[i,a]=p.useState(!1),o=Ka(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};q(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(Ch,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),xh=`SelectScrollDownButton`,Sh=p.forwardRef(q(function(e,t){let n=eh(xh,e.__scopeSelect),r=oh(xh,e.__scopeSelect),[i,a]=p.useState(!1),o=Ka(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};q(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(Ch,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Ch=p.forwardRef(q(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=eh(`SelectScrollButton`,n),o=p.useRef(null),s=Am(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),B(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,m.jsx)(po.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:z(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:z(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:z(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),wh=`SelectBubbleInput`,Th=p.forwardRef(q(function({__scopeSelect:e,...t},n){let r=Im(wh,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,h=p.useRef(null),g=Ka(n,h),_=i??``,v=xm(_),y=Array.from(d).some(e=>(e.props.value??``)===``);return p.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,m.jsxs)(po.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{..._o,...t.style},ref:g,defaultValue:_,children:[Dh(i)&&!y?(0,m.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function Eh(e){return typeof e==`function`}q(Eh,`isFunction`);function Dh(e){return e===``||e===void 0}q(Dh,`shouldShowPlaceholder`);function Oh(e){let t=Cs(e),n=p.useRef(``),r=p.useRef(0),i=p.useCallback(e=>{let i=n.current+e;t(i),q((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=p.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}q(Oh,`useTypeaheadSearch`);function kh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ah(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}q(kh,`findNextItem`);function Ah(e,t){return e.map((n,r)=>e[(t+r)%e.length])}q(Ah,`wrapArray`);var jh=Object.defineProperty,Mh=(e,t)=>jh(e,`name`,{value:t,configurable:!0}),Nh=`Tabs`,[Ph,Fh]=So(Nh,[Ef]),Ih=Ef(),[Lh,Rh]=Ph(Nh),zh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=bs(s),[d,f]=Qo({prop:r,onChange:i,defaultProp:a??``,caller:Nh});return(0,m.jsx)(Lh,{scope:n,baseId:gs(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,m.jsx)(po.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Bh=`TabsList`,Vh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Rh(Bh,n),o=Ih(n);return(0,m.jsx)(Rf,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,m.jsx)(po.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Hh=`TabsTrigger`,Uh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Rh(Hh,n),s=Ih(n),c=Kh(o.baseId,r),l=qh(o.baseId,r),u=r===o.value;return(0,m.jsx)(zf,{asChild:!0,...s,focusable:!i,active:u,children:(0,m.jsx)(po.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:z(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:z(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:z(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),Wh=`TabsContent`,Gh=p.forwardRef(Mh(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Rh(Wh,n),c=Kh(s.baseId,r),l=qh(s.baseId,r),u=r===s.value,d=p.useRef(u);return p.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(os,{present:i||u,children:({present:n})=>(0,m.jsx)(po.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Kh(e,t){return`${e}-trigger-${t}`}Mh(Kh,`makeTriggerId`);function qh(e,t){return`${e}-content-${t}`}Mh(qh,`makeContentId`);var Jh=zh,Yh=Vh,Xh=Uh,Zh=Gh,Qh=Object.defineProperty,$h=(e,t)=>Qh(e,`name`,{value:t,configurable:!0}),[eg,tg]=So(`Tooltip`,[Ud]),ng=Ud(),rg=`TooltipProvider`,ig=700,ag=`tooltip.open`,[og,sg]=eg(rg),cg=$h(e=>{let{__scopeTooltip:t,delayDuration:n=ig,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=p.useRef(!0),s=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,m.jsx)(og,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),lg=`Tooltip`,[ug,dg]=eg(lg),fg=$h(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=sg(lg,e.__scopeTooltip),l=ng(t),[u,d]=p.useState(null),[f,h]=p.useState(void 0),g=gs(),_=p.useRef(0),v=o??c.disableHoverableContent,y=s??c.delayDuration,b=p.useRef(!1),[x,S]=Qo({prop:r,defaultProp:i??!1,onChange:$h(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(ag))):c.onClose(),a?.(e)},`onChange`),caller:lg}),C=p.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=p.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=p.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=p.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);p.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=f??g;return(0,m.jsx)(of,{...l,children:(0,m.jsx)(ug,{scope:t,contentId:D,setContentId:h,open:x,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:p.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),pg=`TooltipTrigger`,mg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,...r}=e,i=dg(pg,n),a=sg(pg,n),o=ng(n),s=Ka(t,p.useRef(null),i.onTriggerChange),c=p.useRef(!1),l=p.useRef(!1),u=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,m.jsx)(sf,{asChild:!0,...o,children:(0,m.jsx)(po.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:z(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:z(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:z(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:z(e.onBlur,i.onClose),onClick:z(e.onClick,i.onClose)})})},`TooltipTrigger`)),hg=`TooltipPortal`,[gg,_g]=eg(hg,{forceMount:void 0}),vg=$h(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=dg(hg,t);return(0,m.jsx)(gg,{scope:t,forceMount:n,children:(0,m.jsx)(os,{present:n||a.open,children:(0,m.jsx)(nc,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),yg=`TooltipContent`,bg=p.forwardRef($h(function(e,t){let n=_g(yg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=dg(yg,e.__scopeTooltip);return(0,m.jsx)(os,{present:r||o.open,children:o.disableHoverableContent?(0,m.jsx)(Cg,{side:i,...a,ref:t}):(0,m.jsx)(xg,{side:i,...a,ref:t})})},`TooltipContent`)),xg=p.forwardRef($h(function(e,t){let n=dg(yg,e.__scopeTooltip),r=sg(yg,e.__scopeTooltip),i=p.useRef(null),a=Ka(t,i),[o,s]=p.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=p.useCallback(()=>{s(null),d(!1)},[d]),h=p.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Eg(r,Tg(r,n.getBoundingClientRect())),a=Dg(t.getBoundingClientRect()),o=kg([...i,...a]);s(o),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(c&&u){let e=$h(e=>h(e,u),`handleTriggerLeave`),t=$h(e=>h(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,h,f]),p.useEffect(()=>{if(o){let e=$h(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Og(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,m.jsx)(Cg,{...e,ref:a})},`TooltipContentHoverable`)),Sg=Qa(`TooltipContent`),Cg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=dg(yg,n),u=ng(n),{onClose:d}=l;p.useEffect(()=>(document.addEventListener(ag,d),()=>document.removeEventListener(ag,d)),[d]),p.useEffect(()=>{if(l.trigger){let e=$h(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return B(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,m.jsx)(js,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,m.jsxs)(cf,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,m.jsx)(Sg,{children:r}),i?(0,m.jsx)(vo,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),wg=p.forwardRef($h(function(e,t){let{__scopeTooltip:n,...r}=e,i=ng(n);return(0,m.jsx)(lf,{...i,...r,ref:t})},`TooltipArrow`));function Tg(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}$h(Tg,`getExitSideFromRect`);function Eg(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}$h(Eg,`getPaddedExitPoints`);function Dg(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}$h(Dg,`getPointsFromRect`);function Og(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}$h(Og,`isPointInPolygon`);function kg(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Ag(t)}$h(kg,`getHull`);function Ag(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}$h(Ag,`getHullPresorted`);var jg=cg,Mg=fg,Ng=mg,Pg=vg,Fg=bg,Ig=wg,Lg=Va();function Rg(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rg(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function zg(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rg(e))&&(r&&(r+=` `),r+=t);return r}var Bg=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vg=(e,t)=>({classGroupId:e,validator:t}),Hg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ug=`-`,Wg=[],Gg=`arbitrary..`,Kg=e=>{let t=Yg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Jg(e);let n=e.split(Ug);return qg(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Bg(i,t):t:i||Wg}return n[e]||Wg}}},qg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=qg(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ug):e.slice(t).join(Ug),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Jg=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Gg+r:void 0})(),Yg=e=>{let{theme:t,classGroups:n}=e;return Xg(n,t)},Xg=(e,t)=>{let n=Hg();for(let r in e){let i=e[r];Zg(i,n,r,t)}return n},Zg=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Qg(i,t,n,r)}},Qg=(e,t,n,r)=>{if(typeof e==`string`){$g(e,t,n);return}if(typeof e==`function`){e_(e,t,n,r);return}t_(e,t,n,r)},$g=(e,t,n)=>{let r=e===``?t:n_(t,e);r.classGroupId=n},e_=(e,t,n,r)=>{if(r_(e)){Zg(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vg(n,e))},t_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Zg(o,n_(t,a),n,r)}},n_=(e,t)=>{let n=e,r=t.split(Ug),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Hg(),n.nextPart.set(t,i)),n=i}return n},r_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,i_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},a_=`!`,o_=`:`,s_=[],c_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),l_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===o_){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(a_)?(c=s.slice(0,-1),l=!0):s.startsWith(a_)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return c_(t,l,c,u)};if(t){let e=t+o_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):c_(s_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},u_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},d_=e=>({cache:i_(e.cacheSize),parseClassName:l_(e),sortModifiers:u_(e),postfixLookupClassGroupIds:f_(e),...Kg(e)}),f_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},p_=/\s+/,m_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(p_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+a_:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},h_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=g_(n))&&(i&&(i+=` `),i+=r);return i},g_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=g_(e[r]))&&(n&&(n+=` `),n+=t);return n},__=(e,...t)=>{let n,r,i,a,o=o=>(n=d_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=m_(e,n);return i(e,a),a};return a=o,(...e)=>a(h_(...e))},v_=[],y_=e=>{let t=t=>t[e]||v_;return t.isThemeGetter=!0,t.themeKey=e,t},b_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,x_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,S_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,C_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,T_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,E_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,O_=e=>S_.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),k_=e=>!!e&&Number.isInteger(Number(e)),A_=e=>e.endsWith(`%`)&&J(e.slice(0,-1)),j_=e=>C_.test(e),M_=()=>!0,N_=e=>w_.test(e)&&!T_.test(e),P_=()=>!1,F_=e=>E_.test(e),I_=e=>D_.test(e),L_=e=>!Y(e)&&!X(e),R_=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),z_=e=>ev(e,iv,P_),Y=e=>b_.test(e),B_=e=>ev(e,av,N_),V_=e=>ev(e,ov,J),H_=e=>ev(e,cv,M_),U_=e=>ev(e,sv,P_),W_=e=>ev(e,nv,P_),G_=e=>ev(e,rv,I_),K_=e=>ev(e,lv,F_),X=e=>x_.test(e),q_=e=>tv(e,av),J_=e=>tv(e,sv),Y_=e=>tv(e,nv),X_=e=>tv(e,iv),Z_=e=>tv(e,rv),Q_=e=>tv(e,lv,!0),$_=e=>tv(e,cv,!0),ev=(e,t,n)=>{let r=b_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tv=(e,t,n=!1)=>{let r=x_.exec(e);return r?r[1]?t(r[1]):n:!1},nv=e=>e===`position`||e===`percentage`,rv=e=>e===`image`||e===`url`,iv=e=>e===`length`||e===`size`||e===`bg-size`,av=e=>e===`length`,ov=e=>e===`number`,sv=e=>e===`family-name`,cv=e=>e===`number`||e===`weight`,lv=e=>e===`shadow`,uv=__(()=>{let e=y_(`color`),t=y_(`font`),n=y_(`text`),r=y_(`font-weight`),i=y_(`tracking`),a=y_(`leading`),o=y_(`breakpoint`),s=y_(`container`),c=y_(`spacing`),l=y_(`radius`),u=y_(`shadow`),d=y_(`inset-shadow`),f=y_(`text-shadow`),p=y_(`drop-shadow`),m=y_(`blur`),h=y_(`perspective`),g=y_(`aspect`),_=y_(`ease`),v=y_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),X,Y],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,Y,c],T=()=>[O_,`full`,`auto`,...w()],E=()=>[k_,`none`,`subgrid`,X,Y],D=()=>[`auto`,{span:[`full`,k_,X,Y]},k_,X,Y],O=()=>[k_,`auto`,X,Y],k=()=>[`auto`,`min`,`max`,`fr`,X,Y],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ee=()=>[`auto`,...w()],M=()=>[O_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[s,O_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ne=()=>[O_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,X,Y],re=()=>[...b(),Y_,W_,{position:[X,Y]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,X_,z_,{size:[X,Y]}],oe=()=>[A_,q_,B_],se=()=>[``,`none`,`full`,l,X,Y],ce=()=>[``,J,q_,B_],le=()=>[`solid`,`dashed`,`dotted`,`double`],ue=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],de=()=>[J,A_,Y_,W_],fe=()=>[``,`none`,m,X,Y],pe=()=>[`none`,J,X,Y],me=()=>[`none`,J,X,Y],P=()=>[J,X,Y],F=()=>[O_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[j_],breakpoint:[j_],color:[M_],container:[j_],"drop-shadow":[j_],ease:[`in`,`out`,`in-out`],font:[L_],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[j_],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[j_],shadow:[j_],spacing:[`px`,J],text:[j_],"text-shadow":[j_],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,O_,Y,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,Y]}],"container-named":[R_],columns:[{columns:[J,`auto`,Y,X,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[k_,`auto`,X,Y]}],basis:[{basis:[O_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[J,O_,`auto`,`initial`,`none`,Y]}],grow:[{grow:[``,J,X,Y]}],shrink:[{shrink:[``,J,X,Y]}],order:[{order:[k_,`first`,`last`,`none`,X,Y]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mbs:[{mbs:ee()}],mbe:[{mbe:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...ne()]}],"min-block-size":[{"min-block":[`auto`,...ne()]}],"max-block-size":[{"max-block":[`none`,...ne()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...M()]}],"font-size":[{text:[`base`,n,q_,B_]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$_,H_]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,A_,Y]}],"font-family":[{font:[J_,U_,t]}],"font-features":[{"font-features":[Y]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,Y]}],"line-clamp":[{"line-clamp":[J,`none`,X,V_]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,X,Y]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,Y]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...le(),`wavy`]}],"text-decoration-thickness":[{decoration:[J,`from-font`,`auto`,X,B_]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[J,`auto`,X,Y]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[k_,X,Y]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,Y]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,Y]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},k_,X,Y],radial:[``,X,Y],conic:[``,k_,X,Y]},Z_,G_]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...le(),`hidden`,`none`]}],"divide-style":[{divide:[...le(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...le(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[J,X,Y]}],"outline-w":[{outline:[``,J,q_,B_]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`inner`,`none`,u,Q_,K_]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Q_,K_]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:ce()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[J,B_]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Q_,K_]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[J,X,Y]}],"mix-blend":[{"mix-blend":[...ue(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,Y]}],filter:[{filter:[``,`none`,X,Y]}],blur:[{blur:fe()}],brightness:[{brightness:[J,X,Y]}],contrast:[{contrast:[J,X,Y]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Q_,K_]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,J,X,Y]}],"hue-rotate":[{"hue-rotate":[J,X,Y]}],invert:[{invert:[``,J,X,Y]}],saturate:[{saturate:[J,X,Y]}],sepia:[{sepia:[``,J,X,Y]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,Y]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[J,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[J,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,J,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,X,Y]}],"backdrop-invert":[{"backdrop-invert":[``,J,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[J,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[J,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":[``,J,X,Y]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,Y]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[J,`initial`,X,Y]}],ease:[{ease:[`linear`,`initial`,_,X,Y]}],delay:[{delay:[J,X,Y]}],animate:[{animate:[`none`,v,X,Y]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,Y]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":[`scale-3d`],skew:[{skew:P()}],"skew-x":[{"skew-x":P()}],"skew-y":[{"skew-y":P()}],transform:[{transform:[X,Y,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":[`translate-none`],zoom:[{zoom:[k_,X,Y]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,Y]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,Y]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[J,q_,B_,V_]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Z(...e){return uv(zg(e))}function dv({delayDuration:e=0,...t}){return(0,m.jsx)(jg,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function fv({...e}){return(0,m.jsx)(Mg,{"data-slot":`tooltip`,...e})}function pv({...e}){return(0,m.jsx)(Ng,{"data-slot":`tooltip-trigger`,...e})}function mv({className:e,sideOffset:t=0,children:n,...r}){return(0,m.jsx)(Pg,{children:(0,m.jsxs)(Fg,{"data-slot":`tooltip-content`,sideOffset:t,className:Z(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,m.jsx)(Ig,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var hv=e=>`data/analysis/${e}.json`;function gv(e){return _v([...e]).find(e=>e.doc.error===void 0&&e.doc.analysis.tldr.length>0)}function _v(e){return[...e].sort((e,t)=>e.doc.createdAt===t.doc.createdAt?e.source===t.source?0:e.source===`saved`?-1:1:e.doc.createdAt<t.doc.createdAt?1:-1)}var vv=e=>e.promptVersion!==`analysis-v5`||e.inputs.digestVersion!==3,yv=[{field:`imageIds`,label:`image ids`,outside:!1},{field:`agentClis`,label:`agent CLI`,outside:!1},{field:`harnesses`,label:`harnesses`,outside:!1},{field:`environments`,label:`environments`,outside:!1},{field:`judgeModel`,label:`judge model`,outside:!1},{field:`threshold`,label:`judge threshold`,outside:!1},{field:`judgeServed`,label:`judge model served`,outside:!0},{field:`judgeVersion`,label:`judge version`,outside:!1},{field:`fingerprintScope`,label:`fingerprint scope`,outside:!0}],bv=e=>Array.isArray(e)?e.join(`, `)||`none`:e===null?`none`:String(e).replace(/^sha256:/,``).slice(0,24),xv={imageIds:e=>e.fingerprintParts.image,agentClis:e=>e.fingerprintParts.agentCli,harnesses:e=>e.harness,environments:e=>`${e.environment}@${(e.environmentDigest??``).replace(/^sha256:/,``).slice(0,12)}`};function Sv(e,t){if(![e,t].every(e=>e.evals?.every(e=>Array.isArray(e.cells)))||!e.evals||!t.evals)return null;let n=new Map(e.evals.map(e=>[e.id,new Map(e.cells.map(e=>[e.key,e]))]));return t.evals.flatMap(e=>e.cells.flatMap(t=>{let r=n.get(e.id)?.get(t.key);return r?[[r,t]]:[]}))}function Cv(e,t){let n=Sv(e,t),r=[];for(let{field:i,label:a,outside:o}of yv){let s=xv[i],c=s&&n?n.filter(([e,t])=>s(e)!==s(t)):[],l=e=>[...new Set(c.flatMap(t=>s?.(t[e])??[]))].sort(),u=s&&n?l(0):e.stack[i],d=s&&n?l(1):t.stack[i];(i!==`judgeServed`||u.length&&d.length)&&JSON.stringify(u)!==JSON.stringify(d)&&r.push({field:i,label:a,base:bv(u),head:bv(d),outsideFingerprint:o})}return r}function wv(e,t,n){let r=!1;for(let i of n){let n=`${t}\0${i.key}`,a=e.get(n);a!==void 0&&a!==i.fingerprint&&(r=!0),e.set(n,i.fingerprint)}return r}function Tv(e,t){let n=new Map(e.map(e=>[e.path,e.sha256])),r=new Map(t.map(e=>[e.path,e.sha256]));return[...new Set([...n.keys(),...r.keys()])].sort().flatMap(e=>n.has(e)?r.has(e)?n.get(e)===r.get(e)?[]:[`${e} changed`]:[`${e} removed`]:[`${e} added`])}var Ev={harness:`harness config`,environment:`environment`,image:`image`,agentCli:`agent CLI`,judge:`judge`,context:`agent context`};function Dv(e,t){let n=Tv(e.sources,t.sources),r=[...new Set([...e.cells,...t.cells].map(e=>e.key))],i=new Set;for(let a of r){let r=e.cells.find(e=>e.key===a),o=t.cells.find(e=>e.key===a);if(!r||!o){n.push(`cell ${a} ${r?`removed`:`added`}`);continue}for(let e of Object.keys(Ev))r.fingerprintParts[e]!==o.fingerprintParts[e]&&i.add(Ev[e])}return[...n,...[...i].map(e=>`${e} changed`)]}function Ov(e){let t=e.map(e=>e.gate===`none`&&e.outcome===`fail`?`pass`:e.outcome);return t.includes(`fail`)?`fail`:t.includes(`infra_error`)?`infra_error`:t.every(e=>e===`skipped`)?`skipped`:`pass`}function kv(e,t){let n=new Map(e.cells.map(e=>[e.key,e])),r=t.cells.filter(e=>n.has(e.key));if(!r.length||r.some(e=>n.get(e.key)?.fingerprint!==e.fingerprint))return null;let i=new Set(t.cells.map(e=>e.key));return{base:Ov(r.map(e=>n.get(e.key)??e)),head:Ov(r),cells:{added:t.cells.filter(e=>!n.has(e.key)).map(e=>e.key),removed:e.cells.filter(e=>!i.has(e.key)).map(e=>e.key)}}}function Av(e,t){let n=e=>({...e.lift?{lift:e.lift}:{},effort:e.effort??null,pass:e.pass,fail:e.fail});return(t.cells??[]).flatMap(t=>{let r=e.cells?.find(e=>e.key===t.key);return!r||!(r.lift||t.lift||r.effort&&t.effort)?[]:[{key:t.key,base:n(r),head:n(t)}]})}function jv(e,t){let n=Cv(e,t).some(e=>e.outsideFingerprint);return[...new Set([...t.evals.map(e=>e.id),...e.evals.map(e=>e.id)])].map(r=>{let i=e.evals.find(e=>e.id===r),a=t.evals.find(e=>e.id===r);if(!i)return{id:r,base:null,head:a?.outcome??null,status:`added`};if(!a)return{id:r,base:i.outcome,head:null,status:`removed`};let o=i.fingerprint===a.fingerprint?null:kv(i,a),s=o?{id:r,...o}:{id:r,base:i.outcome,head:a.outcome},c=Av(i,a);return c.length&&(s.perCell=c),s.base===`infra_error`||s.head===`infra_error`?{...s,status:`infra`}:i.fingerprint!==a.fingerprint&&!o?{...s,status:`drift`,changes:Dv(i,a)}:n&&s.base!==s.head?{...s,status:`drift`}:s.base===`pass`&&s.head===`fail`?{...s,status:`regressed`}:s.base===`fail`&&s.head===`pass`?{...s,status:`fixed`}:{...s,status:`same`}})}var Mv=[`plan`,`image`,`container`,`env`,`broker`,`harness`,`check`,`judge`,`gateway`,`teardown`,`docker`],Nv=(e,t)=>`api/debug/${e}?attempt=${encodeURIComponent(t)}`,Pv=(e,t)=>`api/debug/${e}/trace?attempt=${encodeURIComponent(t)}`;Math.max(...Mv.map(e=>e.length));function Fv(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var Iv=1.959964;function Lv(e,t){if(t===0)return{low:0,high:1};let n=e/t,r=Iv*Iv,i=1+r/t,a=(n+r/(2*t))/i,o=Iv*Math.sqrt(n*(1-n)/t+r/(4*t*t))/i;return{low:Math.max(0,a-o),high:Math.min(1,a+o)}}function Rv(e,t){let n=e.n?e.pass/e.n:0,r=t.n?t.pass/t.n:0,i=Lv(e.pass,e.n),a=Lv(t.pass,t.n),o=n-r;return{points:o,low:o-Math.sqrt((n-i.low)**2+(a.high-r)**2),high:o+Math.sqrt((i.high-n)**2+(r-a.low)**2)}}var zv=e=>Math.round(e*1e3)/1e3;function Bv(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t),r=(n.length-1)*t,i=Math.floor(r),a=Math.ceil(r),o=n[i];return o+(n[a]-o)*(r-i)}var Vv=e=>Bv(e,.5),Hv=2e5,Uv=(e,t)=>{let n=1;for(let r=1;r<=t;r++)n=n*(e-t+r)/r;return Math.round(n)};function Wv(e,t){let n=e.length,r=t.length;if(n===0||r===0)return null;let i=[...e,...t].map((e,t)=>({v:e,i:t})).sort((e,t)=>e.v-t.v),a=Array(i.length);for(let e=0;e<i.length;){let t=e;for(;t+1<i.length&&i[t+1]?.v===i[e]?.v;)t++;for(let n=e;n<=t;n++)a[i[n]?.i]=(e+t)/2+1;e=t+1}let o=n+r,s=n*(o+1)/2,c=Math.abs(a.slice(0,n).reduce((e,t)=>e+t,0)-s);if(Uv(o,n)>Hv){let e=new Map;for(let{v:t}of i)e.set(t,(e.get(t)??0)+1);let t=[...e.values()].reduce((e,t)=>e+t**3-t,0),a=n*r/12*(o+1-t/(o*(o-1)));if(a<=0)return 1;let s=Math.max(0,c-.5)/Math.sqrt(a);return Math.min(1,2*(1-Kv(s)))}let l=0,u=0,d=(e,t,n)=>{if(t===0){u++,Math.abs(n-s)>=c-1e-9&&l++;return}for(let r=e;r<=o-t;r++)d(r+1,t-1,n+a[r])};return d(0,n,0),l/u}var Gv=(e,t)=>e===0||t===0?1:Math.min(1,2/Uv(e+t,e));function Kv(e){let t=1/(1+.3275911*Math.abs(e)/Math.SQRT2),n=1-t*(.254829592+t*(-.284496736+t*(1.421413741+t*(-1.453152027+t*1.061405429))))*Math.exp(-(e*e)/2);return e>=0?(1+n)/2:(1-n)/2}var qv=e=>({tools:e.activity.tools,agentMs:e.timings.agentMs,fileEdits:e.activity.fileEdits}),Jv=e=>e.outcome===`pass`||e.outcome===`fail`,Yv=e=>({median:Vv(e)??0,q1:Bv(e,.25)??0,q3:Bv(e,.75)??0});function Xv(e){return e.length===0?null:{n:e.length,tools:Yv(e.map(e=>e.tools)),agentMs:Yv(e.map(e=>e.agentMs)),fileEdits:Vv(e.map(e=>e.fileEdits))??0}}function Zv(e,t){let n=Wv(e,t);return Gv(e.length,t.length)>=.05?{p:n,verdict:`insufficient`}:n===null||n>=.05?{p:n,verdict:`noise`}:{p:n,verdict:(Vv(e)??0)<(Vv(t)??0)?`fewer`:`more`}}var Qv=(e,t)=>t===0?null:e/t;function $v(e,t){let n=Xv(e),r=Xv(t);if(!n||!r)return null;let i=Zv(e.map(e=>e.tools),t.map(e=>e.tools)),a=Zv(e.map(e=>e.agentMs),t.map(e=>e.agentMs)),o=e.map(e=>e.tools),s=t.map(e=>e.tools);return{variant:n,control:r,toolsRatio:Qv(n.tools.median,r.tools.median),agentMsRatio:Qv(n.agentMs.median,r.agentMs.median),agentMsDelta:n.agentMs.median-r.agentMs.median,toolsP:i.p,agentMsP:a.p,separated:Math.max(...o)<Math.min(...s)||Math.min(...o)>Math.max(...s),verdict:i.verdict,timeVerdict:a.verdict}}var ey=(e,t)=>e.attempts.filter(e=>e.cell===t&&Jv(e)).map(qv),ty=(e,t)=>Xv(ey(e,t));function ny(e,t){let n=e.cells.find(e=>e.key===t);return n?.lift?$v(ey(e,t),ey(e,n.lift.vs)):null}var ry=e=>Number.isInteger(e)?String(e):e.toFixed(1),iy=e=>e===null?`×–`:`×${e.toFixed(2)}`;function ay(e){if(e<9950)return e<50?`0s`:`${(e/1e3).toFixed(1)}s`;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,`0`)}s`}var oy={fewer:e=>`fewer ${e}`,more:e=>`more ${e}`,noise:()=>`within noise`,insufficient:()=>`too few attempts to test`},sy=e=>`tools ${ry(e.tools.median)} · agent ${ay(e.agentMs.median)}`;function cy(e,t){let n=Qv(t.tools.median,e.tools.median),r=Qv(t.agentMs.median,e.agentMs.median);return`tools ${ry(e.tools.median)} → ${ry(t.tools.median)} (${iy(n)}) · agent ${ay(e.agentMs.median)} → ${ay(t.agentMs.median)} (${iy(r)})`}function ly(e,t){if(e.length<=t)return e;let n=e.slice(0,t-1),r=n.search(/\s\S*$/);return`${(r>t/2?n.slice(0,r):n).trimEnd()}…`}function uy(e,t){return!e||!t?e??t:{input:e.input+t.input,output:e.output+t.output,cacheRead:e.cacheRead+t.cacheRead,cacheWrite:e.cacheWrite+t.cacheWrite,reasoning:e.reasoning===null&&t.reasoning===null?null:(e.reasoning??0)+(t.reasoning??0)}}var dy=e=>{let t=null;for(let n of e)t=uy(t,n??null);return t},fy=e=>e.input+e.cacheRead+e.cacheWrite,py=2,my=e=>e.outcome===`pass`||e.outcome===`fail`;function hy(e){return ly(e.replace(/\?+$/,``).trim(),20)}function gy(e,t){let n=new Map;for(let r of e.attempts)if(r.cell===t&&my(r))for(let e of r.judgements){let t=n.get(e.key)??{label:hy(e.question),question:e.question,pass:0,counted:0};t.counted++,e.verdict===`pass`&&t.pass++,n.set(e.key,t)}return n}function _y(e,t){let n=e.cells.find(e=>e.key===t);if(n?.role===`variant`)return e.cells.find(e=>e.role===`control`&&e.harness===n.harness&&e.sandbox===n.sandbox)}function vy(e,t){if(!t||e.counted<2||t.counted<2)return null;let{points:n,low:r,high:i}=Rv({pass:e.pass,n:e.counted},{pass:t.pass,n:t.counted});return{points:zv(n),control:{pass:t.pass,counted:t.counted},variant:{pass:e.pass,counted:e.counted},withinNoise:r<0&&i>0}}function yy(e,t){let n=gy(e,t),r=_y(e,t),i=r?gy(e,r.key):void 0;return[...n].map(([e,t])=>({key:e,...t,lift:vy(t,i?.get(e))}))}function by(e){let t=e.map(e=>({verdict:e.verdict,score:e.score,threshold:e.threshold,label:hy(e.question),key:e.key}));return t.length<=py?{shown:t,extra:0}:{shown:[t.reduce((e,t)=>e.score<=t.score?e:t)],extra:t.length}}function xy(e,t){return dy(e.attempts.filter(e=>e.cell===t&&my(e)).map(e=>e.usage))}var Sy={"run-record":[{path:`plan.sandboxWarnings`,empty:()=>[]},{path:`stack.harnesses[].resolvedModels`,empty:()=>[]},{path:`evals[].todo`,empty:()=>!1}],"transcript-line":[],analysis:[],"analysis-note":[],"debug-request":[],"live-progress":[],"cli-invocation":[]},Cy={},wy={"run-record":1,analysis:1,"analysis-note":1},Ty=class extends Error{name=`NewerSchemaError`;reason;constructor(e,t,n){let r=`written by a newer reeval (schemaVersion ${t}; this reeval reads up to ${n}). Upgrade reeval to read it.`;super(`${e} was ${r}`),this.reason=r}},Ey=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Dy(e,t,n){if(!Ey(e))return;let[r=``,...i]=t,a=/^<(\w+)=(.+)>$/.exec(r);if(a){String(e[a[1]])===a[2]&&Dy(e,i,n);return}let[,o=r,s]=/^(.+?)(\[\]|\{\})?$/.exec(r)??[];if(!i.length&&!s){e[o]===void 0&&(e[o]=n());return}let c=e[o],l=s===`[]`?Array.isArray(c)?c:[]:s===`{}`?Ey(c)?Object.values(c):[]:[c];for(let e of l)Dy(e,i,n)}function Oy(e,t){for(let n of Sy[e])Dy(t,n.path.split(`.`),n.empty);return t}function ky(e,t,n){let r=wy[e],i=t.schemaVersion;if(typeof i!=`number`)return t;if(i>r)throw new Ty(n,i,r);let a=t;for(;i<r;i++){let t=Cy[e]?.[i];if(!t)break;a=t(a)}return a}function Ay(e,t=`Run ${e.runId}`){return Oy(`run-record`,ky(`run-record`,e,t))}var jy=e=>Oy(`transcript-line`,e),My=`api/live`,Ny=(e,t)=>`api/live/${e}/transcript?attempt=${encodeURIComponent(t)}`,Py=[`pass`,`fail`,`infra_error`,`skipped`],Fy=e=>Py.includes(e);[...Py];var Iy=`studio.json`,Ly=`data/index/manifest.json`,Ry=e=>`data/index/${e}.json`,zy=e=>`data/runs/${e}.json`,By=(e,t)=>`data/runs/${e}/${t}`;function Vy(e){let[t=e,...n]=e.split(` › `);return{file:t,path:n.length?n:[t]}}function Hy(e){if(e==null)return`–`;if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(+(e<1e4))}s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return t<60?n?`${t}m ${n}s`:`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}var Uy=e=>e===null?`–`:`${Math.round(e*100)}%`;function Wy(e){let t=[...e.model?[`model ${e.model}`]:[],...e.resolvedModels.length?[`served ${e.resolvedModels.join(`, `)}`]:[]];return t.length?`${e.id} (${t.join(`, `)})`:e.id}function Gy(e){let t=e.runtime??{name:`node`,version:e.node};return t.name===`node`?`node ${t.version}`:`${t.name} ${t.version} (node ${e.node})`}function Ky(e){let t=e.language;return t?`${t.version?`${t.name} ${t.version}`:t.name} evals`:null}function qy(e){if(!e)return null;let t=e=>e>=1e4?`${Math.round(e/1e3)}k`:String(e),n=e.cacheRead?` (${t(e.cacheRead)} cached)`:``;return`${t(fy(e))} in${n} · ${t(e.output)} out`}var Jy=e=>e?e.slice(0,7):`no git`;function Yy(e){let t=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return`${t(e.tools,`tool call`)} · ${t(e.fileEdits,`file edit`)}`}function Xy(e){if(e.status===`interrupted`)return`skipped`;let t=e.evals.map(e=>e.outcome);return t.includes(`fail`)||e.status===`budget`?`fail`:t.includes(`infra_error`)?`infra_error`:`pass`}function Zy(e){return e.length<=1?e[0]??``:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`}function Qy(e){let t=new Set,n=[];for(let r of e.evals)for(let e of r.attempts)if(e.outcome===`pass`||e.outcome===`fail`)for(let r of e.judgements){if(r.verdict!==`fail`)continue;let e=hy(r.question);t.has(e)||(t.add(e),n.push(e))}return n}function $y(e){let{pass:t,fail:n,infraError:r}=e.summary,i=t+n,a=Qy(e),o=[];return i===0?o.push(`No counted attempts`):(o.push(`${t} of ${i} counted attempts passed`),n>0&&o.push(a.length?`${n} failed the ${Zy(a)} judge${a.length===1?``:`s`}`:`${n} failed`)),r>0&&o.push(`${r} infra error${r===1?``:`s`}`),`${o.join(`; `)}.`}function eb(e){let t=[...e].sort((e,t)=>e.runId<t.runId?-1:1),n=new Map,r=new Map,i=null,a=[];for(let e of t){let{pass:t,fail:o,infraError:s}=e.summary,c=i&&{stack:i.stack,evals:[...r].map(([e,t])=>({id:e,cells:[...t.values()]}))},l=0;for(let t of e.evals){wv(n,t.id,t.cells)&&l++;let e=r.get(t.id)??new Map;for(let n of t.cells)e.set(n.key,n);r.set(t.id,e)}a.push({entry:e,passed:t,total:t+o+s,drift:c?Cv(c,e):[],changedEvals:l}),e.status===`complete`&&(i=e)}return a.reverse()}var tb=e=>({pass:e.attempts.filter(e=>e.outcome===`pass`).length,fail:e.attempts.filter(t=>t.outcome===`fail`&&!pb(e,t)).length,missed:e.attempts.filter(t=>pb(e,t)).length,infra:e.attempts.filter(e=>e.outcome===`infra_error`).length,skipped:e.attempts.filter(e=>e.outcome===`skipped`).length}),nb=(e,t)=>({pass:e.pass+t.pass,fail:e.fail+t.fail,missed:e.missed+t.missed,infra:e.infra+t.infra,skipped:e.skipped+t.skipped}),rb={pass:0,fail:0,missed:0,infra:0,skipped:0};function ib(e){let t={kind:`group`,key:``,name:``,tally:rb,children:[]};for(let n of e.evals){let e=[n.file,...n.group],r=t;for(let[t,n]of e.entries()){let i=e.slice(0,t+1).join(` › `),a=r.children.find(e=>e.kind===`group`&&e.key===i);a||(a={kind:`group`,key:i,name:n,tally:rb,children:[]},r.children.push(a)),r=a}r.children.push({kind:`eval`,key:n.id,name:n.name,tally:tb(n),eval:n})}let n=e=>{if(e.kind===`eval`)return e;let t=e.children.map(n);return t.sort((e,t)=>ab(e.tally)-ab(t.tally)),{...e,children:t,tally:t.reduce((e,t)=>nb(e,t.tally),rb)}};return n(t).children}var ab=e=>e.fail?0:e.infra?1:e.pass?2:3;function ob(e){return e.cells.map(t=>({key:t.key,harness:t.harness,environment:t.environment,sandbox:t.sandbox,role:t.role,gated:t.gate!==`none`,gate:t.gate,overrides:t.overrides,runs:t.runs,pass:t.pass,fail:t.fail,infraError:t.infraError,skipped:t.skipped,passRate:t.passRate,outcome:t.outcome,lift:t.lift?Math.round(t.lift.points*100):null,liftInterval:t.lift?{lo:Math.round(t.lift.interval.lo*100),hi:Math.round(t.lift.interval.hi*100),withinNoise:t.lift.withinNoise}:null,belowMinLift:t.lift?.minLift!==void 0&&t.lift.interval.lo<t.lift.minLift,effort:ty(e,t.key),effortVsControl:ny(e,t.key),judgeRates:yy(e,t.key),usage:xy(e,t.key),attempts:e.attempts.filter(e=>e.cell===t.key)}))}function sb(e){return(e.answers??[]).map(e=>{let t=t=>e.rates.filter(e=>e.cut===t).map(e=>({name:e.name,wins:e.wins,n:e.n,rate:e.n?e.wins/e.n:null}));return{question:e.question,model:e.resolvedModel??e.model,votes:e.votes.length,ties:e.votes.filter(e=>e.winner===`tie`).length,within:t(`within`),across:t(`across`),error:e.error??null,noPairs:e.votes.length===0&&e.error===void 0}})}var cb=e=>e.cells.length>1||e.cells.some(e=>e.runs>1);function lb(e,t){let n=[...e].sort((e,t)=>e.runId<t.runId?-1:1),r=[],i=new Map;for(let e of n){let n=e.evals.find(e=>e.slug===t);n&&r.push({run:e,outcome:n.outcome,passRate:n.passRate,cells:n.cells,changed:wv(i,n.id,n.cells)})}return r}var ub=e=>{let t=e?.attempts.flatMap(e=>e.judgements.map(e=>e.score))??[];return t.length?t.reduce((e,t)=>e+t,0)/t.length:null},db=[`regressed`,`fixed`,`drift`,`infra`,`added`,`removed`,`same`],fb=e=>e.some(e=>e.gate===`none`),pb=(e,t)=>t.outcome===`fail`&&t.error?.kind!==`aborted`&&e.cells.find(e=>e.key===t.cell)?.gate===`none`;function mb(e){let t=e.filter(e=>e.gate!==`none`),n=t.reduce((e,t)=>e+t.pass,0),r=n+t.reduce((e,t)=>e+t.fail,0);return r?n/r:null}function hb(e,t,n={}){let r=jv(e,t).map(r=>{let i=e.evals.find(e=>e.id===r.id),a=t.evals.find(e=>e.id===r.id),o=new Set(i?.cells.map(e=>e.key)),s=r.cells&&new Set(a?.cells.filter(e=>o.has(e.key)).map(e=>e.key)),c=e=>e?s?mb(e.cells.filter(e=>s.has(e.key))):e.passRate:null;return{...r,slug:a?.slug??i?.slug??null,basePassRate:c(i),headPassRate:c(a),baseScore:ub(n.base?.evals.find(e=>e.id===r.id)),headScore:ub(n.head?.evals.find(e=>e.id===r.id)),perCell:r.perCell??[]}});return r.sort((e,t)=>db.indexOf(e.status)-db.indexOf(t.status)),{rows:r,counts:Object.fromEntries(db.map(e=>[e,r.filter(t=>t.status===e).length])),changes:Cv(e,t)}}function gb(e){let t=[];for(let n of e.split(`
|
|
51
|
+
`))if(n.trim())try{let e=JSON.parse(n);e&&typeof e.type==`string`&&t.push(jy(e))}catch{}return t}function _b(e){return e.map(e=>e.type===`prompt`?{kind:`turn`,turn:e.turn,prompt:e.text,ts:e.ts}:e.type===`turn-end`?{kind:`turn-end`,turn:e.turn,status:e.status,durationMs:e.durationMs}:{kind:`event`,turn:e.turn,event:e})}var vb=/^diff --git a\/(.+?) b\/(.+)$/m;function yb(e){return e.trim()?e.split(/(?=^diff --git )/m).filter(e=>e.startsWith(`diff --git `)).map(e=>{let t=vb.exec(e),n=t?.[2]??t?.[1]??`unknown`,r=0,i=0;for(let t of e.split(`
|
|
52
|
+
`))t.startsWith(`+`)&&!t.startsWith(`+++ `)?r++:t.startsWith(`-`)&&!t.startsWith(`--- `)&&i++;return{path:n,status:/^new file mode/m.test(e)?`added`:/^deleted file mode/m.test(e)?`deleted`:/^rename from/m.test(e)?`renamed`:/^(Binary files|GIT binary patch)/m.test(e)?`binary`:`modified`,added:r,removed:i,text:e}}):[]}var bb=(e,t)=>e.evals.find(e=>e.slug===t),xb=(e,t)=>e.attempts.find(e=>e.id===t),Sb=class extends Error{name=`NotFoundError`};async function Cb(e){let t=await fetch(new URL(e,document.baseURI),{credentials:`same-origin`});if(t.status===404)throw new Sb(`${e} not found`);if(t.status===401)throw Error(`The studio session expired. Reopen the URL printed by reeval studio.`);if(!t.ok)throw Error(`${e}: HTTP ${t.status}`);return t}var wb=async e=>(await Cb(e)).json(),Tb=async e=>(await Cb(e)).text(),Eb=tt({queryKey:[`index`,Iy],queryFn:()=>wb(Iy),staleTime:6e4}),Db=tt({queryKey:[`index`,`headers`],queryFn:async()=>{let e=await wb(Ly);return{manifest:e,headers:(await Promise.all(e.shards.map(e=>wb(Ry(e.id))))).flat()}}}),Ob=e=>tt({queryKey:[`record`,e],queryFn:async()=>Ay(await wb(zy(e)))}),kb=(e,t)=>tt({queryKey:[`artifact`,e,t],queryFn:()=>Tb(By(e,t)),enabled:!!t,staleTime:1/0,retry:(e,t)=>!(t instanceof Sb)&&e<2}),Ab=e=>tt({queryKey:[`record`,`analysis`,e],queryFn:async()=>{try{return await wb(hv(e))}catch(t){if(t instanceof Sb)return{runId:e,entries:[]};throw t}}}),jb=(e,t,n)=>tt({queryKey:[`debug`,e,t],queryFn:()=>wb(Nv(e,t)),enabled:n,retry:!1}),Mb=(e,t,n)=>tt({queryKey:[`debug-trace`,e,t],queryFn:()=>Tb(Pv(e,t)),enabled:n,staleTime:1/0}),Nb=()=>et(Eb),Pb=tt({queryKey:[`live`],queryFn:()=>wb(My),staleTime:1/0});function Fb(){let{data:e}=Nb(),t=!!e?.features.live,n=et({...Pb,enabled:t});return{...n,runs:t?n.data?.runs??[]:[]}}var Ib=(e,t)=>tt({queryKey:[`live-transcript`,e,t],queryFn:()=>Tb(Ny(e,t)),staleTime:1/0,retry:!1});function Lb(e){let t=g();(0,p.useEffect)(()=>{if(!e)return;let n=new EventSource(new URL(`api/events`,document.baseURI));n.addEventListener(`history.changed`,()=>{t.invalidateQueries({queryKey:[`index`]}),t.invalidateQueries({queryKey:[`record`]})});let r=Promise.resolve();return n.addEventListener(`run.progress`,e=>{let n=JSON.parse(e.data);r=r.then(async()=>{let e=t.getQueryData(Pb.queryKey)?.runs??[],r=new Set(n.runs.map(e=>e.runId));e.some(e=>!r.has(e.runId))&&await t.refetchQueries({queryKey:[`index`]}).catch(()=>{}),t.setQueryData(Pb.queryKey,n)})}),n.addEventListener(`ready`,()=>{t.invalidateQueries({queryKey:Pb.queryKey})}),()=>n.close()},[e,t])}var Rb=`reeval-studio-theme`,zb=()=>window.matchMedia(`(prefers-color-scheme: dark)`),Bb=new Set,Vb=()=>{let e=localStorage.getItem(Rb);return e===`light`||e===`dark`?e:`system`};function Hb(e=Vb()){let t=e===`dark`||e===`system`&&zb().matches;document.documentElement.classList.toggle(`dark`,t)}function Ub(){Hb(),zb().addEventListener(`change`,()=>{Hb();for(let e of Bb)e()})}function Wb(){let e=(0,p.useSyncExternalStore)(e=>(Bb.add(e),()=>Bb.delete(e)),Vb),t=(0,p.useCallback)(e=>{e===`system`?localStorage.removeItem(Rb):localStorage.setItem(Rb,e),Hb(e);for(let e of Bb)e()},[]);return{theme:e,resolved:e===`system`?zb().matches?`dark`:`light`:e,setTheme:t}}var Gb=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Kb(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Gb(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var qb=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Jb=e=>{let t=qb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yb=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Xb={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Zb(e){return e!=null}function Qb(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Xb.width,a=e.size??e.height??Xb.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Yb(...c):Yb(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Xb[`stroke-width`])*Number(e.size??e.width??Xb.width)/Number(t.size??t.width??Xb.width):t.strokeWidth??Xb[`stroke-width`];return[`svg`,{...Object.entries(Xb).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Zb(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Zb(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Zb(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function $b(e,t={}){return Qb(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ex=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},tx=(0,p.createContext)({}),nx=()=>(0,p.useContext)(tx),rx=(0,p.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=nx()??{},b=!!c||ex(d),[x,S,C=[]]=$b(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Yb(y,s),hasA11yProp:b,attributes:d});return(0,p.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Q(e,t=[],n=[]){let r=typeof e==`string`?Kb(e,t,n):e,i=(0,p.forwardRef)(({className:e,...t},n)=>(0,p.createElement)(rx,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Jb(r.name)),i}var ix={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};ix.node;var ax=Q(ix),ox={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};ox.node;var sx=Q(ox),cx={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};cx.node;var lx=Q(cx),ux={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};ux.node;var dx=Q(ux),fx={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};fx.node;var px=Q(fx),mx={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};mx.node;var hx=Q(mx),gx={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};gx.node;var _x=Q(gx),vx={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};vx.node;var yx=Q(vx),bx={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};bx.node;var xx=Q(bx),Sx={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Sx.node;var Cx=Q(Sx),wx={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};wx.node;var Tx=Q(wx),Ex={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Ex.node;var Dx=Q(Ex),Ox={name:`circle-minus`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]],aliases:[`minus-circle`]};Ox.node;var kx=Q(Ox),Ax={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Ax.node;var jx=Q(Ax),Mx={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};Mx.node;var Nx=Q(Mx),Px={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Px.node;var Fx=Q(Px),Ix={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Ix.node;var Lx=Q(Ix),Rx={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Rx.node;var zx=Q(Rx),Bx={name:`cloud-off`,size:24,node:[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Bx.node;var Vx=Q(Bx),Hx={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};Hx.node;var Ux=Q(Hx),Wx={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};Wx.node;var Gx=Q(Wx),Kx={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Kx.node;var qx=Q(Kx),Jx={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};Jx.node;var Yx=Q(Jx),Xx={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};Xx.node;var Zx=Q(Xx),Qx={name:`file-minus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}]]};Qx.node;var $x=Q(Qx),eS={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};eS.node;var tS=Q(eS),nS={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};nS.node;var rS=Q(nS),iS={name:`file-question-mark`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]],aliases:[`file-question`]};iS.node;var aS=Q(iS),oS={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};oS.node;var sS=Q(oS),cS={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};cS.node;var lS=Q(cS),uS={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};uS.node;var dS=Q(uS),fS={name:`gavel`,size:24,node:[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381`,key:`pgg06f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m21.5 10.5-8-8`,key:`a17d9x`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m8.5 7.5 8 8`,key:`1oyaui`}]]};fS.node;var pS=Q(fS),mS={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};mS.node;var hS=Q(mS),gS={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};gS.node;var _S=Q(gS),vS={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};vS.node;var yS=Q(vS),bS={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};bS.node;var xS=Q(bS),SS={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};SS.node;var CS=Q(SS),wS={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};wS.node;var TS=Q(wS),ES={name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]};ES.node;var DS=Q(ES),OS={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};OS.node;var kS=Q(OS),AS={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};AS.node;var jS=Q(AS),MS={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};MS.node;var NS=Q(MS),PS={name:`radio`,size:24,node:[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};PS.node;var FS=Q(PS),IS={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};IS.node;var LS=Q(IS),RS={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};RS.node;var zS=Q(RS),BS={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};BS.node;var VS=Q(BS),HS={name:`search-x`,size:24,node:[[`path`,{d:`m13.5 8.5-5 5`,key:`1cs55j`}],[`path`,{d:`m8.5 8.5 5 5`,key:`a8mexj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]};HS.node;var US=Q(HS),WS={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};WS.node;var GS=Q(WS),KS={name:`shield-alert`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]};KS.node;var qS=Q(KS),JS={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};JS.node;var YS=Q(JS),XS={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};XS.node;var ZS=Q(XS),QS={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};QS.node;var $S=Q(QS),eC={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};eC.node;var tC=Q(eC),nC={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};nC.node;var rC=Q(nC),iC={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};iC.node;var aC=Q(iC),oC={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};oC.node;var sC=Q(oC),cC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,lC=zg,uC=(e,t)=>n=>{if(t?.variants==null)return lC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=cC(t)||cC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return lC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},dC=uC(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function fC({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Xa:`button`;return(0,m.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Z(dC({variant:t,size:n,className:e})),...i})}function pC({...e}){return(0,m.jsx)(fm,{"data-slot":`dropdown-menu`,...e})}function mC({...e}){return(0,m.jsx)(pm,{"data-slot":`dropdown-menu-trigger`,...e})}function hC({className:e,sideOffset:t=4,...n}){return(0,m.jsx)(mm,{children:(0,m.jsx)(hm,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:Z(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function gC({...e}){return(0,m.jsx)(gm,{"data-slot":`dropdown-menu-radio-group`,...e})}function _C({className:e,children:t,...n}){return(0,m.jsxs)(_m,{"data-slot":`dropdown-menu-radio-item`,className:Z(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,m.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,m.jsx)(vm,{children:(0,m.jsx)(Lx,{className:`size-2 fill-current`})})}),t]})}var vC=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`}),yC=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function bC(e,t=Date.now()){let n=Date.parse(e)-t;for(let[e,t]of yC)if(Math.abs(n)>=t)return vC.format(Math.round(n/t),e);return`just now`}var xC=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),SC=e=>xC.format(new Date(e)),CC=(e,t)=>`${e} ${t}${e===1?``:`s`}`,wC=e=>e.split(`_`).slice(0,2).join(`_`),TC=[{to:`/`,label:`Runs`,icon:LS},{to:`/evals`,label:`Evals`,icon:lS},{to:`/compare`,label:`Compare`,icon:yS}];function EC(){let{theme:e,resolved:t,setTheme:n}=Wb();return(0,m.jsxs)(pC,{children:[(0,m.jsx)(mC,{asChild:!0,children:(0,m.jsx)(fC,{variant:`ghost`,size:`icon`,className:`size-8`,"aria-label":`Theme`,children:t===`dark`?(0,m.jsx)(NS,{className:`size-4`}):(0,m.jsx)($S,{className:`size-4`})})}),(0,m.jsx)(hC,{align:`end`,className:`w-36`,children:(0,m.jsxs)(gC,{value:e,onValueChange:e=>n(e),children:[(0,m.jsxs)(_C,{value:`light`,children:[(0,m.jsx)($S,{className:`size-4`}),` Light`]}),(0,m.jsxs)(_C,{value:`dark`,children:[(0,m.jsx)(NS,{className:`size-4`}),` Dark`]}),(0,m.jsxs)(_C,{value:`system`,children:[(0,m.jsx)(CS,{className:`size-4`}),` System`]})]})})]})}function DC(){let{data:e}=Nb();return e?e.mode===`live`?(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs text-muted-foreground`,children:[(0,m.jsxs)(`span`,{className:`relative flex size-2`,children:[(0,m.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-pass opacity-60`}),(0,m.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-pass`})]}),`Live`]})}),(0,m.jsx)(mv,{children:`Watching the history folder: runs show here while they run, and stay once they land.`})]}):(0,m.jsxs)(`span`,{className:`rounded-full border px-2.5 py-0.5 text-xs text-muted-foreground`,children:[`Snapshot · `,bC(e.generatedAt)]}):null}function OC(){let{data:e}=Nb();return Lb(!!e?.features.live),(0,m.jsxs)(`div`,{className:`min-h-dvh`,children:[(0,m.jsx)(`header`,{className:`sticky top-0 z-30 border-b bg-background/80 backdrop-blur-md`,children:(0,m.jsxs)(`div`,{className:`mx-auto flex h-14 max-w-7xl items-center gap-2 px-4 sm:gap-4 sm:px-6`,children:[(0,m.jsxs)(R,{to:`/`,className:`flex items-center gap-2.5 font-semibold tracking-tight`,children:[(0,m.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-lg bg-brand text-white shadow-sm`,children:(0,m.jsx)(`svg`,{viewBox:`0 0 32 32`,className:`size-5`,"aria-hidden":`true`,children:(0,m.jsx)(`path`,{d:`M7 22 13.5 9l3.8 7.6L19.6 13 25 22`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),(0,m.jsx)(`span`,{className:`hidden sm:inline`,children:`reeval Studio`})]}),e?(0,m.jsx)(`span`,{className:`hidden truncate font-mono text-xs text-muted-foreground md:inline`,children:e.project}):null,(0,m.jsx)(`nav`,{className:`ml-1 flex items-center gap-0.5 sm:ml-4`,children:TC.map(({to:e,label:t,icon:n})=>(0,m.jsxs)(R,{to:e,activeOptions:{exact:e===`/`,includeSearch:!1},className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[status=active]:bg-accent data-[status=active]:text-foreground`,children:[(0,m.jsx)(n,{className:`size-4`}),(0,m.jsx)(`span`,{className:`hidden sm:inline`,children:t})]},e))}),(0,m.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,m.jsx)(DC,{}),(0,m.jsx)(EC,{})]})]})}),(0,m.jsx)(`main`,{className:`mx-auto max-w-7xl px-4 py-6 sm:px-6 sm:py-8`,children:(0,m.jsx)(Ea,{})})]})}function kC({className:e,...t}){return(0,m.jsx)(`div`,{"data-slot":`skeleton`,className:Z(`animate-pulse rounded-md bg-accent`,e),...t})}function AC({icon:e,title:t,children:n,className:r}){return(0,m.jsxs)(`div`,{className:Z(`flex flex-col items-center justify-center rounded-xl border border-dashed px-6 py-14 text-center`,r),children:[(0,m.jsx)(`div`,{className:`mb-4 flex size-11 items-center justify-center rounded-full bg-muted`,children:(0,m.jsx)(e,{className:`size-5 text-muted-foreground`})}),(0,m.jsx)(`h3`,{className:`text-sm font-semibold`,children:t}),n?(0,m.jsx)(`div`,{className:`mt-1.5 max-w-md text-sm text-muted-foreground`,children:n}):null]})}function jC({error:e,className:t}){return e instanceof Sb?(0,m.jsx)(AC,{icon:US,title:`Not found`,className:t,children:`This run or file isn't in the history. It may have been removed, or the link is from another checkout.`}):(0,m.jsx)(AC,{icon:Vx,title:`Couldn't load this`,className:t,children:(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e?.message??String(e)})})}function MC({children:e}){return(0,m.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[12px] text-foreground`,children:e})}function NC({rows:e=6,className:t}){return(0,m.jsx)(`div`,{className:Z(`space-y-2`,t),children:Array.from({length:e},(e,t)=>(0,m.jsx)(kC,{className:`h-11 w-full`,style:{opacity:1-t*.12}},t))})}function PC(){return(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsx)(kC,{className:`h-4 w-40`}),(0,m.jsx)(kC,{className:`h-8 w-96 max-w-full`}),(0,m.jsx)(kC,{className:`h-4 w-72 max-w-full`})]})}function FC(e,t,n=!1){return t?`This studio was built with --no-artifacts, so only records are included.`:e.artifacts===`none`?`This run was recorded with --artifacts none, so no files were kept.`:e.artifacts===`failures`?`This run kept files for failing evals only (--artifacts failures).`:n?"recorded, but not on disk (often a `*.log` gitignore)":`The run didn't write this file.`}function IC({record:e,file:t,what:n,children:r}){let{data:i}=Nb(),a=i?.features.artifacts===!1,o=et(kb(e.runId,a?void 0:t?.path));return!t||a||o.error instanceof Sb?(0,m.jsx)(AC,{icon:aS,title:`No ${n}`,children:FC(e,a,!!t&&!a)}):o.error?(0,m.jsx)(jC,{error:o.error}):o.isPending?(0,m.jsx)(NC,{rows:5}):(0,m.jsx)(m.Fragment,{children:r(o.data)})}var LC=uC(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function RC({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Xa:`span`;return(0,m.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:Z(LC({variant:t}),e),...r})}var zC={pass:{label:`Passed`,Icon:Tx,text:`text-pass`,bg:`bg-pass/10 text-pass border-pass/25`},fail:{label:`Failed`,Icon:Fx,text:`text-fail`,bg:`bg-fail/10 text-fail border-fail/25`},infra_error:{label:`Infra error`,Icon:Cx,text:`text-infra`,bg:`bg-infra/10 text-infra border-infra/30`},skipped:{label:`Skipped`,Icon:Dx,text:`text-skip`,bg:`bg-skip/10 text-skip border-skip/25`}},BC=e=>zC[e]??{label:String(e),Icon:jx,text:`text-muted-foreground`,bg:`bg-muted text-muted-foreground`};function VC({outcome:e,missed:t=!1,className:n}){if(!e)return(0,m.jsx)(`span`,{className:Z(`inline-block size-4 rounded-full border border-dashed border-muted-foreground/40`,n),role:`img`,"aria-label":`Not run`});let{Icon:r,text:i,label:a}=BC(e);return t&&e===`fail`?(0,m.jsx)(kx,{className:Z(`size-4 shrink-0 text-muted-foreground`,n),"aria-label":`Missed, not gated`}):(0,m.jsx)(r,{className:Z(`size-4 shrink-0`,i,n),"aria-label":a})}function HC({outcome:e,label:t,className:n}){let{bg:r,Icon:i,label:a}=BC(e);return(0,m.jsxs)(RC,{variant:`outline`,className:Z(r,n),children:[(0,m.jsx)(i,{}),t??a]})}function UC({pass:e,fail:t,missed:n=0,infra:r=0,skipped:i=0,className:a}){let o=e+t+n+r+i;if(o===0)return(0,m.jsx)(`div`,{className:Z(`h-1.5 rounded-full bg-muted`,a)});let s=(e,t)=>e>0?(0,m.jsx)(`div`,{className:t,style:{width:`${e/o*100}%`}}):null;return(0,m.jsxs)(`div`,{className:Z(`flex h-1.5 overflow-hidden rounded-full bg-muted`,a),children:[s(e,`bg-pass`),s(t,`bg-fail`),s(n,`bg-muted-foreground/40`),s(r,`bg-infra`),s(i,`bg-skip/50`)]})}function WC({rate:e,className:t}){return(0,m.jsx)(`span`,{className:Z(`tabular font-medium`,e===null?`text-muted-foreground`:e>=.999?`text-pass`:e===0?`text-fail`:`text-infra`,t),children:Uy(e)})}var GC=e=>`${e>0?`+`:e<0?`−`:``}${Math.abs(e)}`;function KC({points:e,interval:t}){if(e===null)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});let n=t?.withinNoise??!1;return(0,m.jsxs)(`span`,{className:Z(`tabular font-medium`,n?`text-muted-foreground`:e>0?`text-pass`:e<0?`text-fail`:`text-muted-foreground`),children:[GC(e),` pts`,t?(0,m.jsxs)(`span`,{className:`ml-1 text-[11px] font-normal text-muted-foreground`,children:[`95% `,GC(t.lo),`…`,GC(t.hi),n?` · within noise`:``]}):null]})}function qC({changes:e,evals:t=0}){if(e.length===0&&t===0)return null;let n=[...e.map(e=>`${e.label}: ${e.base} → ${e.head}`),...t?[`${t} eval${t===1?``:`s`} changed (fingerprint)`]:[]];return(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsxs)(RC,{variant:`outline`,className:`cursor-default border-drift/30 bg-drift/10 text-drift`,children:[(0,m.jsx)(yS,{}),`drift`]})}),(0,m.jsxs)(mv,{className:`max-w-sm`,children:[(0,m.jsx)(`p`,{className:`mb-1 font-medium`,children:`Changed since the previous run`}),(0,m.jsx)(`ul`,{className:`space-y-0.5`,children:n.map(e=>(0,m.jsx)(`li`,{className:`font-mono text-[11px] break-all`,children:e},e))})]})]})}function JC({items:e,size:t=`md`}){let n={pass:`bg-pass`,fail:`bg-fail`,infra_error:`bg-infra`,skipped:`bg-skip/50`};return(0,m.jsx)(`div`,{className:`flex items-center gap-[3px]`,children:e.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center gap-[3px]`,children:[e.changed?(0,m.jsx)(`div`,{className:`h-4 w-px bg-drift`,title:`Eval or stack changed`}):null,(0,m.jsx)(`div`,{title:e.title,className:Z(`rounded-[3px]`,t===`sm`?`size-2.5`:`size-3.5`,e.outcome?n[e.outcome]??`bg-muted-foreground/40`:`border border-dashed border-muted-foreground/40`)})]},e.key))})}function YC({className:e,orientation:t=`horizontal`,...n}){return(0,m.jsx)(Jh,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Z(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var XC=uC(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function ZC({className:e,variant:t=`default`,...n}){return(0,m.jsx)(Yh,{"data-slot":`tabs-list`,"data-variant":t,className:Z(XC({variant:t}),e),...n})}function QC({className:e,...t}){return(0,m.jsx)(Xh,{"data-slot":`tabs-trigger`,className:Z(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function $C({className:e,...t}){return(0,m.jsx)(Zh,{"data-slot":`tabs-content`,className:Z(`flex-1 outline-none`,e),...t})}function ew({record:e,check:t,index:n}){let r=t.exitCode===0,[i,a]=(0,p.useState)(!r);return(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>a(!i),className:`flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-accent/50`,children:[(0,m.jsx)(yx,{className:Z(`size-4 text-muted-foreground transition-transform`,i&&`rotate-90`)}),(0,m.jsx)(ZS,{className:`size-4 text-muted-foreground`}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`#`,n+1]}),(0,m.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-sm`,children:t.command}),(0,m.jsxs)(RC,{variant:`outline`,className:r?`border-pass/30 text-pass`:`border-fail/30 text-fail`,children:[`exit `,t.exitCode]}),(0,m.jsx)(`span`,{className:`tabular w-14 text-right text-xs text-muted-foreground`,children:Hy(t.durationMs)})]}),i?(0,m.jsx)(`div`,{className:`border-t bg-muted/30 p-3`,children:(0,m.jsx)(IC,{record:e,file:t.log,what:`log`,children:e=>(0,m.jsx)(`pre`,{className:`max-h-[60vh] overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:e})})}):null]})}function tw({record:e,attempt:t}){return t.checks.length===0?(0,m.jsxs)(AC,{icon:TS,title:`No checks`,children:[`This eval ran no `,(0,m.jsx)(`code`,{className:`font-mono`,children:`c.exec()`}),` commands.`]}):(0,m.jsx)(`div`,{className:`space-y-2`,children:t.checks.map((t,n)=>(0,m.jsx)(ew,{record:e,check:t,index:n},n))})}function nw({className:e,type:t,...n}){return(0,m.jsx)(`input`,{type:t,"data-slot":`input`,className:Z(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function rw(e){let t=[];for(let n of e){let e=Date.parse(n.at),r=t.at(-1);r&&r.phase===n.phase?(r.end=e,r.lines.push(n)):(r&&(r.end=Math.max(r.end,e)),t.push({phase:n.phase,start:e,end:e,lines:[n]}))}return t}function iw({lines:e}){let t=(0,p.useMemo)(()=>rw(e),[e]),[n,r]=(0,p.useState)(null),i=t[0]?.start??0,a=Math.max(1,(t.at(-1)?.end??i)-i);return(0,m.jsx)(`div`,{className:`space-y-1`,children:t.map((e,t)=>(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(n===t?null:t),className:`flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-accent/50`,children:[(0,m.jsx)(yx,{className:Z(`size-4 shrink-0 text-muted-foreground transition-transform`,n===t&&`rotate-90`)}),(0,m.jsx)(`span`,{className:`w-20 shrink-0 font-mono text-xs`,children:e.phase}),(0,m.jsxs)(`span`,{className:`tabular w-16 shrink-0 text-right text-xs text-muted-foreground`,children:[`+`,Hy(e.start-i)]}),(0,m.jsx)(`div`,{className:`relative hidden h-2 flex-1 rounded-full bg-muted sm:block`,children:(0,m.jsx)(`div`,{className:`absolute h-2 rounded-full bg-brand`,style:{left:`${(e.start-i)/a*100}%`,width:`${Math.max(.5,(e.end-e.start)/a*100)}%`}})}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground sm:hidden`,children:e.lines[0]?.text}),(0,m.jsx)(`span`,{className:`tabular w-14 shrink-0 text-right text-xs text-muted-foreground`,children:Hy(e.end-e.start)})]}),n===t?(0,m.jsx)(`pre`,{className:`max-h-[50vh] overflow-auto border-t bg-muted/30 p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:e.lines.map(e=>`${e.at.slice(11,23)} ${e.text}`).join(`
|
|
53
|
+
`)}):null]},t))})}function aw({requests:e}){return e.length===0?(0,m.jsx)(AC,{icon:xS,title:`No gateway requests`,children:`Nothing went through the egress gateway (the fake sandbox has none).`}):(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,m.jsx)(`thead`,{className:`text-left text-muted-foreground`,children:(0,m.jsxs)(`tr`,{className:`border-b`,children:[(0,m.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Request`}),(0,m.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Status`}),(0,m.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Bytes ↑/↓`}),(0,m.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Time`}),(0,m.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Substituted`})]})}),(0,m.jsx)(`tbody`,{children:e.map((e,t)=>(0,m.jsxs)(`tr`,{className:`border-b last:border-0 align-top`,children:[(0,m.jsxs)(`td`,{className:`max-w-[28rem] px-3 py-2 font-mono break-all`,children:[e.method,` `,e.url,!e.allowed&&e.reason?(0,m.jsx)(`div`,{className:`mt-0.5 font-sans text-fail`,children:e.reason}):null]}),(0,m.jsx)(`td`,{className:`px-3 py-2`,children:(0,m.jsx)(RC,{variant:`outline`,className:e.allowed?`border-pass/30 text-pass`:`border-fail/30 text-fail`,children:e.allowed?e.status??`—`:`blocked ${e.status??``}`})}),(0,m.jsxs)(`td`,{className:`tabular px-3 py-2 whitespace-nowrap text-muted-foreground`,children:[Fv(e.sent),` / `,Fv(e.received)]}),(0,m.jsx)(`td`,{className:`tabular px-3 py-2 text-muted-foreground`,children:Hy(e.ms)}),(0,m.jsx)(`td`,{className:`px-3 py-2 font-mono`,children:e.substituted.join(`, `)||`—`})]},t))})]})})}function ow({runId:e,attemptKey:t}){let[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(``),o=et(Mb(e,t,n));if(!n)return(0,m.jsxs)(fC,{variant:`outline`,size:`sm`,onClick:()=>r(!0),children:[(0,m.jsx)(VS,{}),` Load trace.ndjson`]});if(o.error)return(0,m.jsx)(jC,{error:o.error});if(o.isPending)return(0,m.jsx)(NC,{rows:4});let s=o.data.split(`
|
|
54
|
+
`).filter(e=>e&&(!i||e.includes(i)));return(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(nw,{placeholder:`Filter lines, e.g. docker or gateway`,value:i,onChange:e=>a(e.target.value),className:`max-w-sm`}),(0,m.jsx)(`pre`,{className:`max-h-[60vh] overflow-auto rounded-lg border bg-muted/30 p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap break-all`,children:s.join(`
|
|
55
|
+
`)})]})}function sw({runId:e,attemptKey:t,view:n}){return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Local debug data from `,(0,m.jsx)(`code`,{className:`font-mono`,children:`.reeval/debug`}),`. It stays on this machine: it isn't recorded, and static builds leave it out.`]}),(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Phase timeline`}),(0,m.jsx)(iw,{lines:n.lines})]}),(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Network requests`}),(0,m.jsx)(aw,{requests:n.requests})]}),(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Raw trace`}),n.trace?(0,m.jsx)(ow,{runId:e,attemptKey:t}):(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No trace.ndjson: it's kept when an attempt fails, or with`,` `,(0,m.jsx)(`code`,{className:`font-mono`,children:`reeval run --trace`}),`.`]})]})]})}var cw=5e3;function lw(e){return e.startsWith(`+++ `)||e.startsWith(`--- `)?`text-muted-foreground`:e.startsWith(`+`)?`bg-pass/10 text-pass`:e.startsWith(`-`)?`bg-fail/10 text-fail`:e.startsWith(`@@`)?`bg-brand/8 text-brand`:/^(diff --git|index |new file|deleted file|similarity|rename )/.test(e)?`text-muted-foreground`:``}function uw({text:e,className:t}){let n=e.split(`
|
|
56
|
+
`),r=n.slice(0,cw);return(0,m.jsxs)(`div`,{className:Z(`overflow-auto rounded-lg border bg-card`,t),children:[(0,m.jsx)(`pre`,{className:`min-w-fit py-2 font-mono text-xs leading-5`,children:r.map((e,t)=>(0,m.jsx)(`div`,{className:Z(`px-4 whitespace-pre`,lw(e)),children:e||` `},t))}),n.length>cw?(0,m.jsxs)(`p`,{className:`border-t px-4 py-2 text-xs text-muted-foreground`,children:[`Showing the first `,cw,` of `,n.length,` lines.`]}):null]})}var dw={added:`text-pass`,deleted:`text-fail`,modified:`text-infra`,renamed:`text-drift`,binary:`text-muted-foreground`};function fw({text:e}){let t=(0,p.useMemo)(()=>yb(e),[e]),[n,r]=(0,p.useState)(0);if(t.length===0)return(0,m.jsx)(AC,{icon:Zx,title:`No changes`,children:`The agent didn't change any files in the workspace.`});let i=t[Math.min(n,t.length-1)],a=t.reduce((e,t)=>e+t.added,0),o=t.reduce((e,t)=>e+t.removed,0);return(0,m.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[260px_1fr]`,children:[(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between px-1 text-xs text-muted-foreground`,children:[(0,m.jsxs)(`span`,{children:[t.length,` files`]}),(0,m.jsxs)(`span`,{className:`font-mono`,children:[(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,a]}),` `,(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,o]})]})]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:t.map((e,t)=>(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(t),className:Z(`flex w-full items-center gap-2 border-b px-3 py-2 text-left last:border-b-0 hover:bg-accent/50`,t===n&&`bg-accent`),children:[(0,m.jsx)(`span`,{className:Z(`text-[10px] font-semibold uppercase`,dw[e.status]),children:e.status[0]}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:e.path}),(0,m.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px]`,children:[(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),` `,(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]})]})]},e.path))})]}),(0,m.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`span`,{className:`truncate font-mono text-sm`,children:i.path}),(0,m.jsx)(RC,{variant:`outline`,className:dw[i.status],children:i.status})]}),(0,m.jsx)(uw,{text:i.text,className:`max-h-[70vh]`})]})]})}function pw({score:e,threshold:t,pass:n}){return(0,m.jsxs)(`div`,{className:`relative h-2 rounded-full bg-muted`,children:[(0,m.jsx)(`div`,{className:Z(`absolute inset-y-0 left-0 rounded-full`,n?`bg-pass`:`bg-fail`),style:{width:`${Math.max(2,e*100)}%`}}),(0,m.jsx)(`div`,{className:`absolute -top-1 -bottom-1 w-0.5 rounded bg-foreground`,style:{left:`${t*100}%`},title:`threshold ${t}`})]})}function mw({j:e}){let t=e.verdict===`pass`;return(0,m.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,m.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,m.jsx)(`p`,{className:`text-sm font-medium leading-relaxed`,children:e.question}),(0,m.jsx)(RC,{variant:`outline`,className:t?`border-pass/30 text-pass`:`border-fail/30 text-fail`,children:e.verdict})]}),(0,m.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-[1fr_auto] sm:items-center`,children:[(0,m.jsx)(pw,{score:e.score,threshold:e.threshold,pass:t}),(0,m.jsxs)(`div`,{className:`tabular text-sm`,children:[(0,m.jsx)(`span`,{className:`font-semibold`,children:e.score.toFixed(2)}),(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` / threshold `,e.threshold]})]})]}),(0,m.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-xs`,children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:`Model`}),(0,m.jsx)(`dd`,{className:`font-mono`,children:e.model}),e.resolvedModel&&e.resolvedModel!==e.model?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:`Served by`}),(0,m.jsx)(`dd`,{className:`font-mono`,children:e.resolvedModel})]}):null]})]})}function hw({name:e,value:t}){let n=t&&typeof t==`object`&&`$ref`in t?String(t.$ref):null;return(0,m.jsxs)(`div`,{className:`border-b px-4 py-3 last:border-b-0`,children:[(0,m.jsx)(`div`,{className:`mb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase`,children:e}),n?(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`The judge saw `,(0,m.jsx)(`code`,{className:`font-mono text-foreground`,children:n}),` (see the Diff tab).`]}):Array.isArray(t)?(0,m.jsx)(`ul`,{className:`space-y-0.5 font-mono text-xs`,children:t.map(e=>(0,m.jsx)(`li`,{children:typeof e==`string`?e:JSON.stringify(e)},String(e)))}):(0,m.jsx)(`pre`,{className:`max-h-72 overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap`,children:typeof t==`string`?t:JSON.stringify(t,null,2)})]})}function gw({record:e,attempt:t}){return t.judgements.length===0&&!t.files.judgeInput?(0,m.jsxs)(AC,{icon:pS,title:`No judge`,children:[`This eval made no `,(0,m.jsx)(`code`,{className:`font-mono`,children:`c.judge()`}),` calls.`]}):(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(`section`,{className:`space-y-3`,children:t.judgements.map(e=>(0,m.jsx)(mw,{j:e},e.question))}),(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`What the judge saw`}),(0,m.jsx)(IC,{record:e,file:t.files.judgeInput,what:`judge input`,children:e=>{let t=[];try{t=JSON.parse(e)}catch{return(0,m.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap`,children:e})}return(0,m.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`div`,{className:`border-b bg-muted/40 px-4 py-2 text-xs`,children:[(0,m.jsx)(`span`,{className:`font-medium`,children:e.question}),(0,m.jsx)(`span`,{className:`ml-2 font-mono text-muted-foreground`,children:e.model})]}),Object.entries(e.state).map(([e,t])=>(0,m.jsx)(hw,{name:e,value:t},e))]},e.question))})}})]})]})}function _w({value:e,label:t,className:n}){let[r,i]=(0,p.useState)(!1);return(0,m.jsxs)(fC,{variant:`outline`,size:`sm`,className:Z(`h-7 gap-1.5 font-mono text-xs`,n),onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),1200)})},children:[r?(0,m.jsx)(px,{className:`size-3.5 text-pass`}):(0,m.jsx)(qx,{className:`size-3.5`}),t??e]})}function vw({title:e,children:t,action:n}){return(0,m.jsxs)(`section`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b bg-muted/40 px-4 py-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:e}),n]}),(0,m.jsx)(`dl`,{className:`grid grid-cols-[minmax(7rem,auto)_1fr] gap-x-6 gap-y-2 px-4 py-3 text-sm`,children:t})]})}function yw({k:e,children:t,mono:n=!0}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,m.jsx)(`dd`,{className:n?`min-w-0 font-mono text-xs leading-5 break-all`:`min-w-0`,children:t})]})}var bw=(0,m.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:`none`}),xw=e=>e<1024?`${e} B`:e<1024**2?`${(e/1024).toFixed(1)} KB`:`${(e/1024**2).toFixed(1)} MB`;function Sw({egress:e}){let t=typeof e.policy==`string`?e.policy:`allow ${e.policy.allow.join(`, `)||`none`}`;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{children:[t,e.allowed?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`· allows `,e.allowed.join(`, `)||`nothing`]}):null]}),e.recorded?null:(0,m.jsx)(`div`,{className:`font-sans text-muted-foreground`,children:`not recorded by this sandbox`}),e.contacted.map(e=>(0,m.jsxs)(`div`,{children:[e.host,`:`,e.port,` `,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[`×`,e.connections,` · ↑`,xw(e.sent),` ↓`,xw(e.received)]})]},`${e.host}:${e.port}`)),e.blocked.map(e=>(0,m.jsxs)(`div`,{className:`text-fail`,children:[`blocked `,e.host,`:`,e.port,` `,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[`×`,e.connections,` · `,e.reason]})]},`blocked ${e.host}:${e.port}`)),e.expectedBlocked.map(e=>(0,m.jsxs)(`div`,{className:`text-muted-foreground`,children:[`blocked `,e.host,`:`,e.port,` ×`,e.connections,` · expected: the harness always tries it`]},`expected ${e.host}:${e.port}`))]})}function Cw({record:e,attempt:t}){let{git:n,stack:r}=e,i=r.images.find(e=>e.id===t.imageId);return(0,m.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,m.jsxs)(vw,{title:`Source`,action:n?(0,m.jsx)(_w,{value:`reeval checkout ${e.runId}`,label:`reeval checkout`}):null,children:[n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(yw,{k:`Commit`,children:n.sha}),(0,m.jsx)(yw,{k:`Branch`,children:n.branch??bw}),(0,m.jsx)(yw,{k:`Committed`,children:n.commitTime}),(0,m.jsx)(yw,{k:`Worktree`,mono:!1,children:n.dirty?(0,m.jsxs)(`span`,{className:`text-infra`,children:[`dirty`,n.worktreePatch?` · worktree.patch, ${n.worktreePatch.bytes} bytes`:``,n.worktreePatchNote?` · ${n.worktreePatchNote}`:``]}):`clean`}),n.remote?(0,m.jsx)(yw,{k:`Remote`,children:n.remote}):null,n.shallow?(0,m.jsx)(yw,{k:`Clone`,mono:!1,children:`shallow`}):null]}):(0,m.jsx)(yw,{k:`Git`,mono:!1,children:`Not run in a git repository`}),(0,m.jsx)(yw,{k:`Lockfiles`,children:e.dependencies.lockfiles.length?e.dependencies.lockfiles.map(e=>(0,m.jsxs)(`div`,{children:[e.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.sha256.slice(0,12)})]},e.path)):bw})]}),(0,m.jsxs)(vw,{title:`This attempt`,children:[(0,m.jsx)(yw,{k:`Cell`,children:t.cell}),(0,m.jsx)(yw,{k:`Image`,children:i?(0,m.jsxs)(m.Fragment,{children:[i.ref,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:i.id.slice(0,19)}),i.agentCli?(0,m.jsxs)(`div`,{children:[`agent CLI `,i.agentCli]}):null,i.dockerfile?(0,m.jsxs)(`div`,{children:[`dockerfile `,i.dockerfile.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:i.dockerfile.sha256.slice(0,12)})]}):null,i.install?.length?(0,m.jsxs)(`div`,{children:[`install on `,i.base,i.install.map(e=>(0,m.jsxs)(`div`,{className:`text-muted-foreground`,children:[`$ `,e]},e))]}):null]}):(0,m.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:`none (fake sandbox)`})}),(0,m.jsx)(yw,{k:`Env vars`,children:t.env.vars.length?t.env.vars.join(`, `):bw}),(0,m.jsx)(yw,{k:`Secrets`,children:t.env.secrets.length?t.env.secrets.join(`, `):bw}),(0,m.jsx)(yw,{k:`Egress`,children:t.egress?(0,m.jsx)(Sw,{egress:t.egress}):bw}),(0,m.jsx)(yw,{k:`Context`,children:t.context.length?t.context.map(e=>(0,m.jsxs)(`div`,{children:[e.path,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.sha256.slice(0,12)})]},e.path)):bw})]}),(0,m.jsxs)(vw,{title:`Stack`,children:[(0,m.jsx)(yw,{k:`reeval`,children:[r.es,Gy(r),Ky(r),`${r.os}/${r.arch}`].filter(Boolean).join(` · `)}),(0,m.jsx)(yw,{k:`Harnesses`,children:r.harnesses.map(Wy).join(`, `)}),(0,m.jsxs)(yw,{k:`Judge`,children:[r.judge.model??`none`,` · threshold `,r.judge.threshold,` · version`,` `,r.judge.version,r.judge.resolvedModels.length?` · served ${r.judge.resolvedModels.join(`, `)}`:``]}),(0,m.jsx)(yw,{k:`Environments`,children:e.environments.map(e=>(0,m.jsxs)(`div`,{children:[e.name,` `,(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.digest.replace(/^sha256:/,``).slice(0,12)}),e.parent?` · extends ${e.parent}`:``,e.skills.length?` · skills ${e.skills.map(e=>e.name).join(`, `)}`:``,e.overrides.length?` · overrides ${e.overrides.join(`, `)}`:``]},e.name))}),(0,m.jsx)(yw,{k:`Images`,children:r.images.length?r.images.map(e=>(0,m.jsx)(`div`,{children:e.ref},e.id)):bw})]}),(0,m.jsx)(vw,{title:`Package versions`,children:Object.entries(r.packages).map(([e,t])=>(0,m.jsx)(yw,{k:e,children:t},e))}),n?.dirty?(0,m.jsxs)(`div`,{className:`space-y-2 xl:col-span-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Uncommitted changes when the run started`}),(0,m.jsx)(IC,{record:e,file:n.worktreePatch??void 0,what:`worktree patch`,children:e=>(0,m.jsx)(uw,{text:e,className:`max-h-[50vh]`})})]}):null]})}function ww(e){return typeof e==`object`?e.key:e}function Tw(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function Ew(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function Dw(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Ow=(e,t)=>Math.abs(e-t)<1.01,kw=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},Aw,jw=()=>{if(Aw!==void 0)return Aw;if(typeof navigator>`u`)return Aw=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Aw=!0;let e=navigator.maxTouchPoints;return Aw=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Mw=e=>e,Nw=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Pw={passive:!0},Fw=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener(`resize`,r,Pw),()=>{n.removeEventListener(`resize`,r)}},Iw=typeof window>`u`||`onscrollend`in window,Lw=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Iw,o=0,s=a?null:kw(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,Pw),a&&r.addEventListener(`scrollend`,u,Pw),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Rw=(e,t)=>Lw(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),zw=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Bw=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})};function Vw(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var Hw=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mw,rangeExtractor:Nw,onChange:()=>{},measureElement:zw,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>ww(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||Vw(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:c}=this.options,l=0;for(;l<a&&c(l)!==e;)l++;if(l<a){let e=n[l];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Ew(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,jw()&&this.targetWindow!=null&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,Pw),e.addEventListener(`touchend`,n,Pw),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(jw()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this.scrollState?.behavior===`smooth`&&!Ow(this.getScrollOffset()-i,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Ew(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=Ew(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=Tw(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ew(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Gw(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ew(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&a!=null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f),this._retryClampedAdjustment()}},this.getVirtualItems=Ew(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return Dw(t[Uw(0,t.length-1,r?e=>n[e*2]:e=>Dw(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(e===0)return!1;if(jw()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let n=this.getScrollOffset()+this.scrollAdjustments+e,r=this.scrollElement,i=r!==null&&(`scrollHeight`in r||`document`in r)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&n>i+.5?{target:n,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&Ow(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},Uw=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Ww(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Gw(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Ww(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=Uw(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Kw=typeof document<`u`?p.useLayoutEffect:p.useEffect;function qw({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=p.useReducer(e=>e+1,0)[1],a=p.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=p.useRef(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=e=>{let t=a.current;if(!t.enabled||!t.container)return;s(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,o=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let s=a.start-o,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==s&&(t.lastPositions.set(c,s),r?c.style.transform=n?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:c.style[i]=`${s}px`)}},l={...r,onChange:(t,n)=>{var s;let l=a.current,u=!0;if(l.enabled){c(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?(0,lo.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[u]=p.useState(()=>{let e=new Hw(l),t=e.measureElement;return e.measureElement=e=>{o.current=!0;try{t(e)}finally{o.current=!1}},Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return u.setOptions(l),Kw(()=>u._didMount(),[]),Kw(()=>(s(u),u._willUpdate())),Kw(()=>{c(u)}),u}function Jw(e){return qw({getScrollElement:()=>typeof document<`u`?window:null,observeElementRect:Fw,observeElementOffset:Rw,scrollToFn:Bw,initialOffset:()=>typeof document<`u`?window.scrollY:0,...e})}var Yw=e=>e<1e3?`+${e}ms`:`+${(e/1e3).toFixed(1)}s`,Xw=e=>typeof e==`string`?e:e===void 0?``:JSON.stringify(e,null,2);function Zw(e){if(typeof e==`string`)return e;if(!e||typeof e!=`object`)return``;let t=e;for(let e of[`command`,`cmd`,`path`,`file`,`filePath`,`pattern`,`query`,`url`])if(typeof t[e]==`string`)return t[e];let n=Object.values(t).find(e=>typeof e==`string`);return typeof n==`string`?n:``}function Qw({open:e,onToggle:t,icon:n,tone:r,title:i,meta:a,children:o}){return(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-card`,children:[(0,m.jsxs)(`button`,{type:`button`,onClick:t,className:`flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-accent/50`,children:[(0,m.jsx)(yx,{className:Z(`size-3.5 shrink-0 text-muted-foreground transition-transform`,e&&`rotate-90`)}),(0,m.jsx)(n,{className:Z(`size-4 shrink-0 text-muted-foreground`,r)}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),a?(0,m.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:a}):null]}),e?(0,m.jsx)(`div`,{className:`border-t bg-muted/30`,children:o}):null]})}function $w({label:e,text:t}){return t?(0,m.jsxs)(`div`,{className:`px-3 py-2`,children:[(0,m.jsx)(`div`,{className:`mb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase`,children:e}),(0,m.jsx)(`pre`,{className:`max-h-96 overflow-auto font-mono text-xs leading-relaxed break-words whitespace-pre-wrap`,children:t})]}):null}function eT({e,open:t,toggle:n}){let r=`durationMs`in e&&e.durationMs?Hy(e.durationMs):null;switch(e.type){case`text`:return(0,m.jsxs)(`div`,{className:`flex gap-3`,children:[(0,m.jsx)(`div`,{className:`mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-brand/15 text-brand`,children:(0,m.jsx)(jS,{className:`size-3.5`})}),(0,m.jsx)(`p`,{className:`min-w-0 flex-1 pt-0.5 text-sm leading-relaxed break-words whitespace-pre-wrap`,children:e.text})]});case`reasoning`:return(0,m.jsx)(Qw,{open:t,onToggle:n,icon:dx,tone:`text-drift`,title:(0,m.jsx)(`span`,{className:`text-muted-foreground italic`,children:t?`Reasoning`:e.text.split(`
|
|
57
|
+
`)[0]}),meta:r?`thought for ${r}`:`reasoning`,children:(0,m.jsx)(`p`,{className:`px-3 py-2 text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground italic`,children:e.text})});case`tool`:return(0,m.jsxs)(Qw,{open:t,onToggle:n,icon:e.tool.toLowerCase().includes(`shell`)||e.tool===`bash`?ZS:sC,tone:e.ok?void 0:`text-fail`,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`font-medium`,children:e.tool}),(0,m.jsx)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:Zw(e.input)})]}),meta:(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.ok?null:(0,m.jsx)(`span`,{className:`text-fail`,children:`failed`}),r]}),children:[(0,m.jsx)($w,{label:`Input`,text:Xw(e.input)}),(0,m.jsx)($w,{label:`Output`,text:Xw(e.output)})]});case`file-edit`:{let t=e.kind===`create`?rS:e.kind===`delete`?$x:tS;return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(t,{className:`size-4 text-muted-foreground`}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.kind===`create`?`Created`:e.kind===`delete`?`Deleted`:`Edited`}),(0,m.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.path}),(0,m.jsxs)(`span`,{className:`ml-auto flex shrink-0 gap-2 font-mono text-xs`,children:[e.added===null?null:(0,m.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),e.removed===null?null:(0,m.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]}),r?(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:r}):null]})]})}case`web-search`:return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(GS,{className:`size-4 text-muted-foreground`}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`Searched`}),(0,m.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`“`,e.query,`”`]}),(0,m.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[e.references===null?``:`${e.references} sources · `,r]})]});case`web-fetch`:return(0,m.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-dashed px-3 py-2 text-sm`,children:[(0,m.jsx)(xS,{className:Z(`size-4 text-muted-foreground`,!e.ok&&`text-fail`)}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`Fetched`}),(0,m.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.url}),(0,m.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:r})]});case`retry`:return(0,m.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground`,children:[(0,m.jsx)(zS,{className:`mt-0.5 size-4 shrink-0`}),(0,m.jsx)(`span`,{className:`font-mono text-xs break-words whitespace-pre-wrap`,children:e.message})]});case`error`:return(0,m.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-fail/30 bg-fail/5 px-3 py-2 text-sm text-fail`,children:[(0,m.jsx)(Cx,{className:`mt-0.5 size-4 shrink-0`}),(0,m.jsx)(`span`,{className:`font-mono text-xs break-words whitespace-pre-wrap`,children:e.message})]})}}function tT({item:e,open:t,toggle:n}){if(e.kind===`turn`)return(0,m.jsxs)(`div`,{className:`pt-2`,children:[(0,m.jsxs)(`div`,{className:`mb-2 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:[`Turn `,e.turn+1]}),(0,m.jsxs)(`div`,{className:`flex gap-3`,children:[(0,m.jsx)(`div`,{className:`mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-muted`,children:(0,m.jsx)(rC,{className:`size-3.5`})}),(0,m.jsx)(`div`,{className:`min-w-0 flex-1 rounded-lg bg-muted/60 px-3.5 py-2.5 text-sm leading-relaxed break-words whitespace-pre-wrap`,children:e.prompt})]})]});if(e.kind===`turn-end`)return(0,m.jsxs)(`div`,{className:`flex items-center gap-3 py-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,m.jsxs)(`span`,{children:[`Turn `,e.turn+1,` `,e.status,` in `,Hy(e.durationMs)]}),(0,m.jsx)(`div`,{className:`h-px flex-1 bg-border`})]});let r=e.event;return(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(`span`,{className:`tabular w-14 shrink-0 pt-2 text-right font-mono text-[10px] text-muted-foreground/70`,children:Yw(r.atMs)}),(0,m.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,m.jsx)(eT,{e:r,open:t,toggle:n})})]})}var nT=e=>e.kind===`event`&&(e.event.type===`tool`||e.event.type===`reasoning`);function rT({text:e}){let t=(0,p.useMemo)(()=>_b(gb(e)),[e]),[n,r]=(0,p.useState)(()=>new Set),i=(0,p.useRef)(null),[a,o]=(0,p.useState)(0);(0,p.useLayoutEffect)(()=>{o((i.current?.getBoundingClientRect().top??0)+window.scrollY)},[]);let s=Jw({count:t.length,estimateSize:()=>56,overscan:8,scrollMargin:a}),c=(0,p.useCallback)(e=>r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),l=(0,p.useMemo)(()=>{let e=0,n=0,r=0;for(let i of t)i.kind===`event`&&(i.event.type===`tool`&&e++,i.event.type===`reasoning`&&n++,i.event.type===`file-edit`&&r++);return{tools:e,reasoning:n,edits:r}},[t]),u=t.flatMap((e,t)=>nT(e)?[t]:[]),d=u.length>0&&u.every(e=>n.has(e));return t.length===0?(0,m.jsx)(`p`,{className:`py-10 text-center text-sm text-muted-foreground`,children:`The transcript is empty.`}):(0,m.jsxs)(`div`,{children:[(0,m.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(RC,{variant:`secondary`,children:[l.tools,` tool calls`]}),(0,m.jsxs)(RC,{variant:`secondary`,children:[l.edits,` file edits`]}),(0,m.jsxs)(RC,{variant:`secondary`,children:[l.reasoning,` reasoning blocks`]}),u.length?(0,m.jsx)(fC,{variant:`ghost`,size:`sm`,className:`ml-auto`,onClick:()=>r(d?new Set:new Set(u)),children:d?`Collapse all`:`Expand all`}):null]}),(0,m.jsx)(`div`,{ref:i,className:`relative w-full`,style:{height:s.getTotalSize()},children:s.getVirtualItems().map(e=>{let r=t[e.index];return(0,m.jsx)(`div`,{"data-index":e.index,ref:s.measureElement,className:`absolute top-0 left-0 w-full pb-2.5`,style:{transform:`translateY(${e.start-s.options.scrollMargin}px)`},children:(0,m.jsx)(tT,{item:r,open:n.has(e.index),toggle:()=>c(e.index)})},e.key)})})]})}var iT=[`transcript`,`diff`,`checks`,`judge`,`state`,`debug`],aT=la(`/runs/$runId/evals/$slug/attempts/$attempt`),oT=[[`setupMs`,`Setup`,`bg-skip/60`],[`agentMs`,`Agent`,`bg-brand`],[`diffMs`,`Diff`,`bg-drift/70`],[`checksMs`,`Checks`,`bg-infra`],[`judgeMs`,`Judge`,`bg-pass`]];function sT({attempt:e}){let t=oT.reduce((t,[n])=>t+e.timings[n],0)||1;return(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`div`,{className:`flex h-2 overflow-hidden rounded-full bg-muted`,children:oT.map(([n,r,i])=>e.timings[n]>0?(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsx)(`div`,{className:i,style:{width:`${e.timings[n]/t*100}%`}})}),(0,m.jsxs)(mv,{children:[r,` `,Hy(e.timings[n])]})]},n):null)}),(0,m.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:oT.map(([t,n,r])=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:Z(`size-2 rounded-full`,r)}),n,` `,(0,m.jsx)(`span`,{className:`tabular text-foreground`,children:Hy(e.timings[t])})]},t))})]})}function cT(){let{runId:e,slug:t,attempt:n}=aT.useParams(),{tab:r=`transcript`}=aT.useSearch(),i=Ki({from:`/runs/$runId/evals/$slug/attempts/$attempt`}),{data:a,error:o,isPending:s}=et(Ob(e)),{data:c}=Nb(),l=a&&bb(a,t),u=(l&&xb(l,n)?.key)??``,{data:d}=et(jb(e,u,!!c?.features.debug&&!!u));if(o)return(0,m.jsx)(jC,{error:o});if(s)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:6})]});let f=bb(a,t),p=f&&xb(f,n);if(!f||!p)return(0,m.jsxs)(AC,{icon:US,title:`Attempt not found`,children:[`This run has no attempt `,(0,m.jsx)(`code`,{className:`font-mono`,children:n}),` of that eval.`,` `,(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},className:`underline`,children:`Back to the run`})]});let h=f.attempts.indexOf(p),g=f.attempts[h-1],_=f.attempts[h+1],v=p.judgements[0],y=p.checks.filter(e=>e.exitCode!==0).length,b=[...new Set(p.turns.flatMap(e=>e.model?[e.model]:[]))];return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex min-w-0 flex-wrap items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/`,className:`hover:text-foreground`,children:`Runs`}),(0,m.jsx)(yx,{className:`size-3.5`}),(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},className:`font-mono text-xs hover:text-foreground`,children:wC(e)}),(0,m.jsx)(yx,{className:`size-3.5`}),(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e},search:{eval:t},className:`max-w-64 truncate hover:text-foreground`,children:f.name}),(0,m.jsx)(yx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:p.id})]}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-start md:justify-between`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[f.file,...f.group].join(` › `)}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:f.name}),(0,m.jsx)(HC,{outcome:p.outcome})]}),(0,m.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:p.id}),` ·`,` `,Hy(p.durationMs),` · `,CC(p.turns.length,`turn`),` ·`,` `,Yy(p.activity),p.activity.reasoningMs?` · ${Hy(p.activity.reasoningMs)} reasoning`:``,p.usage?` · ${qy(p.usage)} tokens`:``,b.length?` · served by ${b.join(`, `)}`:``]})]}),f.attempts.length>1?(0,m.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,m.jsx)(fC,{variant:`outline`,size:`icon`,className:`size-8`,disabled:!g,asChild:!!g,children:g?(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:g.id},search:{tab:r},"aria-label":`Previous attempt`,children:(0,m.jsx)(_x,{})}):(0,m.jsx)(_x,{})}),(0,m.jsx)(`div`,{className:`flex items-center gap-0.5 px-1`,children:f.attempts.map(n=>(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:n.id},search:{tab:r},title:n.id,className:Z(`rounded p-0.5`,n.id===p.id?`bg-accent ring-1 ring-border`:`hover:bg-accent/60`),children:(0,m.jsx)(VC,{outcome:n.outcome,className:`size-3.5`})},n.id))}),(0,m.jsx)(fC,{variant:`outline`,size:`icon`,className:`size-8`,disabled:!_,asChild:!!_,children:_?(0,m.jsx)(R,{to:`.`,params:{runId:e,slug:t,attempt:_.id},search:{tab:r},"aria-label":`Next attempt`,children:(0,m.jsx)(yx,{})}):(0,m.jsx)(yx,{})})]}):null]}),p.error?(0,m.jsxs)(`div`,{className:`rounded-lg border border-fail/30 bg-fail/5 px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs font-medium tracking-wide text-fail uppercase`,children:p.error.kind}),(0,m.jsx)(`pre`,{className:`mt-1 max-h-60 overflow-auto font-mono text-xs leading-relaxed whitespace-pre-wrap text-fail`,children:p.error.message})]}):null,(0,m.jsx)(`div`,{className:`rounded-xl border bg-card p-4`,children:(0,m.jsx)(sT,{attempt:p})}),p.files.artifacts?.length?(0,m.jsxs)(`section`,{className:`space-y-3`,children:[(0,m.jsx)(`h2`,{className:`text-sm font-medium`,children:`Artefacts`}),(0,m.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:p.files.artifacts.map(e=>e.mediaType===`image/png`?(0,m.jsxs)(`figure`,{className:`space-y-2`,children:[(0,m.jsx)(`img`,{src:By(a.runId,e.path),alt:e.name,className:`w-full rounded-lg border bg-muted`}),(0,m.jsx)(`figcaption`,{className:`text-xs text-muted-foreground`,children:e.name})]},e.path):null)})]}):null,(0,m.jsxs)(YC,{value:r,onValueChange:e=>i({search:{tab:e},replace:!0}),children:[(0,m.jsxs)(ZC,{className:`w-full justify-start overflow-x-auto sm:w-auto`,children:[(0,m.jsx)(QC,{value:`transcript`,children:`Transcript`}),(0,m.jsxs)(QC,{value:`diff`,children:[`Diff`,p.changedFiles.length?(0,m.jsx)(`span`,{className:`tabular text-xs text-muted-foreground`,children:p.changedFiles.length}):null]}),(0,m.jsxs)(QC,{value:`checks`,children:[`Checks`,p.checks.length?(0,m.jsx)(`span`,{className:Z(`tabular text-xs`,y?`text-fail`:`text-muted-foreground`),children:y?`${y}/${p.checks.length}`:p.checks.length}):null]}),(0,m.jsxs)(QC,{value:`judge`,children:[`Judge`,v?(0,m.jsx)(`span`,{className:Z(`tabular text-xs`,v.verdict===`pass`?`text-pass`:`text-fail`),children:v.score.toFixed(2)}):null]}),(0,m.jsx)(QC,{value:`state`,children:`State`}),d?(0,m.jsx)(QC,{value:`debug`,children:`Debug`}):null]}),(0,m.jsxs)(`div`,{className:`mt-4`,children:[(0,m.jsx)($C,{value:`transcript`,children:(0,m.jsx)(IC,{record:a,file:p.files.transcript,what:`transcript`,children:e=>(0,m.jsx)(rT,{text:e},p.id)})}),(0,m.jsx)($C,{value:`diff`,children:(0,m.jsx)(IC,{record:a,file:p.files.diff,what:`diff`,children:e=>(0,m.jsx)(fw,{text:e},p.id)})}),(0,m.jsx)($C,{value:`checks`,children:(0,m.jsx)(tw,{record:a,attempt:p})}),(0,m.jsx)($C,{value:`judge`,children:(0,m.jsx)(gw,{record:a,attempt:p})}),(0,m.jsx)($C,{value:`state`,children:(0,m.jsx)(Cw,{record:a,attempt:p})}),d?(0,m.jsx)($C,{value:`debug`,children:(0,m.jsx)(sw,{runId:e,attemptKey:p.key,view:d})}):null]})]})]})}function lT({...e}){return(0,m.jsx)(Bm,{"data-slot":`select`,...e})}function uT({...e}){return(0,m.jsx)(Wm,{"data-slot":`select-value`,...e})}function dT({className:e,size:t=`default`,children:n,...r}){return(0,m.jsxs)(Hm,{"data-slot":`select-trigger`,"data-size":t,className:Z(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,m.jsx)(Gm,{asChild:!0,children:(0,m.jsx)(hx,{className:`size-4 opacity-50`})})]})}function fT({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,m.jsx)(Jm,{children:(0,m.jsxs)(Xm,{"data-slot":`select-content`,className:Z(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,m.jsx)(mT,{}),(0,m.jsx)(ch,{className:Z(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,m.jsx)(hT,{})]})})}function pT({className:e,children:t,...n}){return(0,m.jsxs)(mh,{"data-slot":`select-item`,className:Z(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,m.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,m.jsx)(vh,{children:(0,m.jsx)(px,{className:`size-4`})})}),(0,m.jsx)(gh,{children:t})]})}function mT({className:e,...t}){return(0,m.jsx)(bh,{"data-slot":`select-scroll-up-button`,className:Z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(xx,{className:`size-4`})})}function hT({className:e,...t}){return(0,m.jsx)(Sh,{"data-slot":`select-scroll-down-button`,className:Z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(hx,{className:`size-4`})})}function gT({className:e,...t}){return(0,m.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,m.jsx)(`table`,{"data-slot":`table`,className:Z(`w-full caption-bottom text-sm`,e),...t})})}function _T({className:e,...t}){return(0,m.jsx)(`thead`,{"data-slot":`table-header`,className:Z(`[&_tr]:border-b`,e),...t})}function vT({className:e,...t}){return(0,m.jsx)(`tbody`,{"data-slot":`table-body`,className:Z(`[&_tr:last-child]:border-0`,e),...t})}function yT({className:e,...t}){return(0,m.jsx)(`tr`,{"data-slot":`table-row`,className:Z(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function $({className:e,...t}){return(0,m.jsx)(`th`,{"data-slot":`table-head`,className:Z(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function bT({className:e,...t}){return(0,m.jsx)(`td`,{"data-slot":`table-cell`,className:Z(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}var xT=la(`/compare`),ST={regressed:{label:`Regressed`,className:`border-fail/30 bg-fail/10 text-fail`},fixed:{label:`Fixed`,className:`border-pass/30 bg-pass/10 text-pass`},drift:{label:`Not comparable`,className:`border-drift/30 bg-drift/10 text-drift`},infra:{label:`Infra error`,className:`border-infra/30 bg-infra/10 text-infra`},added:{label:`New`,className:`text-brand border-brand/30`},removed:{label:`Removed`,className:`text-muted-foreground`},same:{label:`Same`,className:`text-muted-foreground`}};function CT({label:e,value:t,runs:n,onChange:r}){return(0,m.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:[(0,m.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,m.jsxs)(lT,{value:t,onValueChange:r,children:[(0,m.jsx)(dT,{className:`w-full`,children:(0,m.jsx)(uT,{placeholder:`Choose a run`})}),(0,m.jsx)(fT,{children:n.map(e=>(0,m.jsxs)(pT,{value:e.runId,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Jy(e.git?.sha)}),(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:bC(e.startedAt)}),(0,m.jsxs)(`span`,{className:`tabular text-xs text-muted-foreground`,children:[e.summary.pass,`/`,e.summary.pass+e.summary.fail+e.summary.infraError]}),e.recorded?null:(0,m.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`scratch`})]},e.runId))})]})]})}function wT({base:e,head:t,kind:n}){let r=n===`score`?DT:OT;if(e===null&&t===null)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});if(e===null||t===null)return(0,m.jsx)(`span`,{className:`tabular`,children:r(t===null?e:t)});let i=t-e;return(0,m.jsxs)(`span`,{className:`tabular`,children:[(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:r(e)}),(0,m.jsx)(sx,{className:`mx-1 inline size-3 text-muted-foreground`}),r(t),Math.abs(i)>1e-9?(0,m.jsxs)(`span`,{className:Z(`ml-1.5 text-xs`,i>0?`text-pass`:`text-fail`),children:[i>0?`+`:``,n===`score`?i.toFixed(2):`${Math.round(i*100)} pts`]}):null]})}var TT=e=>`${e>=0?`+`:`−`}${Math.round(Math.abs(e)*100)}`,ET=e=>e?`${TT(e.points)} (${TT(e.lo)}…${TT(e.hi)})${e.withinNoise?` noise`:``}`:`–`,DT=e=>e.toFixed(2),OT=e=>Uy(e);function kT({row:e,head:t}){let n=ST[e.status],r=e.id.split(` › `).slice(1).join(` › `)||e.id;return(0,m.jsxs)(yT,{className:e.status===`same`?`opacity-70`:void 0,children:[(0,m.jsx)(bT,{className:`pl-4`,children:(0,m.jsx)(RC,{variant:`outline`,className:n.className,children:n.label})}),(0,m.jsxs)(bT,{className:`max-w-md`,children:[e.slug?(0,m.jsx)(R,{to:`/evals/$slug`,params:{slug:e.slug},className:`font-medium hover:underline`,children:r}):r,(0,m.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.id.split(` › `)[0]}),e.cells?(0,m.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`compared on the cells both runs have`,e.cells.added.length?` · added ${e.cells.added.join(`, `)}`:``,e.cells.removed.length?` · removed ${e.cells.removed.join(`, `)}`:``]}):null,e.perCell.length?(0,m.jsx)(`ul`,{className:`mt-1.5 space-y-0.5 text-[11px] text-muted-foreground`,children:e.perCell.map(e=>(0,m.jsxs)(`li`,{className:`tabular`,children:[(0,m.jsx)(`span`,{className:`font-mono`,children:e.key}),e.base.lift||e.head.lift?(0,m.jsxs)(m.Fragment,{children:[` · lift `,ET(e.base.lift),` → `,ET(e.head.lift)]}):null,e.base.effort&&e.head.effort?(0,m.jsxs)(m.Fragment,{children:[` · `,cy(e.base.effort,e.head.effort)]}):null]},e.key))}):null]}),(0,m.jsx)(bT,{children:(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(VC,{outcome:e.base}),(0,m.jsx)(sx,{className:`size-3 text-muted-foreground`}),e.slug&&e.head?(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:t},search:{eval:e.slug},children:(0,m.jsx)(VC,{outcome:e.head})}):(0,m.jsx)(VC,{outcome:e.head})]})}),(0,m.jsx)(bT,{className:`hidden md:table-cell`,children:(0,m.jsx)(wT,{base:e.basePassRate,head:e.headPassRate,kind:`rate`})}),(0,m.jsx)(bT,{className:`hidden pr-4 md:table-cell`,children:(0,m.jsx)(wT,{base:e.baseScore,head:e.headScore,kind:`score`})})]})}function AT(){let e=xT.useSearch(),t=Ki({from:`/compare`}),{data:n,error:r,isPending:i}=et(Db),a=n?.headers??[],o=a.find(t=>t.runId===e.head)??(e.head?void 0:a[0]),s=a.find(t=>t.runId===e.base)??(e.base?void 0:a.find(e=>o&&e.runId<o.runId&&e.status===`complete`)),c=et({...Ob(s?.runId??``),enabled:!!s}),l=et({...Ob(o?.runId??``),enabled:!!o}),u=(0,p.useMemo)(()=>s&&o?hb(s,o,{base:c.data,head:l.data}):null,[s,o,c.data,l.data]);return r?(0,m.jsx)(jC,{error:r}):i?(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:6})]}):(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Compare runs`}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[`What flipped between two runs, with pass-rate and judge-score deltas, and each cell's lift and effort (tool calls, agent time). Uses the same rules as`,` `,(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:`reeval compare`}),`.`]})]}),a.length<2?(0,m.jsx)(AC,{icon:yS,title:`Two runs needed`,children:`Record at least two runs to compare them.`}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-xl border bg-card p-4 sm:flex-row sm:items-end`,children:[(0,m.jsx)(CT,{label:`Base`,value:s?.runId,runs:a,onChange:e=>t({search:t=>({...t,base:e}),replace:!0})}),(0,m.jsx)(sx,{className:`mx-auto hidden size-4 shrink-0 text-muted-foreground sm:mb-2.5 sm:block`}),(0,m.jsx)(CT,{label:`Head`,value:o?.runId,runs:a,onChange:e=>t({search:t=>({...t,head:e}),replace:!0})})]}),!s||!o||!u?(0,m.jsx)(AC,{icon:yS,title:`Pick two runs`,children:`Choose a base and a head run to see what changed.`}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[`regressed`,`fixed`,`drift`,`same`].map(e=>(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:ST[e].label}),(0,m.jsx)(`div`,{className:Z(`mt-1 text-2xl font-semibold tracking-tight`,u.counts[e]&&e===`regressed`&&`text-fail`,u.counts[e]&&e===`fixed`&&`text-pass`,u.counts[e]&&e===`drift`&&`text-drift`),children:u.counts[e]})]},e))}),u.changes.length?(0,m.jsxs)(`div`,{className:`rounded-xl border border-drift/30 bg-drift/5 p-4`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-drift`,children:[(0,m.jsx)(tC,{className:`size-4`}),` The stack changed between these runs`]}),(0,m.jsx)(`ul`,{className:`mt-2 space-y-1 text-sm`,children:u.changes.map(e=>(0,m.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-2`,children:[(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.base}),(0,m.jsx)(sx,{className:`size-3 text-muted-foreground`}),(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.head}),e.outsideFingerprint?(0,m.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(not in fingerprints: flips count as not comparable)`}):null]},e.field))})]}):null,(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(gT,{children:[(0,m.jsx)(_T,{children:(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{className:`w-36 pl-4`,children:`Change`}),(0,m.jsx)($,{children:`Eval`}),(0,m.jsx)($,{className:`w-24`,children:`Outcome`}),(0,m.jsx)($,{className:`hidden md:table-cell`,children:`Pass rate`}),(0,m.jsx)($,{className:`hidden pr-4 md:table-cell`,children:`Judge score`})]})}),(0,m.jsx)(vT,{children:u.rows.map(e=>(0,m.jsx)(kT,{row:e,head:o.runId},e.id))})]})})]})]})]})}var jT=la(`/evals/$slug`);function MT(){let{slug:e}=jT.useParams(),{data:t,error:n,isPending:r}=et(Db),i=(0,p.useMemo)(()=>t?lb(t.headers,e):[],[t,e]);if(n)return(0,m.jsx)(jC,{error:n});if(r)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:8})]});let a=t.manifest.evals.find(t=>t.slug===e);if(!a||i.length===0)return(0,m.jsx)(AC,{icon:US,title:`No history for this eval`,children:`No recorded run includes it. It may have been renamed: evals are keyed by file, group and name.`});let{file:o,path:s}=Vy(a.id),c=i.filter(e=>e.outcome===`pass`||e.outcome===`fail`),l=c.filter(e=>e.outcome===`pass`).length,u=[...i].reverse(),d=i.filter(e=>e.changed).length;return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/evals`,className:`hover:text-foreground`,children:`Evals`}),(0,m.jsx)(yx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`truncate text-foreground`,children:s.at(-1)})]}),(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,...s.slice(0,-1)].join(` › `)}),(0,m.jsx)(`h1`,{className:`mt-1.5 text-2xl font-semibold tracking-tight`,children:s.at(-1)}),(0,m.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[`Passed in `,l,` of `,CC(c.length,`run`),` with a verdict`,d?` · the eval or its stack changed ${CC(d,`time`)}`:``,`.`]})]}),(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card p-5`,children:[(0,m.jsxs)(`div`,{className:`mb-3 flex items-center justify-between text-xs text-muted-foreground`,children:[(0,m.jsx)(`span`,{children:`Oldest`}),(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`span`,{className:`mr-1 inline-block h-3 w-px bg-drift align-middle`}),` changed`]}),(0,m.jsx)(`span`,{children:`Newest`})]}),(0,m.jsx)(JC,{items:i.map(e=>({key:e.run.runId,outcome:e.outcome,changed:e.changed,title:`${Jy(e.run.git?.sha)} · ${bC(e.run.startedAt)} · ${e.outcome}`}))})]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(gT,{children:[(0,m.jsx)(_T,{children:(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{className:`w-10`}),(0,m.jsx)($,{children:`Run`}),(0,m.jsx)($,{children:`Commit`}),(0,m.jsx)($,{className:`w-48`,children:`Attempts`}),(0,m.jsx)($,{className:`text-right`,children:`Pass rate`}),(0,m.jsx)($,{className:`hidden text-right sm:table-cell`,children:`Run time`})]})}),(0,m.jsx)(vT,{children:u.map(t=>{let n=t.cells.reduce((e,t)=>e+t.pass,0),r=t.cells.reduce((e,t)=>e+t.fail,0),i=t.cells.reduce((e,t)=>e+t.infraError,0);return(0,m.jsxs)(yT,{children:[(0,m.jsx)(bT,{className:`pl-4`,children:(0,m.jsx)(VC,{outcome:t.outcome})}),(0,m.jsxs)(bT,{children:[(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:t.run.runId},search:{eval:e},className:`font-medium hover:underline`,children:(0,m.jsx)(`span`,{title:SC(t.run.startedAt),children:bC(t.run.startedAt)})}),(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:t.run.runId}),t.changed?(0,m.jsx)(RC,{variant:`outline`,className:`h-4 border-drift/30 px-1.5 text-[10px] text-drift`,children:`changed`}):null]})]}),(0,m.jsxs)(bT,{children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Jy(t.run.git?.sha)}),t.run.git?.branch?(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(hS,{className:`size-3`}),t.run.git.branch]}):null]}),(0,m.jsxs)(bT,{children:[(0,m.jsxs)(`span`,{className:`tabular text-xs`,children:[n,`/`,n+r+i,t.cells.length>1?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`· `,CC(t.cells.length,`cell`)]}):null]}),(0,m.jsx)(UC,{className:`mt-1.5`,pass:n,fail:r,infra:i})]}),(0,m.jsxs)(bT,{className:`text-right`,children:[(0,m.jsx)(WC,{rate:t.passRate}),fb(t.cells)?(0,m.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground`,children:`gated`}):null]}),(0,m.jsx)(bT,{className:`tabular hidden text-right text-muted-foreground sm:table-cell`,children:Hy(t.run.durationMs)})]},t.run.runId)})})]})})]})}var NT=la(`/evals`);function PT(){let{q:e}=NT.useSearch(),t=Ki({from:`/evals`}),{data:n,error:r,isPending:i}=et(Db),a=(0,p.useMemo)(()=>{let t=new Map,r=e?.toLowerCase();for(let e of n?.manifest.evals??[]){if(r&&!e.id.toLowerCase().includes(r))continue;let n=t.get(e.file)??[];n.push(e),t.set(e.file,n)}return[...t]},[n,e]);if(r)return(0,m.jsx)(jC,{error:r});if(i)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:8})]});let o=n.headers.slice(0,20);return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Evals`}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[CC(n.manifest.evals.length,`eval`),` across `,CC(n.headers.length,`run`),`. The strip shows the last 20 runs, oldest to newest.`]})]}),(0,m.jsxs)(`div`,{className:`relative sm:w-72`,children:[(0,m.jsx)(GS,{className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,m.jsx)(nw,{value:e??``,onChange:e=>t({search:{q:e.target.value||void 0},replace:!0}),placeholder:`Filter evals`,className:`h-9 pl-8`})]})]}),n.manifest.evals.length===0?(0,m.jsx)(AC,{icon:lS,title:`No evals yet`,children:`Evals appear here once a run that includes them is recorded.`}):a.length===0?(0,m.jsxs)(AC,{icon:GS,title:`No evals match`,children:[`Nothing matches “`,e,`”.`]}):a.map(([e,t])=>(0,m.jsxs)(`section`,{className:`overflow-hidden rounded-xl border bg-card`,children:[(0,m.jsx)(`div`,{className:`border-b bg-muted/40 px-4 py-2 font-mono text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`divide-y`,children:t.map(e=>{let t=lb(o,e.slug).filter(e=>e.outcome===`pass`||e.outcome===`fail`),n=t.length?t.filter(e=>e.outcome===`pass`).length/t.length:null;return(0,m.jsxs)(R,{to:`/evals/$slug`,params:{slug:e.slug},className:`flex flex-col gap-2 px-4 py-3 transition-colors hover:bg-accent/50 sm:flex-row sm:items-center sm:gap-4`,children:[(0,m.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2.5`,children:[(0,m.jsx)(VC,{outcome:e.latest.outcome}),(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.path.at(-1)}),e.path.length>1?(0,m.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.path.slice(0,-1).join(` › `)}):null]})]}),(0,m.jsxs)(`div`,{className:`flex items-center gap-4 pl-6 sm:pl-0`,children:[(0,m.jsx)(JC,{size:`sm`,items:o.slice().reverse().map(t=>({key:t.runId,outcome:t.evals.find(t=>t.slug===e.slug)?.outcome??null}))}),(0,m.jsx)(WC,{rate:n,className:`w-10 text-right text-sm`})]})]},e.slug)})})]},e))]})}var FT={running:{label:`Running`,tone:`border-brand/30 bg-brand/10 text-brand`},cancelling:{label:`Cancelling`,tone:`border-infra/30 bg-infra/10 text-infra`},finishing:{label:`Finishing`,tone:`border-brand/30 bg-brand/10 text-brand`},stopped:{label:`Stopped`,tone:`border-border bg-muted text-muted-foreground`}};function IT(e=1e3){let[t,n]=(0,p.useState)(()=>Date.now());return(0,p.useEffect)(()=>{let t=setInterval(()=>n(Date.now()),e);return()=>clearInterval(t)},[e]),t}function LT({run:e,className:t}){let{label:n,tone:r}=FT[e.state];return(0,m.jsxs)(RC,{variant:`outline`,className:Z(`gap-1.5 tabular`,r,t),children:[e.state===`stopped`?(0,m.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/60`}):(0,m.jsxs)(`span`,{className:`relative flex size-1.5`,children:[(0,m.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-current opacity-60`}),(0,m.jsx)(`span`,{className:`relative inline-flex size-1.5 rounded-full bg-current`})]}),n,` `,e.counts.done,`/`,e.planned]})}function RT({run:e,className:t}){let{passed:n,failed:r,errored:i,skipped:a,running:o,done:s}=e.counts,c=Math.max(e.planned,1),l=(e,t)=>e>0?(0,m.jsx)(`div`,{className:Z(`transition-[width] duration-500`,t),style:{width:`${e/c*100}%`}}):null;return(0,m.jsxs)(`div`,{className:Z(`flex h-2 overflow-hidden rounded-full bg-muted`,t),role:`progressbar`,"aria-label":`Attempts finished`,"aria-valuemin":0,"aria-valuemax":e.planned,"aria-valuenow":s,children:[l(n,`bg-pass`),l(r,`bg-fail`),l(i,`bg-infra`),l(a,`bg-skip/50`),e.state===`stopped`?null:l(o,`animate-pulse bg-brand/40`)]})}function zT({status:e,stopped:t=!1,className:n}){return e===`running`&&!t?(0,m.jsx)(kS,{className:Z(`size-4 shrink-0 animate-spin text-brand`,n),"aria-label":`Running`}):e===`queued`||e===`running`?(0,m.jsx)(VC,{outcome:null,className:n}):(0,m.jsx)(VC,{outcome:e,className:n})}var BT={queued:`Queued`,running:`Running`,pass:`Passed`,fail:`Failed`,infra_error:`Infra error`,skipped:`Skipped`},VT=(e,t)=>Hy(Math.max(0,t-Date.parse(e.startedAt)));function HT({runs:e}){let t=IT();return e.length?(0,m.jsx)(`section`,{"aria-label":`Runs in progress`,className:`space-y-2`,children:e.map(e=>(0,m.jsxs)(R,{to:`/live/$runId`,params:{runId:e.runId},"data-live-run":e.runId,className:`block rounded-xl border bg-card px-4 py-3 transition-colors hover:bg-accent/50`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,m.jsx)(LT,{run:e}),(0,m.jsxs)(`span`,{className:`text-sm font-medium`,title:SC(e.startedAt),children:[`Started `,bC(e.startedAt,t)]}),(0,m.jsx)(`span`,{className:`hidden font-mono text-[11px] text-muted-foreground sm:inline`,children:e.runId}),(0,m.jsxs)(`span`,{className:`tabular ml-auto text-xs text-muted-foreground`,children:[e.counts.passed,` passed · `,e.counts.failed+e.counts.errored,` failed`,e.state!==`stopped`&&e.counts.running?` · ${e.counts.running} running`:``,` `,`· `,VT(e,t)]})]}),(0,m.jsx)(RT,{run:e,className:`mt-2.5`})]},e.runId))}):null}var UT=la(`/live/$runId`),WT=la(`/live/$runId/attempt`);function GT(e){let t=Fb(),n=et(Db),r=t.runs.find(t=>t.runId===e);return{run:r,landed:!r&&!!n.data?.headers.some(t=>t.runId===e),isPending:t.isPending||n.isPending,error:t.error??n.error}}function KT({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`tabular mt-1 text-lg font-semibold tracking-tight`,children:t})]})}function qT({runId:e}){return(0,m.jsxs)(AC,{icon:FS,title:`This run isn't in progress`,children:[`No running `,(0,m.jsx)(`span`,{className:`font-mono`,children:`reeval run`}),` has the id`,` `,(0,m.jsx)(`span`,{className:`font-mono`,children:e}),`, and no record of it has landed.`,` `,(0,m.jsx)(R,{to:`/`,className:`underline`,children:`Back to runs`})]})}function JT({attempt:e,run:t,now:n}){return e.durationMs===null?e.status===`running`&&e.startedAt&&t.state!==`stopped`?(0,m.jsx)(m.Fragment,{children:Hy(Math.max(0,n-Date.parse(e.startedAt)))}):(0,m.jsx)(m.Fragment,{children:`–`}):(0,m.jsx)(m.Fragment,{children:Hy(e.durationMs)})}function YT(){let{runId:e}=UT.useParams(),t=Ki(),n=IT(),{run:r,landed:i,isPending:a,error:o}=GT(e);(0,p.useEffect)(()=>{i&&t({to:`/runs/$runId`,params:{runId:e},replace:!0})},[i,t,e]);let s=(0,p.useMemo)(()=>{let e=new Map;for(let t of r?.attempts??[])e.set(t.evalId,[...e.get(t.evalId)??[],t]);return[...e.values()]},[r]);if(o)return(0,m.jsx)(jC,{error:o});if(a||i)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:6})]});if(!r)return(0,m.jsx)(qT,{runId:e});let c=r.state===`stopped`;return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(fC,{asChild:!0,variant:`ghost`,size:`sm`,className:`-ml-2 text-muted-foreground`,children:(0,m.jsxs)(R,{to:`/`,children:[(0,m.jsx)(ax,{}),` Runs`]})}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[(0,m.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:c?`Run stopped`:`Run in progress`}),(0,m.jsx)(LT,{run:r})]}),(0,m.jsxs)(`p`,{className:`mt-1 flex flex-wrap gap-x-2 text-sm text-muted-foreground`,children:[(0,m.jsxs)(`span`,{title:SC(r.startedAt),children:[`Started `,bC(r.startedAt,n)]}),(0,m.jsx)(`span`,{children:`·`}),(0,m.jsx)(`span`,{className:`font-mono text-xs leading-5`,children:r.runId})]})]}),c?(0,m.jsxs)(`div`,{className:`flex gap-3 rounded-xl border border-infra/30 bg-infra/5 px-4 py-3 text-sm`,children:[(0,m.jsx)(Nx,{className:`mt-0.5 size-4 shrink-0 text-infra`}),(0,m.jsxs)(`p`,{children:[`This run stopped without writing a record: its`,` `,(0,m.jsx)(`span`,{className:`font-mono`,children:`reeval run`}),` exited or stopped responding. The attempts below are what finished before it did.`]})]}):null,(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsx)(RT,{run:r,className:`h-2.5`}),(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-4`,children:[(0,m.jsxs)(KT,{label:`Finished`,children:[r.counts.done,(0,m.jsxs)(`span`,{className:`ml-1 text-sm font-normal text-muted-foreground`,children:[`of `,CC(r.planned,`attempt`)]})]}),(0,m.jsx)(KT,{label:`Passed`,children:(0,m.jsx)(`span`,{className:`text-pass`,children:r.counts.passed})}),(0,m.jsx)(KT,{label:`Failed`,children:(0,m.jsx)(`span`,{className:r.counts.failed+r.counts.errored?`text-fail`:``,children:r.counts.failed+r.counts.errored})}),(0,m.jsx)(KT,{label:`Elapsed`,children:c?`Stopped`:VT(r,n)})]}),r.state===`finishing`?(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Every attempt has finished; writing the run's record.`}):null]}),(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(gT,{children:[(0,m.jsx)(_T,{children:(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{className:`w-10`}),(0,m.jsx)($,{children:`Attempt`}),(0,m.jsx)($,{className:`hidden md:table-cell`,children:`Cell`}),(0,m.jsx)($,{className:`hidden sm:table-cell`,children:`Status`}),(0,m.jsx)($,{className:`text-right`,children:`Duration`})]})}),(0,m.jsx)(vT,{children:s.flat().map(t=>{let i=Fy(t.status)&&t.status!==`skipped`,a=`${t.name} · #${t.n}`;return(0,m.jsxs)(yT,{"data-live-attempt":t.status,children:[(0,m.jsx)(bT,{className:`pl-4`,children:(0,m.jsx)(zT,{status:t.status,stopped:c})}),(0,m.jsxs)(bT,{children:[i?(0,m.jsx)(R,{to:`/live/$runId/attempt`,params:{runId:e},search:{key:t.key},className:`font-medium hover:underline`,children:a}):(0,m.jsx)(`span`,{className:`font-medium`,children:a}),(0,m.jsxs)(`div`,{className:`mt-0.5 font-mono text-[11px] text-muted-foreground`,children:[t.file,(0,m.jsxs)(`span`,{className:`md:hidden`,children:[` · `,t.cell]})]})]}),(0,m.jsx)(bT,{className:`hidden font-mono text-xs md:table-cell`,children:t.cell}),(0,m.jsx)(bT,{className:`hidden text-sm text-muted-foreground sm:table-cell`,children:c&&t.status===`running`?`Stopped`:c&&t.status===`queued`?`Never started`:BT[t.status]}),(0,m.jsx)(bT,{className:`tabular pr-4 text-right text-muted-foreground`,children:(0,m.jsx)(JT,{attempt:t,run:r,now:n})})]},t.key)})})]})})]})}function XT(){let{runId:e}=WT.useParams(),{key:t=``}=WT.useSearch(),n=Ki(),{run:r,landed:i,isPending:a,error:o}=GT(e),s=r?.attempts.find(e=>e.key===t),c=et({...Ib(e,t),enabled:!!s&&Fy(s.status)}),l=et({...Ob(e),enabled:i});return(0,p.useEffect)(()=>{if(l.data){for(let r of l.data.evals){let i=r.attempts.find(e=>e.key===t);if(i){n({to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:e,slug:r.slug,attempt:i.id},replace:!0});return}}n({to:`/runs/$runId`,params:{runId:e},replace:!0})}},[l.data,t,n,e]),o?(0,m.jsx)(jC,{error:o}):a||i?(0,m.jsx)(NC,{rows:6}):r?s?(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(fC,{asChild:!0,variant:`ghost`,size:`sm`,className:`-ml-2 text-muted-foreground`,children:(0,m.jsxs)(R,{to:`/live/$runId`,params:{runId:e},children:[(0,m.jsx)(ax,{}),` Run in progress`]})}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[(0,m.jsx)(zT,{status:s.status,className:`size-5`}),(0,m.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:s.name}),(0,m.jsxs)(`span`,{className:`font-mono text-sm text-muted-foreground`,children:[s.cell,`#`,s.n]})]}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:[BT[s.status],s.durationMs===null?``:` in ${Hy(s.durationMs)}`,` · The diff, checks and judge tabs arrive with the run's record.`]})]}),Fy(s.status)?c.error?(0,m.jsx)(AC,{icon:sS,title:`No transcript`,children:`This attempt didn't write one.`}):c.isPending?(0,m.jsx)(NC,{rows:5}):(0,m.jsx)(rT,{text:c.data}):(0,m.jsx)(AC,{icon:sS,title:`Not finished yet`,children:`The transcript is here once this attempt finishes.`})]}):(0,m.jsxs)(AC,{icon:sS,title:`No such attempt`,children:[`This run has no attempt `,(0,m.jsx)(`span`,{className:`font-mono`,children:t}),`.`]}):(0,m.jsx)(qT,{runId:e})}function ZT(){return(0,m.jsxs)(AC,{icon:Gx,title:`Page not found`,children:[`That link doesn't point anywhere in the studio.`,` `,(0,m.jsx)(R,{to:`/`,className:`underline`,children:`Go to runs`})]})}function QT({doc:e,id:t}){let n=e.attempts[t.replace(/:check\d+$/,``)],r=`inline-flex rounded border bg-muted/60 px-1 font-mono text-[10px] text-muted-foreground`;return n?(0,m.jsx)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:n.runId,slug:n.evalSlug,attempt:n.attempt},className:`${r} hover:text-foreground`,children:t}):(0,m.jsx)(`span`,{className:r,title:e.cited[t]??t,children:t})}function $T({doc:e,ids:t}){return(0,m.jsx)(`span`,{className:`ml-1 inline-flex flex-wrap gap-1 align-middle`,children:t.map(t=>(0,m.jsx)(QT,{doc:e,id:t},t))})}function eE({doc:e,title:t,items:n}){return n.length?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:t}),(0,m.jsx)(`ul`,{className:`list-disc space-y-1.5 pl-5 text-sm`,children:n.map(t=>(0,m.jsxs)(`li`,{children:[t.text,(0,m.jsx)($T,{doc:e,ids:t.cites}),t.confidence===`high`?null:(0,m.jsxs)(`span`,{className:`ml-1 text-xs text-muted-foreground`,children:[`(`,t.confidence,` confidence)`]}),t.unverifiedNumbers?.length?(0,m.jsxs)(`span`,{className:`ml-1 text-xs text-infra`,children:[`(not in the cited facts: `,t.unverifiedNumbers.join(`, `),`)`]}):null]},t.text))})]}):null}function tE({what:e,error:t,children:n}){return(0,m.jsxs)(`div`,{className:`rounded-lg border border-fail/40 bg-fail/5 p-3 text-sm`,children:[(0,m.jsxs)(`p`,{children:[(0,m.jsxs)(`span`,{className:`font-medium text-fail`,children:[e,` failed: `]}),(0,m.jsx)(`span`,{className:`break-words`,children:t})]}),(0,m.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`The run's outcomes don't change.`,n?` `:``,n]})]})}function nE({entry:e}){let{doc:t}=e,n=t.analysis,r=t.validation,i=(0,m.jsx)(RC,{variant:e.source===`saved`?`secondary`:`outline`,children:e.source===`saved`?`saved`:`local cache`});return t.error===void 0?(0,m.jsxs)(`div`,{className:`space-y-5`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[i,vv(t)?(0,m.jsx)(RC,{variant:`outline`,className:`text-infra`,children:`superseded: re-run reeval analyze`}):null,(0,m.jsxs)(`span`,{children:[t.scope.base?`vs ${t.scope.base}`:`no base run`,t.scope.evals?` · evals matching "${t.scope.evals}"`:``,` · by `,t.author,` ·`,` `,SC(t.createdAt)]})]}),(0,m.jsxs)(`p`,{className:`rounded-lg border bg-muted/40 p-3 text-sm leading-relaxed`,children:[(0,m.jsxs)(`span`,{className:`font-semibold`,children:[`TL;DR (`,n.confidence.overall,`). `]}),n.tldr]}),(0,m.jsx)(eE,{doc:t,title:`What happened`,items:n.whatHappened}),(0,m.jsx)(eE,{doc:t,title:`Results`,items:n.results}),(0,m.jsx)(eE,{doc:t,title:`Why`,items:n.why}),n.anomalies.length?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Anomalies`}),(0,m.jsx)(`ul`,{className:`space-y-1.5 text-sm`,children:n.anomalies.map(e=>(0,m.jsxs)(`li`,{children:[(0,m.jsx)(RC,{variant:`outline`,className:`mr-1.5 text-[10px]`,children:e.kind}),e.text,(0,m.jsx)($T,{doc:t,ids:e.cites})]},e.text))})]}):null,(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Suggested actions`}),n.actions.length===0?(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`None: nothing here is worth acting on.`}):(0,m.jsx)(`ol`,{className:`space-y-3`,children:n.actions.map((e,n)=>(0,m.jsxs)(`li`,{className:`rounded-lg border p-3 text-sm`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(`span`,{className:`font-medium`,children:[n+1,`. `,e.title]}),(0,m.jsx)(RC,{variant:`secondary`,className:`text-[10px]`,children:e.kind}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`impact `,e.impact,` · effort `,e.effort]})]}),(0,m.jsxs)(`p`,{className:`mt-1.5`,children:[(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:e.target}),`: `,e.change]}),(0,m.jsxs)(`p`,{className:`mt-1 text-muted-foreground`,children:[`Expect: `,e.expectedEffect]}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2 text-xs`,children:[e.verify?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono`,children:e.verify}),(0,m.jsx)(_w,{value:e.verify,label:`copy`})]}):(0,m.jsxs)(`span`,{className:`text-infra`,children:[`Verify command rejected: `,e.verifyProblem??`not reeval’s CLI`]}),(0,m.jsx)($T,{doc:t,ids:e.cites})]})]},e.title))})]}),(0,m.jsxs)(`p`,{className:`text-sm`,children:[(0,m.jsxs)(`span`,{className:`font-medium`,children:[`Confidence: `,n.confidence.overall,`.`]}),` `,n.confidence.why]}),(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t.resolvedModel??t.model,` · `,t.promptVersion,` · digest v`,t.inputs.digestVersion,t.usage.inputTokens===null?``:` · ${t.usage.inputTokens} in / ${t.usage.outputTokens??`?`} out tokens`,` `,`· `,r.citations,` citations checked, `,r.invalid.length,` invalid, `,r.dropped,` dropped ·`,` `,r.commands,` commands checked, `,r.invalidCommands.length,` rejected · `,e.file]})]}):(0,m.jsxs)(`div`,{className:`space-y-3`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[i,(0,m.jsxs)(`span`,{children:[t.model,` · `,SC(t.createdAt)]})]}),(0,m.jsxs)(tE,{what:`The run's summary`,error:t.error,children:[(0,m.jsxs)(`code`,{className:`font-mono`,children:[`reeval analyze `,t.anchor]}),` calls the model again.`]})]})}function rE({notes:e}){let t=[...new Set(e.map(e=>e.evalId))];return(0,m.jsxs)(`section`,{className:`space-y-3`,"aria-label":`Notes by harness`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Notes by harness`}),t.map(t=>(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t}),(0,m.jsx)(`ul`,{className:`space-y-2`,children:e.filter(e=>e.evalId===t).map(e=>(0,m.jsxs)(`li`,{className:`rounded-lg border p-3 text-sm`,children:[(0,m.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,m.jsx)(RC,{variant:`secondary`,children:e.harness}),(0,m.jsxs)(`span`,{children:[e.attempts.length,` attempt`,e.attempts.length===1?``:`s`,` ·`,` `,e.resolvedModel??e.model]})]}),e.error===void 0?(0,m.jsx)(`p`,{className:`whitespace-pre-wrap leading-relaxed`,children:e.text}):(0,m.jsx)(tE,{what:`This note`,error:e.error})]},e.harness))})]},t))]})}function iE({runId:e}){let{data:t,error:n,isPending:r}=et(Ab(e)),[i,a]=(0,p.useState)();if(n)return(0,m.jsx)(jC,{error:n});if(r)return(0,m.jsx)(NC,{rows:5});let o=t?.entries??[],s=t?.notes??[];if(o.length===0&&s.length===0)return(0,m.jsxs)(AC,{icon:YS,title:`No analysis for this run yet`,children:[`Run `,(0,m.jsxs)(`code`,{className:`font-mono text-xs`,children:[`reeval analyze `,e,` --save`]}),` to write one into the run's history folder, or`,` `,(0,m.jsx)(`code`,{className:`font-mono text-xs`,children:`reeval analyze --context`}),` to hand the digest to your own coding agent.`]});let c=o.find(e=>e.file===i)??o[0];return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[c&&o.length>1?(0,m.jsxs)(lT,{value:c.file,onValueChange:a,children:[(0,m.jsx)(dT,{className:`w-full sm:w-auto`,children:(0,m.jsx)(uT,{})}),(0,m.jsx)(fT,{children:o.map(e=>(0,m.jsxs)(pT,{value:e.file,children:[SC(e.doc.createdAt),` · `,e.source,` · `,e.doc.model,e.doc.error===void 0?``:` · failed`]},e.file))})]}):null,c?(0,m.jsx)(nE,{entry:c}):(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No summary of the run: run`,` `,(0,m.jsxs)(`code`,{className:`font-mono text-xs`,children:[`reeval analyze `,e,` --save`]}),` to write one.`]}),s.length?(0,m.jsx)(rE,{notes:s}):null]})}var aE=la(`/runs/$runId`);function oE({icon:e,children:t}){return(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(e,{className:`size-3.5`}),t]})}function sE({record:e,children:t}){return(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-start md:justify-between`,children:[(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:SC(e.startedAt)}),(0,m.jsx)(HC,{outcome:Xy(e)}),e.status===`interrupted`?(0,m.jsx)(RC,{variant:`outline`,className:`text-infra`,children:`interrupted`}):null]}),(0,m.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-sm text-muted-foreground`,children:[(0,m.jsxs)(oE,{icon:_S,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:Jy(e.git?.sha)}),e.git?.dirty?(0,m.jsx)(`span`,{className:`text-infra`,children:`· dirty`}):null]}),e.git?.branch?(0,m.jsx)(oE,{icon:hS,children:e.git.branch}):null,(0,m.jsx)(oE,{icon:aC,children:e.runner.kind===`ci`?`CI · ${e.runner.provider}`:e.author}),(0,m.jsx)(oE,{icon:zx,children:Hy(e.durationMs)}),e.cost.usage?(0,m.jsxs)(oE,{icon:Ux,children:[qy(e.cost.usage),` tokens`]}):null]})]}),t]})}function cE({warnings:e}){if(e.length===0)return null;let t=e.some(e=>e.kind===`root`);return(0,m.jsxs)(`div`,{role:`alert`,className:Z(`flex gap-3 rounded-xl border p-4 text-sm`,t?`border-fail/40 bg-fail/5`:`border-infra/40 bg-infra/5`),children:[(0,m.jsx)(qS,{className:Z(`mt-0.5 size-4 shrink-0`,t?`text-fail`:`text-infra`)}),(0,m.jsx)(`ul`,{className:`min-w-0 space-y-1`,children:e.map(e=>(0,m.jsxs)(`li`,{className:`break-words`,children:[(0,m.jsx)(`span`,{className:Z(`font-semibold`,e.kind===`root`?`text-fail`:`text-infra`),children:e.kind===`root`?`Root`:`Capabilities`}),` `,(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e.message}),e.file?(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,e.file]}):null]},`${e.file}\0${e.message}`))})]})}function lE({node:e,depth:t,selected:n,onSelect:r}){let[i,a]=(0,p.useState)(!0),o={paddingLeft:`${t*14+8}px`};if(e.kind===`eval`){let t=n===e.eval.slug;return(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.eval.slug),style:o,className:Z(`flex w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left text-sm transition-colors`,t?`bg-accent text-foreground`:`text-foreground/85 hover:bg-accent/60`),children:[(0,m.jsx)(VC,{outcome:e.eval.outcome}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),e.eval.todo?(0,m.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:`todo`}):cb(e.eval)?(0,m.jsxs)(`span`,{className:`tabular shrink-0 text-xs text-muted-foreground`,children:[e.tally.pass,`/`,e.tally.pass+e.tally.fail+e.tally.missed+e.tally.infra]}):null]})}let s=t===0,c=s?Yx:dS;return(0,m.jsxs)(`div`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>a(!i),style:o,className:`flex w-full items-center gap-1.5 rounded-md py-1.5 pr-2 text-left text-xs font-medium text-muted-foreground hover:bg-accent/60`,children:[(0,m.jsx)(yx,{className:Z(`size-3.5 transition-transform`,i&&`rotate-90`)}),(0,m.jsx)(c,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:Z(`min-w-0 flex-1 truncate`,s&&`font-mono`),children:e.name}),e.tally.fail?(0,m.jsxs)(`span`,{className:`tabular text-fail`,children:[e.tally.fail,` failed`]}):e.tally.missed?(0,m.jsxs)(`span`,{className:`tabular`,children:[e.tally.missed,` missed, not gated`]}):null]}),i?e.children.map(e=>(0,m.jsx)(lE,{node:e,depth:t+1,selected:n,onSelect:r},e.key)):null]})}function uE(e){return e.flatMap(e=>{if(e.kind===`eval`)return e.eval.outcome===`pass`||e.eval.outcome===`skipped`?[]:[e];let t=uE(e.children);return t.length?[{...e,children:t}]:[]})}function dE({rows:e,runId:t,slug:n}){let r=e.some(e=>e.lift!==null),i=e.some(e=>e.effort!==null),a=e.some(e=>e.usage),o=e.some(e=>e.role===`variant`);return(0,m.jsx)(`div`,{className:`overflow-hidden rounded-lg border`,children:(0,m.jsxs)(gT,{children:[(0,m.jsx)(_T,{children:(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{children:`Harness`}),(0,m.jsx)($,{children:`Environment`}),o?(0,m.jsx)($,{children:`Role`}):null,(0,m.jsx)($,{className:`hidden 2xl:table-cell`,children:`Sandbox`}),(0,m.jsx)($,{children:`Attempts`}),(0,m.jsx)($,{className:`text-right`,children:`Pass rate`}),a?(0,m.jsx)($,{className:`text-right`,children:`Tokens`}):null,r||i?(0,m.jsx)($,{className:`text-right`,children:r&&i?`Lift and effort`:r?`Lift`:`Effort`}):null]})}),(0,m.jsx)(vT,{children:e.map(e=>(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)(bT,{className:`font-mono text-xs`,children:e.harness}),(0,m.jsxs)(bT,{className:`font-mono text-xs`,children:[e.environment===`-`?(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`none`}):e.environment,e.overrides.length?(0,m.jsxs)(`div`,{className:`mt-0.5 font-sans text-[11px] text-muted-foreground`,children:[`overrides `,e.overrides.join(`, `)]}):null]}),o?(0,m.jsx)(bT,{children:(0,m.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[e.role,e.gated?null:(0,m.jsx)(RC,{variant:`outline`,className:`text-[10px] text-muted-foreground`,children:`not gated`})]})}):null,(0,m.jsx)(bT,{className:`hidden font-mono text-xs 2xl:table-cell`,children:e.sandbox}),(0,m.jsx)(bT,{children:(0,m.jsx)(`div`,{className:`flex items-center gap-1`,children:e.attempts.map(r=>(0,m.jsx)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:t,slug:n,attempt:r.id},title:`${r.id} · ${Hy(r.durationMs)}`,className:`rounded-sm p-0.5 hover:bg-accent`,children:(0,m.jsx)(VC,{outcome:r.outcome,missed:!e.gated})},r.id))})}),(0,m.jsxs)(bT,{className:`text-right`,children:[(0,m.jsx)(WC,{rate:e.passRate}),(0,m.jsxs)(`span`,{className:`tabular ml-1.5 text-xs text-muted-foreground`,children:[e.pass,`/`,e.pass+e.fail]}),e.judgeRates.length?(0,m.jsx)(`div`,{className:`mt-1 text-left text-[11px] text-muted-foreground`,children:(0,m.jsx)(pE,{rates:e.judgeRates})}):null]}),a?(0,m.jsx)(bT,{className:`text-right text-xs text-muted-foreground`,children:qy(e.usage)??`–`}):null,r||i?(0,m.jsxs)(bT,{className:`min-w-44 whitespace-normal text-right`,children:[r?(0,m.jsx)(KC,{points:e.lift,interval:e.liftInterval}):null,e.belowMinLift?(0,m.jsx)(`div`,{className:`text-[11px] text-fail`,children:`lower bound below minLift`}):null,i?(0,m.jsx)(`div`,{className:r?`mt-1`:void 0,children:(0,m.jsx)(fE,{row:e})}):null]}):null]},e.key))})]})})}function fE({row:e}){if(!e.effort)return(0,m.jsx)(`span`,{className:`text-muted-foreground`,children:`–`});let t=e.effortVsControl,n=t&&(t.verdict===`fewer`||t.verdict===`more`);return(0,m.jsxs)(`div`,{className:`tabular text-xs`,children:[(0,m.jsx)(`div`,{children:sy(e.effort)}),t?(0,m.jsxs)(`div`,{className:Z(`text-[11px]`,n?t.verdict===`fewer`?`text-pass`:`text-fail`:`text-muted-foreground`),title:t.toolsP===null?void 0:`exact rank test p = ${t.toolsP.toFixed(3)}`,children:[`tools `,iy(t.toolsRatio),` vs control · `,oy[t.verdict](`tool calls`)]}):null]})}function pE({rates:e}){return e.length===0?null:(0,m.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.map((e,t)=>(0,m.jsxs)(`span`,{className:`tabular`,title:e.question,children:[t>0?` · `:``,e.label,` `,e.pass,`/`,e.counted,e.lift?` (${e.lift.points>=0?`+`:`−`}${Math.round(Math.abs(e.lift.points)*100)} pts)`:``]},e.key))})}function mE({label:e,rates:t}){return t.length===0?null:(0,m.jsxs)(`div`,{className:`space-y-1`,children:[(0,m.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),t.map(e=>(0,m.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,12rem)_minmax(0,1fr)_auto] items-center gap-3 text-xs`,children:[(0,m.jsx)(`span`,{className:`truncate font-mono`,title:e.name,children:e.name}),(0,m.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:e.rate===null?null:(0,m.jsx)(`div`,{className:`h-full bg-pass`,style:{width:`${e.rate*100}%`}})}),(0,m.jsxs)(`span`,{className:`tabular text-right`,children:[(0,m.jsx)(`span`,{className:`font-medium`,children:Uy(e.rate)}),(0,m.jsxs)(`span`,{className:`ml-1.5 text-muted-foreground`,children:[e.wins,`/`,e.n]})]})]},e.name))]})}function hE({rows:e}){return(0,m.jsxs)(`section`,{className:`space-y-2`,"data-questions":!0,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Questions`}),(0,m.jsx)(`div`,{className:`divide-y overflow-hidden rounded-lg border`,children:e.map(e=>(0,m.jsxs)(`div`,{className:`space-y-2.5 px-3.5 py-3`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-3 gap-y-1`,children:[(0,m.jsx)(`p`,{className:`min-w-0 text-sm`,children:e.question}),(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.model})]}),(0,m.jsx)(mE,{label:`Within a harness`,rates:e.within}),(0,m.jsx)(mE,{label:`Across harnesses`,rates:e.across}),e.error===null?null:(0,m.jsxs)(`p`,{className:`font-mono text-xs break-words text-infra`,children:[`failed: `,e.error]}),e.noPairs||e.votes?(0,m.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.noPairs?`No pairs to judge: attempts that failed their checks are left out`:`${CC(e.votes,`vote`)}, ${CC(e.ties,`tie`)}`}):null]},e.question))})]})}function gE({record:e,entry:t}){let n=ob(t),r=cb(t),i=sb(t),a=!r&&n[0]?.judgeRates.length?n[0].judgeRates:[];return(0,m.jsxs)(`div`,{className:`space-y-5`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[t.file,...t.group].join(` › `)}),(0,m.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2.5`,children:[(0,m.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:t.name}),(0,m.jsx)(HC,{outcome:t.outcome,label:t.todo?`Todo`:void 0})]}),(0,m.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,m.jsx)(fC,{asChild:!0,variant:`outline`,size:`sm`,children:(0,m.jsxs)(R,{to:`/evals/$slug`,params:{slug:t.slug},children:[(0,m.jsx)(LS,{}),` History`]})}),t.tags.map(e=>(0,m.jsxs)(RC,{variant:`secondary`,children:[`#`,e]},e)),t.compare?(0,m.jsxs)(RC,{variant:`outline`,className:`font-mono text-[11px]`,title:t.compare.from===`environment`?`No compare.baseline: the eval's environment is the control`:t.compare.from===`empty`?`No compare.baseline or environment: the control is an empty environment`:void 0,children:[`baseline `,t.compare.baseline]}):null]})]}),r?(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:`Cells`}),(0,m.jsx)(dE,{rows:n,runId:e.runId,slug:t.slug})]}):a.length?(0,m.jsx)(pE,{rates:a}):null,i.length?(0,m.jsx)(hE,{rows:i}):null,(0,m.jsxs)(`section`,{className:`space-y-2`,children:[(0,m.jsx)(`h3`,{className:`text-sm font-medium`,children:CC(t.attempts.length,`attempt`)}),(0,m.jsx)(`div`,{className:`divide-y overflow-hidden rounded-lg border`,children:t.attempts.map(n=>{let r=by(n.judgements),i=qy(n.usage),a=pb(t,n);return(0,m.jsxs)(R,{to:`/runs/$runId/evals/$slug/attempts/$attempt`,params:{runId:e.runId,slug:t.slug,attempt:n.id},className:`group flex items-start gap-3 px-3.5 py-3 transition-colors hover:bg-accent/50`,children:[(0,m.jsx)(VC,{outcome:n.outcome,missed:a,className:`mt-0.5`}),(0,m.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-sm`,children:[(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:n.id}),(0,m.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[Hy(n.durationMs),` · `,CC(n.turns.length,`turn`),` ·`,` `,Yy(n.activity),i?` · ${i}`:``]}),r.shown.map(e=>(0,m.jsxs)(`span`,{className:Z(`tabular text-xs`,e.verdict===`pass`?`text-pass`:`text-fail`),children:[e.verdict,` `,e.score.toFixed(2),`/`,e.threshold.toFixed(2)]},e.key)),r.extra?(0,m.jsxs)(`span`,{className:`tabular text-xs text-muted-foreground`,children:[r.extra,` judges`]}):null,a?(0,m.jsx)(RC,{variant:`outline`,className:`text-[10px] text-muted-foreground`,children:`missed, not gated`}):null]}),n.error?(0,m.jsxs)(`p`,{className:Z(`mt-1 line-clamp-2 font-mono text-xs`,a?`text-muted-foreground`:`text-fail`),children:[n.error.kind,`: `,n.error.message.split(`
|
|
58
|
+
`)[0]]}):n.turns.at(-1)?.text?(0,m.jsx)(`p`,{className:`mt-1 line-clamp-1 text-xs text-muted-foreground`,children:n.turns.at(-1)?.text}):null]}),(0,m.jsx)(yx,{className:`mt-0.5 size-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100`})]},n.id)})})]})]})}function _E(){let{runId:e}=aE.useParams(),t=aE.useSearch(),n=Ki({from:`/runs/$runId`}),{data:r,error:i,isPending:a}=et(Ob(e)),{data:o}=et(Db),{data:s}=et(Ab(e)),c=(0,p.useMemo)(()=>r?ib(r):[],[r]);if(i)return(0,m.jsx)(jC,{error:i});if(a)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-[320px_1fr]`,children:[(0,m.jsx)(NC,{rows:8}),(0,m.jsx)(NC,{rows:4})]})]});let l=t.show===`failed`?uE(c):c,u=r.evals.find(e=>e.slug===t.eval)??r.evals.find(e=>e.outcome===`fail`||e.outcome===`infra_error`)??r.evals[0],d=(o?.headers??[]).find(t=>t.runId<e&&t.status===`complete`),{pass:f,fail:h,notGated:g,infraError:_,skipped:v}=r.summary,y=h-g,b=gv(s?.entries??[]);return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,m.jsx)(R,{to:`/`,className:`hover:text-foreground`,children:`Runs`}),(0,m.jsx)(yx,{className:`size-3.5`}),(0,m.jsx)(`span`,{className:`truncate font-mono text-xs text-foreground`,children:e})]}),(0,m.jsx)(sE,{record:r,children:(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[d?(0,m.jsx)(fC,{asChild:!0,variant:`outline`,size:`sm`,children:(0,m.jsxs)(R,{to:`/compare`,search:{base:d.runId,head:e},children:[(0,m.jsx)(yS,{}),` Compare with previous`]})}):null,r.git?(0,m.jsx)(_w,{value:`reeval checkout ${e}`,label:`reeval checkout`}):null]})}),(0,m.jsx)(`p`,{className:`text-sm leading-relaxed`,children:$y(r)}),b?(0,m.jsxs)(`p`,{className:`rounded-lg border bg-muted/40 p-3 text-sm leading-relaxed`,children:[(0,m.jsxs)(`span`,{className:`font-semibold`,children:[`TL;DR (`,b.doc.analysis.confidence.overall,`). `]}),b.doc.analysis.tldr]}):null,(0,m.jsx)(cE,{warnings:r.plan.sandboxWarnings}),(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card p-4`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-sm`,children:[(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`span`,{className:`font-semibold`,children:f}),` passed`,y?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold text-fail`,children:y}),` failed`]}):null,g?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold`,children:g}),` missed, not gated`]}):null,_?(0,m.jsxs)(m.Fragment,{children:[` · `,(0,m.jsx)(`span`,{className:`font-semibold text-infra`,children:_}),` infra errors`]}):null,v?` · ${v} skipped`:``,(0,m.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`across `,CC(r.summary.evals,`eval`),`,`,` `,CC(r.summary.attempts,`attempt`)]})]}),(0,m.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[r.stack.harnesses.map(e=>e.id).join(`, `),` · judge`,` `,r.config.judgeModel??`none`,r.profile?` · profile ${r.profile.name}`:``]})]}),(0,m.jsx)(UC,{className:`mt-3 h-2`,pass:f,fail:y,missed:g,infra:_,skipped:v})]}),(0,m.jsxs)(YC,{value:t.tab??`evals`,onValueChange:e=>n({search:t=>({...t,tab:e===`analysis`?`analysis`:void 0}),replace:!0}),children:[(0,m.jsxs)(ZC,{children:[(0,m.jsx)(QC,{value:`evals`,children:`Evals`}),(0,m.jsx)(QC,{value:`analysis`,children:`Analysis`})]}),(0,m.jsx)($C,{value:`evals`,className:`mt-4`,children:r.evals.length===0?(0,m.jsx)(AC,{icon:DS,title:`No evals ran`,children:`This run matched no evals, so there's nothing to show.`}):(0,m.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[340px_minmax(0,1fr)]`,children:[(0,m.jsx)(`aside`,{className:`min-w-0 lg:sticky lg:top-20 lg:self-start`,children:(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2`,children:[(0,m.jsx)(`span`,{className:`text-sm font-medium`,children:`Evals`}),(0,m.jsx)(`div`,{className:`inline-flex rounded-md bg-muted p-0.5 text-xs`,children:[[void 0,`All`],[`failed`,`Failing`]].map(([e,r])=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>n({search:t=>({...t,show:e}),replace:!0}),className:Z(`rounded px-2 py-0.5`,t.show===e?`bg-background shadow-sm`:`text-muted-foreground`),children:r},r))})]}),(0,m.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto p-1.5 lg:max-h-[calc(100dvh-14rem)]`,children:l.length===0?(0,m.jsx)(`p`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:`Nothing failed in this run.`}):l.map(e=>(0,m.jsx)(lE,{node:e,depth:0,selected:u?.slug,onSelect:e=>n({search:t=>({...t,eval:e}),replace:!0})},e.key))})]})}),(0,m.jsx)(`section`,{className:`min-w-0 rounded-xl border bg-card p-5`,children:u?(0,m.jsx)(gE,{record:r,entry:u}):null})]})}),(0,m.jsx)($C,{value:`analysis`,className:`mt-4`,children:(0,m.jsx)(`section`,{className:`rounded-xl border bg-card p-5`,children:(0,m.jsx)(iE,{runId:e})})})]}),(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Started `,bC(r.startedAt),` · artifacts: `,r.artifacts,` · reeval`,` `,r.stack.es]})]})}var vE=la(`/`);function yE({entry:e}){if(e.ci){let t=(0,m.jsxs)(RC,{variant:`secondary`,className:`gap-1 font-normal`,children:[(0,m.jsx)(lx,{}),` `,e.ci.provider]});return e.ci.runUrl?(0,m.jsx)(`a`,{href:e.ci.runUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),children:t}):t}return(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-muted-foreground`,children:[(0,m.jsx)(aC,{className:`size-3.5`}),e.author]})}function bE({hasScratch:e}){let t=vE.useSearch(),n=Ki({from:`/`}),r=e=>n({search:t=>({...t,...e}),replace:!0}),i=({value:e,label:n})=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>r({status:e}),className:Z(`rounded-md px-3 py-1 text-sm transition-colors`,t.status===e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:n});return(0,m.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,m.jsxs)(`div`,{className:`relative sm:w-80`,children:[(0,m.jsx)(GS,{className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,m.jsx)(nw,{value:t.q??``,onChange:e=>r({q:e.target.value||void 0}),placeholder:`Filter by branch, commit, author or run id`,className:`h-9 pl-8`})]}),(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsxs)(`div`,{className:`inline-flex rounded-lg bg-muted p-0.5`,children:[(0,m.jsx)(i,{value:void 0,label:`All`}),(0,m.jsx)(i,{value:`failed`,label:`Failing`}),(0,m.jsx)(i,{value:`passed`,label:`Passing`})]}),e?(0,m.jsx)(`div`,{className:`inline-flex rounded-lg bg-muted p-0.5`,children:[[void 0,`Everything`],[`recorded`,`Recorded`],[`scratch`,`Scratch`]].map(([e,n])=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>r({source:e}),className:Z(`rounded-md px-3 py-1 text-sm transition-colors`,t.source===e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:n},n))}):null]})]})}function xE({rows:e}){let t=e.slice(0,30).reverse();return(0,m.jsx)(`div`,{className:`flex h-10 items-end gap-[3px]`,children:t.map(e=>{let t=e.total?e.passed/e.total:0;return(0,m.jsxs)(fv,{children:[(0,m.jsx)(pv,{asChild:!0,children:(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:e.entry.runId},className:`group flex h-full w-2 flex-col justify-end sm:w-2.5`,children:(0,m.jsx)(`div`,{className:Z(`w-full rounded-sm transition-opacity group-hover:opacity-70`,t>=.999?`bg-pass`:t===0?`bg-fail`:`bg-infra`),style:{height:`${Math.max(12,t*100)}%`}})})}),(0,m.jsxs)(mv,{children:[Uy(e.total?t:null),` · `,Jy(e.entry.git?.sha),` ·`,` `,bC(e.entry.startedAt)]})]},e.entry.runId)})})}function SE({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`rounded-xl border bg-card px-4 py-3`,children:[(0,m.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e}),(0,m.jsx)(`div`,{className:`mt-1 text-lg font-semibold tracking-tight`,children:t})]})}function CE(){let e=vE.useSearch(),t=Ki(),{data:n}=Nb(),{data:r,error:i,isPending:a}=et(Db),{runs:o}=Fb(),s=(0,p.useMemo)(()=>r?eb(r.headers):[],[r]),c=(0,p.useMemo)(()=>{let t=e.q?.toLowerCase();return s.filter(({entry:n})=>e.status===`failed`&&Xy(n)===`pass`||e.status===`passed`&&Xy(n)!==`pass`||e.source===`recorded`&&!n.recorded||e.source===`scratch`&&n.recorded?!1:!t||[n.runId,n.author,n.git?.branch??``,n.git?.sha??``,n.ci?.provider??``].join(` `).toLowerCase().includes(t))},[s,e]);if(i)return(0,m.jsx)(jC,{error:i});if(a)return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsx)(PC,{}),(0,m.jsx)(NC,{rows:8})]});let l=s[0],u=s.some(e=>!e.entry.recorded);return(0,m.jsxs)(`div`,{className:`space-y-6`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Runs`}),(0,m.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s.length?`${CC(s.length,`run`)} · ${CC(r.manifest.evals.length,`eval`)} tracked`:`Every recorded run of this project, newest first.`})]}),s.length>1?(0,m.jsx)(xE,{rows:s}):null]}),(0,m.jsx)(HT,{runs:o.filter(e=>!s.some(t=>t.entry.runId===e.runId))}),s.length===0&&o.length?null:s.length===0?(0,m.jsxs)(AC,{icon:LS,title:`No runs yet`,children:[`Record one with `,(0,m.jsx)(MC,{children:`reeval run --record`}),`, or promote your latest scratch run with`,` `,(0,m.jsx)(MC,{children:`reeval record latest`}),`.`,` `,n?.mode===`live`?`It shows up here as soon as it lands.`:``]}):(0,m.jsxs)(m.Fragment,{children:[l?(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-4`,children:[(0,m.jsx)(SE,{label:`Latest run`,children:(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(VC,{outcome:Xy(l.entry),className:`size-5`}),bC(l.entry.startedAt)]})}),(0,m.jsxs)(SE,{label:`Latest pass rate`,children:[Uy(l.total?l.passed/l.total:null),(0,m.jsxs)(`span`,{className:`ml-1.5 text-sm font-normal text-muted-foreground`,children:[l.passed,`/`,l.total]})]}),(0,m.jsxs)(SE,{label:`Failing runs`,children:[s.filter(e=>Xy(e.entry)!==`pass`).length,(0,m.jsxs)(`span`,{className:`ml-1.5 text-sm font-normal text-muted-foreground`,children:[`of `,s.length]})]}),(0,m.jsx)(SE,{label:`Branches`,children:new Set(s.map(e=>e.entry.git?.branch??`–`)).size})]}):null,(0,m.jsx)(bE,{hasScratch:u}),c.length===0?(0,m.jsxs)(AC,{icon:GS,title:`No runs match`,children:[`Try a different filter, or clear it to see all `,s.length,` runs.`]}):(0,m.jsx)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:(0,m.jsxs)(gT,{children:[(0,m.jsx)(_T,{children:(0,m.jsxs)(yT,{className:`hover:bg-transparent`,children:[(0,m.jsx)($,{className:`w-10`}),(0,m.jsx)($,{children:`Run`}),(0,m.jsx)($,{children:`Commit`}),(0,m.jsx)($,{className:`hidden md:table-cell`,children:`Who`}),(0,m.jsx)($,{className:`w-44`,children:`Result`}),(0,m.jsx)($,{className:`hidden text-right lg:table-cell`,children:`Tokens`}),(0,m.jsx)($,{className:`hidden text-right sm:table-cell`,children:`Duration`}),(0,m.jsx)($,{className:`w-24`})]})}),(0,m.jsx)(vT,{children:c.map(e=>{let{entry:n}=e;return(0,m.jsxs)(yT,{className:`cursor-pointer`,onClick:()=>t({to:`/runs/$runId`,params:{runId:n.runId}}),children:[(0,m.jsx)(bT,{className:`pl-4`,children:(0,m.jsx)(VC,{outcome:Xy(n)})}),(0,m.jsxs)(bT,{children:[(0,m.jsx)(R,{to:`/runs/$runId`,params:{runId:n.runId},className:`font-medium hover:underline`,onClick:e=>e.stopPropagation(),children:(0,m.jsx)(`span`,{title:SC(n.startedAt),children:bC(n.startedAt)})}),(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:n.runId}),n.recorded?null:(0,m.jsx)(RC,{variant:`outline`,className:`h-4 px-1.5 text-[10px] text-muted-foreground`,children:`scratch`}),n.status===`interrupted`?(0,m.jsx)(RC,{variant:`outline`,className:`h-4 px-1.5 text-[10px] text-infra`,children:`interrupted`}):null]})]}),(0,m.jsxs)(bT,{children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-1.5 font-mono text-xs`,children:[Jy(n.git?.sha),n.git?.dirty?(0,m.jsx)(`span`,{className:`size-1.5 rounded-full bg-infra`,title:`Uncommitted changes`}):null]}),n.git?.branch?(0,m.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,m.jsx)(hS,{className:`size-3`}),(0,m.jsx)(`span`,{className:`max-w-40 truncate`,children:n.git.branch})]}):null]}),(0,m.jsx)(bT,{className:`hidden md:table-cell`,children:(0,m.jsx)(yE,{entry:n})}),(0,m.jsxs)(bT,{children:[(0,m.jsx)(`div`,{className:`flex items-center justify-between gap-2 text-xs`,children:(0,m.jsxs)(`span`,{className:`tabular font-medium`,children:[e.passed,`/`,e.total,(0,m.jsx)(`span`,{className:`ml-1 font-normal text-muted-foreground`,children:`passed`})]})}),(0,m.jsx)(UC,{className:`mt-1.5`,pass:n.summary.pass,fail:n.summary.fail-n.summary.notGated,missed:n.summary.notGated,infra:n.summary.infraError,skipped:n.summary.skipped})]}),(0,m.jsx)(bT,{className:`tabular hidden text-right text-muted-foreground lg:table-cell`,children:qy(n.usage)??`–`}),(0,m.jsx)(bT,{className:`tabular hidden text-right text-muted-foreground sm:table-cell`,children:Hy(n.durationMs)}),(0,m.jsx)(bT,{className:`pr-4 text-right`,children:(0,m.jsx)(qC,{changes:e.drift,evals:e.changedEvals})})]},n.runId)})})]})})]})]})}var wE=e=>typeof e==`string`&&e?e:void 0,TE=(e,t)=>e.includes(t)?t:void 0,EE=pa()({component:OC,notFoundComponent:ZT}),DE=fa({getParentRoute:()=>EE,path:`/`,validateSearch:e=>({q:wE(e.q),status:TE([`passed`,`failed`],e.status),source:TE([`recorded`,`scratch`],e.source)}),loader:({context:e})=>e.queryClient.prefetchQuery(Db),component:CE}),OE=fa({getParentRoute:()=>EE,path:`/runs/$runId`,validateSearch:e=>({eval:wE(e.eval),show:TE([`failed`],e.show),tab:TE([`analysis`],e.tab)}),loader:({context:e,params:t})=>e.queryClient.prefetchQuery(Ob(t.runId)),component:_E}),kE=fa({getParentRoute:()=>EE,path:`/runs/$runId/evals/$slug/attempts/$attempt`,validateSearch:e=>({tab:TE(iT,e.tab)}),loader:({context:e,params:t})=>e.queryClient.prefetchQuery(Ob(t.runId)),component:cT}),AE=fa({getParentRoute:()=>EE,path:`/live/$runId`,component:YT}),jE=fa({getParentRoute:()=>EE,path:`/live/$runId/attempt`,validateSearch:e=>({key:wE(e.key)}),component:XT}),ME=fa({getParentRoute:()=>EE,path:`/evals`,validateSearch:e=>({q:wE(e.q)}),component:PT}),NE=fa({getParentRoute:()=>EE,path:`/evals/$slug`,component:MT}),PE=fa({getParentRoute:()=>EE,path:`/compare`,validateSearch:e=>({base:wE(e.base),head:wE(e.head)}),component:AT}),FE=EE.addChildren([DE,OE,kE,AE,jE,ME,NE,PE]);function IE(e){return Ma({routeTree:FE,history:Vn(),context:{queryClient:e},defaultPreload:`intent`,defaultPreloadStaleTime:0,scrollRestoration:!0})}Ub();var LE=new Ve({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof Sb)&&e<2}}}),RE=IE(LE);(0,Lg.createRoot)(document.getElementById(`root`)).render((0,m.jsx)(p.StrictMode,{children:(0,m.jsx)(_,{client:LE,children:(0,m.jsx)(dv,{delayDuration:200,children:(0,m.jsx)(Fa,{router:RE})})})}));
|