speckit-assistant 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +17 -17
  3. package/.next/app-path-routes-manifest.json +4 -4
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/cache/webpack/client-production/1.pack +0 -0
  6. package/.next/cache/webpack/client-production/15.pack +0 -0
  7. package/.next/cache/webpack/client-production/20.pack +0 -0
  8. package/.next/cache/webpack/client-production/24.pack +0 -0
  9. package/.next/cache/webpack/client-production/25.pack +0 -0
  10. package/.next/cache/webpack/client-production/27.pack +0 -0
  11. package/.next/cache/webpack/client-production/28.pack +0 -0
  12. package/.next/cache/webpack/client-production/29.pack +0 -0
  13. package/.next/cache/webpack/client-production/31.pack +0 -0
  14. package/.next/cache/webpack/client-production/4.pack +0 -0
  15. package/.next/cache/webpack/client-production/6.pack +0 -0
  16. package/.next/cache/webpack/client-production/index.pack +0 -0
  17. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  18. package/.next/cache/webpack/server-production/10.pack +0 -0
  19. package/.next/cache/webpack/server-production/11.pack +0 -0
  20. package/.next/cache/webpack/server-production/13.pack +0 -0
  21. package/.next/cache/webpack/server-production/18.pack +0 -0
  22. package/.next/cache/webpack/server-production/2.pack +0 -0
  23. package/.next/cache/webpack/server-production/21.pack +0 -0
  24. package/.next/cache/webpack/server-production/27.pack +0 -0
  25. package/.next/cache/webpack/server-production/29.pack +0 -0
  26. package/.next/cache/webpack/server-production/3.pack +0 -0
  27. package/.next/cache/webpack/server-production/31.pack +0 -0
  28. package/.next/cache/webpack/server-production/32.pack +0 -0
  29. package/.next/cache/webpack/server-production/33.pack +0 -0
  30. package/.next/cache/webpack/server-production/6.pack +0 -0
  31. package/.next/cache/webpack/server-production/9.pack +0 -0
  32. package/.next/cache/webpack/server-production/index.pack +0 -0
  33. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  34. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/_not-found.html +1 -1
  36. package/.next/server/app/_not-found.rsc +2 -2
  37. package/.next/server/app/api/feature/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/personas/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/phase/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/state/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/state/watch/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/task/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/index.html +1 -1
  49. package/.next/server/app/index.rsc +3 -3
  50. package/.next/server/app/page.js +1 -1
  51. package/.next/server/app/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app-paths-manifest.json +4 -4
  53. package/.next/server/pages/404.html +1 -1
  54. package/.next/server/pages/500.html +1 -1
  55. package/.next/static/chunks/app/page-b3dea12c644f2054.js +1 -0
  56. package/.next/static/css/0024e90648d29466.css +3 -0
  57. package/.next/trace +3 -3
  58. package/bin/adapters/primary/api/terminalManager.js +8 -8
  59. package/bin/adapters/secondary/agent/ProcessAgentRunner.js +64 -50
  60. package/bin/adapters/secondary/pty/ptyLoader.js +11 -11
  61. package/package.json +5 -1
  62. package/.next/static/chunks/app/page-63ac4ff563941667.js +0 -1
  63. package/.next/static/css/31544403e38a69f8.css +0 -3
  64. /package/.next/static/{ELGpn5csIINP2EpeEMCo6 → 8CUCTC2XnkR-leKsH4TwE}/_buildManifest.js +0 -0
  65. /package/.next/static/{ELGpn5csIINP2EpeEMCo6 → 8CUCTC2XnkR-leKsH4TwE}/_ssgManifest.js +0 -0
@@ -38,20 +38,20 @@ const ptyLoader_1 = require("../pty/ptyLoader");
38
38
  const fs = __importStar(require("fs"));
39
39
  const path = __importStar(require("path"));
40
40
  const PHASE_COMMANDS = {
41
- constitution: '/speckit.constitution',
42
- specification: '/speckit.specify',
43
- clarification: '/speckit.clarify',
44
- planning: '/speckit.plan',
45
- checklist: '/speckit.checklist',
46
- analyze: '/speckit.analyze',
47
- tasks: '/speckit.tasks',
48
- taskstoissues: '/speckit.taskstoissues',
49
- implementation: '/speckit.implement',
41
+ constitution: "/speckit.constitution",
42
+ specification: "/speckit.specify",
43
+ clarification: "/speckit.clarify",
44
+ planning: "/speckit.plan",
45
+ checklist: "/speckit.checklist",
46
+ analyze: "/speckit.analyze",
47
+ tasks: "/speckit.tasks",
48
+ taskstoissues: "/speckit.taskstoissues",
49
+ implementation: "/speckit.implement",
50
50
  };
51
51
  class ProcessAgentRunner {
52
52
  activeProcesses = new Map();
53
53
  phaseKey(featureName, phase) {
54
- return `${featureName || 'global'}-${phase}`;
54
+ return `${featureName || "global"}-${phase}`;
55
55
  }
56
56
  personaKey(featureName, id) {
57
57
  return `${featureName}-impl-persona-${id}`;
@@ -103,8 +103,8 @@ class ProcessAgentRunner {
103
103
  return false;
104
104
  }
105
105
  async runPhase(workspacePath, phase, featureName, agentConfig, userPrompt, onData) {
106
- const specArg = phase !== 'constitution' && featureName ? `specs/${featureName}` : null;
107
- const slashCmd = `${PHASE_COMMANDS[phase]}${specArg ? ` ${specArg}` : ''}`;
106
+ const specArg = phase !== "constitution" && featureName ? `specs/${featureName}` : null;
107
+ const slashCmd = `${PHASE_COMMANDS[phase]}${specArg ? ` ${specArg}` : ""}`;
108
108
  const context = userPrompt?.trim();
109
109
  const fullPrompt = context ? `${context}\n\n${slashCmd}` : slashCmd;
110
110
  return this.spawnAgent({
@@ -136,35 +136,47 @@ class ProcessAgentRunner {
136
136
  const { workspacePath, procKey, doneTag, agentConfig, fullPrompt, onData } = opts;
137
137
  const { cmd, args, stdin } = this.buildSpawnArgs(agentConfig, fullPrompt);
138
138
  return new Promise((resolve) => {
139
- onData?.(`Running: ${cmd} ${args.join(' ')}\n\n`);
139
+ onData?.(`Running: ${cmd} ${args.join(" ")}\n\n`);
140
140
  // Spawn the agent under a real pseudo-terminal. This is what makes
141
141
  // interactive CLIs (e.g. the clarify Q&A) detect a TTY via isatty() and
142
142
  // actually prompt the user instead of running single-shot. We still go
143
143
  // through a login shell so PATH/aliases resolve the agent binary the same
144
144
  // way they would in the user's own terminal.
145
- const isWin = process.platform === 'win32';
145
+ const isWin = process.platform === "win32";
146
146
  const ptyFile = isWin
147
- ? (process.env.COMSPEC || 'cmd.exe')
148
- : (process.env.SHELL || '/bin/bash');
147
+ ? process.env.COMSPEC || "cmd.exe"
148
+ : process.env.SHELL || "/bin/bash";
149
149
  const ptyArgs = isWin
150
- ? ['/c', [cmd, ...args].join(' ')]
151
- : ['-l', '-c', [cmd, ...args].map(a => `'${a.replace(/'/g, "'\\''")}'`).join(' ')];
150
+ ? ["/c", [cmd, ...args].join(" ")]
151
+ : [
152
+ "-l",
153
+ "-c",
154
+ [cmd, ...args]
155
+ .map((a) => `'${a.replace(/'/g, "'\\''")}'`)
156
+ .join(" "),
157
+ ];
152
158
  const child = (0, ptyLoader_1.loadPty)().spawn(ptyFile, ptyArgs, {
153
- name: 'xterm-256color',
159
+ name: "xterm-256color",
154
160
  cols: 120,
155
161
  rows: 30,
156
162
  cwd: workspacePath,
157
163
  env: {
158
164
  ...process.env,
159
- TERM: 'xterm-256color',
160
- ...(opts.persona ? {
161
- SPECKIT_PERSONA_ID: opts.persona.id || '',
162
- SPECKIT_PERSONA_LABEL: opts.persona.label || '',
163
- SPECKIT_PERSONA_MODEL: opts.persona.model || '',
164
- SPECKIT_PERSONA_SYSTEM_PROMPT: opts.persona.systemPrompt || '',
165
- SPECKIT_PERSONA_CAPABILITIES: Array.isArray(opts.persona.capabilities) ? opts.persona.capabilities.join(',') : '',
166
- SPECKIT_PERSONA_TOOLS: Array.isArray(opts.persona.tools) ? opts.persona.tools.join(',') : '',
167
- } : {})
165
+ TERM: "xterm-256color",
166
+ ...(opts.persona
167
+ ? {
168
+ SPECKIT_PERSONA_ID: opts.persona.id || "",
169
+ SPECKIT_PERSONA_LABEL: opts.persona.label || "",
170
+ SPECKIT_PERSONA_MODEL: opts.persona.model || "",
171
+ SPECKIT_PERSONA_SYSTEM_PROMPT: opts.persona.systemPrompt || "",
172
+ SPECKIT_PERSONA_CAPABILITIES: Array.isArray(opts.persona.capabilities)
173
+ ? opts.persona.capabilities.join(",")
174
+ : "",
175
+ SPECKIT_PERSONA_TOOLS: Array.isArray(opts.persona.tools)
176
+ ? opts.persona.tools.join(",")
177
+ : "",
178
+ }
179
+ : {}),
168
180
  },
169
181
  });
170
182
  this.activeProcesses.set(procKey, child);
@@ -174,7 +186,7 @@ class ProcessAgentRunner {
174
186
  // interactive prompts (e.g. clarify) through writeStdin().
175
187
  if (stdin !== undefined) {
176
188
  child.write(stdin);
177
- child.write('\x04');
189
+ child.write("\x04");
178
190
  }
179
191
  child.onData((data) => {
180
192
  onData?.(data);
@@ -184,11 +196,11 @@ class ProcessAgentRunner {
184
196
  onData?.(`\nProcess exited with code ${exitCode}\n`);
185
197
  // Write the phase done file so local watch logs it
186
198
  try {
187
- const runtimeDir = path.join(workspacePath, '.specify', '.runtime');
199
+ const runtimeDir = path.join(workspacePath, ".specify", ".runtime");
188
200
  if (!fs.existsSync(runtimeDir)) {
189
201
  fs.mkdirSync(runtimeDir, { recursive: true });
190
202
  }
191
- fs.writeFileSync(path.join(runtimeDir, 'phase-done.txt'), `${doneTag}:${exitCode}`, 'utf-8');
203
+ fs.writeFileSync(path.join(runtimeDir, "phase-done.txt"), `${doneTag}:${exitCode}`, "utf-8");
192
204
  }
193
205
  catch {
194
206
  // ignore
@@ -201,52 +213,54 @@ class ProcessAgentRunner {
201
213
  const agentType = config.agentType;
202
214
  const cliPath = config.agentPath || this.getDefaultCli(agentType);
203
215
  switch (agentType) {
204
- case 'claude':
216
+ case "claude":
205
217
  return {
206
218
  cmd: cliPath,
207
- args: ['--permission-mode', 'bypassPermissions', prompt]
219
+ args: ["--permission-mode", "bypassPermissions", prompt],
208
220
  };
209
- case 'gemini':
221
+ case "gemini":
210
222
  return {
211
223
  cmd: cliPath,
212
224
  args: [],
213
- stdin: prompt
225
+ stdin: prompt,
214
226
  };
215
- case 'copilot':
227
+ case "copilot":
216
228
  return {
217
229
  cmd: cliPath,
218
- args: [prompt]
230
+ args: [prompt],
219
231
  };
220
- case 'openai':
232
+ case "openai":
221
233
  return {
222
234
  cmd: cliPath,
223
- args: ['exec', '-'],
224
- stdin: prompt
235
+ args: ["exec", "-"],
236
+ stdin: prompt,
225
237
  };
226
- case 'custom':
238
+ case "custom":
227
239
  if (config.customCommand) {
228
- const parts = config.customCommand.split(' ');
240
+ const parts = config.customCommand.split(" ");
229
241
  const cmd = parts[0];
230
- const args = parts.slice(1).map(arg => arg === '{{prompt}}' ? prompt : arg);
242
+ const args = parts
243
+ .slice(1)
244
+ .map((arg) => (arg === "{{prompt}}" ? prompt : arg));
231
245
  // If {{prompt}} isn't in args, append it
232
- if (!config.customCommand.includes('{{prompt}}')) {
246
+ if (!config.customCommand.includes("{{prompt}}")) {
233
247
  args.push(prompt);
234
248
  }
235
249
  return { cmd, args };
236
250
  }
237
- return { cmd: 'specify', args: [prompt] };
251
+ return { cmd: "specify", args: [prompt] };
238
252
  default:
239
253
  return { cmd: cliPath, args: [prompt] };
240
254
  }
241
255
  }
242
256
  getDefaultCli(agentType) {
243
257
  const defaults = {
244
- claude: 'claude',
245
- gemini: 'gemini',
246
- copilot: 'ghcs',
247
- openai: 'codex'
258
+ claude: "claude",
259
+ gemini: "gemini",
260
+ copilot: "ghcs",
261
+ openai: "codex",
248
262
  };
249
- return defaults[agentType] || 'specify';
263
+ return defaults[agentType] || "specify";
250
264
  }
251
265
  }
252
266
  exports.ProcessAgentRunner = ProcessAgentRunner;
@@ -54,11 +54,11 @@ class PureJsPtyLike {
54
54
  this.child.kill(signal);
55
55
  }
56
56
  onData(cb) {
57
- this.child.stdout?.on('data', (chunk) => cb(chunk.toString()));
58
- this.child.stderr?.on('data', (chunk) => cb(chunk.toString()));
57
+ this.child.stdout?.on("data", (chunk) => cb(chunk.toString()));
58
+ this.child.stderr?.on("data", (chunk) => cb(chunk.toString()));
59
59
  }
60
60
  onExit(cb) {
61
- this.child.on('exit', (code, signal) => {
61
+ this.child.on("exit", (code, signal) => {
62
62
  cb({ exitCode: code ?? 0, signal: signal ? 1 : undefined });
63
63
  });
64
64
  }
@@ -70,7 +70,7 @@ const pureJsPtyModule = {
70
70
  env: options.env,
71
71
  });
72
72
  return new PureJsPtyLike(cp);
73
- }
73
+ },
74
74
  };
75
75
  /**
76
76
  * Loads node-pty defensively.
@@ -85,20 +85,20 @@ const pureJsPtyModule = {
85
85
  function loadPty() {
86
86
  if (cached)
87
87
  return cached;
88
- if (process.env.SPECKIT_TEST_FORCE_FALLBACK === 'true') {
88
+ if (process.env.SPECKIT_TEST_FORCE_FALLBACK === "true") {
89
89
  cached = pureJsPtyModule;
90
90
  return pureJsPtyModule;
91
91
  }
92
92
  try {
93
93
  // eslint-disable-next-line @typescript-eslint/no-var-requires
94
- const pty = require('node-pty');
95
- if (process.platform !== 'win32') {
94
+ const pty = require("node-pty");
95
+ if (process.platform !== "win32") {
96
96
  try {
97
- const ptyDir = path.dirname(require.resolve('node-pty/package.json'));
98
- const prebuilds = path.join(ptyDir, 'prebuilds');
97
+ const ptyDir = path.dirname(require.resolve("node-pty/package.json"));
98
+ const prebuilds = path.join(ptyDir, "prebuilds");
99
99
  if (fs.existsSync(prebuilds)) {
100
100
  for (const entry of fs.readdirSync(prebuilds)) {
101
- const helper = path.join(prebuilds, entry, 'spawn-helper');
101
+ const helper = path.join(prebuilds, entry, "spawn-helper");
102
102
  if (fs.existsSync(helper)) {
103
103
  try {
104
104
  fs.chmodSync(helper, 0o755);
@@ -118,7 +118,7 @@ function loadPty() {
118
118
  return pty;
119
119
  }
120
120
  catch (err) {
121
- console.warn('node-pty failed to load, falling back to pure child_process pty emulation.');
121
+ console.warn("node-pty failed to load, falling back to pure child_process pty emulation.");
122
122
  cached = pureJsPtyModule;
123
123
  return pureJsPtyModule;
124
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speckit-assistant",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Visual orchestrator for Spec-Driven Development (SDD) — Next.js, ReactFlow and Hexagonal Architecture",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -56,11 +56,15 @@
56
56
  "tailwind-merge": "^2.5.5"
57
57
  },
58
58
  "devDependencies": {
59
+ "@testing-library/jest-dom": "^6.9.1",
60
+ "@testing-library/react": "^16.3.2",
61
+ "@testing-library/user-event": "^14.6.1",
59
62
  "@types/node": "^20.17.9",
60
63
  "@types/react": "^19.0.1",
61
64
  "@types/react-dom": "^19.0.2",
62
65
  "@vitest/coverage-v8": "^2.1.9",
63
66
  "autoprefixer": "^10.4.20",
67
+ "jsdom": "^29.1.1",
64
68
  "postcss": "^8.4.49",
65
69
  "tailwindcss": "^3.4.16",
66
70
  "typescript": "^5.7.2",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{694:(e,t,n)=>{Promise.resolve().then(n.bind(n,9219))},9219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>eg});var s=n(8886),i=n(9398),a=n(7308);let r=[{id:"qa",label:"QA",command:"/speckit.review.qa",enabled:!0,model:"gemini-2.5-flash",description:"Automated quality assurance agent. Runs tests, verifies regression suite, and inspects validation logs.",systemPrompt:"You are the QA persona in a Spec-Driven Development cycle. Your goal is to run unit/integration tests and check that code changes do not break existing features. Output verification reports with a clear VERDICT: PASS or FAIL.",capabilities:["Runs Vitest/Jest test suites","Generates coverage reports","Checks edge cases in inputs","Identifies code regressions"],tools:["vitest","npm test","coverage-reporter","test-generator"]},{id:"code-review",label:"Code Review",command:"/speckit.review.code",enabled:!0,model:"gemini-2.5-pro",description:"Automated code standard and architectural reviewer. Validates SOLID patterns and code complexity.",systemPrompt:"You are the Code Reviewer persona. Analyze source code diffs for adherence to architectural standards, clean code practices (SOLID, DRY), and formatting. Output feedback with a final VERDICT: PASS or FAIL.",capabilities:["Analyzes design pattern compliance","Checks cyclomatic complexity","Identifies redundant code blocks","Ensures type safety"],tools:["eslint","typescript-compiler","complexity-analyzer","stylelint"]},{id:"security",label:"Security",command:"/speckit.review.security",enabled:!0,model:"claude-3-5-sonnet",description:"Automated security compliance agent. Scans for hardcoded credentials, dependency CVEs, and OWASP vulnerabilities.",systemPrompt:"You are the Security Auditor persona. Scan changes for exposed credentials, API keys, dependency vulnerabilities, injection flaws, and other OWASP Top 10 risks. Output a final VERDICT: PASS or FAIL.",capabilities:["Scans for exposed secrets","Identifies dependency CVEs","Detects injection vulnerabilities","Verifies authentication protocols"],tools:["git-secrets","npm audit","owasp-scanner","trivy"]},{id:"tech-lead",label:"Tech Lead",command:"/speckit.review.techlead",enabled:!0,model:"gemini-2.5-pro",description:"Tech Lead agent responsible for final signature sign-off. Aggregates reviews and signs the implementation gate.",systemPrompt:"You are the Tech Lead persona. You represent the final automated validation step. Aggregate findings from previous agents, confirm architecture completeness, and sign the gate. Output a final VERDICT: PASS or FAIL.",capabilities:["Aggregates reviews and signals","Confirms architecture patterns","Approves merge readiness","Performs final API signature verification"],tools:["git-merge-dryrun","dependency-checker","signature-verifier"]}];var l=n(7603),c=n(5106),o=n(2852),d=n(509),x=n(8053),p=n(3088),u=n(2084),h=n(3199),b=n(4850),m=n(1240),f=n(4908),g=n(8725);let z={developer:"Developer",qa:"QA","code-review":"Code",security:"Sec","tech-lead":"Lead"},v={developer:"Implements the features, writes source code, and completes specification tasks.",qa:"Runs unit tests, lint checks and validates coverage requirements.","code-review":"Analyzes code complexity, patterns, and style conventions.",security:"Inspects code for secret leaks, injection risks and path safety.","tech-lead":"Approves technical plan adherence and signs off execution."},k=e=>{switch(e){case"running":return"text-blue-500 bg-blue-500/10 border-blue-500/20 animate-pulse";case"passed":return"text-green-500 bg-green-500/10 border-green-500/20";case"failed":return"text-red-500 bg-red-500/10 border-red-500/20";default:return"text-zinc-400 bg-zinc-100 dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800"}},j={specification:"Specification",clarification:"Clarification",planning:"Planning",checklist:"Checklist",analysis:"Analysis",tasks:"Tasks",taskstoissues:"Tasks to Issues",implementation:"Implementation",completed:"Completed"},N=e=>{let{state:t,onRunPhase:n,onApprovePhase:a,onDiscardPhase:r,onSelectFeature:N,onDeleteFeature:y,onSelectPhaseFile:w,onCardDrop:C,onRerunGate:A,onOpenReview:S,onStopPhase:P}=e,[T,O]=i.useState(null),[F,R]=i.useState(null),E=e=>{if("idle"===e.status)return"idle";if("running"===e.status){var t;return(null==(t=e.personas)?void 0:t.some(e=>"idle"!==e.status))?"passed":"running"}return"passed"},I=e=>{e.preventDefault()},L=()=>{O(null)},D=(e,t)=>{if(t)return(0,s.jsxs)("span",{className:"flex items-center gap-1 text-[10px] font-semibold text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded border border-red-500/20",children:[(0,s.jsx)(l.A,{size:10}),"STALE"]});switch(e){case"running":return(0,s.jsx)("span",{className:"flex items-center gap-1 text-[10px] font-semibold text-blue-500 bg-blue-500/10 px-1.5 py-0.5 rounded border border-blue-500/20 animate-pulse",children:"RUNNING"});case"awaiting_review":return(0,s.jsx)("span",{className:"flex items-center gap-1 text-[10px] font-semibold text-amber-500 bg-amber-500/10 px-1.5 py-0.5 rounded border border-amber-500/20",children:"REVIEW"});case"approved":return(0,s.jsx)("span",{className:"flex items-center gap-1 text-[10px] font-semibold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded border border-green-500/20",children:"APPROVED"});default:return(0,s.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 bg-zinc-100 dark:bg-zinc-900 px-1.5 py-0.5 rounded border border-zinc-200 dark:border-zinc-800",children:"IDLE"})}};return(0,s.jsxs)("div",{className:"flex flex-col h-full bg-white dark:bg-black overflow-y-auto",children:[(0,s.jsxs)("div",{className:"mx-6 my-4 p-4 border border-zinc-200 dark:border-zinc-800 rounded-lg bg-zinc-50 dark:bg-zinc-950 flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-sm font-bold text-zinc-900 dark:text-zinc-100",children:"Project Constitution"}),D(t.constitutionPhase.status,t.constitutionPhase.stale)]}),(0,s.jsx)("p",{className:"text-xs text-zinc-500 mt-1",children:"Governing principles and rules that guide all subsequent planning and implementation."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>w(t.constitutionPhase.filePath),disabled:!t.constitutionPhase.filePath,className:"px-3 py-1.5 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded text-xs transition disabled:opacity-50",children:"View Constitution"}),"approved"!==t.constitutionPhase.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>n("constitution",null),disabled:"running"===t.constitutionPhase.status,className:"flex items-center gap-1 px-3 py-1.5 bg-black dark:bg-white text-white dark:text-black rounded text-xs font-semibold hover:opacity-90 transition disabled:opacity-50",children:[(0,s.jsx)(c.A,{size:10,fill:"currentColor"})," Run"]}),"awaiting_review"===t.constitutionPhase.status&&(0,s.jsxs)("button",{onClick:()=>a("constitution",null),className:"flex items-center gap-1 px-3 py-1.5 bg-green-650 hover:bg-green-700 text-white rounded text-xs font-semibold transition",children:[(0,s.jsx)(o.A,{size:10})," Approve"]})]}):(0,s.jsxs)("button",{onClick:()=>r("constitution",null),className:"flex items-center gap-1 px-3 py-1.5 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded text-xs transition",children:[(0,s.jsx)(d.A,{size:10})," Discard"]})]})]}),(0,s.jsx)("div",{className:"flex-1 flex gap-4 px-6 pb-6 overflow-x-auto min-h-0",children:["specification","clarification","planning","checklist","analyze","tasks","taskstoissues","implementation","completed"].map(e=>{let l=t.features.filter(t=>(e=>{for(let t of e.phases)if("approved"!==t.status)return t.phase;return"completed"})(t)===e);return(0,s.jsxs)("div",{onDragOver:I,onDragEnter:t=>{t.preventDefault(),O(e)},onDragLeave:L,onDrop:t=>((e,t)=>{e.preventDefault(),O(null);let n=e.dataTransfer.getData("text/plain");n&&(null==C||C(n,t))})(t,e),className:"flex flex-col flex-shrink-0 w-72 h-full border rounded-lg overflow-hidden transition-all duration-200 ".concat(T===e?"border-dashed border-zinc-400 dark:border-zinc-500 bg-zinc-100/70 dark:bg-zinc-900/40 ring-1 ring-zinc-400 dark:ring-zinc-500":"border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-950/20"),children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-3.5 py-3 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-100 dark:bg-zinc-950/70",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500",children:j[e]}),(0,s.jsx)("span",{className:"text-xs text-zinc-400 bg-zinc-200 dark:bg-zinc-900 px-1.5 py-0.5 rounded-full font-semibold",children:l.length})]}),(0,s.jsx)("div",{className:"flex-1 p-3 overflow-y-auto space-y-3",style:{scrollbarWidth:"thin"},children:0===l.length?(0,s.jsx)("div",{className:"flex items-center justify-center h-24 border border-dashed border-zinc-200 dark:border-zinc-800 rounded bg-white dark:bg-black/10 text-xs text-zinc-400",children:"No features in this phase"}):l.map(l=>{let j=(e=>{let t=e.phases.find(e=>"tasks"===e.phase);if(!(null==t?void 0:t.content))return null;let n=[...t.content.matchAll(/^\s*(?:[-*]|\d+\.)\s+\[( |x|X)\]/gm)];return 0===n.length?null:{done:n.filter(e=>"x"===e[1].toLowerCase()).length,total:n.length}})(l),C="completed"===e?l.phases[l.phases.length-1]:l.phases.find(t=>t.phase===e),A=t.activeFeatureName===l.name;return(0,s.jsxs)("div",{draggable:!0,onDragStart:e=>((e,t)=>{e.dataTransfer.setData("text/plain",t),e.dataTransfer.effectAllowed="move"})(e,l.name),onClick:()=>N(l.name),className:"p-3.5 border rounded-lg bg-white dark:bg-black transition-all cursor-pointer group flex flex-col justify-between hover:shadow-sm active:scale-[0.98] ".concat(A?"border-black dark:border-white ring-1 ring-black dark:ring-white shadow-sm":"border-zinc-200 dark:border-zinc-850 hover:border-zinc-350 dark:hover:border-zinc-700"),children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex justify-between items-start gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold text-zinc-850 dark:text-zinc-100 truncate group-hover:text-black dark:group-hover:text-white",children:l.name}),(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),y(l.name)},className:"text-zinc-400 hover:text-red-500 p-0.5 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded opacity-0 group-hover:opacity-100 transition",children:(0,s.jsx)(x.A,{size:12})})]}),"completed"!==e&&(0,s.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[D(C.status,C.stale),j&&(0,s.jsxs)("span",{className:"text-[10px] font-mono text-zinc-400 bg-zinc-100 dark:bg-zinc-900 px-1 py-0.5 rounded",children:[j.done,"/",j.total," Tasks"]})]}),("implementation"===e||"completed"===e)&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-wrap",children:[(0,s.jsx)(p.A,{size:11,className:"text-zinc-400"}),(0,s.jsx)("span",{title:"developer: ".concat(E(C)),className:"text-[9px] font-semibold px-1.5 py-0.5 rounded border ".concat(k(E(C))),children:"Dev"}),C.personas&&C.personas.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{size:9,className:"text-zinc-300 dark:text-zinc-700"}),C.personas.map((e,t)=>(0,s.jsxs)(i.Fragment,{children:[t>0&&(0,s.jsx)(u.A,{size:9,className:"text-zinc-300 dark:text-zinc-700"}),(0,s.jsx)("span",{title:"".concat(e.id,": ").concat(e.status),className:"text-[9px] font-semibold px-1.5 py-0.5 rounded border ".concat(k(e.status)),children:z[e.id]||e.id})]},e.id))]})]}),(0,s.jsxs)("button",{onClick:e=>{e.stopPropagation(),R(F===l.name?null:l.name)},className:"w-full text-[10px] flex items-center justify-between text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 mt-2 px-2 py-1 rounded border border-zinc-200 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-950/30 hover:bg-zinc-100 dark:hover:bg-zinc-900 transition",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(p.A,{size:11,className:"text-zinc-400"}),(0,s.jsx)("span",{className:"font-semibold",children:"Review Gate Dashboard"})]}),F===l.name?(0,s.jsx)(h.A,{size:11}):(0,s.jsx)(b.A,{size:11})]}),F===l.name&&(0,s.jsxs)("div",{className:"mt-2.5 p-2.5 rounded-md border border-zinc-150 dark:border-zinc-850 bg-zinc-50/20 dark:bg-zinc-950/20 space-y-2.5",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"space-y-2",children:["developer","qa","code-review","security","tech-lead"].map(e=>{let t="idle",i=null,a="";if("developer"===e)t=E(C),i=C.filePath,a="Developer";else{var r;let n=(null==(r=C.personas)?void 0:r.find(t=>t.id===e))||{id:e,status:"idle",reportPath:null};t=n.status,i=n.reportPath,a="qa"===e?"QA Agent":"code-review"===e?"Code Reviewer":"security"===e?"Security Auditor":"Tech Lead"}return(0,s.jsx)("div",{className:"p-2 rounded-md border transition flex flex-col gap-1.5 ".concat("passed"===t?"bg-green-500/5 border-green-500/20 dark:border-green-500/10":"failed"===t?"bg-red-500/5 border-red-500/20 dark:border-red-500/10":"running"===t?"bg-blue-500/5 border-blue-500/20 dark:border-blue-500/10 animate-pulse":"bg-white dark:bg-black border-zinc-200 dark:border-zinc-850"),children:(0,s.jsxs)("div",{className:"flex justify-between items-start",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] font-bold text-zinc-700 dark:text-zinc-300",children:a}),(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat("passed"===t?"bg-green-500":"failed"===t?"bg-red-500":"running"===t?"bg-blue-500 animate-ping":"bg-zinc-300 dark:bg-zinc-700")})]}),(0,s.jsx)("p",{className:"text-[9px] text-zinc-400 dark:text-zinc-500 mt-0.5 leading-normal",children:v[e]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:["developer"===e&&"idle"===t&&(0,s.jsxs)("button",{onClick:()=>n("implementation",l.name),className:"text-[9px] font-semibold text-white bg-black dark:bg-white dark:text-black px-1.5 py-0.5 rounded transition hover:opacity-90 flex items-center gap-1 shrink-0",children:[(0,s.jsx)(c.A,{size:8,fill:"currentColor"})," Code"]}),"running"===t&&(0,s.jsxs)("button",{onClick:()=>null==P?void 0:P("implementation",l.name),className:"text-[9px] font-semibold text-white bg-red-650 hover:bg-red-700 px-1.5 py-0.5 rounded transition flex items-center gap-1 shrink-0",title:"Stop execution of this agent persona",children:[(0,s.jsx)(m.A,{size:8})," Stop"]}),i?(0,s.jsx)("button",{onClick:()=>w(i),className:"text-[9px] font-semibold text-blue-500 dark:text-blue-400 hover:underline px-1.5 py-0.5 border border-blue-500/10 hover:border-blue-500/20 bg-blue-500/5 rounded transition shrink-0",children:"Report"}):"developer"!==e&&"running"!==t&&(0,s.jsx)("span",{className:"text-[9px] text-zinc-400 italic shrink-0",children:"No report"})]})]})},e)})}),(e=>"passed"===E(e)&&(!e.personas||e.personas.every(e=>"idle"===e.status)))(C)&&(0,s.jsxs)("div",{className:"p-2 border border-blue-500/20 bg-blue-500/5 text-blue-500 dark:text-blue-400 rounded-md text-[9px] leading-normal flex items-start gap-1",children:[(0,s.jsx)(f.A,{size:11,className:"mt-0.5 shrink-0"}),(0,s.jsxs)("span",{children:["Developer finished coding. Trigger the ",(0,s.jsx)("strong",{children:"Review Gate"})," to verify implementation."]})]})]})]})]}),(0,s.jsxs)("div",{className:"mt-4 pt-3 border-t border-zinc-100 dark:border-zinc-900 flex justify-end items-center gap-1.5",children:[(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),w(C.filePath)},disabled:!C.filePath,className:"mr-auto text-[10px] hover:underline text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-0",children:"Open File"}),"completed"!==e?"approved"!==C.status?(0,s.jsxs)(s.Fragment,{children:["running"===C.status?(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),null==P||P(e,l.name)},className:"flex items-center gap-0.5 p-1 px-2 bg-red-650 hover:bg-red-700 text-white text-[10px] font-semibold rounded transition",children:[(0,s.jsx)(m.A,{size:8})," Stop"]}):(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),n(e,l.name)},className:"flex items-center gap-0.5 p-1 px-2 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-900 text-[10px] font-semibold rounded transition",children:[(0,s.jsx)(c.A,{size:8,fill:"currentColor"})," Run"]}),"implementation"===e&&(0,s.jsxs)("button",{onClick:e=>{e.stopPropagation(),S(l.name,C)},disabled:"running"===C.status,title:"Open the human developer audit portal",className:"flex items-center gap-0.5 p-1 px-2 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-900 text-[10px] font-semibold rounded transition disabled:opacity-50",children:[(0,s.jsx)(p.A,{size:8})," Review"]}),"awaiting_review"===C.status&&(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),a(e,l.name)},className:"flex items-center gap-0.5 p-1 px-2 bg-green-500 hover:bg-green-600 text-white text-[10px] font-semibold rounded transition",children:[(0,s.jsx)(o.A,{size:8})," Approve"]})]}):(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),r(e,l.name)},className:"flex items-center gap-0.5 p-1 px-2 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-900 text-[10px] font-semibold rounded text-zinc-500 hover:text-zinc-700 transition",children:[(0,s.jsx)(d.A,{size:8})," Reset"]}):(0,s.jsxs)("span",{className:"flex items-center gap-0.5 text-green-500 font-bold text-[10px] uppercase",children:[(0,s.jsx)(g.A,{size:10})," Complete"]})]})]},l.name)})})]},e)})})]})};var y=n(5014),w=n(4201);n(9516);var C=n(7570);let A={idle:"#71717a",running:"#3b82f6",awaiting_review:"#f59e0b",approved:"#10b981"},S={idle:"Idle",running:"Running",awaiting_review:"Review",approved:"Approved"},P={constitution:"Constitution",specification:"Spec",clarification:"Clarify",planning:"Plan",checklist:"Checklist",analyze:"Analysis",tasks:"Tasks",taskstoissues:"Issues",implementation:"Implementation"},T={constitution:e=>{let{data:t}=e,n=A[t.status],i="running"===t.status;return(0,s.jsxs)("div",{className:"bg-white dark:bg-black rounded-lg border px-3 py-2 text-center select-none shadow-sm min-w-[150px] transition-all",style:{borderColor:t.stale?"#ef4444":n,borderStyle:t.stale?"dashed":"solid",borderWidth:"2px"},children:[(0,s.jsx)("div",{className:"text-xs font-bold text-zinc-950 dark:text-zinc-50 tracking-wide mb-1",children:"Constitution"}),(0,s.jsx)("div",{className:"flex items-center justify-center gap-1 text-[10px] font-semibold",style:{color:n,animation:i?"pulse 1.2s ease-in-out infinite":"none"},children:(0,s.jsx)("span",{children:S[t.status]})}),t.filePath&&(0,s.jsxs)("button",{onClick:e=>{var n;e.stopPropagation(),null==(n=t.onOpenFile)||n.call(t,t.filePath)},className:"mt-2 flex items-center justify-center gap-1 mx-auto text-[9px] font-medium text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 transition",children:[(0,s.jsx)(C.A,{size:10})," Open File"]}),(0,s.jsx)(y.h7,{type:"source",position:w.yX.Bottom,id:"bottom",className:"w-2 h-2 bg-zinc-400 dark:bg-zinc-650 border-0"})]})},phase:e=>{let{data:t}=e,n=A[t.status],i="running"===t.status;return(0,s.jsxs)("div",{className:"bg-white dark:bg-black rounded-lg border px-3 py-2 select-none shadow-sm min-w-[140px] transition-all ".concat(t.isActive?"border-black dark:border-white ring-1 ring-black dark:ring-white":""),style:{borderColor:t.stale?"#ef4444":n,borderStyle:t.stale?"dashed":"solid",borderWidth:t.isActive?"2px":"1.5px"},children:[t.isFirst&&(0,s.jsx)(y.h7,{type:"target",position:w.yX.Top,id:"top",className:"w-2 h-2 bg-zinc-400 dark:bg-zinc-650 border-0"}),!t.isFirst&&(0,s.jsx)(y.h7,{type:"target",position:w.yX.Left,id:"left",className:"w-2 h-2 bg-zinc-400 dark:bg-zinc-650 border-0"}),(0,s.jsx)("div",{className:"text-xs font-bold text-zinc-950 dark:text-zinc-50 mb-1",children:t.label}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-semibold",style:{color:n,animation:i?"pulse 1.2s ease-in-out infinite":"none"},children:[(0,s.jsx)("span",{children:S[t.status]}),t.stale&&(0,s.jsxs)("span",{className:"flex items-center gap-0.5 text-red-500 text-[8px] font-bold",children:[(0,s.jsx)(l.A,{size:8})," STALE"]})]}),t.taskProgress&&t.taskProgress.total>0&&(0,s.jsxs)("div",{className:"mt-2 space-y-1",children:["implementation"===t.phase&&(0,s.jsx)("div",{className:"h-1 bg-zinc-100 dark:bg-zinc-900 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full transition-all duration-300",style:{width:"".concat(Math.round(t.taskProgress.done/t.taskProgress.total*100),"%"),backgroundColor:t.taskProgress.done===t.taskProgress.total?"#10b981":"#3b82f6"}})}),(0,s.jsx)("div",{className:"text-[9px] text-zinc-400 dark:text-zinc-500 font-mono",children:"implementation"===t.phase?"".concat(t.taskProgress.done,"/").concat(t.taskProgress.total," tasks"):"".concat(t.taskProgress.total," task").concat(1!==t.taskProgress.total?"s":"")})]}),t.filePath&&(0,s.jsxs)("button",{onClick:e=>{var n;e.stopPropagation(),null==(n=t.onOpenFile)||n.call(t,t.filePath)},className:"mt-2 flex items-center gap-1 text-[9px] font-medium text-zinc-500 hover:text-zinc-850 dark:hover:text-zinc-200 transition",children:[(0,s.jsx)(C.A,{size:10})," Open File"]}),!t.isLast&&(0,s.jsx)(y.h7,{type:"source",position:w.yX.Right,id:"right",className:"w-2 h-2 bg-zinc-400 dark:bg-zinc-650 border-0"})]})}},O=e=>{let{state:t,onSelectFeature:n,onSelectPhaseFile:a}=e,{nodes:r,edges:l}=(0,i.useMemo)(()=>{var e,n;let s=[],i=[],r=t.features.find(e=>e.name===t.activeFeatureName),l="approved"===t.constitutionPhase.status?null!=(e=null==r?void 0:r.phases.find(e=>"approved"!==e.status))?e:null:t.constitutionPhase;return s.push({id:"constitution",type:"constitution",position:{x:735,y:15},data:{status:t.constitutionPhase.status,stale:null!=(n=t.constitutionPhase.stale)&&n,filePath:t.constitutionPhase.filePath,onOpenFile:a},style:{width:160}}),t.features.forEach((e,n)=>{let r=175+130*n,c=e.phases.find(e=>"tasks"===e.phase),o=null;if(null==c?void 0:c.content){let e=[...c.content.matchAll(/^\s*(?:[-*]|\d+\.)\s+\[( |x|X)\]/gm)];e.length>0&&(o={done:e.filter(e=>"x"===e[1].toLowerCase()).length,total:e.length})}e.phases.forEach((n,c)=>{var d;let x="".concat(e.name,"::").concat(n.phase),p=0===c,u=c===e.phases.length-1,h=(null==l?void 0:l.phase)===n.phase&&e.name===t.activeFeatureName,b="tasks"===n.phase||"implementation"===n.phase;s.push({id:x,type:"phase",position:{x:210*c,y:r},data:{label:P[n.phase],phase:n.phase,status:n.status,stale:null!=(d=n.stale)&&d,filePath:n.filePath,featureName:e.name,isFirst:p,isLast:u,isActive:h,taskProgress:b?o:null,onOpenFile:a},style:{width:160}});let m={stroke:A[n.status]||"#71717a",strokeWidth:"approved"===n.status?2:1.5,strokeDasharray:"awaiting_review"===n.status?"5 3":void 0},f="running"===n.status||"awaiting_review"===n.status;if(p&&i.push({id:"constitution--\x3e".concat(x),source:"constitution",sourceHandle:"bottom",target:x,targetHandle:"top",type:"smoothstep",animated:f,style:m}),!p){let t="".concat(e.name,"::").concat(e.phases[c-1].phase);i.push({id:"".concat(t,"--\x3e").concat(x),source:t,sourceHandle:"right",target:x,targetHandle:"left",type:"smoothstep",animated:f,style:m})}}),s.push({id:"".concat(e.name,"::label"),type:"default",position:{x:-140,y:r+37.5-10},data:{label:e.name},style:{background:"transparent",border:"none",fontSize:"11px",color:"#888",fontWeight:600,width:120,textAlign:"right",boxShadow:"none",pointerEvents:"none"},selectable:!1,draggable:!1})}),{nodes:s,edges:i}},[t,a]);return(0,s.jsx)("div",{className:"w-full h-full bg-zinc-50 dark:bg-black",children:(0,s.jsxs)(y.Gc,{nodes:r,edges:l,nodeTypes:T,onNodeClick:(e,t)=>{t.id.includes("::")&&n(t.id.split("::")[0])},fitView:!0,minZoom:.5,maxZoom:1.5,children:[(0,s.jsx)(y.VS,{gap:16,size:1,color:"#e4e4e7",className:"dark:opacity-10"}),(0,s.jsx)(y.H2,{showInteractive:!1,className:"border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 rounded shadow-md"})]})})};var F=n(3383),R=n(3353),E=n(4172),I=n(8317),L=n(47),D=n(1269),W=n(4727),G=n(496),J=n(6930),M=n(4140),q=n(7613),V=n(2768),H=n(6337);let _=[{phase:"constitution",label:"Constitution",file:"constitution.md",defaultPath:()=>".specify/memory/constitution.md"},{phase:"specification",label:"Spec",file:"spec.md",defaultPath:e=>"specs/".concat(e,"/spec.md")},{phase:"clarification",label:"Clarification",file:"clarification.md",defaultPath:e=>"specs/".concat(e,"/clarification.md")},{phase:"planning",label:"Planning",file:"plan.md",defaultPath:e=>"specs/".concat(e,"/plan.md")},{phase:"checklist",label:"Checklist",file:"checklist.md",defaultPath:e=>"specs/".concat(e,"/checklist.md")},{phase:"analyze",label:"Analysis",file:"analysis.md",defaultPath:e=>"specs/".concat(e,"/analysis.md")},{phase:"tasks",label:"Tasks",file:"tasks.md",defaultPath:e=>"specs/".concat(e,"/tasks.md")}],U=e=>{let{filePath:t,initialContent:n,onSave:a,onToggleTask:r,state:l,isMaximized:c=!1,onToggleMaximize:o,onSelectFile:d}=e,[x,p]=(0,i.useState)(""),[u,h]=(0,i.useState)("split"),[b,m]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),z=(0,i.useRef)(null),v=(0,i.useRef)(null),k=e=>{let t=v.current;if(!t)return;let n=t.selectionStart,s=t.selectionEnd,i=t.value,a=i.substring(n,s),r="",l=0,c=0;switch(e){case"bold":r="**".concat(a||"bold text","**"),l=2,c=r.length-2;break;case"italic":r="*".concat(a||"italic text","*"),l=1,c=r.length-1;break;case"heading":let o=0===n||"\n"===i.charAt(n-1);r="".concat(o?"":"\n","### ").concat(a||"Heading"),l=o?4:5,c=r.length;break;case"link":r="[".concat(a||"link text","](https://example.com)"),l=1,c=(a||"link text").length+1;break;case"code":r="\n```\n".concat(a||"code here","\n```\n"),l=5,c=r.length-5;break;case"table":l=2,c=(r="\n| Header 1 | Header 2 |\n| -------- | -------- |\n| Cell 1 | Cell 2 |\n").length-1;break;case"checkbox":let d=0===n||"\n"===i.charAt(n-1);r="".concat(d?"":"\n","- [ ] ").concat(a||"New Task"),l=d?6:7,c=r.length}p(i.substring(0,n)+r+i.substring(s)),setTimeout(()=>{t.focus(),t.setSelectionRange(n+l,n+c)},50)};(0,i.useEffect)(()=>{n!==z.current&&(n===x?g(!1):x===z.current||null===z.current?(p(n||""),g(!1)):g(!0),z.current=n)},[n,x]);let j=async()=>{if(t){m(!0);try{await a(x)}finally{m(!1)}}},N=e=>{let t=[],n=e,i=0;for(;n.length>0;){let e=n.match(/^([^\*]*)\*\*([^\*]+)\*\*(.*)/),a=n.match(/^([^`]*)`([^`]+)`(.*)/);if(a&&(!e||a[1].length<e[1].length))a[1]&&t.push((0,s.jsx)("span",{children:a[1]},i++)),t.push((0,s.jsx)("code",{className:"px-1 py-0.5 bg-zinc-100 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded font-mono text-xs text-red-500 dark:text-red-400",children:a[2]},i++)),n=a[3];else if(e)e[1]&&t.push((0,s.jsx)("span",{children:e[1]},i++)),t.push((0,s.jsx)("strong",{className:"font-semibold text-zinc-900 dark:text-zinc-100",children:e[2]},i++)),n=e[3];else{t.push((0,s.jsx)("span",{children:n},i++));break}}return t.length>0?t:[e]};return(0,s.jsxs)("div",{className:"flex flex-col h-full border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-black rounded-lg overflow-hidden",children:[l&&d&&(0,s.jsx)("div",{className:"flex items-center border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-950/30 overflow-x-auto scrollbar-none shrink-0",children:_.map(e=>{let n=(e=>{if("constitution"===e.phase){var t;return(null==l||null==(t=l.constitutionPhase)?void 0:t.filePath)||".specify/memory/constitution.md"}if(!(null==l?void 0:l.activeFeatureName))return null;let n=l.features.find(e=>e.name===l.activeFeatureName),s=null==n?void 0:n.phases.find(t=>t.phase===e.phase);return(null==s?void 0:s.filePath)||e.defaultPath(l.activeFeatureName)})(e),i="constitution"!==e.phase&&!(null==l?void 0:l.activeFeatureName),a=(e=>{if("constitution"===e){var t;return(null==l||null==(t=l.constitutionPhase)?void 0:t.status)||"idle"}if(!(null==l?void 0:l.activeFeatureName))return"idle";let n=l.features.find(e=>e.name===l.activeFeatureName),s=null==n?void 0:n.phases.find(t=>t.phase===e);return(null==s?void 0:s.status)||"idle"})(e.phase),r=!i&&n&&t&&(n.replace(/\\/g,"/").toLowerCase()===t.replace(/\\/g,"/").toLowerCase()||t.replace(/\\/g,"/").toLowerCase().endsWith(n.replace(/\\/g,"/").toLowerCase())||n.replace(/\\/g,"/").toLowerCase().endsWith(t.replace(/\\/g,"/").toLowerCase())),c="bg-zinc-300 dark:bg-zinc-700";return"approved"===a&&(c="bg-emerald-500"),"awaiting_review"===a&&(c="bg-amber-500"),"running"===a&&(c="bg-blue-500 animate-pulse"),(0,s.jsxs)("button",{disabled:i,onClick:()=>n&&d(n),className:"flex items-center gap-2 px-4 py-2.5 text-xs font-medium border-b-2 transition shrink-0 ".concat(i?"text-zinc-300 dark:text-zinc-800 cursor-not-allowed border-transparent":r?"text-black dark:text-white border-black dark:border-white bg-white dark:bg-zinc-900/50":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-300 border-transparent hover:bg-zinc-100/30 dark:hover:bg-zinc-900/30"),children:[(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(c)}),(0,s.jsx)("span",{children:e.label})]},e.phase)})}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-4 py-2.5 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-950/50 shrink-0",children:[(0,s.jsx)("span",{className:"text-xs font-mono text-zinc-500 truncate max-w-[200px] sm:max-w-md",children:t.split("/").pop()}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center bg-zinc-100 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded p-0.5",children:[(0,s.jsxs)("button",{onClick:()=>h("edit"),className:"p-1.5 rounded transition text-xs flex items-center gap-1 ".concat("edit"===u?"bg-white dark:bg-zinc-800 text-zinc-850 dark:text-zinc-50 shadow-sm":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"),children:[(0,s.jsx)(F.A,{size:12}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:()=>h("preview"),className:"p-1.5 rounded transition text-xs flex items-center gap-1 ".concat("preview"===u?"bg-white dark:bg-zinc-800 text-zinc-850 dark:text-zinc-50 shadow-sm":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"),children:[(0,s.jsx)(R.A,{size:12}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Preview"})]}),(0,s.jsxs)("button",{onClick:()=>h("split"),className:"p-1.5 rounded transition text-xs flex items-center gap-1 ".concat("split"===u?"bg-white dark:bg-zinc-800 text-zinc-850 dark:text-zinc-50 shadow-sm":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"),children:[(0,s.jsx)(E.A,{size:12}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Split"})]})]}),(0,s.jsxs)("button",{onClick:j,disabled:b,className:"flex items-center gap-1 px-3 py-1.5 bg-black dark:bg-white text-white dark:text-black rounded text-xs font-medium hover:bg-zinc-800 dark:hover:bg-zinc-100 transition disabled:opacity-50",children:[(0,s.jsx)(I.A,{size:12}),(0,s.jsx)("span",{children:b?"Saving...":"Save"})]}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"w-px h-5 bg-zinc-200 dark:bg-zinc-800 mx-1"}),(0,s.jsx)("button",{onClick:o,className:"p-1.5 rounded text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-900 transition",title:c?"Restore Layout":"Maximize Editor",children:c?(0,s.jsx)(L.A,{size:12}):(0,s.jsx)(D.A,{size:12})})]})]})]}),("edit"===u||"split"===u)&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 px-4 py-1.5 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50/35 dark:bg-zinc-950/20 overflow-x-auto scrollbar-none shrink-0",children:[(0,s.jsx)("button",{onClick:()=>k("bold"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Bold",children:(0,s.jsx)(W.A,{size:13})}),(0,s.jsx)("button",{onClick:()=>k("italic"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Italic",children:(0,s.jsx)(G.A,{size:13})}),(0,s.jsx)("button",{onClick:()=>k("heading"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Heading",children:(0,s.jsx)(J.A,{size:13})}),(0,s.jsx)("div",{className:"w-px h-4 bg-zinc-200 dark:bg-zinc-800 mx-1"}),(0,s.jsx)("button",{onClick:()=>k("link"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Insert Link",children:(0,s.jsx)(M.A,{size:13})}),(0,s.jsx)("button",{onClick:()=>k("code"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-650 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Insert Code Block",children:(0,s.jsx)(q.A,{size:13})}),(0,s.jsx)("button",{onClick:()=>k("table"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-650 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Insert Table",children:(0,s.jsx)(V.A,{size:13})}),(0,s.jsx)("button",{onClick:()=>k("checkbox"),className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-650 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition",title:"Add Task",children:(0,s.jsx)(H.A,{size:13})})]}),f&&(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-amber-50 dark:bg-amber-950/20 border-b border-amber-200 dark:border-amber-900/50 text-xs text-amber-800 dark:text-amber-300 transition-all shrink-0",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5 font-medium",children:(0,s.jsx)("span",{children:"⚠️ External changes detected. The file on disk has been modified."})}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>{p(n||""),g(!1)},className:"px-2 py-1 bg-amber-600 dark:bg-amber-700 text-white rounded hover:bg-amber-700 dark:hover:bg-amber-600 transition font-semibold",children:"Reload from disk"}),(0,s.jsx)("button",{onClick:()=>{g(!1)},className:"px-2 py-1 bg-zinc-200 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 rounded hover:bg-zinc-300 dark:hover:bg-zinc-750 transition font-semibold",children:"Keep my changes"})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[("edit"===u||"split"===u)&&(0,s.jsx)("textarea",{ref:v,value:x,onChange:e=>p(e.target.value),className:"flex-1 p-4 bg-transparent resize-none border-0 outline-none focus:ring-0 text-zinc-800 dark:text-zinc-100 font-mono text-xs leading-relaxed ".concat("split"===u?"border-r border-zinc-200 dark:border-zinc-800":""),placeholder:"Write markdown here..."}),("preview"===u||"split"===u)&&(0,s.jsx)("div",{className:"flex-1 p-5 overflow-y-auto bg-transparent prose dark:prose-invert max-w-none",children:(()=>{if(!x)return(0,s.jsx)("p",{className:"text-zinc-400 italic text-sm",children:"No content to display."});let e=x.split("\n"),t=!1,n=[],a=[];for(let l=0;l<e.length;l++){let c=e[l];if(c.trim().startsWith("```")){t?(t=!1,a.push((0,s.jsx)("pre",{className:"p-3 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded font-mono text-xs overflow-x-auto text-zinc-800 dark:text-zinc-200 my-3",children:(0,s.jsx)("code",{children:n.join("\n")})},"code-".concat(l))),n=[]):t=!0;continue}if(t){n.push(c);continue}if(c.trim().startsWith("|")&&l+1<e.length&&e[l+1].trim().match(/^\|?\s*(:?-+:?\s*\|?)+$/)){let t=c.split("|").map(e=>e.trim()).filter((e,t,n)=>(0!==t||""!==e)&&(t!==n.length-1||""!==e)),n=[],i=l;for(l+=2;l<e.length&&e[l].trim().startsWith("|");){let t=e[l].split("|").map(e=>e.trim()).filter((e,t,n)=>(0!==t||""!==e)&&(t!==n.length-1||""!==e));n.push(t),l++}l--,a.push((0,s.jsx)("div",{className:"overflow-x-auto my-4",children:(0,s.jsxs)("table",{className:"min-w-full border-collapse border border-zinc-200 dark:border-zinc-800 text-sm",children:[(0,s.jsx)("thead",{className:"bg-zinc-50 dark:bg-zinc-900/50",children:(0,s.jsx)("tr",{children:t.map((e,t)=>(0,s.jsx)("th",{className:"border border-zinc-200 dark:border-zinc-800 px-4 py-2 text-left font-bold text-zinc-900 dark:text-zinc-100",children:N(e)},t))})}),(0,s.jsx)("tbody",{children:n.map((e,t)=>(0,s.jsx)("tr",{className:"hover:bg-zinc-50/50 dark:hover:bg-zinc-900/10 odd:bg-zinc-50/10 dark:odd:bg-zinc-950/10",children:e.map((e,t)=>(0,s.jsx)("td",{className:"border border-zinc-200 dark:border-zinc-800 px-4 py-2 text-zinc-700 dark:text-zinc-350",children:N(e)},t))},t))})]})},"table-".concat(i)));continue}let o=c.match(/^(\s*(?:[-*]|\d+\.)\s+\[)( |x|X)(\])(.*)/);if(o){let e="x"===o[2].toLowerCase(),t=o[4],n=c.search(/\S/);a.push((0,s.jsxs)("div",{className:"flex items-start gap-2.5 py-1",style:{paddingLeft:"".concat(12*n,"px")},children:[(0,s.jsx)("input",{type:"checkbox",checked:e,onChange:e=>null==r?void 0:r(l,e.target.checked),className:"mt-1 w-4 h-4 rounded border-zinc-300 dark:border-zinc-700 bg-transparent text-black dark:text-white focus:ring-0 cursor-pointer"}),(0,s.jsx)("span",{className:"text-sm leading-relaxed ".concat(e?"line-through text-zinc-400 dark:text-zinc-500":"text-zinc-800 dark:text-zinc-200"),children:N(t)})]},l));continue}let d=c.match(/^(#{1,6})\s+(.*)/);if(d){let e=d[1].length,t=d[2],n=["","text-2xl font-bold border-b border-zinc-200 dark:border-zinc-850 pb-1 mt-6 mb-3 text-zinc-900 dark:text-zinc-100","text-xl font-bold mt-5 mb-2.5 text-zinc-900 dark:text-zinc-100","text-lg font-semibold mt-4 mb-2 text-zinc-800 dark:text-zinc-200","text-base font-semibold mt-3 mb-2 text-zinc-800 dark:text-zinc-200","text-sm font-semibold mt-2.5 mb-1.5 text-zinc-850 dark:text-zinc-250","text-xs font-semibold mt-2 mb-1 text-zinc-900 dark:text-zinc-300"];a.push(i.createElement("h".concat(e),{key:l,className:n[e]},N(t)));continue}let x=c.match(/^>\s+\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](.*)/i);if(x){let e=x[1].toUpperCase(),t=x[2],n={NOTE:"bg-zinc-50 dark:bg-zinc-950 border-blue-500 text-zinc-800 dark:text-zinc-200",TIP:"bg-zinc-50 dark:bg-zinc-950 border-green-500 text-zinc-800 dark:text-zinc-200",IMPORTANT:"bg-zinc-50 dark:bg-zinc-950 border-purple-500 text-zinc-800 dark:text-zinc-200",WARNING:"bg-zinc-50 dark:bg-zinc-950 border-amber-500 text-zinc-800 dark:text-zinc-200",CAUTION:"bg-zinc-50 dark:bg-zinc-950 border-red-500 text-zinc-800 dark:text-zinc-200"};a.push((0,s.jsxs)("div",{className:"p-3.5 border-l-4 my-3 rounded-r text-sm font-medium ".concat(n[e]),children:[(0,s.jsx)("div",{className:"font-bold text-xs tracking-wider mb-1 text-zinc-400",children:e}),(0,s.jsx)("div",{children:N(t)})]},l));continue}if(c.startsWith(">")){a.push((0,s.jsx)("blockquote",{className:"border-l-4 border-zinc-200 dark:border-zinc-800 pl-4 py-1.5 my-3 text-zinc-500 italic text-sm",children:N(c.substring(1).trim())},l));continue}if("---"===c.trim()){a.push((0,s.jsx)("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800"},l));continue}if(c.trim().startsWith("- ")||c.trim().startsWith("* ")){let e=c.trim().substring(2);a.push((0,s.jsx)("li",{className:"ml-4 list-disc text-sm leading-relaxed text-zinc-700 dark:text-zinc-300 my-0.5",children:N(e)},l));continue}if(""===c.trim()){a.push((0,s.jsx)("div",{className:"h-2"},l));continue}a.push((0,s.jsx)("p",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300 my-1",children:N(c)},l))}return(0,s.jsx)("div",{className:"space-y-1",children:a})})()})]})]}):(0,s.jsx)("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-zinc-400 bg-zinc-50 dark:bg-zinc-950/10",children:(0,s.jsx)("p",{className:"text-sm",children:"Select a tab or a phase to start editing or viewing markdown."})})]})};var Q=n(6848),Y=n(1694);n(9170);var B=n(7004);let X=(0,i.forwardRef)((e,t)=>{let{active:n,running:a=!1,onInput:r,onResize:l}=e,c=(0,i.useRef)(null),o=(0,i.useRef)(null),d=(0,i.useRef)(null),p=(0,i.useRef)(r),u=(0,i.useRef)(l);return p.current=r,u.current=l,(0,i.useImperativeHandle)(t,()=>({write:e=>{var t;return null==(t=o.current)?void 0:t.write(e)},clear:()=>{var e;return null==(e=o.current)?void 0:e.clear()},focus:()=>{var e;return null==(e=o.current)?void 0:e.focus()}}),[]),(0,i.useEffect)(()=>{var e;if(!c.current)return;let t=new Q.B({cursorBlink:!0,theme:{background:"#000000",foreground:"#a1a1aa",cursor:"#f4f4f5",selectionBackground:"#27272a"},fontFamily:'Menlo, Monaco, Consolas, "Courier New", monospace',fontSize:11}),n=new Y.Y;t.loadAddon(n),t.open(c.current);try{n.fit()}catch(e){}o.current=t,d.current=n;let s=t.onData(e=>{var t;return null==(t=p.current)?void 0:t.call(p,e)}),i=t.onResize(e=>{var t;let{cols:n,rows:s}=e;return null==(t=u.current)?void 0:t.call(u,n,s)});null==(e=u.current)||e.call(u,t.cols,t.rows);let a=new ResizeObserver(()=>{try{n.fit()}catch(e){}});return a.observe(c.current),()=>{a.disconnect(),s.dispose(),i.dispose(),t.dispose(),o.current=null,d.current=null}},[]),(0,i.useEffect)(()=>{if(!n)return;let e=requestAnimationFrame(()=>{var e,t;try{null==(t=d.current)||t.fit()}catch(e){}null==(e=o.current)||e.focus()});return()=>cancelAnimationFrame(e)},[n]),(0,s.jsxs)("div",{className:"flex flex-col h-full bg-black border-t border-zinc-800",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-4 py-2 border-b border-zinc-900 bg-zinc-950 shrink-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(B.A,{size:14,className:"text-zinc-500"}),(0,s.jsx)("span",{className:"font-mono text-xs font-semibold tracking-wider text-zinc-400",children:"CONSOLE OUTPUT"}),a&&(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),(0,s.jsx)("button",{onClick:()=>{var e;return null==(e=o.current)?void 0:e.clear()},title:"Clear console",className:"p-1 hover:bg-zinc-800 rounded transition text-zinc-500 hover:text-zinc-300",children:(0,s.jsx)(x.A,{size:14})})]}),(0,s.jsx)("div",{ref:c,onClick:()=>{var e;return null==(e=o.current)?void 0:e.focus()},className:"flex-1 w-full min-h-0 p-2 overflow-hidden"})]})});X.displayName="AgentConsole";var K=n(3277);let Z=e=>{let{isOpen:t,onClose:n,persona:a,onSave:r}=e,[l,c]=(0,i.useState)(""),[o,d]=(0,i.useState)(""),[x,p]=(0,i.useState)(!0),[u,h]=(0,i.useState)("gemini-2.5-flash"),[b,g]=(0,i.useState)(""),[z,v]=(0,i.useState)(""),[k,j]=(0,i.useState)(""),[N,y]=(0,i.useState)("");return((0,i.useEffect)(()=>{a&&(c(a.label||""),d(a.command||""),p(!1!==a.enabled),h(a.model||"gemini-2.5-flash"),g(a.description||""),v(a.systemPrompt||""),j(Array.isArray(a.capabilities)?a.capabilities.join("\n"):""),y(Array.isArray(a.tools)?a.tools.join("\n"):""))},[a,t]),t&&a)?(0,s.jsx)("div",{className:"fixed inset-0 bg-black/85 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:(0,s.jsxs)("div",{className:"bg-zinc-950 border border-zinc-850 w-full max-w-2xl h-[85vh] rounded-xl flex flex-col overflow-hidden shadow-2xl animate-in fade-in zoom-in duration-200",children:[(0,s.jsxs)("header",{className:"px-6 py-4 border-b border-zinc-850 flex justify-between items-center bg-zinc-900/50",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 bg-blue-500/10 text-blue-400 rounded-lg",children:(0,s.jsx)(K.A,{size:18})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-base font-bold text-white tracking-tight",children:["Configure Persona Agent: ",a.id.toUpperCase()]}),(0,s.jsx)("p",{className:"text-xs text-zinc-400 mt-0.5",children:"Customize capabilities, core instructions, models, and slash command integration."})]})]}),(0,s.jsx)("button",{onClick:n,className:"p-1.5 hover:bg-zinc-800 rounded-lg text-zinc-400 hover:text-zinc-200 transition",children:(0,s.jsx)(m.A,{size:18})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider mb-1.5",children:"Persona Name"}),(0,s.jsx)("input",{type:"text",value:l,onChange:e=>c(e.target.value),className:"w-full px-3 py-2 text-xs bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",placeholder:"e.g. QA Agent"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider mb-1.5",children:"LLM Model"}),(0,s.jsxs)("select",{value:u,onChange:e=>h(e.target.value),className:"w-full px-3 py-2 text-xs bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",children:[(0,s.jsx)("option",{value:"gemini-2.5-flash",children:"Gemini 2.5 Flash (Fast, Google)"}),(0,s.jsx)("option",{value:"gemini-2.5-pro",children:"Gemini 2.5 Pro (Analytical, Google)"}),(0,s.jsx)("option",{value:"claude-3-5-sonnet",children:"Claude 3.5 Sonnet (Coding, Anthropic)"}),(0,s.jsx)("option",{value:"gpt-4o",children:"GPT-4o (Reasoning, OpenAI)"})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 items-center",children:[(0,s.jsxs)("div",{className:"md:col-span-2",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider mb-1.5",children:"Slash Command / Execution Path"}),(0,s.jsx)("input",{type:"text",value:o,onChange:e=>d(e.target.value),className:"w-full px-3 py-2 text-xs font-mono bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",placeholder:"e.g. /speckit.review.qa"})]}),(0,s.jsx)("div",{className:"flex items-center h-full pt-4",children:(0,s.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer select-none",children:[(0,s.jsx)("input",{type:"checkbox",checked:x,onChange:e=>p(e.target.checked),className:"w-4 h-4 rounded border-zinc-800 bg-zinc-900 text-blue-500 focus:ring-0 focus:ring-offset-0"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-white",children:"Enable Agent Persona"}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500",children:"Run persona in review gate"})]})]})})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Agent Description"}),(0,s.jsx)("textarea",{rows:2,value:b,onChange:e=>g(e.target.value),className:"w-full p-3 text-xs bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700 resize-none",placeholder:"Provide a general summary of this agent's responsibilities..."})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"System Prompt & Core Instructions"}),(0,s.jsx)("textarea",{rows:5,value:z,onChange:e=>v(e.target.value),className:"w-full p-3 text-xs font-mono bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",placeholder:"System prompt instructions..."})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Capabilities (one per line)"}),(0,s.jsxs)("span",{className:"text-[9px] text-zinc-500 flex items-center gap-0.5",children:[(0,s.jsx)(f.A,{size:10})," Environment injection"]})]}),(0,s.jsx)("textarea",{rows:4,value:k,onChange:e=>j(e.target.value),className:"w-full p-3 text-xs font-mono bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",placeholder:"e.g. Runs Vitest suite"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Authorized Tools (one per line)"}),(0,s.jsxs)("span",{className:"text-[9px] text-zinc-500 flex items-center gap-0.5",children:[(0,s.jsx)(f.A,{size:10})," CLI commands"]})]}),(0,s.jsx)("textarea",{rows:4,value:N,onChange:e=>y(e.target.value),className:"w-full p-3 text-xs font-mono bg-zinc-900 border border-zinc-800 rounded outline-none text-white focus:border-zinc-700",placeholder:"e.g. npm test"})]})]})]}),(0,s.jsxs)("footer",{className:"px-6 py-4 border-t border-zinc-850 flex justify-end gap-3 bg-zinc-900/30",children:[(0,s.jsx)("button",{onClick:n,className:"px-4 py-2 bg-zinc-900 hover:bg-zinc-850 border border-zinc-850 hover:border-zinc-800 text-zinc-300 font-semibold text-xs rounded-lg transition",children:"Cancel"}),(0,s.jsxs)("button",{onClick:()=>{let e=k.split("\n").map(e=>e.trim()).filter(e=>e.length>0),t=N.split("\n").map(e=>e.trim()).filter(e=>e.length>0);r({...a,label:l,command:o,enabled:x,model:u,description:b,systemPrompt:z,capabilities:e,tools:t})},className:"px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white font-semibold text-xs rounded-lg transition flex items-center gap-1.5",children:[(0,s.jsx)(I.A,{size:14}),(0,s.jsx)("span",{children:"Save Configuration"})]})]})]})}):null};var $=n(4970),ee=n(5074),et=n(367),en=n(9234),es=n(2393);let ei={developer:"Developer",qa:"QA Agent","code-review":"Code Reviewer",security:"Security Auditor","tech-lead":"Tech Lead"},ea={developer:"Implements features and writes source code.",qa:"Runs unit and integration test suites.","code-review":"Reviews code styles and architectural patterns.",security:"Checks for security vulnerabilities and secrets.","tech-lead":"Performs final technical audit and validation."},er=e=>{var t,n,a,r,l;let{isOpen:c,onClose:d,featureName:x,activePhaseState:u,onApprove:h}=e,[b,f]=(0,i.useState)([]),[z,v]=(0,i.useState)([]),[k,j]=(0,i.useState)(""),[N,y]=(0,i.useState)(""),[w,A]=(0,i.useState)("main"),[S,P]=(0,i.useState)(!1),[T,O]=(0,i.useState)(""),[F,R]=(0,i.useState)("files"),[E,I]=(0,i.useState)("");if((0,i.useEffect)(()=>{if(!c)return;let e=!0;return P(!0),O(""),fetch("/api/git?action=status").then(e=>{if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return e.json()}).then(t=>{e&&(t.error?O(t.error):(f(t.files||[]),v(t.log||[]),A(t.branch||"main"),t.files&&t.files.length>0?j(t.files[0].path):j("")))}).catch(t=>{e&&O(t.message||"Failed to fetch git status.")}).finally(()=>{e&&P(!1)}),()=>{e=!1}},[c]),(0,i.useEffect)(()=>{if(!c||!k)return void y("");let e=!0;return y("Loading diff..."),fetch("/api/git?action=diff&file=".concat(encodeURIComponent(k))).then(e=>{if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return e.json()}).then(t=>{e&&(t.error?y("Error: ".concat(t.error)):y(t.diff||"No modifications found."))}).catch(t=>{e&&y("Failed to load diff: ".concat(t.message))}),()=>{e=!1}},[c,k]),!c)return null;let L=b.reduce((e,t)=>e+t.additions,0),D=b.reduce((e,t)=>e+t.deletions,0),W=(()=>{if(!u||"idle"===u.status)return"idle";if("running"===u.status){var e;return(null==(e=u.personas)?void 0:e.some(e=>"idle"!==e.status))?"passed":"running"}return"passed"})(),G=null==u||null==(t=u.personas)?void 0:t.find(e=>"qa"===e.id),J=G?G.status:"idle",M=null==u||null==(n=u.personas)?void 0:n.find(e=>"security"===e.id),V=M?M.status:"idle",_=(null==u||null==(a=u.personas)?void 0:a.length)||0,U=(null==u||null==(r=u.personas)?void 0:r.filter(e=>"passed"===e.status).length)||0,Q=_>0?Math.round(U/_*100):100*("passed"===W),Y=[{id:"developer",label:ei.developer,desc:ea.developer,status:W},...((null==u?void 0:u.personas)||[]).map(e=>({id:e.id,label:ei[e.id]||e.id,desc:ea[e.id]||"",status:e.status}))];return(0,s.jsx)("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:(0,s.jsxs)("div",{className:"bg-zinc-950 border border-zinc-850 w-full h-[95vh] rounded-xl flex flex-col overflow-hidden shadow-2xl animate-in fade-in zoom-in duration-200",children:[(0,s.jsxs)("header",{className:"px-6 py-4 border-b border-zinc-850 flex justify-between items-center bg-zinc-900/50",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-2xl",children:"⚡"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("h2",{className:"text-base font-bold text-white tracking-tight",children:["Human Audit Portal: ",x]}),(0,s.jsx)("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded bg-blue-500/10 text-blue-400 border border-blue-500/20 uppercase animate-pulse",children:"Awaiting Sign-off"})]}),(0,s.jsx)("p",{className:"text-xs text-zinc-400 mt-0.5",children:"Inspect code changes, check agent validation reports, and sign off the gate to approve implementation."})]})]}),(0,s.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-zinc-800 rounded-lg text-zinc-400 hover:text-zinc-200 transition",children:(0,s.jsx)(m.A,{size:18})})]}),T&&(0,s.jsxs)("div",{className:"mx-6 mt-4 p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center gap-2 text-xs text-red-400",children:[(0,s.jsx)($.A,{size:14,className:"shrink-0"}),(0,s.jsx)("span",{children:T})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 px-6 py-4 border-b border-zinc-850 bg-zinc-950",children:[(0,s.jsxs)("div",{className:"p-3 bg-zinc-900/40 border border-zinc-850/50 rounded-lg flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 rounded bg-green-500/10 text-green-400",children:(0,s.jsx)(H.A,{size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] font-bold text-zinc-500 uppercase",children:"Tests Coverage"}),(0,s.jsx)("div",{className:"text-sm font-bold text-white mt-0.5",children:"passed"===J?"100% Passed":"running"===J?"Running...":"Awaiting QA"})]})]}),(0,s.jsxs)("div",{className:"p-3 bg-zinc-900/40 border border-zinc-850/50 rounded-lg flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 rounded bg-blue-500/10 text-blue-400",children:(0,s.jsx)(q.A,{size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] font-bold text-zinc-500 uppercase",children:"Lines Added"}),(0,s.jsx)("div",{className:"text-sm font-bold text-white mt-0.5",children:S?"Loading...":"+".concat(L," / -").concat(D," lines")})]})]}),(0,s.jsxs)("div",{className:"p-3 bg-zinc-900/40 border border-zinc-850/50 rounded-lg flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 rounded bg-purple-500/10 text-purple-400",children:(0,s.jsx)(p.A,{size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] font-bold text-zinc-500 uppercase",children:"Security Scan"}),(0,s.jsx)("div",{className:"text-sm font-bold text-white mt-0.5",children:"passed"===V?"Grade A (Clean)":"failed"===V?"Failed":"running"===V?"Scanning...":"Awaiting Scan"})]})]}),(0,s.jsxs)("div",{className:"p-3 bg-zinc-900/40 border border-zinc-850/50 rounded-lg flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 rounded bg-amber-500/10 text-amber-400",children:(0,s.jsx)(ee.A,{size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] font-bold text-zinc-500 uppercase",children:"Validation Duration"}),(0,s.jsx)("div",{className:"text-sm font-bold text-white mt-0.5",children:(null==u||null==(l=u.personas)?void 0:l.some(e=>"passed"===e.status))?"1m 20s total":"0s"})]})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[(0,s.jsxs)("div",{className:"w-80 border-r border-zinc-850 flex flex-col bg-zinc-950 shrink-0",children:[(0,s.jsxs)("div",{className:"flex border-b border-zinc-850 bg-zinc-900/20",children:[(0,s.jsx)("button",{onClick:()=>R("files"),className:"flex-1 py-2.5 text-center text-xs font-semibold border-b-2 transition ".concat("files"===F?"text-white border-white":"text-zinc-500 border-transparent hover:text-zinc-350"),children:"Modified Files"}),(0,s.jsx)("button",{onClick:()=>R("git"),className:"flex-1 py-2.5 text-center text-xs font-semibold border-b-2 transition ".concat("git"===F?"text-white border-white":"text-zinc-500 border-transparent hover:text-zinc-350"),children:"Git Commit History"})]}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto p-4 space-y-1",children:"files"===F?S?(0,s.jsx)("div",{className:"text-zinc-500 text-xs text-center py-8",children:"Loading files..."}):0===b.length?(0,s.jsx)("div",{className:"text-zinc-500 text-xs text-center py-8",children:"No modified files found."}):b.map(e=>(0,s.jsxs)("div",{onClick:()=>j(e.path),className:"p-2.5 rounded-lg border text-xs cursor-pointer transition flex justify-between items-center ".concat(k===e.path?"bg-zinc-900 border-zinc-700 text-white":"bg-transparent border-transparent text-zinc-400 hover:bg-zinc-900/50 hover:text-zinc-200"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(C.A,{size:13,className:"code"===e.type?"text-blue-400":"text-zinc-500"}),(0,s.jsx)("span",{className:"truncate font-mono text-[11px]",children:e.path.split("/").pop()})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 font-mono text-[10px] font-bold",children:[(0,s.jsxs)("span",{className:"text-green-500",children:["+",e.additions]}),(0,s.jsxs)("span",{className:"text-red-500",children:["-",e.deletions]})]})]},e.path)):(0,s.jsxs)("div",{className:"space-y-4 py-2",children:[(0,s.jsxs)("div",{className:"p-3 bg-zinc-900/30 border border-zinc-850 rounded-lg flex items-center gap-2 mb-2",children:[(0,s.jsx)(et.A,{size:14,className:"text-blue-500 animate-pulse"}),(0,s.jsx)("span",{className:"text-xs text-zinc-300 font-bold",children:w}),(0,s.jsx)(en.A,{size:10,className:"text-zinc-500"}),(0,s.jsxs)("span",{className:"text-[10px] text-zinc-500 font-mono",children:["origin/",w]})]}),S?(0,s.jsx)("div",{className:"text-zinc-500 text-xs text-center py-8",children:"Loading commit history..."}):0===z.length?(0,s.jsx)("div",{className:"text-zinc-500 text-xs text-center py-8",children:"No commit history found."}):z.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-3 relative pl-1",children:[t<z.length-1&&(0,s.jsx)("div",{className:"absolute left-2.5 top-5 bottom-0 w-px bg-zinc-800"}),(0,s.jsx)("div",{className:"relative z-10 mt-1",children:(0,s.jsx)(es.A,{size:12,className:"text-blue-500 bg-zinc-950 rounded-full"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-[10px] text-zinc-500",children:e.hash}),(0,s.jsx)("span",{className:"text-[9px] text-zinc-500",children:e.date})]}),(0,s.jsx)("p",{className:"text-[11px] font-semibold text-zinc-200 truncate mt-0.5 font-sans font-medium",children:e.message}),(0,s.jsxs)("span",{className:"text-[9px] text-zinc-500 mt-1 block",children:["by ",e.author]})]})]},e.hash))]})})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col bg-zinc-900/20 overflow-hidden",children:[(0,s.jsxs)("div",{className:"px-4 py-2.5 bg-zinc-950 border-b border-zinc-850 flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-xs font-mono text-zinc-300 font-bold",children:k||"No file selected"}),(0,s.jsx)("span",{className:"text-[10px] font-bold text-zinc-500 uppercase tracking-wide bg-zinc-900 border border-zinc-850 px-2 py-0.5 rounded",children:"Unified Diff"})]}),(0,s.jsx)("div",{className:"flex-1 p-4 overflow-auto font-mono text-[11px] leading-relaxed text-zinc-300 bg-black/60 select-text",children:N?N.split("\n").map((e,t)=>{let n="text-zinc-400";return e.startsWith("+")?n="text-green-500 bg-green-500/5 font-semibold":e.startsWith("-")&&(n="text-red-500 bg-red-500/5 font-semibold"),(0,s.jsx)("div",{className:"px-2 py-0.5 rounded ".concat(n),children:e},t)}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-zinc-500 text-xs",children:[(0,s.jsx)(C.A,{size:32,className:"mb-2 text-zinc-650"}),(0,s.jsx)("span",{children:"Select a code file from the left panel to inspect the git diff."})]})})]}),(0,s.jsxs)("div",{className:"w-96 border-l border-zinc-850 flex flex-col bg-zinc-950 shrink-0 overflow-y-auto",children:[(0,s.jsxs)("div",{className:"p-5 border-b border-zinc-850 space-y-4",children:[(0,s.jsx)("h3",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider",children:"Gate Analytics"}),(0,s.jsxs)("div",{className:"flex justify-between items-center gap-4 bg-zinc-900/30 border border-zinc-850 p-3 rounded-lg",children:[(0,s.jsxs)("div",{className:"relative w-16 h-16 shrink-0 flex items-center justify-center",children:[(0,s.jsxs)("svg",{className:"w-full h-full transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"32",cy:"32",r:"28",className:"stroke-zinc-800",strokeWidth:"4",fill:"transparent"}),(0,s.jsx)("circle",{cx:"32",cy:"32",r:"28",className:"stroke-green-500",strokeWidth:"4",fill:"transparent",strokeDasharray:175,strokeDashoffset:175*(1-Q/100)})]}),(0,s.jsxs)("span",{className:"absolute text-[11px] font-bold text-white",children:[Q,"%"]})]}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"text-[10px] text-zinc-500 uppercase font-bold",children:"QA Gate Grade"}),(0,s.jsxs)("p",{className:"text-xs text-zinc-200 mt-0.5 font-semibold",children:[U," of ",_," automated verification reviews passed."]})]})]}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsx)("span",{className:"text-[10px] text-zinc-500 uppercase font-bold",children:"Execution Time per Persona"}),(0,s.jsx)("div",{className:"space-y-2 bg-zinc-900/30 border border-zinc-850 p-3.5 rounded-lg",children:[{label:"Developer",time:"idle"===W?"0s":"45s",pct:100*("idle"!==W),color:"bg-zinc-500"},...((null==u?void 0:u.personas)||[]).map(e=>{let t="idle"!==e.status,n="0s",s=0;return t&&("qa"===e.id?(n="12s",s=26):"code-review"===e.id?(n="15s",s=33):"security"===e.id?(n="8s",s=18):"tech-lead"===e.id&&(n="10s",s=22)),{label:ei[e.id]||e.id,time:n,pct:s,color:({qa:"bg-green-500","code-review":"bg-blue-500",security:"bg-purple-500","tech-lead":"bg-amber-500"})[e.id]||"bg-zinc-500"}})].map(e=>(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"flex justify-between text-[10px] font-medium text-zinc-300 font-sans",children:[(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"font-mono",children:e.time})]}),(0,s.jsx)("div",{className:"h-1.5 w-full bg-zinc-800 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full ".concat(e.color),style:{width:"".concat(e.pct,"%")}})})]},e.label))})]})]}),(0,s.jsxs)("div",{className:"p-5 border-b border-zinc-850 space-y-3",children:[(0,s.jsx)("h3",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider",children:"Persona Audits Summary"}),(0,s.jsx)("div",{className:"space-y-3",children:Y.map(e=>{let t=(0,s.jsx)(ee.A,{size:13,className:"text-zinc-500 mt-0.5 shrink-0"});return"passed"===e.status?t=(0,s.jsx)(g.A,{size:13,className:"text-green-500 mt-0.5 shrink-0"}):"failed"===e.status?t=(0,s.jsx)($.A,{size:13,className:"text-red-500 mt-0.5 shrink-0"}):"running"===e.status&&(t=(0,s.jsx)(ee.A,{size:13,className:"text-blue-400 animate-pulse mt-0.5 shrink-0"})),(0,s.jsxs)("div",{className:"flex gap-2.5 items-start",children:[t,(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] font-bold text-zinc-300",children:e.label}),(0,s.jsx)("span",{className:"text-[8px] font-bold px-1 rounded uppercase tracking-wider ".concat("passed"===e.status?"bg-green-500/10 text-green-400 border border-green-500/20":"failed"===e.status?"bg-red-500/10 text-red-400 border border-red-500/20":"running"===e.status?"bg-blue-500/10 text-blue-400 border border-blue-500/20 animate-pulse":"bg-zinc-800 text-zinc-400 border border-zinc-700"),children:e.status})]}),(0,s.jsx)("p",{className:"text-[9px] text-zinc-500",children:e.desc})]})]},e.id)})})]}),(0,s.jsxs)("div",{className:"p-5 flex-1 flex flex-col justify-end gap-3 min-h-[200px]",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-500 uppercase",children:"Reviewer Comments"}),(0,s.jsx)("textarea",{placeholder:"Insert audit notes or observations...",value:E,onChange:e=>I(e.target.value),className:"w-full h-16 p-2 text-xs bg-zinc-900 border border-zinc-800 rounded outline-none resize-none text-white focus:border-zinc-700"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:d,className:"flex-1 py-2 bg-zinc-900 hover:bg-zinc-850 border border-zinc-850 hover:border-zinc-800 text-zinc-300 font-semibold text-xs rounded transition",children:"Cancel Audit"}),(0,s.jsxs)("button",{onClick:h,className:"flex-1 py-2 bg-green-500 hover:bg-green-600 text-white font-semibold text-xs rounded transition flex items-center justify-center gap-1.5",children:[(0,s.jsx)(o.A,{size:14}),(0,s.jsx)("span",{children:"Approve & Merge"})]})]})]})]})]})]})})};var el=n(3781),ec=n(451),eo=n(3541),ed=n(9597),ex=n(6714),ep=n(9756),eu=n(4807),eh=n(779),eb=n(9136);let em=(0,a.default)(()=>n.e(343).then(n.bind(n,7343)),{loadableGenerated:{webpack:()=>[7343]},ssr:!1}),ef={constitution:"Constitution",specification:"Specification",clarification:"Clarification",planning:"Planning",checklist:"Checklist",analyze:"Analysis",tasks:"Tasks",taskstoissues:"Tasks to Issues",implementation:"Implementation"};function eg(){let[e,t]=(0,i.useState)(null),n=i.useRef(null),[a,l]=(0,i.useState)(null),[o,d]=(0,i.useState)("kanban"),[x,h]=(0,i.useState)("dark"),[b,f]=(0,i.useState)({agentType:"claude",customCommand:"",agentPath:""}),[g,z]=(0,i.useState)(""),[v,k]=(0,i.useState)(r),[j,y]=(0,i.useState)(null),[w,C]=(0,i.useState)(null),[A,S]=(0,i.useState)(""),[P,T]=(0,i.useState)(!1),[F,R]=(0,i.useState)(!1),[E,I]=(0,i.useState)("editor"),[W,G]=(0,i.useState)(null),[J,M]=(0,i.useState)(!1),[q,V]=(0,i.useState)(!1),H=()=>{V(e=>{let t=!e;return localStorage.setItem("isSidebarCollapsed",String(t)),t})};(0,i.useEffect)(()=>{"true"===localStorage.getItem("isSidebarCollapsed")&&V(!0)},[]);let _=i.useRef(a);(0,i.useEffect)(()=>{_.current=a},[a]),(0,i.useEffect)(()=>{Q(),Y(),window.document.documentElement.classList.add("dark");let e=new EventSource("/api/state/watch");return e.addEventListener("update",e=>{let n=JSON.parse(e.data),s=n.state||n,i=n.changedFile||null;t(s),_.current&&i&&_.current.path.replace(/\\/g,"/")===i.replace(/\\/g,"/")&&et(_.current.path)}),()=>{e.close()}},[]);let Q=async()=>{try{let e=await fetch("/api/state"),n=await e.json();t(n)}catch(e){console.error("Failed to fetch state:",e)}},Y=async()=>{try{let e=await fetch("/api/personas");if(e.ok){let t=await e.json();k(t)}}catch(e){console.error("Failed to fetch personas:",e)}},B=async e=>{let t=v.map(t=>t.id===e.id?e:t);k(t),y(null);try{await fetch("/api/personas",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(e){console.error("Failed to save persona config:",e)}},K=async e=>{try{let n=await fetch("/api/state",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({activeFeatureName:e})}),s=await n.json();t(s);let i=s.features.find(t=>t.name===e),a=null==i?void 0:i.phases.find(e=>"specification"===e.phase);(null==a?void 0:a.filePath)?et(a.filePath):l(null)}catch(e){console.error(e)}},$=async e=>{if(e.preventDefault(),A.trim())try{let e=await fetch("/api/feature",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:A.trim()})}),n=await e.json();t(n),S("");let s="specs/".concat(A.trim(),"/spec.md");l({path:s,content:""})}catch(e){console.error(e)}},ee=async n=>{if(confirm('Are you sure you want to delete feature "'.concat(n,'"?')))try{let s=await fetch("/api/feature",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n})}),i=await s.json();t(i),(null==e?void 0:e.activeFeatureName)===n&&l(null)}catch(e){console.error(e)}},et=async e=>{try{let t=await fetch("/api/file?path=".concat(encodeURIComponent(e))),n=await t.json();l(n)}catch(e){console.error(e)}},en=async e=>{if(a)try{let n=await fetch("/api/file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,content:e})}),s=await n.json();l({path:a.path,content:e}),s.state&&t(s.state)}catch(e){console.error(e)}},es=async(n,s)=>{if(null==e?void 0:e.activeFeatureName)try{let i=await fetch("/api/task",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({featureName:e.activeFeatureName,lineIndex:n,checked:s})}),r=await i.json();t(r);let l=r.features.find(e=>e.name===r.activeFeatureName),c=null==l?void 0:l.phases.find(e=>"tasks"===e.phase);(null==c?void 0:c.filePath)&&(null==a?void 0:a.path)===c.filePath&&et(c.filePath)}catch(e){console.error(e)}},ei=async(e,s,i)=>{var a,r,l;let c=null==(a=e.body)?void 0:a.getReader();if(!c){T(!1),G(null);return}let o=new TextDecoder,d="";for(;;){let{value:e,done:a}=await c.read();if(a)break;let x=(d+=o.decode(e)).split("\n\n");for(let e of(d=x.pop()||"",x))if(e.startsWith("event: log")){let t=e.split("\n").find(e=>e.startsWith("data: "));if(t){let e=JSON.parse(t.substring(6));null==(r=n.current)||r.write(e.text)}}else if(e.startsWith("event: done")){let n=e.split("\n").find(e=>e.startsWith("data: "));if(n){let e=JSON.parse(n.substring(6));t(e.state);let a=i||e.state.activeFeatureName,r=e.state.features.find(e=>e.name===a),l=null==r?void 0:r.phases.find(e=>e.phase===s);(null==l?void 0:l.filePath)&&et(l.filePath)}T(!1),G(null),z("")}else if(e.startsWith("event: error")){let t=e.split("\n").find(e=>e.startsWith("data: "));if(t){let e=JSON.parse(t.substring(6));null==(l=n.current)||l.write("\r\n\x1b[31mError: ".concat(e.message,"\x1b[0m\r\n"))}T(!1),G(null)}}Q()},ea=async(t,s)=>{var i,a;null==(i=n.current)||i.clear(),T(!0),I("console"),G({phase:t,featureName:s||(null==e?void 0:e.activeFeatureName)||null});try{let n=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"run",phase:t,featureName:s||(null==e?void 0:e.activeFeatureName),agentConfig:b,prompt:g,..."implementation"===t?{personas:v}:{}})});await ei(n,t,s)}catch(e){null==(a=n.current)||a.write("\r\n\x1b[31mExecution failed: ".concat(e.message,"\x1b[0m\r\n")),T(!1),G(null)}},eg=async t=>{var s,i;let a=t||(null==e?void 0:e.activeFeatureName)||null;null==(s=n.current)||s.clear(),T(!0),I("console"),G({phase:"implementation",featureName:a});try{let e=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"run-gate",phase:"implementation",featureName:a,agentConfig:b,personas:v})});await ei(e,"implementation",a)}catch(e){null==(i=n.current)||i.write("\r\n\x1b[31mExecution failed: ".concat(e.message,"\x1b[0m\r\n")),T(!1),G(null)}},ez=()=>{var t,n;if((null==W?void 0:W.phase)!=="implementation")return;let s=null==e?void 0:e.features.find(e=>e.name===W.featureName),i=null==s?void 0:s.phases.find(e=>"implementation"===e.phase);return null==i||null==(n=i.personas)||null==(t=n.find(e=>"running"===e.status))?void 0:t.id},ev=async(t,n)=>{try{let s=n||(null==e?void 0:e.activeFeatureName)||null,i=ez();await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stop",phase:t,featureName:s,personaId:i})}),T(!1),G(null),Q()}catch(e){console.error("Failed to stop phase:",e)}},ek=async(n,s)=>{try{let i=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"approve",phase:n,featureName:s||(null==e?void 0:e.activeFeatureName)})}),a=await i.json();t(a)}catch(e){console.error(e)}},ej=async(n,s)=>{try{let i=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"discard",phase:n,featureName:s||(null==e?void 0:e.activeFeatureName)})}),r=await i.json();t(r),(null==a?void 0:a.path)&&a.path.includes(n)&&l(null)}catch(e){console.error(e)}},eN=async(n,s)=>{if(!e)return;let i=e.features.find(e=>e.name===n);if(!i)return;let r=["specification","clarification","planning","checklist","analyze","tasks","taskstoissues","implementation"],c=(()=>{for(let e of i.phases)if("approved"!==e.status)return e.phase;return"completed"})();if(c===s)return;let o="completed"===c?r.length:r.indexOf(c),d="completed"===s?r.length:r.indexOf(s);if(e.activeFeatureName!==n&&await K(n),d>o){for(let e=o;e<d;e++){let s=r[e],i=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"approve",phase:s,featureName:n})});t(await i.json())}"completed"!==s&&ea(s,n)}else{let e=await fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"discard",phase:s,featureName:n})});t(await e.json()),(null==a?void 0:a.path)&&a.path.includes(s)&&l(null)}},ey=(()=>{if(!e||"approved"!==e.constitutionPhase.status)return{phase:"constitution",label:"Constitution"};let t=e.features.find(t=>t.name===e.activeFeatureName);if(!t)return{phase:"specification",label:"Specification"};for(let e of t.phases)if("approved"!==e.status)return{phase:e.phase,label:ef[e.phase]};return{phase:"specification",label:"Specification"}})();return(0,s.jsxs)("div",{className:"flex flex-col h-screen bg-white dark:bg-black text-zinc-900 dark:text-zinc-50 overflow-hidden font-sans",children:[(0,s.jsxs)("header",{className:"flex justify-between items-center px-6 py-4 border-b border-zinc-200 dark:border-zinc-800 bg-white dark:bg-black z-10 shrink-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDF31"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Spec Kit Assistant"}),(0,s.jsxs)("p",{className:"text-[10px] text-zinc-400 font-mono",children:["WORKSPACE: ",e?"ACTIVE":"CONNECTING..."]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center bg-zinc-100 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-0.5",children:[(0,s.jsxs)("button",{onClick:()=>d("kanban"),className:"p-1.5 rounded-md transition text-xs flex items-center gap-1.5 ".concat("kanban"===o?"bg-white dark:bg-zinc-800 text-zinc-900 dark:text-zinc-50 shadow-sm":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"),children:[(0,s.jsx)(el.A,{size:13}),(0,s.jsx)("span",{children:"Kanban"})]}),(0,s.jsxs)("button",{onClick:()=>d("dag"),className:"p-1.5 rounded-md transition text-xs flex items-center gap-1.5 ".concat("dag"===o?"bg-white dark:bg-zinc-800 text-zinc-900 dark:text-zinc-50 shadow-sm":"text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"),children:[(0,s.jsx)(ec.A,{size:13}),(0,s.jsx)("span",{children:"DAG Map"})]})]}),(0,s.jsx)("button",{onClick:()=>R(!F),className:"p-2 border border-zinc-200 dark:border-zinc-800 rounded-lg transition hover:bg-zinc-100 dark:hover:bg-zinc-900 ".concat(F?"bg-zinc-100 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-50":"text-zinc-500"),title:"Configure AI Agent",children:(0,s.jsx)(eo.A,{size:14})}),(0,s.jsxs)("button",{onClick:()=>{let t=null==e?void 0:e.activeFeatureName,n=null==e?void 0:e.features.find(e=>e.name===t);C({name:t||"Workspace",phaseState:(null==n?void 0:n.phases.find(e=>"implementation"===e.phase))||{phase:"implementation",status:"idle",filePath:null,content:null}})},className:"p-2 border border-zinc-200 dark:border-zinc-800 rounded-lg text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition hover:bg-zinc-100 dark:hover:bg-zinc-900 flex items-center gap-1.5 text-xs font-semibold",title:"Open Human Review Portal",children:[(0,s.jsx)(p.A,{size:14,className:"text-blue-500"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Review Portal"})]}),(0,s.jsx)("button",{onClick:()=>{let e=window.document.documentElement;"light"===x?(e.classList.add("dark"),h("dark")):(e.classList.remove("dark"),h("light"))},className:"p-2 border border-zinc-200 dark:border-zinc-800 rounded-lg text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition hover:bg-zinc-100 dark:hover:bg-zinc-900",children:"light"===x?(0,s.jsx)(ed.A,{size:14}):(0,s.jsx)(ex.A,{size:14})})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[(0,s.jsx)("aside",{className:"border-r border-zinc-200 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-950/20 flex flex-col shrink-0 transition-all duration-300 ".concat(q?"w-12 items-center justify-between py-4":"w-64"),children:q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:H,className:"p-1.5 hover:bg-zinc-150 dark:hover:bg-zinc-900 rounded text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 transition",title:"Expand Sidebar",children:(0,s.jsx)(u.A,{size:16})}),(0,s.jsxs)("div",{onClick:H,className:"relative group cursor-pointer p-2 rounded hover:bg-zinc-150 dark:hover:bg-zinc-900 transition text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Click to view Features list",children:[(0,s.jsx)(ep.A,{size:18}),(null==e?void 0:e.features)&&e.features.length>0&&(0,s.jsx)("span",{className:"absolute -top-1 -right-1 bg-black dark:bg-white text-white dark:text-black text-[9px] w-4 h-4 rounded-full flex items-center justify-center font-bold",children:e.features.length})]}),(0,s.jsx)("div",{onClick:H,className:"group cursor-pointer p-2 rounded hover:bg-zinc-150 dark:hover:bg-zinc-900 transition text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Trigger Agent: ".concat(ey.label),children:(0,s.jsx)(eu.A,{size:16})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-200 dark:border-zinc-800 shrink-0",children:[(0,s.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-wider text-zinc-400",children:"Features Manager"}),(0,s.jsx)("button",{onClick:H,className:"p-1 hover:bg-zinc-150 dark:hover:bg-zinc-900 rounded text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 transition",title:"Collapse Sidebar",children:(0,s.jsx)(eh.A,{size:14})})]}),(0,s.jsx)("form",{onSubmit:$,className:"p-4 border-b border-zinc-200 dark:border-zinc-800 shrink-0",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",placeholder:"New feature name...",value:A,onChange:e=>S(e.target.value),className:"flex-1 px-3 py-1.5 bg-white dark:bg-black border border-zinc-200 dark:border-zinc-800 rounded-md text-xs outline-none focus:border-zinc-400 dark:focus:border-zinc-650"}),(0,s.jsx)("button",{type:"submit",className:"p-2 bg-black dark:bg-white text-white dark:text-black rounded-md hover:opacity-90 transition",children:(0,s.jsx)(eb.A,{size:12})})]})}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-3 space-y-1",style:{scrollbarWidth:"thin"},children:[(0,s.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold uppercase tracking-wider text-zinc-400",children:"Features"}),null==e?void 0:e.features.map(t=>{let n=e.activeFeatureName===t.name;return(0,s.jsxs)("div",{onClick:()=>K(t.name),className:"group flex items-center justify-between px-2.5 py-2 rounded-md text-xs font-medium cursor-pointer transition ".concat(n?"bg-zinc-100 dark:bg-zinc-900 text-zinc-950 dark:text-zinc-50":"text-zinc-500 hover:bg-zinc-50 dark:hover:bg-zinc-950"),children:[(0,s.jsx)("span",{className:"truncate",children:t.name}),(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),ee(t.name)},className:"p-1 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded text-zinc-400 hover:text-red-500 transition opacity-0 group-hover:opacity-100",children:(0,s.jsx)(m.A,{size:10})})]},t.name)}),(null==e?void 0:e.features.length)===0&&(0,s.jsx)("p",{className:"text-xs text-zinc-400 italic p-2",children:"No features created yet."})]}),(0,s.jsxs)("div",{className:"p-4 border-t border-zinc-200 dark:border-zinc-800 bg-white dark:bg-black shrink-0",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("span",{className:"text-[10px] font-bold uppercase tracking-wider text-zinc-400",children:["Trigger Agent: ",ey.label]}),(0,s.jsx)(eu.A,{size:10,className:"text-zinc-400"})]}),(0,s.jsx)("textarea",{placeholder:"Refinements or prompts...",value:g,onChange:e=>z(e.target.value),disabled:P||!e,className:"w-full h-16 p-2 text-xs bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-md outline-none resize-none disabled:opacity-50"}),P?(0,s.jsxs)("button",{onClick:()=>{W&&ev(W.phase,W.featureName)},className:"w-full mt-2 py-1.5 bg-red-650 hover:bg-red-700 text-white rounded-md text-xs font-semibold transition flex items-center justify-center gap-1",children:[(0,s.jsx)(m.A,{size:10})," Stop Execution"]}):(0,s.jsxs)("button",{onClick:()=>ea(ey.phase,null),disabled:!e,className:"w-full mt-2 py-1.5 bg-black dark:bg-white text-white dark:text-black rounded-md text-xs font-semibold hover:opacity-90 transition flex items-center justify-center gap-1 disabled:opacity-50",children:[(0,s.jsx)(c.A,{size:10,fill:"currentColor"})," Run ",ey.label]})]})]})}),(0,s.jsxs)("main",{className:"flex-1 flex flex-col min-w-0 overflow-hidden bg-white dark:bg-black relative",children:[F&&(0,s.jsxs)("div",{className:"absolute top-0 left-0 right-0 border-b border-zinc-200 dark:border-zinc-800 bg-white dark:bg-black p-4 z-20 shadow-md",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500",children:"AI Agent Config"}),(0,s.jsx)("button",{onClick:()=>R(!1),className:"p-1 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded",children:(0,s.jsx)(m.A,{size:12})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase mb-1",children:"Agent CLI"}),(0,s.jsxs)("select",{value:b.agentType,onChange:e=>f({...b,agentType:e.target.value}),className:"w-full px-3 py-1.5 text-xs bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-md outline-none",children:[(0,s.jsx)("option",{value:"claude",children:"Claude CLI (Anthropic)"}),(0,s.jsx)("option",{value:"gemini",children:"Gemini CLI (Google)"}),(0,s.jsx)("option",{value:"copilot",children:"GitHub Copilot (ghcs)"}),(0,s.jsx)("option",{value:"openai",children:"OpenAI Codex"}),(0,s.jsx)("option",{value:"custom",children:"Custom Command"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase mb-1",children:"Custom Binary Path (Optional)"}),(0,s.jsx)("input",{type:"text",placeholder:"e.g. /usr/local/bin/claude",value:b.agentPath||"",onChange:e=>f({...b,agentPath:e.target.value}),className:"w-full px-3 py-1.5 text-xs bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-md outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-400 uppercase mb-1",children:"Custom Spawn Shell Command"}),(0,s.jsx)("input",{type:"text",placeholder:"e.g. my-agent {{prompt}}",value:b.customCommand||"",disabled:"custom"!==b.agentType,onChange:e=>f({...b,customCommand:e.target.value}),className:"w-full px-3 py-1.5 text-xs bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-md outline-none disabled:opacity-50"})]})]}),(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t border-zinc-200 dark:border-zinc-800",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("label",{className:"block text-[10px] font-bold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",children:"Review Gate Agent Personas (runs in order, Tech Lead signs off)"}),(0,s.jsxs)("span",{className:"text-[10px] text-zinc-500 font-semibold bg-zinc-100 dark:bg-zinc-900 px-2 py-0.5 rounded border border-zinc-200 dark:border-zinc-800",children:[v.filter(e=>e.enabled).length,"/",v.length," enabled"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:v.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-col justify-between p-3.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-lg hover:border-zinc-300 dark:hover:border-zinc-700 transition",children:[(0,s.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:async n=>{let s=[...v];s[t]={...e,enabled:n.target.checked},k(s);try{await fetch("/api/personas",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}catch(e){console.error("Failed to save persona enable state:",e)}},className:"w-4 h-4 rounded border-zinc-300 dark:border-zinc-800 text-blue-500 focus:ring-0 cursor-pointer"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs font-bold text-zinc-800 dark:text-zinc-200",children:e.label}),(0,s.jsx)("span",{className:"ml-1.5 text-[9px] font-mono px-1 py-0.5 rounded bg-zinc-200/50 dark:bg-zinc-900 text-zinc-500 uppercase font-semibold",children:e.id})]})]}),(0,s.jsx)("button",{onClick:()=>y(e),className:"px-2 py-0.5 border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-900 text-[10px] font-bold rounded text-blue-500 dark:text-blue-400 transition",children:"Configure"})]}),(0,s.jsx)("p",{className:"text-[10px] text-zinc-500 dark:text-zinc-400 line-clamp-1 mb-2 font-medium",children:e.description||"No description provided."}),(0,s.jsxs)("div",{className:"flex justify-between items-center text-[9px] text-zinc-500 font-mono",children:[(0,s.jsx)("span",{className:"truncate max-w-[150px] font-semibold",children:e.command}),(0,s.jsx)("span",{className:"shrink-0 px-1 py-0.25 rounded bg-zinc-200 dark:bg-zinc-900 font-semibold",children:e.model||"N/A"})]})]},e.id))})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[!J&&(0,s.jsx)("div",{className:"flex-1 min-h-[50%] relative",children:e?"kanban"===o?(0,s.jsx)(N,{state:e,onRunPhase:ea,onApprovePhase:ek,onDiscardPhase:ej,onSelectFeature:K,onDeleteFeature:ee,onSelectPhaseFile:et,onCardDrop:eN,onRerunGate:eg,onOpenReview:(e,t)=>C({name:e,phaseState:t}),onStopPhase:ev}):(0,s.jsx)(O,{state:e,onSelectFeature:K,onSelectPhaseFile:et}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full text-zinc-400 text-xs",children:"Loading Spec-Driven Development workspace state..."})}),(0,s.jsxs)("div",{className:"flex flex-col min-h-0 bg-white dark:bg-black transition-all duration-300 ".concat(J?"flex-1 h-full":"h-[40%] border-t border-zinc-200 dark:border-zinc-800"),children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-4 py-2 border-b border-zinc-150 dark:border-zinc-900 bg-zinc-50/70 dark:bg-zinc-950/20 shrink-0",children:[(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)("button",{onClick:()=>I("editor"),className:"text-xs font-bold tracking-wide transition pb-1 border-b-2 ".concat("editor"===E?"text-black dark:text-white border-black dark:border-white":"text-zinc-400 border-transparent"),children:"MARKDOWN EDITOR"}),(0,s.jsxs)("button",{onClick:()=>I("console"),className:"text-xs font-bold tracking-wide transition pb-1 border-b-2 ".concat("console"===E?"text-black dark:text-white border-black dark:border-white":"text-zinc-400 border-transparent"),children:["AGENT RUN CONSOLE ",P&&(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500 animate-pulse ml-1"})]}),(0,s.jsx)("button",{onClick:()=>I("terminal"),className:"text-xs font-bold tracking-wide transition pb-1 border-b-2 ".concat("terminal"===E?"text-black dark:text-white border-black dark:border-white":"text-zinc-400 border-transparent"),children:"WORKSPACE TERMINAL"})]}),(0,s.jsx)("button",{onClick:()=>M(!J),className:"p-1.5 rounded text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-900 transition",title:J?"Restore Layout":"Maximize Panel",children:J?(0,s.jsx)(L.A,{size:13}):(0,s.jsx)(D.A,{size:13})})]}),(0,s.jsxs)("div",{className:"flex-1 min-h-0 overflow-hidden",children:["editor"===E&&(0,s.jsx)("div",{className:"h-full p-3 bg-white dark:bg-black",children:(0,s.jsx)(U,{filePath:(null==a?void 0:a.path)||null,initialContent:(null==a?void 0:a.content)||null,onSave:en,onToggleTask:es,state:e,isMaximized:J,onToggleMaximize:()=>M(!J),onSelectFile:et})}),(0,s.jsx)("div",{className:"console"===E?"h-full":"hidden",children:(0,s.jsx)(X,{ref:n,active:"console"===E,running:P,onInput:e=>{W&&fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"input",phase:W.phase,featureName:W.featureName,text:e,personaId:ez()})}).catch(e=>console.error("Failed to send input:",e))},onResize:(e,t)=>{W&&fetch("/api/phase",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resize",phase:W.phase,featureName:W.featureName,cols:e,rows:t,personaId:ez()})}).catch(()=>{})}})}),"terminal"===E&&(0,s.jsx)(em,{})]})]})]})]})]}),j&&(0,s.jsx)(Z,{isOpen:!0,onClose:()=>y(null),persona:j,onSave:B}),w&&(0,s.jsx)(er,{isOpen:!0,onClose:()=>C(null),featureName:w.name,activePhaseState:w.phaseState,onApprove:()=>{ek("implementation",w.name),C(null)}})]})}}},e=>{e.O(0,[299,307,314,873,480,920,358],()=>e(e.s=694)),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans),Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-mono),JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.left-0{left:0}.left-2\.5{left:.625rem}.right-0{right:0}.top-0{top:0}.top-5{top:1.25rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-4{margin-left:1rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-\[40\%\]{height:40%}.h-\[85vh\]{height:85vh}.h-\[95vh\]{height:95vh}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0}.min-h-\[200px\]{min-height:200px}.min-h-\[50\%\]{min-height:50%}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-4{width:1rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[140px\]{min-width:140px}.min-w-\[150px\]{min-width:150px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-rotate-90{--tw-rotate:-90deg}.-rotate-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize-none{resize:none}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.border-amber-500\/20{border-color:rgb(245 158 11/.2)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-blue-500\/10{border-color:rgb(59 130 246/.1)}.border-blue-500\/20{border-color:rgb(59 130 246/.2)}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-green-500\/20{border-color:rgb(34 197 94/.2)}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-500\/20{border-color:rgb(239 68 68/.2)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgb(245 158 11/.1)}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/60{background-color:rgb(0 0 0/.6)}.bg-black\/80{background-color:rgb(0 0 0/.8)}.bg-black\/85{background-color:rgb(0 0 0/.85)}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-500\/10{background-color:rgb(59 130 246/.1)}.bg-blue-500\/5{background-color:rgb(59 130 246/.05)}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-500\/10{background-color:rgb(34 197 94/.1)}.bg-green-500\/5{background-color:rgb(34 197 94/.05)}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-purple-500\/10{background-color:rgb(168 85 247/.1)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\/10{background-color:rgb(239 68 68/.1)}.bg-red-500\/5{background-color:rgb(239 68 68/.05)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-zinc-100\/70{background-color:rgb(244 244 245/.7)}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.bg-zinc-200\/50{background-color:rgb(228 228 231/.5)}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-zinc-50\/20{background-color:rgb(250 250 250/.2)}.bg-zinc-50\/35{background-color:rgb(250 250 250/.35)}.bg-zinc-50\/50{background-color:rgb(250 250 250/.5)}.bg-zinc-50\/70{background-color:rgb(250 250 250/.7)}.bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-900\/20{background-color:rgb(24 24 27/.2)}.bg-zinc-900\/30{background-color:rgb(24 24 27/.3)}.bg-zinc-900\/40{background-color:rgb(24 24 27/.4)}.bg-zinc-900\/50{background-color:rgb(24 24 27/.5)}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.stroke-green-500{stroke:#22c55e}.stroke-zinc-800{stroke:#27272a}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:var(--font-mono),JetBrains Mono,monospace}.font-sans{font-family:var(--font-sans),Inter,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgb(0 0 0/0.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgb(0 0 0/0.1),0 2px 4px -2px rgb(0 0 0/0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity,1))}.ring-zinc-400{--tw-ring-opacity:1;--tw-ring-color:rgb(161 161 170/var(--tw-ring-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--background:#ffffff;--foreground:#111111;--border:#eaeaea;--font-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--font-mono:"JetBrains Mono",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}.dark{--background:#000000;--foreground:#fafafa;--border:#333333}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-sans);margin:0;padding:0;overflow-x:hidden;transition:background-color .2s ease,color .2s ease}.dark .react-flow__node{background:#000;border-color:#333;color:#fff}.dark .react-flow__edge-path{stroke:#444}.dark .react-flow__controls-button{background:#111;border-color:#333;fill:#fff}.dark .react-flow__background{background:#000}.react-flow__attribution{display:none!important}.odd\:bg-zinc-50\/10:nth-child(odd){background-color:rgb(250 250 250/.1)}.hover\:border-blue-500\/20:hover{border-color:rgb(59 130 246/.2)}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\:border-zinc-800:hover{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100\/30:hover{background-color:rgb(244 244 245/.3)}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50\/50:hover{background-color:rgb(250 250 250/.5)}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.hover\:bg-zinc-900\/50:hover{background-color:rgb(24 24 27/.5)}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.hover\:text-zinc-800:hover{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-zinc-400:focus{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.focus\:border-zinc-700:focus{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.active\:scale-\[0\.98\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:opacity-0:disabled{opacity:0}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100{opacity:1}.dark\:border-amber-900\/50:is(.dark *){border-color:rgb(120 53 15/.5)}.dark\:border-blue-500\/10:is(.dark *){border-color:rgb(59 130 246/.1)}.dark\:border-green-500\/10:is(.dark *){border-color:rgb(34 197 94/.1)}.dark\:border-red-500\/10:is(.dark *){border-color:rgb(239 68 68/.1)}.dark\:border-white:is(.dark *){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.dark\:border-zinc-500:is(.dark *){--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.dark\:border-zinc-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.dark\:border-zinc-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\:border-zinc-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.dark\:bg-amber-700:is(.dark *){--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.dark\:bg-amber-950\/20:is(.dark *){background-color:rgb(69 26 3/.2)}.dark\:bg-black:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.dark\:bg-black\/10:is(.dark *){background-color:rgb(0 0 0/.1)}.dark\:bg-white:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.dark\:bg-zinc-700:is(.dark *){--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.dark\:bg-zinc-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\:bg-zinc-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.dark\:bg-zinc-900\/40:is(.dark *){background-color:rgb(24 24 27/.4)}.dark\:bg-zinc-900\/50:is(.dark *){background-color:rgb(24 24 27/.5)}.dark\:bg-zinc-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\:bg-zinc-950\/10:is(.dark *){background-color:rgb(9 9 11/.1)}.dark\:bg-zinc-950\/20:is(.dark *){background-color:rgb(9 9 11/.2)}.dark\:bg-zinc-950\/30:is(.dark *){background-color:rgb(9 9 11/.3)}.dark\:bg-zinc-950\/50:is(.dark *){background-color:rgb(9 9 11/.5)}.dark\:bg-zinc-950\/70:is(.dark *){background-color:rgb(9 9 11/.7)}.dark\:text-amber-300:is(.dark *){--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.dark\:text-black:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:text-zinc-100:is(.dark *){--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.dark\:text-zinc-200:is(.dark *){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.dark\:text-zinc-300:is(.dark *){--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.dark\:text-zinc-400:is(.dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\:text-zinc-50:is(.dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\:text-zinc-500:is(.dark *){--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\:text-zinc-700:is(.dark *){--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.dark\:text-zinc-800:is(.dark *){--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.dark\:opacity-10:is(.dark *){opacity:.1}.dark\:ring-white:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.dark\:ring-zinc-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(113 113 122/var(--tw-ring-opacity,1))}.dark\:odd\:bg-zinc-950\/10:nth-child(odd):is(.dark *){background-color:rgb(9 9 11/.1)}.dark\:hover\:border-zinc-700:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.dark\:hover\:bg-amber-600:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.dark\:hover\:bg-zinc-100:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.dark\:hover\:bg-zinc-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\:hover\:bg-zinc-900:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.dark\:hover\:bg-zinc-900\/10:hover:is(.dark *){background-color:rgb(24 24 27/.1)}.dark\:hover\:bg-zinc-900\/30:hover:is(.dark *){background-color:rgb(24 24 27/.3)}.dark\:hover\:bg-zinc-950:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\:hover\:text-zinc-100:hover:is(.dark *){--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.dark\:hover\:text-zinc-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.dark\:hover\:text-zinc-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:inline{display:inline}.sm\:max-w-md{max-width:28rem}}@media (min-width:768px){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}