@testver/testver 1.4.1 → 1.4.2
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/README.md +3 -1
- package/bin/testver.js +1 -1
- package/dist/index.js +770 -391
- package/package.json +2 -1
- package/src/ui/static/assets/{AIPanel-D09Ni3a4.js → AIPanel-B_R-CbrF.js} +2 -2
- package/src/ui/static/assets/{AIRecordPanel-DZtUZnRe.js → AIRecordPanel-BRQWIU5h.js} +3 -3
- package/src/ui/static/assets/{AIStreamUI-BsxKziYG.js → AIStreamUI-C3D989_6.js} +3 -3
- package/src/ui/static/assets/{AITestGenPage-Cg21-P1W.js → AITestGenPage-D3t2gPAA.js} +5 -5
- package/src/ui/static/assets/{APITestingPage-Cdc8EZz2.js → APITestingPage-Cmwkiiys.js} +1 -1
- package/src/ui/static/assets/{AboutPage-yJLCr2_q.js → AboutPage-CjEqKB-q.js} +1 -1
- package/src/ui/static/assets/AdvancedPage-4kAcpE8Y.js +3 -0
- package/src/ui/static/assets/{AnalyticsPage-gTPFsiLZ.js → AnalyticsPage-64mYNK2v.js} +1 -1
- package/src/ui/static/assets/{AuditLogPage-DE45E_PV.js → AuditLogPage-BQjOzQje.js} +1 -1
- package/src/ui/static/assets/{ChangesSummary-C-7oi_sx.js → ChangesSummary-CY_Vb27i.js} +2 -2
- package/src/ui/static/assets/{CodeMapPage-DgU6ZYBO.js → CodeMapPage-B1ezmnlE.js} +3 -3
- package/src/ui/static/assets/{ConfirmDialog-DNU3qoAP.js → ConfirmDialog-t7mpeeSN.js} +1 -1
- package/src/ui/static/assets/{CoveragePage-BpTjgcdV.js → CoveragePage-YMmCbiBk.js} +2 -2
- package/src/ui/static/assets/{CronBuilder-DsnX-vRr.js → CronBuilder-Nk-K-_8I.js} +1 -1
- package/src/ui/static/assets/Dashboard-BDVxO2V4.js +1 -0
- package/src/ui/static/assets/{DefectsPage-BtMNbq6Z.js → DefectsPage-l8yGeCyR.js} +1 -1
- package/src/ui/static/assets/{DiffViewer-DPglzjPH.js → DiffViewer-BIU09a_i.js} +1 -1
- package/src/ui/static/assets/{EmptyState-BH_aDO0P.js → EmptyState-D1T3JWUr.js} +1 -1
- package/src/ui/static/assets/{ExportButton-Ce_MxnM1.js → ExportButton-Dt5RhL-h.js} +1 -1
- package/src/ui/static/assets/{FileViewer-iYL0lxyY.js → FileViewer-CrKgh_cB.js} +5 -5
- package/src/ui/static/assets/{GitPage-CQqV8JBC.js → GitPage-_4nCEzkJ.js} +5 -5
- package/src/ui/static/assets/{ImportExportPage-DXk7Koaq.js → ImportExportPage-BcR7IQi9.js} +1 -1
- package/src/ui/static/assets/{JiraPushDialog-CqftoLh8.js → JiraPushDialog-C2sP4_4h.js} +1 -1
- package/src/ui/static/assets/KpiTile-inmeEsy3.js +1 -0
- package/src/ui/static/assets/{LiveExecutionView-BD0wE8sz.js → LiveExecutionView-D5BRe9jq.js} +1 -1
- package/src/ui/static/assets/{MediaModal-DiSINwmh.js → MediaModal-C5n6sHYi.js} +1 -1
- package/src/ui/static/assets/{MobileRunPicker-BNs2lZFf.js → MobileRunPicker-0h-N2c6d.js} +1 -1
- package/src/ui/static/assets/{MobileRunTarget-D2Nqcj10.js → MobileRunTarget-Bo_xekig.js} +1 -1
- package/src/ui/static/assets/{ModuleExplorer-BmkoQrHb.js → ModuleExplorer-VGcmK167.js} +1 -1
- package/src/ui/static/assets/{OutputPage-Dcsr7cmr.js → OutputPage-B_1nPPxE.js} +1 -1
- package/src/ui/static/assets/PipelinesPanel-PmmPu8pj.js +1 -0
- package/src/ui/static/assets/{ProfilePage-ByshrcwC.js → ProfilePage-y7tJNNFd.js} +1 -1
- package/src/ui/static/assets/{ProjectExplorer-B9B___ij.js → ProjectExplorer-DbfGhRq0.js} +1 -1
- package/src/ui/static/assets/{RemoteFileStrip-DbPnaZ-v.js → RemoteFileStrip-WuRKtx_h.js} +1 -1
- package/src/ui/static/assets/ReportCard-G52Q6-2i.js +2 -0
- package/src/ui/static/assets/ReportFullView-Bt8UFP2J.js +1 -0
- package/src/ui/static/assets/ReportsPage-DMtDi73Q.js +48 -0
- package/src/ui/static/assets/ResultsPage-BI9jpK2N.js +115 -0
- package/src/ui/static/assets/RunState-ifC4zi6M.js +1 -0
- package/src/ui/static/assets/{RunTargets-C7Vqd4TU.js → RunTargets-C7vpCbck.js} +1 -1
- package/src/ui/static/assets/{ScriptMappingPage-BrANeHv0.js → ScriptMappingPage-7vHuvhQw.js} +1 -1
- package/src/ui/static/assets/{SearchableDevicePicker-CFJ_DUAA.js → SearchableDevicePicker-BYxYJNWl.js} +1 -1
- package/src/ui/static/assets/{SettingsPage-BwOiebKG.js → SettingsPage-DSISg7r7.js} +1 -1
- package/src/ui/static/assets/SharedReportView-BOqKGJmR.js +1 -0
- package/src/ui/static/assets/{SourcesPage-C_QVQwiA.js → SourcesPage-CgqtYGBi.js} +1 -1
- package/src/ui/static/assets/TestExplorerPage-gYLhCD4d.js +7 -0
- package/src/ui/static/assets/{TestManagementPage-Ch4PthuU.js → TestManagementPage-wqYTKP7W.js} +2 -2
- package/src/ui/static/assets/TestPlansPage-DOKX9p6z.js +5 -0
- package/src/ui/static/assets/{TestverCreditsRing-CUsMGEe3.js → TestverCreditsRing-DpMzl3h7.js} +1 -1
- package/src/ui/static/assets/{UncommittedDiffViewer-B5HSURk8.js → UncommittedDiffViewer-BxS0zi-p.js} +1 -1
- package/src/ui/static/assets/{UserManagementPage-BjY3ftxf.js → UserManagementPage-B5d0uDU_.js} +2 -2
- package/src/ui/static/assets/{WorkflowsPage-BUu-LjZ8.js → WorkflowsPage-Bk0DFnFS.js} +17 -17
- package/src/ui/static/assets/{hiddenLlmProviders-setxgY_B.js → hiddenLlmProviders-CdhhNa5G.js} +1 -1
- package/src/ui/static/assets/index-BYVxKLrT.js +47 -0
- package/src/ui/static/assets/index-C2KJt7SI.css +1 -0
- package/src/ui/static/assets/reportMeta-AKcU_qwq.js +1 -0
- package/src/ui/static/assets/{useFeatureFlags-DqhngqgG.js → useFeatureFlags-DNkIctil.js} +1 -1
- package/src/ui/static/assets/{useJiraConnector-TM1Rfj1s.js → useJiraConnector-D5ysBBvz.js} +1 -1
- package/src/ui/static/assets/{useOwnership-eW6Egd7X.js → useOwnership-U0AfKBRo.js} +1 -1
- package/src/ui/static/assets/{useSuites-CvtMGakZ.js → useSuites-DyfN9HVv.js} +1 -1
- package/src/ui/static/assets/{useTestExplorer-HqvURJAc.js → useTestExplorer-DT8frjCK.js} +1 -1
- package/src/ui/static/assets/{useTestLifecycle-CL7-zz0Q.js → useTestLifecycle-OcwQaB1s.js} +1 -1
- package/src/ui/static/assets/{useTestManagement-ZTA1_VUm.js → useTestManagement-Xm4Bcx3u.js} +2 -2
- package/src/ui/static/assets/useTestResults-D5EwGIX9.js +1 -0
- package/src/ui/static/assets/{vendor-icons-B0wLOBoh.js → vendor-icons-BKPiFyYV.js} +1 -1
- package/src/ui/static/index.html +3 -3
- package/src/ui/static/assets/AdvancedPage-DB-6sJ6s.js +0 -3
- package/src/ui/static/assets/Dashboard-DRWbVyTb.js +0 -1
- package/src/ui/static/assets/PipelinesPanel-CMMXCSda.js +0 -1
- package/src/ui/static/assets/ReportCard-BbNfk85h.js +0 -2
- package/src/ui/static/assets/ReportFullView-Cg1rggho.js +0 -1
- package/src/ui/static/assets/ReportsPage-CFv3OAhe.js +0 -48
- package/src/ui/static/assets/ResultsPage-B4LwZH-R.js +0 -115
- package/src/ui/static/assets/SharedReportView-BAbW1WOs.js +0 -1
- package/src/ui/static/assets/TestExplorerPage-BRRWtwde.js +0 -7
- package/src/ui/static/assets/TestPlansPage-Bno2vpGd.js +0 -5
- package/src/ui/static/assets/index-B0klHYbO.css +0 -1
- package/src/ui/static/assets/index-DtBWNlVD.js +0 -47
- package/src/ui/static/assets/useTestResults-Bm-JyMhB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,j as e,u as Ke}from"./vendor-react-CTbHBddL.js";import{r as Qe,w as Ye}from"./excel-BrxuVus5.js";import{au as et,av as tt,J as st}from"./useTestManagement-
|
|
1
|
+
import{r as z,j as e,u as Ke}from"./vendor-react-CTbHBddL.js";import{r as Qe,w as Ye}from"./excel-BrxuVus5.js";import{au as et,av as tt,J as st}from"./useTestManagement-Xm4Bcx3u.js";import{b as rt}from"./index-BYVxKLrT.js";import{h as ot}from"./aiHandoff-vhtR29Fh.js";import{a5 as te,a0 as ve,ah as it,bd as se,aI as ze,r as G,ap as Te,c9 as $e,g as Me,al as nt,S as Ne}from"./vendor-icons-BKPiFyYV.js";import"./vendor-excel-BFHGVHVC.js";import"./vendor-query-BrzmPFT3.js";const de=[{id:"json",label:"JSON",ext:"json",mime:"application/json",hint:"Everything, re-importable into Testver"},{id:"csv",label:"CSV",ext:"csv",mime:"text/csv",hint:"One row per case, re-importable into Testver"},{id:"xlsx",label:"Excel",ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",hint:"A Test cases sheet and a Steps sheet"},{id:"gherkin",label:"Gherkin",ext:"feature",mime:"text/plain",hint:"A BDD .feature file — Given / When / Then"},{id:"xray",label:"Xray CSV",ext:"csv",mime:"text/csv",hint:"Xray's Test Case Importer — one row per step"},{id:"testrail",label:"TestRail CSV",ext:"csv",mime:"text/csv",hint:"TestRail's CSV import — numbered steps"},{id:"zephyr",label:"Zephyr Scale CSV",ext:"csv",mime:"text/csv",hint:"Zephyr Scale's CSV import — one row per step"}];function at(n){return`"${String(n??"").replace(/\r\n?/g,`
|
|
2
2
|
`).replace(/"/g,'""')}"`}function oe(n){return n.map(o=>o.map(at).join(",")).join(`\r
|
|
3
3
|
`)}function Fe(n){const o=[];let i=[],t="",s=!1;const r=n.replace(/^/,""),a=()=>{i.push(t.trim()),t=""},d=()=>{a(),i.some(l=>l!=="")&&o.push(i),i=[]};for(let l=0;l<r.length;l++){const m=r[l];s?m==='"'?r[l+1]==='"'?(t+='"',l++):s=!1:t+=m:m==='"'&&t.trim()===""?s=!0:m===","?a():m===`
|
|
4
4
|
`||m==="\r"?(m==="\r"&&r[l+1]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as e,b as K}from"./vendor-react-CTbHBddL.js";import{a as q}from"./vendor-query-BrzmPFT3.js";import{u as C,d as M,e as Q}from"./useJiraConnector-
|
|
1
|
+
import{r as a,j as e,b as K}from"./vendor-react-CTbHBddL.js";import{a as q}from"./vendor-query-BrzmPFT3.js";import{u as C,d as M,e as Q}from"./useJiraConnector-D5ysBBvz.js";import{gG as _}from"./index-BYVxKLrT.js";import{a6 as S,X as B,a0 as R,_ as X}from"./vendor-icons-BKPiFyYV.js";const P=100;function V({ids:l,className:n,label:x}){const{isConfigured:o}=C(),[d,i]=a.useState(!1);return!o||l.length===0?null:e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>i(!0),title:"Create a Jira issue for each selected test case",className:n??"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg bg-surface-2 hover:bg-surface-3 text-blue-300 border border-white/10 transition-colors",children:[e.jsx(S,{size:14}),x??"Push to Jira"]}),d&&e.jsx(A,{ids:l,onClose:()=>i(!1)})]})}function A({ids:l,onClose:n}){var w;const x=q(),{connectorId:o,connector:d}=C(),{data:i,isLoading:E}=M(o),{data:m}=Q(o),J=(i==null?void 0:i.projects)??[],c=a.useMemo(()=>{const s=[...new Set(((m==null?void 0:m.types)??[]).filter(u=>!u.subtask).map(u=>String(u.name)))];return s.length?s:["Task"]},[m]),[h,L]=a.useState(((w=d==null?void 0:d.config)==null?void 0:w.defaultProject)??""),[p,g]=a.useState(""),[f,T]=a.useState(!1),[b,z]=a.useState(!1),[t,j]=a.useState(!1),[y,k]=a.useState(null),[r,F]=a.useState(null);a.useEffect(()=>{f||c.length===0||g(c.find(s=>s.toLowerCase()==="test")??c.find(s=>s.toLowerCase()==="task")??c[0])},[c,f]),a.useEffect(()=>{const s=u=>{u.key==="Escape"&&!t&&n()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,n]);const N=l.length>P;async function I(){j(!0),k(null);try{const s=await _({ids:l,projectKey:h,issueType:p,connectorId:o??void 0,force:b});F(s),x.invalidateQueries({queryKey:["tm-test-cases"]}),x.invalidateQueries({queryKey:["tm-test-case"]})}catch(s){k((s==null?void 0:s.message)||"Push failed")}finally{j(!1)}}const v="w-full bg-surface-2 border border-white/10 rounded-lg px-3 py-2 text-sm text-gray-200 focus:outline-none focus:ring-1 focus:ring-brand-500";return K.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jira-push-title",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>{t||n()}}),e.jsxs("div",{className:"relative w-full max-w-lg rounded-xl bg-surface-1 border border-white/10 p-5 shadow-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("h3",{id:"jira-push-title",className:"text-base font-semibold text-gray-100",children:["Push ",l.length," test case",l.length===1?"":"s"," to Jira"]}),e.jsx("button",{onClick:n,disabled:t,"aria-label":"Close",className:"text-gray-500 hover:text-gray-300",children:e.jsx(B,{size:16})})]}),r?e.jsxs("div",{className:"mt-3 space-y-3 text-sm",role:"status",children:[e.jsxs("p",{className:"text-gray-300",children:[r.pushed.length," created",r.skipped.length>0&&e.jsxs(e.Fragment,{children:[", ",r.skipped.length," already in Jira (skipped)"]}),r.failed.length>0&&e.jsxs(e.Fragment,{children:[", ",e.jsxs("span",{className:"text-red-400",children:[r.failed.length," failed"]})]}),"."]}),e.jsxs("ul",{className:"max-h-64 overflow-auto space-y-1",children:[[...r.pushed.map(s=>({...s,note:""})),...r.skipped.map(s=>({...s,note:"already pushed"}))].map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"text-blue-300 hover:underline inline-flex items-center gap-1 font-mono shrink-0",children:[s.key,e.jsx(X,{size:11})]}),e.jsx("span",{className:"text-gray-400 truncate",children:s.title}),s.note&&e.jsxs("span",{className:"text-gray-500 shrink-0",children:["· ",s.note]})]},s.id)),r.failed.map(s=>e.jsxs("li",{className:"text-xs text-red-400",children:[s.title||s.id,": ",s.error]},s.id))]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:n,className:"px-4 py-2 text-sm rounded-lg bg-brand-600 hover:bg-brand-500 text-white font-medium",children:"Done"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-gray-400 mt-2 leading-relaxed",children:"Each case becomes one issue: its title as the summary, and its preconditions, steps and requirements in the description. The issue is linked back on the case."}),N&&e.jsxs("p",{className:"text-sm text-amber-300 mt-2",children:["Push up to ",P," at a time — select fewer cases."]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"Project"}),e.jsxs("select",{value:h,onChange:s=>L(s.target.value),className:v,disabled:t,children:[e.jsx("option",{value:"",children:E?"Loading…":"Select a project…"}),J.map(s=>e.jsxs("option",{value:s.key,children:[s.key," — ",s.name]},s.key))]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"Issue type"}),e.jsx("select",{value:p,onChange:s=>{g(s.target.value),T(!0)},className:v,disabled:t,children:c.map(s=>e.jsx("option",{value:s,children:s},s))})]})]}),e.jsxs("label",{className:"flex items-center gap-2 mt-3 text-xs text-gray-400",children:[e.jsx("input",{type:"checkbox",checked:b,onChange:s=>z(s.target.checked),disabled:t}),"Push cases that were pushed before again (creates new issues)"]}),y&&e.jsx("p",{className:"text-sm text-red-400 mt-3",role:"alert",children:y}),e.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[e.jsx("button",{onClick:n,disabled:t,className:"px-4 py-2 text-sm rounded-lg bg-surface-2 hover:bg-surface-3 text-gray-300",children:"Cancel"}),e.jsxs("button",{onClick:I,disabled:t||!h||!p||N,className:"flex items-center gap-1.5 px-4 py-2 text-sm rounded-lg bg-blue-600 hover:bg-blue-500 text-white font-medium disabled:opacity-50",children:[t?e.jsx(R,{size:14,className:"animate-spin"}):e.jsx(S,{size:14}),t?"Pushing…":"Create issues"]})]})]})]})]}),document.body)}export{V as J};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./vendor-react-CTbHBddL.js";import{cx as N,dp as v,dq as w}from"./vendor-icons-BKPiFyYV.js";const f={good:"On target",warn:"Watch",bad:"Needs action"};function h(e){return e.toLocaleString(void 0,{maximumFractionDigits:1})}function $(e,s){return`${e>0?"+":""}${h(e)}${s??""}`}const D={good:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",warn:"bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",bad:"bg-rose-50 text-rose-700 dark:bg-rose-500/15 dark:text-rose-300"},g={good:"#059669",warn:"#d97706",bad:"#dc2626"};function E(e,s,n,o=3){const a=e.filter(r=>typeof r=="number"&&Number.isFinite(r));if(a.length<2)return"";const m=Math.min(...a),i=Math.max(...a),l=i-m||1;return a.map((r,d)=>`${(d*s/(a.length-1)).toFixed(1)},${(n-o-(r-m)/l*(n-2*o)).toFixed(1)}`).join(" ")}function L({cell:e}){const{title:s,value:n,unit:o,delta:a,deltaGood:m,hint:i,status:l}=e,r=typeof a=="number"&&Number.isFinite(a),d=e.deltaDirection??(r?a>0?"up":a<0?"down":"flat":void 0),u=m??"up",c=d==="flat"||a===0,p=d==="up"&&u==="up"||d==="down"&&u==="down",k=c?"text-gray-500 dark:text-gray-400":p?"text-emerald-700 dark:text-emerald-400":"text-rose-700 dark:text-rose-400",y=c?N:d==="up"?v:w,x=l&&f[l]?l:void 0,b=Array.isArray(e.trend)?E(e.trend,200,36,4):"",j=x?g[x]:c?"#94a3b8":p?g.good:g.bad;return t.jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] px-4 py-3.5 h-full flex flex-col","data-testid":"kpi-tile",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsx("div",{className:"text-[13px] font-medium text-gray-600 dark:text-gray-400 leading-snug",children:s}),x&&t.jsx("span",{className:`flex-shrink-0 rounded-full px-2 py-0.5 text-[11px] font-semibold ${D[x]}`,"data-testid":"kpi-status",children:f[x]})]}),t.jsxs("div",{className:"mt-1.5 flex items-baseline gap-1",children:[t.jsx("span",{className:"text-[28px] leading-tight font-bold tracking-tight text-gray-900 dark:text-gray-100 tabular-nums",children:typeof n=="number"?h(n):n}),o&&t.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-medium",children:o})]}),r&&t.jsxs("div",{className:`mt-1 flex items-center gap-1 text-[13px] font-semibold ${k}`,children:[t.jsx(y,{size:13,"aria-hidden":!0}),t.jsx("span",{className:"tabular-nums",children:$(a,o)}),i&&t.jsx("span",{className:"font-normal text-gray-500 dark:text-gray-400 ml-0.5 truncate",children:i})]}),!r&&i&&t.jsx("div",{className:"mt-1 text-[13px] text-gray-500 dark:text-gray-400",children:i}),b&&t.jsx("svg",{viewBox:"0 0 200 36",preserveAspectRatio:"none",className:"mt-auto pt-2 w-full h-9",role:"img","aria-label":`${s}: trend over ${e.trend.length} periods`,children:t.jsx("polyline",{points:b,fill:"none",stroke:j,strokeWidth:2,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round"})})]})}export{L as K,f as T,D as a,E as s};
|
package/src/ui/static/assets/{LiveExecutionView-BD0wE8sz.js → LiveExecutionView-D5BRe9jq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as e,L as M}from"./vendor-react-CTbHBddL.js";import{u as R}from"./vendor-query-BrzmPFT3.js";import{
|
|
1
|
+
import{r as a,j as e,L as M}from"./vendor-react-CTbHBddL.js";import{u as R}from"./vendor-query-BrzmPFT3.js";import{gs as V,dE as z}from"./index-BYVxKLrT.js";import{a0 as j,aU as F,X as O,aa as S,b9 as B,a9 as q}from"./vendor-icons-BKPiFyYV.js";function D(t,s=!0){return R({queryKey:["run-live",t],queryFn:()=>V(t),enabled:!!t&&s,refetchInterval:d=>{const r=d.state.data;return r&&(r.status!=="running"||r.provider!=="testver-grid")?!1:3e3},staleTime:2e3,retry:!1})}const G=8,w=new Set,v=new Set;function $(t){return w.has(t)?!0:w.size>=G?!1:(w.add(t),v.forEach(s=>s()),!0)}function T(t){w.delete(t)&&v.forEach(s=>s())}function K(t){return v.add(t),()=>{v.delete(t)}}const A="testver.liveView";function k(){try{return localStorage.getItem(A)!=="off"}catch{return!0}}function P(t){try{localStorage.setItem(A,t?"on":"off")}catch{}v.forEach(s=>s())}const C={chromium:"bg-emerald-400",firefox:"bg-orange-400",webkit:"bg-sky-400"};function U(t){if(!t)return"";const s=Math.max(0,Math.round((Date.now()-Date.parse(t))/1e3));return s<60?`${s}s`:`${Math.floor(s/60)}m ${s%60}s`}function L({session:t,index:s,compact:d=!1,onEnlarge:r}){const n=a.useRef(null),[u,o]=a.useState(!1),[x,f]=a.useState(document.visibilityState==="visible"),[i,m]=a.useState(!1),[h,y]=a.useState(!1),[l,g]=a.useState(0);a.useEffect(()=>{const c=n.current;if(!c)return;const b=new IntersectionObserver(([E])=>o(!!(E!=null&&E.isIntersecting)),{threshold:.2});return b.observe(c),()=>b.disconnect()},[]),a.useEffect(()=>{const c=()=>f(document.visibilityState==="visible");return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[]);const N=u&&x&&t.liveAvailable&&!h;a.useEffect(()=>{if(!N){m(!1);return}const c=$(t.sessionId);return m(c),()=>{c&&T(t.sessionId)}},[N,t.sessionId]),a.useEffect(()=>{const c=setInterval(()=>g(b=>b+1),1e3);return()=>clearInterval(c)},[]);const p=N&&i;return e.jsxs("div",{ref:n,className:`rounded-lg border border-white/5 bg-black/40 overflow-hidden flex flex-col ${d?"":"min-h-[180px]"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 bg-surface-2/60 border-b border-white/5 text-[11px]",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${C[t.browser]||"bg-gray-400"}`}),e.jsx("span",{className:"text-gray-200 capitalize font-medium",children:t.browser}),e.jsxs("span",{className:"text-gray-500",children:["worker ",s+1]}),e.jsxs("span",{className:"text-gray-600",children:["· ",t.provider==="hetzner"?"box":t.provider==="fly"?"Fly":""]}),t.liveAvailable?e.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 text-emerald-400",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," LIVE ",U(t.startedAt??t.createdAt)]}):e.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 text-amber-400",children:[e.jsx(j,{size:10,className:"animate-spin"})," starting"]}),r&&t.liveAvailable&&e.jsx("button",{onClick:()=>r(t),title:"Enlarge",className:"w-5 h-5 inline-flex items-center justify-center rounded text-gray-500 hover:text-gray-200 hover:bg-white/10",children:e.jsx(F,{size:11})})]}),e.jsx("div",{className:`relative flex-1 aspect-video bg-black ${r&&p?"cursor-zoom-in":""}`,onClick:()=>{r&&p&&r(t)},title:r&&p?"Click to enlarge":void 0,children:p?e.jsx("img",{src:z(t.sessionId),alt:`Live ${t.browser} session`,className:"absolute inset-0 w-full h-full object-contain",onError:()=>y(!0)}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-[11px] text-gray-500 px-3 text-center",children:h?"Live view is not available for this session — no display on the machine (evidence off), or an older image.":t.liveAvailable?x?i?"Scroll into view to watch":"Stream limit reached — close another live view to watch this one":"Paused while this tab is in the background":"Browser is starting…"})})]})}function I({session:t,onClose:s}){const[d,r]=a.useState(!1);return a.useEffect(()=>{const n=$(`${t.sessionId}:modal`);return()=>{n&&T(`${t.sessionId}:modal`)}},[t.sessionId]),a.useEffect(()=>{const n=u=>{u.key==="Escape"&&s()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[s]),e.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 flex items-center justify-center p-6",onClick:s,children:e.jsxs("div",{className:"w-full max-w-5xl rounded-xl border border-white/10 bg-surface-1 overflow-hidden",onClick:n=>n.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/5 text-sm",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${C[t.browser]||"bg-gray-400"}`}),e.jsx("span",{className:"text-gray-200 capitalize font-medium",children:t.browser}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] text-emerald-400",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," LIVE"]}),e.jsx("button",{onClick:s,className:"ml-auto w-7 h-7 inline-flex items-center justify-center rounded text-gray-400 hover:text-gray-100 hover:bg-white/10",title:"Close",children:e.jsx(O,{size:15})})]}),e.jsx("div",{className:"bg-black aspect-video",children:d?e.jsx("div",{className:"h-full flex items-center justify-center text-sm text-gray-500",children:"The session has ended — closing."}):e.jsx("img",{src:z(t.sessionId),alt:"Live session",className:"w-full h-full object-contain",onError:()=>{r(!0),setTimeout(s,1200)}})})]})})}function W({runId:t,layout:s="inline",className:d=""}){const{data:r}=D(t),[n,u]=a.useState(k()),[o,x]=a.useState(null);if(a.useEffect(()=>K(()=>u(k())),[]),a.useEffect(()=>{o&&!(r!=null&&r.sessions.some(l=>l.sessionId===o.sessionId&&l.liveAvailable))&&x(null)},[r,o]),!t||!r||r.provider!=="testver-grid")return null;const f=r.sessions,i=f.filter(l=>l.liveAvailable),m=r.status!=="running",h=()=>{P(!n),u(!n)};if(s==="strip")return m?null:e.jsxs("div",{className:`px-4 pb-2.5 pl-11 ${d}`,children:[n?i.length===0?e.jsxs("div",{className:"text-[11px] text-amber-400/90 inline-flex items-center gap-1.5",children:[e.jsx(j,{size:11,className:"animate-spin"})," Starting a browser on Testver Grid…"]}):e.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${Math.min(i.length,3)}, minmax(0, 240px))`},children:i.slice(0,3).map((l,g)=>e.jsx(L,{session:l,index:g,compact:!0,onEnlarge:x},l.sessionId))}):e.jsxs("button",{onClick:h,className:"text-[11px] text-gray-500 hover:text-gray-300 inline-flex items-center gap-1",children:[e.jsx(S,{size:11})," Show live browser"]}),o&&e.jsx(I,{session:o,onClose:()=>x(null)})]});const y=s==="panel"?i.length>1?2:1:Math.min(Math.max(i.length,1),2);return e.jsxs("div",{className:`${s==="panel"?"h-full flex flex-col":"rounded-xl border border-white/5 bg-surface-1 mb-3 w-full max-w-[560px]"} ${d}`,children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/5 flex-shrink-0",children:[e.jsx(B,{size:14,className:"text-emerald-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-200",children:"Testver Grid"}),r.browser&&e.jsx("span",{className:"text-xs text-gray-500 capitalize",children:r.browser}),m?e.jsx("span",{className:"text-xs text-gray-500",children:"· run finished"}):i.length>0?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-emerald-400",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," ",i.length," live browser",i.length===1?"":"s"]}):e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-amber-400",children:[e.jsx(j,{size:12,className:"animate-spin"})," starting a browser"]}),e.jsx("button",{onClick:h,title:n?"Hide live view (remembered)":"Show live view (remembered)",className:"ml-auto inline-flex items-center gap-1 text-[11px] text-gray-500 hover:text-gray-200",children:n?e.jsxs(e.Fragment,{children:[e.jsx(q,{size:12})," Hide"]}):e.jsxs(e.Fragment,{children:[e.jsx(S,{size:12})," Show live view"]})})]}),n&&e.jsxs("div",{className:`${s==="panel"?"flex-1 overflow-y-auto":""} p-3`,children:[m?e.jsxs("div",{className:"text-xs text-gray-500 px-1 py-2",children:["The browsers for this run have been released. "," ",e.jsx(M,{to:`/results?runId=${encodeURIComponent(t)}`,className:"text-cyan-400 hover:text-cyan-300",children:"Video and command log are in Results."})]}):i.length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-white/10 aspect-video flex flex-col items-center justify-center gap-2 text-center px-6",children:[e.jsx(j,{size:18,className:"text-amber-400 animate-spin"}),e.jsx("div",{className:"text-sm text-gray-300",children:"Starting a browser on Testver Grid"}),e.jsx("div",{className:"text-[11px] text-gray-500",children:"About 5 seconds on a ready machine, up to 40 seconds when a fresh one has to boot. The stream appears here the moment the browser is up."})]}):e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:`repeat(${y}, minmax(0, 1fr))`},children:i.map((l,g)=>e.jsx(L,{session:l,index:g,onEnlarge:x},l.sessionId))}),!m&&f.length>i.length&&e.jsxs("div",{className:"mt-2 text-[11px] text-gray-500",children:[f.length-i.length," more worker",f.length-i.length===1?"":"s"," starting…"]})]}),o&&e.jsx(I,{session:o,onClose:()=>x(null)})]})}export{W as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,b as m,j as e}from"./vendor-react-CTbHBddL.js";import{X as p}from"./vendor-icons-
|
|
1
|
+
import{r as x,b as m,j as e}from"./vendor-react-CTbHBddL.js";import{X as p}from"./vendor-icons-BKPiFyYV.js";function b({title:s,subtitle:o,icon:d,toolbar:i,footer:a,onClose:r,children:l}){return x.useEffect(()=>{const t=c=>{c.key==="Escape"&&r()};window.addEventListener("keydown",t);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",t),document.body.style.overflow=n}},[r]),m.createPortal(e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-3 sm:p-5",onClick:r,children:e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":s,className:"flex h-[92vh] w-[min(96vw,1680px)] flex-col overflow-hidden rounded-xl border border-white/10 bg-surface-1 shadow-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-white/5 px-4 py-2.5",children:[d,e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-gray-200",title:s,children:s}),o&&e.jsx("p",{className:"truncate text-[11px] text-gray-500",children:o})]}),i,e.jsx("button",{onClick:r,title:"Close (Esc)","aria-label":"Close",className:"ml-1 rounded-lg p-1.5 text-gray-500 transition-colors hover:bg-white/10 hover:text-gray-200",children:e.jsx(p,{size:18})})]}),e.jsx("div",{className:"relative min-h-0 flex-1",children:l}),a&&e.jsx("div",{className:"border-t border-white/5 px-4 py-1.5 text-[11px] text-gray-500",children:a})]})}),document.body)}export{b as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t}from"./vendor-react-CTbHBddL.js";import{y as P,z as S,A as I}from"./index-
|
|
1
|
+
import{r as o,j as t}from"./vendor-react-CTbHBddL.js";import{y as P,z as S,A as I}from"./index-BYVxKLrT.js";import{M as E}from"./MobileRunTarget-Bo_xekig.js";import{J as N,at as C}from"./vendor-icons-BKPiFyYV.js";const L={browserstack:"BrowserStack",saucelabs:"Sauce Labs",lambdatest:"LambdaTest","local-appium":"Local Devices"};function $({disabled:p,initial:e,compact:u=!1,onChange:y}){const[c,x]=o.useState([]),[l,f]=o.useState(!1),[s,n]=o.useState((e==null?void 0:e.cloudProvider)||""),[a,j]=o.useState({deviceName:(e==null?void 0:e.deviceName)||"",platformName:(e==null?void 0:e.platformName)==="iOS"?"iOS":"Android",platformVersion:(e==null?void 0:e.platformVersion)||"",appId:(e==null?void 0:e.appId)||"",appPath:(e==null?void 0:e.appPath)||""}),[h,g]=o.useState();o.useEffect(()=>{P().then(r=>x(r.providers.filter(d=>d.enabled&&d.id!=="testver-grid"))).catch(()=>x([])),S().then(({config:r})=>f(!!r.enabled)).catch(()=>f(!1))},[]),o.useEffect(()=>{s||(l?n("local-appium"):c.length>0&&n(c[0].id))},[l,c,s]),o.useEffect(()=>{if(!s){g(void 0);return}let r=!1;const d=()=>{I().then(w=>{if(r)return;const m=w.ticket;g(m&&!m.claimed&&Date.now()<m.expiresAt?m.sessionId:void 0)}).catch(()=>{})};d();const k=window.setInterval(d,5e3);return()=>{r=!0,window.clearInterval(k)}},[s]);const b=c.length===0&&!l;if(o.useEffect(()=>{const r=!!s&&!!a.deviceName&&(!!a.appId||!!a.appPath.trim()),d=s?{cloudProvider:s,deviceName:a.deviceName,platformName:a.platformName,platformVersion:a.platformVersion,appId:a.appId,appPath:a.appPath,reuseSessionId:h}:null;y({payload:d,active:!!s,blocked:b,ready:r})},[s,a,h,b]),b)return t.jsxs("div",{className:"mt-3 flex items-start gap-2.5 px-3.5 py-3 rounded-xl border border-amber-500/25 bg-amber-500/10 text-sm text-amber-700 dark:text-amber-200",children:[t.jsx(N,{size:15,className:"mt-0.5 flex-shrink-0 text-amber-600 dark:text-amber-300"}),t.jsxs("span",{children:["No device target available. To run this test, connect a local device or enable a cloud device grid in ",t.jsx("span",{className:"font-semibold",children:"Connectors"}),"."]})]});const v=u?"flex items-center gap-1 px-2.5 py-1 text-xs rounded-lg border transition-colors":"flex items-center gap-1.5 px-2.5 h-8 text-xs rounded-lg border transition-colors",i=12;return t.jsxs("div",{className:u?"space-y-2":"mt-3 space-y-2",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:`${u?"text-xs":"text-sm"} text-gray-400`,children:"Run on:"}),t.jsxs("div",{className:"flex gap-1.5 flex-wrap",children:[c.map(r=>t.jsxs("button",{onClick:()=>n(r.id),disabled:p,className:`${v} ${s===r.id?"border-blue-500/50 bg-blue-500/10 text-blue-300 font-medium":"border-white/5 bg-surface-2 text-gray-400 hover:text-gray-300 hover:border-white/10"} disabled:opacity-50`,children:[t.jsx(C,{size:i}),L[r.id]||r.id]},r.id)),l&&t.jsxs("button",{onClick:()=>n("local-appium"),disabled:p,className:`${v} ${s==="local-appium"?"border-gray-300 dark:border-white/25 bg-gray-100/70 dark:bg-white/[0.08] text-gray-800 dark:text-gray-100 font-medium":"border-white/5 bg-surface-2 text-gray-400 hover:text-gray-300 hover:border-white/10"} disabled:opacity-50`,children:[t.jsx(N,{size:i}),"Local Devices"]})]})]}),s&&t.jsx(E,{providerId:s,disabled:p,value:a,onChange:j})]})}export{$ as M};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,j as e}from"./vendor-react-CTbHBddL.js";import{T as O,bz as _,bA as V,U as B,S as E,X as H}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./vendor-react-CTbHBddL.js";import{T as O,bz as _,bA as V,U as B,S as E,X as H}from"./index-BYVxKLrT.js";import{J as M,_ as K,a0 as U,dh as X,y as J,ag as W,bd as Y}from"./vendor-icons-BKPiFyYV.js";import{a as z}from"./formatDate-T65-Y6Mi.js";import{S as q,L as G}from"./SearchableDevicePicker-BYxYJNWl.js";const P=1e3;function ae({testRunning:c,hideHeader:j=!1}){const[s,h]=i.useState(null),[x,A]=i.useState(null),[v,m]=i.useState(null),[N,w]=i.useState(null),[b,k]=i.useState(!1),[g,f]=i.useState(P),y=i.useRef(null),o=i.useRef(0),d=i.useRef(c);i.useEffect(()=>{d.current=c},[c]),i.useEffect(()=>{let l=!1;return O().then(p=>{l||h(p.session)}).catch(()=>{}),()=>{l=!0}},[]),i.useEffect(()=>{let l=!1;const p=async()=>{if(!l)try{const r=await _({timeoutMs:15e3,since:o.current||void 0});!l&&r.unchanged?m(null):l||(o.current=r.capturedAt||0,A(r.image),m(null),k(!!r.delayed),r.dashboardUrl&&w(r.dashboardUrl),f(d.current?500:P))}catch(r){!l&&V(r)?(m(null),f(P)):l||(m(r.message),f(Math.min(g*2,d.current?4e3:1e4)))}finally{l||(y.current=window.setTimeout(p,g))}};return p(),()=>{l=!0,y.current&&window.clearTimeout(y.current)}},[]);const S=!s;return e.jsxs("div",{className:"h-full flex flex-col bg-surface-1",children:[!j&&e.jsxs("div",{className:"px-3 py-2 border-b border-white/5 flex items-center gap-2",children:[e.jsx(M,{size:13,className:"text-indigo-300"}),e.jsx("span",{className:"text-xs font-medium text-gray-200",children:c?"Live Device — Execution view":"Live Device"}),s&&e.jsx("span",{className:"text-[10px] text-gray-500 truncate",children:s.device}),b&&x&&e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-400/80 border border-amber-500/20 flex-shrink-0",title:"Cloud preview frames are captured between test commands and are a few seconds behind the device. Use the provider link for their real-time view.",children:"~few sec behind"}),e.jsx("div",{className:"flex-1"}),((s==null?void 0:s.dashboardUrl)||N)&&e.jsxs("a",{href:(s==null?void 0:s.dashboardUrl)||N,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-indigo-300 hover:text-indigo-200",title:"Open the cloud provider's session view — their stream is real-time",children:["Live on provider ",e.jsx(K,{size:9})]})]}),e.jsx("div",{className:"flex-1 overflow-hidden relative flex items-center justify-center bg-black/40",children:S&&!c?e.jsxs("div",{className:"text-center px-4 py-8",children:[e.jsx(M,{size:28,className:"text-gray-600 mx-auto mb-2"}),e.jsx("p",{className:"text-xs text-gray-400",children:"No active mobile session"}),e.jsx("p",{className:"text-[10px] text-gray-600 mt-1",children:"Click Run to start a test (a device session opens automatically), or connect a device in AI Assistant."}),v&&e.jsx("p",{className:"text-[10px] text-red-400 mt-2",children:v})]}):x?e.jsx("img",{src:`data:image/png;base64,${x}`,alt:"Live device",className:"max-h-full max-w-full object-contain",style:c?{filter:"saturate(0.85) brightness(0.95)"}:void 0}):e.jsxs("div",{className:"flex flex-col items-center gap-2 text-xs text-gray-500 px-4 py-8 text-center",children:[e.jsx(U,{size:14,className:"animate-spin"}),e.jsx("span",{children:"Waiting for the test's device session…"}),e.jsx("span",{className:"text-[10px] text-gray-600",children:"First frame appears within a few seconds of session creation."})]})})]})}function ie({providerId:c,disabled:j,value:s,onChange:h}){const[x,A]=i.useState([]),[v,m]=i.useState(!1),[N,w]=i.useState(null),[b,k]=i.useState([]),[g,f]=i.useState(null),[y,o]=i.useState(!1),[d,S]=i.useState(!1),[l,p]=i.useState(null),r=i.useRef(null);i.useEffect(()=>{let t=!1;return m(!0),w(null),B(c).then(a=>{t||A(a.devices||[])}).catch(a=>{t||w(a.message)}).finally(()=>{t||m(!1)}),()=>{t=!0}},[c]),i.useEffect(()=>{let t=!1;return E().then(a=>{t||k(a.apps||[])}).catch(a=>{t||f(a.message)}),()=>{t=!0}},[]);const $=i.useMemo(()=>{if(!s.deviceName)return"";const t=x.find(a=>(a.rawDeviceKey===s.deviceName||a.name===s.deviceName)&&a.os===s.platformVersion);return t?t.id:""},[x,s.deviceName,s.platformVersion]),n=i.useMemo(()=>b.find(t=>t.id===s.appId)??null,[b,s.appId]),L=n?n.label||n.filename:s.appPath.trim()?s.appPath.trim():"Pick app or upload…",D=(()=>{if(n){const t=(n.size/1048576).toFixed(1),a=n.kind==="ipa"?"iOS":"Android",u=n.uploadedAt?z(n.uploadedAt):"";return[n.label||n.filename,n.filename,`${a} · ${t} MB${u?` · uploaded ${u}`:""}`].join(`
|
|
2
2
|
`)}return s.appPath.trim()?s.appPath.trim():"Pick app or upload…"})(),C=t=>{h({...s,deviceName:c==="local-appium"?t.rawDeviceKey:t.name,platformName:t.platform==="ios"?"iOS":"Android",platformVersion:t.os})},I=t=>{h({...s,appId:t.id,appPath:""}),o(!1)},R=()=>{h({...s,appId:"",appPath:""}),o(!1)},T=async t=>{S(!0),f(null),p(0);try{const a=await H(t,void 0,F=>p(F)),u=await E();k(u.apps||[]),h({...s,appId:a.id,appPath:""}),o(!1)}catch(a){f(a.message)}finally{S(!1),p(null),r.current&&(r.current.value="")}};return e.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap max-w-full min-w-0",children:[e.jsx("span",{title:"Mobile device target",className:"flex-shrink-0",children:e.jsx(M,{size:13,className:"text-indigo-400 dark:text-indigo-300"})}),e.jsx("div",{className:"flex-1 min-w-[13rem]",children:e.jsx(q,{devices:x,selectedId:$,onSelect:C,loading:v,disabled:j,errorText:N,placeholder:"Select a device…",emptyText:c==="local-appium"?G:void 0,variant:"compact"})}),e.jsxs("div",{className:"relative flex-1 min-w-[13rem]",children:[e.jsxs("button",{type:"button",disabled:j||d,onClick:()=>o(!y),title:`${D?D+`
|
|
3
3
|
|
|
4
4
|
`:""}Shared app library — apps uploaded in AI Assistant / AI Record appear here. Uploads are cached by SHA-256, so repeat runs skip re-upload.`,className:"w-full h-8 flex items-center justify-between gap-1.5 px-2.5 text-xs rounded-lg bg-white dark:bg-white/[0.04] border border-gray-200 dark:border-white/10 text-gray-800 dark:text-gray-200 hover:border-gray-300 dark:hover:border-white/20 transition-colors disabled:opacity-50",children:[e.jsxs("span",{className:"flex items-center gap-1.5 truncate min-w-0",children:[e.jsx(X,{size:11,className:`flex-shrink-0 ${n?"text-indigo-500 dark:text-indigo-300":"text-gray-500"}`}),e.jsx("span",{className:`truncate ${n||s.appPath.trim()?"":"text-gray-500"}`,children:d?`Uploading… ${l!==null?Math.round(l*100)+"%":""}`:L})]}),d?e.jsx(U,{size:11,className:"animate-spin flex-shrink-0 text-gray-500"}):e.jsx(J,{size:11,className:"flex-shrink-0 text-gray-500"})]}),y&&!d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-30",onClick:()=>o(!1)}),e.jsxs("div",{className:"absolute top-full left-0 mt-1 w-full max-h-72 bg-surface-1 border border-white/10 rounded-lg shadow-xl z-40 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[g&&e.jsx("div",{className:"px-3 py-2 text-xs text-red-300",children:g}),!g&&b.length===0&&e.jsx("div",{className:"px-3 py-2 text-xs text-gray-500",children:"No apps in the library yet — upload an .apk or .ipa below."}),b.map(t=>{const a=t.id===s.appId;return e.jsxs("button",{onClick:()=>I(t),title:`${t.label||t.filename}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,o as p,n as h,r as m}from"./vendor-react-CTbHBddL.js";import{u as g}from"./vendor-query-BrzmPFT3.js";import{g as j,L as b,B as u}from"./index-
|
|
1
|
+
import{j as e,o as p,n as h,r as m}from"./vendor-react-CTbHBddL.js";import{u as g}from"./vendor-query-BrzmPFT3.js";import{g as j,L as b,B as u}from"./index-BYVxKLrT.js";import{u as N,F as v,a as y}from"./FileViewer-CrKgh_cB.js";import{ao as F,t as w,F as k}from"./vendor-icons-BKPiFyYV.js";import{E as f}from"./EmptyState-D1T3JWUr.js";import"./RemoteFileStrip-WuRKtx_h.js";import"./index-DpQhqcHv.js";import"./useChartTheme-BFz2QcND.js";import"./sandboxStorage-BrzaG3ny.js";import"./simpleMarkdown-kWs-10D8.js";import"./formatDate-T65-Y6Mi.js";import"./UncommittedDiffViewer-BxS0zi-p.js";function E(s){return g({queryKey:["moduleFiles",s],queryFn:()=>j(s),enabled:!!s,staleTime:15e3})}function M({path:s,onNavigate:r}){const t=s.split("/").filter(Boolean);return e.jsxs("nav",{className:"flex items-center gap-1 text-xs text-gray-400 px-1 overflow-x-auto",children:[e.jsx("button",{onClick:()=>r(""),className:"hover:text-gray-200 flex-shrink-0",children:e.jsx(F,{size:13})}),t.map((n,o)=>{const i=t.slice(0,o+1).join("/");return e.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(w,{size:12,className:"text-gray-600"}),e.jsx("button",{onClick:()=>r(i),className:`hover:text-gray-200 truncate max-w-[120px] ${o===t.length-1?"text-gray-200 font-medium":""}`,children:n})]},i)})]})}function Q(){const{moduleId:s}=p(),{project:r}=h(),{data:t,isLoading:n}=E(s),{expanded:o,toggle:i}=N(),[c,x]=m.useState(null),l=r.modules.find(a=>a.id===s),d=m.useMemo(()=>t!=null&&t.files?t.files.map(a=>({name:a.name,path:a.path,type:"file",language:a.language})):[],[t]);return l?n?e.jsx(b,{text:`Loading ${l.label}...`}):e.jsxs("div",{className:"h-full flex flex-col animate-fade-in",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/5 bg-surface-1 flex-shrink-0",children:[e.jsx("h2",{className:"text-sm font-semibold text-gray-100",children:l.label}),e.jsx(u,{label:`${l.count} files`,color:"gray"}),e.jsx(u,{label:l.language,color:"blue"}),e.jsx("div",{className:"flex-1"}),e.jsx(M,{path:c??l.path,onNavigate:()=>x(null)})]}),e.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[e.jsx("div",{className:"w-64 border-r border-white/5 overflow-y-auto bg-surface-1 flex-shrink-0",children:d.length===0?e.jsx(f,{title:"No files",description:"This module has no source files",icon:e.jsx(k,{size:20})}):e.jsx("div",{className:"py-1",children:e.jsx(v,{nodes:d,expanded:o,selectedPath:c,onToggle:i,onSelect:x})})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(y,{filePath:c})})]})]}):e.jsx(f,{title:"Module not found",description:`No module with id "${s}"`})}export{Q as ModuleExplorer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as Te,r as l,j as e}from"./vendor-react-CTbHBddL.js";import{a as Re,u as te}from"./vendor-query-BrzmPFT3.js";import{a8 as Be,bE as qe,bF as He,bG as Ue,bH as ge,bI as Ge,bJ as Ke,bK as We,bL as fe}from"./index-DtBWNlVD.js";import{F as Je}from"./index-DpQhqcHv.js";import{u as Qe}from"./useChartTheme-BFz2QcND.js";import{w as Xe}from"./sandboxStorage-BrzaG3ny.js";import{c4 as M,b6 as xe,b8 as _e,b9 as ue,an as Ve,ap as Ye,c5 as Ze,as as et,t as tt,v as st,X as be,c6 as rt,c7 as at,c8 as lt,c9 as nt,R as it,a3 as O,l as ot,aO as se,S as ye,aN as je,g as me,aK as re,bh as ct,ca as dt,cb as xt,cc as ut,_ as mt,a9 as he}from"./vendor-icons-B0wLOBoh.js";const pe={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",json:"json",xml:"xml",html:"html",htm:"html",css:"css",py:"python",java:"java",rb:"ruby",go:"go",md:"markdown",yaml:"yaml",yml:"yaml",sql:"sql",txt:"plaintext",log:"plaintext",csv:"plaintext",feature:"plaintext"};function q(r,i=14){switch(r){case"png":case"jpg":case"jpeg":case"gif":case"webp":case"svg":case"bmp":return e.jsx(ut,{size:i,className:"text-purple-400"});case"mp4":case"webm":case"ogg":return e.jsx(xt,{size:i,className:"text-pink-400"});case"html":case"htm":return e.jsx(re,{size:i,className:"text-orange-400"});case"json":return e.jsx(dt,{size:i,className:"text-yellow-400"});case"xml":return e.jsx(re,{size:i,className:"text-cyan-400"});case"pdf":return e.jsx(me,{size:i,className:"text-red-400"});case"csv":case"xlsx":case"xls":return e.jsx(ct,{size:i,className:"text-emerald-400"});case"js":case"ts":case"jsx":case"tsx":case"py":case"java":case"rb":case"go":return e.jsx(re,{size:i,className:"text-blue-400"});case"log":case"txt":case"md":return e.jsx(me,{size:i,className:"text-gray-400"});default:return e.jsx(je,{size:i,className:"text-gray-500"})}}function H(r){return r===0?"0 B":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(1)} MB`:`${(r/(1024*1024*1024)).toFixed(1)} GB`}function ht(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function pt(r){return["png","jpg","jpeg","gif","webp","svg","bmp","mp4","webm","ogg","html","htm","json","xml","txt","log","csv","md","pdf","js","ts","jsx","tsx","py","java","rb","go","css","yaml","yml","feature"].includes(r)}function gt(r,i){if(!i)return r;const h=i.split("/");let x=r;for(const a of h){const c=x.find(o=>o.name===a&&o.type==="directory");if(!c||!c.children)return[];x=c.children}return x}function St(){const{subscribe:r}=Te(),i=Re(),{hasRole:h}=Be(),x=h("tester"),[a,c]=l.useState(null),[o,p]=l.useState(""),[b,w]=l.useState([""]),[N,F]=l.useState(0),[d,y]=l.useState(null),[n,$]=l.useState(""),[U,ve]=l.useState("name"),[G,we]=l.useState("asc"),[K,Ne]=l.useState(""),[D,ae]=l.useState("grid"),[W,ke]=l.useState(60),[le,L]=l.useState(!1),[I,J]=l.useState(null),[A,T]=l.useState(null),Q=l.useRef(!1),X=l.useRef(null),{data:_,isLoading:Ce,refetch:V}=te({queryKey:["output-folders"],queryFn:()=>qe(),staleTime:3e4}),S=(_==null?void 0:_.folders)||[];l.useEffect(()=>{!a&&S.length>0&&c(S[0].id)},[S,a]);const{data:u,isLoading:Fe,refetch:Se}=te({queryKey:["output-files",a,U,G,K],queryFn:()=>He(a,{sortBy:U,sortDir:G,filterExt:K||void 0}),enabled:!!a,staleTime:1e4}),{data:E}=te({queryKey:["output-search",n],queryFn:()=>Ue(n),enabled:n.length>=2,staleTime:5e3});l.useEffect(()=>r(t=>{if(t.type==="output-file-change"){const s=t.folderId;i.invalidateQueries({queryKey:["output-files",s]})}}),[r,i]);const g=l.useMemo(()=>u!=null&&u.files?gt(u.files,o):[],[u,o]),[j,z]=l.useState(-1);l.useEffect(()=>{z(-1)},[o,a]),l.useEffect(()=>{const t=s=>{var f,k,C,P,B;if(!g.length||((f=s.target)==null?void 0:f.tagName)==="INPUT"||((k=s.target)==null?void 0:k.tagName)==="TEXTAREA"||((C=s.target)==null?void 0:C.tagName)==="SELECT")return;const m=D==="grid"?Math.max(1,Math.floor((((B=(P=X.current)==null?void 0:P.querySelector("[data-grid]"))==null?void 0:B.clientWidth)||800)/100)):1;if(s.key==="ArrowRight")s.preventDefault(),z(v=>Math.min(v+1,g.length-1));else if(s.key==="ArrowLeft")s.preventDefault(),z(v=>Math.max(v-1,0));else if(s.key==="ArrowDown")s.preventDefault(),z(v=>Math.min(v+m,g.length-1));else if(s.key==="ArrowUp")s.preventDefault(),z(v=>Math.max(v-m,0));else if(s.key==="Enter"&&j>=0){s.preventDefault();const v=g[j];v&&ee(v)}else s.key==="Backspace"&&(s.preventDefault(),ce())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[g,j,D,o]);const ne=l.useRef(-1);l.useEffect(()=>{if(j>=0&&j!==ne.current&&j<g.length){const t=g[j];t&&t.type==="file"&&y(t)}ne.current=j},[j]);const Y=g.filter(t=>t.type==="file").length,Z=g.filter(t=>t.type==="directory").length,R=l.useCallback(t=>{p(t),y(null);const s=b.slice(0,N+1);s.push(t),w(s),F(s.length-1)},[b,N]),ie=N>0,oe=N<b.length-1,ze=()=>{if(!ie)return;const t=N-1;F(t),p(b[t]),y(null)},Ae=()=>{if(!oe)return;const t=N+1;F(t),p(b[t]),y(null)},ce=()=>{if(!o)return;const t=o.split("/");t.pop(),R(t.join("/"))},De=()=>R("");l.useEffect(()=>{p(""),w([""]),F(0),y(null)},[a]);const Le=l.useCallback(t=>{var P;t.preventDefault(),Q.current=!0;const s=t.clientX,m=W,f=((P=X.current)==null?void 0:P.offsetWidth)||window.innerWidth,k=B=>{if(!Q.current)return;const Ie=(s-B.clientX)/f*100;ke(Math.max(30,Math.min(70,m+Ie)))},C=()=>{Q.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",C)},[W]),Ee=async(t,s,m,f)=>{await Ke({label:t,path:s,isAbsolute:m,framework:f}),V(),L(!1)},Pe=async t=>{const s=S.find(m=>m.id===t);if(s){T(s);return}},Me=async()=>{A&&(await We(A.id),a===A.id&&c(null),T(null),V())},Oe=async(t,s)=>{await Ge(t,s),V(),J(null)},$e=t=>{a&&window.open(ge(a,t.path,!0),"_blank")},ee=t=>{t.type==="directory"?R(t.path):y(t)},de=l.useMemo(()=>{const t=S.find(f=>f.id===a),m=[{label:(t==null?void 0:t.label)||"Root",path:""}];if(o){const f=o.split("/");let k="";for(const C of f)k=k?`${k}/${C}`:C,m.push({label:C,path:k})}return m},[o,a,S]);return!Ce&&S.length===0&&!le?e.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-brand-500/20 to-cyan-500/20 border border-brand-500/20 mb-5",children:e.jsx(M,{size:30,className:"text-brand-400"})}),e.jsx("h2",{className:"text-xl font-semibold text-gray-200 mb-2",children:"Output Browser"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6 leading-relaxed",children:"Map your test output folders to browse reports, screenshots, videos, logs, and other artifacts right here."}),x?e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsxs("button",{onClick:()=>L(!0),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-medium text-white bg-brand-600 hover:bg-brand-500 transition-colors",children:[e.jsx(xe,{size:16})," Add Folder"]}),e.jsx(yt,{onDetect:t=>{t.length>0&&L(!0)}})]}):e.jsx("p",{className:"text-sm text-gray-500",children:"A tester or admin can map output folders."})]})}):e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsx("div",{className:"flex-shrink-0 border-b border-white/5 bg-surface-1",children:e.jsxs("div",{className:"flex items-center gap-1 px-4 pt-2 overflow-x-auto",children:[S.map(t=>e.jsxs("button",{onClick:()=>c(t.id),className:`group flex items-center gap-1.5 px-3.5 py-2.5 rounded-t-lg text-sm font-medium transition-all whitespace-nowrap ${a===t.id?"bg-surface-0 text-cyan-300 border border-white/5 border-b-transparent -mb-px":"text-gray-500 hover:text-gray-300 hover:bg-white/[0.03]"}`,children:[e.jsx(M,{size:14}),t.label,t.framework&&e.jsx("span",{className:"text-xs px-1 py-0.5 rounded bg-brand-500/10 text-brand-400",children:t.framework}),a===t.id&&x&&e.jsxs("div",{className:"flex items-center gap-0.5 ml-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:s=>{s.stopPropagation(),J(t)},className:"p-0.5 rounded text-gray-600 hover:text-sky-400",children:e.jsx(_e,{size:10})}),e.jsx("button",{onClick:s=>{s.stopPropagation(),Pe(t.id)},className:"p-0.5 rounded text-gray-600 hover:text-red-400",children:e.jsx(ue,{size:10})})]})]},t.id)),x&&e.jsxs("button",{onClick:()=>L(!0),className:"flex items-center gap-1 px-2.5 py-2 rounded-t-lg text-sm text-gray-600 hover:text-brand-400 hover:bg-brand-500/5 transition-colors",children:[e.jsx(xe,{size:13})," Add"]})]})}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-white/5 bg-surface-1/50",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:ze,disabled:!ie,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",children:e.jsx(Ve,{size:16})}),e.jsx("button",{onClick:Ae,disabled:!oe,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",children:e.jsx(Ye,{size:16})}),e.jsx("button",{onClick:ce,disabled:!o,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",title:"Up one level",children:e.jsx(Ze,{size:16})}),e.jsx("button",{onClick:De,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors",title:"Go to root",children:e.jsx(et,{size:15})})]}),e.jsx("div",{className:"flex-1 flex items-center gap-0.5 min-w-0 bg-surface-2 border border-white/5 rounded-lg px-3 py-1.5 overflow-x-auto",children:de.map((t,s)=>e.jsxs("span",{className:"flex items-center gap-0.5 flex-shrink-0",children:[s>0&&e.jsx(tt,{size:12,className:"text-gray-600"}),e.jsxs("button",{onClick:()=>R(t.path),className:`text-sm px-1 py-0.5 rounded hover:bg-white/5 transition-colors truncate max-w-[160px] ${s===de.length-1?"text-gray-200 font-medium":"text-gray-500 hover:text-gray-300"}`,children:[s===0&&e.jsx(M,{size:13,className:"inline mr-1 -mt-0.5 text-brand-400"}),t.label]})]},t.path))}),e.jsxs("div",{className:"relative w-48",children:[e.jsx(st,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-600"}),e.jsx("input",{value:n,onChange:t=>$(t.target.value),placeholder:"Search...",className:"w-full bg-surface-2 border border-white/5 rounded-lg pl-8 pr-3 py-1.5 text-sm text-gray-200 outline-none placeholder-gray-600 focus:border-brand-500/40 transition-colors"}),n&&e.jsx("button",{onClick:()=>$(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-gray-300",children:e.jsx(be,{size:12})})]}),e.jsxs("select",{value:U,onChange:t=>ve(t.target.value),className:"bg-surface-2 border border-white/5 rounded-lg px-2.5 py-1.5 text-sm text-gray-400 outline-none cursor-pointer",children:[e.jsx("option",{value:"name",children:"Name"}),e.jsx("option",{value:"date",children:"Date"}),e.jsx("option",{value:"size",children:"Size"}),e.jsx("option",{value:"type",children:"Type"})]}),e.jsx("button",{onClick:()=>we(t=>t==="asc"?"desc":"asc"),className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:G==="asc"?e.jsx(rt,{size:15}):e.jsx(at,{size:15})}),e.jsxs("select",{value:K,onChange:t=>Ne(t.target.value),className:"bg-surface-2 border border-white/5 rounded-lg px-2.5 py-1.5 text-sm text-gray-400 outline-none cursor-pointer",children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"png,jpg,jpeg,gif,webp,svg",children:"Images"}),e.jsx("option",{value:"mp4,webm",children:"Videos"}),e.jsx("option",{value:"html,htm",children:"HTML"}),e.jsx("option",{value:"json",children:"JSON"}),e.jsx("option",{value:"txt,log",children:"Logs"}),e.jsx("option",{value:"pdf",children:"PDF"})]}),e.jsxs("div",{className:"flex items-center rounded-lg border border-white/5 overflow-hidden",children:[e.jsx("button",{onClick:()=>ae("grid"),className:`p-1.5 transition-colors ${D==="grid"?"bg-brand-500/10 text-brand-400":"text-gray-600 hover:text-gray-300"}`,children:e.jsx(lt,{size:15})}),e.jsx("button",{onClick:()=>ae("list"),className:`p-1.5 transition-colors ${D==="list"?"bg-brand-500/10 text-brand-400":"text-gray-600 hover:text-gray-300"}`,children:e.jsx(nt,{size:15})})]}),e.jsx("button",{onClick:()=>Se(),className:"p-1.5 rounded-lg text-gray-500 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx(it,{size:15})})]}),e.jsxs("div",{ref:X,className:"flex-1 flex overflow-hidden",children:[e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden ",children:[n.length>=2&&(E!=null&&E.results)?e.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[e.jsxs("p",{className:"text-xs text-gray-500 mb-3",children:[E.results.length,' results for "',n,'"']}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2",children:E.results.map(t=>e.jsxs("button",{onClick:()=>{c(t.folderId),y(t)},className:"flex flex-col items-center gap-1.5 p-3 rounded-xl border border-transparent hover:border-white/10 hover:bg-white/[0.02] transition-all text-center group",children:[q(t.extension||"",28),e.jsx("span",{className:"text-xs text-gray-300 truncate w-full",children:t.name}),e.jsx("span",{className:"text-[11px] text-gray-600 truncate w-full",children:t.folderLabel})]},`${t.folderId}-${t.path}`))})]}):Fe?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(O,{size:24,className:"text-gray-600 animate-spin"})}):u!=null&&u.exists?g.length===0?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(se,{size:28,className:"text-gray-700 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-500",children:"This folder is empty"})]})}):D==="grid"?e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:e.jsx("div",{"data-grid":!0,className:"grid grid-cols-3 sm:grid-cols-5 md:grid-cols-7 lg:grid-cols-9 xl:grid-cols-10 gap-1",children:g.map((t,s)=>e.jsxs("button",{onClick:()=>{t.type==="file"&&z(s),ee(t)},onDoubleClick:()=>{t.type==="file"&&y(t)},className:`flex flex-col items-center gap-1 p-2.5 rounded-xl border transition-all text-center group ${j===s?"border-cyan-500/50 bg-cyan-500/10 ring-1 ring-cyan-500/30":(d==null?void 0:d.path)===t.path?"border-brand-500/40 bg-brand-500/10":"border-transparent hover:border-white/10 hover:bg-white/[0.02]"}`,children:[t.type==="directory"?e.jsx(se,{size:32,className:"text-blue-400"}):q(t.extension||"",32),e.jsx("span",{className:"text-xs text-gray-300 w-full leading-tight mt-0.5 line-clamp-2 break-all",title:t.name,children:t.name}),t.type==="file"&&t.size!==void 0&&e.jsx("span",{className:"text-[11px] text-gray-600 opacity-0 group-hover:opacity-100 transition-opacity",children:H(t.size)}),t.type==="directory"&&t.children&&e.jsxs("span",{className:"text-[11px] text-gray-600 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.children.length," items"]})]},t.path))})}):e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 flex items-center gap-3 px-4 py-2 bg-surface-1 border-b border-white/5 text-xs text-gray-500 font-medium",children:[e.jsx("span",{className:"flex-1 min-w-0",children:"Name"}),e.jsx("span",{className:"w-28 text-right",children:"Date Modified"}),e.jsx("span",{className:"w-20 text-right",children:"Type"}),e.jsx("span",{className:"w-20 text-right",children:"Size"})]}),e.jsx("div",{className:"divide-y divide-white/[0.02]",children:g.map((t,s)=>e.jsxs("button",{onClick:()=>{t.type==="file"&&z(s),ee(t)},className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors group ${j===s?"bg-cyan-500/10 border-l-2 border-l-cyan-500/50":(d==null?void 0:d.path)===t.path?"bg-brand-500/10":"hover:bg-white/[0.02]"}`,children:[e.jsxs("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[t.type==="directory"?e.jsx(se,{size:18,className:"text-blue-400 flex-shrink-0"}):q(t.extension||"",18),e.jsx("span",{className:"text-sm text-gray-200 truncate",children:t.name})]}),e.jsx("span",{className:"w-28 text-right text-xs text-gray-500",children:t.modified?ht(t.modified):""}),e.jsx("span",{className:"w-20 text-right text-xs text-gray-600 uppercase",children:t.type==="directory"?"Folder":t.extension||"—"}),e.jsx("span",{className:"w-20 text-right text-xs text-gray-500",children:t.type==="file"&&t.size!==void 0?H(t.size):""})]},t.path))})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(ot,{size:24,className:"text-amber-400 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Folder does not exist on disk"}),e.jsx("p",{className:"text-xs text-gray-600 mt-1 break-all",children:u==null?void 0:u.folderPath})]})}),e.jsx("div",{className:"flex-shrink-0 flex items-center justify-between px-4 py-1.5 border-t border-white/5 bg-surface-1 text-xs text-gray-500",children:e.jsxs("span",{children:[Z>0&&`${Z} folders`,Z>0&&Y>0&&", ",Y>0&&`${Y} files`,u?` — ${H(u.totalSize)}`:""]})})]}),d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-1 flex-shrink-0 bg-white/[0.02] hover:bg-brand-500/30 cursor-col-resize transition-colors",onMouseDown:Le}),e.jsx("div",{style:{width:`${W}%`},className:"flex-shrink-0 flex flex-col overflow-hidden border-l border-white/5",children:e.jsx(ft,{file:d,folderId:a,onDownload:()=>$e(d),onClose:()=>y(null)})})]})]}),(le||I)&&e.jsx(bt,{folder:I,onSave:(t,s,m,f)=>{I?Oe(I.id,{label:t,path:s}):Ee(t,s,m,f)},onClose:()=>{L(!1),J(null)}}),A&&e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",onClick:()=>T(null),children:e.jsxs("div",{className:"bg-surface-1 border border-white/10 rounded-2xl shadow-xl w-full max-w-md p-6",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-red-500/10 flex items-center justify-center flex-shrink-0",children:e.jsx(ue,{size:20,className:"text-red-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-200",children:"Delete Folder Mapping"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"This action cannot be undone"})]})]}),e.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Are you sure you want to remove the folder mapping?"}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-surface-2 border border-white/5 mb-5",children:[e.jsx(M,{size:15,className:"text-brand-400 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-gray-200 block truncate",children:A.label}),e.jsx("span",{className:"text-xs text-gray-500 block truncate font-mono",children:A.path})]})]}),e.jsx("p",{className:"text-xs text-gray-600 mb-5",children:"This will only remove the mapping from the dashboard. Your actual files on disk will not be deleted."}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("button",{onClick:()=>T(null),className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-gray-200 hover:bg-white/5 transition-colors",children:"Cancel"}),e.jsx("button",{onClick:Me,className:"px-4 py-2 rounded-lg text-sm font-medium text-white bg-red-600 hover:bg-red-500 transition-colors",children:"Delete"})]})]})})]})}function ft({file:r,folderId:i,onDownload:h,onClose:x}){const a=r.extension||"",c=ge(i,r.path),[o,p]=l.useState(null),[b,w]=l.useState(!1),{monacoTheme:N}=Qe();return l.useEffect(()=>{["json","xml","txt","log","csv","md","js","ts","jsx","tsx","py","java","rb","go","css","yaml","yml","feature","html","htm"].includes(a)?(w(!0),p(null),fetch(c).then(d=>d.text()).then(d=>{p(d),w(!1)}).catch(()=>{p(null),w(!1)})):p(null)},[r.path,a,c]),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-4 py-2.5 border-b border-white/5 bg-surface-1",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[q(a,16),e.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:r.name}),r.size!==void 0&&e.jsx("span",{className:"text-xs text-gray-500",children:H(r.size)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[a==="html"&&e.jsxs("button",{onClick:()=>window.open(c,"_blank"),className:"flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:[e.jsx(mt,{size:12})," Open"]}),e.jsxs("button",{onClick:h,className:"flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs text-gray-500 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:[e.jsx(he,{size:12})," Download"]}),e.jsx("button",{onClick:x,className:"p-1 rounded-lg text-gray-600 hover:text-gray-300 hover:bg-white/5 transition-colors",children:e.jsx(be,{size:14})})]})]}),e.jsxs("div",{className:"flex-1 overflow-auto bg-black/20",children:[["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a)&&e.jsx("div",{className:"flex items-center justify-center h-full p-6",children:e.jsx("img",{src:c,alt:r.name,className:"max-w-full max-h-full object-contain rounded-lg shadow-lg"})}),["mp4","webm","ogg"].includes(a)&&e.jsx("div",{className:"flex items-center justify-center h-full p-6",children:e.jsx("video",{src:c,controls:!0,className:"max-w-full max-h-full rounded-lg shadow-lg"})}),a==="pdf"&&e.jsx("embed",{src:c,type:"application/pdf",className:"w-full h-full"}),["html","htm"].includes(a)&&o!==null&&e.jsx("iframe",{srcDoc:Xe(o),sandbox:"allow-scripts",className:"w-full h-full bg-white",title:r.name}),pe[a]&&o!==null&&!["html","htm"].includes(a)&&e.jsx(Je,{value:a==="json"?(()=>{try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}})():o,language:pe[a]||"plaintext",theme:N,options:{readOnly:!0,minimap:{enabled:!1},fontSize:13,lineHeight:20,scrollBeyondLastLine:!1,wordWrap:"on",renderLineHighlight:"line",padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8},lineNumbers:"on",folding:!0,bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0}},loading:e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(O,{size:20,className:"text-gray-600 animate-spin"})})}),b&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(O,{size:20,className:"text-gray-600 animate-spin"})}),!pt(a)&&!b&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center",children:[e.jsx(je,{size:36,className:"text-gray-700 mx-auto mb-3"}),e.jsxs("p",{className:"text-sm text-gray-500 mb-3",children:["Preview not available for .",a," files"]}),e.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-white bg-brand-600 hover:bg-brand-500 transition-colors mx-auto",children:[e.jsx(he,{size:14})," Download File"]})]})})]})]})}function bt({folder:r,onSave:i,onClose:h}){const[x,a]=l.useState((r==null?void 0:r.label)||""),[c,o]=l.useState((r==null?void 0:r.path)||""),[p,b]=l.useState((r==null?void 0:r.isAbsolute)||!1),[w,N]=l.useState([]),[F,d]=l.useState(!1),y=async()=>{d(!0);try{const n=await fe();N(n.detected)}catch{}d(!1)};return e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",onClick:h,children:e.jsxs("div",{className:"bg-surface-1 border border-white/10 rounded-2xl shadow-xl w-full max-w-lg p-6",onClick:n=>n.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-200 mb-4",children:r?"Edit Folder Mapping":"Add Output Folder"}),!r&&e.jsxs("div",{className:"mb-4",children:[e.jsxs("button",{onClick:y,disabled:F,className:"flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium text-brand-300 bg-brand-500/10 border border-brand-500/20 hover:bg-brand-500/20 transition-colors disabled:opacity-50 w-full justify-center",children:[F?e.jsx(O,{size:14,className:"animate-spin"}):e.jsx(ye,{size:14}),"Auto-Detect Output Folders"]}),w.length>0&&e.jsx("div",{className:"mt-2 space-y-1 max-h-40 overflow-y-auto",children:w.map(n=>e.jsxs("button",{onClick:()=>{a(n.label),o(n.path),b(!1)},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-colors ${c===n.path?"bg-brand-500/10 border border-brand-500/30":"hover:bg-white/[0.03] border border-transparent"}`,children:[e.jsx(M,{size:15,className:n.exists?"text-emerald-400":"text-gray-600"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-gray-200 font-medium",children:n.label}),e.jsx("div",{className:"text-xs text-gray-500 truncate",children:n.path})]}),n.framework&&e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-400",children:n.framework}),e.jsx("span",{className:`text-xs ${n.exists?"text-emerald-400":"text-gray-600"}`,children:n.exists?"exists":"not found"})]},n.path))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-400 mb-1 block",children:"Label"}),e.jsx("input",{value:x,onChange:n=>a(n.target.value),placeholder:"e.g., Playwright Reports",className:"w-full bg-surface-2 border border-white/10 rounded-lg px-3 py-2 text-sm text-gray-200 outline-none focus:border-brand-500/40 placeholder-gray-600"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-400 mb-1 block",children:"Path"}),e.jsx("input",{value:c,onChange:n=>o(n.target.value),placeholder:"e.g., playwright-report",className:"w-full bg-surface-2 border border-white/10 rounded-lg px-3 py-2 text-sm text-gray-200 outline-none focus:border-brand-500/40 placeholder-gray-600 font-mono"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:p,onChange:n=>b(n.target.checked),className:"w-3.5 h-3.5 rounded border-white/10 bg-surface-2 text-brand-500"}),e.jsx("span",{className:"text-sm text-gray-400",children:"Absolute path (outside project directory)"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 mt-5",children:[e.jsx("button",{onClick:h,className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-gray-200 hover:bg-white/5 transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{var n;return i(x,c,p,(n=w.find($=>$.path===c))==null?void 0:n.framework)},disabled:!x.trim()||!c.trim(),className:"px-4 py-2 rounded-lg text-sm font-medium text-white bg-brand-600 hover:bg-brand-500 transition-colors disabled:opacity-30",children:r?"Save Changes":"Add Folder"})]})]})})}function yt({onDetect:r}){const[i,h]=l.useState(!1),x=async()=>{h(!0);try{const a=await fe();r(a.detected)}catch{}h(!1)};return e.jsxs("button",{onClick:x,disabled:i,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-medium text-gray-400 bg-surface-1 border border-white/10 hover:border-brand-500/30 hover:text-gray-200 transition-colors disabled:opacity-50",children:[i?e.jsx(O,{size:16,className:"animate-spin"}):e.jsx(ye,{size:16}),"Auto-Detect"]})}export{St as OutputPage};
|
|
1
|
+
import{n as Te,r as l,j as e}from"./vendor-react-CTbHBddL.js";import{a as Re,u as te}from"./vendor-query-BrzmPFT3.js";import{a8 as Be,bE as qe,bF as He,bG as Ue,bH as ge,bI as Ge,bJ as We,bK as Ke,bL as fe}from"./index-BYVxKLrT.js";import{F as Je}from"./index-DpQhqcHv.js";import{u as Qe}from"./useChartTheme-BFz2QcND.js";import{w as Xe}from"./sandboxStorage-BrzaG3ny.js";import{c3 as M,b4 as xe,b6 as _e,b7 as ue,aj as Ve,al as Ye,c4 as Ze,ao as et,t as tt,v as st,X as be,c5 as rt,c6 as at,c7 as lt,c8 as nt,R as it,a0 as I,l as ot,aM as se,S as ye,aL as je,g as me,aI as re,bg as ct,c9 as dt,ca as xt,cb as ut,_ as mt,a5 as he}from"./vendor-icons-BKPiFyYV.js";const pe={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",json:"json",xml:"xml",html:"html",htm:"html",css:"css",py:"python",java:"java",rb:"ruby",go:"go",md:"markdown",yaml:"yaml",yml:"yaml",sql:"sql",txt:"plaintext",log:"plaintext",csv:"plaintext",feature:"plaintext"};function q(r,i=14){switch(r){case"png":case"jpg":case"jpeg":case"gif":case"webp":case"svg":case"bmp":return e.jsx(ut,{size:i,className:"text-purple-400"});case"mp4":case"webm":case"ogg":return e.jsx(xt,{size:i,className:"text-pink-400"});case"html":case"htm":return e.jsx(re,{size:i,className:"text-orange-400"});case"json":return e.jsx(dt,{size:i,className:"text-yellow-400"});case"xml":return e.jsx(re,{size:i,className:"text-cyan-400"});case"pdf":return e.jsx(me,{size:i,className:"text-red-400"});case"csv":case"xlsx":case"xls":return e.jsx(ct,{size:i,className:"text-emerald-400"});case"js":case"ts":case"jsx":case"tsx":case"py":case"java":case"rb":case"go":return e.jsx(re,{size:i,className:"text-blue-400"});case"log":case"txt":case"md":return e.jsx(me,{size:i,className:"text-gray-400"});default:return e.jsx(je,{size:i,className:"text-gray-500"})}}function H(r){return r===0?"0 B":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(1)} MB`:`${(r/(1024*1024*1024)).toFixed(1)} GB`}function ht(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function pt(r){return["png","jpg","jpeg","gif","webp","svg","bmp","mp4","webm","ogg","html","htm","json","xml","txt","log","csv","md","pdf","js","ts","jsx","tsx","py","java","rb","go","css","yaml","yml","feature"].includes(r)}function gt(r,i){if(!i)return r;const h=i.split("/");let x=r;for(const a of h){const c=x.find(o=>o.name===a&&o.type==="directory");if(!c||!c.children)return[];x=c.children}return x}function St(){const{subscribe:r}=Te(),i=Re(),{hasRole:h}=Be(),x=h("tester"),[a,c]=l.useState(null),[o,p]=l.useState(""),[b,w]=l.useState([""]),[N,F]=l.useState(0),[d,y]=l.useState(null),[n,O]=l.useState(""),[U,ve]=l.useState("name"),[G,we]=l.useState("asc"),[W,Ne]=l.useState(""),[D,ae]=l.useState("grid"),[K,ke]=l.useState(60),[le,L]=l.useState(!1),[$,J]=l.useState(null),[A,T]=l.useState(null),Q=l.useRef(!1),X=l.useRef(null),{data:_,isLoading:Ce,refetch:V}=te({queryKey:["output-folders"],queryFn:()=>qe(),staleTime:3e4}),S=(_==null?void 0:_.folders)||[];l.useEffect(()=>{!a&&S.length>0&&c(S[0].id)},[S,a]);const{data:u,isLoading:Fe,refetch:Se}=te({queryKey:["output-files",a,U,G,W],queryFn:()=>He(a,{sortBy:U,sortDir:G,filterExt:W||void 0}),enabled:!!a,staleTime:1e4}),{data:E}=te({queryKey:["output-search",n],queryFn:()=>Ue(n),enabled:n.length>=2,staleTime:5e3});l.useEffect(()=>r(t=>{if(t.type==="output-file-change"){const s=t.folderId;i.invalidateQueries({queryKey:["output-files",s]})}}),[r,i]);const g=l.useMemo(()=>u!=null&&u.files?gt(u.files,o):[],[u,o]),[j,z]=l.useState(-1);l.useEffect(()=>{z(-1)},[o,a]),l.useEffect(()=>{const t=s=>{var f,k,C,P,B;if(!g.length||((f=s.target)==null?void 0:f.tagName)==="INPUT"||((k=s.target)==null?void 0:k.tagName)==="TEXTAREA"||((C=s.target)==null?void 0:C.tagName)==="SELECT")return;const m=D==="grid"?Math.max(1,Math.floor((((B=(P=X.current)==null?void 0:P.querySelector("[data-grid]"))==null?void 0:B.clientWidth)||800)/100)):1;if(s.key==="ArrowRight")s.preventDefault(),z(v=>Math.min(v+1,g.length-1));else if(s.key==="ArrowLeft")s.preventDefault(),z(v=>Math.max(v-1,0));else if(s.key==="ArrowDown")s.preventDefault(),z(v=>Math.min(v+m,g.length-1));else if(s.key==="ArrowUp")s.preventDefault(),z(v=>Math.max(v-m,0));else if(s.key==="Enter"&&j>=0){s.preventDefault();const v=g[j];v&&ee(v)}else s.key==="Backspace"&&(s.preventDefault(),ce())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[g,j,D,o]);const ne=l.useRef(-1);l.useEffect(()=>{if(j>=0&&j!==ne.current&&j<g.length){const t=g[j];t&&t.type==="file"&&y(t)}ne.current=j},[j]);const Y=g.filter(t=>t.type==="file").length,Z=g.filter(t=>t.type==="directory").length,R=l.useCallback(t=>{p(t),y(null);const s=b.slice(0,N+1);s.push(t),w(s),F(s.length-1)},[b,N]),ie=N>0,oe=N<b.length-1,ze=()=>{if(!ie)return;const t=N-1;F(t),p(b[t]),y(null)},Ae=()=>{if(!oe)return;const t=N+1;F(t),p(b[t]),y(null)},ce=()=>{if(!o)return;const t=o.split("/");t.pop(),R(t.join("/"))},De=()=>R("");l.useEffect(()=>{p(""),w([""]),F(0),y(null)},[a]);const Le=l.useCallback(t=>{var P;t.preventDefault(),Q.current=!0;const s=t.clientX,m=K,f=((P=X.current)==null?void 0:P.offsetWidth)||window.innerWidth,k=B=>{if(!Q.current)return;const $e=(s-B.clientX)/f*100;ke(Math.max(30,Math.min(70,m+$e)))},C=()=>{Q.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",C)},[K]),Ee=async(t,s,m,f)=>{await We({label:t,path:s,isAbsolute:m,framework:f}),V(),L(!1)},Pe=async t=>{const s=S.find(m=>m.id===t);if(s){T(s);return}},Me=async()=>{A&&(await Ke(A.id),a===A.id&&c(null),T(null),V())},Ie=async(t,s)=>{await Ge(t,s),V(),J(null)},Oe=t=>{a&&window.open(ge(a,t.path,!0),"_blank")},ee=t=>{t.type==="directory"?R(t.path):y(t)},de=l.useMemo(()=>{const t=S.find(f=>f.id===a),m=[{label:(t==null?void 0:t.label)||"Root",path:""}];if(o){const f=o.split("/");let k="";for(const C of f)k=k?`${k}/${C}`:C,m.push({label:C,path:k})}return m},[o,a,S]);return!Ce&&S.length===0&&!le?e.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-brand-500/20 to-cyan-500/20 border border-brand-500/20 mb-5",children:e.jsx(M,{size:30,className:"text-brand-400"})}),e.jsx("h2",{className:"text-xl font-semibold text-gray-200 mb-2",children:"Output Browser"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6 leading-relaxed",children:"Map your test output folders to browse reports, screenshots, videos, logs, and other artifacts right here."}),x?e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsxs("button",{onClick:()=>L(!0),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-medium text-white bg-brand-600 hover:bg-brand-500 transition-colors",children:[e.jsx(xe,{size:16})," Add Folder"]}),e.jsx(yt,{onDetect:t=>{t.length>0&&L(!0)}})]}):e.jsx("p",{className:"text-sm text-gray-500",children:"A tester or admin can map output folders."})]})}):e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsx("div",{className:"flex-shrink-0 border-b border-white/5 bg-surface-1",children:e.jsxs("div",{className:"flex items-center gap-1 px-4 pt-2 overflow-x-auto",children:[S.map(t=>e.jsxs("button",{onClick:()=>c(t.id),className:`group flex items-center gap-1.5 px-3.5 py-2.5 rounded-t-lg text-sm font-medium transition-all whitespace-nowrap ${a===t.id?"bg-surface-0 text-cyan-300 border border-white/5 border-b-transparent -mb-px":"text-gray-500 hover:text-gray-300 hover:bg-white/[0.03]"}`,children:[e.jsx(M,{size:14}),t.label,t.framework&&e.jsx("span",{className:"text-xs px-1 py-0.5 rounded bg-brand-500/10 text-brand-400",children:t.framework}),a===t.id&&x&&e.jsxs("div",{className:"flex items-center gap-0.5 ml-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:s=>{s.stopPropagation(),J(t)},className:"p-0.5 rounded text-gray-600 hover:text-sky-400",children:e.jsx(_e,{size:10})}),e.jsx("button",{onClick:s=>{s.stopPropagation(),Pe(t.id)},className:"p-0.5 rounded text-gray-600 hover:text-red-400",children:e.jsx(ue,{size:10})})]})]},t.id)),x&&e.jsxs("button",{onClick:()=>L(!0),className:"flex items-center gap-1 px-2.5 py-2 rounded-t-lg text-sm text-gray-600 hover:text-brand-400 hover:bg-brand-500/5 transition-colors",children:[e.jsx(xe,{size:13})," Add"]})]})}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-white/5 bg-surface-1/50",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:ze,disabled:!ie,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",children:e.jsx(Ve,{size:16})}),e.jsx("button",{onClick:Ae,disabled:!oe,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",children:e.jsx(Ye,{size:16})}),e.jsx("button",{onClick:ce,disabled:!o,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-gray-500",title:"Up one level",children:e.jsx(Ze,{size:16})}),e.jsx("button",{onClick:De,className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-200 hover:bg-white/5 transition-colors",title:"Go to root",children:e.jsx(et,{size:15})})]}),e.jsx("div",{className:"flex-1 flex items-center gap-0.5 min-w-0 bg-surface-2 border border-white/5 rounded-lg px-3 py-1.5 overflow-x-auto",children:de.map((t,s)=>e.jsxs("span",{className:"flex items-center gap-0.5 flex-shrink-0",children:[s>0&&e.jsx(tt,{size:12,className:"text-gray-600"}),e.jsxs("button",{onClick:()=>R(t.path),className:`text-sm px-1 py-0.5 rounded hover:bg-white/5 transition-colors truncate max-w-[160px] ${s===de.length-1?"text-gray-200 font-medium":"text-gray-500 hover:text-gray-300"}`,children:[s===0&&e.jsx(M,{size:13,className:"inline mr-1 -mt-0.5 text-brand-400"}),t.label]})]},t.path))}),e.jsxs("div",{className:"relative w-48",children:[e.jsx(st,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-600"}),e.jsx("input",{value:n,onChange:t=>O(t.target.value),placeholder:"Search...",className:"w-full bg-surface-2 border border-white/5 rounded-lg pl-8 pr-3 py-1.5 text-sm text-gray-200 outline-none placeholder-gray-600 focus:border-brand-500/40 transition-colors"}),n&&e.jsx("button",{onClick:()=>O(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-gray-300",children:e.jsx(be,{size:12})})]}),e.jsxs("select",{value:U,onChange:t=>ve(t.target.value),className:"bg-surface-2 border border-white/5 rounded-lg px-2.5 py-1.5 text-sm text-gray-400 outline-none cursor-pointer",children:[e.jsx("option",{value:"name",children:"Name"}),e.jsx("option",{value:"date",children:"Date"}),e.jsx("option",{value:"size",children:"Size"}),e.jsx("option",{value:"type",children:"Type"})]}),e.jsx("button",{onClick:()=>we(t=>t==="asc"?"desc":"asc"),className:"p-1.5 rounded-lg text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:G==="asc"?e.jsx(rt,{size:15}):e.jsx(at,{size:15})}),e.jsxs("select",{value:W,onChange:t=>Ne(t.target.value),className:"bg-surface-2 border border-white/5 rounded-lg px-2.5 py-1.5 text-sm text-gray-400 outline-none cursor-pointer",children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"png,jpg,jpeg,gif,webp,svg",children:"Images"}),e.jsx("option",{value:"mp4,webm",children:"Videos"}),e.jsx("option",{value:"html,htm",children:"HTML"}),e.jsx("option",{value:"json",children:"JSON"}),e.jsx("option",{value:"txt,log",children:"Logs"}),e.jsx("option",{value:"pdf",children:"PDF"})]}),e.jsxs("div",{className:"flex items-center rounded-lg border border-white/5 overflow-hidden",children:[e.jsx("button",{onClick:()=>ae("grid"),className:`p-1.5 transition-colors ${D==="grid"?"bg-brand-500/10 text-brand-400":"text-gray-600 hover:text-gray-300"}`,children:e.jsx(lt,{size:15})}),e.jsx("button",{onClick:()=>ae("list"),className:`p-1.5 transition-colors ${D==="list"?"bg-brand-500/10 text-brand-400":"text-gray-600 hover:text-gray-300"}`,children:e.jsx(nt,{size:15})})]}),e.jsx("button",{onClick:()=>Se(),className:"p-1.5 rounded-lg text-gray-500 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx(it,{size:15})})]}),e.jsxs("div",{ref:X,className:"flex-1 flex overflow-hidden",children:[e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden ",children:[n.length>=2&&(E!=null&&E.results)?e.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[e.jsxs("p",{className:"text-xs text-gray-500 mb-3",children:[E.results.length,' results for "',n,'"']}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2",children:E.results.map(t=>e.jsxs("button",{onClick:()=>{c(t.folderId),y(t)},className:"flex flex-col items-center gap-1.5 p-3 rounded-xl border border-transparent hover:border-white/10 hover:bg-white/[0.02] transition-all text-center group",children:[q(t.extension||"",28),e.jsx("span",{className:"text-xs text-gray-300 truncate w-full",children:t.name}),e.jsx("span",{className:"text-[11px] text-gray-600 truncate w-full",children:t.folderLabel})]},`${t.folderId}-${t.path}`))})]}):Fe?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(I,{size:24,className:"text-gray-600 animate-spin"})}):u!=null&&u.exists?g.length===0?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(se,{size:28,className:"text-gray-700 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-500",children:"This folder is empty"})]})}):D==="grid"?e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:e.jsx("div",{"data-grid":!0,className:"grid grid-cols-3 sm:grid-cols-5 md:grid-cols-7 lg:grid-cols-9 xl:grid-cols-10 gap-1",children:g.map((t,s)=>e.jsxs("button",{onClick:()=>{t.type==="file"&&z(s),ee(t)},onDoubleClick:()=>{t.type==="file"&&y(t)},className:`flex flex-col items-center gap-1 p-2.5 rounded-xl border transition-all text-center group ${j===s?"border-cyan-500/50 bg-cyan-500/10 ring-1 ring-cyan-500/30":(d==null?void 0:d.path)===t.path?"border-brand-500/40 bg-brand-500/10":"border-transparent hover:border-white/10 hover:bg-white/[0.02]"}`,children:[t.type==="directory"?e.jsx(se,{size:32,className:"text-blue-400"}):q(t.extension||"",32),e.jsx("span",{className:"text-xs text-gray-300 w-full leading-tight mt-0.5 line-clamp-2 break-all",title:t.name,children:t.name}),t.type==="file"&&t.size!==void 0&&e.jsx("span",{className:"text-[11px] text-gray-600 opacity-0 group-hover:opacity-100 transition-opacity",children:H(t.size)}),t.type==="directory"&&t.children&&e.jsxs("span",{className:"text-[11px] text-gray-600 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.children.length," items"]})]},t.path))})}):e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 flex items-center gap-3 px-4 py-2 bg-surface-1 border-b border-white/5 text-xs text-gray-500 font-medium",children:[e.jsx("span",{className:"flex-1 min-w-0",children:"Name"}),e.jsx("span",{className:"w-28 text-right",children:"Date Modified"}),e.jsx("span",{className:"w-20 text-right",children:"Type"}),e.jsx("span",{className:"w-20 text-right",children:"Size"})]}),e.jsx("div",{className:"divide-y divide-white/[0.02]",children:g.map((t,s)=>e.jsxs("button",{onClick:()=>{t.type==="file"&&z(s),ee(t)},className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors group ${j===s?"bg-cyan-500/10 border-l-2 border-l-cyan-500/50":(d==null?void 0:d.path)===t.path?"bg-brand-500/10":"hover:bg-white/[0.02]"}`,children:[e.jsxs("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[t.type==="directory"?e.jsx(se,{size:18,className:"text-blue-400 flex-shrink-0"}):q(t.extension||"",18),e.jsx("span",{className:"text-sm text-gray-200 truncate",children:t.name})]}),e.jsx("span",{className:"w-28 text-right text-xs text-gray-500",children:t.modified?ht(t.modified):""}),e.jsx("span",{className:"w-20 text-right text-xs text-gray-600 uppercase",children:t.type==="directory"?"Folder":t.extension||"—"}),e.jsx("span",{className:"w-20 text-right text-xs text-gray-500",children:t.type==="file"&&t.size!==void 0?H(t.size):""})]},t.path))})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(ot,{size:24,className:"text-amber-400 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Folder does not exist on disk"}),e.jsx("p",{className:"text-xs text-gray-600 mt-1 break-all",children:u==null?void 0:u.folderPath})]})}),e.jsx("div",{className:"flex-shrink-0 flex items-center justify-between px-4 py-1.5 border-t border-white/5 bg-surface-1 text-xs text-gray-500",children:e.jsxs("span",{children:[Z>0&&`${Z} folders`,Z>0&&Y>0&&", ",Y>0&&`${Y} files`,u?` — ${H(u.totalSize)}`:""]})})]}),d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-1 flex-shrink-0 bg-white/[0.02] hover:bg-brand-500/30 cursor-col-resize transition-colors",onMouseDown:Le}),e.jsx("div",{style:{width:`${K}%`},className:"flex-shrink-0 flex flex-col overflow-hidden border-l border-white/5",children:e.jsx(ft,{file:d,folderId:a,onDownload:()=>Oe(d),onClose:()=>y(null)})})]})]}),(le||$)&&e.jsx(bt,{folder:$,onSave:(t,s,m,f)=>{$?Ie($.id,{label:t,path:s}):Ee(t,s,m,f)},onClose:()=>{L(!1),J(null)}}),A&&e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",onClick:()=>T(null),children:e.jsxs("div",{className:"bg-surface-1 border border-white/10 rounded-2xl shadow-xl w-full max-w-md p-6",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-red-500/10 flex items-center justify-center flex-shrink-0",children:e.jsx(ue,{size:20,className:"text-red-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-200",children:"Delete Folder Mapping"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"This action cannot be undone"})]})]}),e.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Are you sure you want to remove the folder mapping?"}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-surface-2 border border-white/5 mb-5",children:[e.jsx(M,{size:15,className:"text-brand-400 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-gray-200 block truncate",children:A.label}),e.jsx("span",{className:"text-xs text-gray-500 block truncate font-mono",children:A.path})]})]}),e.jsx("p",{className:"text-xs text-gray-600 mb-5",children:"This will only remove the mapping from the dashboard. Your actual files on disk will not be deleted."}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("button",{onClick:()=>T(null),className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-gray-200 hover:bg-white/5 transition-colors",children:"Cancel"}),e.jsx("button",{onClick:Me,className:"px-4 py-2 rounded-lg text-sm font-medium text-white bg-red-600 hover:bg-red-500 transition-colors",children:"Delete"})]})]})})]})}function ft({file:r,folderId:i,onDownload:h,onClose:x}){const a=r.extension||"",c=ge(i,r.path),[o,p]=l.useState(null),[b,w]=l.useState(!1),{monacoTheme:N}=Qe();return l.useEffect(()=>{["json","xml","txt","log","csv","md","js","ts","jsx","tsx","py","java","rb","go","css","yaml","yml","feature","html","htm"].includes(a)?(w(!0),p(null),fetch(c).then(d=>d.text()).then(d=>{p(d),w(!1)}).catch(()=>{p(null),w(!1)})):p(null)},[r.path,a,c]),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-4 py-2.5 border-b border-white/5 bg-surface-1",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[q(a,16),e.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:r.name}),r.size!==void 0&&e.jsx("span",{className:"text-xs text-gray-500",children:H(r.size)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[a==="html"&&e.jsxs("button",{onClick:()=>window.open(c,"_blank"),className:"flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:[e.jsx(mt,{size:12})," Open"]}),e.jsxs("button",{onClick:h,className:"flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs text-gray-500 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:[e.jsx(he,{size:12})," Download"]}),e.jsx("button",{onClick:x,className:"p-1 rounded-lg text-gray-600 hover:text-gray-300 hover:bg-white/5 transition-colors",children:e.jsx(be,{size:14})})]})]}),e.jsxs("div",{className:"flex-1 overflow-auto bg-black/20",children:[["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a)&&e.jsx("div",{className:"flex items-center justify-center h-full p-6",children:e.jsx("img",{src:c,alt:r.name,className:"max-w-full max-h-full object-contain rounded-lg shadow-lg"})}),["mp4","webm","ogg"].includes(a)&&e.jsx("div",{className:"flex items-center justify-center h-full p-6",children:e.jsx("video",{src:c,controls:!0,className:"max-w-full max-h-full rounded-lg shadow-lg"})}),a==="pdf"&&e.jsx("embed",{src:c,type:"application/pdf",className:"w-full h-full"}),["html","htm"].includes(a)&&o!==null&&e.jsx("iframe",{srcDoc:Xe(o),sandbox:"allow-scripts",className:"w-full h-full bg-white",title:r.name}),pe[a]&&o!==null&&!["html","htm"].includes(a)&&e.jsx(Je,{value:a==="json"?(()=>{try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}})():o,language:pe[a]||"plaintext",theme:N,options:{readOnly:!0,minimap:{enabled:!1},fontSize:13,lineHeight:20,scrollBeyondLastLine:!1,wordWrap:"on",renderLineHighlight:"line",padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8},lineNumbers:"on",folding:!0,bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0}},loading:e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(I,{size:20,className:"text-gray-600 animate-spin"})})}),b&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(I,{size:20,className:"text-gray-600 animate-spin"})}),!pt(a)&&!b&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center",children:[e.jsx(je,{size:36,className:"text-gray-700 mx-auto mb-3"}),e.jsxs("p",{className:"text-sm text-gray-500 mb-3",children:["Preview not available for .",a," files"]}),e.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-white bg-brand-600 hover:bg-brand-500 transition-colors mx-auto",children:[e.jsx(he,{size:14})," Download File"]})]})})]})]})}function bt({folder:r,onSave:i,onClose:h}){const[x,a]=l.useState((r==null?void 0:r.label)||""),[c,o]=l.useState((r==null?void 0:r.path)||""),[p,b]=l.useState((r==null?void 0:r.isAbsolute)||!1),[w,N]=l.useState([]),[F,d]=l.useState(!1),y=async()=>{d(!0);try{const n=await fe();N(n.detected)}catch{}d(!1)};return e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",onClick:h,children:e.jsxs("div",{className:"bg-surface-1 border border-white/10 rounded-2xl shadow-xl w-full max-w-lg p-6",onClick:n=>n.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-200 mb-4",children:r?"Edit Folder Mapping":"Add Output Folder"}),!r&&e.jsxs("div",{className:"mb-4",children:[e.jsxs("button",{onClick:y,disabled:F,className:"flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium text-brand-300 bg-brand-500/10 border border-brand-500/20 hover:bg-brand-500/20 transition-colors disabled:opacity-50 w-full justify-center",children:[F?e.jsx(I,{size:14,className:"animate-spin"}):e.jsx(ye,{size:14}),"Auto-Detect Output Folders"]}),w.length>0&&e.jsx("div",{className:"mt-2 space-y-1 max-h-40 overflow-y-auto",children:w.map(n=>e.jsxs("button",{onClick:()=>{a(n.label),o(n.path),b(!1)},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-colors ${c===n.path?"bg-brand-500/10 border border-brand-500/30":"hover:bg-white/[0.03] border border-transparent"}`,children:[e.jsx(M,{size:15,className:n.exists?"text-emerald-400":"text-gray-600"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-gray-200 font-medium",children:n.label}),e.jsx("div",{className:"text-xs text-gray-500 truncate",children:n.path})]}),n.framework&&e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-brand-500/10 text-brand-400",children:n.framework}),e.jsx("span",{className:`text-xs ${n.exists?"text-emerald-400":"text-gray-600"}`,children:n.exists?"exists":"not found"})]},n.path))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-400 mb-1 block",children:"Label"}),e.jsx("input",{value:x,onChange:n=>a(n.target.value),placeholder:"e.g., Playwright Reports",className:"w-full bg-surface-2 border border-white/10 rounded-lg px-3 py-2 text-sm text-gray-200 outline-none focus:border-brand-500/40 placeholder-gray-600"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-400 mb-1 block",children:"Path"}),e.jsx("input",{value:c,onChange:n=>o(n.target.value),placeholder:"e.g., playwright-report",className:"w-full bg-surface-2 border border-white/10 rounded-lg px-3 py-2 text-sm text-gray-200 outline-none focus:border-brand-500/40 placeholder-gray-600 font-mono"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:p,onChange:n=>b(n.target.checked),className:"w-3.5 h-3.5 rounded border-white/10 bg-surface-2 text-brand-500"}),e.jsx("span",{className:"text-sm text-gray-400",children:"Absolute path (outside project directory)"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 mt-5",children:[e.jsx("button",{onClick:h,className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-gray-200 hover:bg-white/5 transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{var n;return i(x,c,p,(n=w.find(O=>O.path===c))==null?void 0:n.framework)},disabled:!x.trim()||!c.trim(),className:"px-4 py-2 rounded-lg text-sm font-medium text-white bg-brand-600 hover:bg-brand-500 transition-colors disabled:opacity-30",children:r?"Save Changes":"Add Folder"})]})]})})}function yt({onDetect:r}){const[i,h]=l.useState(!1),x=async()=>{h(!0);try{const a=await fe();r(a.detected)}catch{}h(!1)};return e.jsxs("button",{onClick:x,disabled:i,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-medium text-gray-400 bg-surface-1 border border-white/10 hover:border-brand-500/30 hover:text-gray-200 transition-colors disabled:opacity-50",children:[i?e.jsx(I,{size:16,className:"animate-spin"}):e.jsx(ye,{size:16}),"Auto-Detect"]})}export{St as OutputPage};
|