qpilot 0.7.2 → 0.8.0
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +16 -16
- package/.next/standalone/.next/app-path-routes-manifest.json +4 -4
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/api/run/[id]/answer/route.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/answer/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/pause/route.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/pause/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/shot/[num]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/shot/[num]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/stream/route.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/route.js +12 -6
- package/.next/standalone/.next/server/app/api/run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/route.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/page.js +3 -3
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/run/[id]/page.js +2 -2
- package/.next/standalone/.next/server/app/run/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/run/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +4 -4
- package/.next/standalone/.next/server/chunks/{231.js → 436.js} +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages/_error.js +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{839-27d93ad965dbd0b1.js → 662-486fc9b77e778f35.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/page-3594066f268efc88.js +1 -0
- package/.next/standalone/.next/static/chunks/app/run/[id]/page-9845eb00d24e56f6.js +1 -0
- package/.next/standalone/.next/static/css/87402b038fdc01b2.css +3 -0
- package/.next/standalone/package.json +1 -1
- package/.next/static/chunks/{839-27d93ad965dbd0b1.js → 662-486fc9b77e778f35.js} +1 -1
- package/.next/static/chunks/app/page-3594066f268efc88.js +1 -0
- package/.next/static/chunks/app/run/[id]/page-9845eb00d24e56f6.js +1 -0
- package/.next/static/css/87402b038fdc01b2.css +3 -0
- package/README.md +83 -85
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/app/page-639721bc5f624dcf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/run/[id]/page-dfa34b0aa5404c0e.js +0 -1
- package/.next/standalone/.next/static/css/d5da188841bb3394.css +0 -3
- package/.next/static/chunks/app/page-639721bc5f624dcf.js +0 -1
- package/.next/static/chunks/app/run/[id]/page-dfa34b0aa5404c0e.js +0 -1
- package/.next/static/css/d5da188841bb3394.css +0 -3
- /package/.next/standalone/.next/static/{lYOIrafs6s1OCjzehci17 → 7Bw_G-rpsXBIF0yjl7ISh}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{lYOIrafs6s1OCjzehci17 → 7Bw_G-rpsXBIF0yjl7ISh}/_ssgManifest.js +0 -0
- /package/.next/static/{lYOIrafs6s1OCjzehci17 → 7Bw_G-rpsXBIF0yjl7ISh}/_buildManifest.js +0 -0
- /package/.next/static/{lYOIrafs6s1OCjzehci17 → 7Bw_G-rpsXBIF0yjl7ISh}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,123 +1,121 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">qpilot</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<b>An AI agent that runs your manual test cases in a real browser.</b><br>
|
|
5
|
+
Paste plain text. Watch it click.
|
|
6
|
+
</p>
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://www.npmjs.com/package/qpilot"><img src="https://img.shields.io/npm/v/qpilot" alt="npm"></a>
|
|
10
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20.12-brightgreen" alt="node">
|
|
11
|
+
<img src="https://img.shields.io/badge/license-MIT-blue" alt="license">
|
|
12
|
+
<a href="https://github.com/broxhq/qpilot"><img src="https://img.shields.io/github/stars/broxhq/qpilot?style=social" alt="stars"></a>
|
|
13
|
+
</p>
|
|
9
14
|
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## How it works
|
|
15
|
-
|
|
16
|
-
1. You paste a plain-text test case
|
|
17
|
-
2. The agent opens Chrome and executes each step
|
|
18
|
-
3. You watch results appear live — `pass`, `fail`, or `warn` per step
|
|
19
|
-
4. If it hits a captcha or OTP, it pauses and asks you directly
|
|
20
|
-
|
|
21
|
-
No code. No Selenium. No config files.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Quick start
|
|
26
|
-
|
|
27
|
-
**Requirements:** Node.js 20.12+, Google Chrome, an [Anthropic API key](https://console.anthropic.com) — or any OpenAI-compatible model endpoint (Qwen, vLLM, Ollama, corporate gateway)
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="docs/assets/demo.gif" width="720" alt="Paste a test case, hit Run, watch live pass/fail per step">
|
|
17
|
+
</p>
|
|
28
18
|
|
|
29
19
|
```bash
|
|
30
20
|
npx qpilot
|
|
31
21
|
```
|
|
32
22
|
|
|
33
|
-
That's
|
|
23
|
+
That's the whole install. First launch walks you through picking a model, then opens
|
|
24
|
+
the UI in your browser.
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
**Needs:** Node.js 20.12+, Google Chrome, and an [Anthropic API key](https://console.anthropic.com)
|
|
27
|
+
— or any OpenAI-compatible endpoint (Qwen, vLLM, Ollama, a corporate gateway).
|
|
36
28
|
|
|
37
|
-
|
|
29
|
+
## How it works
|
|
38
30
|
|
|
39
|
-
|
|
31
|
+
1. Paste a plain-text test case — the messy kind a PM writes in Confluence is fine.
|
|
32
|
+
2. The agent opens Chrome and executes each step.
|
|
33
|
+
3. Results stream in live: `pass`, `fail` or `warn` per step, with evidence quoted
|
|
34
|
+
from the page and a screenshot on failure.
|
|
35
|
+
4. Hits an OTP or captcha? It pauses and asks you, then carries on.
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
There is no test code, no selectors and no config files. The agent reads the page
|
|
38
|
+
as an accessibility tree on every action, so nothing is stored that can go stale.
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
| | Manual testing | Scripted e2e | **qpilot** |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| To add a test | write the steps | write and maintain code | write the steps |
|
|
43
|
+
| Who can write it | anyone | someone who codes | anyone |
|
|
44
|
+
| After a redesign | a human adapts | update the test code | nothing to update |
|
|
45
|
+
| OTP / captcha | handled by the human | usually blocks the run | pauses and asks you |
|
|
46
|
+
| Output | you watched it | pass/fail | pass/fail/warn per step + evidence |
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **Anthropic (Claude)** — enter your `sk-ant-…` key. Default model is `claude-haiku-4-5`.
|
|
50
|
-
Base URL is optional — set it if you reach Claude through a corporate proxy/gateway.
|
|
51
|
-
- **Custom** — any **OpenAI-compatible** endpoint: Qwen, vLLM, Ollama, a corporate
|
|
52
|
-
gateway, OpenRouter, or OpenAI itself. You provide a **base URL**, **API token**
|
|
53
|
-
and **model id**, e.g.:
|
|
48
|
+
## Writing a test case
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
```
|
|
51
|
+
TC-001 — Login and add item to cart
|
|
52
|
+
URL: https://www.saucedemo.com/
|
|
53
|
+
Credentials: standard_user / secret_sauce
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
Steps:
|
|
56
|
+
1. Open the home page.
|
|
57
|
+
Expected: login form with Username and Password fields is visible.
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
2. Enter credentials and click Login.
|
|
60
|
+
Expected: Products page opens with 6 items.
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
3. Click "Add to cart" on "Sauce Labs Backpack".
|
|
63
|
+
Expected: cart counter shows 1.
|
|
64
|
+
```
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
No format is required — headings, numbering and "Expected:" lines are all optional.
|
|
67
|
+
The clearer the expected result, the stricter the check. Paste several test cases
|
|
68
|
+
at once and the agent runs them in order, grouped in the UI.
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
2. `.env.local` file in the current directory
|
|
70
|
+
## Attachments
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
Some steps need a file: an avatar to upload, a CSV to import, a PDF to attach.
|
|
73
|
+
Click **Attach files** before running, and the agent can hand them to any upload
|
|
74
|
+
control on the page — including the hidden `<input type=file>` behind a styled
|
|
75
|
+
"Choose file" button.
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
Files live only for the duration of the run and are deleted when it ends. The agent
|
|
78
|
+
can upload them, but never sees what is inside them.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
## A folder of test cases
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
**Choose folder** points qpilot at a directory of `.md` files. Tick the ones you
|
|
83
|
+
want and run them as a batch — one after another, with live status and timing, and
|
|
84
|
+
a **Stop** button. Finished runs land under **Recent runs**.
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|------|-------------|
|
|
84
|
-
| `qpilot config` | Re-run provider setup (Anthropic or custom model) |
|
|
85
|
-
| `--visible` | Show the Chrome window while the agent runs (also available in the start menu) |
|
|
86
|
+
## Models
|
|
86
87
|
|
|
87
88
|
```bash
|
|
88
|
-
npx qpilot --visible
|
|
89
89
|
npx qpilot config
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
TC-001 — Login and add item to cart
|
|
98
|
-
URL: https://www.saucedemo.com/
|
|
99
|
-
Credentials: standard_user / secret_sauce
|
|
92
|
+
- **Anthropic (Claude)** — paste your `sk-ant-…` key. Defaults to `claude-haiku-4-5`.
|
|
93
|
+
A base URL is optional, for reaching Claude through a corporate proxy.
|
|
94
|
+
- **Custom** — any OpenAI-compatible endpoint. Give it a base URL, token and model id:
|
|
100
95
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
```
|
|
97
|
+
Base URL: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
|
|
98
|
+
Model id: qwen2.5-72b-instruct
|
|
99
|
+
```
|
|
104
100
|
|
|
105
|
-
|
|
106
|
-
Expected: Products page opens with 6 items.
|
|
101
|
+
The model must support tool calling — that is how the agent drives the browser.
|
|
107
102
|
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
Your choice is saved to `~/.qpilot/config.json` (mode `600`). For the Anthropic
|
|
104
|
+
provider you can skip setup entirely with an `ANTHROPIC_API_KEY` env var or a
|
|
105
|
+
`.env.local` file.
|
|
110
106
|
|
|
111
|
-
|
|
112
|
-
Expected: cart contains Sauce Labs Backpack at $29.99.
|
|
113
|
-
```
|
|
107
|
+
## Good to know
|
|
114
108
|
|
|
115
|
-
|
|
109
|
+
- Everything runs locally. Nothing leaves your machine except the model calls, so
|
|
110
|
+
qpilot works against staging and internal networks.
|
|
111
|
+
- Browser visibility is per run: **Run** stays headless, **Run with preview** lets
|
|
112
|
+
you watch Chrome work.
|
|
113
|
+
- Runs are held in memory, last 50 only — restarting the server clears them.
|
|
114
|
+
- A genuinely broken page still fails the run. That is the point.
|
|
116
115
|
|
|
117
116
|
---
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
- Powered by [Claude](https://anthropic.com) + [Playwright](https://playwright.dev)
|
|
118
|
+
<p align="center">
|
|
119
|
+
Built with <a href="https://www.anthropic.com">Claude</a> and <a href="https://playwright.dev">Playwright</a>.<br>
|
|
120
|
+
If qpilot saved you time, a <a href="https://github.com/broxhq/qpilot">⭐ on GitHub</a> helps more than you'd think.
|
|
121
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2324:(e,t,n)=>{Promise.resolve().then(n.bind(n,6732))},5016:(e,t,n)=>{"use strict";n.d(t,{cn:()=>r});var a=n(2821),s=n(5889);function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,a.$)(t))}},6329:(e,t,n)=>{"use strict";function a(e){return"data:image/svg+xml,".concat(encodeURIComponent(e))}function s(e){let t=document.querySelector('link[rel="icon"]');t||(t=Object.assign(document.createElement("link"),{rel:"icon"}),document.head.appendChild(t)),t.href=e}function r(e){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">'.concat(e,"</svg>")}n.d(t,{O:()=>u,g:()=>h});let i=Array.from({length:10},(e,t)=>{let n=t/10*Math.PI*2-Math.PI/2,s=.65*Math.PI,i=12+10*Math.cos(n),o=12+10*Math.sin(n),l=12+10*Math.cos(n+s),d=12+10*Math.sin(n+s);return a(r('<circle cx="12" cy="12" r="10" stroke="#38bdf8" stroke-width="2.5" fill="none" opacity="0.15"/>'+'<path d="M'.concat(i.toFixed(3)," ").concat(o.toFixed(3)," A10 10 0 0 1 ").concat(l.toFixed(3)," ").concat(d.toFixed(3),'" stroke="#38bdf8" stroke-width="2.5" fill="none" stroke-linecap="round"/>')))}),o={passed:a(r('<circle cx="12" cy="12" r="10" fill="#22c55e"/><path d="M7 12.5l3.5 3.5 6.5-7" stroke="white" stroke-width="2.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>')),failed:a(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),error:a(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),waiting:a(r('<circle cx="12" cy="12" r="10" fill="#facc15"/><path d="M12 7v5.5l3 3" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>')),paused:a(r('<circle cx="12" cy="12" r="10" fill="#64748b"/><path d="M9 8v8M15 8v8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),default:a(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="'.concat(e,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">').concat('<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>').concat(t,"</svg>")}("white"))},l=null,d=0;function c(){l&&(clearInterval(l),l=null)}function u(e){var t;if(c(),"running"===e){d=0,s(i[0]),l=setInterval(()=>{s(i[d=(d+1)%10])},100);return}s(null!=(t=o[e])?t:o.default)}function h(){c(),s(o.default)}},6732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var a=n(5155),s=n(7260),r=n(2115),i=n(2619),o=n.n(i),l=n(6479);let d=(0,l.A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),c=(0,l.A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),u=(0,l.A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var h=n(4788);let x=(0,l.A)("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),m=(0,l.A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),p=(0,l.A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var f=n(9746);let g=(0,l.A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var v=n(3916);let b=(0,l.A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var k=n(5352),w=n(8215),y=n(3410),j=n(7003),N=n(5016);function z(e){let{className:t,...n}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,N.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...n})}var M=n(6329);let S=new Set(["running","waiting","paused"]),A="",C=[],_=null,E=new Set,I=[],D=!1,R=!1,P=null,F=null,$=null;function O(){let e=(0,s.useRouter)(),t=(0,r.useRef)(null),n=(0,r.useRef)(null),i=(0,r.useRef)(null),l=(0,r.useRef)(null),[k,w]=(0,r.useState)(A),[y,O]=(0,r.useState)(!1),[T,V]=(0,r.useState)(null),[B,U]=(0,r.useState)(!1),[W,J]=(0,r.useState)(!1),[K,Q]=(0,r.useState)(!1),[Y,Z]=(0,r.useState)(C),[G,X]=(0,r.useState)(_),[ee,et]=(0,r.useState)([]),[en,ea]=(0,r.useState)(E),[es,er]=(0,r.useState)(I),[ei,eo]=(0,r.useState)(D),[el,ed]=(0,r.useState)(()=>Date.now());function ec(e){A=e,w(e)}function eu(e){E=e,ea(e)}function eh(e){let t="function"==typeof e?e(I):e;I=t,er([...t])}async function ex(e){var t;ec(await e.file.text()),_=t=e.name,X(t)}async function em(e,t){let n=await fetch("/api/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:e,headless:t})}),a=await n.json();if(!n.ok)throw Error(a.error||"error");return a.id}async function ep(t){if(k.trim()){O(!0),V(null);try{let n=await em(k,t);e.push("/run/".concat(n))}catch(e){V(e instanceof Error?e.message:String(e)),O(!1)}}}async function ef(){R=!0;let e=P;e&&fetch("/api/run/".concat(e,"/pause"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"pause"})}).catch(()=>{})}async function eg(e){let t=Y.filter(e=>en.has(e.name));if(!t.length)return;let n=t.map(e=>({file:e,id:null,status:"queued"}));eh(n),D=!0,eo(!0),R=!1,P=null,F=Date.now(),$=null;for(let t=0;t<n.length;t++){if(R){eh(e=>e.map((e,n)=>n>=t?{...e,status:"skipped"}:e));break}let a=Date.now();eh(e=>e.map((e,n)=>n===t?{...e,status:"running",startedAt:a}:e));try{let a=await n[t].file.file.text(),s=await em(a,e);P=s,eh(e=>e.map((e,n)=>n===t?{...e,id:s}:e));let r=await function(e){return new Promise(t=>{let n=new EventSource("/api/run/".concat(e,"/stream")),a=setInterval(()=>{R&&(clearInterval(a),n.close(),t("paused"))},150);n.onmessage=e=>{var s;let r=null==(s=JSON.parse(e.data).run)?void 0:s.status;if(R){clearInterval(a),n.close(),t("paused");return}r&&!S.has(r)&&(clearInterval(a),n.close(),t(r))},n.onerror=()=>{clearInterval(a),n.close(),t("error")}})}(s),i=Date.now();if(eh(e=>e.map((e,n)=>n===t?{...e,status:r,finishedAt:i}:e)),R){eh(e=>e.map((e,n)=>n>t?{...e,status:"skipped"}:e));break}}catch(e){eh(e=>e.map((e,n)=>n===t?{...e,status:"error",finishedAt:Date.now()}:e))}}P=null,$=Date.now(),D=!1,eo(!1),fetch("/api/runs").then(e=>e.ok?e.json():[]).then(et).catch(()=>{})}(0,r.useEffect)(()=>{if(!ei)return;let e=setInterval(()=>ed(Date.now()),1e3);return()=>clearInterval(e)},[ei]),(0,r.useEffect)(()=>{fetch("/api/runs").then(e=>e.ok?e.json():[]).then(et).catch(()=>{})},[]),(0,r.useEffect)(()=>{let e=l.current;e&&Q(e.scrollHeight>364)},[k]),(0,r.useEffect)(()=>{if(!D)return;let e=setInterval(()=>{er([...I]),eo(D),D||clearInterval(e)},200);return()=>clearInterval(e)},[]),(0,r.useEffect)(()=>{if(ei)(0,M.O)("running");else if(I.length>0){let e=I.some(e=>"failed"===e.status||"error"===e.status),t=I.every(e=>"passed"===e.status);(0,M.O)(e?"failed":t?"passed":"default")}},[ei]),(0,r.useEffect)(()=>()=>{(0,M.g)()},[]);let ev=en.size,eb=Y.length>0&&en.size===Y.length,ek=ev>0,ew=Y.length>0&&!ek,ey=Y.length>0?"max-w-3xl":"max-w-2xl";return(0,a.jsxs)("main",{className:"flex flex-col items-center min-h-screen px-6 pt-20 pb-24",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-11 rounded-2xl border border-white/10 bg-white/5 mb-6 shadow-lg",children:(0,a.jsx)(d,{className:"size-5 text-foreground/80"})}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight mb-2",children:"QA Agent"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-10",children:"Paste a test case. Watch it run."}),(0,a.jsxs)("div",{className:(0,N.cn)("w-full space-y-3",ey),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{ref:i,type:"file",webkitdirectory:"",multiple:!0,className:"hidden",onChange:function(e){var t;let n=Array.from(null!=(t=e.target.files)?t:[]).filter(e=>e.name.endsWith(".md")).map(e=>({name:e.webkitRelativePath||e.name,file:e}));n.sort((e,t)=>e.name.localeCompare(t.name)),C=n,Z(n),_=null,X(null),eu(new Set),eh([]),e.target.value=""}}),(0,a.jsx)("input",{ref:n,type:"file",accept:".md,text/markdown",className:"hidden",onChange:function(e){var t;let n=null==(t=e.target.files)?void 0:t[0];if(!n)return;let a=new FileReader;a.onload=e=>{var t;"string"==typeof(null==(t=e.target)?void 0:t.result)&&ec(e.target.result)},a.readAsText(n,"utf-8"),e.target.value=""}}),(0,a.jsxs)(j.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{var e;return null==(e=i.current)?void 0:e.click()},className:"gap-2 text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(c,{className:"size-4"}),"Choose folder"]}),(0,a.jsxs)(j.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{var e;return null==(e=n.current)?void 0:e.click()},className:"gap-2 text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(u,{className:"size-4"}),"Upload .md"]}),Y.length>0&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:[Y.length," .md file",1!==Y.length?"s":""," found"]}),Y.length>0&&(0,a.jsx)(j.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{var e;C=e=[],Z(e),_=null,X(null),eu(new Set),eh([])},className:"ml-auto text-muted-foreground hover:text-foreground p-1 h-auto",children:(0,a.jsx)(h.A,{className:"size-3.5"})})]}),(0,a.jsxs)("div",{className:(0,N.cn)(ew&&"flex gap-4 items-start"),children:[Y.length>0&&(0,a.jsxs)("div",{className:(0,N.cn)(ew?"w-64 shrink-0":"w-full","space-y-3"),children:[(0,a.jsxs)("ul",{className:"rounded-xl border border-white/7 divide-y divide-white/5 overflow-hidden",children:[(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 bg-white/[0.02]",children:[(0,a.jsxs)("button",{type:"button",onClick:function(){eu(en.size===Y.length?new Set:new Set(Y.map(e=>e.name)))},className:"flex items-center gap-2 shrink-0 text-muted-foreground/50 hover:text-foreground transition-colors",children:[eb?(0,a.jsx)(x,{className:"size-4 text-foreground/70"}):(0,a.jsx)(m,{className:"size-4"}),(0,a.jsx)("span",{className:"text-[11px] text-muted-foreground/70 select-none",children:ev>0?"".concat(ev," selected"):"Select all"})]}),ev>0&&!ei&&(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-1.5",children:[(0,a.jsxs)(j.$,{type:"button",size:"sm",className:"h-7 gap-1.5 text-xs font-medium",onClick:()=>eg(!0),children:[(0,a.jsx)(p,{className:"size-3.5"}),"Run ",ev]}),(0,a.jsxs)(j.$,{type:"button",size:"sm",variant:"secondary",className:"h-7 gap-1.5 text-xs",onClick:()=>eg(!1),children:[(0,a.jsx)(p,{className:"size-3.5"}),"With preview"]})]}),ei&&(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,a.jsx)(f.A,{className:"size-3.5 text-muted-foreground/50 animate-spin"}),(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:ef,children:"Stop"})]})]})}),Y.map(e=>(0,a.jsxs)("li",{className:"flex items-center",children:[(0,a.jsx)("button",{type:"button",onClick:()=>(function(e){let t=new Set(en);t.has(e)?t.delete(e):t.add(e),eu(t)})(e.name),className:"shrink-0 px-4 py-2.5 text-muted-foreground/50 hover:text-foreground transition-colors",children:en.has(e.name)?(0,a.jsx)(x,{className:"size-4 text-foreground/70"}):(0,a.jsx)(m,{className:"size-4"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ex(e),className:(0,N.cn)("flex-1 text-left py-2.5 pr-4 text-sm font-mono transition-colors truncate",G===e.name?"text-foreground":"text-muted-foreground hover:text-foreground"),children:e.name})]},e.name))]}),es.length>0&&(0,a.jsxs)("div",{className:"rounded-xl border border-white/7 overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-4 py-2.5 bg-white/[0.02] flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/40",children:"Batch run"}),F&&(0,a.jsx)("span",{className:"ml-auto text-[11px] font-mono tabular-nums text-muted-foreground/40",children:H((null!=$?$:el)-F)})]}),(0,a.jsx)("ul",{className:"divide-y divide-white/5",children:es.map((e,t)=>{var n;return(0,a.jsxs)("li",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,a.jsx)(L,{status:e.status}),e.id?(0,a.jsx)(o(),{href:"/run/".concat(e.id),className:"flex-1 min-w-0 text-sm font-mono text-foreground/70 hover:text-foreground truncate transition-colors",children:e.file.name}):(0,a.jsx)("span",{className:"flex-1 min-w-0 text-sm font-mono text-muted-foreground/40 truncate",children:e.file.name}),(0,a.jsx)("span",{className:"shrink-0 text-[11px] font-mono tabular-nums text-muted-foreground/30",children:e.startedAt?H((null!=(n=e.finishedAt)?n:"running"===e.status?el:e.startedAt)-e.startedAt):""}),"queued"!==e.status&&"running"!==e.status&&"skipped"!==e.status&&(0,a.jsx)("span",{className:(0,N.cn)("shrink-0 text-[10.5px] font-semibold uppercase tracking-wide","passed"===e.status?"text-success":"failed"===e.status||"error"===e.status?"text-destructive":"text-muted-foreground/40"),children:e.status})]},t)})})]})]}),!ek&&(0,a.jsxs)("form",{ref:t,onSubmit:function(e){e.preventDefault(),ep(!0)},className:(0,N.cn)("space-y-3",ew&&"flex-1 min-w-0"),children:[(0,a.jsxs)("div",{className:(0,N.cn)("relative rounded-xl border transition-all duration-200",B?"border-white/15 shadow-[0_0_0_3px_oklch(0.5_0.1_270_/_12%)]":"border-white/7"),children:[(0,a.jsx)(z,{ref:l,placeholder:"Paste your test case here…",value:k,onChange:e=>ec(e.target.value),onFocus:()=>U(!0),onBlur:()=>U(!1),onKeyDown:e=>{if((e.metaKey||e.ctrlKey)&&"Enter"===e.key){var n;e.preventDefault(),null==(n=t.current)||n.requestSubmit()}},rows:16,className:(0,N.cn)("min-h-[320px] font-mono text-[12.5px] leading-relaxed resize-none border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 rounded-xl p-4 overflow-y-auto",W?"max-h-[65vh]":"max-h-[360px]",K&&"pb-9")}),K&&(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"absolute bottom-2 right-3 flex items-center gap-1 rounded-md border border-white/10 bg-background/80 backdrop-blur px-2 py-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g,{className:"size-3.5"}),"Collapse"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.A,{className:"size-3.5"}),"Expand"]})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(j.$,{type:"submit",disabled:!k.trim()||y,size:"lg",className:"gap-2 font-medium",children:y?"Running…":(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{className:"size-4"}),"Run"]})}),(0,a.jsx)(j.$,{type:"button",disabled:!k.trim()||y,size:"lg",variant:"secondary",onClick:()=>ep(!1),className:"gap-2",children:y?"Running…":(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{className:"size-4"}),"Run with preview"]})}),(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-3",children:[T&&(0,a.jsx)("span",{className:"text-destructive text-xs",children:T}),(0,a.jsxs)(j.$,{type:"button",variant:"ghost",size:"lg",onClick:()=>ec('TC-001 — Login and add item to cart\nURL: https://www.saucedemo.com/\nCredentials: standard_user / secret_sauce\n\nSteps:\n1. Open the home page.\n Expected: login form with Username and Password fields is visible.\n2. Enter Username "standard_user" and Password "secret_sauce", click Login.\n Expected: Products page opens with 6 items.\n3. Click "Add to cart" on "Sauce Labs Backpack".\n Expected: cart counter shows 1.\n4. Click the cart icon.\n Expected: cart contains exactly one item — Sauce Labs Backpack at $29.99.'),className:"text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(b,{className:"size-4"}),"Example"]})]})]})]})]})]}),ee.length>0&&(0,a.jsxs)("div",{className:(0,N.cn)("w-full mt-12",ey),children:[(0,a.jsx)("div",{className:"text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/40 mb-3",children:"Recent runs"}),(0,a.jsx)("ul",{className:"space-y-1.5",children:ee.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)(o(),{href:"/run/".concat(e.id),className:"flex items-center gap-3 rounded-xl border border-white/7 px-4 py-3 hover:bg-white/5 transition-colors",children:[(0,a.jsx)(q,{status:e.status}),(0,a.jsx)("span",{className:"flex-1 min-w-0 text-sm text-foreground/80 truncate",children:e.title}),(0,a.jsx)("span",{className:"shrink-0 text-[11px] text-muted-foreground/40 font-mono tabular-nums",children:function(e){let t=new Date(e),n=new Date;return t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}(e.createdAt)})]})},e.id))})]})]})}function L(e){let{status:t}=e;return"running"===t?(0,a.jsx)(f.A,{className:"size-3.5 shrink-0 text-muted-foreground/50 animate-spin"}):"passed"===t?(0,a.jsx)(k.A,{className:"size-3.5 shrink-0 text-success",strokeWidth:2.5}):"failed"===t||"error"===t?(0,a.jsx)(w.A,{className:"size-3.5 shrink-0 text-destructive"}):"paused"===t?(0,a.jsx)("span",{className:"size-3.5 shrink-0 text-[10px] text-muted-foreground/40 font-mono",children:"▐▐"}):"skipped"===t?(0,a.jsx)("span",{className:"size-3.5 shrink-0 text-[10px] text-muted-foreground/30 font-mono",children:"—"}):(0,a.jsx)("span",{className:"size-3.5 shrink-0 rounded-sm border border-white/15 inline-block"})}function q(e){let{status:t}=e;return"passed"===t?(0,a.jsx)(k.A,{className:"size-3.5 shrink-0 text-success",strokeWidth:2.5}):"failed"===t||"error"===t?(0,a.jsx)(w.A,{className:"size-3.5 shrink-0 text-destructive"}):(0,a.jsx)(y.A,{className:"size-3.5 shrink-0 text-muted-foreground/40"})}function H(e){let t=Math.max(0,Math.floor(e/1e3));return"".concat(Math.floor(t/60),":").concat(String(t%60).padStart(2,"0"))}},7003:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var a=n(5155),s=n(9574),r=n(3101),i=n(5016);let o=(0,r.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:n="default",size:r="default",...l}=e;return(0,a.jsx)(s.$,{"data-slot":"button",className:(0,i.cn)(o({variant:n,size:r,className:t})),...l})}}},e=>{e.O(0,[839,441,255,358],()=>e(e.s=2324)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[170],{191:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>J});var n=r(5155),s=r(2115),a=r(2619),i=r.n(a),o=r(3229),l=r(3228),d=r(2638),c=r(3410),u=r(9746),x=r(7212),g=r(3916),m=r(7274),p=r(8215),f=r(5352),h=r(4788),b=r(6329),v=r(1083),w=r(2027),j=r(3101),N=r(5016);let k=(0,j.F)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(e){let{className:t,variant:r="default",render:n,...s}=e;return(0,w.C)({defaultTagName:"span",props:(0,v.v6)({className:(0,N.cn)(k({variant:r}),t)},s),render:n,state:{slot:"badge",variant:r}})}var z=r(7003),S=r(4036),A=r(5949),M=r(4915),C=r(8502),_=r(8905),E=r(989);function F(e){let{...t}=e;return(0,n.jsx)(S.D,{"data-slot":"dialog",...t})}function q(e){let{...t}=e;return(0,n.jsx)(A.Z,{"data-slot":"dialog-portal",...t})}function I(e){let{className:t,...r}=e;return(0,n.jsx)(M.X,{"data-slot":"dialog-overlay",className:(0,N.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...r})}function O(e){let{className:t,children:r,showCloseButton:s=!0,...a}=e;return(0,n.jsxs)(q,{children:[(0,n.jsx)(I,{}),(0,n.jsxs)(C.h,{"data-slot":"dialog-content",className:(0,N.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...a,children:[r,s&&(0,n.jsxs)(_.H,{"data-slot":"dialog-close",render:(0,n.jsx)(z.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,n.jsx)(h.A,{}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function P(e){let{className:t,...r}=e;return(0,n.jsx)("div",{"data-slot":"dialog-header",className:(0,N.cn)("flex flex-col gap-2",t),...r})}function T(e){let{className:t,...r}=e;return(0,n.jsx)(E.L,{"data-slot":"dialog-title",className:(0,N.cn)("font-heading text-base leading-none font-medium",t),...r})}var R=r(2045);function D(e){let{className:t,type:r,...s}=e;return(0,n.jsx)(R.p,{type:r,"data-slot":"input",className:(0,N.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...s})}var W=r(8521),B=r(2577),H=r(1127);function $(e){let{...t}=e;return(0,n.jsx)(W.N,{"data-slot":"collapsible",...t})}function U(e){let{...t}=e;return(0,n.jsx)(B.R,{"data-slot":"collapsible-trigger",...t})}function V(e){let{...t}=e;return(0,n.jsx)(H.j,{"data-slot":"collapsible-content",...t})}function J(e){var t,r,a,m,p;let{params:f}=e,{id:h}=(0,s.use)(f),[v,w]=(0,s.useState)(null),[j,k]=(0,s.useState)([]),[y,S]=(0,s.useState)(!1),[A,M]=(0,s.useState)(null),[C,_]=(0,s.useState)(()=>Date.now()),[E,q]=(0,s.useState)(!1),I=(0,s.useRef)(!1);(0,s.useEffect)(()=>{I.current=!1;let e=new EventSource("/api/run/".concat(h,"/stream"));return e.onmessage=e=>{let t=JSON.parse(e.data);if(I.current=!0,t.events?k(t.events):t.event&&k(e=>[...e,t.event]),w({...t.run,events:[]}),!["running","waiting","paused"].includes(t.run.status)){var r,n,s,a,i;let e=null!=(i=null!=(a=null==(r=t.event)?void 0:r.ts)?a:null==(s=t.events)||null==(n=s.at(-1))?void 0:n.ts)?i:Date.now();M(t=>null!=t?t:e)}},e.onerror=()=>{e.close(),I.current||S(!0)},()=>e.close()},[h]);let P=null!=(r=null==v?void 0:v.status)?r:"running",T=null!=(a=null==v?void 0:v.steps)?a:[],R=T.filter(e=>"pass"===e.status).length,D=T.filter(e=>"fail"===e.status).length,W=T.filter(e=>"warn"===e.status).length,B="running"===P||"waiting"===P,H=B||"paused"===P;async function J(){H&&(q(!0),await fetch("/api/run/".concat(h,"/pause"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"paused"===P?"resume":"pause"})}).catch(()=>{}),q(!1))}let G=B&&null!=(m=null==(t=T.find(e=>"queued"===e.status))?void 0:t.num)?m:null;(0,s.useEffect)(()=>{if(!B)return;let e=setInterval(()=>_(Date.now()),1e3);return()=>clearInterval(e)},[B]),(0,s.useEffect)(()=>((0,b.O)(P),()=>{(0,b.g)()}),[P]),(0,s.useEffect)(()=>{if(!(null==v?void 0:v.title))return;let e=document.title;return document.title=v.title,()=>{document.title=e}},[null==v?void 0:v.title]),(0,s.useEffect)(()=>{var e;null!=G&&(null==(e=document.getElementById("step-".concat(G)))||e.scrollIntoView({behavior:"smooth",block:"center"}))},[G]);let X=v?(null!=A?A:C)-v.createdAt:0,Z=T.filter(e=>"queued"!==e.status).length,K=T.length?Z/T.length*100:0,ee=[];for(let e of T){let t=ee[ee.length-1];t&&t.title===e.group?t.steps.push(e):ee.push({title:e.group,steps:[e]})}return y?(0,n.jsxs)("main",{className:"flex flex-col items-center justify-center min-h-screen px-6 text-center",children:[(0,n.jsx)("p",{className:"text-6xl font-semibold text-muted-foreground/20 mb-4",children:"404"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mb-6",children:"Run not found — it may have finished and been cleared from memory."}),(0,n.jsxs)(i(),{href:"/",className:"inline-flex items-center gap-1.5 text-sm text-foreground/70 hover:text-foreground transition-colors",children:[(0,n.jsx)(o.A,{className:"size-3.5"}),"New run"]})]}):(0,n.jsxs)("main",{className:"mx-auto max-w-2xl px-6 pt-10 pb-24",children:[(0,n.jsxs)(i(),{href:"/",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors mb-8",children:[(0,n.jsx)(o.A,{className:"size-3.5"}),"Back"]}),(0,n.jsxs)("section",{className:"mb-8",children:[(0,n.jsx)(Q,{status:P}),(0,n.jsx)("h1",{className:"text-lg font-semibold tracking-tight mt-5 break-words text-foreground/90",children:null!=(p=null==v?void 0:v.title)?p:h}),v&&(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 mt-1.5",children:[(0,n.jsx)("p",{className:"text-xs text-muted-foreground font-mono",children:T.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-foreground/60",children:[Z,"/",T.length," steps"]}),R>0&&(0,n.jsxs)("span",{className:"text-success ml-2",children:["\xb7 ",R," passed"]}),W>0&&(0,n.jsxs)("span",{className:"text-warning ml-2",children:["\xb7 ",W," warn"]}),D>0&&(0,n.jsxs)("span",{className:"text-destructive ml-2",children:["\xb7 ",D," failed"]})]}):(0,n.jsx)("span",{className:"text-muted-foreground/50",children:"waiting for plan…"})}),(0,n.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[H&&(0,n.jsx)(z.$,{variant:"ghost",size:"sm",onClick:J,disabled:E||"waiting"===P,className:"h-7 px-2 text-muted-foreground/60 hover:text-foreground",children:"paused"===P?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:"size-3.5 mr-1"}),"Resume"]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:"size-3.5 mr-1"}),"Pause"]})}),(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground/60 font-mono tabular-nums",children:[(0,n.jsx)(c.A,{className:"size-3"}),function(e){let t=Math.max(0,Math.floor(e/1e3));return"".concat(Math.floor(t/60),":").concat(String(t%60).padStart(2,"0"))}(X)]})]})]}),T.length>0&&(0,n.jsx)("div",{className:"relative mt-3 h-[3px] rounded-full bg-white/5 overflow-hidden",children:(0,n.jsx)("div",{className:(0,N.cn)("absolute inset-y-0 left-0 rounded-full transition-all duration-700 ease-out","failed"===P||"error"===P?"bg-destructive":"bg-success"),style:{width:"".concat(K,"%")}})})]}),(0,n.jsxs)("section",{className:"space-y-2",children:[0===T.length&&(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,n.jsx)(u.A,{className:"size-5 text-muted-foreground/30 animate-spin mb-3"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground/50",children:"waiting for agent to start…"})]}),ee.map((e,t)=>(0,n.jsxs)("div",{className:"space-y-2",children:[e.title&&(0,n.jsx)("div",{className:"pt-4 first:pt-0 text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/40",children:e.title}),e.steps.map((e,t)=>(0,n.jsx)("div",{id:"step-".concat(e.num),className:"scroll-mt-6",children:(0,n.jsx)(Y,{step:e,displayNum:t+1,active:e.num===G,events:j.filter(t=>t.stepNum===e.num)})},e.num))]},t))]}),(null==v?void 0:v.summary)&&(0,n.jsxs)("div",{className:"mt-6 rounded-xl border border-white/7 bg-card/60 px-4 py-3",children:[(0,n.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/40 mb-1.5",children:"Summary"}),(0,n.jsx)("div",{className:"text-sm leading-relaxed text-foreground/80",children:v.summary})]}),(null==v?void 0:v.testCase)&&(0,n.jsx)($,{className:"mt-3",children:(0,n.jsxs)("div",{className:"rounded-xl border border-white/7 bg-card/60 overflow-hidden",children:[(0,n.jsxs)(U,{className:"group w-full flex items-center justify-between px-4 py-3 hover:bg-white/[0.02] transition-colors",children:[(0,n.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/40",children:"Test case"}),(0,n.jsx)(x.A,{className:"size-3.5 text-muted-foreground/30 group-data-open:hidden"}),(0,n.jsx)(g.A,{className:"size-3.5 text-muted-foreground/30 hidden group-data-open:inline"})]}),(0,n.jsx)(V,{children:(0,n.jsx)("pre",{className:"px-4 pb-4 text-[11.5px] font-mono leading-relaxed text-foreground/60 whitespace-pre-wrap break-words border-t border-white/5 pt-3",children:v.testCase})})]})}),("passed"===P||"failed"===P)&&(0,n.jsx)(L,{}),(0,n.jsx)(F,{open:!!(null==v?void 0:v.pending),children:(0,n.jsx)(O,{showCloseButton:!1,children:(null==v?void 0:v.pending)&&(0,n.jsx)(et,{runId:h,question:v.pending})})})]})}function L(){return(0,n.jsxs)("a",{href:"https://github.com/broxhq/qpilot",target:"_blank",rel:"noreferrer",className:"group mt-6 flex items-center gap-3 rounded-xl border border-white/7 bg-card/60 px-4 py-3 transition-colors hover:border-warning/30 hover:bg-warning/[0.03]",children:[(0,n.jsx)(m.A,{className:"size-4 shrink-0 text-muted-foreground/50 transition-colors group-hover:text-warning group-hover:fill-warning"}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"text-sm text-foreground/80",children:["Did qpilot save you time?"," ",(0,n.jsx)("span",{className:"text-foreground/95 group-hover:text-warning transition-colors",children:"Star it on GitHub"})]}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground/50",children:"A ⭐ helps more people find it — takes two seconds."})]})]})}let G={running:{label:"Running",sub:"agent is executing steps",icon:(0,n.jsx)(u.A,{className:"size-4 animate-spin"}),color:"text-foreground/70",bg:"bg-white/5",border:"border-white/10"},waiting:{label:"Waiting",sub:"agent needs your input",icon:(0,n.jsx)(p.A,{className:"size-4"}),color:"text-warning",bg:"bg-warning/10",border:"border-warning/20"},paused:{label:"Paused",sub:"run is paused",icon:(0,n.jsx)(d.A,{className:"size-4"}),color:"text-foreground/50",bg:"bg-white/5",border:"border-white/10"},passed:{label:"Passed",sub:"all steps passed",icon:(0,n.jsx)(f.A,{className:"size-4",strokeWidth:2.5}),color:"text-success",bg:"bg-success/10",border:"border-success/20"},failed:{label:"Failed",sub:"some steps failed",icon:(0,n.jsx)(h.A,{className:"size-4",strokeWidth:2.5}),color:"text-destructive",bg:"bg-destructive/10",border:"border-destructive/20"},error:{label:"Error",sub:"agent crashed",icon:(0,n.jsx)(p.A,{className:"size-4"}),color:"text-destructive",bg:"bg-destructive/10",border:"border-destructive/20"}};function Q(e){var t;let{status:r}=e,s=null!=(t=G[r])?t:G.running;return(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:(0,N.cn)("flex items-center justify-center size-9 rounded-xl border transition-colors",s.bg,s.border,s.color),children:s.icon}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:(0,N.cn)("text-sm font-semibold tracking-tight",s.color),children:s.label}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground/60",children:s.sub})]})]})}let X={queued:{border:"border-l-white/8",badge:"bg-white/5 text-muted-foreground/50",bg:"",label:"queued"},pass:{border:"border-l-success/60",badge:"bg-success/10 text-success",bg:"",label:"pass"},warn:{border:"border-l-warning/60",badge:"bg-warning/10 text-warning",bg:"",label:"warn"},fail:{border:"border-l-destructive/60",badge:"bg-destructive/10 text-destructive",bg:"bg-destructive/[0.03]",label:"fail"},skipped:{border:"border-l-white/8",badge:"bg-white/4 text-muted-foreground/30",bg:"",label:"skipped"}},Z={border:"border-l-warning/80",badge:"bg-warning/10 text-warning",bg:"bg-warning/[0.03]"};function K(e){if("action"===e.kind&&("report_step"===e.toolName||"finish"===e.toolName||"set_plan"===e.toolName))return!1;if("observation"===e.kind){var t;let r=null!=(t=e.text)?t:"";return r.startsWith("Error:")||r.startsWith("[debug]")}return!0}function Y(e){var t;let{step:r,events:a,active:i,displayNum:o}=e,l=null!=(t=X[r.status])?t:X.queued,d=i?{...l,...Z}:l,c=a.filter(K),m=i||"fail"===r.status,[p,f]=(0,s.useState)(m);return(0,s.useEffect)(()=>f(m),[m]),(0,n.jsx)($,{open:p,onOpenChange:f,children:(0,n.jsxs)("div",{className:(0,N.cn)("rounded-xl border border-white/7 border-l-2 overflow-hidden transition-colors",d.border,d.bg),children:[(0,n.jsxs)(U,{className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-white/[0.02] transition-colors",children:[(0,n.jsx)(y,{className:(0,N.cn)("border-0 text-[9.5px] tracking-widest font-semibold shrink-0 gap-1 uppercase rounded-md px-1.5",d.badge),children:i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{className:"size-2.5 animate-spin"}),"running"]}):l.label}),(0,n.jsxs)("span",{className:"flex-1 min-w-0 text-[13px] text-foreground/80",children:[(0,n.jsx)("span",{className:"text-muted-foreground/40 mr-2 font-mono text-[11px]",children:String(null!=o?o:r.num).padStart(2,"0")}),r.description]}),(0,n.jsx)(x.A,{className:"size-3.5 text-muted-foreground/30 shrink-0 group-data-open:hidden"}),(0,n.jsx)(g.A,{className:"size-3.5 text-muted-foreground/30 shrink-0 hidden group-data-open:inline"})]}),r.evidence&&(0,n.jsx)("div",{className:"px-4 pb-3 -mt-0.5 text-[11.5px] text-muted-foreground/60 leading-relaxed font-mono",children:r.evidence}),(0,n.jsx)(V,{children:(0,n.jsxs)("div",{className:"px-4 pb-4 pt-3 space-y-3 border-t border-white/5",children:[r.screenshot&&(0,n.jsx)("a",{href:r.screenshot,target:"_blank",rel:"noreferrer",className:"block rounded-lg overflow-hidden border border-white/8 hover:border-white/15 transition-colors",children:(0,n.jsx)("img",{src:r.screenshot,alt:"screenshot step ".concat(r.num),className:"max-h-64 w-full object-contain bg-black/20"})}),c.length>0?(0,n.jsx)("div",{className:"space-y-0.5",children:c.map((e,t)=>(0,n.jsx)(ee,{event:e},t))}):(0,n.jsx)("div",{className:"text-[11px] text-muted-foreground/30",children:"no events for this step"})]})})]})})}function ee(e){let{event:t}=e,{icon:r,text:s,cls:a}=function(e){var t,r,n,s,a,i,o,l,d;switch(e.kind){case"action":return{icon:"→",text:function(e,t){var r,n,s,a,i,o,l,d;let c=null!=t?t:{};switch(e){case"navigate":return"Opening ".concat(null!=(r=c.url)?r:"");case"snapshot":return c.near?'Reading "'.concat(c.near,'" block'):"Reading page";case"click":return c.name?'Clicking "'.concat(c.name,'"'):"Clicking element";case"fill":return c.name?'Filling "'.concat(c.name,'" → "').concat(null!=(n=c.value)?n:"",'"'):'Filling "'.concat(null!=(s=c.value)?s:"",'"');case"select":return c.name?'Selecting "'.concat(null!=(a=c.value)?a:"",'" in "').concat(c.name,'"'):'Selecting "'.concat(null!=(i=c.value)?i:"",'"');case"hover":return c.name?'Hovering "'.concat(c.name,'"'):"Hovering element";case"scroll_to":return"Scrolling to ".concat(c.text?'"'.concat(c.text,'"'):null!=(o=c.ref)?o:"element");case"scroll":{let e=[Number(c.y)?"".concat(Number(c.y)>0?"down":"up"," ").concat(Math.abs(Number(c.y)),"px"):"",Number(c.x)?"".concat(Number(c.x)>0?"right":"left"," ").concat(Math.abs(Number(c.x)),"px"):""].filter(Boolean).join(", "),t=c.ref?" inside ".concat(c.ref):"";return"Scrolling ".concat(e||"0px").concat(t)}case"press":return"Pressing ".concat(null!=(l=c.key)?l:"");case"dismiss":return"Closing overlay";case"wait":return"Waiting ".concat(null!=(d=c.ms)?d:""," ms");case"ask_user":return"Asking user";default:return null!=e?e:"action"}}(e.toolName,e.toolInput),cls:"text-foreground/70"};case"step":{let s=null!=(n=null==(t=e.step)?void 0:t.status)?n:"",a="pass"===s?"text-success":"fail"===s?"text-destructive":"text-warning";return{icon:"pass"===s?"✓":"fail"===s?"✗":"!",text:"Step ".concat(null==(r=e.step)?void 0:r.num," — ").concat(s.toUpperCase()),cls:a}}case"observation":{let t=null!=(s=e.text)?s:"";if(t.startsWith("Error:"))return{icon:"✗",text:t,cls:"text-destructive"};return{icon:"\xb7",text:t,cls:"text-muted-foreground/40"}}case"question":return{icon:"?",text:"Asking: ".concat(null!=(i=null==(a=e.question)?void 0:a.prompt)?i:""),cls:"text-warning"};case"answer":return{icon:"✎",text:"User answered",cls:"text-foreground/50"};case"thought":return{icon:"›",text:null!=(o=e.text)?o:"",cls:"text-muted-foreground/40 italic"};case"done":return{icon:"■",text:"Run finished — ".concat(null!=(l=e.status)?l:""),cls:"text-foreground/60"};case"error":return{icon:"✗",text:null!=(d=e.text)?d:"",cls:"text-destructive"};default:return{icon:"\xb7",text:"",cls:"text-muted-foreground/30"}}}(t),i=new Date(t.ts).toLocaleTimeString("en-US",{hour12:!1});return(0,n.jsxs)("div",{className:"flex gap-2.5 text-[11.5px] leading-relaxed items-baseline font-mono",children:[(0,n.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground/25 text-[10px]",children:i}),(0,n.jsx)("span",{className:(0,N.cn)("shrink-0 w-3.5 text-center",a),children:r}),(0,n.jsx)("span",{className:(0,N.cn)("min-w-0 break-words",a),children:s})]})}function et(e){let{runId:t,question:r}=e,[a,i]=(0,s.useState)(""),[o,l]=(0,s.useState)(!1),[d,c]=(0,s.useState)(null);async function u(e){if(e.preventDefault(),a){l(!0),c(null);try{let e=await fetch("/api/run/".concat(t,"/answer"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questionId:r.id,answer:a})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"HTTP ".concat(e.status))}i("")}catch(e){c(e instanceof Error?e.message:String(e)),l(!1)}}}return(0,n.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,n.jsx)(P,{children:(0,n.jsxs)(T,{className:"flex items-center gap-2 text-base",children:[(0,n.jsx)(p.A,{className:"size-4 text-warning shrink-0"}),"Agent needs input"]})}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r.prompt}),(0,n.jsx)(D,{autoFocus:!0,type:r.secret?"password":"text",value:a,onChange:e=>i(e.target.value),placeholder:r.secret?"OTP / password":"answer",className:"font-mono"}),d&&(0,n.jsx)("p",{className:"text-destructive text-xs",children:d}),(0,n.jsx)(z.$,{type:"submit",disabled:!a||o,className:"w-full",children:o?"Sending…":"Submit"})]})}},5016:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var n=r(2821),s=r(5889);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,n.$)(t))}},6329:(e,t,r)=>{"use strict";function n(e){return"data:image/svg+xml,".concat(encodeURIComponent(e))}function s(e){let t=document.querySelector('link[rel="icon"]');t||(t=Object.assign(document.createElement("link"),{rel:"icon"}),document.head.appendChild(t)),t.href=e}function a(e){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">'.concat(e,"</svg>")}r.d(t,{O:()=>u,g:()=>x});let i=Array.from({length:10},(e,t)=>{let r=t/10*Math.PI*2-Math.PI/2,s=.65*Math.PI,i=12+10*Math.cos(r),o=12+10*Math.sin(r),l=12+10*Math.cos(r+s),d=12+10*Math.sin(r+s);return n(a('<circle cx="12" cy="12" r="10" stroke="#38bdf8" stroke-width="2.5" fill="none" opacity="0.15"/>'+'<path d="M'.concat(i.toFixed(3)," ").concat(o.toFixed(3)," A10 10 0 0 1 ").concat(l.toFixed(3)," ").concat(d.toFixed(3),'" stroke="#38bdf8" stroke-width="2.5" fill="none" stroke-linecap="round"/>')))}),o={passed:n(a('<circle cx="12" cy="12" r="10" fill="#22c55e"/><path d="M7 12.5l3.5 3.5 6.5-7" stroke="white" stroke-width="2.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>')),failed:n(a('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),error:n(a('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),waiting:n(a('<circle cx="12" cy="12" r="10" fill="#facc15"/><path d="M12 7v5.5l3 3" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>')),paused:n(a('<circle cx="12" cy="12" r="10" fill="#64748b"/><path d="M9 8v8M15 8v8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),default:n(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="'.concat(e,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">').concat('<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>').concat(t,"</svg>")}("white"))},l=null,d=0;function c(){l&&(clearInterval(l),l=null)}function u(e){var t;if(c(),"running"===e){d=0,s(i[0]),l=setInterval(()=>{s(i[d=(d+1)%10])},100);return}s(null!=(t=o[e])?t:o.default)}function x(){c(),s(o.default)}},7003:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var n=r(5155),s=r(9574),a=r(3101),i=r(5016);let o=(0,a.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:r="default",size:a="default",...l}=e;return(0,n.jsx)(s.$,{"data-slot":"button",className:(0,i.cn)(o({variant:r,size:a,className:t})),...l})}},9578:(e,t,r)=>{Promise.resolve().then(r.bind(r,191))}},e=>{e.O(0,[839,775,441,255,358],()=>e(e.s=9578)),_N_E=e.O()}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/f639721981034f88-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/9766a7e9e2e0ad5a-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/b66cf8e69499582a-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/aa016aab0e6d1295-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/22a5144ee8d83bca-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Fallback;src:local("Arial");ascent-override:95.94%;descent-override:28.16%;line-gap-override:0.00%;size-adjust:104.76%}.__className_246ccd{font-family:Geist,Geist Fallback;font-style:normal}.__variable_246ccd{--font-sans:"Geist","Geist Fallback"}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/013b72fa676f92e0-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/b9408752a0c24fb9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/65f03d54ccadf4a8-s.woff2) format("woff2");unicode-range:u+2000-2001,u+2004-2008,u+200a,u+23b8-23bd,u+2500-259f}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/e038a29029a234f2-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/2b5b02fc7e511755-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/7d4881bb7e1bf84d-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Mono Fallback;src:local("Arial");ascent-override:74.67%;descent-override:21.92%;line-gap-override:0.00%;size-adjust:134.59%}.__className_c29908{font-family:Geist Mono,Geist Mono Fallback;font-style:normal}.__variable_c29908{--font-mono:"Geist Mono","Geist Mono Fallback"}
|
|
2
|
-
|
|
3
|
-
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:host,:root{--font-sans:var(--font-sans);--font-mono:var(--font-mono);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-md:calc(var(--radius) * .8);--radius-2xl:1rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 40%,transparent)}}html{scroll-behavior:smooth}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"rlig" 1,"calt" 1;letter-spacing:-.01em;background-image:radial-gradient(oklch(100% 0 0/.035) 1px,#0000 0);background-size:22px 22px;background-attachment:fixed}body:before{content:"";pointer-events:none;z-index:0;background:radial-gradient(80% 40% at 50% -10%,oklch(35% .06 270/.18),#0000);position:fixed;inset:0}#__next,main{z-index:1;position:relative}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-2{bottom:calc(var(--spacing) * 2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-12{margin-top:calc(var(--spacing) * 12)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-\[3px\]{height:3px}.h-auto{height:auto}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-\[65vh\]{max-height:65vh}.max-h-\[360px\]{max-height:360px}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\[320px\]{min-height:320px}.min-h-screen{min-height:100vh}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1)}.-translate-x-1\/2,.-translate-y-1\/2{translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1)}.animate-spin{animation:var(--animate-spin)}.resize-none{resize:none}.scroll-mt-6{scroll-margin-top:calc(var(--spacing) * 6)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-white\/5>:not(:last-child)){border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){:where(.divide-white\/5>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-4xl{border-radius:var(--radius-4xl)}.rounded-\[min\(var\(--radius-md\)\,10px\)\]{border-radius:min(var(--radius-md),10px)}.rounded-\[min\(var\(--radius-md\)\,12px\)\]{border-radius:min(var(--radius-md),12px)}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-b-xl{border-bottom-right-radius:calc(var(--radius) * 1.4);border-bottom-left-radius:calc(var(--radius) * 1.4)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-border{border-color:var(--border)}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.border-input{border-color:var(--input)}.border-success\/20{border-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.border-success\/20{border-color:color-mix(in oklab,var(--success) 20%,transparent)}}.border-transparent{border-color:#0000}.border-warning\/20{border-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.border-warning\/20{border-color:color-mix(in oklab,var(--warning) 20%,transparent)}}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/7{border-color:#ffffff12}@supports (color:color-mix(in lab,red,red)){.border-white\/7{border-color:color-mix(in oklab,var(--color-white) 7%,transparent)}}.border-white\/8{border-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.border-white\/8{border-color:color-mix(in oklab,var(--color-white) 8%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/15{border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.border-white\/15{border-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.border-l-destructive\/60{border-left-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-l-destructive\/60{border-left-color:color-mix(in oklab,var(--destructive) 60%,transparent)}}.border-l-success\/60{border-left-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.border-l-success\/60{border-left-color:color-mix(in oklab,var(--success) 60%,transparent)}}.border-l-warning\/60{border-left-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.border-l-warning\/60{border-left-color:color-mix(in oklab,var(--warning) 60%,transparent)}}.border-l-warning\/80{border-left-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.border-l-warning\/80{border-left-color:color-mix(in oklab,var(--warning) 80%,transparent)}}.border-l-white\/8{border-left-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.border-l-white\/8{border-left-color:color-mix(in oklab,var(--color-white) 8%,transparent)}}.bg-background,.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background) 80%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-card\/60{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/60{background-color:color-mix(in oklab,var(--card) 60%,transparent)}}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.bg-destructive\/\[0\.03\]{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/\[0\.03\]{background-color:color-mix(in oklab,var(--destructive) 3%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.bg-success\/10{background-color:color-mix(in oklab,var(--success) 10%,transparent)}}.bg-transparent{background-color:#0000}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/10{background-color:color-mix(in oklab,var(--warning) 10%,transparent)}}.bg-warning\/\[0\.03\]{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/\[0\.03\]{background-color:color-mix(in oklab,var(--warning) 3%,transparent)}}.bg-white\/4{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.bg-white\/4{background-color:color-mix(in oklab,var(--color-white) 4%,transparent)}}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-white) 2%,transparent)}}.bg-clip-padding{background-clip:padding-box}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-4{padding:calc(var(--spacing) * 4)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-20{padding-top:calc(var(--spacing) * 20)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-9{padding-bottom:calc(var(--spacing) * 9)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.text-center{text-align:center}.text-left{text-align:left}.font-heading{font-family:var(--font-sans)}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[9\.5px\]{font-size:9.5px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/50{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,var(--foreground) 50%,transparent)}}.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/60{color:color-mix(in oklab,var(--foreground) 60%,transparent)}}.text-foreground\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground) 80%,transparent)}}.text-foreground\/90{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,var(--foreground) 90%,transparent)}}.text-foreground\/95{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/95{color:color-mix(in oklab,var(--foreground) 95%,transparent)}}.text-muted-foreground,.text-muted-foreground\/20{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/20{color:color-mix(in oklab,var(--muted-foreground) 20%,transparent)}}.text-muted-foreground\/25{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/25{color:color-mix(in oklab,var(--muted-foreground) 25%,transparent)}}.text-muted-foreground\/30{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/30{color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.shadow-\[0_0_0_3px_oklch\(0\.5_0\.1_270_\/_12\%\)\]{--tw-shadow:0 0 0 3px var(--tw-shadow-color,oklch(50% .1 270/.12))}.shadow-\[0_0_0_3px_oklch\(0\.5_0\.1_270_\/_12\%\)\],.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-foreground\/10{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.ring-foreground\/10{--tw-ring-color:color-mix(in oklab,var(--foreground) 10%,transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.paused{animation-play-state:paused}.running{animation-play-state:running}@media (hover:hover){.group-hover\:fill-warning:is(:where(.group):hover *){fill:var(--warning)}.group-hover\:text-warning:is(:where(.group):hover *){color:var(--warning)}}.group-data-open\:hidden:is(:where(.group)[data-open] *){display:none}.group-data-open\:inline:is(:where(.group)[data-open] *){display:inline}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.first\:pt-0:first-child{padding-top:calc(var(--spacing) * 0)}@media (hover:hover){.hover\:border-warning\/30:hover{border-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.hover\:border-warning\/30:hover{border-color:color-mix(in oklab,var(--warning) 30%,transparent)}}.hover\:border-white\/15:hover{border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/15:hover{border-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-warning\/\[0\.03\]:hover{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-warning\/\[0\.03\]:hover{background-color:color-mix(in oklab,var(--warning) 3%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.hover\:bg-white\/\[0\.02\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/\[0\.02\]:hover{background-color:color-mix(in oklab,var(--color-white) 2%,transparent)}}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab,var(--destructive) 40%,transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-3:focus-visible,.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring) 50%,transparent)}}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.active\:not-aria-\[haspopup\]\:translate-y-px:active:not([aria-haspopup]){--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-input\/50:disabled{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.disabled\:bg-input\/50:disabled{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}.disabled\:opacity-50:disabled{opacity:.5}:where([data-slot=button-group]) .in-data-\[slot\=button-group\]\:rounded-lg{border-radius:var(--radius)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-3[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.data-closed\:animate-out[data-closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-closed\:fade-out-0[data-closed]{--tw-exit-opacity:0}.data-closed\:zoom-out-95[data-closed]{--tw-exit-scale:.95}.data-open\:animate-in[data-open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-open\:fade-in-0[data-open]{--tw-enter-opacity:0}.data-open\:zoom-in-95[data-open]{--tw-enter-scale:.95}@supports ((-webkit-backdrop-filter:var(--tw )) or (backdrop-filter:var(--tw ))){.supports-backdrop-filter\:backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}@media (min-width:40rem){.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}}@media (min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/20:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/20:is(.dark *){background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input) 30%,transparent)}}@media (hover:hover){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive) 40%,transparent)}}.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:color-mix(in oklab,var(--input) 80%,transparent)}}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive) 40%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(.\*\:\[a\]\:underline>*):is(a){text-decoration-line:underline}:is(.\*\:\[a\]\:underline-offset-3>*):is(a){text-underline-offset:3px}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:color-mix(in oklab,var(--primary) 80%,transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}:is(.\*\:\[a\]\:hover\:text-foreground>*):is(a):hover{color:var(--foreground)}}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3\!>svg{width:calc(var(--spacing) * 3)!important;height:calc(var(--spacing) * 3)!important}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.625rem;--background:oklch(13% .005 270);--foreground:oklch(97% 0 0);--card:oklch(17% .006 270);--card-foreground:oklch(97% 0 0);--popover:oklch(17% .006 270);--popover-foreground:oklch(97% 0 0);--primary:oklch(97% 0 0);--primary-foreground:oklch(13% 0 0);--secondary:oklch(22% .005 270);--secondary-foreground:oklch(97% 0 0);--muted:oklch(22% .005 270);--muted-foreground:oklch(60% .01 270);--accent:oklch(22% .005 270);--accent-foreground:oklch(97% 0 0);--destructive:oklch(65% .2 22);--success:oklch(72% .17 152);--warning:oklch(76% .16 80);--border:oklch(100% 0 0/.07);--input:oklch(100% 0 0/.08);--ring:oklch(60% .06 270)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:oklch(100% 0 0/.08);border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:oklch(100% 0 0/.14)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2324:(e,t,n)=>{Promise.resolve().then(n.bind(n,6732))},5016:(e,t,n)=>{"use strict";n.d(t,{cn:()=>r});var a=n(2821),s=n(5889);function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,a.$)(t))}},6329:(e,t,n)=>{"use strict";function a(e){return"data:image/svg+xml,".concat(encodeURIComponent(e))}function s(e){let t=document.querySelector('link[rel="icon"]');t||(t=Object.assign(document.createElement("link"),{rel:"icon"}),document.head.appendChild(t)),t.href=e}function r(e){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">'.concat(e,"</svg>")}n.d(t,{O:()=>u,g:()=>h});let i=Array.from({length:10},(e,t)=>{let n=t/10*Math.PI*2-Math.PI/2,s=.65*Math.PI,i=12+10*Math.cos(n),o=12+10*Math.sin(n),l=12+10*Math.cos(n+s),d=12+10*Math.sin(n+s);return a(r('<circle cx="12" cy="12" r="10" stroke="#38bdf8" stroke-width="2.5" fill="none" opacity="0.15"/>'+'<path d="M'.concat(i.toFixed(3)," ").concat(o.toFixed(3)," A10 10 0 0 1 ").concat(l.toFixed(3)," ").concat(d.toFixed(3),'" stroke="#38bdf8" stroke-width="2.5" fill="none" stroke-linecap="round"/>')))}),o={passed:a(r('<circle cx="12" cy="12" r="10" fill="#22c55e"/><path d="M7 12.5l3.5 3.5 6.5-7" stroke="white" stroke-width="2.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>')),failed:a(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),error:a(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),waiting:a(r('<circle cx="12" cy="12" r="10" fill="#facc15"/><path d="M12 7v5.5l3 3" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>')),paused:a(r('<circle cx="12" cy="12" r="10" fill="#64748b"/><path d="M9 8v8M15 8v8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),default:a(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="'.concat(e,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">').concat('<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>').concat(t,"</svg>")}("white"))},l=null,d=0;function c(){l&&(clearInterval(l),l=null)}function u(e){var t;if(c(),"running"===e){d=0,s(i[0]),l=setInterval(()=>{s(i[d=(d+1)%10])},100);return}s(null!=(t=o[e])?t:o.default)}function h(){c(),s(o.default)}},6732:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var a=n(5155),s=n(7260),r=n(2115),i=n(2619),o=n.n(i),l=n(6479);let d=(0,l.A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),c=(0,l.A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),u=(0,l.A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var h=n(4788);let x=(0,l.A)("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),m=(0,l.A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),p=(0,l.A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var f=n(9746);let g=(0,l.A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var v=n(3916);let b=(0,l.A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var k=n(5352),w=n(8215),y=n(3410),j=n(7003),N=n(5016);function z(e){let{className:t,...n}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,N.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...n})}var M=n(6329);let S=new Set(["running","waiting","paused"]),A="",C=[],_=null,E=new Set,I=[],D=!1,R=!1,P=null,F=null,$=null;function O(){let e=(0,s.useRouter)(),t=(0,r.useRef)(null),n=(0,r.useRef)(null),i=(0,r.useRef)(null),l=(0,r.useRef)(null),[k,w]=(0,r.useState)(A),[y,O]=(0,r.useState)(!1),[T,V]=(0,r.useState)(null),[B,U]=(0,r.useState)(!1),[W,J]=(0,r.useState)(!1),[K,Q]=(0,r.useState)(!1),[Y,Z]=(0,r.useState)(C),[G,X]=(0,r.useState)(_),[ee,et]=(0,r.useState)([]),[en,ea]=(0,r.useState)(E),[es,er]=(0,r.useState)(I),[ei,eo]=(0,r.useState)(D),[el,ed]=(0,r.useState)(()=>Date.now());function ec(e){A=e,w(e)}function eu(e){E=e,ea(e)}function eh(e){let t="function"==typeof e?e(I):e;I=t,er([...t])}async function ex(e){var t;ec(await e.file.text()),_=t=e.name,X(t)}async function em(e,t){let n=await fetch("/api/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:e,headless:t})}),a=await n.json();if(!n.ok)throw Error(a.error||"error");return a.id}async function ep(t){if(k.trim()){O(!0),V(null);try{let n=await em(k,t);e.push("/run/".concat(n))}catch(e){V(e instanceof Error?e.message:String(e)),O(!1)}}}async function ef(){R=!0;let e=P;e&&fetch("/api/run/".concat(e,"/pause"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"pause"})}).catch(()=>{})}async function eg(e){let t=Y.filter(e=>en.has(e.name));if(!t.length)return;let n=t.map(e=>({file:e,id:null,status:"queued"}));eh(n),D=!0,eo(!0),R=!1,P=null,F=Date.now(),$=null;for(let t=0;t<n.length;t++){if(R){eh(e=>e.map((e,n)=>n>=t?{...e,status:"skipped"}:e));break}let a=Date.now();eh(e=>e.map((e,n)=>n===t?{...e,status:"running",startedAt:a}:e));try{let a=await n[t].file.file.text(),s=await em(a,e);P=s,eh(e=>e.map((e,n)=>n===t?{...e,id:s}:e));let r=await function(e){return new Promise(t=>{let n=new EventSource("/api/run/".concat(e,"/stream")),a=setInterval(()=>{R&&(clearInterval(a),n.close(),t("paused"))},150);n.onmessage=e=>{var s;let r=null==(s=JSON.parse(e.data).run)?void 0:s.status;if(R){clearInterval(a),n.close(),t("paused");return}r&&!S.has(r)&&(clearInterval(a),n.close(),t(r))},n.onerror=()=>{clearInterval(a),n.close(),t("error")}})}(s),i=Date.now();if(eh(e=>e.map((e,n)=>n===t?{...e,status:r,finishedAt:i}:e)),R){eh(e=>e.map((e,n)=>n>t?{...e,status:"skipped"}:e));break}}catch(e){eh(e=>e.map((e,n)=>n===t?{...e,status:"error",finishedAt:Date.now()}:e))}}P=null,$=Date.now(),D=!1,eo(!1),fetch("/api/runs").then(e=>e.ok?e.json():[]).then(et).catch(()=>{})}(0,r.useEffect)(()=>{if(!ei)return;let e=setInterval(()=>ed(Date.now()),1e3);return()=>clearInterval(e)},[ei]),(0,r.useEffect)(()=>{fetch("/api/runs").then(e=>e.ok?e.json():[]).then(et).catch(()=>{})},[]),(0,r.useEffect)(()=>{let e=l.current;e&&Q(e.scrollHeight>364)},[k]),(0,r.useEffect)(()=>{if(!D)return;let e=setInterval(()=>{er([...I]),eo(D),D||clearInterval(e)},200);return()=>clearInterval(e)},[]),(0,r.useEffect)(()=>{if(ei)(0,M.O)("running");else if(I.length>0){let e=I.some(e=>"failed"===e.status||"error"===e.status),t=I.every(e=>"passed"===e.status);(0,M.O)(e?"failed":t?"passed":"default")}},[ei]),(0,r.useEffect)(()=>()=>{(0,M.g)()},[]);let ev=en.size,eb=Y.length>0&&en.size===Y.length,ek=ev>0,ew=Y.length>0&&!ek,ey=Y.length>0?"max-w-3xl":"max-w-2xl";return(0,a.jsxs)("main",{className:"flex flex-col items-center min-h-screen px-6 pt-20 pb-24",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-11 rounded-2xl border border-white/10 bg-white/5 mb-6 shadow-lg",children:(0,a.jsx)(d,{className:"size-5 text-foreground/80"})}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight mb-2",children:"QA Agent"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-10",children:"Paste a test case. Watch it run."}),(0,a.jsxs)("div",{className:(0,N.cn)("w-full space-y-3",ey),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{ref:i,type:"file",webkitdirectory:"",multiple:!0,className:"hidden",onChange:function(e){var t;let n=Array.from(null!=(t=e.target.files)?t:[]).filter(e=>e.name.endsWith(".md")).map(e=>({name:e.webkitRelativePath||e.name,file:e}));n.sort((e,t)=>e.name.localeCompare(t.name)),C=n,Z(n),_=null,X(null),eu(new Set),eh([]),e.target.value=""}}),(0,a.jsx)("input",{ref:n,type:"file",accept:".md,text/markdown",className:"hidden",onChange:function(e){var t;let n=null==(t=e.target.files)?void 0:t[0];if(!n)return;let a=new FileReader;a.onload=e=>{var t;"string"==typeof(null==(t=e.target)?void 0:t.result)&&ec(e.target.result)},a.readAsText(n,"utf-8"),e.target.value=""}}),(0,a.jsxs)(j.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{var e;return null==(e=i.current)?void 0:e.click()},className:"gap-2 text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(c,{className:"size-4"}),"Choose folder"]}),(0,a.jsxs)(j.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{var e;return null==(e=n.current)?void 0:e.click()},className:"gap-2 text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(u,{className:"size-4"}),"Upload .md"]}),Y.length>0&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:[Y.length," .md file",1!==Y.length?"s":""," found"]}),Y.length>0&&(0,a.jsx)(j.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{var e;C=e=[],Z(e),_=null,X(null),eu(new Set),eh([])},className:"ml-auto text-muted-foreground hover:text-foreground p-1 h-auto",children:(0,a.jsx)(h.A,{className:"size-3.5"})})]}),(0,a.jsxs)("div",{className:(0,N.cn)(ew&&"flex gap-4 items-start"),children:[Y.length>0&&(0,a.jsxs)("div",{className:(0,N.cn)(ew?"w-64 shrink-0":"w-full","space-y-3"),children:[(0,a.jsxs)("ul",{className:"rounded-xl border border-white/7 divide-y divide-white/5 overflow-hidden",children:[(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 bg-white/[0.02]",children:[(0,a.jsxs)("button",{type:"button",onClick:function(){eu(en.size===Y.length?new Set:new Set(Y.map(e=>e.name)))},className:"flex items-center gap-2 shrink-0 text-muted-foreground/50 hover:text-foreground transition-colors",children:[eb?(0,a.jsx)(x,{className:"size-4 text-foreground/70"}):(0,a.jsx)(m,{className:"size-4"}),(0,a.jsx)("span",{className:"text-[11px] text-muted-foreground/70 select-none",children:ev>0?"".concat(ev," selected"):"Select all"})]}),ev>0&&!ei&&(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-1.5",children:[(0,a.jsxs)(j.$,{type:"button",size:"sm",className:"h-7 gap-1.5 text-xs font-medium",onClick:()=>eg(!0),children:[(0,a.jsx)(p,{className:"size-3.5"}),"Run ",ev]}),(0,a.jsxs)(j.$,{type:"button",size:"sm",variant:"secondary",className:"h-7 gap-1.5 text-xs",onClick:()=>eg(!1),children:[(0,a.jsx)(p,{className:"size-3.5"}),"With preview"]})]}),ei&&(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,a.jsx)(f.A,{className:"size-3.5 text-muted-foreground/50 animate-spin"}),(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:ef,children:"Stop"})]})]})}),Y.map(e=>(0,a.jsxs)("li",{className:"flex items-center",children:[(0,a.jsx)("button",{type:"button",onClick:()=>(function(e){let t=new Set(en);t.has(e)?t.delete(e):t.add(e),eu(t)})(e.name),className:"shrink-0 px-4 py-2.5 text-muted-foreground/50 hover:text-foreground transition-colors",children:en.has(e.name)?(0,a.jsx)(x,{className:"size-4 text-foreground/70"}):(0,a.jsx)(m,{className:"size-4"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ex(e),className:(0,N.cn)("flex-1 text-left py-2.5 pr-4 text-sm font-mono transition-colors truncate",G===e.name?"text-foreground":"text-muted-foreground hover:text-foreground"),children:e.name})]},e.name))]}),es.length>0&&(0,a.jsxs)("div",{className:"rounded-xl border border-white/7 overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-4 py-2.5 bg-white/[0.02] flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/40",children:"Batch run"}),F&&(0,a.jsx)("span",{className:"ml-auto text-[11px] font-mono tabular-nums text-muted-foreground/40",children:H((null!=$?$:el)-F)})]}),(0,a.jsx)("ul",{className:"divide-y divide-white/5",children:es.map((e,t)=>{var n;return(0,a.jsxs)("li",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,a.jsx)(L,{status:e.status}),e.id?(0,a.jsx)(o(),{href:"/run/".concat(e.id),className:"flex-1 min-w-0 text-sm font-mono text-foreground/70 hover:text-foreground truncate transition-colors",children:e.file.name}):(0,a.jsx)("span",{className:"flex-1 min-w-0 text-sm font-mono text-muted-foreground/40 truncate",children:e.file.name}),(0,a.jsx)("span",{className:"shrink-0 text-[11px] font-mono tabular-nums text-muted-foreground/30",children:e.startedAt?H((null!=(n=e.finishedAt)?n:"running"===e.status?el:e.startedAt)-e.startedAt):""}),"queued"!==e.status&&"running"!==e.status&&"skipped"!==e.status&&(0,a.jsx)("span",{className:(0,N.cn)("shrink-0 text-[10.5px] font-semibold uppercase tracking-wide","passed"===e.status?"text-success":"failed"===e.status||"error"===e.status?"text-destructive":"text-muted-foreground/40"),children:e.status})]},t)})})]})]}),!ek&&(0,a.jsxs)("form",{ref:t,onSubmit:function(e){e.preventDefault(),ep(!0)},className:(0,N.cn)("space-y-3",ew&&"flex-1 min-w-0"),children:[(0,a.jsxs)("div",{className:(0,N.cn)("relative rounded-xl border transition-all duration-200",B?"border-white/15 shadow-[0_0_0_3px_oklch(0.5_0.1_270_/_12%)]":"border-white/7"),children:[(0,a.jsx)(z,{ref:l,placeholder:"Paste your test case here…",value:k,onChange:e=>ec(e.target.value),onFocus:()=>U(!0),onBlur:()=>U(!1),onKeyDown:e=>{if((e.metaKey||e.ctrlKey)&&"Enter"===e.key){var n;e.preventDefault(),null==(n=t.current)||n.requestSubmit()}},rows:16,className:(0,N.cn)("min-h-[320px] font-mono text-[12.5px] leading-relaxed resize-none border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 rounded-xl p-4 overflow-y-auto",W?"max-h-[65vh]":"max-h-[360px]",K&&"pb-9")}),K&&(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"absolute bottom-2 right-3 flex items-center gap-1 rounded-md border border-white/10 bg-background/80 backdrop-blur px-2 py-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g,{className:"size-3.5"}),"Collapse"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.A,{className:"size-3.5"}),"Expand"]})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(j.$,{type:"submit",disabled:!k.trim()||y,size:"lg",className:"gap-2 font-medium",children:y?"Running…":(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{className:"size-4"}),"Run"]})}),(0,a.jsx)(j.$,{type:"button",disabled:!k.trim()||y,size:"lg",variant:"secondary",onClick:()=>ep(!1),className:"gap-2",children:y?"Running…":(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{className:"size-4"}),"Run with preview"]})}),(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-3",children:[T&&(0,a.jsx)("span",{className:"text-destructive text-xs",children:T}),(0,a.jsxs)(j.$,{type:"button",variant:"ghost",size:"lg",onClick:()=>ec('TC-001 — Login and add item to cart\nURL: https://www.saucedemo.com/\nCredentials: standard_user / secret_sauce\n\nSteps:\n1. Open the home page.\n Expected: login form with Username and Password fields is visible.\n2. Enter Username "standard_user" and Password "secret_sauce", click Login.\n Expected: Products page opens with 6 items.\n3. Click "Add to cart" on "Sauce Labs Backpack".\n Expected: cart counter shows 1.\n4. Click the cart icon.\n Expected: cart contains exactly one item — Sauce Labs Backpack at $29.99.'),className:"text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(b,{className:"size-4"}),"Example"]})]})]})]})]})]}),ee.length>0&&(0,a.jsxs)("div",{className:(0,N.cn)("w-full mt-12",ey),children:[(0,a.jsx)("div",{className:"text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/40 mb-3",children:"Recent runs"}),(0,a.jsx)("ul",{className:"space-y-1.5",children:ee.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)(o(),{href:"/run/".concat(e.id),className:"flex items-center gap-3 rounded-xl border border-white/7 px-4 py-3 hover:bg-white/5 transition-colors",children:[(0,a.jsx)(q,{status:e.status}),(0,a.jsx)("span",{className:"flex-1 min-w-0 text-sm text-foreground/80 truncate",children:e.title}),(0,a.jsx)("span",{className:"shrink-0 text-[11px] text-muted-foreground/40 font-mono tabular-nums",children:function(e){let t=new Date(e),n=new Date;return t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}(e.createdAt)})]})},e.id))})]})]})}function L(e){let{status:t}=e;return"running"===t?(0,a.jsx)(f.A,{className:"size-3.5 shrink-0 text-muted-foreground/50 animate-spin"}):"passed"===t?(0,a.jsx)(k.A,{className:"size-3.5 shrink-0 text-success",strokeWidth:2.5}):"failed"===t||"error"===t?(0,a.jsx)(w.A,{className:"size-3.5 shrink-0 text-destructive"}):"paused"===t?(0,a.jsx)("span",{className:"size-3.5 shrink-0 text-[10px] text-muted-foreground/40 font-mono",children:"▐▐"}):"skipped"===t?(0,a.jsx)("span",{className:"size-3.5 shrink-0 text-[10px] text-muted-foreground/30 font-mono",children:"—"}):(0,a.jsx)("span",{className:"size-3.5 shrink-0 rounded-sm border border-white/15 inline-block"})}function q(e){let{status:t}=e;return"passed"===t?(0,a.jsx)(k.A,{className:"size-3.5 shrink-0 text-success",strokeWidth:2.5}):"failed"===t||"error"===t?(0,a.jsx)(w.A,{className:"size-3.5 shrink-0 text-destructive"}):(0,a.jsx)(y.A,{className:"size-3.5 shrink-0 text-muted-foreground/40"})}function H(e){let t=Math.max(0,Math.floor(e/1e3));return"".concat(Math.floor(t/60),":").concat(String(t%60).padStart(2,"0"))}},7003:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var a=n(5155),s=n(9574),r=n(3101),i=n(5016);let o=(0,r.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:n="default",size:r="default",...l}=e;return(0,a.jsx)(s.$,{"data-slot":"button",className:(0,i.cn)(o({variant:n,size:r,className:t})),...l})}}},e=>{e.O(0,[839,441,255,358],()=>e(e.s=2324)),_N_E=e.O()}]);
|