kaizenai 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,246 +1,69 @@
1
- <p align="center">
2
- <img src="assets/icon.png" alt="Kaizen" width="80" />
3
- </p>
1
+ # Kaizen
4
2
 
5
- <h1 align="center">Kaizen</h1>
3
+ ![Kaizen icon](assets/icon.png)
6
4
 
7
- <p align="center">
8
- <strong>A beautiful web UI for Claude Code, Codex, Gemini, and Cursor</strong>
9
- </p>
5
+ [![npm version](https://img.shields.io/npm/v/kaizenai.svg?style=flat&colorA=18181b&colorB=f472b6)](https://www.npmjs.com/package/kaizenai)
10
6
 
11
- <p align="center">
12
- <a href="https://www.npmjs.com/package/kaizenai"><img src="https://img.shields.io/npm/v/kaizenai.svg?style=flat&colorA=18181b&colorB=f472b6" alt="npm version" /></a>
13
- </p>
7
+ Local web UI for Claude Code, Codex, Gemini, and Cursor.
14
8
 
15
- <br />
16
-
17
- <p align="center">
18
- <picture>
19
- <source media="(prefers-color-scheme: dark)" srcset="assets/screenshot.png" />
20
- <source media="(prefers-color-scheme: light)" srcset="assets/screenshot-light.png" />
21
- <img src="assets/screenshot.png" alt="Kaizen screenshot" width="800" />
22
- </picture>
23
- </p>
24
-
25
- <br />
9
+ ![Kaizen screenshot](assets/screenshot-light.png)
26
10
 
27
11
  ## Quickstart
28
12
 
29
- ```bash
30
- npx kaizenai
31
- ```
32
-
33
- `kaizen` is already taken on npm, so the package name needs to stay `kaizenai` for now.
34
-
35
- After install, the command is still:
36
-
37
- ```bash
38
- kaizen
39
- ```
40
-
41
- `npx kaizenai` still requires Bun to be installed locally because the Kaizen runtime executes on Bun.
42
-
43
- If Bun isn't installed, install it first:
13
+ Install Bun first:
44
14
 
45
15
  ```bash
46
16
  curl -fsSL https://bun.sh/install | bash
47
17
  ```
48
18
 
49
- Then run from any project directory:
19
+ Then run Kaizen:
50
20
 
51
21
  ```bash
52
- kaizen
53
- ```
54
-
55
- That's it. Kaizen opens in your browser at [`localhost:3210`](http://localhost:3210).
56
-
57
- ## Features
58
-
59
- - **Multi-provider support** — switch between Claude, Codex, Gemini, and Cursor from the chat input, with per-provider model selection, plan mode support, and provider-specific controls
60
- - **Project-first sidebar** — chats grouped under projects, with live status indicators (idle, running, waiting, failed)
61
- - **Drag-and-drop project ordering** — reorder project groups in the sidebar with persistent ordering
62
- - **Local project discovery** — auto-discovers projects from Claude and Codex local history
63
- - **Rich transcript rendering** — hydrated tool calls, collapsible tool groups, plan mode dialogs, and interactive prompts with full result display
64
- - **Quick responses** — lightweight structured queries (e.g. title generation) via Claude Haiku with automatic provider fallback
65
- - **Plan mode** — review and approve agent plans before execution
66
- - **Persistent local history** — refresh-safe routes backed by JSONL event logs and compacted snapshots
67
- - **Auto-generated titles** — chat titles generated in the background via Claude Haiku
68
- - **Session resumption** — resume agent sessions with full context preservation
69
- - **WebSocket-driven** — real-time subscription model with reactive state broadcasting
70
-
71
- ## Architecture
72
-
73
- ```
74
- Browser (React + Zustand)
75
- ↕ WebSocket
76
- Bun Server (HTTP + WS)
77
- ├── WSRouter ─── subscription & command routing
78
- ├── AgentCoordinator ─── multi-provider turn management
79
- ├── ProviderCatalog ─── provider/model/effort normalization
80
- ├── QuickResponseAdapter ─── structured queries with provider fallback
81
- ├── EventStore ─── JSONL persistence + snapshot compaction
82
- └── ReadModels ─── derived views (sidebar, chat, projects)
83
- ↕ stdio
84
- Claude Code / Codex / Gemini CLI / Cursor Agent ACP (local processes)
85
-
86
- Local File System (~/.kaizen/data/, project dirs)
22
+ npx kaizenai
87
23
  ```
88
24
 
89
- **Key patterns:** Event sourcing for all state mutations. CQRS with separate write (event log) and read (derived snapshots) paths. Reactive broadcasting — subscribers get pushed fresh snapshots on every state change. Multi-provider agent coordination with tool gating for user-approval flows. Provider-agnostic transcript hydration for unified rendering.
90
-
91
- ## Requirements
92
-
93
- - [Bun](https://bun.sh) v1.3.5+
94
- - A working [Claude Code](https://docs.anthropic.com/en/docs/claude-code) environment
95
- - _(Optional)_ [Codex CLI](https://github.com/openai/codex) for Codex provider support
96
- - _(Optional)_ [Gemini CLI](https://github.com/google-gemini/gemini-cli) for Gemini provider support
97
- - _(Optional)_ [Cursor CLI / Agent](https://cursor.com/downloads) for Cursor provider support (`agent acp`)
98
-
99
- Embedded terminal support uses Bun's native PTY APIs and currently works on macOS/Linux.
100
-
101
25
  ## Install
102
26
 
103
- Install Kaizen globally:
27
+ Global install:
104
28
 
105
29
  ```bash
106
30
  npm install -g kaizenai
31
+ kaizen
107
32
  ```
108
33
 
109
- This installs the `kaizen` command globally.
110
-
111
- Or run it without installing:
34
+ One-off run:
112
35
 
113
36
  ```bash
114
37
  npx kaizenai
115
38
  ```
116
39
 
117
- Because the npm package name is `kaizenai`, `npx kaizen` is not available unless the `kaizen` package name becomes available in the registry. If Bun is missing, `kaizen` and `npx kaizenai` will print a setup message telling the user to install Bun first.
118
-
119
- If Bun isn't installed, install it first:
120
-
121
- ```bash
122
- curl -fsSL https://bun.sh/install | bash
123
- ```
124
-
125
- Or clone and build from source:
126
-
127
- ```bash
128
- git clone https://github.com/jayleaton/kaizen.git
129
- cd kaizen
130
- bun install
131
- bun run build
132
- ```
133
-
134
40
  ## Usage
135
41
 
136
42
  ```bash
137
- kaizen # start with defaults (localhost only)
138
- kaizen --port 4000 # custom port
139
- kaizen --no-open # don't open browser
43
+ kaizen
44
+ kaizen --port 4000
45
+ kaizen --host dev-box
46
+ kaizen --remote
47
+ kaizen --no-open
140
48
  ```
141
49
 
142
50
  Default URL: `http://localhost:3210`
143
51
 
144
- ### Network access (Tailscale / LAN)
145
-
146
- By default Kaizen binds to `127.0.0.1` (localhost only). Use `--host` to bind a specific interface, or `--remote` as a shorthand for `0.0.0.0`:
147
-
148
- ```bash
149
- kaizen --remote # bind all interfaces — browser opens localhost:3210
150
- kaizen --host dev-box # bind to a specific hostname — browser opens http://dev-box:3210
151
- kaizen --host 192.168.1.x # bind to a specific LAN IP
152
- kaizen --host 100.64.x.x # bind to a specific Tailscale IP
153
- ```
154
-
155
- When `--host <hostname>` is given, the browser opens `http://<hostname>:3210` automatically. Other machines on your network can connect to the same URL:
52
+ ## Requirements
156
53
 
157
- ```
158
- http://dev-box:3210
159
- ```
54
+ - [Bun](https://bun.sh) v1.3.5+
55
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
56
+ - Optional: [Codex CLI](https://github.com/openai/codex)
57
+ - Optional: [Gemini CLI](https://github.com/google-gemini/gemini-cli)
58
+ - Optional: [Cursor CLI / Agent](https://cursor.com/downloads)
160
59
 
161
60
  ## Development
162
61
 
163
62
  ```bash
63
+ bun install
164
64
  bun run dev
165
65
  ```
166
66
 
167
- The same `--remote` and `--host` flags can be used with `bun run dev` for remote development.
168
- Use `bun run dev --port 4000` to run the Vite client on `4000` and the backend on `4001`.
169
-
170
- Or run client and server separately:
171
-
172
- ```bash
173
- bun run dev:client # http://localhost:5174
174
- bun run dev:server # http://localhost:5175
175
- ```
176
-
177
- ## Scripts
178
-
179
- | Command | Description |
180
- | -------------------- | ---------------------------- |
181
- | `bun run build` | Build for production |
182
- | `bun run check` | Typecheck + build |
183
- | `bun run dev` | Run client + server together |
184
- | `bun run dev:client` | Vite dev server only |
185
- | `bun run dev:server` | Bun backend only |
186
- | `bun run start` | Start production server |
187
-
188
- ## Project Structure
189
-
190
- ```
191
- src/
192
- ├── client/ React UI layer
193
- │ ├── app/ App router, pages, central state hook, socket client
194
- │ ├── components/ Messages, chat chrome, dialogs, buttons, inputs
195
- │ ├── hooks/ Theme, standalone mode detection
196
- │ ├── stores/ Zustand stores (chat input, preferences, project order)
197
- │ └── lib/ Formatters, path utils, transcript parsing
198
- ├── server/ Bun backend
199
- │ ├── cli.ts CLI entry point & browser launcher
200
- │ ├── server.ts HTTP/WS server setup & static serving
201
- │ ├── agent.ts AgentCoordinator (multi-provider turn management)
202
- │ ├── gemini-acp.ts Gemini ACP JSON-RPC client
203
- │ ├── cursor-acp.ts Cursor ACP JSON-RPC client
204
- │ ├── codex-app-server.ts Codex App Server JSON-RPC client
205
- │ ├── provider-catalog.ts Provider/model/effort normalization
206
- │ ├── quick-response.ts Structured queries with provider fallback
207
- │ ├── ws-router.ts WebSocket message routing & subscriptions
208
- │ ├── event-store.ts JSONL persistence, replay & compaction
209
- │ ├── discovery.ts Auto-discover projects from Claude and Codex local state
210
- │ ├── read-models.ts Derive view models from event state
211
- │ └── events.ts Event type definitions
212
- └── shared/ Shared between client & server
213
- ├── types.ts Core data types, provider catalog, transcript entries
214
- ├── tools.ts Tool call normalization and hydration
215
- ├── protocol.ts WebSocket message protocol
216
- ├── ports.ts Port configuration
217
- └── branding.ts App name, data directory paths
218
- ```
219
-
220
- ## Data Storage
221
-
222
- All state is stored locally at `~/.kaizen/data/`:
223
-
224
- | File | Purpose |
225
- | ---------------- | ----------------------------------------- |
226
- | `projects.jsonl` | Project open/remove events |
227
- | `chats.jsonl` | Chat create/rename/delete events |
228
- | `messages.jsonl` | Transcript message entries |
229
- | `turns.jsonl` | Agent turn start/finish/cancel events |
230
- | `snapshot.json` | Compacted state snapshot for fast startup |
231
-
232
- Event logs are append-only JSONL. On startup, Kaizen replays the log tail after the last snapshot, then compacts if the logs exceed 2 MB.
233
-
234
- ## Star History
235
-
236
- <a href="https://www.star-history.com/?repos=jayleaton%2Fkaizen&type=date&legend=top-left">
237
- <picture>
238
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/image?repos=jayleaton/kaizen&type=date&theme=dark&legend=top-left" />
239
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/image?repos=jayleaton/kaizen&type=date&legend=top-left" />
240
- <img alt="Star History Chart" src="https://api.star-history.com/image?repos=jayleaton/kaizen&type=date&legend=top-left" />
241
- </picture>
242
- </a>
243
-
244
67
  ## License
245
68
 
246
69
  [MIT](LICENSE)
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="131" zoomAndPan="magnify" viewBox="0 0 98.25 110.999996" height="148" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="a6434bcabb"><path d="M 4.949219 2.914062 L 23.035156 2.914062 L 23.035156 66.925781 L 4.949219 66.925781 Z M 4.949219 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="f38a174fbe"><path d="M 6.4375 2.914062 L 21.546875 2.914062 C 22.371094 2.914062 23.035156 3.582031 23.035156 4.402344 L 23.035156 65.378906 C 23.035156 66.199219 22.371094 66.867188 21.546875 66.867188 L 6.4375 66.867188 C 5.617188 66.867188 4.949219 66.199219 4.949219 65.378906 L 4.949219 4.402344 C 4.949219 3.582031 5.617188 2.914062 6.4375 2.914062 Z M 6.4375 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="2f9a762088"><path d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.875 L 0.949219 64.875 Z M 0.949219 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="57da176352"><path d="M 2.4375 0.914062 L 17.546875 0.914062 C 18.371094 0.914062 19.035156 1.582031 19.035156 2.402344 L 19.035156 63.378906 C 19.035156 64.199219 18.371094 64.867188 17.546875 64.867188 L 2.4375 64.867188 C 1.617188 64.867188 0.949219 64.199219 0.949219 63.378906 L 0.949219 2.402344 C 0.949219 1.582031 1.617188 0.914062 2.4375 0.914062 Z M 2.4375 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="5f618c6616"><rect x="0" width="20" y="0" height="65"/></clipPath><clipPath id="b8b1a1fe42"><path d="M 26.238281 46.367188 L 52.355469 46.367188 L 52.355469 64.632812 L 26.238281 64.632812 Z M 26.238281 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="9c7d06bbac"><path d="M 27.726562 46.367188 L 50.835938 46.367188 C 51.660156 46.367188 52.324219 47.03125 52.324219 47.855469 L 52.324219 63.144531 C 52.324219 63.96875 51.660156 64.632812 50.835938 64.632812 L 27.726562 64.632812 C 26.902344 64.632812 26.238281 63.96875 26.238281 63.144531 L 26.238281 47.855469 C 26.238281 47.03125 26.902344 46.367188 27.726562 46.367188 Z M 27.726562 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dd3273c87e"><path d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="d7d6943e7d"><path d="M 1.726562 0.367188 L 24.835938 0.367188 C 25.660156 0.367188 26.324219 1.03125 26.324219 1.855469 L 26.324219 17.144531 C 26.324219 17.96875 25.660156 18.632812 24.835938 18.632812 L 1.726562 18.632812 C 0.902344 18.632812 0.238281 17.96875 0.238281 17.144531 L 0.238281 1.855469 C 0.238281 1.03125 0.902344 0.367188 1.726562 0.367188 Z M 1.726562 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dccb05b803"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="4a6dfd1cfa"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d68c17fb59"><path d="M 48.566406 66.867188 L 65.722656 66.867188 C 68.191406 66.867188 70.1875 68.867188 70.1875 71.332031 L 70.1875 80.671875 C 70.1875 83.136719 68.191406 85.136719 65.722656 85.136719 L 48.566406 85.136719 C 46.101562 85.136719 44.101562 83.136719 44.101562 80.671875 L 44.101562 71.332031 C 44.101562 68.867188 46.101562 66.867188 48.566406 66.867188 Z M 48.566406 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d91aa65f6f"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7874e4c1c8"><path d="M 4.566406 0.867188 L 21.722656 0.867188 C 24.191406 0.867188 26.1875 2.867188 26.1875 5.332031 L 26.1875 14.671875 C 26.1875 17.136719 24.191406 19.136719 21.722656 19.136719 L 4.566406 19.136719 C 2.101562 19.136719 0.101562 17.136719 0.101562 14.671875 L 0.101562 5.332031 C 0.101562 2.867188 2.101562 0.867188 4.566406 0.867188 Z M 4.566406 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="9ce9990e41"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="5053d98786"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d39cc34eab"><path d="M 45.589844 66.867188 L 68.699219 66.867188 C 69.523438 66.867188 70.1875 67.535156 70.1875 68.355469 L 70.1875 83.648438 C 70.1875 84.46875 69.523438 85.136719 68.699219 85.136719 L 45.589844 85.136719 C 44.765625 85.136719 44.101562 84.46875 44.101562 83.648438 L 44.101562 68.355469 C 44.101562 67.535156 44.765625 66.867188 45.589844 66.867188 Z M 45.589844 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7548939ec4"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e6d65400ef"><path d="M 1.589844 0.867188 L 24.699219 0.867188 C 25.523438 0.867188 26.1875 1.535156 26.1875 2.355469 L 26.1875 17.648438 C 26.1875 18.46875 25.523438 19.136719 24.699219 19.136719 L 1.589844 19.136719 C 0.765625 19.136719 0.101562 18.46875 0.101562 17.648438 L 0.101562 2.355469 C 0.101562 1.535156 0.765625 0.867188 1.589844 0.867188 Z M 1.589844 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="b8a14b9041"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="0e9cc5dcf0"><path d="M 61.667969 87.371094 L 87.785156 87.371094 L 87.785156 105.640625 L 61.667969 105.640625 Z M 61.667969 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="9aadc974f5"><path d="M 63.15625 87.371094 L 86.265625 87.371094 C 87.089844 87.371094 87.753906 88.035156 87.753906 88.859375 L 87.753906 104.152344 C 87.753906 104.972656 87.089844 105.640625 86.265625 105.640625 L 63.15625 105.640625 C 62.332031 105.640625 61.667969 104.972656 61.667969 104.152344 L 61.667969 88.859375 C 61.667969 88.035156 62.332031 87.371094 63.15625 87.371094 Z M 63.15625 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="08901b7c70"><path d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="17b30e43d9"><path d="M 2.15625 0.371094 L 25.265625 0.371094 C 26.089844 0.371094 26.753906 1.035156 26.753906 1.859375 L 26.753906 17.152344 C 26.753906 17.972656 26.089844 18.640625 25.265625 18.640625 L 2.15625 18.640625 C 1.332031 18.640625 0.667969 17.972656 0.667969 17.152344 L 0.667969 1.859375 C 0.667969 1.035156 1.332031 0.371094 2.15625 0.371094 Z M 2.15625 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="191fb42ae4"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="30d9207845"><path d="M 4.949219 60.460938 L 23.035156 60.460938 L 23.035156 100.828125 L 4.949219 100.828125 Z M 4.949219 60.460938 " clip-rule="nonzero"/></clipPath><clipPath id="52d8b1d0c8"><path d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.828125 L 0.949219 40.828125 Z M 0.949219 0.460938 " clip-rule="nonzero"/></clipPath><clipPath id="82dec45cec"><rect x="0" width="20" y="0" height="41"/></clipPath><clipPath id="9b56f823bb"><path d="M 4.949219 66.867188 L 23.035156 66.867188 L 23.035156 107.28125 L 4.949219 107.28125 Z M 4.949219 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="64a8e0ecf4"><path d="M 6.4375 66.867188 L 21.546875 66.867188 C 22.371094 66.867188 23.035156 67.535156 23.035156 68.355469 L 23.035156 105.75 C 23.035156 106.570312 22.371094 107.238281 21.546875 107.238281 L 6.4375 107.238281 C 5.617188 107.238281 4.949219 106.570312 4.949219 105.75 L 4.949219 68.355469 C 4.949219 67.535156 5.617188 66.867188 6.4375 66.867188 Z M 6.4375 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e46f782b3b"><path d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.28125 L 0.949219 41.28125 Z M 0.949219 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="2d24d09008"><path d="M 2.4375 0.867188 L 17.546875 0.867188 C 18.371094 0.867188 19.035156 1.535156 19.035156 2.355469 L 19.035156 39.75 C 19.035156 40.570312 18.371094 41.238281 17.546875 41.238281 L 2.4375 41.238281 C 1.617188 41.238281 0.949219 40.570312 0.949219 39.75 L 0.949219 2.355469 C 0.949219 1.535156 1.617188 0.867188 2.4375 0.867188 Z M 2.4375 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="c16e5f8d8b"><rect x="0" width="20" y="0" height="42"/></clipPath><clipPath id="67ec189edb"><path d="M 44.101562 25.863281 L 70.21875 25.863281 L 70.21875 44.132812 L 44.101562 44.132812 Z M 44.101562 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="9e2c9eb0c8"><path d="M 45.589844 25.863281 L 68.699219 25.863281 C 69.523438 25.863281 70.1875 26.53125 70.1875 27.351562 L 70.1875 42.644531 C 70.1875 43.464844 69.523438 44.132812 68.699219 44.132812 L 45.589844 44.132812 C 44.765625 44.132812 44.101562 43.464844 44.101562 42.644531 L 44.101562 27.351562 C 44.101562 26.53125 44.765625 25.863281 45.589844 25.863281 Z M 45.589844 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="cfc84f52c9"><path d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="fc947c88aa"><path d="M 1.589844 0.863281 L 24.699219 0.863281 C 25.523438 0.863281 26.1875 1.53125 26.1875 2.351562 L 26.1875 17.644531 C 26.1875 18.464844 25.523438 19.132812 24.699219 19.132812 L 1.589844 19.132812 C 0.765625 19.132812 0.101562 18.464844 0.101562 17.644531 L 0.101562 2.351562 C 0.101562 1.53125 0.765625 0.863281 1.589844 0.863281 Z M 1.589844 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="18b158d824"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="8b52c897d1"><path d="M 61.667969 5.359375 L 87.785156 5.359375 L 87.785156 23.628906 L 61.667969 23.628906 Z M 61.667969 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="a669865345"><path d="M 63.15625 5.359375 L 86.265625 5.359375 C 87.089844 5.359375 87.753906 6.027344 87.753906 6.847656 L 87.753906 22.140625 C 87.753906 22.964844 87.089844 23.628906 86.265625 23.628906 L 63.15625 23.628906 C 62.332031 23.628906 61.667969 22.964844 61.667969 22.140625 L 61.667969 6.847656 C 61.667969 6.027344 62.332031 5.359375 63.15625 5.359375 Z M 63.15625 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="20a0ea2a1b"><path d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="ffec020ed9"><path d="M 2.15625 0.359375 L 25.265625 0.359375 C 26.089844 0.359375 26.753906 1.027344 26.753906 1.847656 L 26.753906 17.140625 C 26.753906 17.964844 26.089844 18.628906 25.265625 18.628906 L 2.15625 18.628906 C 1.332031 18.628906 0.667969 17.964844 0.667969 17.140625 L 0.667969 1.847656 C 0.667969 1.027344 1.332031 0.359375 2.15625 0.359375 Z M 2.15625 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="926de771c0"><rect x="0" width="27" y="0" height="19"/></clipPath></defs><g clip-path="url(#a6434bcabb)"><g clip-path="url(#f38a174fbe)"><g transform="matrix(1, 0, 0, 1, 4, 2)"><g clip-path="url(#5f618c6616)"><g clip-path="url(#2f9a762088)"><g clip-path="url(#57da176352)"><path fill="#84bcb8" d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.855469 L 0.949219 64.855469 Z M 0.949219 0.914062 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#b8b1a1fe42)"><g clip-path="url(#9c7d06bbac)"><g transform="matrix(1, 0, 0, 1, 26, 46)"><g clip-path="url(#dccb05b803)"><g clip-path="url(#dd3273c87e)"><g clip-path="url(#d7d6943e7d)"><path fill="#84bcb8" d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#4a6dfd1cfa)"><g clip-path="url(#d68c17fb59)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#9ce9990e41)"><g clip-path="url(#d91aa65f6f)"><g clip-path="url(#7874e4c1c8)"><path fill="#84bcb8" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#5053d98786)"><g clip-path="url(#d39cc34eab)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#b8a14b9041)"><g clip-path="url(#7548939ec4)"><g clip-path="url(#e6d65400ef)"><path fill="#4a7870" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#0e9cc5dcf0)"><g clip-path="url(#9aadc974f5)"><g transform="matrix(1, 0, 0, 1, 61, 87)"><g clip-path="url(#191fb42ae4)"><g clip-path="url(#08901b7c70)"><g clip-path="url(#17b30e43d9)"><path fill="#4a7870" d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#30d9207845)"><g transform="matrix(1, 0, 0, 1, 4, 60)"><g clip-path="url(#82dec45cec)"><g clip-path="url(#52d8b1d0c8)"><path fill="#4a7870" d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.800781 L 0.949219 40.800781 Z M 0.949219 0.460938 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g><g clip-path="url(#9b56f823bb)"><g clip-path="url(#64a8e0ecf4)"><g transform="matrix(1, 0, 0, 1, 4, 66)"><g clip-path="url(#c16e5f8d8b)"><g clip-path="url(#e46f782b3b)"><g clip-path="url(#2d24d09008)"><path fill="#4a7870" d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.210938 L 0.949219 41.210938 Z M 0.949219 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#67ec189edb)"><g clip-path="url(#9e2c9eb0c8)"><g transform="matrix(1, 0, 0, 1, 44, 25)"><g clip-path="url(#18b158d824)"><g clip-path="url(#cfc84f52c9)"><g clip-path="url(#fc947c88aa)"><path fill="#84bcb8" d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#8b52c897d1)"><g clip-path="url(#a669865345)"><g transform="matrix(1, 0, 0, 1, 61, 5)"><g clip-path="url(#926de771c0)"><g clip-path="url(#20a0ea2a1b)"><g clip-path="url(#ffec020ed9)"><path fill="#84bcb8" d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g></svg>
Binary file
Binary file
@@ -466,7 +466,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
466
466
  3. Refresh the page.
467
467
  4. Right-click the get-current-period-usage request.
468
468
  5. Copy > Copy as cURL.
469
- 6. Paste it here.`;function l8({open:e,onOpenChange:t,onSubmit:n}){const r=_.useRef(null),[s,o]=_.useState(""),[l,u]=_.useState(!1);_.useEffect(()=>{e&&(o(""),setTimeout(()=>{var p;return(p=r.current)==null?void 0:p.focus()},0))},[e]);async function h(){const p=await navigator.clipboard.readText();o(p)}async function d(){await navigator.clipboard.writeText(jk),u(!0),setTimeout(()=>u(!1),2e3)}const g=s.trim().length>0;return f.jsx(sp,{open:e,onOpenChange:t,children:f.jsx(Ed,{size:"lg",children:f.jsxs("form",{onSubmit:p=>{p.preventDefault(),g&&n(s.trim())},children:[f.jsxs(ap,{className:"space-y-4",children:[f.jsx(op,{children:"Import Cursor Session"}),f.jsxs(w0,{children:["Paste the copied ",f.jsx("code",{children:"get-current-period-usage"})," curl command and Kaizen will import the session for you."]}),f.jsx("div",{className:"rounded-xl border border-border bg-card px-3 py-3 text-sm text-muted-foreground whitespace-pre-line",children:jk}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>void h(),children:"Paste Clipboard"}),f.jsxs(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>void d(),children:[l?f.jsx($i,{className:"h-4 w-4"}):f.jsx(kd,{className:"h-4 w-4"}),f.jsx("span",{className:"ml-1",children:l?"Copied":"Copy Steps"})]})]}),f.jsx(cp,{ref:r,value:s,onChange:p=>o(p.target.value),rows:10,placeholder:"Paste the copied curl command here",className:"font-mono text-xs"})]}),f.jsxs(lp,{children:[f.jsx(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>t(!1),children:"Cancel"}),f.jsx(Je,{type:"submit",variant:"secondary",size:"sm",disabled:!g,children:"Import Session"})]})]})})})}const c8=["top","right","bottom","left"],Zo=Math.min,ri=Math.max,bm=Math.round,xf=Math.floor,gs=e=>({x:e,y:e}),u8={left:"right",right:"left",bottom:"top",top:"bottom"};function Eb(e,t,n){return ri(e,Zo(t,n))}function Zs(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function S0(e){return e==="x"?"y":"x"}function C0(e){return e==="y"?"height":"width"}function us(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function k0(e){return S0(us(e))}function d8(e,t,n){n===void 0&&(n=!1);const r=yc(e),s=k0(e),o=C0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=ym(l)),[l,ym(l)]}function h8(e){const t=ym(e);return[Rb(e),t,Rb(t)]}function Rb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ok=["left","right"],Lk=["right","left"],f8=["top","bottom"],m8=["bottom","top"];function p8(e,t,n){switch(e){case"top":case"bottom":return n?t?Lk:Ok:t?Ok:Lk;case"left":case"right":return t?f8:m8;default:return[]}}function g8(e,t,n,r){const s=yc(e);let o=p8(Qs(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(Rb)))),o}function ym(e){const t=Qs(e);return u8[t]+e.slice(t.length)}function v8(e){return{top:0,right:0,bottom:0,left:0,...e}}function MM(e){return typeof e!="number"?v8(e):{top:e,right:e,bottom:e,left:e}}function xm(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function zk(e,t,n){let{reference:r,floating:s}=e;const o=us(t),l=k0(t),u=C0(l),h=Qs(t),d=o==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[u]/2-s[u]/2;let y;switch(h){case"top":y={x:g,y:r.y-s.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}switch(yc(t)){case"start":y[l]-=v*(n&&d?-1:1);break;case"end":y[l]+=v*(n&&d?-1:1);break}return y}async function _8(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=Zs(t,e),w=MM(y),C=u[v?p==="floating"?"reference":"floating":p],k=xm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:g,strategy:h})),R=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),M=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},j=xm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:E,strategy:h}):R);return{top:(k.top-j.top+w.top)/M.y,bottom:(j.bottom-k.bottom+w.bottom)/M.y,left:(k.left-j.left+w.left)/M.x,right:(j.right-k.right+w.right)/M.x}}const b8=50,y8=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:_8},h=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=zk(d,r,h),v=r,y=0;const w={};for(let S=0;S<o.length;S++){const C=o[S];if(!C)continue;const{name:k,fn:R}=C,{x:E,y:M,data:j,reset:D}=await R({x:g,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:d,platform:u,elements:{reference:e,floating:t}});g=E??g,p=M??p,w[k]={...w[k],...j},D&&y<b8&&(y++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(d=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:g,y:p}=zk(d,v,h)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:w}},x8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:h}=t,{element:d,padding:g=0}=Zs(e,t)||{};if(d==null)return{};const p=MM(g),v={x:n,y:r},y=k0(s),w=C0(y),S=await l.getDimensions(d),C=y==="y",k=C?"top":"left",R=C?"bottom":"right",E=C?"clientHeight":"clientWidth",M=o.reference[w]+o.reference[y]-v[y]-o.floating[w],j=v[y]-o.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let L=D?D[E]:0;(!L||!await(l.isElement==null?void 0:l.isElement(D)))&&(L=u.floating[E]||o.floating[w]);const $=M/2-j/2,Y=L/2-S[w]/2-1,P=Zo(p[k],Y),V=Zo(p[R],Y),I=P,W=L-S[w]-V,K=L/2-S[w]/2+$,q=Eb(I,K,W),O=!h.arrow&&yc(s)!=null&&K!==q&&o.reference[w]/2-(K<I?P:V)-S[w]/2<0,H=O?K<I?K-I:K-W:0;return{[y]:v[y]+H,data:{[y]:q,centerOffset:K-q-H,...O&&{alignmentOffset:H}},reset:O}}}),w8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=Zs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const k=Qs(s),R=us(u),E=Qs(u)===u,M=await(h.isRTL==null?void 0:h.isRTL(d.floating)),j=v||(E||!S?[ym(u)]:h8(u)),D=w!=="none";!v&&D&&j.push(...g8(u,S,w,M));const L=[u,...j],$=await h.detectOverflow(t,C),Y=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(g&&Y.push($[k]),p){const K=d8(s,l,M);Y.push($[K[0]],$[K[1]])}if(P=[...P,{placement:s,overflows:Y}],!Y.every(K=>K<=0)){var V,I;const K=(((V=o.flip)==null?void 0:V.index)||0)+1,q=L[K];if(q&&(!(p==="alignment"?R!==us(q):!1)||P.every(U=>us(U.placement)===R?U.overflows[0]>0:!0)))return{data:{index:K,overflows:P},reset:{placement:q}};let O=(I=P.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:I.placement;if(!O)switch(y){case"bestFit":{var W;const H=(W=P.filter(U=>{if(D){const F=us(U.placement);return F===R||F==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(F=>F>0).reduce((F,N)=>F+N,0)]).sort((U,F)=>U[1]-F[1])[0])==null?void 0:W[0];H&&(O=H);break}case"initialPlacement":O=u;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function Pk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bk(e){return c8.some(t=>e[t]>=0)}const S8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=Zs(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=Pk(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Bk(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),u=Pk(l,n.floating);return{data:{escapedOffsets:u,escaped:Bk(u)}}}default:return{}}}}},NM=new Set(["left","top"]);async function C8(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Qs(n),u=yc(n),h=us(n)==="y",d=NM.has(l)?-1:1,g=o&&h?-1:1,p=Zs(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),h?{x:y*g,y:v*d}:{x:v*d,y:y*g}}const k8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,h=await C8(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+h.x,y:o+h.y,data:{...h,placement:l}}}}},E8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:h={fn:k=>{let{x:R,y:E}=k;return{x:R,y:E}}},...d}=Zs(e,t),g={x:n,y:r},p=await o.detectOverflow(t,d),v=us(Qs(s)),y=S0(v);let w=g[y],S=g[v];if(l){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",E=w+p[k],M=w-p[R];w=Eb(E,w,M)}if(u){const k=v==="y"?"top":"left",R=v==="y"?"bottom":"right",E=S+p[k],M=S-p[R];S=Eb(E,S,M)}const C=h.fn({...t,[y]:w,[v]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[v]:u}}}}}},R8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:h=!0,crossAxis:d=!0}=Zs(e,t),g={x:n,y:r},p=us(s),v=S0(p);let y=g[v],w=g[p];const S=Zs(u,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const E=v==="y"?"height":"width",M=o.reference[v]-o.floating[E]+C.mainAxis,j=o.reference[v]+o.reference[E]-C.mainAxis;y<M?y=M:y>j&&(y=j)}if(d){var k,R;const E=v==="y"?"width":"height",M=NM.has(Qs(s)),j=o.reference[p]-o.floating[E]+(M&&((k=l.offset)==null?void 0:k[p])||0)+(M?0:C.crossAxis),D=o.reference[p]+o.reference[E]+(M?0:((R=l.offset)==null?void 0:R[p])||0)-(M?C.crossAxis:0);w<j?w=j:w>D&&(w=D)}return{[v]:y,[p]:w}}}},T8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:h=()=>{},...d}=Zs(e,t),g=await l.detectOverflow(t,d),p=Qs(s),v=yc(s),y=us(s)==="y",{width:w,height:S}=o.floating;let C,k;p==="top"||p==="bottom"?(C=p,k=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,C=v==="end"?"top":"bottom");const R=S-g.top-g.bottom,E=w-g.left-g.right,M=Zo(S-g[C],R),j=Zo(w-g[k],E),D=!t.middlewareData.shift;let L=M,$=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=R),D&&!v){const P=ri(g.left,0),V=ri(g.right,0),I=ri(g.top,0),W=ri(g.bottom,0);y?$=w-2*(P!==0||V!==0?P+V:ri(g.left,g.right)):L=S-2*(I!==0||W!==0?I+W:ri(g.top,g.bottom))}await h({...t,availableWidth:$,availableHeight:L});const Y=await l.getDimensions(u.floating);return w!==Y.width||S!==Y.height?{reset:{rects:!0}}:{}}}};function up(){return typeof window<"u"}function xc(e){return AM(e)?(e.nodeName||"").toLowerCase():"#document"}function ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(AM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AM(e){return up()?e instanceof Node||e instanceof ii(e).Node:!1}function Wi(e){return up()?e instanceof Element||e instanceof ii(e).Element:!1}function no(e){return up()?e instanceof HTMLElement||e instanceof ii(e).HTMLElement:!1}function Ik(e){return!up()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ii(e).ShadowRoot}function Rd(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function M8(e){return/^(table|td|th)$/.test(xc(e))}function dp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const N8=/transform|translate|scale|rotate|perspective|filter/,A8=/paint|layout|strict|content/,Ca=e=>!!e&&e!=="none";let p_;function E0(e){const t=Wi(e)?Vi(e):e;return Ca(t.transform)||Ca(t.translate)||Ca(t.scale)||Ca(t.rotate)||Ca(t.perspective)||!R0()&&(Ca(t.backdropFilter)||Ca(t.filter))||N8.test(t.willChange||"")||A8.test(t.contain||"")}function D8(e){let t=Qo(e);for(;no(t)&&!cc(t);){if(E0(t))return t;if(dp(t))return null;t=Qo(t)}return null}function R0(){return p_==null&&(p_=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),p_}function cc(e){return/^(html|body|#document)$/.test(xc(e))}function Vi(e){return ii(e).getComputedStyle(e)}function hp(e){return Wi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if(xc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ik(e)&&e.host||ys(e);return Ik(t)?t.host:t}function DM(e){const t=Qo(e);return cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:no(t)&&Rd(t)?t:DM(t)}function od(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=DM(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=ii(s);if(o){const u=Tb(l);return t.concat(l,l.visualViewport||[],Rd(s)?s:[],u&&n?od(u):[])}else return t.concat(s,od(s,[],n))}function Tb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jM(e){const t=Vi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=no(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=bm(n)!==o||bm(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function T0(e){return Wi(e)?e:e.contextElement}function rc(e){const t=T0(e);if(!no(t))return gs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=jM(t);let l=(o?bm(n.width):n.width)/r,u=(o?bm(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const j8=gs(0);function OM(e){const t=ii(e);return!R0()||!t.visualViewport?j8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ii(e)?!1:t}function $a(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=T0(e);let l=gs(1);t&&(r?Wi(r)&&(l=rc(r)):l=rc(e));const u=O8(o,n,r)?OM(o):gs(0);let h=(s.left+u.x)/l.x,d=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(o){const v=ii(o),y=r&&Wi(r)?ii(r):r;let w=v,S=Tb(w);for(;S&&r&&y!==w;){const C=rc(S),k=S.getBoundingClientRect(),R=Vi(S),E=k.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,M=k.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;h*=C.x,d*=C.y,g*=C.x,p*=C.y,h+=E,d+=M,w=ii(S),S=Tb(w)}}return xm({width:g,height:p,x:h,y:d})}function fp(e,t){const n=hp(e).scrollLeft;return t?t.left+n:$a(ys(e)).left+n}function LM(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fp(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function L8(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=ys(r),u=t?dp(t.floating):!1;if(r===l||u&&o)return n;let h={scrollLeft:0,scrollTop:0},d=gs(1);const g=gs(0),p=no(r);if((p||!p&&!o)&&((xc(r)!=="body"||Rd(l))&&(h=hp(r)),p)){const y=$a(r);d=rc(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const v=l&&!p&&!o?LM(l,h):gs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+g.x+v.x,y:n.y*d.y-h.scrollTop*d.y+g.y+v.y}}function z8(e){return Array.from(e.getClientRects())}function P8(e){const t=ys(e),n=hp(e),r=e.ownerDocument.body,s=ri(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ri(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fp(e);const u=-n.scrollTop;return Vi(r).direction==="rtl"&&(l+=ri(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}const Hk=25;function B8(e,t){const n=ii(e),r=ys(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,h=0;if(s){o=s.width,l=s.height;const g=R0();(!g||g&&t==="fixed")&&(u=s.offsetLeft,h=s.offsetTop)}const d=fp(r);if(d<=0){const g=r.ownerDocument,p=g.body,v=getComputedStyle(p),y=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=Hk&&(o-=w)}else d<=Hk&&(o+=d);return{width:o,height:l,x:u,y:h}}function I8(e,t){const n=$a(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=no(e)?rc(e):gs(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,h=s*o.x,d=r*o.y;return{width:l,height:u,x:h,y:d}}function Fk(e,t,n){let r;if(t==="viewport")r=B8(e,n);else if(t==="document")r=P8(ys(e));else if(Wi(t))r=I8(t,n);else{const s=OM(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return xm(r)}function zM(e,t){const n=Qo(e);return n===t||!Wi(n)||cc(n)?!1:Vi(n).position==="fixed"||zM(n,t)}function H8(e,t){const n=t.get(e);if(n)return n;let r=od(e,[],!1).filter(u=>Wi(u)&&xc(u)!=="body"),s=null;const o=Vi(e).position==="fixed";let l=o?Qo(e):e;for(;Wi(l)&&!cc(l);){const u=Vi(l),h=E0(l);!h&&u.position==="fixed"&&(s=null),(o?!h&&!s:!h&&u.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Rd(l)&&!h&&zM(e,l))?r=r.filter(g=>g!==l):s=u,l=Qo(l)}return t.set(e,r),r}function F8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?dp(t)?[]:H8(t,this._c):[].concat(n),r],u=Fk(t,l[0],s);let h=u.top,d=u.right,g=u.bottom,p=u.left;for(let v=1;v<l.length;v++){const y=Fk(t,l[v],s);h=ri(y.top,h),d=Zo(y.right,d),g=Zo(y.bottom,g),p=ri(y.left,p)}return{width:d-p,height:g-h,x:p,y:h}}function U8(e){const{width:t,height:n}=jM(e);return{width:t,height:n}}function $8(e,t,n){const r=no(t),s=ys(t),o=n==="fixed",l=$a(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const h=gs(0);function d(){h.x=fp(s)}if(r||!r&&!o)if((xc(t)!=="body"||Rd(s))&&(u=hp(t)),r){const y=$a(t,!0,o,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}else s&&d();o&&!r&&s&&d();const g=s&&!r&&!o?LM(s,u):gs(0),p=l.left+u.scrollLeft-h.x-g.x,v=l.top+u.scrollTop-h.y-g.y;return{x:p,y:v,width:l.width,height:l.height}}function g_(e){return Vi(e).position==="static"}function Uk(e,t){if(!no(e)||Vi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function PM(e,t){const n=ii(e);if(dp(e))return n;if(!no(e)){let s=Qo(e);for(;s&&!cc(s);){if(Wi(s)&&!g_(s))return s;s=Qo(s)}return n}let r=Uk(e,t);for(;r&&M8(r)&&g_(r);)r=Uk(r,t);return r&&cc(r)&&g_(r)&&!E0(r)?n:r||D8(e)||n}const W8=async function(e){const t=this.getOffsetParent||PM,n=this.getDimensions,r=await n(e.floating);return{reference:$8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function V8(e){return Vi(e).direction==="rtl"}const q8={convertOffsetParentRelativeRectToViewportRelativeRect:L8,getDocumentElement:ys,getClippingRect:F8,getOffsetParent:PM,getElementRects:W8,getClientRects:z8,getDimensions:U8,getScale:rc,isElement:Wi,isRTL:V8};function BM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K8(e,t){let n=null,r;const s=ys(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),o();const d=e.getBoundingClientRect(),{left:g,top:p,width:v,height:y}=d;if(u||t(),!v||!y)return;const w=xf(p),S=xf(s.clientWidth-(g+v)),C=xf(s.clientHeight-(p+y)),k=xf(g),E={rootMargin:-w+"px "+-S+"px "+-C+"px "+-k+"px",threshold:ri(0,Zo(1,h))||1};let M=!0;function j(D){const L=D[0].intersectionRatio;if(L!==h){if(!M)return l();L?l(!1,L):r=setTimeout(()=>{l(!1,1e-7)},1e3)}L===1&&!BM(d,e.getBoundingClientRect())&&l(),M=!1}try{n=new IntersectionObserver(j,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,E)}n.observe(e)}return l(!0),o}function G8(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,d=T0(e),g=s||o?[...d?od(d):[],...t?od(t):[]]:[];g.forEach(k=>{s&&k.addEventListener("scroll",n,{passive:!0}),o&&k.addEventListener("resize",n)});const p=d&&u?K8(d,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(k=>{let[R]=k;R&&R.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),d&&!h&&y.observe(d),t&&y.observe(t));let w,S=h?$a(e):null;h&&C();function C(){const k=$a(e);S&&!BM(S,k)&&n(),S=k,w=requestAnimationFrame(C)}return n(),()=>{var k;g.forEach(R=>{s&&R.removeEventListener("scroll",n),o&&R.removeEventListener("resize",n)}),p==null||p(),(k=y)==null||k.disconnect(),y=null,h&&cancelAnimationFrame(w)}}const Y8=k8,X8=E8,Z8=w8,Q8=T8,J8=S8,$k=x8,e9=R8,t9=(e,t,n)=>{const r=new Map,s={platform:q8,...n},o={...s.platform,_c:r};return y8(e,t,{...s,platform:o})};var n9=typeof document<"u",r9=function(){},Zf=n9?_.useLayoutEffect:r9;function wm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wm(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!wm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function IM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wk(e,t){const n=IM(e);return Math.round(t*n)/n}function v_(e){const t=_.useRef(e);return Zf(()=>{t.current=e}),t}function i9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:h,open:d}=e,[g,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=_.useState(r);wm(v,r)||y(r);const[w,S]=_.useState(null),[C,k]=_.useState(null),R=_.useCallback(U=>{U!==D.current&&(D.current=U,S(U))},[]),E=_.useCallback(U=>{U!==L.current&&(L.current=U,k(U))},[]),M=o||w,j=l||C,D=_.useRef(null),L=_.useRef(null),$=_.useRef(g),Y=h!=null,P=v_(h),V=v_(s),I=v_(d),W=_.useCallback(()=>{if(!D.current||!L.current)return;const U={placement:t,strategy:n,middleware:v};V.current&&(U.platform=V.current),t9(D.current,L.current,U).then(F=>{const N={...F,isPositioned:I.current!==!1};K.current&&!wm($.current,N)&&($.current=N,Bi.flushSync(()=>{p(N)}))})},[v,t,n,V,I]);Zf(()=>{d===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(U=>({...U,isPositioned:!1})))},[d]);const K=_.useRef(!1);Zf(()=>(K.current=!0,()=>{K.current=!1}),[]),Zf(()=>{if(M&&(D.current=M),j&&(L.current=j),M&&j){if(P.current)return P.current(M,j,W);W()}},[M,j,W,P,Y]);const q=_.useMemo(()=>({reference:D,floating:L,setReference:R,setFloating:E}),[R,E]),O=_.useMemo(()=>({reference:M,floating:j}),[M,j]),H=_.useMemo(()=>{const U={position:n,left:0,top:0};if(!O.floating)return U;const F=Wk(O.floating,g.x),N=Wk(O.floating,g.y);return u?{...U,transform:"translate("+F+"px, "+N+"px)",...IM(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:N}},[n,u,O.floating,g.x,g.y]);return _.useMemo(()=>({...g,update:W,refs:q,elements:O,floatingStyles:H}),[g,W,q,O,H])}const s9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$k({element:r.current,padding:s}).fn(n):{}:r?$k({element:r,padding:s}).fn(n):{}}}},o9=(e,t)=>{const n=Y8(e);return{name:n.name,fn:n.fn,options:[e,t]}},a9=(e,t)=>{const n=X8(e);return{name:n.name,fn:n.fn,options:[e,t]}},l9=(e,t)=>({fn:e9(e).fn,options:[e,t]}),c9=(e,t)=>{const n=Z8(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9=(e,t)=>{const n=Q8(e);return{name:n.name,fn:n.fn,options:[e,t]}},d9=(e,t)=>{const n=J8(e);return{name:n.name,fn:n.fn,options:[e,t]}},h9=(e,t)=>{const n=s9(e);return{name:n.name,fn:n.fn,options:[e,t]}};var f9="Arrow",HM=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return f.jsx(Tt.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});HM.displayName=f9;var m9=HM;function p9(e){const[t,n]=_.useState(void 0);return br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const h=o.borderBoxSize,d=Array.isArray(h)?h[0]:h;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var M0="Popper",[FM,ea]=to(M0),[g9,UM]=FM(M0),$M=e=>{const{__scopePopper:t,children:n}=e,[r,s]=_.useState(null);return f.jsx(g9,{scope:t,anchor:r,onAnchorChange:s,children:n})};$M.displayName=M0;var WM="PopperAnchor",VM=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=UM(WM,n),l=_.useRef(null),u=Ut(t,l),h=_.useRef(null);return _.useEffect(()=>{const d=h.current;h.current=(r==null?void 0:r.current)||l.current,d!==h.current&&o.onAnchorChange(h.current)}),r?null:f.jsx(Tt.div,{...s,ref:u})});VM.displayName=WM;var N0="PopperContent",[v9,_9]=FM(N0),qM=_.forwardRef((e,t)=>{var te,le,me,xe,Ae,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,C=UM(N0,n),[k,R]=_.useState(null),E=Ut(t,je=>R(je)),[M,j]=_.useState(null),D=p9(M),L=(D==null?void 0:D.width)??0,$=(D==null?void 0:D.height)??0,Y=r+(o!=="center"?"-"+o:""),P=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},V=Array.isArray(d)?d:[d],I=V.length>0,W={padding:P,boundary:V.filter(y9),altBoundary:I},{refs:K,floatingStyles:q,placement:O,isPositioned:H,middlewareData:U}=i9({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>G8(...je,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[o9({mainAxis:s+$,alignmentAxis:l}),h&&a9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?l9():void 0,...W}),h&&c9({...W}),u9({...W,apply:({elements:je,rects:Ye,availableWidth:xt,availableHeight:ft})=>{const{width:he,height:Pe}=Ye.reference,Ne=je.floating.style;Ne.setProperty("--radix-popper-available-width",`${xt}px`),Ne.setProperty("--radix-popper-available-height",`${ft}px`),Ne.setProperty("--radix-popper-anchor-width",`${he}px`),Ne.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),M&&h9({element:M,padding:u}),x9({arrowWidth:L,arrowHeight:$}),v&&d9({strategy:"referenceHidden",...W})]}),[F,N]=YM(O),B=Ui(w);br(()=>{H&&(B==null||B())},[H,B]);const X=(te=U.arrow)==null?void 0:te.x,A=(le=U.arrow)==null?void 0:le.y,ne=((me=U.arrow)==null?void 0:me.centerOffset)!==0,[ae,Z]=_.useState();return br(()=>{k&&Z(window.getComputedStyle(k).zIndex)},[k]),f.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:H?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(xe=U.transformOrigin)==null?void 0:xe.x,(Ae=U.transformOrigin)==null?void 0:Ae.y].join(" "),...((Re=U.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(v9,{scope:n,placedSide:F,onArrowChange:j,arrowX:X,arrowY:A,shouldHideArrow:ne,children:f.jsx(Tt.div,{"data-side":F,"data-align":N,...S,ref:E,style:{...S.style,animation:H?void 0:"none"}})})})});qM.displayName=N0;var KM="PopperArrow",b9={top:"bottom",right:"left",bottom:"top",left:"right"},GM=_.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=_9(KM,r),l=b9[o.placedSide];return f.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:f.jsx(m9,{...s,ref:n,style:{...s.style,display:"block"}})})});GM.displayName=KM;function y9(e){return e!==null}var x9=e=>({name:"transformOrigin",options:e,fn(t){var C,k,R;const{placement:n,rects:r,middlewareData:s}=t,l=((C=s.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,h=l?0:e.arrowHeight,[d,g]=YM(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((k=s.arrow)==null?void 0:k.x)??0)+u/2,y=(((R=s.arrow)==null?void 0:R.y)??0)+h/2;let w="",S="";return d==="bottom"?(w=l?p:`${v}px`,S=`${-h}px`):d==="top"?(w=l?p:`${v}px`,S=`${r.floating.height+h}px`):d==="right"?(w=`${-h}px`,S=l?p:`${y}px`):d==="left"&&(w=`${r.floating.width+h}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function YM(e){const[t,n="center"]=e.split("-");return[t,n]}var mp=$M,Td=VM,pp=qM,gp=GM,XM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),w9="VisuallyHidden",ZM=_.forwardRef((e,t)=>f.jsx(Tt.span,{...e,ref:t,style:{...XM,...e.style}}));ZM.displayName=w9;var S9=ZM,[vp]=to("Tooltip",[ea]),_p=ea(),QM="TooltipProvider",C9=700,Mb="tooltip.open",[k9,A0]=vp(QM),JM=e=>{const{__scopeTooltip:t,delayDuration:n=C9,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,l=_.useRef(!0),u=_.useRef(!1),h=_.useRef(0);return _.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),f.jsx(k9,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:_.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:o})};JM.displayName=QM;var ad="Tooltip",[E9,Md]=vp(ad),eN=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,h=A0(ad,e.__scopeTooltip),d=_p(t),[g,p]=_.useState(null),v=Gs(),y=_.useRef(0),w=l??h.disableHoverableContent,S=u??h.delayDuration,C=_.useRef(!1),[k,R]=lc({prop:r,defaultProp:s??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Mb))):h.onClose(),o==null||o(L)},caller:ad}),E=_.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),M=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,R(!0)},[R]),j=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R(!1)},[R]),D=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,R(!0),y.current=0},S)},[S,R]);return _.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),f.jsx(mp,{...d,children:f.jsx(E9,{scope:t,contentId:v,open:k,stateAttribute:E,trigger:g,onTriggerChange:p,onTriggerEnter:_.useCallback(()=>{h.isOpenDelayedRef.current?D():M()},[h.isOpenDelayedRef,D,M]),onTriggerLeave:_.useCallback(()=>{w?j():(window.clearTimeout(y.current),y.current=0)},[j,w]),onOpen:M,onClose:j,disableHoverableContent:w,children:n})})};eN.displayName=ad;var Nb="TooltipTrigger",tN=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Md(Nb,n),o=A0(Nb,n),l=_p(n),u=_.useRef(null),h=Ut(t,u,s.onTriggerChange),d=_.useRef(!1),g=_.useRef(!1),p=_.useCallback(()=>d.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(Td,{asChild:!0,...l,children:f.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:h,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!g.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});tN.displayName=Nb;var D0="TooltipPortal",[R9,T9]=vp(D0,{forceMount:void 0}),nN=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,o=Md(D0,t);return f.jsx(R9,{scope:t,forceMount:n,children:f.jsx(Ai,{present:n||o.open,children:f.jsx(bc,{asChild:!0,container:s,children:r})})})};nN.displayName=D0;var uc="TooltipContent",rN=_.forwardRef((e,t)=>{const n=T9(uc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,l=Md(uc,e.__scopeTooltip);return f.jsx(Ai,{present:r||l.open,children:l.disableHoverableContent?f.jsx(iN,{side:s,...o,ref:t}):f.jsx(M9,{side:s,...o,ref:t})})}),M9=_.forwardRef((e,t)=>{const n=Md(uc,e.__scopeTooltip),r=A0(uc,e.__scopeTooltip),s=_.useRef(null),o=Ut(t,s),[l,u]=_.useState(null),{trigger:h,onClose:d}=n,g=s.current,{onPointerInTransitChange:p}=r,v=_.useCallback(()=>{u(null),p(!1)},[p]),y=_.useCallback((w,S)=>{const C=w.currentTarget,k={x:w.clientX,y:w.clientY},R=O9(k,C.getBoundingClientRect()),E=L9(k,R),M=z9(S.getBoundingClientRect()),j=B9([...E,...M]);u(j),p(!0)},[p]);return _.useEffect(()=>()=>v(),[v]),_.useEffect(()=>{if(h&&g){const w=C=>y(C,g),S=C=>y(C,h);return h.addEventListener("pointerleave",w),g.addEventListener("pointerleave",S),()=>{h.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",S)}}},[h,g,y,v]),_.useEffect(()=>{if(l){const w=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},R=(h==null?void 0:h.contains(C))||(g==null?void 0:g.contains(C)),E=!P9(k,l);R?v():E&&(v(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[h,g,l,d,v]),f.jsx(iN,{...e,ref:o})}),[N9,A9]=vp(ad,{isInside:!1}),D9=AP("TooltipContent"),iN=_.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,h=Md(uc,n),d=_p(n),{onClose:g}=h;return _.useEffect(()=>(document.addEventListener(Mb,g),()=>document.removeEventListener(Mb,g)),[g]),_.useEffect(()=>{if(h.trigger){const p=v=>{const y=v.target;y!=null&&y.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),f.jsx(_c,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:f.jsxs(pp,{"data-state":h.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(D9,{children:r}),f.jsx(N9,{scope:n,isInside:!0,children:f.jsx(S9,{id:h.contentId,role:"tooltip",children:s||r})})]})})});rN.displayName=uc;var sN="TooltipArrow",j9=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=_p(n);return A9(sN,n).isInside?null:f.jsx(gp,{...s,...r,ref:t})});j9.displayName=sN;function O9(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function L9(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function z9(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function P9(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],h=t[l],d=u.x,g=u.y,p=h.x,v=h.y;g>r!=v>r&&n<(p-d)*(r-g)/(v-g)+d&&(s=!s)}return s}function B9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),I9(t)}function I9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var H9=JM,oN=eN,aN=tN,lN=nN,j0=rN;function F9({className:e,...t}){return f.jsx("kbd",{className:pe("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 bg-muted/50 px-1.5 font-mono text-[11px] font-medium text-current select-none",e),...t})}function U9({className:e,...t}){return f.jsx("span",{className:pe("inline-flex items-center gap-0.5",e),...t})}const $9="z-50 overflow-hidden rounded-md border border-border backdrop-blur-md p-0.5 text-[11px] font-medium text-card-foreground shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",W9=H9,ds=oN,hs=aN,Ii=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(lN,{children:f.jsx(j0,{ref:r,sideOffset:t,className:pe("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border backdrop-blur-md px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ii.displayName=j0.displayName;const Ou=oN,Lu=aN;function cN(e){return e.toUpperCase()}function V9(e){const t=e.split("+");return f.jsx(U9,{children:t.map((n,r)=>f.jsx(F9,{children:cN(n)},`${n}-${r}`))})}const Zl=_.forwardRef(({className:e,sideOffset:t=4,children:n,shortcut:r,...s},o)=>{const l=r===void 0?null:Array.isArray(r)?r[0]??null:r;return f.jsx(lN,{children:f.jsx(j0,{ref:o,sideOffset:t,className:pe($9,e),...s,children:l?V9(l):f.jsx("span",{children:typeof n=="string"?cN(n):n})})})});Zl.displayName="HotkeyTooltipContent";const q9="0.1.0",K9={version:q9},Mn="Kaizen",Vk="kaizen",G9=".kaizen",Y9=".kaizen-dev",__=".kaizen",X9="KAIZEN_RUNTIME_PROFILE",O0=`kaizen/${K9.version}`,Z9="[kaizen]",Q9=`~/${Mn}`,bp="kaizen:";function yp(){var t;return(t=globalThis.process)==null?void 0:t.env}function J9(e=yp()){const t=e==null?void 0:e[X9];return(t==null?void 0:t.trim().toLowerCase())==="dev"?"dev":"prod"}function e7(e=yp()){return J9(e)==="dev"?Y9:G9}function t7(e=yp()){return`~/${e7(e)}`}function n7(e=yp()){return`${t7(e)}/keybindings.json`}function wf(e){return e?`${Vk} ${e}`:Vk}const Sm=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],Ab=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],Db=[{id:"off",label:"Off"},{id:"standard",label:"Standard"},{id:"high",label:"High"}],jb="claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",uN=[{id:"composer-2[fast=true]",label:"Composer 2",supportsEffort:!1},{id:"composer-1.5[]",label:"Composer 1.5",supportsEffort:!1},{id:"gpt-5.3-codex[reasoning=medium,fast=false]",label:"Codex 5.3",supportsEffort:!1},{id:"gpt-5.4[reasoning=medium,context=272k,fast=false]",label:"GPT-5.4",supportsEffort:!1},{id:"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]",label:"Sonnet 4.6",supportsEffort:!1},{id:"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",label:"Opus 4.6",supportsEffort:!1},{id:"claude-opus-4-5[thinking=true]",label:"Opus 4.5",supportsEffort:!1},{id:"gpt-5.2[reasoning=medium,fast=false]",label:"GPT-5.2",supportsEffort:!1},{id:"gemini-3.1-pro[]",label:"Gemini 3.1 Pro",supportsEffort:!1},{id:"gpt-5.4-mini[reasoning=medium]",label:"GPT-5.4 Mini",supportsEffort:!1},{id:"gpt-5.4-nano[reasoning=medium]",label:"GPT-5.4 Nano",supportsEffort:!1},{id:"claude-haiku-4-5[thinking=true]",label:"Haiku 4.5",supportsEffort:!1},{id:"gpt-5.3-codex-spark[reasoning=medium]",label:"Codex 5.3 Spark",supportsEffort:!1},{id:"grok-4-20[thinking=true]",label:"Grok 4.20",supportsEffort:!1},{id:"claude-sonnet-4-5[thinking=true,context=200k]",label:"Sonnet 4.5",supportsEffort:!1},{id:"gpt-5.2-codex[reasoning=medium,fast=false]",label:"Codex 5.2",supportsEffort:!1},{id:"gemini-3-flash[]",label:"Gemini 3 Flash",supportsEffort:!1},{id:"claude-sonnet-4[thinking=false,context=200k]",label:"Sonnet 4",supportsEffort:!1},{id:"kimi-k2.5[]",label:"Kimi K2.5",supportsEffort:!1}],r7={"composer-2-fast":"composer-2[fast=true]","composer-1.5":"composer-1.5[]","gpt-5.3-codex":"gpt-5.3-codex[reasoning=medium,fast=false]","gpt-5.4":"gpt-5.4[reasoning=medium,context=272k,fast=false]","gpt-5.4-medium":"gpt-5.4[reasoning=medium,context=272k,fast=false]","claude-4.6-sonnet-medium-thinking":"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]","claude-4.6-opus-high-thinking":"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]","claude-4.5-opus-high-thinking":"claude-opus-4-5[thinking=true]","gpt-5.2":"gpt-5.2[reasoning=medium,fast=false]","gemini-3.1-pro":"gemini-3.1-pro[]","gpt-5.4-mini":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-mini-medium":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-nano":"gpt-5.4-nano[reasoning=medium]","gpt-5.4-nano-medium":"gpt-5.4-nano[reasoning=medium]","claude-haiku-4.5":"claude-haiku-4-5[thinking=true]","gpt-5.3-codex-spark-preview":"gpt-5.3-codex-spark[reasoning=medium]","grok-4-20":"grok-4-20[thinking=true]","grok-4-20-thinking":"grok-4-20[thinking=true]","claude-4.5-sonnet-thinking":"claude-sonnet-4-5[thinking=true,context=200k]","gpt-5.2-codex":"gpt-5.2-codex[reasoning=medium,fast=false]","gemini-3-flash":"gemini-3-flash[]","claude-4-sonnet":"claude-sonnet-4[thinking=false,context=200k]","kimi-k2.5":"kimi-k2.5[]"};function i7(e){return e?uN.some(t=>t.id===e)?e:r7[e]??jb:jb}function qk(e){const t=e.indexOf("[");return t>=0?e.slice(0,t):e}function Yl(e){const t=e.match(/\bfast=(true|false)\b/);return t?t[1]==="true"?"fast":"standard":null}function Kk(e){return Sm.some(t=>t.id===e)}function Gk(e){return Ab.some(t=>t.id===e)}const Ob=[{id:"200k",label:"200k"},{id:"1m",label:"1M"}];function s7(e){return Db.some(t=>t.id===e)}const Ko=[{id:"claude",label:"Claude",systemActive:!0,defaultModel:"sonnet",defaultEffort:"high",defaultModelOptions:{reasoningEffort:"high",contextWindow:"200k"},supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0,contextWindowOptions:[...Ob]},{id:"sonnet",label:"Sonnet",supportsEffort:!0,contextWindowOptions:[...Ob]},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...Sm]},{id:"codex",label:"Codex",systemActive:!0,defaultModel:"gpt-5.4",defaultModelOptions:{reasoningEffort:"high",fastMode:!1},supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]},{id:"gemini",label:"Gemini",systemActive:!1,defaultModel:"auto-gemini-2.5",defaultModelOptions:{thinkingMode:"standard"},supportsPlanMode:!0,models:[{id:"auto-gemini-3",label:"Auto (Gemini 3)",supportsEffort:!1},{id:"auto-gemini-2.5",label:"Auto (Gemini 2.5)",supportsEffort:!1},{id:"gemini-3.1-pro-preview",label:"3.1 Pro Preview",supportsEffort:!1},{id:"gemini-3-pro-preview",label:"3 Pro Preview",supportsEffort:!1},{id:"gemini-3-flash-preview",label:"3 Flash Preview",supportsEffort:!1},{id:"gemini-2.5-pro",label:"2.5 Pro",supportsEffort:!1},{id:"gemini-2.5-flash",label:"2.5 Flash",supportsEffort:!1},{id:"gemini-2.5-flash-lite",label:"2.5 Flash Lite",supportsEffort:!1}],efforts:[]},{id:"cursor",label:"Cursor",systemActive:!0,defaultModel:jb,defaultModelOptions:{},supportsPlanMode:!0,models:[...uN],efforts:[]}],Wn={claude:{active:!0},codex:{active:!0},gemini:{active:!0},cursor:{active:!0}};function Jt(e){const t=Ko.find(n=>n.id===e);if(!t)throw new Error(`Unknown provider: ${e}`);return t}function L0(e,t){const n=Wn[t],r=e==null?void 0:e[t];return{active:(r==null?void 0:r.active)??n.active}}function o7(e,t){const n=Jt(e),r=L0(t,e);return n.systemActive&&r.active?null:`Provider ${n.label} is currently not active.`}function Yk(e,t){const n=Jt(e),r=L0(t,e);return n.systemActive&&r.active}function a7(e){return Ko.map(t=>{const n=L0(e,t.id),r=t.systemActive&&n.active;return{...t,active:n.active,isSelectable:r,isUsageEnabled:r,isInactive:!r,inactiveMessage:o7(t.id,e)}})}function z0(e){return a7(e).filter(t=>t.isSelectable).map(({active:t,isSelectable:n,isUsageEnabled:r,isInactive:s,inactiveMessage:o,...l})=>l)}function Ri(e){return Jt(e).defaultModelOptions}const dN=Ri("claude");Ri("codex");Ri("gemini");Ri("cursor");function l7(e){return Jt("claude").models.find(t=>t.id===e)}function c7(e){var t;return((t=l7(e))==null?void 0:t.contextWindowOptions)??[]}function u7(e,t){const n=c7(e);if(n.length!==0)return n.some(r=>r.id===t)?t:dN.contextWindow}const d7=["idea","todo","progress","testing","done"],Xk={idea:"IDEA",todo:"TODO",progress:"PROGRESS",testing:"TESTING",done:"DONE"},os={submitChatMessage:["enter"],toggleProjectsSidebar:["ctrl+a"],toggleEmbeddedTerminal:["cmd+j","ctrl+`"],toggleRightSidebar:["cmd+b","ctrl+b"],openInFinder:["cmd+alt+f","ctrl+alt+f"],openInEditor:["cmd+shift+o","ctrl+shift+o"],addSplitTerminal:["cmd+/","ctrl+/"]},Zk=8,h7=10*1024*1024,Qk=["image/png","image/jpeg","image/webp","image/gif"];var xp="Popover",[hN]=to(xp,[ea]),Nd=ea(),[f7,ta]=hN(xp),fN=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!1}=e,u=Nd(t),h=_.useRef(null),[d,g]=_.useState(!1),[p,v]=lc({prop:r,defaultProp:s??!1,onChange:o,caller:xp});return f.jsx(mp,{...u,children:f.jsx(f7,{scope:t,contentId:Gs(),triggerRef:h,open:p,onOpenChange:v,onOpenToggle:_.useCallback(()=>v(y=>!y),[v]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>g(!0),[]),onCustomAnchorRemove:_.useCallback(()=>g(!1),[]),modal:l,children:n})})};fN.displayName=xp;var mN="PopoverAnchor",pN=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(mN,n),o=Nd(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=s;return _.useEffect(()=>(l(),()=>u()),[l,u]),f.jsx(Td,{...o,...r,ref:t})});pN.displayName=mN;var gN="PopoverTrigger",vN=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(gN,n),o=Nd(n),l=Ut(t,s.triggerRef),u=f.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":wN(s.open),...r,ref:l,onClick:Be(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:f.jsx(Td,{asChild:!0,...o,children:u})});vN.displayName=gN;var P0="PopoverPortal",[m7,p7]=hN(P0,{forceMount:void 0}),_N=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,o=ta(P0,t);return f.jsx(m7,{scope:t,forceMount:n,children:f.jsx(Ai,{present:n||o.open,children:f.jsx(bc,{asChild:!0,container:s,children:r})})})};_N.displayName=P0;var dc="PopoverContent",bN=_.forwardRef((e,t)=>{const n=p7(dc,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,o=ta(dc,e.__scopePopover);return f.jsx(Ai,{present:r||o.open,children:o.modal?f.jsx(v7,{...s,ref:t}):f.jsx(_7,{...s,ref:t})})});bN.displayName=dc;var g7=Fa("PopoverContent.RemoveScroll"),v7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(null),s=Ut(t,r),o=_.useRef(!1);return _.useEffect(()=>{const l=r.current;if(l)return tp(l)},[]),f.jsx(Cd,{as:g7,allowPinchZoom:!0,children:f.jsx(yN,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),o.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,d=u.button===2||h;o.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Be(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),_7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return f.jsx(yN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var h,d;(h=e.onInteractOutside)==null||h.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),yN=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,...p}=e,v=ta(dc,n),y=Nd(n);return Jm(),f.jsx(Sd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:f.jsx(_c,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(pp,{"data-state":wN(v.open),role:"dialog",id:v.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),xN="PopoverClose",b7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(xN,n);return f.jsx(Tt.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,()=>s.onOpenChange(!1))})});b7.displayName=xN;var y7="PopoverArrow",x7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Nd(n);return f.jsx(gp,{...s,...r,ref:t})});x7.displayName=y7;function wN(e){return e?"open":"closed"}var SN=fN,w7=pN,S7=vN,CN=_N,B0=bN;const kN=SN,EN=S7,I0=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(CN,{children:f.jsx(B0,{ref:s,align:t,sideOffset:n,[sd]:"",onCloseAutoFocus:o=>{var l;o.preventDefault(),window.dispatchEvent(new Event(vm)),(l=r.onCloseAutoFocus)==null||l.call(r,o)},className:pe("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg backdrop-blur-md outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));I0.displayName=B0.displayName;function C7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function k7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}function E7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0C12 0 12 8 8 12C4 16 0 12 0 12C0 12 4 12 8 12C12 12 12 16 12 24C12 24 12 16 16 12C20 8 24 12 24 12C24 12 16 12 16 12C12 12 12 4 12 0Z"})})}function R7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0 2.4 5.5v13L12 24l9.6-5.5v-13Zm0 3.1 6.8 3.9v5.1L15 14.3V9.7L12 8l-3 1.7v4.6l-3.8-2.2V7Zm-6.8 9.8 3.8 2.2v4.5l3 1.8 3-1.8v-4.5l3.8-2.2v3.8L12 20.9l-6.8-3.9Z"})})}function T7(e){return!(e.startsWith("gemini-3")||e==="auto-gemini-3")}const M7=["Composer","GPT","Claude","Gemini","Grok","Kimi"];function N7(e){return e.startsWith("composer-")?"Composer":e.startsWith("gpt-")?"GPT":e.startsWith("claude-")?"Claude":e.startsWith("gemini-")?"Gemini":e.startsWith("grok-")?"Grok":"Kimi"}function b_(e,t){const n=Yl(t);return!n||n==="standard"?e:`${e} (${n==="fast"?"Fast":"Standard"})`}const Cm={claude:C7,codex:k7,gemini:E7,cursor:R7},Sf={auto:Tn,opus:ti,sonnet:Tn,haiku:ls,"gpt-5.4":ti,"gpt-5.4[reasoning=medium,context=272k,fast=false]":ti,"gpt-5.4-mini[reasoning=medium]":Tn,"gpt-5.4-nano[reasoning=medium]":ls,"gpt-5.3-codex":Tn,"gpt-5.3-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark[reasoning=medium]":ls,"gpt-5.2[reasoning=medium,fast=false]":Tn,"gpt-5.2-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark":ls,"gemini-2.5-pro":ti,"gemini-2.5-flash":Tn,"gemini-2.5-flash-lite":ls,"auto-gemini-3":ti,"auto-gemini-2.5":Tn,"gemini-3.1-pro-preview":ti,"gemini-3.1-pro[]":ti,"gemini-3-flash[]":Tn,"gemini-3-pro-preview":ti,"gemini-3-flash-preview":Tn,"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]":ti,"claude-opus-4-5[thinking=true]":ti,"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]":Tn,"claude-sonnet-4-5[thinking=true,context=200k]":Tn,"claude-sonnet-4[thinking=false,context=200k]":Tn,"claude-haiku-4-5[thinking=true]":ls,"grok-4-20[thinking=true]":ti,"kimi-k2.5[]":Tn,"composer-2[fast=true]":ti,"composer-1.5[]":Tn};function Ir({onClick:e,selected:t,icon:n,label:r,description:s,disabled:o}){return f.jsxs("button",{onClick:e,disabled:o,className:pe("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",t?"bg-muted border-border":"hover:opacity-60",o&&"opacity-40 cursor-not-allowed"),children:[n,f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium",children:r}),s?f.jsx("div",{className:"text-xs text-muted-foreground",children:s}):null]})]})}function Po({trigger:e,triggerClassName:t,disabled:n=!1,children:r}){const[s,o]=_.useState(!1);return n?f.jsx("button",{disabled:!0,className:pe("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",t),children:e}):f.jsxs(kN,{open:s,onOpenChange:o,children:[f.jsx(EN,{asChild:!0,children:f.jsx("button",{className:pe("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",t),children:e})}),f.jsx(I0,{align:"center",className:"w-64 p-1",children:f.jsx("div",{className:"max-h-[min(24rem,60vh)] space-y-1 overflow-y-auto pr-1",children:typeof r=="function"?r(()=>o(!1)):r})})]})}function zu({availableProviders:e,selectedProvider:t,disabled:n=!1,showProviderPicker:r=!0,providerLocked:s=!1,model:o,modelOptions:l,onProviderChange:u,onModelChange:h,onClaudeReasoningEffortChange:d,onClaudeContextWindowChange:g,onCodexReasoningEffortChange:p,onGeminiThinkingModeChange:v,onCodexFastModeChange:y,planMode:w=!1,onPlanModeChange:S,includePlanMode:C=!0,className:k}){var F,N,B,X,A,ne,ae;const[R,E]=_.useState(null),M=e.find(Z=>Z.id===t)??Jt(t),j=Cm[t],D=Sf[o]??Tn,L=C&&(M==null?void 0:M.supportsPlanMode)&&S,$=t==="claude"?l:null,Y=t==="codex"?l:null,P=t==="gemini"?l:null,V=((F=M.models.find(Z=>Z.id===o))==null?void 0:F.contextWindowOptions)??[],I=($==null?void 0:$.contextWindow)??Ob[0].id,W=I==="1m"?Mk:Nk,K=t==="claude"||t==="codex",q=t==="cursor"?Yl(o):null,O=M.id==="cursor"?M.models.filter(Z=>qk(Z.id)===qk(o)):[],H=t==="cursor"&&O.some(Z=>Yl(Z.id)==="fast")&&O.some(Z=>Yl(Z.id)==="standard"),U=M.id==="cursor"?M7.map(Z=>({family:Z,models:M.models.filter(te=>N7(te.id)===Z)})).filter(Z=>Z.models.length>0):[];return _.useEffect(()=>{E(null)},[t]),f.jsx("div",{className:pe("max-w-full overflow-x-auto scrollbar-hide",n&&"pointer-events-none opacity-60",k),children:f.jsxs("div",{className:"flex w-max items-center justify-center gap-0.5 mx-auto",children:[r?f.jsx(Po,{disabled:s||!u,trigger:f.jsxs(f.Fragment,{children:[f.jsx(j,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:(M==null?void 0:M.label)??t})]}),children:Z=>e.map(te=>{const le=Cm[te.id];return f.jsx(Ir,{onClick:()=>{u==null||u(te.id),Z()},selected:t===te.id,icon:f.jsx(le,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id)})}):null,f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(D,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:M.id==="cursor"?b_(((N=M.models.find(Z=>Z.id===o))==null?void 0:N.label)??o,o):((B=M.models.find(Z=>Z.id===o))==null?void 0:B.label)??o})]}),children:Z=>{var te;return M.id==="cursor"?R?f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>E(null),className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground transition-opacity hover:opacity-70",children:[f.jsx(_M,{className:"h-4 w-4"}),f.jsx("span",{children:R})]}),(te=U.find(le=>le.family===R))==null?void 0:te.models.map(le=>{const me=Sf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),E(null),Z()},selected:o===le.id,icon:f.jsx(me,{className:"h-4 w-4 text-muted-foreground"}),label:b_(le.label,le.id)},le.id)})]}):U.map(le=>{var Ae;const me=le.models.some(Re=>Re.id===o),xe=Sf[((Ae=le.models[0])==null?void 0:Ae.id)??""]??Tn;return f.jsxs("div",{className:"relative",children:[f.jsx(Ir,{onClick:()=>E(le.family),selected:me,icon:f.jsx(xe,{className:"h-4 w-4 text-muted-foreground"}),label:le.family,description:`${le.models.length} model${le.models.length===1?"":"s"}`}),f.jsx(Tr,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]},le.family)}):M.models.map(le=>{const me=Sf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),Z()},selected:o===le.id,icon:f.jsx(me,{className:"h-4 w-4 text-muted-foreground"}),label:M.id==="cursor"?b_(le.label,le.id):le.label},le.id)})}}),H?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[q==="fast"?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:q==="fast"?"Fast":"Standard"})]}),triggerClassName:q==="fast"?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[O.filter(te=>Yl(te.id)==="standard").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:o===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"},te.id)),O.filter(te=>Yl(te.id)==="fast").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:o===te.id,icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast"},te.id))]})}):null,K?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:t==="claude"?((X=Sm.find(Z=>Z.id===l.reasoningEffort))==null?void 0:X.label)??l.reasoningEffort:((A=Ab.find(Z=>Z.id===l.reasoningEffort))==null?void 0:A.label)??l.reasoningEffort})]}),children:Z=>t==="claude"?Sm.map(te=>f.jsx(Ir,{onClick:()=>{d(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="max"&&o!=="opus"},te.id)):Ab.map(te=>f.jsx(Ir,{onClick:()=>{p(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id))}):null,t==="claude"&&V.length>1?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(W,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((ne=V.find(Z=>Z.id===I))==null?void 0:ne.label)??I})]}),children:Z=>V.map(te=>f.jsx(Ir,{onClick:()=>{g(te.id),Z()},selected:I===te.id,icon:te.id==="1m"?f.jsx(Mk,{className:"h-4 w-4 text-muted-foreground"}):f.jsx(Nk,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,description:te.id==="1m"?"Expanded context window":"Standard context window"},te.id))}):null,t==="gemini"?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((ae=Db.find(Z=>Z.id===(P==null?void 0:P.thinkingMode)))==null?void 0:ae.label)??(P==null?void 0:P.thinkingMode)??"Standard"})]}),children:Z=>Db.map(te=>f.jsx(Ir,{onClick:()=>{v(te.id),Z()},selected:(P==null?void 0:P.thinkingMode)===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="off"&&!T7(o)},te.id))}):null,t==="codex"?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[Y!=null&&Y.fastMode?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:Y!=null&&Y.fastMode?"Fast Mode":"Standard"})]}),triggerClassName:Y!=null&&Y.fastMode?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{y(!1),Z()},selected:!(Y!=null&&Y.fastMode),icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"}),f.jsx(Ir,{onClick:()=>{y(!0),Z()},selected:!!(Y!=null&&Y.fastMode),icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode"})]})}):null,L?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[w?f.jsx(pm,{className:"h-3.5 w-3.5"}):f.jsx(Rk,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:w?"Plan":"Implement"}),f.jsx("span",{className:"md:hidden",children:w?"Plan":"Impl"})]}),triggerClassName:w?"text-blue-400 dark:text-blue-300":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{S(!1),Z()},selected:!w,icon:f.jsx(Rk,{className:"h-4 w-4 text-muted-foreground"}),label:"Implement",description:"Start execution"}),f.jsx(Ir,{onClick:()=>{S(!0),Z()},selected:w,icon:f.jsx(pm,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan",description:"Review a plan before execution"})]})}):null]})})}const wp=({children:e,className:t,shimmerWidth:n=100,animate:r=!0,...s})=>f.jsx("span",{style:{"--shiny-width":`${Math.min(n,100)}px`},className:pe("mx-auto max-w-md text-foreground/50",r?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],t),...s,children:e});function Lb(e){return e.split(/[\s_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const A7=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function D7(e){const t=e.trim();for(const n of A7){const r=t.match(n);if(!r)continue;const s=(r[2]??r[1]??"").trim();if(s)return s}return t}function km(e){return e.split("/").pop()||e}function j7(e,t){if(e===void 0)return null;const n=Math.max(0,t-e),r=6e4,s=60*r,o=24*s,l=7*o;return n<r?"now":n<s?`${Math.floor(n/r)}m`:n<o?`${Math.floor(n/s)}h`:n<l?`${Math.floor(n/o)}d`:`${Math.floor(n/l)}w`}const O7='button, select, input, textarea, [role="combobox"], [role="listbox"], [data-no-touch-drag]';function Jk(e){var t;try{(t=navigator.vibrate)==null||t.call(navigator,e)}catch{}}function H0({enabled:e,visualElementRef:t,onTap:n,onContextMenu:r,onDragStart:s,onDragMove:o,onDragEnd:l,holdDelay:u=300,contextMenuDelay:h=2500,scrollThreshold:d=8,dragMoveThreshold:g=5}){const[p,v]=_.useState(!1),[y,w]=_.useState(!1),[S,C]=_.useState(null),[k,R]=_.useState(null),E=_.useCallback(O=>{R(O)},[]),M=_.useRef("idle"),j=_.useRef({x:0,y:0}),D=_.useRef(null),L=_.useRef(null),$=_.useRef(n),Y=_.useRef(r),P=_.useRef(s),V=_.useRef(o),I=_.useRef(l);$.current=n,Y.current=r,P.current=s,V.current=o,I.current=l;const W=_.useCallback((O,H)=>{const U=(t==null?void 0:t.current)??k;if(!U)return document.elementFromPoint(O,H);const F=U.style.pointerEvents;U.style.pointerEvents="none";const N=document.elementFromPoint(O,H);return U.style.pointerEvents=F,N},[t,k]),K=_.useCallback(()=>{D.current&&(clearTimeout(D.current),D.current=null),L.current&&(clearTimeout(L.current),L.current=null)},[]),q=_.useCallback(()=>{K(),M.current="idle",w(!1),v(!1),C(null)},[K]);return _.useEffect(()=>{if(!k||!e)return;const O=N=>{if(N.target.closest(O7))return;const B=N.touches[0];B&&(j.current={x:B.clientX,y:B.clientY},M.current="holding",D.current=setTimeout(()=>{D.current=null,M.current==="holding"&&(M.current="armed",w(!0),Jk(30),L.current=setTimeout(()=>{var A;if(L.current=null,M.current!=="armed")return;Jk(100);const X={...j.current};M.current="idle",w(!1),(A=Y.current)==null||A.call(Y,X)},h))},u))},H=N=>{var Z,te;const B=M.current;if(B==="idle")return;const X=N.touches[0];if(!X)return;const A=X.clientX-j.current.x,ne=X.clientY-j.current.y,ae=Math.sqrt(A*A+ne*ne);if(B==="holding"){ae>d&&(K(),M.current="idle");return}if(B==="armed"){ae>g&&(L.current&&(clearTimeout(L.current),L.current=null),M.current="dragging",w(!1),v(!0),C({x:X.clientX,y:X.clientY}),N.preventDefault(),(Z=P.current)==null||Z.call(P,{x:X.clientX,y:X.clientY}));return}if(B==="dragging"){N.preventDefault(),C({x:X.clientX,y:X.clientY});const le=W(X.clientX,X.clientY);(te=V.current)==null||te.call(V,{x:X.clientX,y:X.clientY,elementBelow:le})}},U=N=>{var X,A;const B=M.current;if(B==="holding"){K(),M.current="idle",w(!1),v(!1),N.preventDefault(),(X=$.current)==null||X.call($);return}if(B==="armed"){q();return}if(B==="dragging"){const ne=N.changedTouches[0];if(ne){const ae=W(ne.clientX,ne.clientY);(A=I.current)==null||A.call(I,{x:ne.clientX,y:ne.clientY,elementBelow:ae})}q()}},F=()=>{var N;M.current==="dragging"&&((N=I.current)==null||N.call(I,{x:0,y:0,elementBelow:null})),q()};return k.addEventListener("touchstart",O,{passive:!1}),k.addEventListener("touchmove",H,{passive:!1}),k.addEventListener("touchend",U),k.addEventListener("touchcancel",F),()=>{k.removeEventListener("touchstart",O),k.removeEventListener("touchmove",H),k.removeEventListener("touchend",U),k.removeEventListener("touchcancel",F),K(),M.current="idle"}},[k,e,u,h,d,g,K,q,W]),{touchRef:E,isDragging:p,isArmed:y,dragPosition:S}}function RN({position:e,children:t,className:n}){return e?Bi.createPortal(f.jsx("div",{style:{position:"fixed",left:e.x,top:e.y,transform:"translate(-50%, calc(-100% - 14px))",zIndex:9999,pointerEvents:"none",willChange:"transform"},className:pe("flex items-center gap-2 rounded-xl border-2 border-primary/60 bg-card px-3 py-2","shadow-[0_8px_32px_rgba(0,0,0,0.25)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.5)]","min-w-[120px] max-w-[240px]","scale-[1.04]",n),children:t}),document.body):null}const L7=new Set(["starting","running"]);function z7({chat:e,activeChatId:t,nowMs:n,showProviderIcon:r=!1,isCompleted:s=!1,onSelectChat:o,onDeleteChat:l,draggable:u=!1,onDragStart:h,onDragEnd:d,isTouchDevice:g=!1,onTouchDragMove:p,onTouchDragEnd:v}){const y=j7(e.lastMessageAt,n),w=g&&u,S=e.provider?Cm[e.provider]:null,{touchRef:C,isArmed:k,isDragging:R,dragPosition:E}=H0({enabled:w,onTap:()=>o(e.chatId),onDragStart:()=>h==null?void 0:h(e),onDragMove:({x:M,y:j,elementBelow:D})=>p==null?void 0:p(M,j,D),onDragEnd:({x:M,y:j,elementBelow:D})=>{v==null||v(M,j,D),d==null||d()}});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{ref:w?C:void 0,"data-chat-id":dk(e.chatId),className:pe("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-lg cursor-pointer border transition-all duration-150 select-none",t===dk(e.chatId)?"bg-muted hover:bg-muted border-border":"border-border/0 hover:border-border hover:bg-muted/20 dark:hover:border-slate-400/10",k&&"scale-[1.03] shadow-md ring-2 ring-primary/50 bg-card border-primary/40",R&&!k&&"opacity-20 scale-[0.98]"),draggable:u&&!g,onDragStart:u&&!g?()=>h==null?void 0:h(e):void 0,onDragEnd:u&&!g?d:void 0,onClick:g?void 0:()=>o(e.chatId),children:[L7.has(e.status)?f.jsx(oi,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):s?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-emerald-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-emerald-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,r&&S?f.jsx(S,{className:"size-3.5 flex-shrink-0 text-muted-foreground/80","aria-label":`${e.provider} provider`}):null,f.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?f.jsx(wp,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),f.jsxs("div",{className:"relative h-7 w-7 mr-[2px] shrink-0",children:[y?f.jsx("span",{className:"hidden md:flex absolute inset-0 items-center justify-end pr-1 text-[11px] text-muted-foreground opacity-50 transition-opacity group-hover:opacity-0",children:y}):null,f.jsx(Je,{variant:"ghost",size:"icon",className:pe("absolute inset-0 h-7 w-7 opacity-100 cursor-pointer rounded-sm hover:!bg-transparent !border-0",y?"md:opacity-0 md:group-hover:opacity-100":"opacity-100 md:opacity-0 md:group-hover:opacity-100"),"data-no-touch-drag":!0,onClick:M=>{M.stopPropagation(),l(e.chatId)},title:"Delete chat",children:f.jsx(a6,{className:"size-3.5"})})]})]},e._id),f.jsx(RN,{position:E,children:f.jsx("span",{className:"text-sm font-medium truncate",children:e.title})})]})}function P7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const Sp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function F0(e){return"nodeType"in e}function Wr(e){var t,n;return e?wc(e)?e:F0(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function U0(e){const{Document:t}=Wr(e);return e instanceof t}function Ad(e){return wc(e)?!1:e instanceof Wr(e).HTMLElement}function TN(e){return e instanceof Wr(e).SVGElement}function Sc(e){return e?wc(e)?e.document:F0(e)?U0(e)?e:Ad(e)||TN(e)?e.ownerDocument:document:document:document}const _s=Sp?_.useLayoutEffect:_.useEffect;function $0(e){const t=_.useRef(e);return _s(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function B7(){const e=_.useRef(null),t=_.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ld(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return _s(()=>{n.current!==e&&(n.current=e)},t),n}function Dd(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Em(e){const t=$0(e),n=_.useRef(null),r=_.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function zb(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}let y_={};function jd(e,t){return _.useMemo(()=>{if(t)return t;const n=y_[e]==null?0:y_[e]+1;return y_[e]=n,e+"-"+n},[e,t])}function MN(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,l)=>{const u=Object.entries(l);for(const[h,d]of u){const g=o[h];g!=null&&(o[h]=g+e*d)}return o},{...t})}}const ic=MN(1),Rm=MN(-1);function I7(e){return"clientX"in e&&"clientY"in e}function W0(e){if(!e)return!1;const{KeyboardEvent:t}=Wr(e.target);return t&&e instanceof t}function H7(e){if(!e)return!1;const{TouchEvent:t}=Wr(e.target);return t&&e instanceof t}function Pb(e){if(H7(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return I7(e)?{x:e.clientX,y:e.clientY}:null}const cd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[cd.Translate.toString(e),cd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),e2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function F7(e){return e.matches(e2)?e:e.querySelector(e2)}const U7={display:"none"};function $7(e){let{id:t,value:n}=e;return ye.createElement("div",{id:t,style:U7},n)}function W7(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function V7(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const NN=_.createContext(null);function q7(e){const t=_.useContext(NN);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function K7(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:s,event:o}=r;e.forEach(l=>{var u;return(u=l[s])==null?void 0:u.call(l,o)})},[e]),t]}const G7={draggable:`
469
+ 6. Paste it here.`;function l8({open:e,onOpenChange:t,onSubmit:n}){const r=_.useRef(null),[s,o]=_.useState(""),[l,u]=_.useState(!1);_.useEffect(()=>{e&&(o(""),setTimeout(()=>{var p;return(p=r.current)==null?void 0:p.focus()},0))},[e]);async function h(){const p=await navigator.clipboard.readText();o(p)}async function d(){await navigator.clipboard.writeText(jk),u(!0),setTimeout(()=>u(!1),2e3)}const g=s.trim().length>0;return f.jsx(sp,{open:e,onOpenChange:t,children:f.jsx(Ed,{size:"lg",children:f.jsxs("form",{onSubmit:p=>{p.preventDefault(),g&&n(s.trim())},children:[f.jsxs(ap,{className:"space-y-4",children:[f.jsx(op,{children:"Import Cursor Session"}),f.jsxs(w0,{children:["Paste the copied ",f.jsx("code",{children:"get-current-period-usage"})," curl command and Kaizen will import the session for you."]}),f.jsx("div",{className:"rounded-xl border border-border bg-card px-3 py-3 text-sm text-muted-foreground whitespace-pre-line",children:jk}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>void h(),children:"Paste Clipboard"}),f.jsxs(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>void d(),children:[l?f.jsx($i,{className:"h-4 w-4"}):f.jsx(kd,{className:"h-4 w-4"}),f.jsx("span",{className:"ml-1",children:l?"Copied":"Copy Steps"})]})]}),f.jsx(cp,{ref:r,value:s,onChange:p=>o(p.target.value),rows:10,placeholder:"Paste the copied curl command here",className:"font-mono text-xs"})]}),f.jsxs(lp,{children:[f.jsx(Je,{type:"button",variant:"ghost",size:"sm",onClick:()=>t(!1),children:"Cancel"}),f.jsx(Je,{type:"submit",variant:"secondary",size:"sm",disabled:!g,children:"Import Session"})]})]})})})}const c8=["top","right","bottom","left"],Zo=Math.min,ri=Math.max,bm=Math.round,xf=Math.floor,gs=e=>({x:e,y:e}),u8={left:"right",right:"left",bottom:"top",top:"bottom"};function Eb(e,t,n){return ri(e,Zo(t,n))}function Zs(e,t){return typeof e=="function"?e(t):e}function Qs(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function S0(e){return e==="x"?"y":"x"}function C0(e){return e==="y"?"height":"width"}function us(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function k0(e){return S0(us(e))}function d8(e,t,n){n===void 0&&(n=!1);const r=yc(e),s=k0(e),o=C0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=ym(l)),[l,ym(l)]}function h8(e){const t=ym(e);return[Rb(e),t,Rb(t)]}function Rb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ok=["left","right"],Lk=["right","left"],f8=["top","bottom"],m8=["bottom","top"];function p8(e,t,n){switch(e){case"top":case"bottom":return n?t?Lk:Ok:t?Ok:Lk;case"left":case"right":return t?f8:m8;default:return[]}}function g8(e,t,n,r){const s=yc(e);let o=p8(Qs(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(Rb)))),o}function ym(e){const t=Qs(e);return u8[t]+e.slice(t.length)}function v8(e){return{top:0,right:0,bottom:0,left:0,...e}}function MM(e){return typeof e!="number"?v8(e):{top:e,right:e,bottom:e,left:e}}function xm(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function zk(e,t,n){let{reference:r,floating:s}=e;const o=us(t),l=k0(t),u=C0(l),h=Qs(t),d=o==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[u]/2-s[u]/2;let y;switch(h){case"top":y={x:g,y:r.y-s.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}switch(yc(t)){case"start":y[l]-=v*(n&&d?-1:1);break;case"end":y[l]+=v*(n&&d?-1:1);break}return y}async function _8(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=Zs(t,e),w=MM(y),C=u[v?p==="floating"?"reference":"floating":p],k=xm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:g,strategy:h})),R=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),M=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},j=xm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:E,strategy:h}):R);return{top:(k.top-j.top+w.top)/M.y,bottom:(j.bottom-k.bottom+w.bottom)/M.y,left:(k.left-j.left+w.left)/M.x,right:(j.right-k.right+w.right)/M.x}}const b8=50,y8=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:_8},h=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=zk(d,r,h),v=r,y=0;const w={};for(let S=0;S<o.length;S++){const C=o[S];if(!C)continue;const{name:k,fn:R}=C,{x:E,y:M,data:j,reset:D}=await R({x:g,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:d,platform:u,elements:{reference:e,floating:t}});g=E??g,p=M??p,w[k]={...w[k],...j},D&&y<b8&&(y++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(d=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:g,y:p}=zk(d,v,h)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:w}},x8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:h}=t,{element:d,padding:g=0}=Zs(e,t)||{};if(d==null)return{};const p=MM(g),v={x:n,y:r},y=k0(s),w=C0(y),S=await l.getDimensions(d),C=y==="y",k=C?"top":"left",R=C?"bottom":"right",E=C?"clientHeight":"clientWidth",M=o.reference[w]+o.reference[y]-v[y]-o.floating[w],j=v[y]-o.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let L=D?D[E]:0;(!L||!await(l.isElement==null?void 0:l.isElement(D)))&&(L=u.floating[E]||o.floating[w]);const $=M/2-j/2,Y=L/2-S[w]/2-1,P=Zo(p[k],Y),V=Zo(p[R],Y),I=P,W=L-S[w]-V,K=L/2-S[w]/2+$,q=Eb(I,K,W),O=!h.arrow&&yc(s)!=null&&K!==q&&o.reference[w]/2-(K<I?P:V)-S[w]/2<0,H=O?K<I?K-I:K-W:0;return{[y]:v[y]+H,data:{[y]:q,centerOffset:K-q-H,...O&&{alignmentOffset:H}},reset:O}}}),w8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=Zs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const k=Qs(s),R=us(u),E=Qs(u)===u,M=await(h.isRTL==null?void 0:h.isRTL(d.floating)),j=v||(E||!S?[ym(u)]:h8(u)),D=w!=="none";!v&&D&&j.push(...g8(u,S,w,M));const L=[u,...j],$=await h.detectOverflow(t,C),Y=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(g&&Y.push($[k]),p){const K=d8(s,l,M);Y.push($[K[0]],$[K[1]])}if(P=[...P,{placement:s,overflows:Y}],!Y.every(K=>K<=0)){var V,I;const K=(((V=o.flip)==null?void 0:V.index)||0)+1,q=L[K];if(q&&(!(p==="alignment"?R!==us(q):!1)||P.every(U=>us(U.placement)===R?U.overflows[0]>0:!0)))return{data:{index:K,overflows:P},reset:{placement:q}};let O=(I=P.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:I.placement;if(!O)switch(y){case"bestFit":{var W;const H=(W=P.filter(U=>{if(D){const F=us(U.placement);return F===R||F==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(F=>F>0).reduce((F,N)=>F+N,0)]).sort((U,F)=>U[1]-F[1])[0])==null?void 0:W[0];H&&(O=H);break}case"initialPlacement":O=u;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function Pk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bk(e){return c8.some(t=>e[t]>=0)}const S8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=Zs(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=Pk(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Bk(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),u=Pk(l,n.floating);return{data:{escapedOffsets:u,escaped:Bk(u)}}}default:return{}}}}},NM=new Set(["left","top"]);async function C8(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Qs(n),u=yc(n),h=us(n)==="y",d=NM.has(l)?-1:1,g=o&&h?-1:1,p=Zs(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),h?{x:y*g,y:v*d}:{x:v*d,y:y*g}}const k8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,h=await C8(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+h.x,y:o+h.y,data:{...h,placement:l}}}}},E8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:h={fn:k=>{let{x:R,y:E}=k;return{x:R,y:E}}},...d}=Zs(e,t),g={x:n,y:r},p=await o.detectOverflow(t,d),v=us(Qs(s)),y=S0(v);let w=g[y],S=g[v];if(l){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",E=w+p[k],M=w-p[R];w=Eb(E,w,M)}if(u){const k=v==="y"?"top":"left",R=v==="y"?"bottom":"right",E=S+p[k],M=S-p[R];S=Eb(E,S,M)}const C=h.fn({...t,[y]:w,[v]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[v]:u}}}}}},R8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:h=!0,crossAxis:d=!0}=Zs(e,t),g={x:n,y:r},p=us(s),v=S0(p);let y=g[v],w=g[p];const S=Zs(u,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const E=v==="y"?"height":"width",M=o.reference[v]-o.floating[E]+C.mainAxis,j=o.reference[v]+o.reference[E]-C.mainAxis;y<M?y=M:y>j&&(y=j)}if(d){var k,R;const E=v==="y"?"width":"height",M=NM.has(Qs(s)),j=o.reference[p]-o.floating[E]+(M&&((k=l.offset)==null?void 0:k[p])||0)+(M?0:C.crossAxis),D=o.reference[p]+o.reference[E]+(M?0:((R=l.offset)==null?void 0:R[p])||0)-(M?C.crossAxis:0);w<j?w=j:w>D&&(w=D)}return{[v]:y,[p]:w}}}},T8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:h=()=>{},...d}=Zs(e,t),g=await l.detectOverflow(t,d),p=Qs(s),v=yc(s),y=us(s)==="y",{width:w,height:S}=o.floating;let C,k;p==="top"||p==="bottom"?(C=p,k=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,C=v==="end"?"top":"bottom");const R=S-g.top-g.bottom,E=w-g.left-g.right,M=Zo(S-g[C],R),j=Zo(w-g[k],E),D=!t.middlewareData.shift;let L=M,$=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=R),D&&!v){const P=ri(g.left,0),V=ri(g.right,0),I=ri(g.top,0),W=ri(g.bottom,0);y?$=w-2*(P!==0||V!==0?P+V:ri(g.left,g.right)):L=S-2*(I!==0||W!==0?I+W:ri(g.top,g.bottom))}await h({...t,availableWidth:$,availableHeight:L});const Y=await l.getDimensions(u.floating);return w!==Y.width||S!==Y.height?{reset:{rects:!0}}:{}}}};function up(){return typeof window<"u"}function xc(e){return AM(e)?(e.nodeName||"").toLowerCase():"#document"}function ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(AM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AM(e){return up()?e instanceof Node||e instanceof ii(e).Node:!1}function Wi(e){return up()?e instanceof Element||e instanceof ii(e).Element:!1}function no(e){return up()?e instanceof HTMLElement||e instanceof ii(e).HTMLElement:!1}function Ik(e){return!up()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ii(e).ShadowRoot}function Rd(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function M8(e){return/^(table|td|th)$/.test(xc(e))}function dp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const N8=/transform|translate|scale|rotate|perspective|filter/,A8=/paint|layout|strict|content/,Ca=e=>!!e&&e!=="none";let p_;function E0(e){const t=Wi(e)?Vi(e):e;return Ca(t.transform)||Ca(t.translate)||Ca(t.scale)||Ca(t.rotate)||Ca(t.perspective)||!R0()&&(Ca(t.backdropFilter)||Ca(t.filter))||N8.test(t.willChange||"")||A8.test(t.contain||"")}function D8(e){let t=Qo(e);for(;no(t)&&!cc(t);){if(E0(t))return t;if(dp(t))return null;t=Qo(t)}return null}function R0(){return p_==null&&(p_=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),p_}function cc(e){return/^(html|body|#document)$/.test(xc(e))}function Vi(e){return ii(e).getComputedStyle(e)}function hp(e){return Wi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if(xc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ik(e)&&e.host||ys(e);return Ik(t)?t.host:t}function DM(e){const t=Qo(e);return cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:no(t)&&Rd(t)?t:DM(t)}function od(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=DM(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=ii(s);if(o){const u=Tb(l);return t.concat(l,l.visualViewport||[],Rd(s)?s:[],u&&n?od(u):[])}else return t.concat(s,od(s,[],n))}function Tb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jM(e){const t=Vi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=no(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=bm(n)!==o||bm(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function T0(e){return Wi(e)?e:e.contextElement}function rc(e){const t=T0(e);if(!no(t))return gs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=jM(t);let l=(o?bm(n.width):n.width)/r,u=(o?bm(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const j8=gs(0);function OM(e){const t=ii(e);return!R0()||!t.visualViewport?j8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ii(e)?!1:t}function $a(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=T0(e);let l=gs(1);t&&(r?Wi(r)&&(l=rc(r)):l=rc(e));const u=O8(o,n,r)?OM(o):gs(0);let h=(s.left+u.x)/l.x,d=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(o){const v=ii(o),y=r&&Wi(r)?ii(r):r;let w=v,S=Tb(w);for(;S&&r&&y!==w;){const C=rc(S),k=S.getBoundingClientRect(),R=Vi(S),E=k.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,M=k.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;h*=C.x,d*=C.y,g*=C.x,p*=C.y,h+=E,d+=M,w=ii(S),S=Tb(w)}}return xm({width:g,height:p,x:h,y:d})}function fp(e,t){const n=hp(e).scrollLeft;return t?t.left+n:$a(ys(e)).left+n}function LM(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fp(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function L8(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=ys(r),u=t?dp(t.floating):!1;if(r===l||u&&o)return n;let h={scrollLeft:0,scrollTop:0},d=gs(1);const g=gs(0),p=no(r);if((p||!p&&!o)&&((xc(r)!=="body"||Rd(l))&&(h=hp(r)),p)){const y=$a(r);d=rc(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const v=l&&!p&&!o?LM(l,h):gs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+g.x+v.x,y:n.y*d.y-h.scrollTop*d.y+g.y+v.y}}function z8(e){return Array.from(e.getClientRects())}function P8(e){const t=ys(e),n=hp(e),r=e.ownerDocument.body,s=ri(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ri(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fp(e);const u=-n.scrollTop;return Vi(r).direction==="rtl"&&(l+=ri(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}const Hk=25;function B8(e,t){const n=ii(e),r=ys(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,h=0;if(s){o=s.width,l=s.height;const g=R0();(!g||g&&t==="fixed")&&(u=s.offsetLeft,h=s.offsetTop)}const d=fp(r);if(d<=0){const g=r.ownerDocument,p=g.body,v=getComputedStyle(p),y=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=Hk&&(o-=w)}else d<=Hk&&(o+=d);return{width:o,height:l,x:u,y:h}}function I8(e,t){const n=$a(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=no(e)?rc(e):gs(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,h=s*o.x,d=r*o.y;return{width:l,height:u,x:h,y:d}}function Fk(e,t,n){let r;if(t==="viewport")r=B8(e,n);else if(t==="document")r=P8(ys(e));else if(Wi(t))r=I8(t,n);else{const s=OM(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return xm(r)}function zM(e,t){const n=Qo(e);return n===t||!Wi(n)||cc(n)?!1:Vi(n).position==="fixed"||zM(n,t)}function H8(e,t){const n=t.get(e);if(n)return n;let r=od(e,[],!1).filter(u=>Wi(u)&&xc(u)!=="body"),s=null;const o=Vi(e).position==="fixed";let l=o?Qo(e):e;for(;Wi(l)&&!cc(l);){const u=Vi(l),h=E0(l);!h&&u.position==="fixed"&&(s=null),(o?!h&&!s:!h&&u.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Rd(l)&&!h&&zM(e,l))?r=r.filter(g=>g!==l):s=u,l=Qo(l)}return t.set(e,r),r}function F8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?dp(t)?[]:H8(t,this._c):[].concat(n),r],u=Fk(t,l[0],s);let h=u.top,d=u.right,g=u.bottom,p=u.left;for(let v=1;v<l.length;v++){const y=Fk(t,l[v],s);h=ri(y.top,h),d=Zo(y.right,d),g=Zo(y.bottom,g),p=ri(y.left,p)}return{width:d-p,height:g-h,x:p,y:h}}function U8(e){const{width:t,height:n}=jM(e);return{width:t,height:n}}function $8(e,t,n){const r=no(t),s=ys(t),o=n==="fixed",l=$a(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const h=gs(0);function d(){h.x=fp(s)}if(r||!r&&!o)if((xc(t)!=="body"||Rd(s))&&(u=hp(t)),r){const y=$a(t,!0,o,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}else s&&d();o&&!r&&s&&d();const g=s&&!r&&!o?LM(s,u):gs(0),p=l.left+u.scrollLeft-h.x-g.x,v=l.top+u.scrollTop-h.y-g.y;return{x:p,y:v,width:l.width,height:l.height}}function g_(e){return Vi(e).position==="static"}function Uk(e,t){if(!no(e)||Vi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function PM(e,t){const n=ii(e);if(dp(e))return n;if(!no(e)){let s=Qo(e);for(;s&&!cc(s);){if(Wi(s)&&!g_(s))return s;s=Qo(s)}return n}let r=Uk(e,t);for(;r&&M8(r)&&g_(r);)r=Uk(r,t);return r&&cc(r)&&g_(r)&&!E0(r)?n:r||D8(e)||n}const W8=async function(e){const t=this.getOffsetParent||PM,n=this.getDimensions,r=await n(e.floating);return{reference:$8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function V8(e){return Vi(e).direction==="rtl"}const q8={convertOffsetParentRelativeRectToViewportRelativeRect:L8,getDocumentElement:ys,getClippingRect:F8,getOffsetParent:PM,getElementRects:W8,getClientRects:z8,getDimensions:U8,getScale:rc,isElement:Wi,isRTL:V8};function BM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K8(e,t){let n=null,r;const s=ys(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),o();const d=e.getBoundingClientRect(),{left:g,top:p,width:v,height:y}=d;if(u||t(),!v||!y)return;const w=xf(p),S=xf(s.clientWidth-(g+v)),C=xf(s.clientHeight-(p+y)),k=xf(g),E={rootMargin:-w+"px "+-S+"px "+-C+"px "+-k+"px",threshold:ri(0,Zo(1,h))||1};let M=!0;function j(D){const L=D[0].intersectionRatio;if(L!==h){if(!M)return l();L?l(!1,L):r=setTimeout(()=>{l(!1,1e-7)},1e3)}L===1&&!BM(d,e.getBoundingClientRect())&&l(),M=!1}try{n=new IntersectionObserver(j,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,E)}n.observe(e)}return l(!0),o}function G8(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,d=T0(e),g=s||o?[...d?od(d):[],...t?od(t):[]]:[];g.forEach(k=>{s&&k.addEventListener("scroll",n,{passive:!0}),o&&k.addEventListener("resize",n)});const p=d&&u?K8(d,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(k=>{let[R]=k;R&&R.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),d&&!h&&y.observe(d),t&&y.observe(t));let w,S=h?$a(e):null;h&&C();function C(){const k=$a(e);S&&!BM(S,k)&&n(),S=k,w=requestAnimationFrame(C)}return n(),()=>{var k;g.forEach(R=>{s&&R.removeEventListener("scroll",n),o&&R.removeEventListener("resize",n)}),p==null||p(),(k=y)==null||k.disconnect(),y=null,h&&cancelAnimationFrame(w)}}const Y8=k8,X8=E8,Z8=w8,Q8=T8,J8=S8,$k=x8,e9=R8,t9=(e,t,n)=>{const r=new Map,s={platform:q8,...n},o={...s.platform,_c:r};return y8(e,t,{...s,platform:o})};var n9=typeof document<"u",r9=function(){},Zf=n9?_.useLayoutEffect:r9;function wm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wm(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!wm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function IM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wk(e,t){const n=IM(e);return Math.round(t*n)/n}function v_(e){const t=_.useRef(e);return Zf(()=>{t.current=e}),t}function i9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:h,open:d}=e,[g,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=_.useState(r);wm(v,r)||y(r);const[w,S]=_.useState(null),[C,k]=_.useState(null),R=_.useCallback(U=>{U!==D.current&&(D.current=U,S(U))},[]),E=_.useCallback(U=>{U!==L.current&&(L.current=U,k(U))},[]),M=o||w,j=l||C,D=_.useRef(null),L=_.useRef(null),$=_.useRef(g),Y=h!=null,P=v_(h),V=v_(s),I=v_(d),W=_.useCallback(()=>{if(!D.current||!L.current)return;const U={placement:t,strategy:n,middleware:v};V.current&&(U.platform=V.current),t9(D.current,L.current,U).then(F=>{const N={...F,isPositioned:I.current!==!1};K.current&&!wm($.current,N)&&($.current=N,Bi.flushSync(()=>{p(N)}))})},[v,t,n,V,I]);Zf(()=>{d===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(U=>({...U,isPositioned:!1})))},[d]);const K=_.useRef(!1);Zf(()=>(K.current=!0,()=>{K.current=!1}),[]),Zf(()=>{if(M&&(D.current=M),j&&(L.current=j),M&&j){if(P.current)return P.current(M,j,W);W()}},[M,j,W,P,Y]);const q=_.useMemo(()=>({reference:D,floating:L,setReference:R,setFloating:E}),[R,E]),O=_.useMemo(()=>({reference:M,floating:j}),[M,j]),H=_.useMemo(()=>{const U={position:n,left:0,top:0};if(!O.floating)return U;const F=Wk(O.floating,g.x),N=Wk(O.floating,g.y);return u?{...U,transform:"translate("+F+"px, "+N+"px)",...IM(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:N}},[n,u,O.floating,g.x,g.y]);return _.useMemo(()=>({...g,update:W,refs:q,elements:O,floatingStyles:H}),[g,W,q,O,H])}const s9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$k({element:r.current,padding:s}).fn(n):{}:r?$k({element:r,padding:s}).fn(n):{}}}},o9=(e,t)=>{const n=Y8(e);return{name:n.name,fn:n.fn,options:[e,t]}},a9=(e,t)=>{const n=X8(e);return{name:n.name,fn:n.fn,options:[e,t]}},l9=(e,t)=>({fn:e9(e).fn,options:[e,t]}),c9=(e,t)=>{const n=Z8(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9=(e,t)=>{const n=Q8(e);return{name:n.name,fn:n.fn,options:[e,t]}},d9=(e,t)=>{const n=J8(e);return{name:n.name,fn:n.fn,options:[e,t]}},h9=(e,t)=>{const n=s9(e);return{name:n.name,fn:n.fn,options:[e,t]}};var f9="Arrow",HM=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return f.jsx(Tt.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});HM.displayName=f9;var m9=HM;function p9(e){const[t,n]=_.useState(void 0);return br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const h=o.borderBoxSize,d=Array.isArray(h)?h[0]:h;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var M0="Popper",[FM,ea]=to(M0),[g9,UM]=FM(M0),$M=e=>{const{__scopePopper:t,children:n}=e,[r,s]=_.useState(null);return f.jsx(g9,{scope:t,anchor:r,onAnchorChange:s,children:n})};$M.displayName=M0;var WM="PopperAnchor",VM=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=UM(WM,n),l=_.useRef(null),u=Ut(t,l),h=_.useRef(null);return _.useEffect(()=>{const d=h.current;h.current=(r==null?void 0:r.current)||l.current,d!==h.current&&o.onAnchorChange(h.current)}),r?null:f.jsx(Tt.div,{...s,ref:u})});VM.displayName=WM;var N0="PopperContent",[v9,_9]=FM(N0),qM=_.forwardRef((e,t)=>{var te,le,me,xe,Ae,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,C=UM(N0,n),[k,R]=_.useState(null),E=Ut(t,je=>R(je)),[M,j]=_.useState(null),D=p9(M),L=(D==null?void 0:D.width)??0,$=(D==null?void 0:D.height)??0,Y=r+(o!=="center"?"-"+o:""),P=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},V=Array.isArray(d)?d:[d],I=V.length>0,W={padding:P,boundary:V.filter(y9),altBoundary:I},{refs:K,floatingStyles:q,placement:O,isPositioned:H,middlewareData:U}=i9({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>G8(...je,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[o9({mainAxis:s+$,alignmentAxis:l}),h&&a9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?l9():void 0,...W}),h&&c9({...W}),u9({...W,apply:({elements:je,rects:Ye,availableWidth:xt,availableHeight:ft})=>{const{width:he,height:Pe}=Ye.reference,Ne=je.floating.style;Ne.setProperty("--radix-popper-available-width",`${xt}px`),Ne.setProperty("--radix-popper-available-height",`${ft}px`),Ne.setProperty("--radix-popper-anchor-width",`${he}px`),Ne.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),M&&h9({element:M,padding:u}),x9({arrowWidth:L,arrowHeight:$}),v&&d9({strategy:"referenceHidden",...W})]}),[F,N]=YM(O),B=Ui(w);br(()=>{H&&(B==null||B())},[H,B]);const X=(te=U.arrow)==null?void 0:te.x,A=(le=U.arrow)==null?void 0:le.y,ne=((me=U.arrow)==null?void 0:me.centerOffset)!==0,[ae,Z]=_.useState();return br(()=>{k&&Z(window.getComputedStyle(k).zIndex)},[k]),f.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:H?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(xe=U.transformOrigin)==null?void 0:xe.x,(Ae=U.transformOrigin)==null?void 0:Ae.y].join(" "),...((Re=U.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(v9,{scope:n,placedSide:F,onArrowChange:j,arrowX:X,arrowY:A,shouldHideArrow:ne,children:f.jsx(Tt.div,{"data-side":F,"data-align":N,...S,ref:E,style:{...S.style,animation:H?void 0:"none"}})})})});qM.displayName=N0;var KM="PopperArrow",b9={top:"bottom",right:"left",bottom:"top",left:"right"},GM=_.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=_9(KM,r),l=b9[o.placedSide];return f.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:f.jsx(m9,{...s,ref:n,style:{...s.style,display:"block"}})})});GM.displayName=KM;function y9(e){return e!==null}var x9=e=>({name:"transformOrigin",options:e,fn(t){var C,k,R;const{placement:n,rects:r,middlewareData:s}=t,l=((C=s.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,h=l?0:e.arrowHeight,[d,g]=YM(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((k=s.arrow)==null?void 0:k.x)??0)+u/2,y=(((R=s.arrow)==null?void 0:R.y)??0)+h/2;let w="",S="";return d==="bottom"?(w=l?p:`${v}px`,S=`${-h}px`):d==="top"?(w=l?p:`${v}px`,S=`${r.floating.height+h}px`):d==="right"?(w=`${-h}px`,S=l?p:`${y}px`):d==="left"&&(w=`${r.floating.width+h}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function YM(e){const[t,n="center"]=e.split("-");return[t,n]}var mp=$M,Td=VM,pp=qM,gp=GM,XM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),w9="VisuallyHidden",ZM=_.forwardRef((e,t)=>f.jsx(Tt.span,{...e,ref:t,style:{...XM,...e.style}}));ZM.displayName=w9;var S9=ZM,[vp]=to("Tooltip",[ea]),_p=ea(),QM="TooltipProvider",C9=700,Mb="tooltip.open",[k9,A0]=vp(QM),JM=e=>{const{__scopeTooltip:t,delayDuration:n=C9,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,l=_.useRef(!0),u=_.useRef(!1),h=_.useRef(0);return _.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),f.jsx(k9,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:_.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:o})};JM.displayName=QM;var ad="Tooltip",[E9,Md]=vp(ad),eN=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,h=A0(ad,e.__scopeTooltip),d=_p(t),[g,p]=_.useState(null),v=Gs(),y=_.useRef(0),w=l??h.disableHoverableContent,S=u??h.delayDuration,C=_.useRef(!1),[k,R]=lc({prop:r,defaultProp:s??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Mb))):h.onClose(),o==null||o(L)},caller:ad}),E=_.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),M=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,R(!0)},[R]),j=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R(!1)},[R]),D=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,R(!0),y.current=0},S)},[S,R]);return _.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),f.jsx(mp,{...d,children:f.jsx(E9,{scope:t,contentId:v,open:k,stateAttribute:E,trigger:g,onTriggerChange:p,onTriggerEnter:_.useCallback(()=>{h.isOpenDelayedRef.current?D():M()},[h.isOpenDelayedRef,D,M]),onTriggerLeave:_.useCallback(()=>{w?j():(window.clearTimeout(y.current),y.current=0)},[j,w]),onOpen:M,onClose:j,disableHoverableContent:w,children:n})})};eN.displayName=ad;var Nb="TooltipTrigger",tN=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Md(Nb,n),o=A0(Nb,n),l=_p(n),u=_.useRef(null),h=Ut(t,u,s.onTriggerChange),d=_.useRef(!1),g=_.useRef(!1),p=_.useCallback(()=>d.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(Td,{asChild:!0,...l,children:f.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:h,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!g.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});tN.displayName=Nb;var D0="TooltipPortal",[R9,T9]=vp(D0,{forceMount:void 0}),nN=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,o=Md(D0,t);return f.jsx(R9,{scope:t,forceMount:n,children:f.jsx(Ai,{present:n||o.open,children:f.jsx(bc,{asChild:!0,container:s,children:r})})})};nN.displayName=D0;var uc="TooltipContent",rN=_.forwardRef((e,t)=>{const n=T9(uc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,l=Md(uc,e.__scopeTooltip);return f.jsx(Ai,{present:r||l.open,children:l.disableHoverableContent?f.jsx(iN,{side:s,...o,ref:t}):f.jsx(M9,{side:s,...o,ref:t})})}),M9=_.forwardRef((e,t)=>{const n=Md(uc,e.__scopeTooltip),r=A0(uc,e.__scopeTooltip),s=_.useRef(null),o=Ut(t,s),[l,u]=_.useState(null),{trigger:h,onClose:d}=n,g=s.current,{onPointerInTransitChange:p}=r,v=_.useCallback(()=>{u(null),p(!1)},[p]),y=_.useCallback((w,S)=>{const C=w.currentTarget,k={x:w.clientX,y:w.clientY},R=O9(k,C.getBoundingClientRect()),E=L9(k,R),M=z9(S.getBoundingClientRect()),j=B9([...E,...M]);u(j),p(!0)},[p]);return _.useEffect(()=>()=>v(),[v]),_.useEffect(()=>{if(h&&g){const w=C=>y(C,g),S=C=>y(C,h);return h.addEventListener("pointerleave",w),g.addEventListener("pointerleave",S),()=>{h.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",S)}}},[h,g,y,v]),_.useEffect(()=>{if(l){const w=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},R=(h==null?void 0:h.contains(C))||(g==null?void 0:g.contains(C)),E=!P9(k,l);R?v():E&&(v(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[h,g,l,d,v]),f.jsx(iN,{...e,ref:o})}),[N9,A9]=vp(ad,{isInside:!1}),D9=AP("TooltipContent"),iN=_.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,h=Md(uc,n),d=_p(n),{onClose:g}=h;return _.useEffect(()=>(document.addEventListener(Mb,g),()=>document.removeEventListener(Mb,g)),[g]),_.useEffect(()=>{if(h.trigger){const p=v=>{const y=v.target;y!=null&&y.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),f.jsx(_c,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:f.jsxs(pp,{"data-state":h.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(D9,{children:r}),f.jsx(N9,{scope:n,isInside:!0,children:f.jsx(S9,{id:h.contentId,role:"tooltip",children:s||r})})]})})});rN.displayName=uc;var sN="TooltipArrow",j9=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=_p(n);return A9(sN,n).isInside?null:f.jsx(gp,{...s,...r,ref:t})});j9.displayName=sN;function O9(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function L9(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function z9(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function P9(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],h=t[l],d=u.x,g=u.y,p=h.x,v=h.y;g>r!=v>r&&n<(p-d)*(r-g)/(v-g)+d&&(s=!s)}return s}function B9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),I9(t)}function I9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var H9=JM,oN=eN,aN=tN,lN=nN,j0=rN;function F9({className:e,...t}){return f.jsx("kbd",{className:pe("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 bg-muted/50 px-1.5 font-mono text-[11px] font-medium text-current select-none",e),...t})}function U9({className:e,...t}){return f.jsx("span",{className:pe("inline-flex items-center gap-0.5",e),...t})}const $9="z-50 overflow-hidden rounded-md border border-border backdrop-blur-md p-0.5 text-[11px] font-medium text-card-foreground shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",W9=H9,ds=oN,hs=aN,Ii=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(lN,{children:f.jsx(j0,{ref:r,sideOffset:t,className:pe("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border backdrop-blur-md px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ii.displayName=j0.displayName;const Ou=oN,Lu=aN;function cN(e){return e.toUpperCase()}function V9(e){const t=e.split("+");return f.jsx(U9,{children:t.map((n,r)=>f.jsx(F9,{children:cN(n)},`${n}-${r}`))})}const Zl=_.forwardRef(({className:e,sideOffset:t=4,children:n,shortcut:r,...s},o)=>{const l=r===void 0?null:Array.isArray(r)?r[0]??null:r;return f.jsx(lN,{children:f.jsx(j0,{ref:o,sideOffset:t,className:pe($9,e),...s,children:l?V9(l):f.jsx("span",{children:typeof n=="string"?cN(n):n})})})});Zl.displayName="HotkeyTooltipContent";const q9="0.1.2",K9={version:q9},Mn="Kaizen",Vk="kaizen",G9=".kaizen",Y9=".kaizen-dev",__=".kaizen",X9="KAIZEN_RUNTIME_PROFILE",O0=`kaizen/${K9.version}`,Z9="[kaizen]",Q9=`~/${Mn}`,bp="kaizen:";function yp(){var t;return(t=globalThis.process)==null?void 0:t.env}function J9(e=yp()){const t=e==null?void 0:e[X9];return(t==null?void 0:t.trim().toLowerCase())==="dev"?"dev":"prod"}function e7(e=yp()){return J9(e)==="dev"?Y9:G9}function t7(e=yp()){return`~/${e7(e)}`}function n7(e=yp()){return`${t7(e)}/keybindings.json`}function wf(e){return e?`${Vk} ${e}`:Vk}const Sm=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],Ab=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],Db=[{id:"off",label:"Off"},{id:"standard",label:"Standard"},{id:"high",label:"High"}],jb="claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",uN=[{id:"composer-2[fast=true]",label:"Composer 2",supportsEffort:!1},{id:"composer-1.5[]",label:"Composer 1.5",supportsEffort:!1},{id:"gpt-5.3-codex[reasoning=medium,fast=false]",label:"Codex 5.3",supportsEffort:!1},{id:"gpt-5.4[reasoning=medium,context=272k,fast=false]",label:"GPT-5.4",supportsEffort:!1},{id:"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]",label:"Sonnet 4.6",supportsEffort:!1},{id:"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",label:"Opus 4.6",supportsEffort:!1},{id:"claude-opus-4-5[thinking=true]",label:"Opus 4.5",supportsEffort:!1},{id:"gpt-5.2[reasoning=medium,fast=false]",label:"GPT-5.2",supportsEffort:!1},{id:"gemini-3.1-pro[]",label:"Gemini 3.1 Pro",supportsEffort:!1},{id:"gpt-5.4-mini[reasoning=medium]",label:"GPT-5.4 Mini",supportsEffort:!1},{id:"gpt-5.4-nano[reasoning=medium]",label:"GPT-5.4 Nano",supportsEffort:!1},{id:"claude-haiku-4-5[thinking=true]",label:"Haiku 4.5",supportsEffort:!1},{id:"gpt-5.3-codex-spark[reasoning=medium]",label:"Codex 5.3 Spark",supportsEffort:!1},{id:"grok-4-20[thinking=true]",label:"Grok 4.20",supportsEffort:!1},{id:"claude-sonnet-4-5[thinking=true,context=200k]",label:"Sonnet 4.5",supportsEffort:!1},{id:"gpt-5.2-codex[reasoning=medium,fast=false]",label:"Codex 5.2",supportsEffort:!1},{id:"gemini-3-flash[]",label:"Gemini 3 Flash",supportsEffort:!1},{id:"claude-sonnet-4[thinking=false,context=200k]",label:"Sonnet 4",supportsEffort:!1},{id:"kimi-k2.5[]",label:"Kimi K2.5",supportsEffort:!1}],r7={"composer-2-fast":"composer-2[fast=true]","composer-1.5":"composer-1.5[]","gpt-5.3-codex":"gpt-5.3-codex[reasoning=medium,fast=false]","gpt-5.4":"gpt-5.4[reasoning=medium,context=272k,fast=false]","gpt-5.4-medium":"gpt-5.4[reasoning=medium,context=272k,fast=false]","claude-4.6-sonnet-medium-thinking":"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]","claude-4.6-opus-high-thinking":"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]","claude-4.5-opus-high-thinking":"claude-opus-4-5[thinking=true]","gpt-5.2":"gpt-5.2[reasoning=medium,fast=false]","gemini-3.1-pro":"gemini-3.1-pro[]","gpt-5.4-mini":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-mini-medium":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-nano":"gpt-5.4-nano[reasoning=medium]","gpt-5.4-nano-medium":"gpt-5.4-nano[reasoning=medium]","claude-haiku-4.5":"claude-haiku-4-5[thinking=true]","gpt-5.3-codex-spark-preview":"gpt-5.3-codex-spark[reasoning=medium]","grok-4-20":"grok-4-20[thinking=true]","grok-4-20-thinking":"grok-4-20[thinking=true]","claude-4.5-sonnet-thinking":"claude-sonnet-4-5[thinking=true,context=200k]","gpt-5.2-codex":"gpt-5.2-codex[reasoning=medium,fast=false]","gemini-3-flash":"gemini-3-flash[]","claude-4-sonnet":"claude-sonnet-4[thinking=false,context=200k]","kimi-k2.5":"kimi-k2.5[]"};function i7(e){return e?uN.some(t=>t.id===e)?e:r7[e]??jb:jb}function qk(e){const t=e.indexOf("[");return t>=0?e.slice(0,t):e}function Yl(e){const t=e.match(/\bfast=(true|false)\b/);return t?t[1]==="true"?"fast":"standard":null}function Kk(e){return Sm.some(t=>t.id===e)}function Gk(e){return Ab.some(t=>t.id===e)}const Ob=[{id:"200k",label:"200k"},{id:"1m",label:"1M"}];function s7(e){return Db.some(t=>t.id===e)}const Ko=[{id:"claude",label:"Claude",systemActive:!0,defaultModel:"sonnet",defaultEffort:"high",defaultModelOptions:{reasoningEffort:"high",contextWindow:"200k"},supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0,contextWindowOptions:[...Ob]},{id:"sonnet",label:"Sonnet",supportsEffort:!0,contextWindowOptions:[...Ob]},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...Sm]},{id:"codex",label:"Codex",systemActive:!0,defaultModel:"gpt-5.4",defaultModelOptions:{reasoningEffort:"high",fastMode:!1},supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]},{id:"gemini",label:"Gemini",systemActive:!1,defaultModel:"auto-gemini-2.5",defaultModelOptions:{thinkingMode:"standard"},supportsPlanMode:!0,models:[{id:"auto-gemini-3",label:"Auto (Gemini 3)",supportsEffort:!1},{id:"auto-gemini-2.5",label:"Auto (Gemini 2.5)",supportsEffort:!1},{id:"gemini-3.1-pro-preview",label:"3.1 Pro Preview",supportsEffort:!1},{id:"gemini-3-pro-preview",label:"3 Pro Preview",supportsEffort:!1},{id:"gemini-3-flash-preview",label:"3 Flash Preview",supportsEffort:!1},{id:"gemini-2.5-pro",label:"2.5 Pro",supportsEffort:!1},{id:"gemini-2.5-flash",label:"2.5 Flash",supportsEffort:!1},{id:"gemini-2.5-flash-lite",label:"2.5 Flash Lite",supportsEffort:!1}],efforts:[]},{id:"cursor",label:"Cursor",systemActive:!0,defaultModel:jb,defaultModelOptions:{},supportsPlanMode:!0,models:[...uN],efforts:[]}],Wn={claude:{active:!0},codex:{active:!0},gemini:{active:!0},cursor:{active:!0}};function Jt(e){const t=Ko.find(n=>n.id===e);if(!t)throw new Error(`Unknown provider: ${e}`);return t}function L0(e,t){const n=Wn[t],r=e==null?void 0:e[t];return{active:(r==null?void 0:r.active)??n.active}}function o7(e,t){const n=Jt(e),r=L0(t,e);return n.systemActive&&r.active?null:`Provider ${n.label} is currently not active.`}function Yk(e,t){const n=Jt(e),r=L0(t,e);return n.systemActive&&r.active}function a7(e){return Ko.map(t=>{const n=L0(e,t.id),r=t.systemActive&&n.active;return{...t,active:n.active,isSelectable:r,isUsageEnabled:r,isInactive:!r,inactiveMessage:o7(t.id,e)}})}function z0(e){return a7(e).filter(t=>t.isSelectable).map(({active:t,isSelectable:n,isUsageEnabled:r,isInactive:s,inactiveMessage:o,...l})=>l)}function Ri(e){return Jt(e).defaultModelOptions}const dN=Ri("claude");Ri("codex");Ri("gemini");Ri("cursor");function l7(e){return Jt("claude").models.find(t=>t.id===e)}function c7(e){var t;return((t=l7(e))==null?void 0:t.contextWindowOptions)??[]}function u7(e,t){const n=c7(e);if(n.length!==0)return n.some(r=>r.id===t)?t:dN.contextWindow}const d7=["idea","todo","progress","testing","done"],Xk={idea:"IDEA",todo:"TODO",progress:"PROGRESS",testing:"TESTING",done:"DONE"},os={submitChatMessage:["enter"],toggleProjectsSidebar:["ctrl+a"],toggleEmbeddedTerminal:["cmd+j","ctrl+`"],toggleRightSidebar:["cmd+b","ctrl+b"],openInFinder:["cmd+alt+f","ctrl+alt+f"],openInEditor:["cmd+shift+o","ctrl+shift+o"],addSplitTerminal:["cmd+/","ctrl+/"]},Zk=8,h7=10*1024*1024,Qk=["image/png","image/jpeg","image/webp","image/gif"];var xp="Popover",[hN]=to(xp,[ea]),Nd=ea(),[f7,ta]=hN(xp),fN=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!1}=e,u=Nd(t),h=_.useRef(null),[d,g]=_.useState(!1),[p,v]=lc({prop:r,defaultProp:s??!1,onChange:o,caller:xp});return f.jsx(mp,{...u,children:f.jsx(f7,{scope:t,contentId:Gs(),triggerRef:h,open:p,onOpenChange:v,onOpenToggle:_.useCallback(()=>v(y=>!y),[v]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>g(!0),[]),onCustomAnchorRemove:_.useCallback(()=>g(!1),[]),modal:l,children:n})})};fN.displayName=xp;var mN="PopoverAnchor",pN=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(mN,n),o=Nd(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=s;return _.useEffect(()=>(l(),()=>u()),[l,u]),f.jsx(Td,{...o,...r,ref:t})});pN.displayName=mN;var gN="PopoverTrigger",vN=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(gN,n),o=Nd(n),l=Ut(t,s.triggerRef),u=f.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":wN(s.open),...r,ref:l,onClick:Be(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:f.jsx(Td,{asChild:!0,...o,children:u})});vN.displayName=gN;var P0="PopoverPortal",[m7,p7]=hN(P0,{forceMount:void 0}),_N=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,o=ta(P0,t);return f.jsx(m7,{scope:t,forceMount:n,children:f.jsx(Ai,{present:n||o.open,children:f.jsx(bc,{asChild:!0,container:s,children:r})})})};_N.displayName=P0;var dc="PopoverContent",bN=_.forwardRef((e,t)=>{const n=p7(dc,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,o=ta(dc,e.__scopePopover);return f.jsx(Ai,{present:r||o.open,children:o.modal?f.jsx(v7,{...s,ref:t}):f.jsx(_7,{...s,ref:t})})});bN.displayName=dc;var g7=Fa("PopoverContent.RemoveScroll"),v7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(null),s=Ut(t,r),o=_.useRef(!1);return _.useEffect(()=>{const l=r.current;if(l)return tp(l)},[]),f.jsx(Cd,{as:g7,allowPinchZoom:!0,children:f.jsx(yN,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),o.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,d=u.button===2||h;o.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Be(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),_7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return f.jsx(yN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var h,d;(h=e.onInteractOutside)==null||h.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),yN=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,...p}=e,v=ta(dc,n),y=Nd(n);return Jm(),f.jsx(Sd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:f.jsx(_c,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(pp,{"data-state":wN(v.open),role:"dialog",id:v.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),xN="PopoverClose",b7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(xN,n);return f.jsx(Tt.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,()=>s.onOpenChange(!1))})});b7.displayName=xN;var y7="PopoverArrow",x7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Nd(n);return f.jsx(gp,{...s,...r,ref:t})});x7.displayName=y7;function wN(e){return e?"open":"closed"}var SN=fN,w7=pN,S7=vN,CN=_N,B0=bN;const kN=SN,EN=S7,I0=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(CN,{children:f.jsx(B0,{ref:s,align:t,sideOffset:n,[sd]:"",onCloseAutoFocus:o=>{var l;o.preventDefault(),window.dispatchEvent(new Event(vm)),(l=r.onCloseAutoFocus)==null||l.call(r,o)},className:pe("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg backdrop-blur-md outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));I0.displayName=B0.displayName;function C7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function k7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}function E7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0C12 0 12 8 8 12C4 16 0 12 0 12C0 12 4 12 8 12C12 12 12 16 12 24C12 24 12 16 16 12C20 8 24 12 24 12C24 12 16 12 16 12C12 12 12 4 12 0Z"})})}function R7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:pe("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0 2.4 5.5v13L12 24l9.6-5.5v-13Zm0 3.1 6.8 3.9v5.1L15 14.3V9.7L12 8l-3 1.7v4.6l-3.8-2.2V7Zm-6.8 9.8 3.8 2.2v4.5l3 1.8 3-1.8v-4.5l3.8-2.2v3.8L12 20.9l-6.8-3.9Z"})})}function T7(e){return!(e.startsWith("gemini-3")||e==="auto-gemini-3")}const M7=["Composer","GPT","Claude","Gemini","Grok","Kimi"];function N7(e){return e.startsWith("composer-")?"Composer":e.startsWith("gpt-")?"GPT":e.startsWith("claude-")?"Claude":e.startsWith("gemini-")?"Gemini":e.startsWith("grok-")?"Grok":"Kimi"}function b_(e,t){const n=Yl(t);return!n||n==="standard"?e:`${e} (${n==="fast"?"Fast":"Standard"})`}const Cm={claude:C7,codex:k7,gemini:E7,cursor:R7},Sf={auto:Tn,opus:ti,sonnet:Tn,haiku:ls,"gpt-5.4":ti,"gpt-5.4[reasoning=medium,context=272k,fast=false]":ti,"gpt-5.4-mini[reasoning=medium]":Tn,"gpt-5.4-nano[reasoning=medium]":ls,"gpt-5.3-codex":Tn,"gpt-5.3-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark[reasoning=medium]":ls,"gpt-5.2[reasoning=medium,fast=false]":Tn,"gpt-5.2-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark":ls,"gemini-2.5-pro":ti,"gemini-2.5-flash":Tn,"gemini-2.5-flash-lite":ls,"auto-gemini-3":ti,"auto-gemini-2.5":Tn,"gemini-3.1-pro-preview":ti,"gemini-3.1-pro[]":ti,"gemini-3-flash[]":Tn,"gemini-3-pro-preview":ti,"gemini-3-flash-preview":Tn,"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]":ti,"claude-opus-4-5[thinking=true]":ti,"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]":Tn,"claude-sonnet-4-5[thinking=true,context=200k]":Tn,"claude-sonnet-4[thinking=false,context=200k]":Tn,"claude-haiku-4-5[thinking=true]":ls,"grok-4-20[thinking=true]":ti,"kimi-k2.5[]":Tn,"composer-2[fast=true]":ti,"composer-1.5[]":Tn};function Ir({onClick:e,selected:t,icon:n,label:r,description:s,disabled:o}){return f.jsxs("button",{onClick:e,disabled:o,className:pe("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",t?"bg-muted border-border":"hover:opacity-60",o&&"opacity-40 cursor-not-allowed"),children:[n,f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium",children:r}),s?f.jsx("div",{className:"text-xs text-muted-foreground",children:s}):null]})]})}function Po({trigger:e,triggerClassName:t,disabled:n=!1,children:r}){const[s,o]=_.useState(!1);return n?f.jsx("button",{disabled:!0,className:pe("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",t),children:e}):f.jsxs(kN,{open:s,onOpenChange:o,children:[f.jsx(EN,{asChild:!0,children:f.jsx("button",{className:pe("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",t),children:e})}),f.jsx(I0,{align:"center",className:"w-64 p-1",children:f.jsx("div",{className:"max-h-[min(24rem,60vh)] space-y-1 overflow-y-auto pr-1",children:typeof r=="function"?r(()=>o(!1)):r})})]})}function zu({availableProviders:e,selectedProvider:t,disabled:n=!1,showProviderPicker:r=!0,providerLocked:s=!1,model:o,modelOptions:l,onProviderChange:u,onModelChange:h,onClaudeReasoningEffortChange:d,onClaudeContextWindowChange:g,onCodexReasoningEffortChange:p,onGeminiThinkingModeChange:v,onCodexFastModeChange:y,planMode:w=!1,onPlanModeChange:S,includePlanMode:C=!0,className:k}){var F,N,B,X,A,ne,ae;const[R,E]=_.useState(null),M=e.find(Z=>Z.id===t)??Jt(t),j=Cm[t],D=Sf[o]??Tn,L=C&&(M==null?void 0:M.supportsPlanMode)&&S,$=t==="claude"?l:null,Y=t==="codex"?l:null,P=t==="gemini"?l:null,V=((F=M.models.find(Z=>Z.id===o))==null?void 0:F.contextWindowOptions)??[],I=($==null?void 0:$.contextWindow)??Ob[0].id,W=I==="1m"?Mk:Nk,K=t==="claude"||t==="codex",q=t==="cursor"?Yl(o):null,O=M.id==="cursor"?M.models.filter(Z=>qk(Z.id)===qk(o)):[],H=t==="cursor"&&O.some(Z=>Yl(Z.id)==="fast")&&O.some(Z=>Yl(Z.id)==="standard"),U=M.id==="cursor"?M7.map(Z=>({family:Z,models:M.models.filter(te=>N7(te.id)===Z)})).filter(Z=>Z.models.length>0):[];return _.useEffect(()=>{E(null)},[t]),f.jsx("div",{className:pe("max-w-full overflow-x-auto scrollbar-hide",n&&"pointer-events-none opacity-60",k),children:f.jsxs("div",{className:"flex w-max items-center justify-center gap-0.5 mx-auto",children:[r?f.jsx(Po,{disabled:s||!u,trigger:f.jsxs(f.Fragment,{children:[f.jsx(j,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:(M==null?void 0:M.label)??t})]}),children:Z=>e.map(te=>{const le=Cm[te.id];return f.jsx(Ir,{onClick:()=>{u==null||u(te.id),Z()},selected:t===te.id,icon:f.jsx(le,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id)})}):null,f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(D,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:M.id==="cursor"?b_(((N=M.models.find(Z=>Z.id===o))==null?void 0:N.label)??o,o):((B=M.models.find(Z=>Z.id===o))==null?void 0:B.label)??o})]}),children:Z=>{var te;return M.id==="cursor"?R?f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>E(null),className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground transition-opacity hover:opacity-70",children:[f.jsx(_M,{className:"h-4 w-4"}),f.jsx("span",{children:R})]}),(te=U.find(le=>le.family===R))==null?void 0:te.models.map(le=>{const me=Sf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),E(null),Z()},selected:o===le.id,icon:f.jsx(me,{className:"h-4 w-4 text-muted-foreground"}),label:b_(le.label,le.id)},le.id)})]}):U.map(le=>{var Ae;const me=le.models.some(Re=>Re.id===o),xe=Sf[((Ae=le.models[0])==null?void 0:Ae.id)??""]??Tn;return f.jsxs("div",{className:"relative",children:[f.jsx(Ir,{onClick:()=>E(le.family),selected:me,icon:f.jsx(xe,{className:"h-4 w-4 text-muted-foreground"}),label:le.family,description:`${le.models.length} model${le.models.length===1?"":"s"}`}),f.jsx(Tr,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]},le.family)}):M.models.map(le=>{const me=Sf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),Z()},selected:o===le.id,icon:f.jsx(me,{className:"h-4 w-4 text-muted-foreground"}),label:M.id==="cursor"?b_(le.label,le.id):le.label},le.id)})}}),H?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[q==="fast"?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:q==="fast"?"Fast":"Standard"})]}),triggerClassName:q==="fast"?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[O.filter(te=>Yl(te.id)==="standard").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:o===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"},te.id)),O.filter(te=>Yl(te.id)==="fast").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:o===te.id,icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast"},te.id))]})}):null,K?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:t==="claude"?((X=Sm.find(Z=>Z.id===l.reasoningEffort))==null?void 0:X.label)??l.reasoningEffort:((A=Ab.find(Z=>Z.id===l.reasoningEffort))==null?void 0:A.label)??l.reasoningEffort})]}),children:Z=>t==="claude"?Sm.map(te=>f.jsx(Ir,{onClick:()=>{d(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="max"&&o!=="opus"},te.id)):Ab.map(te=>f.jsx(Ir,{onClick:()=>{p(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id))}):null,t==="claude"&&V.length>1?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(W,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((ne=V.find(Z=>Z.id===I))==null?void 0:ne.label)??I})]}),children:Z=>V.map(te=>f.jsx(Ir,{onClick:()=>{g(te.id),Z()},selected:I===te.id,icon:te.id==="1m"?f.jsx(Mk,{className:"h-4 w-4 text-muted-foreground"}):f.jsx(Nk,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,description:te.id==="1m"?"Expanded context window":"Standard context window"},te.id))}):null,t==="gemini"?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((ae=Db.find(Z=>Z.id===(P==null?void 0:P.thinkingMode)))==null?void 0:ae.label)??(P==null?void 0:P.thinkingMode)??"Standard"})]}),children:Z=>Db.map(te=>f.jsx(Ir,{onClick:()=>{v(te.id),Z()},selected:(P==null?void 0:P.thinkingMode)===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="off"&&!T7(o)},te.id))}):null,t==="codex"?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[Y!=null&&Y.fastMode?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:Y!=null&&Y.fastMode?"Fast Mode":"Standard"})]}),triggerClassName:Y!=null&&Y.fastMode?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{y(!1),Z()},selected:!(Y!=null&&Y.fastMode),icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"}),f.jsx(Ir,{onClick:()=>{y(!0),Z()},selected:!!(Y!=null&&Y.fastMode),icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode"})]})}):null,L?f.jsx(Po,{trigger:f.jsxs(f.Fragment,{children:[w?f.jsx(pm,{className:"h-3.5 w-3.5"}):f.jsx(Rk,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:w?"Plan":"Implement"}),f.jsx("span",{className:"md:hidden",children:w?"Plan":"Impl"})]}),triggerClassName:w?"text-blue-400 dark:text-blue-300":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{S(!1),Z()},selected:!w,icon:f.jsx(Rk,{className:"h-4 w-4 text-muted-foreground"}),label:"Implement",description:"Start execution"}),f.jsx(Ir,{onClick:()=>{S(!0),Z()},selected:w,icon:f.jsx(pm,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan",description:"Review a plan before execution"})]})}):null]})})}const wp=({children:e,className:t,shimmerWidth:n=100,animate:r=!0,...s})=>f.jsx("span",{style:{"--shiny-width":`${Math.min(n,100)}px`},className:pe("mx-auto max-w-md text-foreground/50",r?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],t),...s,children:e});function Lb(e){return e.split(/[\s_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const A7=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function D7(e){const t=e.trim();for(const n of A7){const r=t.match(n);if(!r)continue;const s=(r[2]??r[1]??"").trim();if(s)return s}return t}function km(e){return e.split("/").pop()||e}function j7(e,t){if(e===void 0)return null;const n=Math.max(0,t-e),r=6e4,s=60*r,o=24*s,l=7*o;return n<r?"now":n<s?`${Math.floor(n/r)}m`:n<o?`${Math.floor(n/s)}h`:n<l?`${Math.floor(n/o)}d`:`${Math.floor(n/l)}w`}const O7='button, select, input, textarea, [role="combobox"], [role="listbox"], [data-no-touch-drag]';function Jk(e){var t;try{(t=navigator.vibrate)==null||t.call(navigator,e)}catch{}}function H0({enabled:e,visualElementRef:t,onTap:n,onContextMenu:r,onDragStart:s,onDragMove:o,onDragEnd:l,holdDelay:u=300,contextMenuDelay:h=2500,scrollThreshold:d=8,dragMoveThreshold:g=5}){const[p,v]=_.useState(!1),[y,w]=_.useState(!1),[S,C]=_.useState(null),[k,R]=_.useState(null),E=_.useCallback(O=>{R(O)},[]),M=_.useRef("idle"),j=_.useRef({x:0,y:0}),D=_.useRef(null),L=_.useRef(null),$=_.useRef(n),Y=_.useRef(r),P=_.useRef(s),V=_.useRef(o),I=_.useRef(l);$.current=n,Y.current=r,P.current=s,V.current=o,I.current=l;const W=_.useCallback((O,H)=>{const U=(t==null?void 0:t.current)??k;if(!U)return document.elementFromPoint(O,H);const F=U.style.pointerEvents;U.style.pointerEvents="none";const N=document.elementFromPoint(O,H);return U.style.pointerEvents=F,N},[t,k]),K=_.useCallback(()=>{D.current&&(clearTimeout(D.current),D.current=null),L.current&&(clearTimeout(L.current),L.current=null)},[]),q=_.useCallback(()=>{K(),M.current="idle",w(!1),v(!1),C(null)},[K]);return _.useEffect(()=>{if(!k||!e)return;const O=N=>{if(N.target.closest(O7))return;const B=N.touches[0];B&&(j.current={x:B.clientX,y:B.clientY},M.current="holding",D.current=setTimeout(()=>{D.current=null,M.current==="holding"&&(M.current="armed",w(!0),Jk(30),L.current=setTimeout(()=>{var A;if(L.current=null,M.current!=="armed")return;Jk(100);const X={...j.current};M.current="idle",w(!1),(A=Y.current)==null||A.call(Y,X)},h))},u))},H=N=>{var Z,te;const B=M.current;if(B==="idle")return;const X=N.touches[0];if(!X)return;const A=X.clientX-j.current.x,ne=X.clientY-j.current.y,ae=Math.sqrt(A*A+ne*ne);if(B==="holding"){ae>d&&(K(),M.current="idle");return}if(B==="armed"){ae>g&&(L.current&&(clearTimeout(L.current),L.current=null),M.current="dragging",w(!1),v(!0),C({x:X.clientX,y:X.clientY}),N.preventDefault(),(Z=P.current)==null||Z.call(P,{x:X.clientX,y:X.clientY}));return}if(B==="dragging"){N.preventDefault(),C({x:X.clientX,y:X.clientY});const le=W(X.clientX,X.clientY);(te=V.current)==null||te.call(V,{x:X.clientX,y:X.clientY,elementBelow:le})}},U=N=>{var X,A;const B=M.current;if(B==="holding"){K(),M.current="idle",w(!1),v(!1),N.preventDefault(),(X=$.current)==null||X.call($);return}if(B==="armed"){q();return}if(B==="dragging"){const ne=N.changedTouches[0];if(ne){const ae=W(ne.clientX,ne.clientY);(A=I.current)==null||A.call(I,{x:ne.clientX,y:ne.clientY,elementBelow:ae})}q()}},F=()=>{var N;M.current==="dragging"&&((N=I.current)==null||N.call(I,{x:0,y:0,elementBelow:null})),q()};return k.addEventListener("touchstart",O,{passive:!1}),k.addEventListener("touchmove",H,{passive:!1}),k.addEventListener("touchend",U),k.addEventListener("touchcancel",F),()=>{k.removeEventListener("touchstart",O),k.removeEventListener("touchmove",H),k.removeEventListener("touchend",U),k.removeEventListener("touchcancel",F),K(),M.current="idle"}},[k,e,u,h,d,g,K,q,W]),{touchRef:E,isDragging:p,isArmed:y,dragPosition:S}}function RN({position:e,children:t,className:n}){return e?Bi.createPortal(f.jsx("div",{style:{position:"fixed",left:e.x,top:e.y,transform:"translate(-50%, calc(-100% - 14px))",zIndex:9999,pointerEvents:"none",willChange:"transform"},className:pe("flex items-center gap-2 rounded-xl border-2 border-primary/60 bg-card px-3 py-2","shadow-[0_8px_32px_rgba(0,0,0,0.25)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.5)]","min-w-[120px] max-w-[240px]","scale-[1.04]",n),children:t}),document.body):null}const L7=new Set(["starting","running"]);function z7({chat:e,activeChatId:t,nowMs:n,showProviderIcon:r=!1,isCompleted:s=!1,onSelectChat:o,onDeleteChat:l,draggable:u=!1,onDragStart:h,onDragEnd:d,isTouchDevice:g=!1,onTouchDragMove:p,onTouchDragEnd:v}){const y=j7(e.lastMessageAt,n),w=g&&u,S=e.provider?Cm[e.provider]:null,{touchRef:C,isArmed:k,isDragging:R,dragPosition:E}=H0({enabled:w,onTap:()=>o(e.chatId),onDragStart:()=>h==null?void 0:h(e),onDragMove:({x:M,y:j,elementBelow:D})=>p==null?void 0:p(M,j,D),onDragEnd:({x:M,y:j,elementBelow:D})=>{v==null||v(M,j,D),d==null||d()}});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{ref:w?C:void 0,"data-chat-id":dk(e.chatId),className:pe("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-lg cursor-pointer border transition-all duration-150 select-none",t===dk(e.chatId)?"bg-muted hover:bg-muted border-border":"border-border/0 hover:border-border hover:bg-muted/20 dark:hover:border-slate-400/10",k&&"scale-[1.03] shadow-md ring-2 ring-primary/50 bg-card border-primary/40",R&&!k&&"opacity-20 scale-[0.98]"),draggable:u&&!g,onDragStart:u&&!g?()=>h==null?void 0:h(e):void 0,onDragEnd:u&&!g?d:void 0,onClick:g?void 0:()=>o(e.chatId),children:[L7.has(e.status)?f.jsx(oi,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):s?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-emerald-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-emerald-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,r&&S?f.jsx(S,{className:"size-3.5 flex-shrink-0 text-muted-foreground/80","aria-label":`${e.provider} provider`}):null,f.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?f.jsx(wp,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),f.jsxs("div",{className:"relative h-7 w-7 mr-[2px] shrink-0",children:[y?f.jsx("span",{className:"hidden md:flex absolute inset-0 items-center justify-end pr-1 text-[11px] text-muted-foreground opacity-50 transition-opacity group-hover:opacity-0",children:y}):null,f.jsx(Je,{variant:"ghost",size:"icon",className:pe("absolute inset-0 h-7 w-7 opacity-100 cursor-pointer rounded-sm hover:!bg-transparent !border-0",y?"md:opacity-0 md:group-hover:opacity-100":"opacity-100 md:opacity-0 md:group-hover:opacity-100"),"data-no-touch-drag":!0,onClick:M=>{M.stopPropagation(),l(e.chatId)},title:"Delete chat",children:f.jsx(a6,{className:"size-3.5"})})]})]},e._id),f.jsx(RN,{position:E,children:f.jsx("span",{className:"text-sm font-medium truncate",children:e.title})})]})}function P7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const Sp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function F0(e){return"nodeType"in e}function Wr(e){var t,n;return e?wc(e)?e:F0(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function U0(e){const{Document:t}=Wr(e);return e instanceof t}function Ad(e){return wc(e)?!1:e instanceof Wr(e).HTMLElement}function TN(e){return e instanceof Wr(e).SVGElement}function Sc(e){return e?wc(e)?e.document:F0(e)?U0(e)?e:Ad(e)||TN(e)?e.ownerDocument:document:document:document}const _s=Sp?_.useLayoutEffect:_.useEffect;function $0(e){const t=_.useRef(e);return _s(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function B7(){const e=_.useRef(null),t=_.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ld(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return _s(()=>{n.current!==e&&(n.current=e)},t),n}function Dd(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Em(e){const t=$0(e),n=_.useRef(null),r=_.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function zb(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}let y_={};function jd(e,t){return _.useMemo(()=>{if(t)return t;const n=y_[e]==null?0:y_[e]+1;return y_[e]=n,e+"-"+n},[e,t])}function MN(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,l)=>{const u=Object.entries(l);for(const[h,d]of u){const g=o[h];g!=null&&(o[h]=g+e*d)}return o},{...t})}}const ic=MN(1),Rm=MN(-1);function I7(e){return"clientX"in e&&"clientY"in e}function W0(e){if(!e)return!1;const{KeyboardEvent:t}=Wr(e.target);return t&&e instanceof t}function H7(e){if(!e)return!1;const{TouchEvent:t}=Wr(e.target);return t&&e instanceof t}function Pb(e){if(H7(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return I7(e)?{x:e.clientX,y:e.clientY}:null}const cd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[cd.Translate.toString(e),cd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),e2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function F7(e){return e.matches(e2)?e:e.querySelector(e2)}const U7={display:"none"};function $7(e){let{id:t,value:n}=e;return ye.createElement("div",{id:t,style:U7},n)}function W7(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function V7(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const NN=_.createContext(null);function q7(e){const t=_.useContext(NN);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function K7(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:s,event:o}=r;e.forEach(l=>{var u;return(u=l[s])==null?void 0:u.call(l,o)})},[e]),t]}const G7={draggable:`
470
470
  To pick up a draggable item, press the space bar.
471
471
  While dragging, use the arrow keys to move the item.
472
472
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="131" zoomAndPan="magnify" viewBox="0 0 98.25 110.999996" height="148" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="a6434bcabb"><path d="M 4.949219 2.914062 L 23.035156 2.914062 L 23.035156 66.925781 L 4.949219 66.925781 Z M 4.949219 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="f38a174fbe"><path d="M 6.4375 2.914062 L 21.546875 2.914062 C 22.371094 2.914062 23.035156 3.582031 23.035156 4.402344 L 23.035156 65.378906 C 23.035156 66.199219 22.371094 66.867188 21.546875 66.867188 L 6.4375 66.867188 C 5.617188 66.867188 4.949219 66.199219 4.949219 65.378906 L 4.949219 4.402344 C 4.949219 3.582031 5.617188 2.914062 6.4375 2.914062 Z M 6.4375 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="2f9a762088"><path d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.875 L 0.949219 64.875 Z M 0.949219 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="57da176352"><path d="M 2.4375 0.914062 L 17.546875 0.914062 C 18.371094 0.914062 19.035156 1.582031 19.035156 2.402344 L 19.035156 63.378906 C 19.035156 64.199219 18.371094 64.867188 17.546875 64.867188 L 2.4375 64.867188 C 1.617188 64.867188 0.949219 64.199219 0.949219 63.378906 L 0.949219 2.402344 C 0.949219 1.582031 1.617188 0.914062 2.4375 0.914062 Z M 2.4375 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="5f618c6616"><rect x="0" width="20" y="0" height="65"/></clipPath><clipPath id="b8b1a1fe42"><path d="M 26.238281 46.367188 L 52.355469 46.367188 L 52.355469 64.632812 L 26.238281 64.632812 Z M 26.238281 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="9c7d06bbac"><path d="M 27.726562 46.367188 L 50.835938 46.367188 C 51.660156 46.367188 52.324219 47.03125 52.324219 47.855469 L 52.324219 63.144531 C 52.324219 63.96875 51.660156 64.632812 50.835938 64.632812 L 27.726562 64.632812 C 26.902344 64.632812 26.238281 63.96875 26.238281 63.144531 L 26.238281 47.855469 C 26.238281 47.03125 26.902344 46.367188 27.726562 46.367188 Z M 27.726562 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dd3273c87e"><path d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="d7d6943e7d"><path d="M 1.726562 0.367188 L 24.835938 0.367188 C 25.660156 0.367188 26.324219 1.03125 26.324219 1.855469 L 26.324219 17.144531 C 26.324219 17.96875 25.660156 18.632812 24.835938 18.632812 L 1.726562 18.632812 C 0.902344 18.632812 0.238281 17.96875 0.238281 17.144531 L 0.238281 1.855469 C 0.238281 1.03125 0.902344 0.367188 1.726562 0.367188 Z M 1.726562 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dccb05b803"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="4a6dfd1cfa"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d68c17fb59"><path d="M 48.566406 66.867188 L 65.722656 66.867188 C 68.191406 66.867188 70.1875 68.867188 70.1875 71.332031 L 70.1875 80.671875 C 70.1875 83.136719 68.191406 85.136719 65.722656 85.136719 L 48.566406 85.136719 C 46.101562 85.136719 44.101562 83.136719 44.101562 80.671875 L 44.101562 71.332031 C 44.101562 68.867188 46.101562 66.867188 48.566406 66.867188 Z M 48.566406 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d91aa65f6f"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7874e4c1c8"><path d="M 4.566406 0.867188 L 21.722656 0.867188 C 24.191406 0.867188 26.1875 2.867188 26.1875 5.332031 L 26.1875 14.671875 C 26.1875 17.136719 24.191406 19.136719 21.722656 19.136719 L 4.566406 19.136719 C 2.101562 19.136719 0.101562 17.136719 0.101562 14.671875 L 0.101562 5.332031 C 0.101562 2.867188 2.101562 0.867188 4.566406 0.867188 Z M 4.566406 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="9ce9990e41"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="5053d98786"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d39cc34eab"><path d="M 45.589844 66.867188 L 68.699219 66.867188 C 69.523438 66.867188 70.1875 67.535156 70.1875 68.355469 L 70.1875 83.648438 C 70.1875 84.46875 69.523438 85.136719 68.699219 85.136719 L 45.589844 85.136719 C 44.765625 85.136719 44.101562 84.46875 44.101562 83.648438 L 44.101562 68.355469 C 44.101562 67.535156 44.765625 66.867188 45.589844 66.867188 Z M 45.589844 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7548939ec4"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e6d65400ef"><path d="M 1.589844 0.867188 L 24.699219 0.867188 C 25.523438 0.867188 26.1875 1.535156 26.1875 2.355469 L 26.1875 17.648438 C 26.1875 18.46875 25.523438 19.136719 24.699219 19.136719 L 1.589844 19.136719 C 0.765625 19.136719 0.101562 18.46875 0.101562 17.648438 L 0.101562 2.355469 C 0.101562 1.535156 0.765625 0.867188 1.589844 0.867188 Z M 1.589844 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="b8a14b9041"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="0e9cc5dcf0"><path d="M 61.667969 87.371094 L 87.785156 87.371094 L 87.785156 105.640625 L 61.667969 105.640625 Z M 61.667969 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="9aadc974f5"><path d="M 63.15625 87.371094 L 86.265625 87.371094 C 87.089844 87.371094 87.753906 88.035156 87.753906 88.859375 L 87.753906 104.152344 C 87.753906 104.972656 87.089844 105.640625 86.265625 105.640625 L 63.15625 105.640625 C 62.332031 105.640625 61.667969 104.972656 61.667969 104.152344 L 61.667969 88.859375 C 61.667969 88.035156 62.332031 87.371094 63.15625 87.371094 Z M 63.15625 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="08901b7c70"><path d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="17b30e43d9"><path d="M 2.15625 0.371094 L 25.265625 0.371094 C 26.089844 0.371094 26.753906 1.035156 26.753906 1.859375 L 26.753906 17.152344 C 26.753906 17.972656 26.089844 18.640625 25.265625 18.640625 L 2.15625 18.640625 C 1.332031 18.640625 0.667969 17.972656 0.667969 17.152344 L 0.667969 1.859375 C 0.667969 1.035156 1.332031 0.371094 2.15625 0.371094 Z M 2.15625 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="191fb42ae4"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="30d9207845"><path d="M 4.949219 60.460938 L 23.035156 60.460938 L 23.035156 100.828125 L 4.949219 100.828125 Z M 4.949219 60.460938 " clip-rule="nonzero"/></clipPath><clipPath id="52d8b1d0c8"><path d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.828125 L 0.949219 40.828125 Z M 0.949219 0.460938 " clip-rule="nonzero"/></clipPath><clipPath id="82dec45cec"><rect x="0" width="20" y="0" height="41"/></clipPath><clipPath id="9b56f823bb"><path d="M 4.949219 66.867188 L 23.035156 66.867188 L 23.035156 107.28125 L 4.949219 107.28125 Z M 4.949219 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="64a8e0ecf4"><path d="M 6.4375 66.867188 L 21.546875 66.867188 C 22.371094 66.867188 23.035156 67.535156 23.035156 68.355469 L 23.035156 105.75 C 23.035156 106.570312 22.371094 107.238281 21.546875 107.238281 L 6.4375 107.238281 C 5.617188 107.238281 4.949219 106.570312 4.949219 105.75 L 4.949219 68.355469 C 4.949219 67.535156 5.617188 66.867188 6.4375 66.867188 Z M 6.4375 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e46f782b3b"><path d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.28125 L 0.949219 41.28125 Z M 0.949219 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="2d24d09008"><path d="M 2.4375 0.867188 L 17.546875 0.867188 C 18.371094 0.867188 19.035156 1.535156 19.035156 2.355469 L 19.035156 39.75 C 19.035156 40.570312 18.371094 41.238281 17.546875 41.238281 L 2.4375 41.238281 C 1.617188 41.238281 0.949219 40.570312 0.949219 39.75 L 0.949219 2.355469 C 0.949219 1.535156 1.617188 0.867188 2.4375 0.867188 Z M 2.4375 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="c16e5f8d8b"><rect x="0" width="20" y="0" height="42"/></clipPath><clipPath id="67ec189edb"><path d="M 44.101562 25.863281 L 70.21875 25.863281 L 70.21875 44.132812 L 44.101562 44.132812 Z M 44.101562 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="9e2c9eb0c8"><path d="M 45.589844 25.863281 L 68.699219 25.863281 C 69.523438 25.863281 70.1875 26.53125 70.1875 27.351562 L 70.1875 42.644531 C 70.1875 43.464844 69.523438 44.132812 68.699219 44.132812 L 45.589844 44.132812 C 44.765625 44.132812 44.101562 43.464844 44.101562 42.644531 L 44.101562 27.351562 C 44.101562 26.53125 44.765625 25.863281 45.589844 25.863281 Z M 45.589844 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="cfc84f52c9"><path d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="fc947c88aa"><path d="M 1.589844 0.863281 L 24.699219 0.863281 C 25.523438 0.863281 26.1875 1.53125 26.1875 2.351562 L 26.1875 17.644531 C 26.1875 18.464844 25.523438 19.132812 24.699219 19.132812 L 1.589844 19.132812 C 0.765625 19.132812 0.101562 18.464844 0.101562 17.644531 L 0.101562 2.351562 C 0.101562 1.53125 0.765625 0.863281 1.589844 0.863281 Z M 1.589844 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="18b158d824"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="8b52c897d1"><path d="M 61.667969 5.359375 L 87.785156 5.359375 L 87.785156 23.628906 L 61.667969 23.628906 Z M 61.667969 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="a669865345"><path d="M 63.15625 5.359375 L 86.265625 5.359375 C 87.089844 5.359375 87.753906 6.027344 87.753906 6.847656 L 87.753906 22.140625 C 87.753906 22.964844 87.089844 23.628906 86.265625 23.628906 L 63.15625 23.628906 C 62.332031 23.628906 61.667969 22.964844 61.667969 22.140625 L 61.667969 6.847656 C 61.667969 6.027344 62.332031 5.359375 63.15625 5.359375 Z M 63.15625 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="20a0ea2a1b"><path d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="ffec020ed9"><path d="M 2.15625 0.359375 L 25.265625 0.359375 C 26.089844 0.359375 26.753906 1.027344 26.753906 1.847656 L 26.753906 17.140625 C 26.753906 17.964844 26.089844 18.628906 25.265625 18.628906 L 2.15625 18.628906 C 1.332031 18.628906 0.667969 17.964844 0.667969 17.140625 L 0.667969 1.847656 C 0.667969 1.027344 1.332031 0.359375 2.15625 0.359375 Z M 2.15625 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="926de771c0"><rect x="0" width="27" y="0" height="19"/></clipPath></defs><g clip-path="url(#a6434bcabb)"><g clip-path="url(#f38a174fbe)"><g transform="matrix(1, 0, 0, 1, 4, 2)"><g clip-path="url(#5f618c6616)"><g clip-path="url(#2f9a762088)"><g clip-path="url(#57da176352)"><path fill="#84bcb8" d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.855469 L 0.949219 64.855469 Z M 0.949219 0.914062 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#b8b1a1fe42)"><g clip-path="url(#9c7d06bbac)"><g transform="matrix(1, 0, 0, 1, 26, 46)"><g clip-path="url(#dccb05b803)"><g clip-path="url(#dd3273c87e)"><g clip-path="url(#d7d6943e7d)"><path fill="#84bcb8" d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#4a6dfd1cfa)"><g clip-path="url(#d68c17fb59)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#9ce9990e41)"><g clip-path="url(#d91aa65f6f)"><g clip-path="url(#7874e4c1c8)"><path fill="#84bcb8" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#5053d98786)"><g clip-path="url(#d39cc34eab)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#b8a14b9041)"><g clip-path="url(#7548939ec4)"><g clip-path="url(#e6d65400ef)"><path fill="#4a7870" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#0e9cc5dcf0)"><g clip-path="url(#9aadc974f5)"><g transform="matrix(1, 0, 0, 1, 61, 87)"><g clip-path="url(#191fb42ae4)"><g clip-path="url(#08901b7c70)"><g clip-path="url(#17b30e43d9)"><path fill="#4a7870" d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#30d9207845)"><g transform="matrix(1, 0, 0, 1, 4, 60)"><g clip-path="url(#82dec45cec)"><g clip-path="url(#52d8b1d0c8)"><path fill="#4a7870" d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.800781 L 0.949219 40.800781 Z M 0.949219 0.460938 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g><g clip-path="url(#9b56f823bb)"><g clip-path="url(#64a8e0ecf4)"><g transform="matrix(1, 0, 0, 1, 4, 66)"><g clip-path="url(#c16e5f8d8b)"><g clip-path="url(#e46f782b3b)"><g clip-path="url(#2d24d09008)"><path fill="#4a7870" d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.210938 L 0.949219 41.210938 Z M 0.949219 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#67ec189edb)"><g clip-path="url(#9e2c9eb0c8)"><g transform="matrix(1, 0, 0, 1, 44, 25)"><g clip-path="url(#18b158d824)"><g clip-path="url(#cfc84f52c9)"><g clip-path="url(#fc947c88aa)"><path fill="#84bcb8" d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#8b52c897d1)"><g clip-path="url(#a669865345)"><g transform="matrix(1, 0, 0, 1, 61, 5)"><g clip-path="url(#926de771c0)"><g clip-path="url(#20a0ea2a1b)"><g clip-path="url(#ffec020ed9)"><path fill="#84bcb8" d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g></svg>
@@ -3,17 +3,19 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="description" content="Local web UI for coding agents" />
6
7
  <meta name="theme-color" content="#ffffff" />
7
8
  <meta name="apple-mobile-web-app-capable" content="yes" />
8
9
  <meta name="apple-mobile-web-app-status-bar-style" content="default" />
9
10
  <meta name="apple-mobile-web-app-title" content="Kaizen" />
10
- <link rel="icon" type="image/png" href="/favicon.png" />
11
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
12
+ <link rel="alternate icon" type="image/png" href="/favicon.png" />
11
13
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
12
14
  <link rel="apple-touch-startup-image" href="/pwa-splash.png" />
13
15
  <link rel="manifest" id="app-manifest" href="/manifest.webmanifest" />
14
16
  <link rel="preload" as="image" href="/pwa-splash.png" />
15
17
  <title>Kaizen</title>
16
- <script type="module" crossorigin src="/assets/index-D-ORCGrq.js"></script>
18
+ <script type="module" crossorigin src="/assets/index-B6WGHlN_.js"></script>
17
19
  <link rel="stylesheet" crossorigin href="/assets/index-r28mcHqz.css">
18
20
  </head>
19
21
  <body>
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "Kaizen",
3
3
  "short_name": "Kaizen",
4
- "description": "A beautiful local-first project chat UI for coding agents",
4
+ "description": "Local web UI for coding agents",
5
5
  "start_url": "/",
6
6
  "scope": "/",
7
7
  "display": "standalone",
8
8
  "background_color": "#202122",
9
9
  "theme_color": "#202122",
10
10
  "icons": [
11
+ {
12
+ "src": "/favicon.svg",
13
+ "sizes": "any",
14
+ "type": "image/svg+xml",
15
+ "purpose": "any"
16
+ },
11
17
  {
12
18
  "src": "/pwa-192.png",
13
19
  "sizes": "192x192",
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "Kaizen",
3
3
  "short_name": "Kaizen",
4
- "description": "A beautiful local-first project chat UI for coding agents",
4
+ "description": "Local web UI for coding agents",
5
5
  "start_url": "/",
6
6
  "scope": "/",
7
7
  "display": "standalone",
8
8
  "background_color": "#ffffff",
9
9
  "theme_color": "#ffffff",
10
10
  "icons": [
11
+ {
12
+ "src": "/favicon.svg",
13
+ "sizes": "any",
14
+ "type": "image/svg+xml",
15
+ "purpose": "any"
16
+ },
11
17
  {
12
18
  "src": "/pwa-192.png",
13
19
  "sizes": "192x192",
@@ -1,15 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" fill="none">
2
- <rect width="1024" height="1024" rx="240" fill="#ffffff" />
3
- <g transform="translate(128 128) scale(32)">
4
- <circle cx="12" cy="12" r="3" stroke="#ef4444" stroke-width="1.5" />
5
- <path d="M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
6
- <path d="M12 7.5V9" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
7
- <path d="M7.5 12H9" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
8
- <path d="M16.5 12H15" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
9
- <path d="M12 16.5V15" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
10
- <path d="m8 8 1.88 1.88" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
11
- <path d="M14.12 9.88 16 8" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
12
- <path d="m8 16 1.88-1.88" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
13
- <path d="M14.12 14.12 16 16" stroke="#ef4444" stroke-width="1.5" stroke-linecap="round" />
14
- </g>
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="131" zoomAndPan="magnify" viewBox="0 0 98.25 110.999996" height="148" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="a6434bcabb"><path d="M 4.949219 2.914062 L 23.035156 2.914062 L 23.035156 66.925781 L 4.949219 66.925781 Z M 4.949219 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="f38a174fbe"><path d="M 6.4375 2.914062 L 21.546875 2.914062 C 22.371094 2.914062 23.035156 3.582031 23.035156 4.402344 L 23.035156 65.378906 C 23.035156 66.199219 22.371094 66.867188 21.546875 66.867188 L 6.4375 66.867188 C 5.617188 66.867188 4.949219 66.199219 4.949219 65.378906 L 4.949219 4.402344 C 4.949219 3.582031 5.617188 2.914062 6.4375 2.914062 Z M 6.4375 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="2f9a762088"><path d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.875 L 0.949219 64.875 Z M 0.949219 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="57da176352"><path d="M 2.4375 0.914062 L 17.546875 0.914062 C 18.371094 0.914062 19.035156 1.582031 19.035156 2.402344 L 19.035156 63.378906 C 19.035156 64.199219 18.371094 64.867188 17.546875 64.867188 L 2.4375 64.867188 C 1.617188 64.867188 0.949219 64.199219 0.949219 63.378906 L 0.949219 2.402344 C 0.949219 1.582031 1.617188 0.914062 2.4375 0.914062 Z M 2.4375 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="5f618c6616"><rect x="0" width="20" y="0" height="65"/></clipPath><clipPath id="b8b1a1fe42"><path d="M 26.238281 46.367188 L 52.355469 46.367188 L 52.355469 64.632812 L 26.238281 64.632812 Z M 26.238281 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="9c7d06bbac"><path d="M 27.726562 46.367188 L 50.835938 46.367188 C 51.660156 46.367188 52.324219 47.03125 52.324219 47.855469 L 52.324219 63.144531 C 52.324219 63.96875 51.660156 64.632812 50.835938 64.632812 L 27.726562 64.632812 C 26.902344 64.632812 26.238281 63.96875 26.238281 63.144531 L 26.238281 47.855469 C 26.238281 47.03125 26.902344 46.367188 27.726562 46.367188 Z M 27.726562 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dd3273c87e"><path d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="d7d6943e7d"><path d="M 1.726562 0.367188 L 24.835938 0.367188 C 25.660156 0.367188 26.324219 1.03125 26.324219 1.855469 L 26.324219 17.144531 C 26.324219 17.96875 25.660156 18.632812 24.835938 18.632812 L 1.726562 18.632812 C 0.902344 18.632812 0.238281 17.96875 0.238281 17.144531 L 0.238281 1.855469 C 0.238281 1.03125 0.902344 0.367188 1.726562 0.367188 Z M 1.726562 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dccb05b803"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="4a6dfd1cfa"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d68c17fb59"><path d="M 48.566406 66.867188 L 65.722656 66.867188 C 68.191406 66.867188 70.1875 68.867188 70.1875 71.332031 L 70.1875 80.671875 C 70.1875 83.136719 68.191406 85.136719 65.722656 85.136719 L 48.566406 85.136719 C 46.101562 85.136719 44.101562 83.136719 44.101562 80.671875 L 44.101562 71.332031 C 44.101562 68.867188 46.101562 66.867188 48.566406 66.867188 Z M 48.566406 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d91aa65f6f"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7874e4c1c8"><path d="M 4.566406 0.867188 L 21.722656 0.867188 C 24.191406 0.867188 26.1875 2.867188 26.1875 5.332031 L 26.1875 14.671875 C 26.1875 17.136719 24.191406 19.136719 21.722656 19.136719 L 4.566406 19.136719 C 2.101562 19.136719 0.101562 17.136719 0.101562 14.671875 L 0.101562 5.332031 C 0.101562 2.867188 2.101562 0.867188 4.566406 0.867188 Z M 4.566406 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="9ce9990e41"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="5053d98786"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d39cc34eab"><path d="M 45.589844 66.867188 L 68.699219 66.867188 C 69.523438 66.867188 70.1875 67.535156 70.1875 68.355469 L 70.1875 83.648438 C 70.1875 84.46875 69.523438 85.136719 68.699219 85.136719 L 45.589844 85.136719 C 44.765625 85.136719 44.101562 84.46875 44.101562 83.648438 L 44.101562 68.355469 C 44.101562 67.535156 44.765625 66.867188 45.589844 66.867188 Z M 45.589844 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7548939ec4"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e6d65400ef"><path d="M 1.589844 0.867188 L 24.699219 0.867188 C 25.523438 0.867188 26.1875 1.535156 26.1875 2.355469 L 26.1875 17.648438 C 26.1875 18.46875 25.523438 19.136719 24.699219 19.136719 L 1.589844 19.136719 C 0.765625 19.136719 0.101562 18.46875 0.101562 17.648438 L 0.101562 2.355469 C 0.101562 1.535156 0.765625 0.867188 1.589844 0.867188 Z M 1.589844 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="b8a14b9041"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="0e9cc5dcf0"><path d="M 61.667969 87.371094 L 87.785156 87.371094 L 87.785156 105.640625 L 61.667969 105.640625 Z M 61.667969 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="9aadc974f5"><path d="M 63.15625 87.371094 L 86.265625 87.371094 C 87.089844 87.371094 87.753906 88.035156 87.753906 88.859375 L 87.753906 104.152344 C 87.753906 104.972656 87.089844 105.640625 86.265625 105.640625 L 63.15625 105.640625 C 62.332031 105.640625 61.667969 104.972656 61.667969 104.152344 L 61.667969 88.859375 C 61.667969 88.035156 62.332031 87.371094 63.15625 87.371094 Z M 63.15625 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="08901b7c70"><path d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="17b30e43d9"><path d="M 2.15625 0.371094 L 25.265625 0.371094 C 26.089844 0.371094 26.753906 1.035156 26.753906 1.859375 L 26.753906 17.152344 C 26.753906 17.972656 26.089844 18.640625 25.265625 18.640625 L 2.15625 18.640625 C 1.332031 18.640625 0.667969 17.972656 0.667969 17.152344 L 0.667969 1.859375 C 0.667969 1.035156 1.332031 0.371094 2.15625 0.371094 Z M 2.15625 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="191fb42ae4"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="30d9207845"><path d="M 4.949219 60.460938 L 23.035156 60.460938 L 23.035156 100.828125 L 4.949219 100.828125 Z M 4.949219 60.460938 " clip-rule="nonzero"/></clipPath><clipPath id="52d8b1d0c8"><path d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.828125 L 0.949219 40.828125 Z M 0.949219 0.460938 " clip-rule="nonzero"/></clipPath><clipPath id="82dec45cec"><rect x="0" width="20" y="0" height="41"/></clipPath><clipPath id="9b56f823bb"><path d="M 4.949219 66.867188 L 23.035156 66.867188 L 23.035156 107.28125 L 4.949219 107.28125 Z M 4.949219 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="64a8e0ecf4"><path d="M 6.4375 66.867188 L 21.546875 66.867188 C 22.371094 66.867188 23.035156 67.535156 23.035156 68.355469 L 23.035156 105.75 C 23.035156 106.570312 22.371094 107.238281 21.546875 107.238281 L 6.4375 107.238281 C 5.617188 107.238281 4.949219 106.570312 4.949219 105.75 L 4.949219 68.355469 C 4.949219 67.535156 5.617188 66.867188 6.4375 66.867188 Z M 6.4375 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e46f782b3b"><path d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.28125 L 0.949219 41.28125 Z M 0.949219 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="2d24d09008"><path d="M 2.4375 0.867188 L 17.546875 0.867188 C 18.371094 0.867188 19.035156 1.535156 19.035156 2.355469 L 19.035156 39.75 C 19.035156 40.570312 18.371094 41.238281 17.546875 41.238281 L 2.4375 41.238281 C 1.617188 41.238281 0.949219 40.570312 0.949219 39.75 L 0.949219 2.355469 C 0.949219 1.535156 1.617188 0.867188 2.4375 0.867188 Z M 2.4375 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="c16e5f8d8b"><rect x="0" width="20" y="0" height="42"/></clipPath><clipPath id="67ec189edb"><path d="M 44.101562 25.863281 L 70.21875 25.863281 L 70.21875 44.132812 L 44.101562 44.132812 Z M 44.101562 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="9e2c9eb0c8"><path d="M 45.589844 25.863281 L 68.699219 25.863281 C 69.523438 25.863281 70.1875 26.53125 70.1875 27.351562 L 70.1875 42.644531 C 70.1875 43.464844 69.523438 44.132812 68.699219 44.132812 L 45.589844 44.132812 C 44.765625 44.132812 44.101562 43.464844 44.101562 42.644531 L 44.101562 27.351562 C 44.101562 26.53125 44.765625 25.863281 45.589844 25.863281 Z M 45.589844 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="cfc84f52c9"><path d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="fc947c88aa"><path d="M 1.589844 0.863281 L 24.699219 0.863281 C 25.523438 0.863281 26.1875 1.53125 26.1875 2.351562 L 26.1875 17.644531 C 26.1875 18.464844 25.523438 19.132812 24.699219 19.132812 L 1.589844 19.132812 C 0.765625 19.132812 0.101562 18.464844 0.101562 17.644531 L 0.101562 2.351562 C 0.101562 1.53125 0.765625 0.863281 1.589844 0.863281 Z M 1.589844 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="18b158d824"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="8b52c897d1"><path d="M 61.667969 5.359375 L 87.785156 5.359375 L 87.785156 23.628906 L 61.667969 23.628906 Z M 61.667969 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="a669865345"><path d="M 63.15625 5.359375 L 86.265625 5.359375 C 87.089844 5.359375 87.753906 6.027344 87.753906 6.847656 L 87.753906 22.140625 C 87.753906 22.964844 87.089844 23.628906 86.265625 23.628906 L 63.15625 23.628906 C 62.332031 23.628906 61.667969 22.964844 61.667969 22.140625 L 61.667969 6.847656 C 61.667969 6.027344 62.332031 5.359375 63.15625 5.359375 Z M 63.15625 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="20a0ea2a1b"><path d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="ffec020ed9"><path d="M 2.15625 0.359375 L 25.265625 0.359375 C 26.089844 0.359375 26.753906 1.027344 26.753906 1.847656 L 26.753906 17.140625 C 26.753906 17.964844 26.089844 18.628906 25.265625 18.628906 L 2.15625 18.628906 C 1.332031 18.628906 0.667969 17.964844 0.667969 17.140625 L 0.667969 1.847656 C 0.667969 1.027344 1.332031 0.359375 2.15625 0.359375 Z M 2.15625 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="926de771c0"><rect x="0" width="27" y="0" height="19"/></clipPath></defs><g clip-path="url(#a6434bcabb)"><g clip-path="url(#f38a174fbe)"><g transform="matrix(1, 0, 0, 1, 4, 2)"><g clip-path="url(#5f618c6616)"><g clip-path="url(#2f9a762088)"><g clip-path="url(#57da176352)"><path fill="#84bcb8" d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.855469 L 0.949219 64.855469 Z M 0.949219 0.914062 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#b8b1a1fe42)"><g clip-path="url(#9c7d06bbac)"><g transform="matrix(1, 0, 0, 1, 26, 46)"><g clip-path="url(#dccb05b803)"><g clip-path="url(#dd3273c87e)"><g clip-path="url(#d7d6943e7d)"><path fill="#84bcb8" d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#4a6dfd1cfa)"><g clip-path="url(#d68c17fb59)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#9ce9990e41)"><g clip-path="url(#d91aa65f6f)"><g clip-path="url(#7874e4c1c8)"><path fill="#84bcb8" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#5053d98786)"><g clip-path="url(#d39cc34eab)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#b8a14b9041)"><g clip-path="url(#7548939ec4)"><g clip-path="url(#e6d65400ef)"><path fill="#4a7870" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#0e9cc5dcf0)"><g clip-path="url(#9aadc974f5)"><g transform="matrix(1, 0, 0, 1, 61, 87)"><g clip-path="url(#191fb42ae4)"><g clip-path="url(#08901b7c70)"><g clip-path="url(#17b30e43d9)"><path fill="#4a7870" d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#30d9207845)"><g transform="matrix(1, 0, 0, 1, 4, 60)"><g clip-path="url(#82dec45cec)"><g clip-path="url(#52d8b1d0c8)"><path fill="#4a7870" d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.800781 L 0.949219 40.800781 Z M 0.949219 0.460938 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g><g clip-path="url(#9b56f823bb)"><g clip-path="url(#64a8e0ecf4)"><g transform="matrix(1, 0, 0, 1, 4, 66)"><g clip-path="url(#c16e5f8d8b)"><g clip-path="url(#e46f782b3b)"><g clip-path="url(#2d24d09008)"><path fill="#4a7870" d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.210938 L 0.949219 41.210938 Z M 0.949219 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#67ec189edb)"><g clip-path="url(#9e2c9eb0c8)"><g transform="matrix(1, 0, 0, 1, 44, 25)"><g clip-path="url(#18b158d824)"><g clip-path="url(#cfc84f52c9)"><g clip-path="url(#fc947c88aa)"><path fill="#84bcb8" d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#8b52c897d1)"><g clip-path="url(#a669865345)"><g transform="matrix(1, 0, 0, 1, 61, 5)"><g clip-path="url(#926de771c0)"><g clip-path="url(#20a0ea2a1b)"><g clip-path="url(#ffec020ed9)"><path fill="#84bcb8" d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g></svg>
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "kaizenai",
3
3
  "type": "module",
4
- "version": "0.1.0",
5
- "description": "A beautiful local-first project chat UI for coding agents",
4
+ "version": "0.1.2",
5
+ "description": "Local web UI for coding agents",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "claude",
@@ -31,6 +31,10 @@
31
31
  },
32
32
  "packageManager": "bun@1.3.5",
33
33
  "files": [
34
+ "assets/icon.png",
35
+ "assets/icon.svg",
36
+ "assets/screenshot.png",
37
+ "assets/screenshot-light.png",
34
38
  "bin/",
35
39
  "src/server/**/*.ts",
36
40
  "!src/server/**/*.test.ts",
@@ -6,6 +6,14 @@ import { getProjectMetadataCandidateRelativePath } from "./project-metadata"
6
6
 
7
7
  const MAX_ICON_BYTES = 128 * 1024
8
8
  const ICON_CANDIDATE_PATHS = [
9
+ "assets/icon.svg",
10
+ "assets/icon.png",
11
+ "assets/icon.jpg",
12
+ "assets/icon.jpeg",
13
+ "assets/icon.webp",
14
+ "assets/icon.gif",
15
+ "assets/icon.avif",
16
+ "assets/icon.ico",
9
17
  "icon.svg",
10
18
  "icon.png",
11
19
  "icon.jpg",