paneful 0.9.17 → 0.9.19

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.
@@ -1,11 +1,18 @@
1
1
  import { WebSocket, WebSocketServer } from 'ws';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
3
5
  import { newProject } from './project-store.js';
4
6
  import { PortMonitor } from './port-monitor.js';
5
7
  import { ClaudeMonitor } from './claude-monitor.js';
6
8
  import { GitMonitor } from './git-monitor.js';
9
+ import { GitSourceControl, } from './git-source-control.js';
7
10
  import { EditorMonitor } from './editor-monitor.js';
8
11
  import { InboxMonitor } from './inbox-monitor.js';
12
+ import { ScheduleStore, } from './schedule-store.js';
13
+ import { Scheduler } from './scheduler.js';
14
+ /** Sentinel projectId for server-owned scheduled PTYs (never appears as a client-visible project). */
15
+ const SCHEDULES_PROJECT_SENTINEL = '__schedules__';
9
16
  export class WsHandler {
10
17
  wss;
11
18
  client = null;
@@ -14,8 +21,18 @@ export class WsHandler {
14
21
  portMonitor;
15
22
  claudeMonitor;
16
23
  gitMonitor;
24
+ sourceControl;
17
25
  editorMonitor;
18
26
  inboxMonitor;
27
+ scheduleStore;
28
+ scheduler;
29
+ /** Maps a spawned terminalId back to its scheduled-run id so the exit hook can finalize the run. */
30
+ scheduledTerminals = new Map();
31
+ /** Per-run log capture state — file path + bytes written so far (capped). */
32
+ runLogState = new Map();
33
+ runLogsDir = '';
34
+ /** runIds the current client is actively viewing — server streams output for these. */
35
+ attachedRuns = new Set();
19
36
  idleTimer = null;
20
37
  onIdle;
21
38
  constructor(server, ptyManager, projectStore, dataDir, options) {
@@ -31,11 +48,30 @@ export class WsHandler {
31
48
  this.gitMonitor = new GitMonitor(projectStore, (branches) => {
32
49
  this.send({ type: 'git:branch', branches });
33
50
  });
51
+ this.sourceControl = new GitSourceControl(projectStore, (projectId, status) => {
52
+ this.send({ type: 'sc:status', projectId, status });
53
+ });
34
54
  this.editorMonitor = new EditorMonitor((projectName) => {
35
55
  this.send({ type: 'editor:active', projectName });
36
56
  }, (needsAccessibility) => {
37
57
  this.send({ type: 'editor:status', needsAccessibility });
38
58
  });
59
+ this.scheduleStore = new ScheduleStore(dataDir, (id) => projectStore.get(id)?.cwd);
60
+ this.scheduler = new Scheduler(this.scheduleStore, (job) => this.fireJob(job));
61
+ // Scheduler runs as long as the server is alive — independent of WS client
62
+ this.scheduler.start();
63
+ this.runLogsDir = path.join(dataDir, 'runs');
64
+ try {
65
+ fs.mkdirSync(this.runLogsDir, { recursive: true });
66
+ }
67
+ catch { }
68
+ // Reconcile: any run that was active when the server last shut down is now stale.
69
+ const now = Date.now();
70
+ for (const run of this.scheduleStore.listRuns()) {
71
+ if (run.finishedAt === null) {
72
+ this.scheduleStore.updateRun(run.id, { finishedAt: now, exitCode: -1 });
73
+ }
74
+ }
39
75
  this.inboxMonitor = new InboxMonitor(dataDir, {
40
76
  onPaste: (files) => {
41
77
  this.send({ type: 'inbox:paste', files });
@@ -82,6 +118,8 @@ export class WsHandler {
82
118
  if (Object.keys(statuses).length > 0) {
83
119
  this.send({ type: 'claude:status', statuses });
84
120
  }
121
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
122
+ this.send({ type: 'schedule:runs', runs: this.scheduleStore.listRuns() });
85
123
  ws.on('message', (raw) => {
86
124
  try {
87
125
  const msg = JSON.parse(raw.toString());
@@ -94,12 +132,14 @@ export class WsHandler {
94
132
  ws.on('close', () => {
95
133
  console.log('WebSocket client disconnected');
96
134
  this.client = null;
135
+ this.attachedRuns.clear();
97
136
  this.pauseMonitors();
98
137
  this.startIdleTimer();
99
138
  });
100
139
  ws.on('error', (err) => {
101
140
  console.error('WebSocket error:', err.message);
102
141
  this.client = null;
142
+ this.attachedRuns.clear();
103
143
  this.pauseMonitors();
104
144
  this.startIdleTimer();
105
145
  });
@@ -112,10 +152,16 @@ export class WsHandler {
112
152
  clearTimeout(this.idleTimer);
113
153
  this.idleTimer = setTimeout(() => {
114
154
  // Only fire if still no clients connected
115
- if (!this.client || this.client.readyState !== WebSocket.OPEN) {
116
- console.log('No clients connected for 5 seconds, shutting down...');
117
- this.onIdle();
155
+ if (this.client && this.client.readyState === WebSocket.OPEN)
156
+ return;
157
+ // Keep the server alive while any enabled scheduled job exists, so it can fire.
158
+ if (this.scheduleStore.hasEnabledJobs()) {
159
+ // Re-arm so we keep checking periodically (idle timer is the only ticker without WS)
160
+ this.startIdleTimer();
161
+ return;
118
162
  }
163
+ console.log('No clients connected for 5 seconds, shutting down...');
164
+ this.onIdle();
119
165
  }, 5000);
120
166
  }
121
167
  send(msg) {
@@ -126,7 +172,7 @@ export class WsHandler {
126
172
  handleMessage(msg) {
127
173
  switch (msg.type) {
128
174
  case 'pty:spawn':
129
- this.handlePtySpawn(msg.terminalId, msg.projectId, msg.cwd);
175
+ this.handlePtySpawn(msg.terminalId, msg.projectId, msg.cwd, msg.command);
130
176
  break;
131
177
  case 'pty:input':
132
178
  this.ptyManager.write(msg.terminalId, msg.data);
@@ -172,6 +218,22 @@ export class WsHandler {
172
218
  }
173
219
  break;
174
220
  }
221
+ case 'open:file': {
222
+ const project = this.projectStore.list().find((p) => p.id === msg.projectId);
223
+ if (!project)
224
+ break;
225
+ // Resolve and guard against path traversal
226
+ import('node:path').then((path) => {
227
+ const abs = path.resolve(project.cwd, msg.path);
228
+ const projectRoot = path.resolve(project.cwd);
229
+ if (abs !== projectRoot && !abs.startsWith(projectRoot + path.sep))
230
+ return;
231
+ import('open').then(({ default: open }) => {
232
+ open(abs).catch(() => { });
233
+ });
234
+ });
235
+ break;
236
+ }
175
237
  case 'editor:sync': {
176
238
  if (msg.enabled) {
177
239
  this.editorMonitor.resume();
@@ -190,8 +252,340 @@ export class WsHandler {
190
252
  }
191
253
  break;
192
254
  }
255
+ case 'sc:set-active': {
256
+ this.sourceControl.setActive(msg.projectId);
257
+ break;
258
+ }
259
+ case 'sc:diff:request': {
260
+ const { projectId, file, kind } = msg;
261
+ this.sourceControl.requestDiff(projectId, file, kind).then((result) => {
262
+ if (!result)
263
+ return;
264
+ this.send({
265
+ type: 'sc:diff',
266
+ projectId,
267
+ file,
268
+ kind,
269
+ diff: result.diff,
270
+ binary: result.binary,
271
+ truncated: result.truncated,
272
+ });
273
+ });
274
+ break;
275
+ }
276
+ case 'sc:stage': {
277
+ const { projectId, files } = msg;
278
+ this.sourceControl.stage(projectId, files).then((res) => {
279
+ this.send({ type: 'sc:action:result', projectId, action: 'stage', ok: res.ok, error: res.error });
280
+ });
281
+ break;
282
+ }
283
+ case 'sc:unstage': {
284
+ const { projectId, files } = msg;
285
+ this.sourceControl.unstage(projectId, files).then((res) => {
286
+ this.send({ type: 'sc:action:result', projectId, action: 'unstage', ok: res.ok, error: res.error });
287
+ });
288
+ break;
289
+ }
290
+ case 'sc:discard': {
291
+ const { projectId, trackedFiles, untrackedFiles } = msg;
292
+ this.sourceControl.discard(projectId, trackedFiles, untrackedFiles).then((res) => {
293
+ this.send({ type: 'sc:action:result', projectId, action: 'discard', ok: res.ok, error: res.error });
294
+ });
295
+ break;
296
+ }
297
+ case 'sc:commit': {
298
+ const { projectId, message } = msg;
299
+ this.sourceControl.commit(projectId, message).then((res) => {
300
+ this.send({ type: 'sc:action:result', projectId, action: 'commit', ok: res.ok, error: res.error });
301
+ });
302
+ break;
303
+ }
304
+ case 'sc:push': {
305
+ const { projectId } = msg;
306
+ this.sourceControl.push(projectId).then((res) => {
307
+ this.send({ type: 'sc:action:result', projectId, action: 'push', ok: res.ok, error: res.error });
308
+ });
309
+ break;
310
+ }
311
+ case 'sc:pull': {
312
+ const { projectId } = msg;
313
+ this.sourceControl.pull(projectId).then((res) => {
314
+ this.send({ type: 'sc:action:result', projectId, action: 'pull', ok: res.ok, error: res.error });
315
+ });
316
+ break;
317
+ }
318
+ case 'sc:stash:create': {
319
+ const { projectId, message } = msg;
320
+ this.sourceControl.stashCreate(projectId, message).then((res) => {
321
+ this.send({ type: 'sc:action:result', projectId, action: 'stash:create', ok: res.ok, error: res.error });
322
+ });
323
+ break;
324
+ }
325
+ case 'sc:stash:pop': {
326
+ const { projectId, index } = msg;
327
+ this.sourceControl.stashPop(projectId, index).then((res) => {
328
+ this.send({ type: 'sc:action:result', projectId, action: 'stash:pop', ok: res.ok, error: res.error });
329
+ });
330
+ break;
331
+ }
332
+ case 'sc:stash:apply': {
333
+ const { projectId, index } = msg;
334
+ this.sourceControl.stashApply(projectId, index).then((res) => {
335
+ this.send({ type: 'sc:action:result', projectId, action: 'stash:apply', ok: res.ok, error: res.error });
336
+ });
337
+ break;
338
+ }
339
+ case 'sc:stash:drop': {
340
+ const { projectId, index } = msg;
341
+ this.sourceControl.stashDrop(projectId, index).then((res) => {
342
+ this.send({ type: 'sc:action:result', projectId, action: 'stash:drop', ok: res.ok, error: res.error });
343
+ });
344
+ break;
345
+ }
346
+ case 'schedule:list':
347
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
348
+ break;
349
+ case 'schedule:runs:list':
350
+ this.send({ type: 'schedule:runs', runs: this.scheduleStore.listRuns(msg.jobId) });
351
+ break;
352
+ case 'schedule:create': {
353
+ const job = {
354
+ id: uuidv4(),
355
+ name: msg.job.name,
356
+ cron: msg.job.cron,
357
+ command: msg.job.command,
358
+ cwd: msg.job.cwd,
359
+ enabled: msg.job.enabled,
360
+ createdAt: Date.now(),
361
+ };
362
+ this.scheduleStore.createJob(job);
363
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
364
+ break;
365
+ }
366
+ case 'schedule:run:log:request': {
367
+ const log = this.readRunLog(msg.runId);
368
+ this.send({ type: 'schedule:run:log', runId: msg.runId, log });
369
+ break;
370
+ }
371
+ case 'schedule:update':
372
+ this.scheduleStore.updateJob(msg.job);
373
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
374
+ break;
375
+ case 'schedule:delete': {
376
+ const { jobId } = msg;
377
+ // Stop any currently-running PTYs for this job's active runs,
378
+ // and delete every run's captured log file.
379
+ for (const run of this.scheduleStore.listRuns(jobId)) {
380
+ this.removeRunLog(run.id);
381
+ this.attachedRuns.delete(run.id);
382
+ if (run.finishedAt === null && run.terminalId) {
383
+ this.ptyManager.kill(run.terminalId);
384
+ this.scheduledTerminals.delete(run.terminalId);
385
+ }
386
+ }
387
+ this.scheduleStore.deleteJob(jobId);
388
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
389
+ this.send({ type: 'schedule:runs', runs: this.scheduleStore.listRuns() });
390
+ break;
391
+ }
392
+ case 'schedule:toggle': {
393
+ const job = this.scheduleStore.getJob(msg.jobId);
394
+ if (job) {
395
+ this.scheduleStore.updateJob({ ...job, enabled: msg.enabled });
396
+ this.send({ type: 'schedule:jobs', jobs: this.scheduleStore.listJobs() });
397
+ }
398
+ break;
399
+ }
400
+ case 'schedule:run-now': {
401
+ const job = this.scheduleStore.getJob(msg.jobId);
402
+ if (job)
403
+ this.fireJob(job);
404
+ break;
405
+ }
406
+ case 'schedule:run:pause': {
407
+ const run = this.scheduleStore.listRuns().find((r) => r.id === msg.runId);
408
+ if (run && run.finishedAt === null && run.terminalId) {
409
+ if (this.ptyManager.pause(run.terminalId)) {
410
+ const updated = this.scheduleStore.updateRun(msg.runId, { paused: true });
411
+ if (updated)
412
+ this.send({ type: 'schedule:run:update', run: updated });
413
+ }
414
+ }
415
+ break;
416
+ }
417
+ case 'schedule:run:resume': {
418
+ // Resume the SAME run via SIGCONT — process picks up exactly where it was.
419
+ const run = this.scheduleStore.listRuns().find((r) => r.id === msg.runId);
420
+ if (run && run.finishedAt === null && run.terminalId) {
421
+ if (this.ptyManager.cont(run.terminalId)) {
422
+ const updated = this.scheduleStore.updateRun(msg.runId, { paused: false });
423
+ if (updated)
424
+ this.send({ type: 'schedule:run:update', run: updated });
425
+ }
426
+ }
427
+ break;
428
+ }
429
+ case 'schedule:run:remove':
430
+ this.removeRunLog(msg.runId);
431
+ this.scheduleStore.removeRun(msg.runId);
432
+ this.send({ type: 'schedule:runs', runs: this.scheduleStore.listRuns() });
433
+ break;
434
+ case 'schedule:run:kill': {
435
+ const { runId } = msg;
436
+ const run = this.scheduleStore.listRuns().find((r) => r.id === runId);
437
+ if (run && run.finishedAt === null && run.terminalId) {
438
+ // Detach our tracking BEFORE killing — prevents the natural onExit
439
+ // callback in fireJob from racing with our explicit update.
440
+ this.scheduledTerminals.delete(run.terminalId);
441
+ this.attachedRuns.delete(runId);
442
+ this.runLogState.delete(runId);
443
+ this.ptyManager.kill(run.terminalId);
444
+ const updated = this.scheduleStore.updateRun(runId, {
445
+ finishedAt: Date.now(),
446
+ exitCode: -1,
447
+ });
448
+ if (updated)
449
+ this.send({ type: 'schedule:run:update', run: updated });
450
+ }
451
+ break;
452
+ }
453
+ case 'schedule:run:attach': {
454
+ const { runId } = msg;
455
+ this.attachedRuns.add(runId);
456
+ // Send the captured log so the viewer can populate with everything so far.
457
+ this.send({ type: 'schedule:run:log', runId, log: this.readRunLog(runId) });
458
+ break;
459
+ }
460
+ case 'schedule:run:detach':
461
+ this.attachedRuns.delete(msg.runId);
462
+ break;
463
+ case 'schedule:run:input':
464
+ // terminalId === runId for scheduled PTYs; write() no-ops if PTY is gone.
465
+ this.ptyManager.write(msg.runId, msg.data);
466
+ break;
467
+ case 'schedule:run:resize':
468
+ this.ptyManager.resize(msg.runId, msg.cols, msg.rows);
469
+ break;
193
470
  }
194
471
  }
472
+ fireJob(job) {
473
+ const runId = uuidv4();
474
+ // Run id doubles as the PTY's terminalId — schedule PTYs are server-owned,
475
+ // never appear in any project's layout, and are addressed by runId everywhere.
476
+ const terminalId = runId;
477
+ const run = {
478
+ id: runId,
479
+ jobId: job.id,
480
+ startedAt: Date.now(),
481
+ finishedAt: null,
482
+ exitCode: null,
483
+ terminalId,
484
+ };
485
+ this.scheduleStore.addRun(run);
486
+ this.scheduledTerminals.set(terminalId, runId);
487
+ const logPath = path.join(this.runLogsDir, `${runId}.log`);
488
+ this.runLogState.set(runId, { filePath: logPath, bytes: 0 });
489
+ try {
490
+ fs.writeFileSync(logPath, '');
491
+ }
492
+ catch { }
493
+ // Pre-flight: cwd must exist and be a directory. Without this, node-pty
494
+ // throws an opaque ENOENT and we'd record an unexplained failure.
495
+ try {
496
+ const stat = fs.statSync(job.cwd);
497
+ if (!stat.isDirectory())
498
+ throw new Error('not a directory');
499
+ }
500
+ catch (e) {
501
+ const err = e.code === 'ENOENT'
502
+ ? `directory does not exist: ${job.cwd}`
503
+ : `invalid working directory ${job.cwd}: ${e.message}`;
504
+ try {
505
+ fs.appendFileSync(logPath, `\r\n\x1b[31m[paneful: ${err}]\x1b[0m\r\n`);
506
+ }
507
+ catch { }
508
+ const failed = this.scheduleStore.updateRun(runId, {
509
+ finishedAt: Date.now(),
510
+ exitCode: -1,
511
+ });
512
+ this.scheduledTerminals.delete(terminalId);
513
+ this.runLogState.delete(runId);
514
+ if (failed)
515
+ this.send({ type: 'schedule:run:update', run: failed });
516
+ this.send({ type: 'schedule:fire', jobId: job.id, jobName: job.name, runId });
517
+ this.send({ type: 'schedule:run:update', run });
518
+ return;
519
+ }
520
+ try {
521
+ this.ptyManager.spawn(terminalId, SCHEDULES_PROJECT_SENTINEL, job.cwd, (tid, data) => {
522
+ this.appendRunLog(runId, data);
523
+ if (this.attachedRuns.has(runId)) {
524
+ this.send({ type: 'schedule:run:output', runId, data });
525
+ }
526
+ }, (_tid, exitCode) => {
527
+ this.scheduledTerminals.delete(terminalId);
528
+ this.runLogState.delete(runId);
529
+ this.attachedRuns.delete(runId);
530
+ const updated = this.scheduleStore.updateRun(runId, {
531
+ finishedAt: Date.now(),
532
+ exitCode,
533
+ });
534
+ if (updated)
535
+ this.send({ type: 'schedule:run:update', run: updated });
536
+ }, job.command);
537
+ }
538
+ catch (e) {
539
+ // Spawn failed (e.g. cwd missing). Mark the run as finished immediately.
540
+ const failed = this.scheduleStore.updateRun(runId, {
541
+ finishedAt: Date.now(),
542
+ exitCode: -1,
543
+ });
544
+ try {
545
+ fs.appendFileSync(logPath, `\r\n[paneful] failed to spawn: ${e.message}\r\n`);
546
+ }
547
+ catch { }
548
+ if (failed)
549
+ this.send({ type: 'schedule:run:update', run: failed });
550
+ }
551
+ this.send({ type: 'schedule:fire', jobId: job.id, jobName: job.name, runId });
552
+ this.send({ type: 'schedule:run:update', run });
553
+ }
554
+ appendRunLog(runId, chunk) {
555
+ const state = this.runLogState.get(runId);
556
+ if (!state)
557
+ return;
558
+ // Cap log size at 1MB per run; beyond that, silently drop further output.
559
+ const remaining = 1_000_000 - state.bytes;
560
+ if (remaining <= 0)
561
+ return;
562
+ const bytes = Buffer.byteLength(chunk, 'utf8');
563
+ const data = bytes <= remaining ? chunk : chunk.slice(0, remaining);
564
+ try {
565
+ fs.appendFileSync(state.filePath, data);
566
+ state.bytes += Buffer.byteLength(data, 'utf8');
567
+ }
568
+ catch {
569
+ // Disk full or permission — give up silently
570
+ }
571
+ }
572
+ readRunLog(runId) {
573
+ const logPath = path.join(this.runLogsDir, `${runId}.log`);
574
+ try {
575
+ return fs.readFileSync(logPath, 'utf8');
576
+ }
577
+ catch {
578
+ return '';
579
+ }
580
+ }
581
+ removeRunLog(runId) {
582
+ const logPath = path.join(this.runLogsDir, `${runId}.log`);
583
+ try {
584
+ fs.unlinkSync(logPath);
585
+ }
586
+ catch { }
587
+ this.runLogState.delete(runId);
588
+ }
195
589
  getEditorState() {
196
590
  return this.editorMonitor.getState();
197
591
  }
@@ -199,6 +593,7 @@ export class WsHandler {
199
593
  this.portMonitor.resume();
200
594
  this.claudeMonitor.resume();
201
595
  this.gitMonitor.resume();
596
+ this.sourceControl.resume();
202
597
  // Editor monitor is started on-demand via editor:sync message
203
598
  this.inboxMonitor.resume();
204
599
  }
@@ -206,6 +601,7 @@ export class WsHandler {
206
601
  this.portMonitor.pause();
207
602
  this.claudeMonitor.pause();
208
603
  this.gitMonitor.pause();
604
+ this.sourceControl.pause();
209
605
  this.editorMonitor.pause();
210
606
  this.inboxMonitor.pause();
211
607
  }
@@ -213,18 +609,34 @@ export class WsHandler {
213
609
  this.portMonitor.destroy();
214
610
  this.claudeMonitor.destroy();
215
611
  this.gitMonitor.destroy();
612
+ this.sourceControl.destroy();
216
613
  this.editorMonitor.destroy();
217
614
  this.inboxMonitor.destroy();
615
+ this.scheduler.destroy();
218
616
  }
219
- handlePtySpawn(terminalId, projectId, cwd) {
617
+ handlePtySpawn(terminalId, projectId, cwd, command) {
220
618
  try {
221
619
  this.ptyManager.spawn(terminalId, projectId, cwd, (tid, data) => {
222
620
  this.send({ type: 'pty:output', terminalId: tid, data });
223
621
  this.claudeMonitor.recordOutput(tid);
622
+ const runId = this.scheduledTerminals.get(tid);
623
+ if (runId)
624
+ this.appendRunLog(runId, data);
224
625
  }, (tid, exitCode) => {
225
626
  this.claudeMonitor.removeTerminal(tid);
627
+ const runId = this.scheduledTerminals.get(tid);
628
+ if (runId) {
629
+ this.scheduledTerminals.delete(tid);
630
+ this.runLogState.delete(runId);
631
+ const updated = this.scheduleStore.updateRun(runId, {
632
+ finishedAt: Date.now(),
633
+ exitCode,
634
+ });
635
+ if (updated)
636
+ this.send({ type: 'schedule:run:update', run: updated });
637
+ }
226
638
  this.send({ type: 'pty:exit', terminalId: tid, exitCode });
227
- });
639
+ }, command);
228
640
  this.projectStore.addTerminal(projectId, terminalId);
229
641
  }
230
642
  catch (e) {
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4
+ * https://github.com/chjj/term.js
5
+ * @license MIT
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ * Originally forked from (with the author's permission):
26
+ * Fabrice Bellard's javascript vt100 for jslinux:
27
+ * http://bellard.org/jslinux/
28
+ * Copyright (c) 2011 Fabrice Bellard
29
+ * The original design remains. The terminal itself
30
+ * has been extended to include xterm CSI codes, among
31
+ * other features.
32
+ */.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:-moz-fit-content;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}*,:before,:after{--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 / .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 / .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: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;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,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,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,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{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}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-\[2px\]{left:-2px}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.-top-\[2px\]{top:-2px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.left-0{left:0}.left-2{left:.5rem}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-2{top:.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-\[20vh\]{margin-top:20vh}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1\.5{height:.375rem}.h-1\/2{height:50%}.h-16{height:4rem}.h-2{height:.5rem}.h-4{height:1rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[11px\]{height:11px}.h-\[4px\]{height:4px}.h-\[75vh\]{height:75vh}.h-\[8px\]{height:8px}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-72{max-height:18rem}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[11px\]{width:11px}.w-\[380px\]{width:380px}.w-\[400px\]{width:400px}.w-\[420px\]{width:420px}.w-\[440px\]{width:440px}.w-\[4px\]{width:4px}.w-\[520px\]{width:520px}.w-\[640px\]{width:640px}.w-\[8px\]{width:8px}.w-\[960px\]{width:960px}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[24px\]{min-width:24px}.max-w-\[90vw\]{max-width:90vw}.max-w-\[95vw\]{max-width:95vw}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.scroll-my-8{scroll-margin-top:2rem;scroll-margin-bottom:2rem}.flex-row{flex-direction:row}.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}.gap-8{gap:2rem}.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-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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-\[var\(--accent\)\]{border-color:var(--accent)}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--danger\)\]{border-color:var(--danger)}.border-transparent{border-color:transparent}.bg-\[var\(--accent\)\]{background-color:var(--accent)}.bg-\[var\(--border\)\]{background-color:var(--border)}.bg-\[var\(--danger\)\]{background-color:var(--danger)}.bg-\[var\(--success\)\]{background-color:var(--success)}.bg-\[var\(--surface-0\)\]{background-color:var(--surface-0)}.bg-\[var\(--surface-1\)\]{background-color:var(--surface-1)}.bg-\[var\(--surface-2\)\]{background-color:var(--surface-2)}.bg-\[var\(--surface-3\)\]{background-color:var(--surface-3)}.bg-accent{background-color:var(--accent)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-current{background-color:currentColor}.bg-emerald-500\/10{background-color:#10b9811a}.bg-purple-500\/10{background-color:#a855f71a}.bg-purple-500\/20{background-color:#a855f733}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-transparent{background-color:transparent}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.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-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.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-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-5{padding-right:1.25rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[5px\]{font-size:5px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-\[1\.5\]{line-height:1.5}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[var\(--accent\)\]{color:var(--accent)}.text-\[var\(--danger\)\]{color:var(--danger)}.text-\[var\(--success\)\]{color:var(--success)}.text-\[var\(--surface-0\)\]{color:var(--surface-0)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-accent{color:var(--accent)}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-400\/50{color:#c084fc80}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-500\/80{color:#eab308cc}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-40{opacity:.4}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_1px_0_var\(--border\)\]{--tw-shadow: 0 1px 0 var(--border);--tw-shadow-colored: 0 1px 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)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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-2{--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(2px + 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-inset{--tw-ring-inset: inset}.ring-\[var\(--accent\)\]{--tw-ring-color: var(--accent)}.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);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{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}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}:root{--surface-0: #0a0a0f;--surface-1: #111118;--surface-2: #1a1a24;--surface-3: #252532;--border: #2a2a3a;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #3a3a8c;--text-primary: #ececf1;--text-secondary: #a1a1b5;--text-muted: #6b6b80;--danger: #e5484d;--danger-dim: #3c1618;--success: #30a46c}[data-theme=light]{--surface-0: #ffffff;--surface-1: #f5f5f7;--surface-2: #ebebef;--surface-3: #dddde3;--border: #d0d0d8;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #e0e0ff;--text-primary: #1a1a2e;--text-secondary: #555570;--text-muted: #8888a0;--danger: #dc3545;--danger-dim: #fde8ea;--success: #1a8f5c}@media (prefers-color-scheme: light){[data-theme=system]{--surface-0: #ffffff;--surface-1: #f5f5f7;--surface-2: #ebebef;--surface-3: #dddde3;--border: #d0d0d8;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #e0e0ff;--text-primary: #1a1a2e;--text-secondary: #555570;--text-muted: #8888a0;--danger: #dc3545;--danger-dim: #fde8ea;--success: #1a8f5c}}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;width:100%;overflow:hidden;background:var(--surface-0);color:var(--text-primary);font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,sans-serif}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.xterm{padding:4px 8px}.xterm-viewport::-webkit-scrollbar{width:6px}.xterm-viewport::-webkit-scrollbar-track{background:transparent}.xterm-viewport::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOut{0%{transform:translate(0)}to{transform:translate(-100%)}}.animate-fade-in{animation:fadeIn .15s ease-out}.sc-code{color:var(--text-primary)}.sc-code .token.comment,.sc-code .token.prolog,.sc-code .token.doctype,.sc-code .token.cdata{color:var(--text-muted);font-style:italic}.sc-code .token.punctuation{color:var(--text-secondary)}.sc-code .token.namespace{opacity:.7}.sc-code .token.property,.sc-code .token.tag,.sc-code .token.constant,.sc-code .token.symbol,.sc-code .token.deleted{color:#e5484d}.sc-code .token.boolean,.sc-code .token.number{color:#f5a524}.sc-code .token.selector,.sc-code .token.attr-name,.sc-code .token.string,.sc-code .token.char,.sc-code .token.builtin,.sc-code .token.inserted{color:#30a46c}.sc-code .token.operator,.sc-code .token.entity,.sc-code .token.url,.sc-code .language-css .token.string,.sc-code .style .token.string{color:#5b5bd6}.sc-code .token.atrule,.sc-code .token.attr-value,.sc-code .token.keyword{color:#c39bff}.sc-code .token.function,.sc-code .token.class-name{color:#5eb1ff}.sc-code .token.regex,.sc-code .token.important,.sc-code .token.variable{color:#f5a524}.sc-code .token.important,.sc-code .token.bold{font-weight:700}.sc-code .token.italic{font-style:italic}.sc-code .token.entity{cursor:help}[data-theme=light] .sc-code .token.property,[data-theme=light] .sc-code .token.tag,[data-theme=light] .sc-code .token.constant,[data-theme=light] .sc-code .token.symbol,[data-theme=light] .sc-code .token.deleted{color:#b91c1c}[data-theme=light] .sc-code .token.boolean,[data-theme=light] .sc-code .token.number{color:#b45309}[data-theme=light] .sc-code .token.selector,[data-theme=light] .sc-code .token.attr-name,[data-theme=light] .sc-code .token.string,[data-theme=light] .sc-code .token.char,[data-theme=light] .sc-code .token.builtin,[data-theme=light] .sc-code .token.inserted{color:#047857}[data-theme=light] .sc-code .token.atrule,[data-theme=light] .sc-code .token.attr-value,[data-theme=light] .sc-code .token.keyword{color:#6d28d9}[data-theme=light] .sc-code .token.function,[data-theme=light] .sc-code .token.class-name{color:#1e40af}@media (prefers-color-scheme: light){[data-theme=system] .sc-code .token.property,[data-theme=system] .sc-code .token.tag,[data-theme=system] .sc-code .token.constant,[data-theme=system] .sc-code .token.symbol,[data-theme=system] .sc-code .token.deleted{color:#b91c1c}[data-theme=system] .sc-code .token.boolean,[data-theme=system] .sc-code .token.number{color:#b45309}[data-theme=system] .sc-code .token.selector,[data-theme=system] .sc-code .token.attr-name,[data-theme=system] .sc-code .token.string,[data-theme=system] .sc-code .token.char,[data-theme=system] .sc-code .token.builtin,[data-theme=system] .sc-code .token.inserted{color:#047857}[data-theme=system] .sc-code .token.atrule,[data-theme=system] .sc-code .token.attr-value,[data-theme=system] .sc-code .token.keyword{color:#6d28d9}[data-theme=system] .sc-code .token.function,[data-theme=system] .sc-code .token.class-name{color:#1e40af}}.placeholder\:text-\[var\(--text-muted\)\]::-moz-placeholder{color:var(--text-muted)}.placeholder\:text-\[var\(--text-muted\)\]::placeholder{color:var(--text-muted)}.hover\:bg-\[var\(--accent\)\]:hover{background-color:var(--accent)}.hover\:bg-\[var\(--danger-dim\)\]:hover{background-color:var(--danger-dim)}.hover\:bg-\[var\(--surface-2\)\]:hover{background-color:var(--surface-2)}.hover\:bg-\[var\(--surface-3\)\]:hover{background-color:var(--surface-3)}.hover\:bg-emerald-500\/15:hover{background-color:#10b98126}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:bg-rose-500\/15:hover{background-color:#f43f5e26}.hover\:text-\[var\(--accent\)\]:hover{color:var(--accent)}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--success\)\]:hover{color:var(--success)}.hover\:text-\[var\(--text-primary\)\]:hover{color:var(--text-primary)}.hover\:text-\[var\(--text-secondary\)\]:hover{color:var(--text-secondary)}.hover\:text-yellow-400:hover{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.hover\:opacity-70:hover{opacity:.7}.hover\:opacity-90:hover{opacity:.9}.focus\:border-\[var\(--accent\)\]:focus{border-color:var(--accent)}.focus\:border-\[var\(--danger\)\]:focus{border-color:var(--danger)}.focus\:border-accent:focus{border-color:var(--accent)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1: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(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)}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-\[var\(--accent\)\]:active{background-color:var(--accent)}.active\:opacity-60:active{opacity:.6}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-\[var\(--accent\)\]{color:var(--accent)}.group:active .group-active\:bg-accent{background-color:var(--accent)}@media (min-width: 640px){.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}}